diff --git a/frontend/src/lib/gen/services.gen.ts b/frontend/src/lib/gen/services.gen.ts deleted file mode 100644 index 3d14587c1d..0000000000 --- a/frontend/src/lib/gen/services.gen.ts +++ /dev/null @@ -1,14062 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { CancelablePromise } from './core/CancelablePromise'; -import { OpenAPI } from './core/OpenAPI'; -import { request as __request } from './core/request'; -import type { BackendVersionResponse, BackendUptodateResponse, GetLicenseIdResponse, GetOpenApiYamlResponse, GetHealthStatusData, GetHealthStatusResponse, GetHealthDetailedResponse, QueryDocumentationData, QueryDocumentationResponse, GetAuditLogData, GetAuditLogResponse, ListAuditLogsData, ListAuditLogsResponse, LoginData, LoginResponse, LogoutResponse, IsSmtpConfiguredResponse, RequestPasswordResetData, RequestPasswordResetResponse, ResetPasswordData, ResetPasswordResponse, GetUserData, GetUserResponse, UpdateUserData, UpdateUserResponse, IsOwnerOfPathData, IsOwnerOfPathResponse, SetPasswordData, SetPasswordResponse, SetPasswordForUserData, SetPasswordForUserResponse, SetLoginTypeForUserData, SetLoginTypeForUserResponse, CreateUserGloballyData, CreateUserGloballyResponse, GlobalUserUpdateData, GlobalUserUpdateResponse, GlobalUsernameInfoData, GlobalUsernameInfoResponse, GlobalUserRenameData, GlobalUserRenameResponse, GlobalUserDeleteData, GlobalUserDeleteResponse, GlobalUsersOverwriteData, GlobalUsersOverwriteResponse, GlobalUsersExportResponse, SubmitOnboardingDataData, SubmitOnboardingDataResponse, DeleteUserData, DeleteUserResponse, ConvertUserToGroupData, ConvertUserToGroupResponse, GetCurrentEmailResponse, RefreshUserTokenData, RefreshUserTokenResponse, GetTutorialProgressResponse, UpdateTutorialProgressData, UpdateTutorialProgressResponse, LeaveInstanceResponse, GetUsageResponse, GetRunnableResponse, GlobalWhoamiResponse, ListWorkspaceInvitesResponse, WhoamiData, WhoamiResponse, AcceptInviteData, AcceptInviteResponse, DeclineInviteData, DeclineInviteResponse, WhoisData, WhoisResponse, ExistsEmailData, ExistsEmailResponse, ListUsersAsSuperAdminData, ListUsersAsSuperAdminResponse, ListUsersData, ListUsersResponse, ListUsersUsageData, ListUsersUsageResponse, ListUsernamesData, ListUsernamesResponse, UsernameToEmailData, UsernameToEmailResponse, CreateTokenData, CreateTokenResponse, CreateTokenImpersonateData, CreateTokenImpersonateResponse, DeleteTokenData, DeleteTokenResponse, ListTokensData, ListTokensResponse, LoginWithOauthData, LoginWithOauthResponse, GetGlobalConnectedRepositoriesData, GetGlobalConnectedRepositoriesResponse, InstallFromWorkspaceData, InstallFromWorkspaceResponse, DeleteFromWorkspaceData, DeleteFromWorkspaceResponse, ExportInstallationData, ExportInstallationResponse, ImportInstallationData, ImportInstallationResponse, GhesInstallationCallbackData, GhesInstallationCallbackResponse, GetGhesConfigResponse, ListWorkspacesResponse, IsDomainAllowedResponse, ListUserWorkspacesResponse, GetWorkspaceAsSuperAdminData, GetWorkspaceAsSuperAdminResponse, ListWorkspacesAsSuperAdminData, ListWorkspacesAsSuperAdminResponse, CreateWorkspaceData, CreateWorkspaceResponse, CreateWorkspaceForkGitBranchData, CreateWorkspaceForkGitBranchResponse, CreateWorkspaceForkData, CreateWorkspaceForkResponse, ExistsWorkspaceData, ExistsWorkspaceResponse, ExistsUsernameData, ExistsUsernameResponse, GetGithubAppTokenData, GetGithubAppTokenResponse, InviteUserData, InviteUserResponse, AddUserData, AddUserResponse, DeleteInviteData, DeleteInviteResponse, ArchiveWorkspaceData, ArchiveWorkspaceResponse, UnarchiveWorkspaceData, UnarchiveWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceResponse, LeaveWorkspaceData, LeaveWorkspaceResponse, GetWorkspaceNameData, GetWorkspaceNameResponse, ChangeWorkspaceNameData, ChangeWorkspaceNameResponse, ChangeWorkspaceIdData, ChangeWorkspaceIdResponse, ChangeWorkspaceColorData, ChangeWorkspaceColorResponse, UpdateOperatorSettingsData, UpdateOperatorSettingsResponse, CompareWorkspacesData, CompareWorkspacesResponse, ResetDiffTallyData, ResetDiffTallyResponse, ListPendingInvitesData, ListPendingInvitesResponse, GetSettingsData, GetSettingsResponse, GetDeployToData, GetDeployToResponse, GetIsPremiumData, GetIsPremiumResponse, GetPremiumInfoData, GetPremiumInfoResponse, GetThresholdAlertData, GetThresholdAlertResponse, SetThresholdAlertData, SetThresholdAlertResponse, RebuildDependencyMapData, RebuildDependencyMapResponse, GetDependentsData, GetDependentsResponse, GetDependentsAmountsData, GetDependentsAmountsResponse, GetDependencyMapData, GetDependencyMapResponse, EditSlackCommandData, EditSlackCommandResponse, GetWorkspaceSlackOauthConfigData, GetWorkspaceSlackOauthConfigResponse, SetWorkspaceSlackOauthConfigData, SetWorkspaceSlackOauthConfigResponse, DeleteWorkspaceSlackOauthConfigData, DeleteWorkspaceSlackOauthConfigResponse, EditTeamsCommandData, EditTeamsCommandResponse, ListAvailableTeamsIdsData, ListAvailableTeamsIdsResponse, ListAvailableTeamsChannelsData, ListAvailableTeamsChannelsResponse, ConnectTeamsData, ConnectTeamsResponse, RunSlackMessageTestJobData, RunSlackMessageTestJobResponse, RunTeamsMessageTestJobData, RunTeamsMessageTestJobResponse, EditDeployToData, EditDeployToResponse, EditAutoInviteData, EditAutoInviteResponse, EditInstanceGroupsData, EditInstanceGroupsResponse, EditWebhookData, EditWebhookResponse, EditCopilotConfigData, EditCopilotConfigResponse, GetCopilotInfoData, GetCopilotInfoResponse, EditErrorHandlerData, EditErrorHandlerResponse, EditSuccessHandlerData, EditSuccessHandlerResponse, EditLargeFileStorageConfigData, EditLargeFileStorageConfigResponse, ListDucklakesData, ListDucklakesResponse, ListDataTablesData, ListDataTablesResponse, ListDataTableSchemasData, ListDataTableSchemasResponse, EditDucklakeConfigData, EditDucklakeConfigResponse, EditDataTableConfigData, EditDataTableConfigResponse, EditWorkspaceGitSyncConfigData, EditWorkspaceGitSyncConfigResponse, EditGitSyncRepositoryData, EditGitSyncRepositoryResponse, DeleteGitSyncRepositoryData, DeleteGitSyncRepositoryResponse, EditWorkspaceDeployUiSettingsData, EditWorkspaceDeployUiSettingsResponse, EditWorkspaceDefaultAppData, EditWorkspaceDefaultAppResponse, EditDefaultScriptsData, EditDefaultScriptsResponse, GetDefaultScriptsData, GetDefaultScriptsResponse, SetEnvironmentVariableData, SetEnvironmentVariableResponse, GetWorkspaceEncryptionKeyData, GetWorkspaceEncryptionKeyResponse, SetWorkspaceEncryptionKeyData, SetWorkspaceEncryptionKeyResponse, GetWorkspaceDefaultAppData, GetWorkspaceDefaultAppResponse, GetWorkspaceUsageData, GetWorkspaceUsageResponse, GetUsedTriggersData, GetUsedTriggersResponse, ListProtectionRulesData, ListProtectionRulesResponse, CreateProtectionRuleData, CreateProtectionRuleResponse, UpdateProtectionRuleData, UpdateProtectionRuleResponse, DeleteProtectionRuleData, DeleteProtectionRuleResponse, LogAiChatData, LogAiChatResponse, GetCloudQuotasData, GetCloudQuotasResponse, PruneVersionsData, PruneVersionsResponse, RefreshCustomInstanceUserPwdResponse, ListCustomInstanceDbsResponse, SetupCustomInstanceDbData, SetupCustomInstanceDbResponse, GetGlobalData, GetGlobalResponse, SetGlobalData, SetGlobalResponse, GetLocalResponse, TestSmtpData, TestSmtpResponse, TestCriticalChannelsData, TestCriticalChannelsResponse, GetCriticalAlertsData, GetCriticalAlertsResponse, AcknowledgeCriticalAlertData, AcknowledgeCriticalAlertResponse, AcknowledgeAllCriticalAlertsResponse, TestLicenseKeyData, TestLicenseKeyResponse, TestObjectStorageConfigData, TestObjectStorageConfigResponse, SendStatsResponse, GetStatsResponse, GetLatestKeyRenewalAttemptResponse, RenewLicenseKeyData, RenewLicenseKeyResponse, CreateCustomerPortalSessionData, CreateCustomerPortalSessionResponse, TestMetadataData, TestMetadataResponse, ListGlobalSettingsResponse, GetInstanceConfigResponse, SetInstanceConfigData, SetInstanceConfigResponse, GetMinKeepAliveVersionResponse, GetJwksResponse, TestSecretBackendData, TestSecretBackendResponse, MigrateSecretsToVaultData, MigrateSecretsToVaultResponse, MigrateSecretsToDatabaseData, MigrateSecretsToDatabaseResponse, GetSecondaryStorageNamesData, GetSecondaryStorageNamesResponse, WorkspaceGetCriticalAlertsData, WorkspaceGetCriticalAlertsResponse, WorkspaceAcknowledgeCriticalAlertData, WorkspaceAcknowledgeCriticalAlertResponse, WorkspaceAcknowledgeAllCriticalAlertsData, WorkspaceAcknowledgeAllCriticalAlertsResponse, WorkspaceMuteCriticalAlertsUiData, WorkspaceMuteCriticalAlertsUiResponse, SetPublicAppRateLimitData, SetPublicAppRateLimitResponse, ListAvailableScopesResponse, GetOidcTokenData, GetOidcTokenResponse, CreateVariableData, CreateVariableResponse, EncryptValueData, EncryptValueResponse, DeleteVariableData, DeleteVariableResponse, DeleteVariablesBulkData, DeleteVariablesBulkResponse, UpdateVariableData, UpdateVariableResponse, GetVariableData, GetVariableResponse, GetVariableValueData, GetVariableValueResponse, ExistsVariableData, ExistsVariableResponse, ListVariableData, ListVariableResponse, ListContextualVariablesData, ListContextualVariablesResponse, ConnectSlackCallbackData, ConnectSlackCallbackResponse, ConnectSlackCallbackInstanceData, ConnectSlackCallbackInstanceResponse, ConnectCallbackData, ConnectCallbackResponse, CreateAccountData, CreateAccountResponse, ConnectClientCredentialsData, ConnectClientCredentialsResponse, RefreshTokenData, RefreshTokenResponse, DisconnectAccountData, DisconnectAccountResponse, DisconnectSlackData, DisconnectSlackResponse, DisconnectTeamsData, DisconnectTeamsResponse, ListOauthLoginsResponse, ListOauthConnectsResponse, GetOauthConnectData, GetOauthConnectResponse, SendMessageToConversationData, SendMessageToConversationResponse, CreateResourceData, CreateResourceResponse, DeleteResourceData, DeleteResourceResponse, DeleteResourcesBulkData, DeleteResourcesBulkResponse, UpdateResourceData, UpdateResourceResponse, UpdateResourceValueData, UpdateResourceValueResponse, GetResourceData, GetResourceResponse, GetResourceValueInterpolatedData, GetResourceValueInterpolatedResponse, GetResourceValueData, GetResourceValueResponse, GetGitCommitHashData, GetGitCommitHashResponse, ExistsResourceData, ExistsResourceResponse, ListResourceData, ListResourceResponse, ListSearchResourceData, ListSearchResourceResponse, GetMcpToolsData, GetMcpToolsResponse, ListResourceNamesData, ListResourceNamesResponse, CreateResourceTypeData, CreateResourceTypeResponse, FileResourceTypeToFileExtMapData, FileResourceTypeToFileExtMapResponse, DeleteResourceTypeData, DeleteResourceTypeResponse, UpdateResourceTypeData, UpdateResourceTypeResponse, GetResourceTypeData, GetResourceTypeResponse, ExistsResourceTypeData, ExistsResourceTypeResponse, ListResourceTypeData, ListResourceTypeResponse, ListResourceTypeNamesData, ListResourceTypeNamesResponse, QueryResourceTypesData, QueryResourceTypesResponse, GetNpmPackageMetadataData, GetNpmPackageMetadataResponse, ResolveNpmPackageVersionData, ResolveNpmPackageVersionResponse, GetNpmPackageFiletreeData, GetNpmPackageFiletreeResponse, GetNpmPackageFileData, GetNpmPackageFileResponse, ListHubIntegrationsData, ListHubIntegrationsResponse, ListHubFlowsResponse, GetHubFlowByIdData, GetHubFlowByIdResponse, ListFlowPathsData, ListFlowPathsResponse, ListSearchFlowData, ListSearchFlowResponse, ListFlowsData, ListFlowsResponse, GetFlowHistoryData, GetFlowHistoryResponse, GetFlowLatestVersionData, GetFlowLatestVersionResponse, ListFlowPathsFromWorkspaceRunnableData, ListFlowPathsFromWorkspaceRunnableResponse, GetFlowVersionData, GetFlowVersionResponse, UpdateFlowHistoryData, UpdateFlowHistoryResponse, GetFlowByPathData, GetFlowByPathResponse, GetFlowDeploymentStatusData, GetFlowDeploymentStatusResponse, GetTriggersCountOfFlowData, GetTriggersCountOfFlowResponse, ListTokensOfFlowData, ListTokensOfFlowResponse, ToggleWorkspaceErrorHandlerForFlowData, ToggleWorkspaceErrorHandlerForFlowResponse, GetFlowByPathWithDraftData, GetFlowByPathWithDraftResponse, ExistsFlowByPathData, ExistsFlowByPathResponse, CreateFlowData, CreateFlowResponse, UpdateFlowData, UpdateFlowResponse, ArchiveFlowByPathData, ArchiveFlowByPathResponse, DeleteFlowByPathData, DeleteFlowByPathResponse, ListHubAppsResponse, GetHubAppByIdData, GetHubAppByIdResponse, GetHubRawAppByIdData, GetHubRawAppByIdResponse, GetPublicAppByCustomPathData, GetPublicAppByCustomPathResponse, GetRawAppDataData, GetRawAppDataResponse, ListSearchAppData, ListSearchAppResponse, ListAppsData, ListAppsResponse, CreateAppData, CreateAppResponse, CreateAppRawData, CreateAppRawResponse, ExistsAppData, ExistsAppResponse, GetAppByPathData, GetAppByPathResponse, GetAppLiteByPathData, GetAppLiteByPathResponse, GetAppByPathWithDraftData, GetAppByPathWithDraftResponse, GetAppHistoryByPathData, GetAppHistoryByPathResponse, GetAppLatestVersionData, GetAppLatestVersionResponse, ListAppPathsFromWorkspaceRunnableData, ListAppPathsFromWorkspaceRunnableResponse, UpdateAppHistoryData, UpdateAppHistoryResponse, GetPublicAppBySecretData, GetPublicAppBySecretResponse, GetPublicResourceData, GetPublicResourceResponse, GetPublicSecretOfAppData, GetPublicSecretOfAppResponse, GetPublicSecretOfLatestVersionOfAppData, GetPublicSecretOfLatestVersionOfAppResponse, GetAppByVersionData, GetAppByVersionResponse, DeleteAppData, DeleteAppResponse, UpdateAppData, UpdateAppResponse, UpdateAppRawData, UpdateAppRawResponse, CustomPathExistsData, CustomPathExistsResponse, SignS3ObjectsData, SignS3ObjectsResponse, ExecuteComponentData, ExecuteComponentResponse, UploadS3FileFromAppData, UploadS3FileFromAppResponse, DeleteS3FileFromAppData, DeleteS3FileFromAppResponse, GetHubScriptContentByPathData, GetHubScriptContentByPathResponse, GetHubScriptByPathData, GetHubScriptByPathResponse, PickHubScriptByPathData, PickHubScriptByPathResponse, GetTopHubScriptsData, GetTopHubScriptsResponse, QueryHubScriptsData, QueryHubScriptsResponse, ListSearchScriptData, ListSearchScriptResponse, ListScriptsData, ListScriptsResponse, ListScriptPathsData, ListScriptPathsResponse, CreateScriptData, CreateScriptResponse, ToggleWorkspaceErrorHandlerForScriptData, ToggleWorkspaceErrorHandlerForScriptResponse, ArchiveScriptByPathData, ArchiveScriptByPathResponse, ArchiveScriptByHashData, ArchiveScriptByHashResponse, DeleteScriptByHashData, DeleteScriptByHashResponse, DeleteScriptByPathData, DeleteScriptByPathResponse, DeleteScriptsBulkData, DeleteScriptsBulkResponse, GetScriptByPathData, GetScriptByPathResponse, GetTriggersCountOfScriptData, GetTriggersCountOfScriptResponse, ListTokensOfScriptData, ListTokensOfScriptResponse, GetScriptByPathWithDraftData, GetScriptByPathWithDraftResponse, GetScriptHistoryByPathData, GetScriptHistoryByPathResponse, ListScriptPathsFromWorkspaceRunnableData, ListScriptPathsFromWorkspaceRunnableResponse, GetScriptLatestVersionData, GetScriptLatestVersionResponse, UpdateScriptHistoryData, UpdateScriptHistoryResponse, RawScriptByPathData, RawScriptByPathResponse, RawScriptByPathTokenedData, RawScriptByPathTokenedResponse, ExistsScriptByPathData, ExistsScriptByPathResponse, GetScriptByHashData, GetScriptByHashResponse, RawScriptByHashData, RawScriptByHashResponse, GetScriptDeploymentStatusData, GetScriptDeploymentStatusResponse, StoreRawScriptTempData, StoreRawScriptTempResponse, DiffRawScriptsWithDeployedData, DiffRawScriptsWithDeployedResponse, CreateDraftData, CreateDraftResponse, DeleteDraftData, DeleteDraftResponse, GetCustomTagsData, GetCustomTagsResponse, GetCustomTagsForWorkspaceData, GetCustomTagsForWorkspaceResponse, GeDefaultTagsResponse, IsDefaultTagsPerWorkspaceResponse, ListWorkersData, ListWorkersResponse, ExistsWorkersWithTagsData, ExistsWorkersWithTagsResponse, GetQueueMetricsResponse, GetCountsOfJobsWaitingPerTagResponse, GetCountsOfRunningJobsPerTagResponse, CreateWorkspaceDependenciesData, CreateWorkspaceDependenciesResponse, ArchiveWorkspaceDependenciesData, ArchiveWorkspaceDependenciesResponse, DeleteWorkspaceDependenciesData, DeleteWorkspaceDependenciesResponse, ListWorkspaceDependenciesData, ListWorkspaceDependenciesResponse, GetLatestWorkspaceDependenciesData, GetLatestWorkspaceDependenciesResponse, ListSelectedJobGroupsData, ListSelectedJobGroupsResponse, RunScriptByPathData, RunScriptByPathResponse, RunWaitResultScriptByPathData, RunWaitResultScriptByPathResponse, RunWaitResultScriptByPathGetData, RunWaitResultScriptByPathGetResponse, RunWaitResultFlowByPathData, RunWaitResultFlowByPathResponse, RunWaitResultFlowByVersionData, RunWaitResultFlowByVersionResponse, RunWaitResultFlowByVersionGetData, RunWaitResultFlowByVersionGetResponse, RunAndStreamFlowByPathData, RunAndStreamFlowByPathResponse, RunAndStreamFlowByPathGetData, RunAndStreamFlowByPathGetResponse, RunAndStreamFlowByVersionData, RunAndStreamFlowByVersionResponse, RunAndStreamFlowByVersionGetData, RunAndStreamFlowByVersionGetResponse, RunAndStreamScriptByPathData, RunAndStreamScriptByPathResponse, RunAndStreamScriptByPathGetData, RunAndStreamScriptByPathGetResponse, RunAndStreamScriptByHashData, RunAndStreamScriptByHashResponse, RunAndStreamScriptByHashGetData, RunAndStreamScriptByHashGetResponse, ResultByIdData, ResultByIdResponse, RunFlowByPathData, RunFlowByPathResponse, RunFlowByVersionData, RunFlowByVersionResponse, BatchReRunJobsData, BatchReRunJobsResponse, RestartFlowAtStepData, RestartFlowAtStepResponse, RunScriptByHashData, RunScriptByHashResponse, RunScriptPreviewData, RunScriptPreviewResponse, RunScriptPreviewInlineData, RunScriptPreviewInlineResponse, RunScriptByPathInlineData, RunScriptByPathInlineResponse, RunScriptByHashInlineData, RunScriptByHashInlineResponse, RunScriptPreviewAndWaitResultData, RunScriptPreviewAndWaitResultResponse, RunCodeWorkflowTaskData, RunCodeWorkflowTaskResponse, RunRawScriptDependenciesData, RunRawScriptDependenciesResponse, RunFlowPreviewData, RunFlowPreviewResponse, RunFlowPreviewAndWaitResultData, RunFlowPreviewAndWaitResultResponse, RunDynamicSelectData, RunDynamicSelectResponse, ListQueueData, ListQueueResponse, GetQueueCountData, GetQueueCountResponse, GetCompletedCountData, GetCompletedCountResponse, CountCompletedJobsData, CountCompletedJobsResponse, ListFilteredJobsUuidsData, ListFilteredJobsUuidsResponse, ListFilteredQueueUuidsData, ListFilteredQueueUuidsResponse, CancelSelectionData, CancelSelectionResponse, GetJobOtelTracesData, GetJobOtelTracesResponse, ListCompletedJobsData, ListCompletedJobsResponse, ExportCompletedJobsData, ExportCompletedJobsResponse, ImportCompletedJobsData, ImportCompletedJobsResponse, ExportQueuedJobsData, ExportQueuedJobsResponse, ImportQueuedJobsData, ImportQueuedJobsResponse, DeleteJobsData, DeleteJobsResponse, ListJobsData, ListJobsResponse, GetDbClockResponse, CountJobsByTagData, CountJobsByTagResponse, GetJobData, GetJobResponse, GetRootJobIdData, GetRootJobIdResponse, GetJobLogsData, GetJobLogsResponse, GetCompletedJobLogsTailData, GetCompletedJobLogsTailResponse, GetJobArgsData, GetJobArgsResponse, GetStartedAtByIdsData, GetStartedAtByIdsResponse, GetJobUpdatesData, GetJobUpdatesResponse, GetJobUpdatesSseData, GetJobUpdatesSseResponse, GetLogFileFromStoreData, GetLogFileFromStoreResponse, GetFlowDebugInfoData, GetFlowDebugInfoResponse, GetCompletedJobData, GetCompletedJobResponse, GetCompletedJobResultData, GetCompletedJobResultResponse, GetCompletedJobResultMaybeData, GetCompletedJobResultMaybeResponse, GetCompletedJobTimingData, GetCompletedJobTimingResponse, DeleteCompletedJobData, DeleteCompletedJobResponse, CancelQueuedJobData, CancelQueuedJobResponse, CancelPersistentQueuedJobsData, CancelPersistentQueuedJobsResponse, ForceCancelQueuedJobData, ForceCancelQueuedJobResponse, GetQueuePositionData, GetQueuePositionResponse, GetScheduledForData, GetScheduledForResponse, CreateJobSignatureData, CreateJobSignatureResponse, GetResumeUrlsData, GetResumeUrlsResponse, GetSlackApprovalPayloadData, GetSlackApprovalPayloadResponse, GetTeamsApprovalPayloadData, GetTeamsApprovalPayloadResponse, ResumeSuspendedJobGetData, ResumeSuspendedJobGetResponse, ResumeSuspendedJobPostData, ResumeSuspendedJobPostResponse, SetFlowUserStateData, SetFlowUserStateResponse, GetFlowUserStateData, GetFlowUserStateResponse, ResumeSuspendedFlowAsOwnerData, ResumeSuspendedFlowAsOwnerResponse, CancelSuspendedJobGetData, CancelSuspendedJobGetResponse, CancelSuspendedJobPostData, CancelSuspendedJobPostResponse, GetSuspendedJobFlowData, GetSuspendedJobFlowResponse, ListExtendedJobsData, ListExtendedJobsResponse, ListFlowConversationsData, ListFlowConversationsResponse, DeleteFlowConversationData, DeleteFlowConversationResponse, ListConversationMessagesData, ListConversationMessagesResponse, ListRawAppsData, ListRawAppsResponse, ResumeSuspendedTriggerJobsData, ResumeSuspendedTriggerJobsResponse, CancelSuspendedTriggerJobsData, CancelSuspendedTriggerJobsResponse, PreviewScheduleData, PreviewScheduleResponse, CreateScheduleData, CreateScheduleResponse, UpdateScheduleData, UpdateScheduleResponse, SetScheduleEnabledData, SetScheduleEnabledResponse, DeleteScheduleData, DeleteScheduleResponse, GetScheduleData, GetScheduleResponse, ExistsScheduleData, ExistsScheduleResponse, ListSchedulesData, ListSchedulesResponse, ListSchedulesWithJobsData, ListSchedulesWithJobsResponse, SetDefaultErrorOrRecoveryHandlerData, SetDefaultErrorOrRecoveryHandlerResponse, GenerateOpenapiSpecData, GenerateOpenapiSpecResponse, DownloadOpenapiSpecData, DownloadOpenapiSpecResponse, CreateHttpTriggersData, CreateHttpTriggersResponse, CreateHttpTriggerData, CreateHttpTriggerResponse, UpdateHttpTriggerData, UpdateHttpTriggerResponse, DeleteHttpTriggerData, DeleteHttpTriggerResponse, GetHttpTriggerData, GetHttpTriggerResponse, ListHttpTriggersData, ListHttpTriggersResponse, ExistsHttpTriggerData, ExistsHttpTriggerResponse, ExistsRouteData, ExistsRouteResponse, SetHttpTriggerModeData, SetHttpTriggerModeResponse, CreateWebsocketTriggerData, CreateWebsocketTriggerResponse, UpdateWebsocketTriggerData, UpdateWebsocketTriggerResponse, DeleteWebsocketTriggerData, DeleteWebsocketTriggerResponse, GetWebsocketTriggerData, GetWebsocketTriggerResponse, ListWebsocketTriggersData, ListWebsocketTriggersResponse, ExistsWebsocketTriggerData, ExistsWebsocketTriggerResponse, SetWebsocketTriggerModeData, SetWebsocketTriggerModeResponse, TestWebsocketConnectionData, TestWebsocketConnectionResponse, CreateKafkaTriggerData, CreateKafkaTriggerResponse, UpdateKafkaTriggerData, UpdateKafkaTriggerResponse, DeleteKafkaTriggerData, DeleteKafkaTriggerResponse, GetKafkaTriggerData, GetKafkaTriggerResponse, ListKafkaTriggersData, ListKafkaTriggersResponse, ExistsKafkaTriggerData, ExistsKafkaTriggerResponse, SetKafkaTriggerModeData, SetKafkaTriggerModeResponse, TestKafkaConnectionData, TestKafkaConnectionResponse, ResetKafkaOffsetsData, ResetKafkaOffsetsResponse, CommitKafkaOffsetsData, CommitKafkaOffsetsResponse, CreateNatsTriggerData, CreateNatsTriggerResponse, UpdateNatsTriggerData, UpdateNatsTriggerResponse, DeleteNatsTriggerData, DeleteNatsTriggerResponse, GetNatsTriggerData, GetNatsTriggerResponse, ListNatsTriggersData, ListNatsTriggersResponse, ExistsNatsTriggerData, ExistsNatsTriggerResponse, SetNatsTriggerModeData, SetNatsTriggerModeResponse, TestNatsConnectionData, TestNatsConnectionResponse, CreateSqsTriggerData, CreateSqsTriggerResponse, UpdateSqsTriggerData, UpdateSqsTriggerResponse, DeleteSqsTriggerData, DeleteSqsTriggerResponse, GetSqsTriggerData, GetSqsTriggerResponse, ListSqsTriggersData, ListSqsTriggersResponse, ExistsSqsTriggerData, ExistsSqsTriggerResponse, SetSqsTriggerModeData, SetSqsTriggerModeResponse, TestSqsConnectionData, TestSqsConnectionResponse, ListNativeTriggerServicesData, ListNativeTriggerServicesResponse, CheckIfNativeTriggersServiceExistsData, CheckIfNativeTriggersServiceExistsResponse, CreateNativeTriggerServiceData, CreateNativeTriggerServiceResponse, GenerateNativeTriggerServiceConnectUrlData, GenerateNativeTriggerServiceConnectUrlResponse, CheckInstanceSharingAvailableData, CheckInstanceSharingAvailableResponse, GenerateInstanceConnectUrlData, GenerateInstanceConnectUrlResponse, DeleteNativeTriggerServiceData, DeleteNativeTriggerServiceResponse, NativeTriggerServiceCallbackData, NativeTriggerServiceCallbackResponse, CreateNativeTriggerData, CreateNativeTriggerResponse, UpdateNativeTriggerData, UpdateNativeTriggerResponse, GetNativeTriggerData, GetNativeTriggerResponse, DeleteNativeTriggerData, DeleteNativeTriggerResponse, ListNativeTriggersData, ListNativeTriggersResponse, ExistsNativeTriggerData, ExistsNativeTriggerResponse, SyncNativeTriggersData, SyncNativeTriggersResponse, ListNextCloudEventsData, ListNextCloudEventsResponse, ListGoogleCalendarsData, ListGoogleCalendarsResponse, ListGoogleDriveFilesData, ListGoogleDriveFilesResponse, ListGoogleSharedDrivesData, ListGoogleSharedDrivesResponse, NativeTriggerWebhookData, NativeTriggerWebhookResponse, CreateMqttTriggerData, CreateMqttTriggerResponse, UpdateMqttTriggerData, UpdateMqttTriggerResponse, DeleteMqttTriggerData, DeleteMqttTriggerResponse, GetMqttTriggerData, GetMqttTriggerResponse, ListMqttTriggersData, ListMqttTriggersResponse, ExistsMqttTriggerData, ExistsMqttTriggerResponse, SetMqttTriggerModeData, SetMqttTriggerModeResponse, TestMqttConnectionData, TestMqttConnectionResponse, CreateGcpTriggerData, CreateGcpTriggerResponse, UpdateGcpTriggerData, UpdateGcpTriggerResponse, DeleteGcpTriggerData, DeleteGcpTriggerResponse, GetGcpTriggerData, GetGcpTriggerResponse, ListGcpTriggersData, ListGcpTriggersResponse, ExistsGcpTriggerData, ExistsGcpTriggerResponse, SetGcpTriggerModeData, SetGcpTriggerModeResponse, TestGcpConnectionData, TestGcpConnectionResponse, DeleteGcpSubscriptionData, DeleteGcpSubscriptionResponse, ListGoogleTopicsData, ListGoogleTopicsResponse, ListAllTgoogleTopicSubscriptionsData, ListAllTgoogleTopicSubscriptionsResponse, GetPostgresVersionData, GetPostgresVersionResponse, IsValidPostgresConfigurationData, IsValidPostgresConfigurationResponse, CreateTemplateScriptData, CreateTemplateScriptResponse, GetTemplateScriptData, GetTemplateScriptResponse, ListPostgresReplicationSlotData, ListPostgresReplicationSlotResponse, CreatePostgresReplicationSlotData, CreatePostgresReplicationSlotResponse, DeletePostgresReplicationSlotData, DeletePostgresReplicationSlotResponse, ListPostgresPublicationData, ListPostgresPublicationResponse, GetPostgresPublicationData, GetPostgresPublicationResponse, CreatePostgresPublicationData, CreatePostgresPublicationResponse, UpdatePostgresPublicationData, UpdatePostgresPublicationResponse, DeletePostgresPublicationData, DeletePostgresPublicationResponse, CreatePostgresTriggerData, CreatePostgresTriggerResponse, UpdatePostgresTriggerData, UpdatePostgresTriggerResponse, DeletePostgresTriggerData, DeletePostgresTriggerResponse, GetPostgresTriggerData, GetPostgresTriggerResponse, ListPostgresTriggersData, ListPostgresTriggersResponse, ExistsPostgresTriggerData, ExistsPostgresTriggerResponse, SetPostgresTriggerModeData, SetPostgresTriggerModeResponse, TestPostgresConnectionData, TestPostgresConnectionResponse, CreateEmailTriggerData, CreateEmailTriggerResponse, UpdateEmailTriggerData, UpdateEmailTriggerResponse, DeleteEmailTriggerData, DeleteEmailTriggerResponse, GetEmailTriggerData, GetEmailTriggerResponse, ListEmailTriggersData, ListEmailTriggersResponse, ExistsEmailTriggerData, ExistsEmailTriggerResponse, ExistsEmailLocalPartData, ExistsEmailLocalPartResponse, SetEmailTriggerModeData, SetEmailTriggerModeResponse, ListInstanceGroupsResponse, ListInstanceGroupsWithWorkspacesResponse, GetInstanceGroupData, GetInstanceGroupResponse, CreateInstanceGroupData, CreateInstanceGroupResponse, UpdateInstanceGroupData, UpdateInstanceGroupResponse, DeleteInstanceGroupData, DeleteInstanceGroupResponse, AddUserToInstanceGroupData, AddUserToInstanceGroupResponse, RemoveUserFromInstanceGroupData, RemoveUserFromInstanceGroupResponse, ExportInstanceGroupsResponse, OverwriteInstanceGroupsData, OverwriteInstanceGroupsResponse, ListGroupsData, ListGroupsResponse, ListGroupNamesData, ListGroupNamesResponse, CreateGroupData, CreateGroupResponse, UpdateGroupData, UpdateGroupResponse, DeleteGroupData, DeleteGroupResponse, GetGroupData, GetGroupResponse, AddUserToGroupData, AddUserToGroupResponse, RemoveUserToGroupData, RemoveUserToGroupResponse, GetGroupPermissionHistoryData, GetGroupPermissionHistoryResponse, ListFoldersData, ListFoldersResponse, ListFolderNamesData, ListFolderNamesResponse, CreateFolderData, CreateFolderResponse, UpdateFolderData, UpdateFolderResponse, DeleteFolderData, DeleteFolderResponse, GetFolderData, GetFolderResponse, ExistsFolderData, ExistsFolderResponse, GetFolderUsageData, GetFolderUsageResponse, AddOwnerToFolderData, AddOwnerToFolderResponse, RemoveOwnerToFolderData, RemoveOwnerToFolderResponse, GetFolderPermissionHistoryData, GetFolderPermissionHistoryResponse, ListWorkerGroupsResponse, GetConfigData, GetConfigResponse, UpdateConfigData, UpdateConfigResponse, DeleteConfigData, DeleteConfigResponse, ListConfigsResponse, ListAutoscalingEventsData, ListAutoscalingEventsResponse, NativeKubernetesAutoscalingHealthcheckResponse, ListAvailablePythonVersionsResponse, CreateAgentTokenData, CreateAgentTokenResponse, BlacklistAgentTokenData, BlacklistAgentTokenResponse, RemoveBlacklistAgentTokenData, RemoveBlacklistAgentTokenResponse, ListBlacklistedAgentTokensData, ListBlacklistedAgentTokensResponse, GetMinVersionResponse, GetGranularAclsData, GetGranularAclsResponse, AddGranularAclsData, AddGranularAclsResponse, RemoveGranularAclsData, RemoveGranularAclsResponse, SetCaptureConfigData, SetCaptureConfigResponse, PingCaptureConfigData, PingCaptureConfigResponse, GetCaptureConfigsData, GetCaptureConfigsResponse, ListCapturesData, ListCapturesResponse, MoveCapturesAndConfigsData, MoveCapturesAndConfigsResponse, GetCaptureData, GetCaptureResponse, DeleteCaptureData, DeleteCaptureResponse, StarData, StarResponse, UnstarData, UnstarResponse, GetInputHistoryData, GetInputHistoryResponse, GetArgsFromHistoryOrSavedInputData, GetArgsFromHistoryOrSavedInputResponse, ListInputsData, ListInputsResponse, CreateInputData, CreateInputResponse, UpdateInputData, UpdateInputResponse, DeleteInputData, DeleteInputResponse, DuckdbConnectionSettingsData, DuckdbConnectionSettingsResponse, DuckdbConnectionSettingsV2Data, DuckdbConnectionSettingsV2Response, PolarsConnectionSettingsData, PolarsConnectionSettingsResponse, PolarsConnectionSettingsV2Data, PolarsConnectionSettingsV2Response, S3ResourceInfoData, S3ResourceInfoResponse, DatasetStorageTestConnectionData, DatasetStorageTestConnectionResponse, ListStoredFilesData, ListStoredFilesResponse, LoadFileMetadataData, LoadFileMetadataResponse, LoadFilePreviewData, LoadFilePreviewResponse, ListGitRepoFilesData, ListGitRepoFilesResponse, LoadGitRepoFilePreviewData, LoadGitRepoFilePreviewResponse, LoadGitRepoFileMetadataData, LoadGitRepoFileMetadataResponse, CheckS3FolderExistsData, CheckS3FolderExistsResponse, LoadParquetPreviewData, LoadParquetPreviewResponse, LoadTableRowCountData, LoadTableRowCountResponse, LoadCsvPreviewData, LoadCsvPreviewResponse, DeleteS3FileData, DeleteS3FileResponse, MoveS3FileData, MoveS3FileResponse, FileUploadData, FileUploadResponse, GitRepoViewerFileUploadData, GitRepoViewerFileUploadResponse, FileDownloadData, FileDownloadResponse, FileDownloadParquetAsCsvData, FileDownloadParquetAsCsvResponse, GetJobMetricsData, GetJobMetricsResponse, SetJobProgressData, SetJobProgressResponse, GetJobProgressData, GetJobProgressResponse, ListLogFilesData, ListLogFilesResponse, GetLogFileData, GetLogFileResponse, ListConcurrencyGroupsResponse, DeleteConcurrencyGroupData, DeleteConcurrencyGroupResponse, GetConcurrencyKeyData, GetConcurrencyKeyResponse, SearchJobsIndexData, SearchJobsIndexResponse, SearchLogsIndexData, SearchLogsIndexResponse, CountSearchLogsIndexData, CountSearchLogsIndexResponse, ClearIndexData, ClearIndexResponse, GetIndexStorageSizesResponse, GetIndexerStatusResponse, ListAssetsData, ListAssetsResponse, ListAssetsByUsageData, ListAssetsByUsageResponse, ListFavoriteAssetsData, ListFavoriteAssetsResponse, ListVolumesData, ListVolumesResponse, GetVolumeStorageData, GetVolumeStorageResponse, CreateVolumeData, CreateVolumeResponse, DeleteVolumeData, DeleteVolumeResponse, ListMcpToolsData, ListMcpToolsResponse, DiscoverMcpOauthData, DiscoverMcpOauthResponse, StartMcpOauthPopupData, McpOauthCallbackData, McpOauthCallbackResponse } from './types.gen'; - -export class SettingsService { - /** - * get backend version - * @returns string git version of backend - * @throws ApiError - */ - public static backendVersion(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/version' - }); - } - - /** - * is backend up to date - * @returns string is backend up to date - * @throws ApiError - */ - public static backendUptodate(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/uptodate' - }); - } - - /** - * get license id - * @returns string get license id (empty if not ee) - * @throws ApiError - */ - public static getLicenseId(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/ee_license' - }); - } - - /** - * get openapi yaml spec - * @returns string openapi yaml file content - * @throws ApiError - */ - public static getOpenApiYaml(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/openapi.yaml' - }); - } - -} - -export class HealthService { - /** - * health status - * Health status endpoint. Returns cached health status (database connectivity, worker count). - * Cache TTL is fixed at 5 seconds. Use force=true query parameter to bypass cache. - * Note: This endpoint is intentionally different from Kubernetes probes to avoid confusion. - * For k8s liveness/readiness probes, use /version endpoint. - * - * @param data The data for the request. - * @param data.force Force a fresh check, bypassing the cache - * @returns HealthStatusResponse server is healthy or degraded - * @throws ApiError - */ - public static getHealthStatus(data: GetHealthStatusData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/health/status', - query: { - force: data.force - }, - errors: { - 503: 'server is unhealthy (database unreachable)' - } - }); - } - - /** - * detailed health status - * Returns detailed health information including database pool stats, worker details, and queue status. - * Requires authentication. Use for monitoring dashboards and debugging. - * This endpoint always returns fresh data (no caching). - * - * @returns DetailedHealthResponse server is healthy or degraded - * @throws ApiError - */ - public static getHealthDetailed(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/health/detailed', - errors: { - 503: 'server is unhealthy (database unreachable)' - } - }); - } - -} - -export class DocumentationService { - /** - * query Windmill AI documentation assistant (EE only) - * @param data The data for the request. - * @param data.requestBody query to send to the AI documentation assistant - * @returns unknown AI documentation assistant response - * @throws ApiError - */ - public static queryDocumentation(data: QueryDocumentationData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/inkeep', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 403: 'Enterprise Edition required' - } - }); - } - -} - -export class AuditService { - /** - * get audit log (requires admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns AuditLog an audit log - * @throws ApiError - */ - public static getAuditLog(data: GetAuditLogData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/audit/get/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * list audit logs (requires admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.before filter on started before (inclusive) timestamp - * @param data.after filter on created after (exclusive) timestamp - * @param data.username filter on exact username of user - * @param data.operation filter on exact or prefix name of operation - * @param data.operations comma separated list of exact operations to include - * @param data.excludeOperations comma separated list of operations to exclude - * @param data.resource filter on exact or prefix name of resource - * @param data.actionKind filter on type of operation - * @param data.allWorkspaces get audit logs for all workspaces - * @returns AuditLog a list of audit logs - * @throws ApiError - */ - public static listAuditLogs(data: ListAuditLogsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/audit/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - before: data.before, - after: data.after, - username: data.username, - operation: data.operation, - operations: data.operations, - exclude_operations: data.excludeOperations, - resource: data.resource, - action_kind: data.actionKind, - all_workspaces: data.allWorkspaces - } - }); - } - -} - -export class UserService { - /** - * login with password - * @param data The data for the request. - * @param data.requestBody credentials - * @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. - * - * @throws ApiError - */ - public static login(data: LoginData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/auth/login', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * logout - * @returns string clear cookies and clear token (if applicable) - * @throws ApiError - */ - public static logout(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/auth/logout' - }); - } - - /** - * check if SMTP is configured for password reset - * @returns boolean returns true if SMTP is configured - * @throws ApiError - */ - public static isSmtpConfigured(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/auth/is_smtp_configured' - }); - } - - /** - * request password reset email - * @param data The data for the request. - * @param data.requestBody email to send password reset link to - * @returns PasswordResetResponse password reset email sent (if user exists) - * @throws ApiError - */ - public static requestPasswordReset(data: RequestPasswordResetData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/auth/request_password_reset', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'SMTP not configured' - } - }); - } - - /** - * reset password using token - * @param data The data for the request. - * @param data.requestBody token and new password - * @returns PasswordResetResponse password reset successfully - * @throws ApiError - */ - public static resetPassword(data: ResetPasswordData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/auth/reset_password', - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'invalid or expired token' - } - }); - } - - /** - * get user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user created - * @throws ApiError - */ - public static getUser(data: GetUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/get/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * update user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @param data.requestBody new user - * @returns string edited user - * @throws ApiError - */ - public static updateUser(data: UpdateUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/users/update/{username}', - path: { - workspace: data.workspace, - username: data.username - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * is owner of path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean is owner - * @throws ApiError - */ - public static isOwnerOfPath(data: IsOwnerOfPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/is_owner/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set password - * @param data The data for the request. - * @param data.requestBody set password - * @returns string password set - * @throws ApiError - */ - public static setPassword(data: SetPasswordData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/setpassword', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * set password for a specific user (require super admin) - * @param data The data for the request. - * @param data.user - * @param data.requestBody set password - * @returns string password set - * @throws ApiError - */ - public static setPasswordForUser(data: SetPasswordForUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/set_password_of/{user}', - path: { - user: data.user - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * set login type for a specific user (require super admin) - * @param data The data for the request. - * @param data.user - * @param data.requestBody set login type - * @returns string login type set - * @throws ApiError - */ - public static setLoginTypeForUser(data: SetLoginTypeForUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/set_login_type/{user}', - path: { - user: data.user - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create user - * @param data The data for the request. - * @param data.requestBody user info - * @returns string user created - * @throws ApiError - */ - public static createUserGlobally(data: CreateUserGloballyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/create', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * global update user (require super admin) - * @param data The data for the request. - * @param data.email - * @param data.requestBody new user info - * @returns string user updated - * @throws ApiError - */ - public static globalUserUpdate(data: GlobalUserUpdateData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/update/{email}', - path: { - email: data.email - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * global username info (require super admin) - * @param data The data for the request. - * @param data.email - * @returns unknown user renamed - * @throws ApiError - */ - public static globalUsernameInfo(data: GlobalUsernameInfoData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/username_info/{email}', - path: { - email: data.email - } - }); - } - - /** - * global rename user (require super admin) - * @param data The data for the request. - * @param data.email - * @param data.requestBody new username - * @returns string user renamed - * @throws ApiError - */ - public static globalUserRename(data: GlobalUserRenameData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/rename/{email}', - path: { - email: data.email - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * global delete user (require super admin) - * @param data The data for the request. - * @param data.email - * @returns string user deleted - * @throws ApiError - */ - public static globalUserDelete(data: GlobalUserDeleteData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/users/delete/{email}', - path: { - email: data.email - } - }); - } - - /** - * global overwrite users (require super admin and EE) - * @param data The data for the request. - * @param data.requestBody List of users - * @returns string Success message - * @throws ApiError - */ - public static globalUsersOverwrite(data: GlobalUsersOverwriteData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/overwrite', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * global export users (require super admin and EE) - * @returns ExportedUser exported users - * @throws ApiError - */ - public static globalUsersExport(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/export' - }); - } - - /** - * Submit user onboarding data - * @param data The data for the request. - * @param data.requestBody - * @returns string Onboarding data submitted successfully - * @throws ApiError - */ - public static submitOnboardingData(data: SubmitOnboardingDataData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/onboarding', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string delete user - * @throws ApiError - */ - public static deleteUser(data: DeleteUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/users/delete/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * convert manual user to group user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string convert user to group user - * @throws ApiError - */ - public static convertUserToGroup(data: ConvertUserToGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/users/convert_to_group/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * get current user email (if logged in) - * @returns string user email - * @throws ApiError - */ - public static getCurrentEmail(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/email' - }); - } - - /** - * refresh the current token - * @param data The data for the request. - * @param data.ifExpiringInLessThanS - * @returns string new token - * @throws ApiError - */ - public static refreshUserToken(data: RefreshUserTokenData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/refresh_token', - query: { - if_expiring_in_less_than_s: data.ifExpiringInLessThanS - } - }); - } - - /** - * get tutorial progress - * @returns unknown tutorial progress - * @throws ApiError - */ - public static getTutorialProgress(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/tutorial_progress' - }); - } - - /** - * update tutorial progress - * @param data The data for the request. - * @param data.requestBody progress update - * @returns string tutorial progress - * @throws ApiError - */ - public static updateTutorialProgress(data: UpdateTutorialProgressData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/tutorial_progress', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * leave instance - * @returns string status - * @throws ApiError - */ - public static leaveInstance(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/leave_instance' - }); - } - - /** - * get current usage outside of premium workspaces - * @returns number free usage - * @throws ApiError - */ - public static getUsage(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/usage' - }); - } - - /** - * get all runnables in every workspace - * @returns unknown free all runnables - * @throws ApiError - */ - public static getRunnable(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/all_runnables' - }); - } - - /** - * get current global whoami (if logged in) - * @returns GlobalUserInfo user email - * @throws ApiError - */ - public static globalWhoami(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/whoami' - }); - } - - /** - * list all workspace invites - * @returns WorkspaceInvite list all workspace invites - * @throws ApiError - */ - public static listWorkspaceInvites(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/list_invites' - }); - } - - /** - * whoami - * @param data The data for the request. - * @param data.workspace - * @returns User user - * @throws ApiError - */ - public static whoami(data: WhoamiData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/whoami', - path: { - workspace: data.workspace - } - }); - } - - /** - * accept invite to workspace - * @param data The data for the request. - * @param data.requestBody accept invite - * @returns string status - * @throws ApiError - */ - public static acceptInvite(data: AcceptInviteData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/accept_invite', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * decline invite to workspace - * @param data The data for the request. - * @param data.requestBody decline invite - * @returns string status - * @throws ApiError - */ - public static declineInvite(data: DeclineInviteData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/decline_invite', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * whois - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user - * @throws ApiError - */ - public static whois(data: WhoisData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/whois/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * exists email - * @param data The data for the request. - * @param data.email - * @returns boolean user - * @throws ApiError - */ - public static existsEmail(data: ExistsEmailData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/exists/{email}', - path: { - email: data.email - } - }); - } - - /** - * list all users as super admin (require to be super amdin) - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.activeOnly filter only active users - * @returns GlobalUserInfo user - * @throws ApiError - */ - public static listUsersAsSuperAdmin(data: ListUsersAsSuperAdminData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/list_as_super_admin', - query: { - page: data.page, - per_page: data.perPage, - active_only: data.activeOnly - } - }); - } - - /** - * list users - * @param data The data for the request. - * @param data.workspace - * @returns User user - * @throws ApiError - */ - public static listUsers(data: ListUsersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list', - path: { - workspace: data.workspace - } - }); - } - - /** - * list users usage - * @param data The data for the request. - * @param data.workspace - * @returns UserUsage user - * @throws ApiError - */ - public static listUsersUsage(data: ListUsersUsageData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list_usage', - path: { - workspace: data.workspace - } - }); - } - - /** - * list usernames - * @param data The data for the request. - * @param data.workspace - * @returns string user - * @throws ApiError - */ - public static listUsernames(data: ListUsernamesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list_usernames', - path: { - workspace: data.workspace - } - }); - } - - /** - * get email from username - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string email - * @throws ApiError - */ - public static usernameToEmail(data: UsernameToEmailData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/username_to_email/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * create token - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ - public static createToken(data: CreateTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/tokens/create', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create token to impersonate a user (require superadmin) - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ - public static createTokenImpersonate(data: CreateTokenImpersonateData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/users/tokens/impersonate', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete token - * @param data The data for the request. - * @param data.tokenPrefix - * @returns string delete token - * @throws ApiError - */ - public static deleteToken(data: DeleteTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/users/tokens/delete/{token_prefix}', - path: { - token_prefix: data.tokenPrefix - } - }); - } - - /** - * list token - * @param data The data for the request. - * @param data.excludeEphemeral - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns TruncatedToken truncated token - * @throws ApiError - */ - public static listTokens(data: ListTokensData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/users/tokens/list', - query: { - exclude_ephemeral: data.excludeEphemeral, - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * login with oauth authorization flow - * @param data The data for the request. - * @param data.clientName - * @param data.requestBody Partially filled script - * @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. - * - * @throws ApiError - */ - public static loginWithOauth(data: LoginWithOauthData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/oauth/login_callback/{client_name}', - path: { - client_name: data.clientName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class AdminService { - /** - * get user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user created - * @throws ApiError - */ - public static getUser(data: GetUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/get/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * update user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @param data.requestBody new user - * @returns string edited user - * @throws ApiError - */ - public static updateUser(data: UpdateUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/users/update/{username}', - path: { - workspace: data.workspace, - username: data.username - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string delete user - * @throws ApiError - */ - public static deleteUser(data: DeleteUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/users/delete/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - - /** - * convert manual user to group user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string convert user to group user - * @throws ApiError - */ - public static convertUserToGroup(data: ConvertUserToGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/users/convert_to_group/{username}', - path: { - workspace: data.workspace, - username: data.username - } - }); - } - -} - -export class GitSyncService { - /** - * get connected repositories - * @param data The data for the request. - * @param data.page Page number for pagination (default 1) - * @returns GithubInstallations connected repositories - * @throws ApiError - */ - public static getGlobalConnectedRepositories(data: GetGlobalConnectedRepositoriesData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/github_app/connected_repositories', - query: { - page: data.page - } - }); - } - - /** - * Install a GitHub installation from another workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown Installation successfully copied - * @throws ApiError - */ - public static installFromWorkspace(data: InstallFromWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/install_from_workspace', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Delete a GitHub installation from a workspace - * Removes a GitHub installation from the specified workspace. Requires admin privileges. - * @param data The data for the request. - * @param data.workspace - * @param data.installationId The ID of the GitHub installation to delete - * @returns unknown Installation successfully deleted - * @throws ApiError - */ - public static deleteFromWorkspace(data: DeleteFromWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/github_app/installation/{installation_id}', - path: { - workspace: data.workspace, - installation_id: data.installationId - } - }); - } - - /** - * Export GitHub installation JWT token - * Exports the JWT token for a specific GitHub installation in the workspace - * @param data The data for the request. - * @param data.workspace - * @param data.installationId - * @returns unknown Successfully exported the JWT token - * @throws ApiError - */ - public static exportInstallation(data: ExportInstallationData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/github_app/export/{installationId}', - path: { - workspace: data.workspace, - installationId: data.installationId - } - }); - } - - /** - * Import GitHub installation from JWT token - * Imports a GitHub installation from a JWT token exported from another instance - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown Successfully imported the installation - * @throws ApiError - */ - public static importInstallation(data: ImportInstallationData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/import', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * GHES installation callback - * Register a self-managed GitHub App installation from GitHub Enterprise Server - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown GHES installation registered successfully - * @throws ApiError - */ - public static ghesInstallationCallback(data: GhesInstallationCallbackData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/ghes_installation_callback', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Get GHES app config - * Returns the GitHub Enterprise Server app configuration (without private key) for constructing the installation URL - * @returns unknown GHES app configuration - * @throws ApiError - */ - public static getGhesConfig(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/github_app/ghes_config' - }); - } - -} - -export class WorkspaceService { - /** - * list all workspaces visible to me - * @returns Workspace all workspaces - * @throws ApiError - */ - public static listWorkspaces(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/list' - }); - } - - /** - * is domain allowed for auto invi - * @returns boolean domain allowed or not - * @throws ApiError - */ - public static isDomainAllowed(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/allowed_domain_auto_invite' - }); - } - - /** - * list all workspaces visible to me with user info - * @returns UserWorkspaceList workspace with associated username - * @throws ApiError - */ - public static listUserWorkspaces(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/users' - }); - } - - /** - * get workspace as super admin (require to be super admin) - * @param data The data for the request. - * @param data.workspace - * @returns Workspace workspace - * @throws ApiError - */ - public static getWorkspaceAsSuperAdmin(data: GetWorkspaceAsSuperAdminData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_as_superadmin', - path: { - workspace: data.workspace - } - }); - } - - /** - * list all workspaces as super admin (require to be super admin) - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Workspace workspaces - * @throws ApiError - */ - public static listWorkspacesAsSuperAdmin(data: ListWorkspacesAsSuperAdminData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/list_as_superadmin', - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * create workspace - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ - public static createWorkspace(data: CreateWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/create', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create forked workspace branch with git sync - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new forked workspace - * @returns string forked workspace branch created - * @throws ApiError - */ - public static createWorkspaceForkGitBranch(data: CreateWorkspaceForkGitBranchData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/create_workspace_fork_branch', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create forked workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new forked workspace - * @returns string forked workspace created - * @throws ApiError - */ - public static createWorkspaceFork(data: CreateWorkspaceForkData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/create_fork', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * exists workspace - * @param data The data for the request. - * @param data.requestBody id of workspace - * @returns boolean status - * @throws ApiError - */ - public static existsWorkspace(data: ExistsWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/exists', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * exists username - * @param data The data for the request. - * @param data.requestBody - * @returns boolean status - * @throws ApiError - */ - public static existsUsername(data: ExistsUsernameData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/exists_username', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get github app token - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody jwt job token - * @returns unknown github app token - * @throws ApiError - */ - public static getGithubAppToken(data: GetGithubAppTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/token', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * invite user to workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ - public static inviteUser(data: InviteUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/invite_user', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * add user to workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ - public static addUser(data: AddUserData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/add_user', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete user invite - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ - public static deleteInvite(data: DeleteInviteData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/delete_invite', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * archive workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static archiveWorkspace(data: ArchiveWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/archive', - path: { - workspace: data.workspace - } - }); - } - - /** - * unarchive workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static unarchiveWorkspace(data: UnarchiveWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/unarchive/{workspace}', - path: { - workspace: data.workspace - } - }); - } - - /** - * delete workspace (require super admin) - * @param data The data for the request. - * @param data.workspace - * @param data.onlyDeleteForks - * @returns string status - * @throws ApiError - */ - public static deleteWorkspace(data: DeleteWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/workspaces/delete/{workspace}', - path: { - workspace: data.workspace - }, - query: { - only_delete_forks: data.onlyDeleteForks - } - }); - } - - /** - * leave workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static leaveWorkspace(data: LeaveWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/leave', - path: { - workspace: data.workspace - } - }); - } - - /** - * get workspace name - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static getWorkspaceName(data: GetWorkspaceNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_workspace_name', - path: { - workspace: data.workspace - } - }); - } - - /** - * change workspace name - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ - public static changeWorkspaceName(data: ChangeWorkspaceNameData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_name', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * change workspace id - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ - public static changeWorkspaceId(data: ChangeWorkspaceIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_id', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * change workspace id - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ - public static changeWorkspaceColor(data: ChangeWorkspaceColorData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_color', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Update operator settings for a workspace - * Updates the operator settings for a specific workspace. Requires workspace admin privileges. - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string Operator settings updated successfully - * @throws ApiError - */ - public static updateOperatorSettings(data: UpdateOperatorSettingsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/operator_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Compare two workspaces - * Compares the current workspace with a target workspace to find differences in scripts, flows, apps, resources, and variables. Returns information about items that are ahead, behind, or in conflict. - * @param data The data for the request. - * @param data.workspace - * @param data.targetWorkspaceId The ID of the workspace to compare with - * @returns WorkspaceComparison Workspace comparison results - * @throws ApiError - */ - public static compareWorkspaces(data: CompareWorkspacesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/compare/{target_workspace_id}', - path: { - workspace: data.workspace, - target_workspace_id: data.targetWorkspaceId - } - }); - } - - /** - * Resets the ahead and behind deployement counter after a deployement - * This endpoint should be called after a fork deployement - * @param data The data for the request. - * @param data.workspace - * @param data.forkWorkspaceId The ID of the workspace to compare with - * @returns unknown status - * @throws ApiError - */ - public static resetDiffTally(data: ResetDiffTallyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/reset_diff_tally/{fork_workspace_id}', - path: { - workspace: data.workspace, - fork_workspace_id: data.forkWorkspaceId - } - }); - } - - /** - * list pending invites for a workspace - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceInvite user - * @throws ApiError - */ - public static listPendingInvites(data: ListPendingInvitesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/list_pending_invites', - path: { - workspace: data.workspace - } - }); - } - - /** - * get settings - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ - public static getSettings(data: GetSettingsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_settings', - path: { - workspace: data.workspace - } - }); - } - - /** - * get deploy to - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ - public static getDeployTo(data: GetDeployToData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_deploy_to', - path: { - workspace: data.workspace - } - }); - } - - /** - * get if workspace is premium - * @param data The data for the request. - * @param data.workspace - * @returns boolean status - * @throws ApiError - */ - public static getIsPremium(data: GetIsPremiumData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/is_premium', - path: { - workspace: data.workspace - } - }); - } - - /** - * get premium info - * @param data The data for the request. - * @param data.workspace - * @param data.skipSubscriptionFetch skip fetching subscription status from stripe - * @returns unknown status - * @throws ApiError - */ - public static getPremiumInfo(data: GetPremiumInfoData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/premium_info', - path: { - workspace: data.workspace - }, - query: { - skip_subscription_fetch: data.skipSubscriptionFetch - } - }); - } - - /** - * get threshold alert info - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ - public static getThresholdAlert(data: GetThresholdAlertData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/threshold_alert', - path: { - workspace: data.workspace - } - }); - } - - /** - * set threshold alert info - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody threshold alert info - * @returns string status - * @throws ApiError - */ - public static setThresholdAlert(data: SetThresholdAlertData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/threshold_alert', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * rebuild dependency map - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static rebuildDependencyMap(data: RebuildDependencyMapData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/rebuild_dependency_map', - path: { - workspace: data.workspace - } - }); - } - - /** - * get dependents of an imported path - * @param data The data for the request. - * @param data.workspace - * @param data.importedPath The imported path to get dependents for - * @returns DependencyDependent list of dependents - * @throws ApiError - */ - public static getDependents(data: GetDependentsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_dependents/{imported_path}', - path: { - workspace: data.workspace, - imported_path: data.importedPath - } - }); - } - - /** - * get dependents amounts for multiple imported paths - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody List of imported paths to get dependents counts for - * @returns DependentsAmount list of dependents amounts - * @throws ApiError - */ - public static getDependentsAmounts(data: GetDependentsAmountsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/get_dependents_amounts', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get dependency map - * @param data The data for the request. - * @param data.workspace - * @returns DependencyMap dmap - * @throws ApiError - */ - public static getDependencyMap(data: GetDependencyMapData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_dependency_map', - path: { - workspace: data.workspace - } - }); - } - - /** - * edit slack command - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ - public static editSlackCommand(data: EditSlackCommandData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_slack_command', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get workspace slack oauth config - * @param data The data for the request. - * @param data.workspace - * @returns unknown slack oauth config - * @throws ApiError - */ - public static getWorkspaceSlackOauthConfig(data: GetWorkspaceSlackOauthConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/slack_oauth_config', - path: { - workspace: data.workspace - } - }); - } - - /** - * set workspace slack oauth config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Slack OAuth Configuration - * @returns string status - * @throws ApiError - */ - public static setWorkspaceSlackOauthConfig(data: SetWorkspaceSlackOauthConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/slack_oauth_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete workspace slack oauth config - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static deleteWorkspaceSlackOauthConfig(data: DeleteWorkspaceSlackOauthConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/workspaces/slack_oauth_config', - path: { - workspace: data.workspace - } - }); - } - - /** - * edit teams command - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ - public static editTeamsCommand(data: EditTeamsCommandData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_teams_command', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list available teams ids - * @param data The data for the request. - * @param data.workspace - * @param data.search Search teams by name. If omitted, returns first page of all teams. - * @param data.nextLink Pagination cursor URL from previous response. Pass this to fetch the next page of results. - * @returns unknown status - * @throws ApiError - */ - public static listAvailableTeamsIds(data: ListAvailableTeamsIdsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/available_teams_ids', - path: { - workspace: data.workspace - }, - query: { - search: data.search, - next_link: data.nextLink - } - }); - } - - /** - * list available channels for a specific team - * @param data The data for the request. - * @param data.workspace - * @param data.teamId Microsoft Teams team ID - * @returns unknown List of channels for the specified team - * @throws ApiError - */ - public static listAvailableTeamsChannels(data: ListAvailableTeamsChannelsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/available_teams_channels', - path: { - workspace: data.workspace - }, - query: { - team_id: data.teamId - } - }); - } - - /** - * connect teams - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody connect teams - * @returns string status - * @throws ApiError - */ - public static connectTeams(data: ConnectTeamsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/connect_teams', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run a job that sends a message to Slack - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody path to hub script to run and its corresponding args - * @returns unknown status - * @throws ApiError - */ - public static runSlackMessageTestJob(data: RunSlackMessageTestJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/run_slack_message_test_job', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run a job that sends a message to Teams - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody path to hub script to run and its corresponding args - * @returns unknown status - * @throws ApiError - */ - public static runTeamsMessageTestJob(data: RunTeamsMessageTestJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/run_teams_message_test_job', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit deploy to - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ - public static editDeployTo(data: EditDeployToData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_deploy_to', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit auto invite - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ - public static editAutoInvite(data: EditAutoInviteData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_auto_invite', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit instance groups - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Instance Groups Configuration - * @returns string status - * @throws ApiError - */ - public static editInstanceGroups(data: EditInstanceGroupsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_instance_groups', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit webhook - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceWebhook - * @returns string status - * @throws ApiError - */ - public static editWebhook(data: EditWebhookData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_webhook', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit copilot config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceCopilotConfig - * @returns string status - * @throws ApiError - */ - public static editCopilotConfig(data: EditCopilotConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_copilot_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get copilot info - * @param data The data for the request. - * @param data.workspace - * @returns AIConfig status - * @throws ApiError - */ - public static getCopilotInfo(data: GetCopilotInfoData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_copilot_info', - path: { - workspace: data.workspace - } - }); - } - - /** - * edit error handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceErrorHandler - * @returns string status - * @throws ApiError - */ - public static editErrorHandler(data: EditErrorHandlerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_error_handler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit success handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceSuccessHandler - * @returns string status - * @throws ApiError - */ - public static editSuccessHandler(data: EditSuccessHandlerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_success_handler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit large file storage settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody LargeFileStorage info - * @returns unknown status - * @throws ApiError - */ - public static editLargeFileStorageConfig(data: EditLargeFileStorageConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_large_file_storage_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list ducklakes - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static listDucklakes(data: ListDucklakesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/list_ducklakes', - path: { - workspace: data.workspace - } - }); - } - - /** - * list Datatables - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ - public static listDataTables(data: ListDataTablesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/list_datatables', - path: { - workspace: data.workspace - } - }); - } - - /** - * list schemas of all connected Datatables - * @param data The data for the request. - * @param data.workspace - * @returns DataTableSchema schemas of all datatables - * @throws ApiError - */ - public static listDataTableSchemas(data: ListDataTableSchemasData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/list_datatable_schemas', - path: { - workspace: data.workspace - } - }); - } - - /** - * edit ducklake settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Ducklake settings - * @returns unknown status - * @throws ApiError - */ - public static editDucklakeConfig(data: EditDucklakeConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_ducklake_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit datatable settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody DataTable settings - * @returns unknown status - * @throws ApiError - */ - public static editDataTableConfig(data: EditDataTableConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_datatable_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit workspace git sync settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace Git sync settings - * @returns unknown status - * @throws ApiError - */ - public static editWorkspaceGitSyncConfig(data: EditWorkspaceGitSyncConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_git_sync_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * add or update individual git sync repository - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Git sync repository settings to add or update - * @returns unknown status - * @throws ApiError - */ - public static editGitSyncRepository(data: EditGitSyncRepositoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_git_sync_repository', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete individual git sync repository - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Git sync repository to delete - * @returns unknown status - * @throws ApiError - */ - public static deleteGitSyncRepository(data: DeleteGitSyncRepositoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/workspaces/delete_git_sync_repository', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit workspace deploy ui settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace deploy UI settings - * @returns unknown status - * @throws ApiError - */ - public static editWorkspaceDeployUiSettings(data: EditWorkspaceDeployUiSettingsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_deploy_ui_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit default app for workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ - public static editWorkspaceDefaultApp(data: EditWorkspaceDefaultAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_default_app', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * edit default scripts for workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ - public static editDefaultScripts(data: EditDefaultScriptsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/default_scripts', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get default scripts for workspace - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceDefaultScripts status - * @throws ApiError - */ - public static getDefaultScripts(data: GetDefaultScriptsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/default_scripts', - path: { - workspace: data.workspace - } - }); - } - - /** - * set environment variable - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ - public static setEnvironmentVariable(data: SetEnvironmentVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/set_environment_variable', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * retrieves the encryption key for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ - public static getWorkspaceEncryptionKey(data: GetWorkspaceEncryptionKeyData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/encryption_key', - path: { - workspace: data.workspace - } - }); - } - - /** - * update the encryption key for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody New encryption key - * @returns string status - * @throws ApiError - */ - public static setWorkspaceEncryptionKey(data: SetWorkspaceEncryptionKeyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/encryption_key', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get default app for workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ - public static getWorkspaceDefaultApp(data: GetWorkspaceDefaultAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/default_app', - path: { - workspace: data.workspace - } - }); - } - - /** - * get usage - * @param data The data for the request. - * @param data.workspace - * @returns number usage - * @throws ApiError - */ - public static getWorkspaceUsage(data: GetWorkspaceUsageData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/usage', - path: { - workspace: data.workspace - } - }); - } - - /** - * get used triggers - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ - public static getUsedTriggers(data: GetUsedTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/used_triggers', - path: { - workspace: data.workspace - } - }); - } - - /** - * list all protection rules for a workspace - * @param data The data for the request. - * @param data.workspace - * @returns ProtectionRuleset list of protection rules - * @throws ApiError - */ - public static listProtectionRules(data: ListProtectionRulesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/protection_rules', - path: { - workspace: data.workspace - } - }); - } - - /** - * create a new protection rule - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody New protection rule configuration - * @returns string protection rule created successfully - * @throws ApiError - */ - public static createProtectionRule(data: CreateProtectionRuleData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/protection_rules', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json', - errors: { - 400: 'rule with this name already exists' - } - }); - } - - /** - * update an existing protection rule - * @param data The data for the request. - * @param data.workspace - * @param data.ruleName Name of the protection rule to update - * @param data.requestBody Updated protection rule configuration - * @returns string protection rule updated successfully - * @throws ApiError - */ - public static updateProtectionRule(data: UpdateProtectionRuleData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/protection_rules/{rule_name}', - path: { - workspace: data.workspace, - rule_name: data.ruleName - }, - body: data.requestBody, - mediaType: 'application/json', - errors: { - 404: 'protection rule not found' - } - }); - } - - /** - * delete a protection rule - * @param data The data for the request. - * @param data.workspace - * @param data.ruleName Name of the protection rule to delete - * @returns string protection rule deleted successfully - * @throws ApiError - */ - public static deleteProtectionRule(data: DeleteProtectionRuleData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/workspaces/protection_rules/{rule_name}', - path: { - workspace: data.workspace, - rule_name: data.ruleName - }, - errors: { - 404: 'protection rule not found' - } - }); - } - - /** - * log AI chat message - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns void logged - * @throws ApiError - */ - public static logAiChat(data: LogAiChatData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/log_chat', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get cloud quota usage and limits for workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown cloud quota usage and limits - * @throws ApiError - */ - public static getCloudQuotas(data: GetCloudQuotasData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/cloud_quotas', - path: { - workspace: data.workspace - } - }); - } - - /** - * prune old versions of scripts, flows, or apps - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown number of pruned versions - * @throws ApiError - */ - public static pruneVersions(data: PruneVersionsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/prune_versions', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class SettingService { - /** - * Refreshes the password for the custom_instance_user - * @returns unknown Success - * @throws ApiError - */ - public static refreshCustomInstanceUserPwd(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/refresh_custom_instance_user_pwd' - }); - } - - /** - * Returns the set-up statuses of custom instance pg databases - * @returns CustomInstanceDb Statuses of all custom instance dbs - * @throws ApiError - */ - public static listCustomInstanceDbs(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/list_custom_instance_pg_databases' - }); - } - - /** - * Runs CREATE DATABASE on the Windmill Postgres and grants access to the custom_instance_user - * @param data The data for the request. - * @param data.name The name of the database to create - * @param data.requestBody - * @returns CustomInstanceDb status - * @throws ApiError - */ - public static setupCustomInstanceDb(data: SetupCustomInstanceDbData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/setup_custom_instance_pg_database/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get global settings - * @param data The data for the request. - * @param data.key - * @returns unknown status - * @throws ApiError - */ - public static getGlobal(data: GetGlobalData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/global/{key}', - path: { - key: data.key - } - }); - } - - /** - * post global settings - * @param data The data for the request. - * @param data.key - * @param data.requestBody value set - * @returns string status - * @throws ApiError - */ - public static setGlobal(data: SetGlobalData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/global/{key}', - path: { - key: data.key - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get local settings - * @returns unknown status - * @throws ApiError - */ - public static getLocal(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/local' - }); - } - - /** - * test smtp - * @param data The data for the request. - * @param data.requestBody test smtp payload - * @returns string status - * @throws ApiError - */ - public static testSmtp(data: TestSmtpData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_smtp', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test critical channels - * @param data The data for the request. - * @param data.requestBody test critical channel payload - * @returns string status - * @throws ApiError - */ - public static testCriticalChannels(data: TestCriticalChannelsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_critical_channels', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Get all critical alerts - * @param data The data for the request. - * @param data.page - * @param data.pageSize - * @param data.acknowledged - * @returns unknown Successfully retrieved all critical alerts - * @throws ApiError - */ - public static getCriticalAlerts(data: GetCriticalAlertsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/critical_alerts', - query: { - page: data.page, - page_size: data.pageSize, - acknowledged: data.acknowledged - } - }); - } - - /** - * Acknowledge a critical alert - * @param data The data for the request. - * @param data.id The ID of the critical alert to acknowledge - * @returns string Successfully acknowledged the critical alert - * @throws ApiError - */ - public static acknowledgeCriticalAlert(data: AcknowledgeCriticalAlertData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/critical_alerts/{id}/acknowledge', - path: { - id: data.id - } - }); - } - - /** - * Acknowledge all unacknowledged critical alerts - * @returns string Successfully acknowledged all unacknowledged critical alerts. - * @throws ApiError - */ - public static acknowledgeAllCriticalAlerts(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/critical_alerts/acknowledge_all' - }); - } - - /** - * test license key - * @param data The data for the request. - * @param data.requestBody test license key - * @returns string status - * @throws ApiError - */ - public static testLicenseKey(data: TestLicenseKeyData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_license_key', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test object storage config - * @param data The data for the request. - * @param data.requestBody test object storage config - * @returns string status - * @throws ApiError - */ - public static testObjectStorageConfig(data: TestObjectStorageConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_object_storage_config', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * send stats - * @returns string status - * @throws ApiError - */ - public static sendStats(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/send_stats' - }); - } - - /** - * get telemetry stats with HMAC signature (EE only) - * @returns unknown telemetry stats JSON with signature - * @throws ApiError - */ - public static getStats(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/get_stats' - }); - } - - /** - * get latest key renewal attempt - * @returns unknown status - * @throws ApiError - */ - public static getLatestKeyRenewalAttempt(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/latest_key_renewal_attempt' - }); - } - - /** - * renew license key - * @param data The data for the request. - * @param data.licenseKey - * @returns string status - * @throws ApiError - */ - public static renewLicenseKey(data: RenewLicenseKeyData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/renew_license_key', - query: { - license_key: data.licenseKey - } - }); - } - - /** - * create customer portal session - * @param data The data for the request. - * @param data.licenseKey - * @returns string url to portal - * @throws ApiError - */ - public static createCustomerPortalSession(data: CreateCustomerPortalSessionData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/customer_portal', - query: { - license_key: data.licenseKey - } - }); - } - - /** - * test metadata - * @param data The data for the request. - * @param data.requestBody test metadata - * @returns string status - * @throws ApiError - */ - public static testMetadata(data: TestMetadataData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/saml/test_metadata', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list global settings - * @returns GlobalSetting list of settings - * @throws ApiError - */ - public static listGlobalSettings(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/list_global' - }); - } - - /** - * get full instance config (global settings + worker configs) - * @returns InstanceConfig full instance configuration - * @throws ApiError - */ - public static getInstanceConfig(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/settings/instance_config' - }); - } - - /** - * update instance config (bulk upsert, no deletes). Empty or missing global_settings/worker_configs are skipped. - * @param data The data for the request. - * @param data.requestBody full instance configuration to apply - * @returns string instance config updated - * @throws ApiError - */ - public static setInstanceConfig(data: SetInstanceConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/settings/instance_config', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get minimum worker versions required to stay alive - * @returns unknown minimum keep-alive versions for workers and agents - * @throws ApiError - */ - public static getMinKeepAliveVersion(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/min_keep_alive_version' - }); - } - - /** - * get JWKS for Vault JWT authentication - * @returns JwksResponse JSON Web Key Set - * @throws ApiError - */ - public static getJwks(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/.well-known/jwks.json' - }); - } - - /** - * test secret backend connection (HashiCorp Vault) - * @param data The data for the request. - * @param data.requestBody Vault settings to test - * @returns string connection successful - * @throws ApiError - */ - public static testSecretBackend(data: TestSecretBackendData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_secret_backend', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * migrate secrets from database to HashiCorp Vault - * @param data The data for the request. - * @param data.requestBody Vault settings for migration target - * @returns SecretMigrationReport migration report - * @throws ApiError - */ - public static migrateSecretsToVault(data: MigrateSecretsToVaultData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/migrate_secrets_to_vault', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * migrate secrets from HashiCorp Vault to database - * @param data The data for the request. - * @param data.requestBody Vault settings for migration source - * @returns SecretMigrationReport migration report - * @throws ApiError - */ - public static migrateSecretsToDatabase(data: MigrateSecretsToDatabaseData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/settings/migrate_secrets_to_database', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get secondary storage names - * @param data The data for the request. - * @param data.workspace - * @param data.includeDefault If true, include "_default_" in the list if primary workspace storage is set - * @returns string status - * @throws ApiError - */ - public static getSecondaryStorageNames(data: GetSecondaryStorageNamesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_secondary_storage_names', - path: { - workspace: data.workspace - }, - query: { - include_default: data.includeDefault - } - }); - } - - /** - * Get all critical alerts for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.page - * @param data.pageSize - * @param data.acknowledged - * @returns unknown Successfully retrieved all critical alerts - * @throws ApiError - */ - public static workspaceGetCriticalAlerts(data: WorkspaceGetCriticalAlertsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/critical_alerts', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - page_size: data.pageSize, - acknowledged: data.acknowledged - } - }); - } - - /** - * Acknowledge a critical alert for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.id The ID of the critical alert to acknowledge - * @returns string Successfully acknowledged the critical alert - * @throws ApiError - */ - public static workspaceAcknowledgeCriticalAlert(data: WorkspaceAcknowledgeCriticalAlertData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/{id}/acknowledge', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * Acknowledge all unacknowledged critical alerts for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns string Successfully acknowledged all unacknowledged critical alerts. - * @throws ApiError - */ - public static workspaceAcknowledgeAllCriticalAlerts(data: WorkspaceAcknowledgeAllCriticalAlertsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/acknowledge_all', - path: { - workspace: data.workspace - } - }); - } - - /** - * Mute critical alert UI for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Boolean flag to mute critical alerts. - * @returns string Successfully updated mute critical alert settings. - * @throws ApiError - */ - public static workspaceMuteCriticalAlertsUi(data: WorkspaceMuteCriticalAlertsUiData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/mute', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Set public app rate limit for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Public app rate limit configuration - * @returns string Successfully updated public app rate limit settings. - * @throws ApiError - */ - public static setPublicAppRateLimit(data: SetPublicAppRateLimitData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/public_app_rate_limit', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class TokenService { - /** - * list of available scopes - * @returns ScopeDomain list of available scopes - * @throws ApiError - */ - public static listAvailableScopes(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/tokens/list/scopes' - }); - } - -} - -export class OidcService { - /** - * get OIDC token (ee only) - * @param data The data for the request. - * @param data.workspace - * @param data.audience - * @param data.expiresIn - * @returns string new oidc token - * @throws ApiError - */ - public static getOidcToken(data: GetOidcTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oidc/token/{audience}', - path: { - workspace: data.workspace, - audience: data.audience - }, - query: { - expires_in: data.expiresIn - } - }); - } - -} - -export class VariableService { - /** - * create variable - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new variable - * @param data.alreadyEncrypted whether the variable is already encrypted (default false) - * @returns string variable created - * @throws ApiError - */ - public static createVariable(data: CreateVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/create', - path: { - workspace: data.workspace - }, - query: { - already_encrypted: data.alreadyEncrypted - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * encrypt value - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new variable - * @returns string encrypted value - * @throws ApiError - */ - public static encryptValue(data: EncryptValueData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/encrypt', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string variable deleted - * @throws ApiError - */ - public static deleteVariable(data: DeleteVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/variables/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * delete variables in bulk - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody paths to delete - * @returns string deleted paths - * @throws ApiError - */ - public static deleteVariablesBulk(data: DeleteVariablesBulkData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/variables/delete_bulk', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated variable - * @param data.alreadyEncrypted whether the variable is already encrypted (default false) - * @returns string variable updated - * @throws ApiError - */ - public static updateVariable(data: UpdateVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - already_encrypted: data.alreadyEncrypted - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.decryptSecret ask to decrypt secret if this variable is secret - * (if not secret no effect, default: true) - * - * @param data.includeEncrypted ask to include the encrypted value if secret and decrypt secret is not true (default: false) - * - * @returns ListableVariable variable - * @throws ApiError - */ - public static getVariable(data: GetVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/get/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - decrypt_secret: data.decryptSecret, - include_encrypted: data.includeEncrypted - } - }); - } - - /** - * get variable value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.allowCache allow getting a cached value for improved performance - * - * @returns string variable - * @throws ApiError - */ - public static getVariableValue(data: GetVariableValueData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/get_value/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - allow_cache: data.allowCache - } - }); - } - - /** - * does variable exists at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean variable - * @throws ApiError - */ - public static existsVariable(data: ExistsVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list variables - * @param data The data for the request. - * @param data.workspace - * @param data.pathStart filter variables by path prefix - * @param data.path exact path match filter - * @param data.description pattern match filter for description field (case-insensitive) - * @param data.value pattern match filter for non-secret variable values (case-insensitive) - * @param data.broadFilter broad search across multiple fields (case-insensitive substring match) - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ListableVariable variable list - * @throws ApiError - */ - public static listVariable(data: ListVariableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/list', - path: { - workspace: data.workspace - }, - query: { - path_start: data.pathStart, - path: data.path, - description: data.description, - value: data.value, - broad_filter: data.broadFilter, - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * list contextual variables - * @param data The data for the request. - * @param data.workspace - * @returns ContextualVariable contextual variable list - * @throws ApiError - */ - public static listContextualVariables(data: ListContextualVariablesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/list_contextual', - path: { - workspace: data.workspace - } - }); - } - -} - -export class OauthService { - /** - * connect slack callback - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody code endpoint - * @returns string slack token - * @throws ApiError - */ - public static connectSlackCallback(data: ConnectSlackCallbackData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/connect_slack_callback', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * connect slack callback instance - * @param data The data for the request. - * @param data.requestBody code endpoint - * @returns string success message - * @throws ApiError - */ - public static connectSlackCallbackInstance(data: ConnectSlackCallbackInstanceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_slack_callback', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * connect callback - * @param data The data for the request. - * @param data.clientName - * @param data.requestBody code endpoint - * @returns TokenResponse oauth token - * @throws ApiError - */ - public static connectCallback(data: ConnectCallbackData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_callback/{client_name}', - path: { - client_name: data.clientName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create OAuth account - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody code endpoint - * @returns string account set - * @throws ApiError - */ - public static createAccount(data: CreateAccountData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/create_account', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * connect OAuth using client credentials - * @param data The data for the request. - * @param data.client OAuth client name - * @param data.requestBody client credentials flow parameters - * @returns TokenResponse OAuth token response - * @throws ApiError - */ - public static connectClientCredentials(data: ConnectClientCredentialsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_client_credentials/{client}', - path: { - client: data.client - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * refresh token - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody variable path - * @returns string token refreshed - * @throws ApiError - */ - public static refreshToken(data: RefreshTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/refresh_token/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * disconnect account - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string disconnected client - * @throws ApiError - */ - public static disconnectAccount(data: DisconnectAccountData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * disconnect slack - * @param data The data for the request. - * @param data.workspace - * @returns string disconnected slack - * @throws ApiError - */ - public static disconnectSlack(data: DisconnectSlackData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect_slack', - path: { - workspace: data.workspace - } - }); - } - - /** - * disconnect teams - * @param data The data for the request. - * @param data.workspace - * @returns string disconnected teams - * @throws ApiError - */ - public static disconnectTeams(data: DisconnectTeamsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect_teams', - path: { - workspace: data.workspace - } - }); - } - - /** - * list oauth logins - * @returns unknown list of oauth and saml login clients - * @throws ApiError - */ - public static listOauthLogins(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/oauth/list_logins' - }); - } - - /** - * list oauth connects - * @returns string list of oauth connects clients - * @throws ApiError - */ - public static listOauthConnects(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/oauth/list_connects' - }); - } - - /** - * get oauth connect - * @param data The data for the request. - * @param data.client client name - * @returns unknown get - * @throws ApiError - */ - public static getOauthConnect(data: GetOauthConnectData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/oauth/get_connect/{client}', - path: { - client: data.client - } - }); - } - -} - -export class TeamsService { - /** - * send update to Microsoft Teams activity - * Respond to a Microsoft Teams activity after a workspace command is run - * @param data The data for the request. - * @param data.requestBody - * @returns unknown Activity processed successfully - * @throws ApiError - */ - public static sendMessageToConversation(data: SendMessageToConversationData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/teams/activities', - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class ResourceService { - /** - * create resource - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new resource - * @param data.updateIfExists update the resource if it already exists (default false) - * @returns string resource created - * @throws ApiError - */ - public static createResource(data: CreateResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/create', - path: { - workspace: data.workspace - }, - query: { - update_if_exists: data.updateIfExists - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string resource deleted - * @throws ApiError - */ - public static deleteResource(data: DeleteResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * delete resources in bulk - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody paths to delete - * @returns string deleted paths - * @throws ApiError - */ - public static deleteResourcesBulk(data: DeleteResourcesBulkData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/delete_bulk', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource - * @returns string resource updated - * @throws ApiError - */ - public static updateResource(data: UpdateResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update resource value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource - * @returns string resource value updated - * @throws ApiError - */ - public static updateResourceValue(data: UpdateResourceValueData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/update_value/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns Resource resource - * @throws ApiError - */ - public static getResource(data: GetResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get resource interpolated (variables and resources are fully unrolled) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.jobId job id - * @param data.allowCache allow getting a cached value for improved performance - * @returns unknown resource value - * @throws ApiError - */ - public static getResourceValueInterpolated(data: GetResourceValueInterpolatedData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get_value_interpolated/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - job_id: data.jobId, - allow_cache: data.allowCache - } - }); - } - - /** - * get resource value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown resource value - * @throws ApiError - */ - public static getResourceValue(data: GetResourceValueData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get_value/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get git repository latest commit hash - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.gitSshIdentity - * @returns unknown git commit hash - * @throws ApiError - */ - public static getGitCommitHash(data: GetGitCommitHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/git_commit_hash/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - git_ssh_identity: data.gitSshIdentity - } - }); - } - - /** - * does resource exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does resource exists - * @throws ApiError - */ - public static existsResource(data: ExistsResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list resources - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.resourceType resource_types to list from, separated by ',', - * @param data.resourceTypeExclude resource_types to not list from, separated by ',', - * @param data.pathStart filter resources by path prefix - * @param data.path exact path match filter - * @param data.description pattern match filter for description field (case-insensitive) - * @param data.value JSONB subset match filter using base64 encoded JSON - * @param data.broadFilter broad search across multiple fields (case-insensitive substring match) - * @returns ListableResource resource list - * @throws ApiError - */ - public static listResource(data: ListResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - resource_type: data.resourceType, - resource_type_exclude: data.resourceTypeExclude, - path_start: data.pathStart, - path: data.path, - description: data.description, - value: data.value, - broad_filter: data.broadFilter - } - }); - } - - /** - * list resources for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown resource list - * @throws ApiError - */ - public static listSearchResource(data: ListSearchResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list_search', - path: { - workspace: data.workspace - } - }); - } - - /** - * get MCP tools from resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown list of MCP tools - * @throws ApiError - */ - public static getMcpTools(data: GetMcpToolsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/mcp_tools/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list resource names - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns unknown resource list names - * @throws ApiError - */ - public static listResourceNames(data: ListResourceNamesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list_names/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * create resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new resource_type - * @returns string resource_type created - * @throws ApiError - */ - public static createResourceType(data: CreateResourceTypeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/type/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get map from resource type to format extension - * @param data The data for the request. - * @param data.workspace - * @returns unknown map from resource type to file resource info - * @throws ApiError - */ - public static fileResourceTypeToFileExtMap(data: FileResourceTypeToFileExtMapData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/file_resource_type_to_file_ext_map', - path: { - workspace: data.workspace - } - }); - } - - /** - * delete resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string resource_type deleted - * @throws ApiError - */ - public static deleteResourceType(data: DeleteResourceTypeData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/type/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * update resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource_type - * @returns string resource_type updated - * @throws ApiError - */ - public static updateResourceType(data: UpdateResourceTypeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/type/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ResourceType resource_type deleted - * @throws ApiError - */ - public static getResourceType(data: GetResourceTypeData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * does resource_type exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does resource_type exist - * @throws ApiError - */ - public static existsResourceType(data: ExistsResourceTypeData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list resource_types - * @param data The data for the request. - * @param data.workspace - * @returns ResourceType resource_type list - * @throws ApiError - */ - public static listResourceType(data: ListResourceTypeData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/list', - path: { - workspace: data.workspace - } - }); - } - - /** - * list resource_types names - * @param data The data for the request. - * @param data.workspace - * @returns string resource_type list - * @throws ApiError - */ - public static listResourceTypeNames(data: ListResourceTypeNamesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/listnames', - path: { - workspace: data.workspace - } - }); - } - - /** - * query resource types by similarity - * @param data The data for the request. - * @param data.workspace - * @param data.text query text - * @param data.limit query limit - * @returns unknown resource type details - * @throws ApiError - */ - public static queryResourceTypes(data: QueryResourceTypesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/embeddings/query_resource_types', - path: { - workspace: data.workspace - }, - query: { - text: data.text, - limit: data.limit - } - }); - } - -} - -export class NpmProxyService { - /** - * get npm package metadata from private registry - * @param data The data for the request. - * @param data.workspace - * @param data._package npm package name - * @returns unknown package metadata - * @throws ApiError - */ - public static getNpmPackageMetadata(data: GetNpmPackageMetadataData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/npm_proxy/metadata/{package}', - path: { - workspace: data.workspace, - package: data._package - } - }); - } - - /** - * resolve npm package version from private registry - * @param data The data for the request. - * @param data.workspace - * @param data._package npm package name - * @param data.tag version tag or reference - * @returns unknown resolved version - * @throws ApiError - */ - public static resolveNpmPackageVersion(data: ResolveNpmPackageVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/npm_proxy/resolve/{package}', - path: { - workspace: data.workspace, - package: data._package - }, - query: { - tag: data.tag - } - }); - } - - /** - * get npm package file tree from private registry - * @param data The data for the request. - * @param data.workspace - * @param data._package npm package name - * @param data.version package version - * @returns unknown package file tree - * @throws ApiError - */ - public static getNpmPackageFiletree(data: GetNpmPackageFiletreeData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/npm_proxy/filetree/{package}/{version}', - path: { - workspace: data.workspace, - package: data._package, - version: data.version - } - }); - } - - /** - * get specific file from npm package in private registry - * @param data The data for the request. - * @param data.workspace - * @param data._package npm package name - * @param data.version package version - * @param data.filepath file path within package - * @returns string file content - * @throws ApiError - */ - public static getNpmPackageFile(data: GetNpmPackageFileData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/npm_proxy/file/{package}/{version}/{filepath}', - path: { - workspace: data.workspace, - package: data._package, - version: data.version, - filepath: data.filepath - } - }); - } - -} - -export class IntegrationService { - /** - * list hub integrations - * @param data The data for the request. - * @param data.kind query integrations kind - * @returns unknown integrations details - * @throws ApiError - */ - public static listHubIntegrations(data: ListHubIntegrationsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/integrations/hub/list', - query: { - kind: data.kind - } - }); - } - -} - -export class FlowService { - /** - * list all hub flows - * @returns unknown hub flows list - * @throws ApiError - */ - public static listHubFlows(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/flows/hub/list' - }); - } - - /** - * get hub flow by id - * @param data The data for the request. - * @param data.id - * @returns unknown flow - * @throws ApiError - */ - public static getHubFlowById(data: GetHubFlowByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/flows/hub/get/{id}', - path: { - id: data.id - } - }); - } - - /** - * list all flow paths - * @param data The data for the request. - * @param data.workspace - * @returns string list of flow paths - * @throws ApiError - */ - public static listFlowPaths(data: ListFlowPathsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_paths', - path: { - workspace: data.workspace - } - }); - } - - /** - * list flows for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown flow list - * @throws ApiError - */ - public static listSearchFlow(data: ListSearchFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_search', - path: { - workspace: data.workspace - } - }); - } - - /** - * list all flows - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.showArchived (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are displayed. - * - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.includeDraftOnly (default false) - * include items that have no deployed version - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @param data.withoutDescription (default false) - * If true, the description field will be omitted from the response. - * - * @param data.dedicatedWorker (default regardless) - * If true, show only flows with dedicated_worker enabled. - * If false, show only flows with dedicated_worker disabled. - * - * @returns unknown All flow - * @throws ApiError - */ - public static listFlows(data: ListFlowsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - show_archived: data.showArchived, - starred_only: data.starredOnly, - include_draft_only: data.includeDraftOnly, - with_deployment_msg: data.withDeploymentMsg, - without_description: data.withoutDescription, - dedicated_worker: data.dedicatedWorker - } - }); - } - - /** - * get flow history by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns FlowVersion Flow history - * @throws ApiError - */ - public static getFlowHistory(data: GetFlowHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get flow's latest version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns FlowVersion Flow version - * @throws ApiError - */ - public static getFlowLatestVersion(data: GetFlowLatestVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list flow paths from workspace runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.matchPathStart - * @returns string list of flow paths - * @throws ApiError - */ - public static listFlowPathsFromWorkspaceRunnable(data: ListFlowPathsFromWorkspaceRunnableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_paths_from_workspace_runnable/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - query: { - match_path_start: data.matchPathStart - } - }); - } - - /** - * get flow version - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @returns Flow flow details - * @throws ApiError - */ - public static getFlowVersion(data: GetFlowVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/v/{version}', - path: { - workspace: data.workspace, - version: data.version - } - }); - } - - /** - * update flow history - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.requestBody Flow deployment message - * @returns string success - * @throws ApiError - */ - public static updateFlowHistory(data: UpdateFlowHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/history_update/v/{version}', - path: { - workspace: data.workspace, - version: data.version - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns Flow flow details - * @throws ApiError - */ - public static getFlowByPath(data: GetFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } - }); - } - - /** - * get flow deployment status - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown flow status - * @throws ApiError - */ - public static getFlowDeploymentStatus(data: GetFlowDeploymentStatusData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/deployment_status/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get triggers count of flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TriggersCount triggers count - * @throws ApiError - */ - public static getTriggersCountOfFlow(data: GetTriggersCountOfFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get_triggers_count/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get tokens with flow scope - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TruncatedToken tokens list - * @throws ApiError - */ - public static listTokensOfFlow(data: ListTokensOfFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_tokens/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * Toggle ON and OFF the workspace error handler for a given flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Workspace error handler enabled - * @returns string error handler toggled - * @throws ApiError - */ - public static toggleWorkspaceErrorHandlerForFlow(data: ToggleWorkspaceErrorHandlerForFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/toggle_workspace_error_handler/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get flow by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown flow details with draft - * @throws ApiError - */ - public static getFlowByPathWithDraft(data: GetFlowByPathWithDraftData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * exists flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean flow details - * @throws ApiError - */ - public static existsFlowByPath(data: ExistsFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * create flow - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Partially filled flow - * @returns string flow created - * @throws ApiError - */ - public static createFlow(data: CreateFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Partially filled flow - * @returns string flow updated - * @throws ApiError - */ - public static updateFlow(data: UpdateFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * archive flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody archiveFlow - * @returns string flow archived - * @throws ApiError - */ - public static archiveFlowByPath(data: ArchiveFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/archive/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.keepCaptures keep captures - * @returns string flow delete - * @throws ApiError - */ - public static deleteFlowByPath(data: DeleteFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/flows/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - keep_captures: data.keepCaptures - } - }); - } - -} - -export class AppService { - /** - * list all hub apps - * @returns unknown hub apps list - * @throws ApiError - */ - public static listHubApps(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/list' - }); - } - - /** - * get hub app by id - * @param data The data for the request. - * @param data.id - * @returns unknown app - * @throws ApiError - */ - public static getHubAppById(data: GetHubAppByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/get/{id}', - path: { - id: data.id - } - }); - } - - /** - * get hub raw app by id - * @param data The data for the request. - * @param data.id - * @returns unknown raw app - * @throws ApiError - */ - public static getHubRawAppById(data: GetHubRawAppByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/get_raw/{id}', - path: { - id: data.id - } - }); - } - - /** - * get public app by custom path - * @param data The data for the request. - * @param data.customPath - * @returns unknown app details - * @throws ApiError - */ - public static getPublicAppByCustomPath(data: GetPublicAppByCustomPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/apps_u/public_app_by_custom_path/{custom_path}', - path: { - custom_path: data.customPath - } - }); - } - - /** - * get raw app data by - * @param data The data for the request. - * @param data.workspace - * @param data.secretWithExtension - * @returns string app details - * @throws ApiError - */ - public static getRawAppData(data: GetRawAppDataData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get_data/v/{secretWithExtension}', - path: { - workspace: data.workspace, - secretWithExtension: data.secretWithExtension - } - }); - } - - /** - * list apps for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown app list - * @throws ApiError - */ - public static listSearchApp(data: ListSearchAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list_search', - path: { - workspace: data.workspace - } - }); - } - - /** - * list all apps - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.includeDraftOnly (default false) - * include items that have no deployed version - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns ListableApp All apps - * @throws ApiError - */ - public static listApps(data: ListAppsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - starred_only: data.starredOnly, - include_draft_only: data.includeDraftOnly, - with_deployment_msg: data.withDeploymentMsg - } - }); - } - - /** - * create app - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new app - * @returns string app created - * @throws ApiError - */ - public static createApp(data: CreateAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create app raw - * @param data The data for the request. - * @param data.workspace - * @param data.formData new app - * @returns string app created - * @throws ApiError - */ - public static createAppRaw(data: CreateAppRawData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/create_raw', - path: { - workspace: data.workspace - }, - formData: data.formData, - mediaType: 'multipart/form-data' - }); - } - - /** - * does an app exisst at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean app exists - * @throws ApiError - */ - public static existsApp(data: ExistsAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get app by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns AppWithLastVersion app details - * @throws ApiError - */ - public static getAppByPath(data: GetAppByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } - }); - } - - /** - * get app lite by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersion app lite details - * @throws ApiError - */ - public static getAppLiteByPath(data: GetAppLiteByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/lite/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get app by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersionWDraft app details with draft - * @throws ApiError - */ - public static getAppByPathWithDraft(data: GetAppByPathWithDraftData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get app history by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppHistory app history - * @throws ApiError - */ - public static getAppHistoryByPath(data: GetAppHistoryByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get apps's latest version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppHistory App version - * @throws ApiError - */ - public static getAppLatestVersion(data: GetAppLatestVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list app paths from workspace runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns string list of app paths - * @throws ApiError - */ - public static listAppPathsFromWorkspaceRunnable(data: ListAppPathsFromWorkspaceRunnableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list_paths_from_workspace_runnable/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } - }); - } - - /** - * update app history - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.version - * @param data.requestBody App deployment message - * @returns string success - * @throws ApiError - */ - public static updateAppHistory(data: UpdateAppHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/history_update/a/{id}/v/{version}', - path: { - workspace: data.workspace, - id: data.id, - version: data.version - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get public app by secret - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersion app details - * @throws ApiError - */ - public static getPublicAppBySecret(data: GetPublicAppBySecretData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps_u/public_app/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get public resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown resource value - * @throws ApiError - */ - public static getPublicResource(data: GetPublicResourceData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps_u/public_resource/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get public secret of app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app secret - * @throws ApiError - */ - public static getPublicSecretOfApp(data: GetPublicSecretOfAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/secret_of/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get public secret of latest version of an app bundle - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app secret - * @throws ApiError - */ - public static getPublicSecretOfLatestVersionOfApp(data: GetPublicSecretOfLatestVersionOfAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/secret_of_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get app by version - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns AppWithLastVersion app details - * @throws ApiError - */ - public static getAppByVersion(data: GetAppByVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/v/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * delete app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app deleted - * @throws ApiError - */ - public static deleteApp(data: DeleteAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/apps/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * update app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody update app - * @returns string app updated - * @throws ApiError - */ - public static updateApp(data: UpdateAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.formData update app - * @returns string app updated - * @throws ApiError - */ - public static updateAppRaw(data: UpdateAppRawData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/update_raw/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - formData: data.formData, - mediaType: 'multipart/form-data' - }); - } - - /** - * check if custom path exists - * @param data The data for the request. - * @param data.workspace - * @param data.customPath - * @returns boolean custom path exists - * @throws ApiError - */ - public static customPathExists(data: CustomPathExistsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/custom_path_exists/{custom_path}', - path: { - workspace: data.workspace, - custom_path: data.customPath - } - }); - } - - /** - * sign s3 objects, to be used by anonymous users in public apps - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody s3 objects to sign - * @returns S3Object signed s3 objects - * @throws ApiError - */ - public static signS3Objects(data: SignS3ObjectsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/sign_s3_objects', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * executeComponent - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody update app - * @returns string job uuid - * @throws ApiError - */ - public static executeComponent(data: ExecuteComponentData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps_u/execute_component/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * upload s3 file from app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown file uploaded - * @throws ApiError - */ - public static uploadS3FileFromApp(data: UploadS3FileFromAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps_u/upload_s3_file/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' - }); - } - - /** - * delete s3 file from app - * @param data The data for the request. - * @param data.workspace - * @param data.deleteToken - * @returns string file deleted - * @throws ApiError - */ - public static deleteS3FileFromApp(data: DeleteS3FileFromAppData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/apps_u/delete_s3_file', - path: { - workspace: data.workspace - }, - query: { - delete_token: data.deleteToken - } - }); - } - -} - -export class ScriptService { - /** - * get hub script content by path - * @param data The data for the request. - * @param data.path - * @returns string script details - * @throws ApiError - */ - public static getHubScriptContentByPath(data: GetHubScriptContentByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/get/{path}', - path: { - path: data.path - } - }); - } - - /** - * get full hub script by path - * @param data The data for the request. - * @param data.path - * @returns unknown script details - * @throws ApiError - */ - public static getHubScriptByPath(data: GetHubScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/get_full/{path}', - path: { - path: data.path - } - }); - } - - /** - * record hub script pick - * @param data The data for the request. - * @param data.path - * @returns unknown script pick recorded - * @throws ApiError - */ - public static pickHubScriptByPath(data: PickHubScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/pick/{path}', - path: { - path: data.path - } - }); - } - - /** - * get top hub scripts - * @param data The data for the request. - * @param data.limit query limit - * @param data.app query scripts app - * @param data.kind query scripts kind - * @returns unknown hub scripts list - * @throws ApiError - */ - public static getTopHubScripts(data: GetTopHubScriptsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/top', - query: { - limit: data.limit, - app: data.app, - kind: data.kind - } - }); - } - - /** - * query hub scripts by similarity - * @param data The data for the request. - * @param data.text query text - * @param data.kind query scripts kind - * @param data.limit query limit - * @param data.app query scripts app - * @returns unknown script details - * @throws ApiError - */ - public static queryHubScripts(data: QueryHubScriptsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/embeddings/query_hub_scripts', - query: { - text: data.text, - kind: data.kind, - limit: data.limit, - app: data.app - } - }); - } - - /** - * list scripts for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown script list - * @throws ApiError - */ - public static listSearchScript(data: ListSearchScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_search', - path: { - workspace: data.workspace - } - }); - } - - /** - * list all scripts - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.firstParentHash mask to filter scripts whom first direct parent has exact hash - * @param data.lastParentHash mask to filter scripts whom last parent in the chain has exact hash. - * Beware that each script stores only a limited number of parents. Hence - * the last parent hash for a script is not necessarily its top-most parent. - * To find the top-most parent you will have to jump from last to last hash - * until finding the parent - * - * @param data.parentHash is the hash present in the array of stored parent hashes for this script. - * The same warning applies than for last_parent_hash. A script only store a - * limited number of direct parent - * - * @param data.showArchived (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are - * ed. - * - * @param data.includeWithoutMain (default false) - * include scripts without an exported main function - * - * @param data.includeDraftOnly (default false) - * include scripts that have no deployed version - * - * @param data.isTemplate (default regardless) - * if true show only the templates - * if false show only the non templates - * if not defined, show all regardless of if the script is a template - * - * @param data.kinds (default regardless) - * script kinds to filter, split by comma - * - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @param data.languages Filter to only include scripts written in the given languages. - * Accepts multiple values as a comma-separated list. - * - * @param data.withoutDescription (default false) - * If true, the description field will be omitted from the response. - * - * @param data.dedicatedWorker (default regardless) - * If true, show only scripts with dedicated_worker enabled. - * If false, show only scripts with dedicated_worker disabled. - * - * @returns Script All scripts - * @throws ApiError - */ - public static listScripts(data: ListScriptsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - first_parent_hash: data.firstParentHash, - last_parent_hash: data.lastParentHash, - parent_hash: data.parentHash, - show_archived: data.showArchived, - include_without_main: data.includeWithoutMain, - include_draft_only: data.includeDraftOnly, - is_template: data.isTemplate, - kinds: data.kinds, - starred_only: data.starredOnly, - with_deployment_msg: data.withDeploymentMsg, - languages: data.languages, - without_description: data.withoutDescription, - dedicated_worker: data.dedicatedWorker - } - }); - } - - /** - * list all scripts paths - * @param data The data for the request. - * @param data.workspace - * @returns string list of script paths - * @throws ApiError - */ - public static listScriptPaths(data: ListScriptPathsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_paths', - path: { - workspace: data.workspace - } - }); - } - - /** - * create script - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Partially filled script - * @returns string script created - * @throws ApiError - */ - public static createScript(data: CreateScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Toggle ON and OFF the workspace error handler for a given script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Workspace error handler enabled - * @returns string error handler toggled - * @throws ApiError - */ - public static toggleWorkspaceErrorHandlerForScript(data: ToggleWorkspaceErrorHandlerForScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/toggle_workspace_error_handler/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * archive script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script archived - * @throws ApiError - */ - public static archiveScriptByPath(data: ArchiveScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/archive/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * archive script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns Script script details - * @throws ApiError - */ - public static archiveScriptByHash(data: ArchiveScriptByHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/archive/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } - }); - } - - /** - * delete script by hash (erase content but keep hash, require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns Script script details - * @throws ApiError - */ - public static deleteScriptByHash(data: DeleteScriptByHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/delete/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } - }); - } - - /** - * delete script at a given path (require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.keepCaptures keep captures - * @returns string script path - * @throws ApiError - */ - public static deleteScriptByPath(data: DeleteScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/delete/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - keep_captures: data.keepCaptures - } - }); - } - - /** - * delete scripts in bulk - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody paths to delete - * @returns string deleted paths - * @throws ApiError - */ - public static deleteScriptsBulk(data: DeleteScriptsBulkData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/scripts/delete_bulk', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns Script script details - * @throws ApiError - */ - public static getScriptByPath(data: GetScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } - }); - } - - /** - * get triggers count of script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TriggersCount triggers count - * @throws ApiError - */ - public static getTriggersCountOfScript(data: GetTriggersCountOfScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get_triggers_count/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get tokens with script scope - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TruncatedToken tokens list - * @throws ApiError - */ - public static listTokensOfScript(data: ListTokensOfScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_tokens/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get script by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns NewScriptWithDraft script details - * @throws ApiError - */ - public static getScriptByPathWithDraft(data: GetScriptByPathWithDraftData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get history of a script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ScriptHistory script history - * @throws ApiError - */ - public static getScriptHistoryByPath(data: GetScriptHistoryByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list script paths using provided script as a relative import - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string list of script paths - * @throws ApiError - */ - public static listScriptPathsFromWorkspaceRunnable(data: ListScriptPathsFromWorkspaceRunnableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_paths_from_workspace_runnable/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get scripts's latest version (hash) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ScriptHistory Script version/hash - * @throws ApiError - */ - public static getScriptLatestVersion(data: GetScriptLatestVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * update history of a script - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.path - * @param data.requestBody Script deployment message - * @returns string success - * @throws ApiError - */ - public static updateScriptHistory(data: UpdateScriptHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/history_update/h/{hash}/p/{path}', - path: { - workspace: data.workspace, - hash: data.hash, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * raw script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script content - * @throws ApiError - */ - public static rawScriptByPath(data: RawScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/raw/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * raw script by path with a token (mostly used by lsp to be used with import maps to resolve scripts) - * @param data The data for the request. - * @param data.workspace - * @param data.token - * @param data.path - * @returns string script content - * @throws ApiError - */ - public static rawScriptByPathTokened(data: RawScriptByPathTokenedData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/scripts_u/tokened_raw/{workspace}/{token}/{path}', - path: { - workspace: data.workspace, - token: data.token, - path: data.path - } - }); - } - - /** - * exists script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does it exists - * @throws ApiError - */ - public static existsScriptByPath(data: ExistsScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/exists/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.withStarredInfo - * @param data.authed - * @returns Script script details - * @throws ApiError - */ - public static getScriptByHash(data: GetScriptByHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - with_starred_info: data.withStarredInfo, - authed: data.authed - } - }); - } - - /** - * raw script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script content - * @throws ApiError - */ - public static rawScriptByHash(data: RawScriptByHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/raw/h/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get script deployment status - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns unknown script details - * @throws ApiError - */ - public static getScriptDeploymentStatus(data: GetScriptDeploymentStatusData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/deployment_status/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } - }); - } - - /** - * store raw script content temporarily for CLI lock generation - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody script content to store - * @returns string hash of stored content - * @throws ApiError - */ - public static storeRawScriptTemp(data: StoreRawScriptTempData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/raw_temp/store', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * diff local script hashes against deployed versions - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody scripts and workspace deps to diff against deployed versions - * @returns string list of paths that differ from deployed versions - * @throws ApiError - */ - public static diffRawScriptsWithDeployed(data: DiffRawScriptsWithDeployedData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/raw_temp/diff', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class DraftService { - /** - * create draft - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string draft created - * @throws ApiError - */ - public static createDraft(data: CreateDraftData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/drafts/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete draft - * @param data The data for the request. - * @param data.workspace - * @param data.kind - * @param data.path - * @returns string draft deleted - * @throws ApiError - */ - public static deleteDraft(data: DeleteDraftData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/drafts/delete/{kind}/{path}', - path: { - workspace: data.workspace, - kind: data.kind, - path: data.path - } - }); - } - -} - -export class WorkerService { - /** - * get all instance custom tags (tags are used to dispatch jobs to different worker groups) - * @param data The data for the request. - * @param data.showWorkspaceRestriction - * @returns string list of custom tags - * @throws ApiError - */ - public static getCustomTags(data: GetCustomTagsData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/custom_tags', - query: { - show_workspace_restriction: data.showWorkspaceRestriction - } - }); - } - - /** - * get custom tags available for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns string list of custom tags for workspace - * @throws ApiError - */ - public static getCustomTagsForWorkspace(data: GetCustomTagsForWorkspaceData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workers/custom_tags', - path: { - workspace: data.workspace - } - }); - } - - /** - * get all instance default tags - * @returns string list of default tags - * @throws ApiError - */ - public static geDefaultTags(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/get_default_tags' - }); - } - - /** - * is default tags per workspace - * @returns boolean is the default tags per workspace - * @throws ApiError - */ - public static isDefaultTagsPerWorkspace(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/is_default_tags_per_workspace' - }); - } - - /** - * list workers - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.pingSince number of seconds the worker must have had a last ping more recent of (default to 300) - * @returns WorkerPing a list of workers - * @throws ApiError - */ - public static listWorkers(data: ListWorkersData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/list', - query: { - page: data.page, - per_page: data.perPage, - ping_since: data.pingSince - } - }); - } - - /** - * exists workers with tags - * @param data The data for the request. - * @param data.tags comma separated list of tags - * @param data.workspace workspace to filter tags visibility (required when TAGS_ARE_SENSITIVE is enabled for non-superadmins) - * @returns boolean map of tags to whether at least one worker with the tag exists - * @throws ApiError - */ - public static existsWorkersWithTags(data: ExistsWorkersWithTagsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/exists_workers_with_tags', - query: { - tags: data.tags, - workspace: data.workspace - } - }); - } - - /** - * get queue metrics - * @returns unknown metrics - * @throws ApiError - */ - public static getQueueMetrics(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_metrics' - }); - } - - /** - * get counts of jobs waiting for an executor per tag - * @returns number queue counts - * @throws ApiError - */ - public static getCountsOfJobsWaitingPerTag(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_counts' - }); - } - - /** - * get counts of currently running jobs per tag - * @returns number queue running counts - * @throws ApiError - */ - public static getCountsOfRunningJobsPerTag(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_running_counts' - }); - } - -} - -export class WorkspaceDependenciesService { - /** - * create workspace dependencies - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody New workspace dependencies - * @returns string workspace dependencies created - * @throws ApiError - */ - public static createWorkspaceDependencies(data: CreateWorkspaceDependenciesData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspace_dependencies/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * archive workspace dependencies (require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.language - * @param data.name - * @returns unknown result - * @throws ApiError - */ - public static archiveWorkspaceDependencies(data: ArchiveWorkspaceDependenciesData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspace_dependencies/archive/{language}', - path: { - workspace: data.workspace, - language: data.language - }, - query: { - name: data.name - } - }); - } - - /** - * delete workspace dependencies (require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.language - * @param data.name - * @returns unknown result - * @throws ApiError - */ - public static deleteWorkspaceDependencies(data: DeleteWorkspaceDependenciesData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspace_dependencies/delete/{language}', - path: { - workspace: data.workspace, - language: data.language - }, - query: { - name: data.name - } - }); - } - - /** - * list all workspace dependencies - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceDependencies All workspace dependencies - * @throws ApiError - */ - public static listWorkspaceDependencies(data: ListWorkspaceDependenciesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspace_dependencies/list', - path: { - workspace: data.workspace - } - }); - } - - /** - * get latest workspace dependencies by language and name - * @param data The data for the request. - * @param data.workspace - * @param data.language - * @param data.name - * @returns WorkspaceDependencies Latest workspace dependencies - * @throws ApiError - */ - public static getLatestWorkspaceDependencies(data: GetLatestWorkspaceDependenciesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspace_dependencies/get_latest/{language}', - path: { - workspace: data.workspace, - language: data.language - }, - query: { - name: data.name - } - }); - } - -} - -export class JobService { - /** - * list selected jobs script/flow schemas grouped by (kind, path) - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody script args - * @returns unknown result - * @throws ApiError - */ - public static listSelectedJobGroups(data: ListSelectedJobGroupsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/list_selected_job_groups', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @returns string job created - * @throws ApiError - */ - public static runScriptByPath(data: RunScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.skipPreprocessor skip the preprocessor - * @returns unknown job result - * @throws ApiError - */ - public static runWaitResultScriptByPath(data: RunWaitResultScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - skip_preprocessor: data.skipPreprocessor - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by path with get - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.skipPreprocessor skip the preprocessor - * @returns unknown job result - * @throws ApiError - */ - public static runWaitResultScriptByPathGet(data: RunWaitResultScriptByPathGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_wait_result/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload, - skip_preprocessor: data.skipPreprocessor - } - }); - } - - /** - * run flow by path and wait until completion - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @returns unknown job result - * @throws ApiError - */ - public static runWaitResultFlowByPath(data: RunWaitResultFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow by version and wait until completion - * @param data The data for the request. - * @param data.workspace - * @param data.version flow version ID - * @param data.requestBody script args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @returns unknown job result - * @throws ApiError - */ - public static runWaitResultFlowByVersion(data: RunWaitResultFlowByVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/fv/{version}', - path: { - workspace: data.workspace, - version: data.version - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow by version with GET and wait until completion - * @param data The data for the request. - * @param data.workspace - * @param data.version flow version ID - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @returns unknown job result - * @throws ApiError - */ - public static runWaitResultFlowByVersionGet(data: RunWaitResultFlowByVersionGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_wait_result/fv/{version}', - path: { - workspace: data.workspace, - version: data.version - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId - } - }); - } - - /** - * run flow by path and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody flow args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamFlowByPath(data: RunAndStreamFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_and_stream/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId, - poll_delay_ms: data.pollDelayMs - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow by path with GET and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamFlowByPathGet(data: RunAndStreamFlowByPathGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_and_stream/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId, - poll_delay_ms: data.pollDelayMs - } - }); - } - - /** - * run flow by version and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.version flow version ID - * @param data.requestBody flow args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamFlowByVersion(data: RunAndStreamFlowByVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_and_stream/fv/{version}', - path: { - workspace: data.workspace, - version: data.version - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId, - poll_delay_ms: data.pollDelayMs - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow by version with GET and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.version flow version ID - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.skipPreprocessor skip the preprocessor - * @param data.memoryId memory ID for chat-enabled flows - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamFlowByVersionGet(data: RunAndStreamFlowByVersionGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_and_stream/fv/{version}', - path: { - workspace: data.workspace, - version: data.version - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload, - job_id: data.jobId, - skip_preprocessor: data.skipPreprocessor, - memory_id: data.memoryId, - poll_delay_ms: data.pollDelayMs - } - }); - } - - /** - * run script by path and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.skipPreprocessor skip the preprocessor - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamScriptByPath(data: RunAndStreamScriptByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_and_stream/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - skip_preprocessor: data.skipPreprocessor, - poll_delay_ms: data.pollDelayMs - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by path with GET and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.skipPreprocessor skip the preprocessor - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamScriptByPathGet(data: RunAndStreamScriptByPathGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_and_stream/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload, - skip_preprocessor: data.skipPreprocessor, - poll_delay_ms: data.pollDelayMs - } - }); - } - - /** - * run script by hash and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.skipPreprocessor skip the preprocessor - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamScriptByHash(data: RunAndStreamScriptByHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_and_stream/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - skip_preprocessor: data.skipPreprocessor, - poll_delay_ms: data.pollDelayMs - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by hash with GET and stream updates via SSE - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.skipPreprocessor skip the preprocessor - * @param data.pollDelayMs delay between polling for job updates in milliseconds - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static runAndStreamScriptByHashGet(data: RunAndStreamScriptByHashGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_and_stream/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload, - skip_preprocessor: data.skipPreprocessor, - poll_delay_ms: data.pollDelayMs - } - }); - } - - /** - * get job result by id - * @param data The data for the request. - * @param data.workspace - * @param data.flowJobId - * @param data.nodeId - * @returns unknown job result - * @throws ApiError - */ - public static resultById(data: ResultByIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}', - path: { - workspace: data.workspace, - flow_job_id: data.flowJobId, - node_id: data.nodeId - } - }); - } - - /** - * run flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody flow args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @param data.memoryId memory ID for chat-enabled flows - * @returns string job created - * @throws ApiError - */ - public static runFlowByPath(data: RunFlowByPathData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - memory_id: data.memoryId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow by version - * @param data The data for the request. - * @param data.workspace - * @param data.version flow version ID - * @param data.requestBody flow args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @param data.memoryId memory ID for chat-enabled flows - * @returns string job created - * @throws ApiError - */ - public static runFlowByVersion(data: RunFlowByVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/fv/{version}', - path: { - workspace: data.workspace, - version: data.version - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - memory_id: data.memoryId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * re-run multiple jobs - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody list of job ids to re run and arg tranforms - * @returns string stream of created job uuids separated by \n. Lines may start with 'Error:' - * @throws ApiError - */ - public static batchReRunJobs(data: BatchReRunJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/batch_rerun_jobs', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * restart a completed flow at a given step - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody restart flow parameters - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @returns string job created - * @throws ApiError - */ - public static restartFlowAtStep(data: RestartFlowAtStepData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/restart/f/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.requestBody Partially filled args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @returns string job created - * @throws ApiError - */ - public static runScriptByHash(data: RunScriptByHashData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script preview - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns string job created - * @throws ApiError - */ - public static runScriptPreview(data: RunScriptPreviewData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/preview', - path: { - workspace: data.workspace - }, - query: { - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script preview without starting a new job - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @returns unknown script result - * @throws ApiError - */ - public static runScriptPreviewInline(data: RunScriptPreviewInlineData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_inline/preview', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by path without starting a new job - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @returns unknown script result - * @throws ApiError - */ - public static runScriptByPathInline(data: RunScriptByPathInlineData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_inline/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script by hash without starting a new job - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.requestBody script args - * @returns unknown script result - * @throws ApiError - */ - public static runScriptByHashInline(data: RunScriptByHashInlineData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_inline/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run script preview and wait for result - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @returns unknown job result - * @throws ApiError - */ - public static runScriptPreviewAndWaitResult(data: RunScriptPreviewAndWaitResultData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/preview', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run code-workflow task - * @param data The data for the request. - * @param data.workspace - * @param data.jobId - * @param data.entrypoint - * @param data.requestBody preview - * @returns string job created - * @throws ApiError - */ - public static runCodeWorkflowTask(data: RunCodeWorkflowTaskData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/workflow_as_code/{job_id}/{entrypoint}', - path: { - workspace: data.workspace, - job_id: data.jobId, - entrypoint: data.entrypoint - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run a one-off dependencies job - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody raw script content - * @returns unknown dependency job result - * @throws ApiError - */ - public static runRawScriptDependencies(data: RunRawScriptDependenciesData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/dependencies', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow preview - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.memoryId memory ID for chat-enabled flows - * @returns string job created - * @throws ApiError - */ - public static runFlowPreview(data: RunFlowPreviewData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/preview_flow', - path: { - workspace: data.workspace - }, - query: { - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - job_id: data.jobId, - memory_id: data.memoryId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run flow preview and wait for result - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.memoryId memory ID for chat-enabled flows - * @returns unknown job result - * @throws ApiError - */ - public static runFlowPreviewAndWaitResult(data: RunFlowPreviewAndWaitResultData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/preview_flow', - path: { - workspace: data.workspace - }, - query: { - memory_id: data.memoryId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * run dynamic select helper function - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody dynamic select request - * @returns string dynamic select job created - * @throws ApiError - */ - public static runDynamicSelect(data: RunDynamicSelectData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/dynamic_select', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list all queued jobs - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.worker filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.triggerPath filter by trigger path. Supports comma-separated list (e.g. 'f/trigger1,f/trigger2') and negation by prefixing all values with '!' (e.g. '!f/trigger1,!f/trigger2') - * @param data.triggerKind filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.suspended filter on suspended jobs - * @param data.running filter on running jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns QueuedJob All queued jobs - * @throws ApiError - */ - public static listQueue(data: ListQueueData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/list', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - parent_job: data.parentJob, - worker: data.worker, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - trigger_path: data.triggerPath, - trigger_kind: data.triggerKind, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - running: data.running, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } - }); - } - - /** - * get queue count - * @param data The data for the request. - * @param data.workspace - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @returns unknown queue count - * @throws ApiError - */ - public static getQueueCount(data: GetQueueCountData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/count', - path: { - workspace: data.workspace - }, - query: { - all_workspaces: data.allWorkspaces - } - }); - } - - /** - * get completed count - * @param data The data for the request. - * @param data.workspace - * @returns unknown completed count - * @throws ApiError - */ - public static getCompletedCount(data: GetCompletedCountData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/count', - path: { - workspace: data.workspace - } - }); - } - - /** - * count number of completed jobs with filter - * @param data The data for the request. - * @param data.workspace - * @param data.completedAfterSAgo - * @param data.success - * @param data.tags - * @param data.allWorkspaces - * @returns number Count of completed jobs - * @throws ApiError - */ - public static countCompletedJobs(data: CountCompletedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/count_jobs', - path: { - workspace: data.workspace - }, - query: { - completed_after_s_ago: data.completedAfterSAgo, - success: data.success, - tags: data.tags, - all_workspaces: data.allWorkspaces - } - }); - } - - /** - * get the ids of all jobs matching the given filters - * @param data The data for the request. - * @param data.workspace - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.label filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') - * @param data.worker filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.createdBefore filter on created before (inclusive) timestamp - * @param data.createdAfter filter on created after (exclusive) timestamp - * @param data.completedBefore filter on started before (inclusive) timestamp - * @param data.completedAfter filter on started after (exclusive) timestamp - * @param data.createdBeforeQueue filter on jobs created before X for jobs in the queue only - * @param data.createdAfterQueue filter on jobs created after X for jobs in the queue only - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.suspended filter on suspended jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns string uuids of jobs - * @throws ApiError - */ - public static listFilteredJobsUuids(data: ListFilteredJobsUuidsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/list_filtered_uuids', - path: { - workspace: data.workspace - }, - query: { - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - created_before: data.createdBefore, - created_after: data.createdAfter, - completed_before: data.completedBefore, - completed_after: data.completedAfter, - created_before_queue: data.createdBeforeQueue, - created_after_queue: data.createdAfterQueue, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - args: data.args, - tag: data.tag, - result: data.result, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } - }); - } - - /** - * get the ids of all queued jobs matching the given filters - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.suspended filter on suspended jobs - * @param data.running filter on running jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.concurrencyKey - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns string uuids of jobs - * @throws ApiError - */ - public static listFilteredQueueUuids(data: ListFilteredQueueUuidsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/list_filtered_uuids', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - running: data.running, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - concurrency_key: data.concurrencyKey, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } - }); - } - - /** - * cancel jobs based on the given uuids - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody uuids of the jobs to cancel - * @param data.forceCancel - * @returns string uuids of canceled jobs - * @throws ApiError - */ - public static cancelSelection(data: CancelSelectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/queue/cancel_selection', - path: { - workspace: data.workspace - }, - query: { - force_cancel: data.forceCancel - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get OpenTelemetry traces for a job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown list of OTEL Span objects (compatible with OpenTelemetry Span proto) - * @throws ApiError - */ - public static getJobOtelTraces(data: GetJobOtelTracesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/get_otel_traces/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * list all completed jobs - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.label filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') - * @param data.worker filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.isNotSchedule is not a scheduled job - * @returns CompletedJob All completed jobs - * @throws ApiError - */ - public static listCompletedJobs(data: ListCompletedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/list', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - job_kinds: data.jobKinds, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - is_not_schedule: data.isNotSchedule - } - }); - } - - /** - * export all completed jobs for backup/migration - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ExportableCompletedJob All completed jobs exported - * @throws ApiError - */ - public static exportCompletedJobs(data: ExportCompletedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/export', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * import completed jobs from backup/migration - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string Successfully imported completed jobs - * @throws ApiError - */ - public static importCompletedJobs(data: ImportCompletedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/completed/import', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * export all queued jobs for backup/migration - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ExportableQueuedJob All queued jobs exported - * @throws ApiError - */ - public static exportQueuedJobs(data: ExportQueuedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/export', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * import queued jobs from backup/migration - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string Successfully imported queued jobs - * @throws ApiError - */ - public static importQueuedJobs(data: ImportQueuedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/queue/import', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete jobs by IDs from all related tables - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string Successfully deleted jobs - * @throws ApiError - */ - public static deleteJobs(data: DeleteJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/delete', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list all jobs - * @param data The data for the request. - * @param data.workspace - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.label filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') - * @param data.worker filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.createdBefore filter on created before (inclusive) timestamp - * @param data.createdAfter filter on created after (exclusive) timestamp - * @param data.completedBefore filter on started before (inclusive) timestamp - * @param data.completedAfter filter on started after (exclusive) timestamp - * @param data.createdBeforeQueue filter on jobs created before X for jobs in the queue only - * @param data.createdAfterQueue filter on jobs created after X for jobs in the queue only - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.suspended filter on suspended jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.triggerKind filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @param data.broadFilter broad search across multiple fields (case-insensitive substring match on path, tag, schedule path, trigger kind, label) - * @returns Job All jobs - * @throws ApiError - */ - public static listJobs(data: ListJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/list', - path: { - workspace: data.workspace - }, - query: { - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - created_before: data.createdBefore, - created_after: data.createdAfter, - completed_before: data.completedBefore, - completed_after: data.completedAfter, - created_before_queue: data.createdBeforeQueue, - created_after_queue: data.createdAfterQueue, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - per_page: data.perPage, - trigger_kind: data.triggerKind, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule, - broad_filter: data.broadFilter - } - }); - } - - /** - * get db clock - * @returns number the timestamp of the db that can be used to compute the drift - * @throws ApiError - */ - public static getDbClock(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/jobs/db_clock' - }); - } - - /** - * Count jobs by tag - * @param data The data for the request. - * @param data.horizonSecs Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600) - * @param data.workspaceId Specific workspace ID to filter results (optional) - * @returns unknown Job counts by tag - * @throws ApiError - */ - public static countJobsByTag(data: CountJobsByTagData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/jobs/completed/count_by_tag', - query: { - horizon_secs: data.horizonSecs, - workspace_id: data.workspaceId - } - }); - } - - /** - * get job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.noLogs - * @param data.noCode - * @returns Job job details - * @throws ApiError - */ - public static getJob(data: GetJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - no_logs: data.noLogs, - no_code: data.noCode - } - }); - } - - /** - * get root job id - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string get root job id - * @throws ApiError - */ - public static getRootJobId(data: GetRootJobIdData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_root_job_id/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * get job logs - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.removeAnsiWarnings - * @returns string job details - * @throws ApiError - */ - public static getJobLogs(data: GetJobLogsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_logs/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - remove_ansi_warnings: data.removeAnsiWarnings - } - }); - } - - /** - * get completed job logs tail - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string completed job logs tail - * @throws ApiError - */ - public static getCompletedJobLogsTail(data: GetCompletedJobLogsTailData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_completed_logs_tail/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * get job args - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown job args - * @throws ApiError - */ - public static getJobArgs(data: GetJobArgsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_args/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * get started at by ids - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody ids - * @returns string started at by ids - * @throws ApiError - */ - public static getStartedAtByIds(data: GetStartedAtByIdsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/get_started_at_by_ids', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get job updates - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.running - * @param data.logOffset - * @param data.streamOffset - * @param data.getProgress - * @param data.noLogs - * @returns unknown job details - * @throws ApiError - */ - public static getJobUpdates(data: GetJobUpdatesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/getupdate/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - running: data.running, - log_offset: data.logOffset, - stream_offset: data.streamOffset, - get_progress: data.getProgress, - no_logs: data.noLogs - } - }); - } - - /** - * get job updates via server-sent events - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.running - * @param data.logOffset - * @param data.streamOffset - * @param data.getProgress - * @param data.onlyResult - * @param data.noLogs - * @returns string server-sent events stream of job updates - * @throws ApiError - */ - public static getJobUpdatesSse(data: GetJobUpdatesSseData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/getupdate_sse/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - running: data.running, - log_offset: data.logOffset, - stream_offset: data.streamOffset, - get_progress: data.getProgress, - only_result: data.onlyResult, - no_logs: data.noLogs - } - }); - } - - /** - * get log file from object store - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string job log - * @throws ApiError - */ - public static getLogFileFromStore(data: GetLogFileFromStoreData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_log_file/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get flow debug info - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown flow debug info details - * @throws ApiError - */ - public static getFlowDebugInfo(data: GetFlowDebugInfoData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_flow_debug_info/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * get completed job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns CompletedJob job details - * @throws ApiError - */ - public static getCompletedJob(data: GetCompletedJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * get completed job result - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.suspendedJob - * @param data.resumeId - * @param data.secret - * @param data.approver - * @returns unknown result - * @throws ApiError - */ - public static getCompletedJobResult(data: GetCompletedJobResultData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_result/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - suspended_job: data.suspendedJob, - resume_id: data.resumeId, - secret: data.secret, - approver: data.approver - } - }); - } - - /** - * get completed job result if job is completed - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.getStarted - * @returns unknown result - * @throws ApiError - */ - public static getCompletedJobResultMaybe(data: GetCompletedJobResultMaybeData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_result_maybe/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - get_started: data.getStarted - } - }); - } - - /** - * get completed job timing - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown job timing details - * @throws ApiError - */ - public static getCompletedJobTiming(data: GetCompletedJobTimingData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_timing/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * delete completed job (erase content but keep run id) - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns CompletedJob job details - * @throws ApiError - */ - public static deleteCompletedJob(data: DeleteCompletedJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/completed/delete/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * cancel queued or running job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody reason - * @returns string job canceled - * @throws ApiError - */ - public static cancelQueuedJob(data: CancelQueuedJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/cancel/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * cancel all queued jobs for persistent script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody reason - * @returns string persistent job scaled down to zero - * @throws ApiError - */ - public static cancelPersistentQueuedJobs(data: CancelPersistentQueuedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/cancel_persistent/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * force cancel queued job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody reason - * @returns string job canceled - * @throws ApiError - */ - public static forceCancelQueuedJob(data: ForceCancelQueuedJobData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/force_cancel/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get queue position for a job - * @param data The data for the request. - * @param data.workspace - * @param data.scheduledFor - * @returns unknown queue position information - * @throws ApiError - */ - public static getQueuePosition(data: GetQueuePositionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/position/{scheduled_for}', - path: { - workspace: data.workspace, - scheduled_for: data.scheduledFor - } - }); - } - - /** - * get scheduled for timestamp for a job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns number scheduled for timestamp - * @throws ApiError - */ - public static getScheduledFor(data: GetScheduledForData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/scheduled_for/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * create an HMac signature given a job id and a resume id - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.approver - * @returns string job signature - * @throws ApiError - */ - public static createJobSignature(data: CreateJobSignatureData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/job_signature/{id}/{resume_id}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId - }, - query: { - approver: data.approver - } - }); - } - - /** - * get resume urls given a job_id, resume_id and a nonce to resume a flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.approver - * @param data.flowLevel If true, generate resume URLs for the parent flow instead of the specific step. This allows pre-approvals that can be consumed by any later suspend step in the same flow. - * @returns unknown url endpoints - * @throws ApiError - */ - public static getResumeUrls(data: GetResumeUrlsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/resume_urls/{id}/{resume_id}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId - }, - query: { - approver: data.approver, - flow_level: data.flowLevel - } - }); - } - - /** - * generate interactive slack approval for suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.slackResourcePath - * @param data.channelId - * @param data.flowStepId - * @param data.approver - * @param data.message - * @param data.defaultArgsJson - * @param data.dynamicEnumsJson - * @param data.resumeButtonText - * @param data.cancelButtonText - * @returns unknown Interactive slack approval message sent successfully - * @throws ApiError - */ - public static getSlackApprovalPayload(data: GetSlackApprovalPayloadData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/slack_approval/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - approver: data.approver, - message: data.message, - slack_resource_path: data.slackResourcePath, - channel_id: data.channelId, - flow_step_id: data.flowStepId, - default_args_json: data.defaultArgsJson, - dynamic_enums_json: data.dynamicEnumsJson, - resume_button_text: data.resumeButtonText, - cancel_button_text: data.cancelButtonText - } - }); - } - - /** - * generate interactive teams approval for suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.teamName - * @param data.channelName - * @param data.flowStepId - * @param data.approver - * @param data.message - * @param data.defaultArgsJson - * @param data.dynamicEnumsJson - * @param data.resumeButtonText - * @param data.cancelButtonText - * @returns unknown Interactive slack approval message sent successfully - * @throws ApiError - */ - public static getTeamsApprovalPayload(data: GetTeamsApprovalPayloadData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/teams_approval/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - approver: data.approver, - message: data.message, - team_name: data.teamName, - channel_name: data.channelName, - flow_step_id: data.flowStepId, - default_args_json: data.defaultArgsJson, - dynamic_enums_json: data.dynamicEnumsJson, - resume_button_text: data.resumeButtonText, - cancel_button_text: data.cancelButtonText - } - }); - } - - /** - * resume a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.approver - * @returns string job resumed - * @throws ApiError - */ - public static resumeSuspendedJobGet(data: ResumeSuspendedJobGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - payload: data.payload, - approver: data.approver - } - }); - } - - /** - * resume a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.requestBody - * @param data.approver - * @returns string job resumed - * @throws ApiError - */ - public static resumeSuspendedJobPost(data: ResumeSuspendedJobPostData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * set flow user state at a given key - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.key - * @param data.requestBody new value - * @returns string flow user state updated - * @throws ApiError - */ - public static setFlowUserState(data: SetFlowUserStateData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/flow/user_states/{id}/{key}', - path: { - workspace: data.workspace, - id: data.id, - key: data.key - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get flow user state at a given key - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.key - * @returns unknown flow user state updated - * @throws ApiError - */ - public static getFlowUserState(data: GetFlowUserStateData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/flow/user_states/{id}/{key}', - path: { - workspace: data.workspace, - id: data.id, - key: data.key - } - }); - } - - /** - * resume a job for a suspended flow as an owner - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody - * @returns string job resumed - * @throws ApiError - */ - public static resumeSuspendedFlowAsOwner(data: ResumeSuspendedFlowAsOwnerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/flow/resume/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * cancel a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.approver - * @returns string job canceled - * @throws ApiError - */ - public static cancelSuspendedJobGet(data: CancelSuspendedJobGetData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - } - }); - } - - /** - * cancel a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.requestBody - * @param data.approver - * @returns string job canceled - * @throws ApiError - */ - public static cancelSuspendedJobPost(data: CancelSuspendedJobPostData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get parent flow job of suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.approver - * @returns unknown parent flow details - * @throws ApiError - */ - public static getSuspendedJobFlow(data: GetSuspendedJobFlowData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - } - }); - } - - /** - * Get intervals of job runtime concurrency - * @param data The data for the request. - * @param data.workspace - * @param data.concurrencyKey - * @param data.rowLimit - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.label filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.completedBefore filter on started before (inclusive) timestamp - * @param data.completedAfter filter on started after (exclusive) timestamp - * @param data.createdBeforeQueue filter on jobs created before X for jobs in the queue only - * @param data.createdAfterQueue filter on jobs created after X for jobs in the queue only - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.triggerKind filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns ExtendedJobs time - * @throws ApiError - */ - public static listExtendedJobs(data: ListExtendedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/concurrency_groups/list_jobs', - path: { - workspace: data.workspace - }, - query: { - concurrency_key: data.concurrencyKey, - row_limit: data.rowLimit, - created_by: data.createdBy, - label: data.label, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - completed_before: data.completedBefore, - completed_after: data.completedAfter, - created_before_queue: data.createdBeforeQueue, - created_after_queue: data.createdAfterQueue, - job_kinds: data.jobKinds, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - page: data.page, - per_page: data.perPage, - trigger_kind: data.triggerKind, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } - }); - } - -} - -export class FlowConversationService { - /** - * list flow conversations - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.flowPath filter conversations by flow path - * @returns FlowConversation flow conversations list - * @throws ApiError - */ - public static listFlowConversations(data: ListFlowConversationsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flow_conversations/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - flow_path: data.flowPath - } - }); - } - - /** - * delete flow conversation - * @param data The data for the request. - * @param data.workspace - * @param data.conversationId conversation id - * @returns string flow conversation deleted - * @throws ApiError - */ - public static deleteFlowConversation(data: DeleteFlowConversationData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/flow_conversations/delete/{conversation_id}', - path: { - workspace: data.workspace, - conversation_id: data.conversationId - } - }); - } - - /** - * list conversation messages - * @param data The data for the request. - * @param data.workspace - * @param data.conversationId conversation id - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.afterId id to fetch only the messages after that id - * @returns FlowConversationMessage conversation messages - * @throws ApiError - */ - public static listConversationMessages(data: ListConversationMessagesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flow_conversations/{conversation_id}/messages', - path: { - workspace: data.workspace, - conversation_id: data.conversationId - }, - query: { - page: data.page, - per_page: data.perPage, - after_id: data.afterId - } - }); - } - -} - -export class RawAppService { - /** - * list all raw apps - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.starredOnly (default false) - * show only the starred items - * - * @returns ListableRawApp All raw apps - * @throws ApiError - */ - public static listRawApps(data: ListRawAppsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/raw_apps/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - starred_only: data.starredOnly - } - }); - } - -} - -export class TriggerService { - /** - * resume all suspended jobs for a specific trigger - * @param data The data for the request. - * @param data.workspace - * @param data.triggerKind The kind of trigger - * @param data.triggerPath The path of the trigger (can contain forward slashes) - * @param data.requestBody Optional list of job IDs to reassign - * @returns string confirmation message - * @throws ApiError - */ - public static resumeSuspendedTriggerJobs(data: ResumeSuspendedTriggerJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/trigger/{trigger_kind}/resume_suspended_trigger_jobs/{trigger_path}', - path: { - workspace: data.workspace, - trigger_kind: data.triggerKind, - trigger_path: data.triggerPath - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * cancel all suspended jobs for a specific trigger - * @param data The data for the request. - * @param data.workspace - * @param data.triggerKind The kind of trigger - * @param data.triggerPath The path of the trigger (can contain forward slashes) - * @param data.requestBody Optional list of job IDs to cancel - * @returns string confirmation message - * @throws ApiError - */ - public static cancelSuspendedTriggerJobs(data: CancelSuspendedTriggerJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/trigger/{trigger_kind}/cancel_suspended_trigger_jobs/{trigger_path}', - path: { - workspace: data.workspace, - trigger_kind: data.triggerKind, - trigger_path: data.triggerPath - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class ScheduleService { - /** - * preview schedule - * @param data The data for the request. - * @param data.requestBody schedule - * @returns string List of 5 estimated upcoming execution events (in UTC) - * @throws ApiError - */ - public static previewSchedule(data: PreviewScheduleData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/schedules/preview', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create schedule - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new schedule - * @returns string schedule created - * @throws ApiError - */ - public static createSchedule(data: CreateScheduleData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated schedule - * @returns string schedule updated - * @throws ApiError - */ - public static updateSchedule(data: UpdateScheduleData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * set enabled schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated schedule enable - * @returns string schedule enabled set - * @throws ApiError - */ - public static setScheduleEnabled(data: SetScheduleEnabledData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string schedule deleted - * @throws ApiError - */ - public static deleteSchedule(data: DeleteScheduleData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/schedules/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns Schedule schedule deleted - * @throws ApiError - */ - public static getSchedule(data: GetScheduleData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * does schedule exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean schedule exists - * @throws ApiError - */ - public static existsSchedule(data: ExistsScheduleData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list schedules - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.path filter by path (script path) - * @param data.isFlow filter schedules by whether they target a flow - * @param data.pathStart filter schedules by path prefix - * @param data.schedulePath exact match on the schedule's path - * @param data.description pattern match filter for description field (case-insensitive) - * @param data.summary pattern match filter for summary field (case-insensitive) - * @param data.broadFilter broad search across multiple fields (case-insensitive substring match) - * @returns Schedule schedule list - * @throws ApiError - */ - public static listSchedules(data: ListSchedulesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - args: data.args, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart, - schedule_path: data.schedulePath, - description: data.description, - summary: data.summary, - broad_filter: data.broadFilter - } - }); - } - - /** - * list schedules with last 20 jobs - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ScheduleWJobs schedule list - * @throws ApiError - */ - public static listSchedulesWithJobs(data: ListSchedulesWithJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/list_with_jobs', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * Set default error or recoevery handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Handler description - * @returns unknown default error handler set - * @throws ApiError - */ - public static setDefaultErrorOrRecoveryHandler(data: SetDefaultErrorOrRecoveryHandlerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/setdefaulthandler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class OpenapiService { - /** - * generate openapi spec from http routes/webhook - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody openapi spec info and url - * @returns string openapi spec - * @throws ApiError - */ - public static generateOpenapiSpec(data: GenerateOpenapiSpecData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/openapi/generate', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Download the OpenAPI v3.1 spec as a file - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody openapi spec info and url - * @returns binary Downloaded OpenAPI spec - * @throws ApiError - */ - public static downloadOpenapiSpec(data: DownloadOpenapiSpecData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/openapi/download', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class HttpTriggerService { - /** - * create many HTTP triggers - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new http trigger - * @returns string http trigger created - * @throws ApiError - */ - public static createHttpTriggers(data: CreateHttpTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/create_many', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * create http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new http trigger - * @returns string http trigger created - * @throws ApiError - */ - public static createHttpTrigger(data: CreateHttpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string http trigger updated - * @throws ApiError - */ - public static updateHttpTrigger(data: UpdateHttpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string http trigger deleted - * @throws ApiError - */ - public static deleteHttpTrigger(data: DeleteHttpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/http_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns HttpTrigger http trigger deleted - * @throws ApiError - */ - public static getHttpTrigger(data: GetHttpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list http triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns HttpTrigger http trigger list - * @throws ApiError - */ - public static listHttpTriggers(data: ListHttpTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does http trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean http trigger exists - * @throws ApiError - */ - public static existsHttpTrigger(data: ExistsHttpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * does route exists - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody route exists request - * @returns boolean route exists - * @throws ApiError - */ - public static existsRoute(data: ExistsRouteData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/route_exists', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * enable/disable http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody - * @returns string http trigger enable/disable - * @throws ApiError - */ - public static setHttpTriggerMode(data: SetHttpTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class WebsocketTriggerService { - /** - * create websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new websocket trigger - * @returns string websocket trigger created - * @throws ApiError - */ - public static createWebsocketTrigger(data: CreateWebsocketTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string websocket trigger updated - * @throws ApiError - */ - public static updateWebsocketTrigger(data: UpdateWebsocketTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string websocket trigger deleted - * @throws ApiError - */ - public static deleteWebsocketTrigger(data: DeleteWebsocketTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/websocket_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns WebsocketTrigger websocket trigger deleted - * @throws ApiError - */ - public static getWebsocketTrigger(data: GetWebsocketTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list websocket triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns WebsocketTrigger websocket trigger list - * @throws ApiError - */ - public static listWebsocketTriggers(data: ListWebsocketTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does websocket trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean websocket trigger exists - * @throws ApiError - */ - public static existsWebsocketTrigger(data: ExistsWebsocketTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated websocket trigger enable - * @returns string websocket trigger enabled set - * @throws ApiError - */ - public static setWebsocketTriggerMode(data: SetWebsocketTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test websocket connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test websocket connection - * @returns string successfuly connected to websocket - * @throws ApiError - */ - public static testWebsocketConnection(data: TestWebsocketConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class KafkaTriggerService { - /** - * create kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new kafka trigger - * @returns string kafka trigger created - * @throws ApiError - */ - public static createKafkaTrigger(data: CreateKafkaTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string kafka trigger updated - * @throws ApiError - */ - public static updateKafkaTrigger(data: UpdateKafkaTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string kafka trigger deleted - * @throws ApiError - */ - public static deleteKafkaTrigger(data: DeleteKafkaTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/kafka_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns KafkaTrigger kafka trigger deleted - * @throws ApiError - */ - public static getKafkaTrigger(data: GetKafkaTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list kafka triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns KafkaTrigger kafka trigger list - * @throws ApiError - */ - public static listKafkaTriggers(data: ListKafkaTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does kafka trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean kafka trigger exists - * @throws ApiError - */ - public static existsKafkaTrigger(data: ExistsKafkaTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated kafka trigger enable - * @returns string kafka trigger enabled set - * @throws ApiError - */ - public static setKafkaTriggerMode(data: SetKafkaTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test kafka connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test kafka connection - * @returns string successfuly connected to kafka brokers - * @throws ApiError - */ - public static testKafkaConnection(data: TestKafkaConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * reset kafka trigger offsets to earliest - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown kafka trigger offsets reset successfully - * @throws ApiError - */ - public static resetKafkaOffsets(data: ResetKafkaOffsetsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/reset_offsets/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * commit kafka offsets for a specific trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody offsets to commit - * @returns unknown kafka offsets committed successfully - * @throws ApiError - */ - public static commitKafkaOffsets(data: CommitKafkaOffsetsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/commit_offsets/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class NatsTriggerService { - /** - * create nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new nats trigger - * @returns string nats trigger created - * @throws ApiError - */ - public static createNatsTrigger(data: CreateNatsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string nats trigger updated - * @throws ApiError - */ - public static updateNatsTrigger(data: UpdateNatsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string nats trigger deleted - * @throws ApiError - */ - public static deleteNatsTrigger(data: DeleteNatsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/nats_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns NatsTrigger nats trigger deleted - * @throws ApiError - */ - public static getNatsTrigger(data: GetNatsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list nats triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns NatsTrigger nats trigger list - * @throws ApiError - */ - public static listNatsTriggers(data: ListNatsTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does nats trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean nats trigger exists - * @throws ApiError - */ - public static existsNatsTrigger(data: ExistsNatsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated nats trigger enable - * @returns string nats trigger enabled set - * @throws ApiError - */ - public static setNatsTriggerMode(data: SetNatsTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test NATS connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test nats connection - * @returns string successfuly connected to NATS servers - * @throws ApiError - */ - public static testNatsConnection(data: TestNatsConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class SqsTriggerService { - /** - * create sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new sqs trigger - * @returns string sqs trigger created - * @throws ApiError - */ - public static createSqsTrigger(data: CreateSqsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string sqs trigger updated - * @throws ApiError - */ - public static updateSqsTrigger(data: UpdateSqsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string sqs trigger deleted - * @throws ApiError - */ - public static deleteSqsTrigger(data: DeleteSqsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/sqs_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns SqsTrigger sqs trigger deleted - * @throws ApiError - */ - public static getSqsTrigger(data: GetSqsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list sqs triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns SqsTrigger sqs trigger list - * @throws ApiError - */ - public static listSqsTriggers(data: ListSqsTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does sqs trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean sqs trigger exists - * @throws ApiError - */ - public static existsSqsTrigger(data: ExistsSqsTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated sqs trigger enable - * @returns string sqs trigger enabled set - * @throws ApiError - */ - public static setSqsTriggerMode(data: SetSqsTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test sqs connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test sqs connection - * @returns string successfuly connected to sqs - * @throws ApiError - */ - public static testSqsConnection(data: TestSqsConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class WorkspaceIntegrationService { - /** - * list available native trigger services - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceIntegrations native trigger services list - * @throws ApiError - */ - public static listNativeTriggerServices(data: ListNativeTriggerServicesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/integrations/list', - path: { - workspace: data.workspace - } - }); - } - - /** - * check if integrations for a particular service exists - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @returns boolean integration exists - * @throws ApiError - */ - public static checkIfNativeTriggersServiceExists(data: CheckIfNativeTriggersServiceExistsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/exists', - path: { - workspace: data.workspace, - service_name: data.serviceName - } - }); - } - - /** - * create native trigger service - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.requestBody new native trigger service - * @returns string native trigger service created - * @throws ApiError - */ - public static createNativeTriggerService(data: CreateNativeTriggerServiceData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/create', - path: { - workspace: data.workspace, - service_name: data.serviceName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * generate connect url for native trigger service - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.requestBody redirect_uri - * @returns string native trigger service connect url - * @throws ApiError - */ - public static generateNativeTriggerServiceConnectUrl(data: GenerateNativeTriggerServiceConnectUrlData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/generate_connect_url', - path: { - workspace: data.workspace, - service_name: data.serviceName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * check if instance-level credential sharing is available for a service - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @returns boolean whether instance sharing is available - * @throws ApiError - */ - public static checkInstanceSharingAvailable(data: CheckInstanceSharingAvailableData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/instance_sharing_available', - path: { - workspace: data.workspace, - service_name: data.serviceName - } - }); - } - - /** - * generate connect url using instance-level credentials - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.requestBody redirect_uri - * @returns string authorization URL using instance credentials - * @throws ApiError - */ - public static generateInstanceConnectUrl(data: GenerateInstanceConnectUrlData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/generate_instance_connect_url', - path: { - workspace: data.workspace, - service_name: data.serviceName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete native trigger service - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @returns string native trigger service deleted - * @throws ApiError - */ - public static deleteNativeTriggerService(data: DeleteNativeTriggerServiceData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/delete', - path: { - workspace: data.workspace, - service_name: data.serviceName - } - }); - } - - /** - * native trigger service oauth callback - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.requestBody OAuth callback data - * @returns string native trigger service oauth completed - * @throws ApiError - */ - public static nativeTriggerServiceCallback(data: NativeTriggerServiceCallbackData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/integrations/{service_name}/callback', - path: { - workspace: data.workspace, - service_name: data.serviceName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class NativeTriggerService { - /** - * create native trigger - * Creates a new native trigger for the specified service. - * Requires write access to the script or flow that the trigger will be associated with. - * - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.requestBody new native trigger configuration - * @returns CreateTriggerResponse native trigger created - * @throws ApiError - */ - public static createNativeTrigger(data: CreateNativeTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/{service_name}/create', - path: { - workspace: data.workspace, - service_name: data.serviceName - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update native trigger - * Updates an existing native trigger. - * Requires write access to the script or flow that the trigger is associated with. - * - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.externalId The external ID of the trigger from the external service - * @param data.requestBody updated native trigger configuration - * @returns string native trigger updated - * @throws ApiError - */ - public static updateNativeTrigger(data: UpdateNativeTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/{service_name}/update/{external_id}', - path: { - workspace: data.workspace, - service_name: data.serviceName, - external_id: data.externalId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get native trigger - * Retrieves a native trigger by its external ID. - * Requires write access to the script or flow that the trigger is associated with. - * - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.externalId The external ID of the trigger from the external service - * @returns NativeTriggerWithExternal native trigger with external configuration - * @throws ApiError - */ - public static getNativeTrigger(data: GetNativeTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/{service_name}/get/{external_id}', - path: { - workspace: data.workspace, - service_name: data.serviceName, - external_id: data.externalId - } - }); - } - - /** - * delete native trigger - * Deletes a native trigger by its external ID. - * Requires write access to the script or flow that the trigger is associated with. - * - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.externalId The external ID of the trigger from the external service - * @returns string native trigger deleted - * @throws ApiError - */ - public static deleteNativeTrigger(data: DeleteNativeTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/native_triggers/{service_name}/delete/{external_id}', - path: { - workspace: data.workspace, - service_name: data.serviceName, - external_id: data.externalId - } - }); - } - - /** - * list native triggers - * Lists all native triggers for the specified service in the workspace. - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by script path - * @param data.isFlow filter by is_flow - * @returns NativeTrigger native triggers list - * @throws ApiError - */ - public static listNativeTriggers(data: ListNativeTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/{service_name}/list', - path: { - workspace: data.workspace, - service_name: data.serviceName - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow - } - }); - } - - /** - * check if native trigger exists - * Checks if a native trigger with the given external ID exists. - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @param data.externalId The external ID of the trigger from the external service - * @returns boolean whether the native trigger exists - * @throws ApiError - */ - public static existsNativeTrigger(data: ExistsNativeTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/{service_name}/exists/{external_id}', - path: { - workspace: data.workspace, - service_name: data.serviceName, - external_id: data.externalId - } - }); - } - - /** - * sync native triggers with external service - * @param data The data for the request. - * @param data.workspace - * @param data.serviceName - * @returns unknown sync completed successfully - * @throws ApiError - */ - public static syncNativeTriggers(data: SyncNativeTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/native_triggers/{service_name}/sync', - path: { - workspace: data.workspace, - service_name: data.serviceName - } - }); - } - - /** - * list available NextCloud events - * @param data The data for the request. - * @param data.workspace - * @returns NextCloudEventType list of available NextCloud events - * @throws ApiError - */ - public static listNextCloudEvents(data: ListNextCloudEventsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/nextcloud/events', - path: { - workspace: data.workspace - } - }); - } - - /** - * list Google Calendars for the authenticated user - * @param data The data for the request. - * @param data.workspace - * @returns GoogleCalendarEntry list of Google Calendars - * @throws ApiError - */ - public static listGoogleCalendars(data: ListGoogleCalendarsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/google/calendars', - path: { - workspace: data.workspace - } - }); - } - - /** - * list or search Google Drive files - * @param data The data for the request. - * @param data.workspace - * @param data.q search query to filter files by name - * @param data.parentId folder ID to list children of - * @param data.pageToken token for next page of results - * @param data.sharedWithMe if true, list files shared with the user - * @returns GoogleDriveFilesResponse list of Google Drive files - * @throws ApiError - */ - public static listGoogleDriveFiles(data: ListGoogleDriveFilesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/google/drive/files', - path: { - workspace: data.workspace - }, - query: { - q: data.q, - parent_id: data.parentId, - page_token: data.pageToken, - shared_with_me: data.sharedWithMe - } - }); - } - - /** - * list shared drives accessible to the user - * @param data The data for the request. - * @param data.workspace - * @returns SharedDriveEntry list of shared drives - * @throws ApiError - */ - public static listGoogleSharedDrives(data: ListGoogleSharedDrivesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/native_triggers/google/drive/shared_drives', - path: { - workspace: data.workspace - } - }); - } - - /** - * receive webhook from external native trigger service - * @param data The data for the request. - * @param data.serviceName - * @param data.workspaceId - * @param data.internalId The internal database ID of the trigger - * @param data.requestBody webhook payload from external service - * @returns string webhook received successfully - * @throws ApiError - */ - public static nativeTriggerWebhook(data: NativeTriggerWebhookData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/native_triggers/{service_name}/w/{workspace_id}/webhook/{internal_id}', - path: { - service_name: data.serviceName, - workspace_id: data.workspaceId, - internal_id: data.internalId - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class MqttTriggerService { - /** - * create mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new mqtt trigger - * @returns string mqtt trigger created - * @throws ApiError - */ - public static createMqttTrigger(data: CreateMqttTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string mqtt trigger updated - * @throws ApiError - */ - public static updateMqttTrigger(data: UpdateMqttTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string mqtt trigger deleted - * @throws ApiError - */ - public static deleteMqttTrigger(data: DeleteMqttTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/mqtt_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns MqttTrigger mqtt trigger deleted - * @throws ApiError - */ - public static getMqttTrigger(data: GetMqttTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list mqtt triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns MqttTrigger mqtt trigger list - * @throws ApiError - */ - public static listMqttTriggers(data: ListMqttTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does mqtt trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean mqtt trigger exists - * @throws ApiError - */ - public static existsMqttTrigger(data: ExistsMqttTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated mqtt trigger enable - * @returns string mqtt trigger enabled set - * @throws ApiError - */ - public static setMqttTriggerMode(data: SetMqttTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test mqtt connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test mqtt connection - * @returns string successfully connected to mqtt - * @throws ApiError - */ - public static testMqttConnection(data: TestMqttConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class GcpTriggerService { - /** - * create gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new gcp trigger - * @returns string gcp trigger created - * @throws ApiError - */ - public static createGcpTrigger(data: CreateGcpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string gcp trigger updated - * @throws ApiError - */ - public static updateGcpTrigger(data: UpdateGcpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string gcp trigger deleted - * @throws ApiError - */ - public static deleteGcpTrigger(data: DeleteGcpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/gcp_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns GcpTrigger gcp trigger deleted - * @throws ApiError - */ - public static getGcpTrigger(data: GetGcpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list gcp triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns GcpTrigger gcp trigger list - * @throws ApiError - */ - public static listGcpTriggers(data: ListGcpTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does gcp trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean gcp trigger exists - * @throws ApiError - */ - public static existsGcpTrigger(data: ExistsGcpTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated gcp trigger enable - * @returns string gcp trigger enabled set - * @throws ApiError - */ - public static setGcpTriggerMode(data: SetGcpTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test gcp connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test gcp connection - * @returns string try to connect to a gcp broker - * @throws ApiError - */ - public static testGcpConnection(data: TestGcpConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody args to delete subscription from google cloud - * @returns string gcp trigger deleted - * @throws ApiError - */ - public static deleteGcpSubscription(data: DeleteGcpSubscriptionData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/gcp_triggers/subscriptions/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list all topics of google cloud service - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string get all google topics - * @throws ApiError - */ - public static listGoogleTopics(data: ListGoogleTopicsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/topics/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list all subscription of a give topic from google cloud service - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody args to get subscription's topic from google cloud - * @returns string get all google topic subscriptions name - * @throws ApiError - */ - public static listAllTgoogleTopicSubscriptions(data: ListAllTgoogleTopicSubscriptionsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/subscriptions/list/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class PostgresTriggerService { - /** - * get postgres version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string postgres version - * @throws ApiError - */ - public static getPostgresVersion(data: GetPostgresVersionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/postgres/version/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * check if postgres configuration is set to logical - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean boolean that indicates if postgres is set to logical level or not - * @throws ApiError - */ - public static isValidPostgresConfiguration(data: IsValidPostgresConfigurationData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/is_valid_postgres_configuration/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * create template script - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody template script - * @returns string custom id to retrieve template script - * @throws ApiError - */ - public static createTemplateScript(data: CreateTemplateScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/create_template_script', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get template script - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string template script - * @throws ApiError - */ - public static getTemplateScript(data: GetTemplateScriptData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/get_template_script/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * list postgres replication slot - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns SlotList list postgres slot - * @throws ApiError - */ - public static listPostgresReplicationSlot(data: ListPostgresReplicationSlotData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/slot/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * create replication slot for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody new slot for postgres - * @returns string slot created - * @throws ApiError - */ - public static createPostgresReplicationSlot(data: CreatePostgresReplicationSlotData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/slot/create/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete postgres replication slot - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody replication slot of postgres - * @returns string postgres replication slot deleted - * @throws ApiError - */ - public static deletePostgresReplicationSlot(data: DeletePostgresReplicationSlotData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/slot/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string database publication list - * @throws ApiError - */ - public static listPostgresPublication(data: ListPostgresPublicationData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/publication/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication The name of the publication - * @returns PublicationData postgres publication get - * @throws ApiError - */ - public static getPostgresPublication(data: GetPostgresPublicationData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/publication/get/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - } - }); - } - - /** - * create publication for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication The name of the publication - * @param data.requestBody new publication for postgres - * @returns string publication created - * @throws ApiError - */ - public static createPostgresPublication(data: CreatePostgresPublicationData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/publication/create/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update publication for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication The name of the publication - * @param data.requestBody update publication for postgres - * @returns string publication updated - * @throws ApiError - */ - public static updatePostgresPublication(data: UpdatePostgresPublicationData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/publication/update/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication The name of the publication - * @returns string postgres publication deleted - * @throws ApiError - */ - public static deletePostgresPublication(data: DeletePostgresPublicationData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/publication/delete/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - } - }); - } - - /** - * create postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new postgres trigger - * @returns string postgres trigger created - * @throws ApiError - */ - public static createPostgresTrigger(data: CreatePostgresTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string postgres trigger updated - * @throws ApiError - */ - public static updatePostgresTrigger(data: UpdatePostgresTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string postgres trigger deleted - * @throws ApiError - */ - public static deletePostgresTrigger(data: DeletePostgresTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns PostgresTrigger get postgres trigger - * @throws ApiError - */ - public static getPostgresTrigger(data: GetPostgresTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list postgres triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns PostgresTrigger postgres trigger list - * @throws ApiError - */ - public static listPostgresTriggers(data: ListPostgresTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does postgres trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean postgres trigger exists - * @throws ApiError - */ - public static existsPostgresTrigger(data: ExistsPostgresTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * set enabled postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated postgres trigger enable - * @returns string postgres trigger enabled set - * @throws ApiError - */ - public static setPostgresTriggerMode(data: SetPostgresTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * test postgres connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test postgres connection - * @returns string successfuly connected to postgres - * @throws ApiError - */ - public static testPostgresConnection(data: TestPostgresConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class EmailTriggerService { - /** - * create email trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new email trigger - * @returns string email trigger created - * @throws ApiError - */ - public static createEmailTrigger(data: CreateEmailTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/email_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update email trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string email trigger updated - * @throws ApiError - */ - public static updateEmailTrigger(data: UpdateEmailTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/email_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete email trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string email trigger deleted - * @throws ApiError - */ - public static deleteEmailTrigger(data: DeleteEmailTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/email_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * get email trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns EmailTrigger email trigger retrieved - * @throws ApiError - */ - public static getEmailTrigger(data: GetEmailTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/email_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * list email triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns EmailTrigger email trigger list - * @throws ApiError - */ - public static listEmailTriggers(data: ListEmailTriggersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/email_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } - }); - } - - /** - * does email trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean email trigger exists - * @throws ApiError - */ - public static existsEmailTrigger(data: ExistsEmailTriggerData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/email_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } - }); - } - - /** - * does email local part exists - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody email local part exists request - * @returns boolean email local part exists - * @throws ApiError - */ - public static existsEmailLocalPart(data: ExistsEmailLocalPartData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/email_triggers/local_part_exists', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * enable/disable email trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody - * @returns string email trigger enable/disable - * @throws ApiError - */ - public static setEmailTriggerMode(data: SetEmailTriggerModeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/email_triggers/setmode/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class GroupService { - /** - * list instance groups - * @returns InstanceGroup instance group list - * @throws ApiError - */ - public static listInstanceGroups(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/groups/list' - }); - } - - /** - * list instance groups with workspace information - * @returns InstanceGroupWithWorkspaces instance group list with workspaces - * @throws ApiError - */ - public static listInstanceGroupsWithWorkspaces(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/groups/list_with_workspaces' - }); - } - - /** - * get instance group - * @param data The data for the request. - * @param data.name - * @returns InstanceGroupWithWorkspaces instance group - * @throws ApiError - */ - public static getInstanceGroup(data: GetInstanceGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/groups/get/{name}', - path: { - name: data.name - } - }); - } - - /** - * create instance group - * @param data The data for the request. - * @param data.requestBody create instance group - * @returns string instance group created - * @throws ApiError - */ - public static createInstanceGroup(data: CreateInstanceGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/groups/create', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody update instance group - * @returns string instance group updated - * @throws ApiError - */ - public static updateInstanceGroup(data: UpdateInstanceGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/groups/update/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete instance group - * @param data The data for the request. - * @param data.name - * @returns string instance group deleted - * @throws ApiError - */ - public static deleteInstanceGroup(data: DeleteInstanceGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/groups/delete/{name}', - path: { - name: data.name - } - }); - } - - /** - * add user to instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody user to add to instance group - * @returns string user added to instance group - * @throws ApiError - */ - public static addUserToInstanceGroup(data: AddUserToInstanceGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/groups/adduser/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * remove user from instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody user to remove from instance group - * @returns string user removed from instance group - * @throws ApiError - */ - public static removeUserFromInstanceGroup(data: RemoveUserFromInstanceGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/groups/removeuser/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * export instance groups - * @returns ExportedInstanceGroup exported instance groups - * @throws ApiError - */ - public static exportInstanceGroups(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/groups/export' - }); - } - - /** - * overwrite instance groups - * @param data The data for the request. - * @param data.requestBody overwrite instance groups - * @returns string success message - * @throws ApiError - */ - public static overwriteInstanceGroups(data: OverwriteInstanceGroupsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/groups/overwrite', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list groups - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Group group list - * @throws ApiError - */ - public static listGroups(data: ListGroupsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * list group names - * @param data The data for the request. - * @param data.workspace - * @param data.onlyMemberOf only list the groups the user is member of (default false) - * @returns string group list - * @throws ApiError - */ - public static listGroupNames(data: ListGroupNamesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/listnames', - path: { - workspace: data.workspace - }, - query: { - only_member_of: data.onlyMemberOf - } - }); - } - - /** - * create group - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody create group - * @returns string group created - * @throws ApiError - */ - public static createGroup(data: CreateGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody updated group - * @returns string group updated - * @throws ApiError - */ - public static updateGroup(data: UpdateGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/update/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string group deleted - * @throws ApiError - */ - public static deleteGroup(data: DeleteGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/groups/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * get group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns Group group - * @throws ApiError - */ - public static getGroup(data: GetGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/get/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * add user to group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added user to group - * @returns string user added to group - * @throws ApiError - */ - public static addUserToGroup(data: AddUserToGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/adduser/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * remove user to group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added user to group - * @returns string user removed from group - * @throws ApiError - */ - public static removeUserToGroup(data: RemoveUserToGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/removeuser/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get group permission history - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns unknown group permission history - * @throws ApiError - */ - public static getGroupPermissionHistory(data: GetGroupPermissionHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups_history/get/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - -} - -export class FolderService { - /** - * list folders - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Folder folder list - * @throws ApiError - */ - public static listFolders(data: ListFoldersData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * list folder names - * @param data The data for the request. - * @param data.workspace - * @param data.onlyMemberOf only list the folders the user is member of (default false) - * @returns string folder list - * @throws ApiError - */ - public static listFolderNames(data: ListFolderNamesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/listnames', - path: { - workspace: data.workspace - }, - query: { - only_member_of: data.onlyMemberOf - } - }); - } - - /** - * create folder - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody create folder - * @returns string folder created - * @throws ApiError - */ - public static createFolder(data: CreateFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * update folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody update folder - * @returns string folder updated - * @throws ApiError - */ - public static updateFolder(data: UpdateFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/update/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * delete folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string folder deleted - * @throws ApiError - */ - public static deleteFolder(data: DeleteFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/folders/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * get folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns Folder folder - * @throws ApiError - */ - public static getFolder(data: GetFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/get/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * exists folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns boolean folder exists - * @throws ApiError - */ - public static existsFolder(data: ExistsFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/exists/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * get folder usage - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns unknown folder - * @throws ApiError - */ - public static getFolderUsage(data: GetFolderUsageData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/getusage/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - - /** - * add owner to folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody owner user to folder - * @returns string owner added to folder - * @throws ApiError - */ - public static addOwnerToFolder(data: AddOwnerToFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/addowner/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * remove owner to folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added owner to folder - * @returns string owner removed from folder - * @throws ApiError - */ - public static removeOwnerToFolder(data: RemoveOwnerToFolderData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/removeowner/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get folder permission history - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns unknown folder permission history - * @throws ApiError - */ - public static getFolderPermissionHistory(data: GetFolderPermissionHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders_history/get/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - -} - -export class ConfigService { - /** - * list worker groups - * @returns unknown a list of worker group configs - * @throws ApiError - */ - public static listWorkerGroups(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_worker_groups' - }); - } - - /** - * get config - * @param data The data for the request. - * @param data.name - * @returns Configs a config - * @throws ApiError - */ - public static getConfig(data: GetConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/configs/get/{name}', - path: { - name: data.name - } - }); - } - - /** - * Update config - * @param data The data for the request. - * @param data.name - * @param data.requestBody worker group - * @returns string Update a worker group - * @throws ApiError - */ - public static updateConfig(data: UpdateConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/configs/update/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Delete Config - * @param data The data for the request. - * @param data.name - * @returns string Delete config - * @throws ApiError - */ - public static deleteConfig(data: DeleteConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/configs/update/{name}', - path: { - name: data.name - } - }); - } - - /** - * list configs - * @returns Config list of configs - * @throws ApiError - */ - public static listConfigs(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/configs/list' - }); - } - - /** - * List autoscaling events - * @param data The data for the request. - * @param data.workerGroup - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns AutoscalingEvent List of autoscaling events - * @throws ApiError - */ - public static listAutoscalingEvents(data: ListAutoscalingEventsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_autoscaling_events/{worker_group}', - path: { - worker_group: data.workerGroup - }, - query: { - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * Check Kubernetes autoscaling health for a worker group - * @returns unknown Kubernetes autoscaling is healthy - * @throws ApiError - */ - public static nativeKubernetesAutoscalingHealthcheck(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/configs/native_kubernetes_autoscaling_healthcheck', - errors: { - 400: 'Error' - } - }); - } - - /** - * Get currently available python versions provided by UV. - * @returns string List of python versions - * @throws ApiError - */ - public static listAvailablePythonVersions(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_available_python_versions' - }); - } - -} - -export class AgentWorkersService { - /** - * create agent token - * @param data The data for the request. - * @param data.requestBody agent token - * @returns string agent token created - * @throws ApiError - */ - public static createAgentToken(data: CreateAgentTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/agent_workers/create_agent_token', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * blacklist agent token (requires super admin) - * @param data The data for the request. - * @param data.requestBody token to blacklist - * @returns unknown token blacklisted successfully - * @throws ApiError - */ - public static blacklistAgentToken(data: BlacklistAgentTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/agent_workers/blacklist_token', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * remove agent token from blacklist (requires super admin) - * @param data The data for the request. - * @param data.requestBody token to remove from blacklist - * @returns unknown token removed from blacklist successfully - * @throws ApiError - */ - public static removeBlacklistAgentToken(data: RemoveBlacklistAgentTokenData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/agent_workers/remove_blacklist_token', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * list blacklisted agent tokens (requires super admin) - * @param data The data for the request. - * @param data.includeExpired Whether to include expired blacklisted tokens - * @returns unknown list of blacklisted tokens - * @throws ApiError - */ - public static listBlacklistedAgentTokens(data: ListBlacklistedAgentTokensData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/agent_workers/list_blacklisted_tokens', - query: { - include_expired: data.includeExpired - } - }); - } - - /** - * get minimum worker version across all workers - * @returns string minimum worker version - * @throws ApiError - */ - public static getMinVersion(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/agent_workers/get_min_version' - }); - } - -} - -export class GranularAclService { - /** - * get granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @returns boolean acls - * @throws ApiError - */ - public static getGranularAcls(data: GetGranularAclsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/acls/get/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - } - }); - } - - /** - * add granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @param data.requestBody acl to add - * @returns string granular acl added - * @throws ApiError - */ - public static addGranularAcls(data: AddGranularAclsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/acls/add/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * remove granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @param data.requestBody acl to add - * @returns string granular acl removed - * @throws ApiError - */ - public static removeGranularAcls(data: RemoveGranularAclsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/acls/remove/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class CaptureService { - /** - * set capture config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody capture config - * @returns unknown capture config set - * @throws ApiError - */ - public static setCaptureConfig(data: SetCaptureConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/set_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * ping capture config - * @param data The data for the request. - * @param data.workspace - * @param data.triggerKind - * @param data.runnableKind - * @param data.path - * @returns unknown capture config pinged - * @throws ApiError - */ - public static pingCaptureConfig(data: PingCaptureConfigData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/ping_config/{trigger_kind}/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - trigger_kind: data.triggerKind, - runnable_kind: data.runnableKind, - path: data.path - } - }); - } - - /** - * get capture configs for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns CaptureConfig capture configs for a script or flow - * @throws ApiError - */ - public static getCaptureConfigs(data: GetCaptureConfigsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/get_configs/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } - }); - } - - /** - * list captures for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.triggerKind - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Capture list of captures for a script or flow - * @throws ApiError - */ - public static listCaptures(data: ListCapturesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/list/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - query: { - trigger_kind: data.triggerKind, - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * move captures and configs for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.requestBody move captures and configs to a new path - * @returns string captures and configs moved - * @throws ApiError - */ - public static moveCapturesAndConfigs(data: MoveCapturesAndConfigsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/move/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get a capture - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns Capture capture - * @throws ApiError - */ - public static getCapture(data: GetCaptureData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - - /** - * delete a capture - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown capture deleted - * @throws ApiError - */ - public static deleteCapture(data: DeleteCaptureData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/capture/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - -} - -export class FavoriteService { - /** - * star item - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown star item - * @throws ApiError - */ - public static star(data: StarData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/favorites/star', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * unstar item - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown unstar item - * @throws ApiError - */ - public static unstar(data: UnstarData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/favorites/unstar', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - -} - -export class InputService { - /** - * List Inputs used in previously completed jobs - * @param data The data for the request. - * @param data.workspace - * @param data.runnableId - * @param data.runnableType - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.includePreview - * @returns Input Input history for completed jobs - * @throws ApiError - */ - public static getInputHistory(data: GetInputHistoryData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/history', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType, - page: data.page, - per_page: data.perPage, - args: data.args, - include_preview: data.includePreview - } - }); - } - - /** - * Get args from history or saved input - * @param data The data for the request. - * @param data.workspace - * @param data.jobOrInputId - * @param data.input - * @param data.allowLarge - * @returns unknown args - * @throws ApiError - */ - public static getArgsFromHistoryOrSavedInput(data: GetArgsFromHistoryOrSavedInputData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/{jobOrInputId}/args', - path: { - workspace: data.workspace, - jobOrInputId: data.jobOrInputId - }, - query: { - input: data.input, - allow_large: data.allowLarge - } - }); - } - - /** - * List saved Inputs for a Runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableId - * @param data.runnableType - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Input Saved Inputs for a Runnable - * @throws ApiError - */ - public static listInputs(data: ListInputsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/list', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType, - page: data.page, - per_page: data.perPage - } - }); - } - - /** - * Create an Input for future use in a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Input - * @param data.runnableId - * @param data.runnableType - * @returns string Input created - * @throws ApiError - */ - public static createInput(data: CreateInputData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/create', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Update an Input - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody UpdateInput - * @returns string Input updated - * @throws ApiError - */ - public static updateInput(data: UpdateInputData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/update', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Delete a Saved Input - * @param data The data for the request. - * @param data.workspace - * @param data.input - * @returns string Input deleted - * @throws ApiError - */ - public static deleteInput(data: DeleteInputData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/delete/{input}', - path: { - workspace: data.workspace, - input: data.input - } - }); - } - -} - -export class HelpersService { - /** - * Converts an S3 resource to the set of instructions necessary to connect DuckDB to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource to connect to - * @returns unknown Connection settings - * @throws ApiError - */ - public static duckdbConnectionSettings(data: DuckdbConnectionSettingsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/duckdb_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Converts an S3 resource to the set of instructions necessary to connect DuckDB to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used - * @returns unknown Connection settings - * @throws ApiError - */ - public static duckdbConnectionSettingsV2(data: DuckdbConnectionSettingsV2Data): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/duckdb_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Converts an S3 resource to the set of arguments necessary to connect Polars to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource to connect to - * @returns unknown Connection settings - * @throws ApiError - */ - public static polarsConnectionSettings(data: PolarsConnectionSettingsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/polars_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Converts an S3 resource to the set of arguments necessary to connect Polars to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used - * @returns unknown Connection settings - * @throws ApiError - */ - public static polarsConnectionSettingsV2(data: PolarsConnectionSettingsV2Data): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/polars_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Returns the s3 resource associated to the provided path, or the workspace default S3 resource - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use. If empty, the S3 resource defined in the workspace settings will be used - * @returns S3Resource Connection settings - * @throws ApiError - */ - public static s3ResourceInfo(data: S3ResourceInfoData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/s3_resource_info', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Test connection to the workspace object storage - * @param data The data for the request. - * @param data.workspace - * @param data.storage - * @returns unknown Connection settings - * @throws ApiError - */ - public static datasetStorageTestConnection(data: DatasetStorageTestConnectionData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/test_connection', - path: { - workspace: data.workspace - }, - query: { - storage: data.storage - } - }); - } - - /** - * List the file keys available in a workspace object storage - * @param data The data for the request. - * @param data.workspace - * @param data.maxKeys - * @param data.marker - * @param data.prefix - * @param data.storage - * @returns unknown List of file keys - * @throws ApiError - */ - public static listStoredFiles(data: ListStoredFilesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/list_stored_files', - path: { - workspace: data.workspace - }, - query: { - max_keys: data.maxKeys, - marker: data.marker, - prefix: data.prefix, - storage: data.storage - } - }); - } - - /** - * Load metadata of the file - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns WindmillFileMetadata FileMetadata - * @throws ApiError - */ - public static loadFileMetadata(data: LoadFileMetadataData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_file_metadata', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } - }); - } - - /** - * Load a preview of the file - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.fileSizeInBytes - * @param data.fileMimeType - * @param data.csvSeparator - * @param data.csvHasHeader - * @param data.readBytesFrom - * @param data.readBytesLength - * @param data.storage - * @returns WindmillFilePreview FilePreview - * @throws ApiError - */ - public static loadFilePreview(data: LoadFilePreviewData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_file_preview', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_size_in_bytes: data.fileSizeInBytes, - file_mime_type: data.fileMimeType, - csv_separator: data.csvSeparator, - csv_has_header: data.csvHasHeader, - read_bytes_from: data.readBytesFrom, - read_bytes_length: data.readBytesLength, - storage: data.storage - } - }); - } - - /** - * List the file keys available in instance object storage with resource-based access control - * @param data The data for the request. - * @param data.workspace - * @param data.maxKeys - * @param data.marker - * @param data.prefix - * @param data.storage - * @returns unknown List of file keys - * @throws ApiError - */ - public static listGitRepoFiles(data: ListGitRepoFilesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/list_git_repo_files', - path: { - workspace: data.workspace - }, - query: { - max_keys: data.maxKeys, - marker: data.marker, - prefix: data.prefix, - storage: data.storage - } - }); - } - - /** - * Load a preview of a file from instance storage with resource-based access control - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.fileSizeInBytes - * @param data.fileMimeType - * @param data.csvSeparator - * @param data.csvHasHeader - * @param data.readBytesFrom - * @param data.readBytesLength - * @param data.storage - * @returns WindmillFilePreview FilePreview - * @throws ApiError - */ - public static loadGitRepoFilePreview(data: LoadGitRepoFilePreviewData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_git_repo_file_preview', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_size_in_bytes: data.fileSizeInBytes, - file_mime_type: data.fileMimeType, - csv_separator: data.csvSeparator, - csv_has_header: data.csvHasHeader, - read_bytes_from: data.readBytesFrom, - read_bytes_length: data.readBytesLength, - storage: data.storage - } - }); - } - - /** - * Load file metadata from instance storage with resource-based access control - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns WindmillFileMetadata FileMetadata - * @throws ApiError - */ - public static loadGitRepoFileMetadata(data: LoadGitRepoFileMetadataData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_git_repo_file_metadata', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } - }); - } - - /** - * Check if S3 path exists and is a folder - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey S3 file key to check (e.g., gitrepos/{workspace_id}/u/user/resource/{commit_hash}) - * @returns unknown S3 folder existence check result - * @throws ApiError - */ - public static checkS3FolderExists(data: CheckS3FolderExistsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/check_s3_folder_exists', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey - } - }); - } - - /** - * Load a preview of a parquet file - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.offset - * @param data.limit - * @param data.sortCol - * @param data.sortDesc - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @returns unknown Parquet Preview - * @throws ApiError - */ - public static loadParquetPreview(data: LoadParquetPreviewData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_parquet_preview/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - offset: data.offset, - limit: data.limit, - sort_col: data.sortCol, - sort_desc: data.sortDesc, - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage - } - }); - } - - /** - * Load the table row count - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @returns unknown Table count - * @throws ApiError - */ - public static loadTableRowCount(data: LoadTableRowCountData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_table_count/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage - } - }); - } - - /** - * Load a preview of a csv file - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.offset - * @param data.limit - * @param data.sortCol - * @param data.sortDesc - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @param data.csvSeparator - * @returns unknown Csv Preview - * @throws ApiError - */ - public static loadCsvPreview(data: LoadCsvPreviewData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_csv_preview/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - offset: data.offset, - limit: data.limit, - sort_col: data.sortCol, - sort_desc: data.sortDesc, - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage, - csv_separator: data.csvSeparator - } - }); - } - - /** - * Permanently delete file from S3 - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns unknown Confirmation - * @throws ApiError - */ - public static deleteS3File(data: DeleteS3FileData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/job_helpers/delete_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } - }); - } - - /** - * Move a S3 file from one path to the other within the same bucket - * @param data The data for the request. - * @param data.workspace - * @param data.srcFileKey - * @param data.destFileKey - * @param data.storage - * @returns unknown Confirmation - * @throws ApiError - */ - public static moveS3File(data: MoveS3FileData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/move_s3_file', - path: { - workspace: data.workspace - }, - query: { - src_file_key: data.srcFileKey, - dest_file_key: data.destFileKey, - storage: data.storage - } - }); - } - - /** - * Upload file to S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown File upload status - * @throws ApiError - */ - public static fileUpload(data: FileUploadData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/upload_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' - }); - } - - /** - * Upload a file to the instance storage gitrepos section for viewing - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown File upload status - * @throws ApiError - */ - public static gitRepoViewerFileUpload(data: GitRepoViewerFileUploadData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/upload_git_repo_file_to_instance_storage', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' - }); - } - - /** - * Download file from S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @returns binary Chunk of the downloaded file - * @throws ApiError - */ - public static fileDownload(data: FileDownloadData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/download_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage - } - }); - } - - /** - * Download file to S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.s3ResourcePath - * @param data.resourceType - * @returns string The downloaded file - * @throws ApiError - */ - public static fileDownloadParquetAsCsv(data: FileDownloadParquetAsCsvData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/download_s3_parquet_file_as_csv', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType - } - }); - } - -} - -export class MetricsService { - /** - * get job metrics - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody parameters for statistics retrieval - * @returns unknown job details - * @throws ApiError - */ - public static getJobMetrics(data: GetJobMetricsData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_metrics/get/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * set job metrics - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody parameters for statistics retrieval - * @returns unknown Job progress updated - * @throws ApiError - */ - public static setJobProgress(data: SetJobProgressData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_metrics/set_progress/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * get job progress - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns number job progress between 0 and 99 - * @throws ApiError - */ - public static getJobProgress(data: GetJobProgressData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_metrics/get_progress/{id}', - path: { - workspace: data.workspace, - id: data.id - } - }); - } - -} - -export class ServiceLogsService { - /** - * list log files ordered by timestamp - * @param data The data for the request. - * @param data.before filter on started before (inclusive) timestamp - * @param data.after filter on created after (exclusive) timestamp - * @param data.withError - * @returns unknown time - * @throws ApiError - */ - public static listLogFiles(data: ListLogFilesData = {}): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/service_logs/list_files', - query: { - before: data.before, - after: data.after, - with_error: data.withError - } - }); - } - - /** - * get log file by path - * @param data The data for the request. - * @param data.path - * @returns string log stream - * @throws ApiError - */ - public static getLogFile(data: GetLogFileData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/service_logs/get_log_file/{path}', - path: { - path: data.path - } - }); - } - -} - -export class ConcurrencyGroupsService { - /** - * List all concurrency groups - * @returns ConcurrencyGroup all concurrency groups - * @throws ApiError - */ - public static listConcurrencyGroups(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/concurrency_groups/list' - }); - } - - /** - * Delete concurrency group - * @param data The data for the request. - * @param data.concurrencyId - * @returns unknown concurrency group removed - * @throws ApiError - */ - public static deleteConcurrencyGroup(data: DeleteConcurrencyGroupData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/concurrency_groups/prune/{concurrency_id}', - path: { - concurrency_id: data.concurrencyId - } - }); - } - - /** - * Get the concurrency key for a job that has concurrency limits enabled - * @param data The data for the request. - * @param data.id - * @returns string concurrency key for given job - * @throws ApiError - */ - public static getConcurrencyKey(data: GetConcurrencyKeyData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/concurrency_groups/{id}/key', - path: { - id: data.id - } - }); - } - - /** - * Get intervals of job runtime concurrency - * @param data The data for the request. - * @param data.workspace - * @param data.concurrencyKey - * @param data.rowLimit - * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - * @param data.label filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - * @param data.scriptPathStart filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.completedBefore filter on started before (inclusive) timestamp - * @param data.completedAfter filter on started after (exclusive) timestamp - * @param data.createdBeforeQueue filter on jobs created before X for jobs in the queue only - * @param data.createdAfterQueue filter on jobs created after X for jobs in the queue only - * @param data.jobKinds filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.triggerKind filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns ExtendedJobs time - * @throws ApiError - */ - public static listExtendedJobs(data: ListExtendedJobsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/concurrency_groups/list_jobs', - path: { - workspace: data.workspace - }, - query: { - concurrency_key: data.concurrencyKey, - row_limit: data.rowLimit, - created_by: data.createdBy, - label: data.label, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - completed_before: data.completedBefore, - completed_after: data.completedAfter, - created_before_queue: data.createdBeforeQueue, - created_after_queue: data.createdAfterQueue, - job_kinds: data.jobKinds, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - page: data.page, - per_page: data.perPage, - trigger_kind: data.triggerKind, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } - }); - } - -} - -export class IndexSearchService { - /** - * Search through jobs with a string query - * @param data The data for the request. - * @param data.workspace - * @param data.searchQuery - * @param data.paginationOffset - * @returns unknown search results - * @throws ApiError - */ - public static searchJobsIndex(data: SearchJobsIndexData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/srch/w/{workspace}/index/search/job', - path: { - workspace: data.workspace - }, - query: { - search_query: data.searchQuery, - pagination_offset: data.paginationOffset - } - }); - } - - /** - * Search through service logs with a string query - * @param data The data for the request. - * @param data.searchQuery - * @param data.mode - * @param data.hostname - * @param data.workerGroup - * @param data.minTs - * @param data.maxTs - * @returns unknown search results - * @throws ApiError - */ - public static searchLogsIndex(data: SearchLogsIndexData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/srch/index/search/service_logs', - query: { - search_query: data.searchQuery, - mode: data.mode, - worker_group: data.workerGroup, - hostname: data.hostname, - min_ts: data.minTs, - max_ts: data.maxTs - } - }); - } - - /** - * Search and count the log line hits on every provided host - * @param data The data for the request. - * @param data.searchQuery - * @param data.minTs - * @param data.maxTs - * @returns unknown search results - * @throws ApiError - */ - public static countSearchLogsIndex(data: CountSearchLogsIndexData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/srch/index/search/count_service_logs', - query: { - search_query: data.searchQuery, - min_ts: data.minTs, - max_ts: data.maxTs - } - }); - } - - /** - * Clear an index and restart the indexer. - * @param data The data for the request. - * @param data.idxName - * @returns string idx to be deleted and indexer restarting - * @throws ApiError - */ - public static clearIndex(data: ClearIndexData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/indexer/delete/{idx_name}', - path: { - idx_name: data.idxName - } - }); - } - - /** - * Get index storage sizes (disk and S3). - * @returns unknown storage sizes for each index - * @throws ApiError - */ - public static getIndexStorageSizes(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/indexer/storage' - }); - } - - /** - * Get indexer status including liveness and storage sizes. - * @returns unknown indexer status for each index - * @throws ApiError - */ - public static getIndexerStatus(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/indexer/status' - }); - } - -} - -export class AssetService { - /** - * List all assets in the workspace with cursor pagination - * @param data The data for the request. - * @param data.workspace - * @param data.perPage Number of items per page (max 1000, default 50) - * @param data.cursorCreatedAt Cursor timestamp for pagination (created_at of last item from previous page) - * @param data.cursorId Cursor ID for pagination (id of last item from previous page) - * @param data.assetPath Filter by asset path (case-insensitive partial match) - * @param data.usagePath Filter by usage path (case-insensitive partial match) - * @param data.assetKinds Filter by asset kinds (multiple values allowed) - * @param data.path exact path match filter - * @param data.columns JSONB subset match filter for columns using base64 encoded JSON - * @param data.broadFilter broad search across multiple fields (case-insensitive substring match) - * @returns unknown paginated assets in the workspace - * @throws ApiError - */ - public static listAssets(data: ListAssetsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/assets/list', - path: { - workspace: data.workspace - }, - query: { - per_page: data.perPage, - cursor_created_at: data.cursorCreatedAt, - cursor_id: data.cursorId, - asset_path: data.assetPath, - usage_path: data.usagePath, - asset_kinds: data.assetKinds, - path: data.path, - columns: data.columns, - broad_filter: data.broadFilter - } - }); - } - - /** - * List all assets used by given usages paths - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody list assets by usages - * @returns unknown all assets used by the given usage paths, in the same order - * @throws ApiError - */ - public static listAssetsByUsage(data: ListAssetsByUsageData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/assets/list_by_usages', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * List all favorite assets for the authenticated user - * @param data The data for the request. - * @param data.workspace - * @returns unknown list of favorite assets - * @throws ApiError - */ - public static listFavoriteAssets(data: ListFavoriteAssetsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/assets/list_favorites', - path: { - workspace: data.workspace - } - }); - } - -} - -export class VolumeService { - /** - * List all volumes in the workspace - * @param data The data for the request. - * @param data.workspace - * @returns Volume list of volumes - * @throws ApiError - */ - public static listVolumes(data: ListVolumesData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/volumes/list', - path: { - workspace: data.workspace - } - }); - } - - /** - * Get the volume storage name (secondary storage) or null for primary - * @param data The data for the request. - * @param data.workspace - * @returns string volume storage name or null - * @throws ApiError - */ - public static getVolumeStorage(data: GetVolumeStorageData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/volumes/storage', - path: { - workspace: data.workspace - } - }); - } - - /** - * Create a new volume - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string volume created - * @throws ApiError - */ - public static createVolume(data: CreateVolumeData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/volumes/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * Delete a volume (admin only) - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string volume deleted - * @throws ApiError - */ - public static deleteVolume(data: DeleteVolumeData): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/volumes/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } - }); - } - -} - -export class McpService { - /** - * list available MCP tools - * @param data The data for the request. - * @param data.workspace - * @returns EndpointTool list of MCP tools available for the workspace - * @throws ApiError - */ - public static listMcpTools(data: ListMcpToolsData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/mcp/w/{workspace}/list_tools', - path: { - workspace: data.workspace - } - }); - } - -} - -export class McpOauthService { - /** - * discover MCP server OAuth metadata - * @param data The data for the request. - * @param data.requestBody - * @returns unknown OAuth metadata from MCP server - * @throws ApiError - */ - public static discoverMcpOauth(data: DiscoverMcpOauthData): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/mcp/oauth/discover', - body: data.requestBody, - mediaType: 'application/json' - }); - } - - /** - * start MCP OAuth popup flow - * Opens in a popup, discovers OAuth metadata, registers client, and redirects to OAuth provider - * @param data The data for the request. - * @param data.mcpServerUrl URL of the MCP server to connect to - * @param data.scopes Comma-separated list of OAuth scopes to request - * @throws ApiError - */ - public static startMcpOauthPopup(data: StartMcpOauthPopupData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/mcp/oauth/start', - query: { - mcp_server_url: data.mcpServerUrl, - scopes: data.scopes - }, - errors: { - 302: 'Redirect to OAuth provider authorization URL' - } - }); - } - - /** - * MCP OAuth callback - * Handles OAuth callback, exchanges code for tokens, returns HTML that posts message to opener - * @param data The data for the request. - * @param data.code OAuth authorization code - * @param data.state CSRF state token - * @returns string HTML page with JavaScript that posts tokens to opener window and closes - * @throws ApiError - */ - public static mcpOauthCallback(data: McpOauthCallbackData): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/mcp/oauth/callback', - query: { - code: data.code, - state: data.state - } - }); - } - -} \ No newline at end of file diff --git a/frontend/src/lib/gen/types.gen.ts b/frontend/src/lib/gen/types.gen.ts deleted file mode 100644 index 020f47aaaf..0000000000 --- a/frontend/src/lib/gen/types.gen.ts +++ /dev/null @@ -1,27188 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -/** - * Top-level flow definition containing metadata, configuration, and the flow structure - */ -export type OpenFlow = { - /** - * Short description of what this flow does - */ - summary: string; - /** - * Detailed documentation for this flow - */ - description?: string; - value: FlowValue; - /** - * JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-' (e.g., 'resource-stripe') - */ - schema?: { - [key: string]: unknown; - }; - /** - * The flow will be run with the permissions of the user with this email. - */ - on_behalf_of_email?: string; -}; - -/** - * The flow structure containing modules and optional preprocessor/failure handlers - */ -export type FlowValue = { - /** - * Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch - */ - modules: Array; - /** - * Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types - */ - failure_module?: FlowModule; - /** - * Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results - */ - preprocessor_module?: FlowModule; - /** - * If true, all steps run on the same worker for better performance - */ - same_worker?: boolean; - /** - * Maximum number of concurrent executions of this flow - */ - concurrent_limit?: number; - /** - * Expression to group concurrent executions (e.g., by user ID) - */ - concurrency_key?: string; - /** - * Time window in seconds for concurrent_limit - */ - concurrency_time_window_s?: number; - /** - * Delay in seconds to debounce flow executions - */ - debounce_delay_s?: number; - /** - * Expression to group debounced executions - */ - debounce_key?: string; - /** - * Arguments to accumulate across debounced executions - */ - debounce_args_to_accumulate?: Array<(string)>; - /** - * Maximum total time in seconds that a job can be debounced - */ - max_total_debouncing_time?: number; - /** - * Maximum number of times a job can be debounced - */ - max_total_debounces_amount?: number; - /** - * JavaScript expression to conditionally skip the entire flow - */ - skip_expr?: string; - /** - * Cache duration in seconds for flow results - */ - cache_ttl?: number; - cache_ignore_s3_path?: boolean; - /** - * Environment variables available to all steps. Values can be strings, JSON values, or special references: '$var:path' (workspace variable) or '$res:path' (resource). - */ - flow_env?: { - [key: string]: unknown; - }; - /** - * Execution priority (higher numbers run first) - */ - priority?: number; - /** - * JavaScript expression to return early from the flow - */ - early_return?: string; - /** - * Whether this flow accepts chat-style input - */ - chat_input_enabled?: boolean; - /** - * Sticky notes attached to the flow - */ - notes?: Array; - /** - * Semantic groups of modules for organizational purposes - */ - groups?: Array<{ - /** - * Display name for this group - */ - summary?: string; - /** - * Markdown note shown below the group header - */ - note?: string; - /** - * If true, this group is collapsed by default in the flow editor. UI hint only. - */ - autocollapse?: boolean; - /** - * ID of the first flow module in this group (topological entry point) - */ - start_id: string; - /** - * ID of the last flow module in this group (topological exit point) - */ - end_id: string; - /** - * Color for the group in the flow editor - */ - color?: string; - }>; -}; - -/** - * Retry configuration for failed module executions - */ -export type Retry = { - /** - * Retry with constant delay between attempts - */ - constant?: { - /** - * Number of retry attempts - */ - attempts?: number; - /** - * Seconds to wait between retries - */ - seconds?: number; - }; - /** - * Retry with exponential backoff (delay doubles each time) - */ - exponential?: { - /** - * Number of retry attempts - */ - attempts?: number; - /** - * Multiplier for exponential backoff - */ - multiplier?: number; - /** - * Initial delay in seconds - */ - seconds?: number; - /** - * Random jitter percentage (0-100) to avoid thundering herd - */ - random_factor?: number; - }; - /** - * Conditional retry based on error or result - */ - retry_if?: { - /** - * JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables - */ - expr: string; - }; -}; - -/** - * Early termination condition for a module - */ -export type StopAfterIf = { - /** - * If true, following steps are skipped when this condition triggers - */ - skip_if_stopped?: boolean; - /** - * JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop - */ - expr: string; - /** - * Custom error message when stopping with an error. Mutually exclusive with skip_if_stopped. If set to a non-empty string, the flow stops with this error. If empty string, a default error message is used. If null or omitted, no error is raised. - */ - error_message?: string | null; -}; - -/** - * A single step in a flow. Can be a script, subflow, loop, or branch - */ -export type FlowModule = { - /** - * Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen) - */ - id: string; - value: FlowModuleValue; - /** - * Early termination condition evaluated after this step completes - */ - stop_after_if?: StopAfterIf; - /** - * For loops only - early termination condition evaluated after all iterations complete - */ - stop_after_all_iters_if?: StopAfterIf; - /** - * Conditionally skip this step based on previous results or flow inputs - */ - skip_if?: { - /** - * JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.' - */ - expr: string; - }; - /** - * Delay before executing this step (in seconds or as expression) - */ - sleep?: InputTransform; - /** - * Cache duration in seconds for this step's results - */ - cache_ttl?: number; - cache_ignore_s3_path?: boolean; - /** - * Maximum execution time in seconds (static value or expression) - */ - timeout?: InputTransform; - /** - * If true, this step's result is deleted after use to save memory - */ - delete_after_use?: boolean; - /** - * Short description of what this step does - */ - summary?: string; - /** - * Mock configuration for testing without executing the actual step - */ - mock?: { - /** - * If true, return mock value instead of executing - */ - enabled?: boolean; - /** - * Value to return when mocked - */ - return_value?: unknown; - }; - /** - * Configuration for approval/resume steps that wait for user input - */ - suspend?: { - /** - * Number of approvals required before continuing - */ - required_events?: number; - /** - * Timeout in seconds before auto-continuing or canceling - */ - timeout?: number; - /** - * Form schema for collecting input when resuming - */ - resume_form?: { - /** - * JSON Schema for the resume form - */ - schema?: { - [key: string]: unknown; - }; - }; - /** - * If true, only authenticated users can approve - */ - user_auth_required?: boolean; - /** - * Expression or list of groups that can approve - */ - user_groups_required?: InputTransform; - /** - * If true, the user who started the flow cannot approve - */ - self_approval_disabled?: boolean; - /** - * If true, hide the cancel button on the approval form - */ - hide_cancel?: boolean; - /** - * If true, continue flow on timeout instead of canceling - */ - continue_on_disapprove_timeout?: boolean; - }; - /** - * Execution priority for this step (higher numbers run first) - */ - priority?: number; - /** - * If true, flow continues even if this step fails - */ - continue_on_error?: boolean; - /** - * Retry configuration if this step fails - */ - retry?: Retry; - /** - * Debounce configuration for this step (EE only) - */ - debouncing?: { - /** - * Delay in seconds to debounce this step's executions across flow runs - */ - debounce_delay_s?: number; - /** - * Expression to group debounced executions. Supports $workspace and $args[name]. Default: $workspace/flow/- - */ - debounce_key?: string; - /** - * Array-type arguments to accumulate across debounced executions - */ - debounce_args_to_accumulate?: Array<(string)>; - /** - * Maximum total time in seconds before forced execution - */ - max_total_debouncing_time?: number; - /** - * Maximum number of debounces before forced execution - */ - max_total_debounces_amount?: number; - }; -}; - -/** - * Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs - */ -export type InputTransform = StaticTransform | JavascriptTransform | AiTransform; - -/** - * Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource' - */ -export type StaticTransform = { - /** - * The static value. For resources, use format '$res:path/to/resource' - */ - value?: unknown; - type: 'static'; -}; - -/** - * JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value - */ -export type JavascriptTransform = { - /** - * JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops) - */ - expr: string; - type: 'javascript'; -}; - -/** - * Value resolved by the AI runtime for this input. The AI engine decides how to satisfy the parameter. - */ -export type AiTransform = { - type: 'ai'; -}; - -/** - * Complete AI provider configuration with resource reference and model selection - */ -export type ProviderConfig = { - /** - * Supported AI provider types - */ - kind: 'openai' | 'azure_openai' | 'anthropic' | 'mistral' | 'deepseek' | 'googleai' | 'groq' | 'openrouter' | 'togetherai' | 'customai' | 'aws_bedrock'; - /** - * Resource reference in format '$res:{resource_path}' pointing to provider credentials - */ - resource: string; - /** - * Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229', 'gemini-pro') - */ - model: string; -}; - -/** - * Conversation memory configuration - */ -export type MemoryConfig = { - kind: 'off'; -} | { - kind: 'auto'; - /** - * Maximum number of messages to retain in context - */ - context_length?: number; - /** - * Identifier for persistent memory across agent invocations - */ - memory_id?: string; -} | { - kind: 'manual'; - messages: Array<{ - role: 'user' | 'assistant' | 'system'; - content: string; - }>; -}; - -/** - * The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type - */ -export type FlowModuleValue = RawScript | PathScript | PathFlow | ForloopFlow | WhileloopFlow | BranchOne | BranchAll | Identity | AiAgent; - -/** - * Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms - */ -export type RawScript = { - /** - * Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments - */ - input_transforms: { - [key: string]: InputTransform; - }; - /** - * The script source code. Should export a 'main' function - */ - content: string; - /** - * Programming language for this script - */ - language: 'deno' | 'bun' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'duckdb'; - /** - * Optional path for saving this script - */ - path?: string; - /** - * Lock file content for dependencies - */ - lock?: string; - type: 'rawscript'; - /** - * Worker group tag for execution routing - */ - tag?: string; - /** - * Maximum concurrent executions of this script - */ - concurrent_limit?: number; - /** - * Time window for concurrent_limit - */ - concurrency_time_window_s?: number; - /** - * Custom key for grouping concurrent executions - */ - custom_concurrency_key?: string; - /** - * If true, this script is a trigger that can start the flow - */ - is_trigger?: boolean; - /** - * External resources this script accesses (S3 objects, resources, etc.) - */ - assets?: Array<{ - /** - * Path to the asset - */ - path: string; - /** - * Type of asset - */ - kind: 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume'; - /** - * Access level for this asset - */ - access_type?: 'r' | 'w' | 'rw' | null; - /** - * Alternative access level - */ - alt_access_type?: 'r' | 'w' | 'rw' | null; - }>; -}; - -/** - * Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code - */ -export type PathScript = { - /** - * Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments - */ - input_transforms: { - [key: string]: InputTransform; - }; - /** - * Path to the script in the workspace (e.g., 'f/scripts/send_email') - */ - path: string; - /** - * Optional specific version hash of the script to use - */ - hash?: string; - type: 'script'; - /** - * Override the script's default worker group tag - */ - tag_override?: string; - /** - * If true, this script is a trigger that can start the flow - */ - is_trigger?: boolean; -}; - -/** - * Reference to an existing flow by path. Use this to call another flow as a subflow - */ -export type PathFlow = { - /** - * Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments - */ - input_transforms: { - [key: string]: InputTransform; - }; - /** - * Path to the flow in the workspace (e.g., 'f/flows/process_user') - */ - path: string; - type: 'flow'; -}; - -/** - * Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations - */ -export type ForloopFlow = { - /** - * Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value' - */ - modules: Array; - /** - * JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input' - */ - iterator: InputTransform; - /** - * If true, iteration failures don't stop the loop. Failed iterations return null - */ - skip_failures: boolean; - type: 'forloopflow'; - /** - * If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency - */ - parallel?: boolean; - /** - * Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression - */ - parallelism?: InputTransform; - squash?: boolean; -}; - -/** - * Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination - */ -export type WhileloopFlow = { - /** - * Steps to execute in each iteration. Use stop_after_if to control when the loop ends - */ - modules: Array; - /** - * If true, iteration failures don't stop the loop. Failed iterations return null - */ - skip_failures: boolean; - type: 'whileloopflow'; - /** - * If true, iterations run concurrently (use with caution in while loops) - */ - parallel?: boolean; - /** - * Maximum number of concurrent iterations when parallel=true - */ - parallelism?: InputTransform; - squash?: boolean; -}; - -/** - * Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes - */ -export type BranchOne = { - /** - * Array of branches to evaluate in order. The first branch with expr evaluating to true executes - */ - branches: Array<{ - /** - * Short description of this branch condition - */ - summary?: string; - /** - * JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins - */ - expr: string; - /** - * Steps to execute if this branch's expr is true - */ - modules: Array; - }>; - /** - * Steps to execute if no branch expressions match - */ - default: Array; - type: 'branchone'; -}; - -/** - * Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently - */ -export type BranchAll = { - /** - * Array of branches that all execute (either in parallel or sequentially) - */ - branches: Array<{ - /** - * Short description of this branch's purpose - */ - summary?: string; - /** - * If true, failure in this branch doesn't fail the entire flow - */ - skip_failure?: boolean; - /** - * Steps to execute in this branch - */ - modules: Array; - }>; - type: 'branchall'; - /** - * If true, all branches execute concurrently. If false, they execute sequentially - */ - parallel?: boolean; -}; - -/** - * AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task - */ -export type AiAgent = { - /** - * Input parameters for the AI agent mapped to their values - */ - input_transforms: { - /** - * Provider configuration - can be static (ProviderConfig), JavaScript expression, or AI-determined - */ - provider: { - value: ProviderConfig; - type: 'static'; -} | JavascriptTransform | AiTransform; - /** - * Output format type. - * Valid values: 'text' (default) - plain text response, 'image' - image generation - * - */ - output_type: InputTransform; - /** - * The user's prompt/message to the AI agent. Supports variable interpolation with flow.input syntax. - */ - user_message: InputTransform; - /** - * System instructions that guide the AI's behavior, persona, and response style. Optional. - */ - system_prompt?: InputTransform; - /** - * Boolean. If true, stream the AI response incrementally. - * Streaming events include: token_delta, tool_call, tool_call_arguments, tool_execution, tool_result - * - */ - streaming?: InputTransform; - /** - * Memory configuration - can be static (MemoryConfig), JavaScript expression, or AI-determined - */ - memory?: { - value: MemoryConfig; - type: 'static'; -} | JavascriptTransform | AiTransform; - /** - * JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape. - * Supports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc. - * Example: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] } - * - */ - output_schema?: InputTransform; - /** - * Array of image references for vision-capable models. - * Format: Array<{ bucket: string, key: string }> - S3 object references - * Example: [{ bucket: 'my-bucket', key: 'images/photo.jpg' }] - * - */ - user_images?: InputTransform; - /** - * Integer. Maximum number of tokens the AI will generate in its response. - * Range: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases. - * - */ - max_completion_tokens?: InputTransform; - /** - * Float. Controls randomness/creativity of responses. - * Range: 0.0 to 2.0 (provider-dependent) - * - 0.0 = deterministic, focused responses - * - 0.7 = balanced (common default) - * - 1.0+ = more creative/random - * - */ - temperature?: InputTransform; - }; - /** - * Array of tools the agent can use. The agent decides which tools to call based on the task - */ - tools: Array<{ - /** - * Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data') - */ - id: string; - /** - * Short description of what this tool does (shown to the AI) - */ - summary?: string; - /** - * The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference - */ - value: { - tool_type: 'flowmodule'; -} & FlowModuleValue | { - tool_type: 'mcp'; - /** - * Path to the MCP resource/server configuration - */ - resource_path: string; - /** - * Whitelist of specific tools to include from this MCP server - */ - include_tools?: Array<(string)>; - /** - * Blacklist of tools to exclude from this MCP server - */ - exclude_tools?: Array<(string)>; -} | { - tool_type: 'websearch'; -}; - }>; - type: 'aiagent'; - /** - * If true, the agent can execute multiple tool calls in parallel - */ - parallel?: boolean; -}; - -/** - * Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder - */ -export type Identity = { - type: 'identity'; - /** - * If true, marks this as a flow identity (special handling) - */ - flow?: boolean; -}; - -export type FlowStatus = { - step: number; - modules: Array; - user_states?: unknown; - preprocessor_module?: FlowStatusModule; - failure_module: FlowStatusModule & { - parent_module?: string; -}; - retry?: { - fail_count?: number; - failed_jobs?: Array<(string)>; - }; -}; - -export type FlowStatusModule = { - type: 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; - id?: string; - job?: string; - count?: number; - progress?: number; - iterator?: { - index?: number; - itered?: Array; - itered_len?: number; - args?: unknown; - }; - flow_jobs?: Array<(string)>; - flow_jobs_success?: Array<(boolean)>; - flow_jobs_duration?: { - started_at?: Array<(string)>; - duration_ms?: Array<(number)>; - }; - branch_chosen?: { - type: 'branch' | 'default'; - branch?: number; - }; - branchall?: { - branch: number; - len: number; - }; - approvers?: Array<{ - resume_id: number; - approver: string; - }>; - failed_retries?: Array<(string)>; - skipped?: boolean; - agent_actions?: Array<({ - job_id: string; - function_name: string; - type: 'tool_call'; - module_id: string; -} | { - call_id: string; - function_name: string; - resource_path: string; - type: 'mcp_tool_call'; - arguments?: { - [key: string]: unknown; - }; -} | { - type: 'web_search'; -} | { - type: 'message'; -})>; - agent_actions_success?: Array<(boolean)>; -}; - -/** - * A sticky note attached to a flow for documentation and annotation - */ -export type FlowNote = { - /** - * Unique identifier for the note - */ - id: string; - /** - * Content of the note - */ - text: string; - /** - * Position of the note in the flow editor - */ - position?: { - /** - * X coordinate - */ - x: number; - /** - * Y coordinate - */ - y: number; - }; - /** - * Size of the note in the flow editor - */ - size?: { - /** - * Width in pixels - */ - width: number; - /** - * Height in pixels - */ - height: number; - }; - /** - * Color of the note (e.g., "yellow", "#ffff00") - */ - color: string; - /** - * Type of note - 'free' for standalone notes, 'group' for notes that group other nodes - */ - type: 'free' | 'group'; - /** - * Whether the note is locked and cannot be edited or moved - */ - locked?: boolean; - /** - * For group notes, the IDs of nodes contained within this group - */ - contained_node_ids?: Array<(string)>; -}; - -/** - * Health status response (cached with 5s TTL) - */ -export type HealthStatusResponse = { - /** - * Overall health status - */ - status: 'healthy' | 'degraded' | 'unhealthy'; - /** - * Timestamp when the health check was actually performed (not cache return time) - */ - checked_at: string; - /** - * Whether the database is reachable - */ - database_healthy: boolean; - /** - * Number of workers that pinged within last 5 minutes - */ - workers_alive: number; -}; - -/** - * Detailed health status response (always fresh, no caching) - */ -export type DetailedHealthResponse = { - /** - * Overall health status - */ - status: 'healthy' | 'degraded' | 'unhealthy'; - /** - * Timestamp when the health check was performed - */ - checked_at: string; - /** - * Server version (e.g., "EE 1.615.3") - */ - version: string; - checks: HealthChecks; -}; - -/** - * Detailed health checks - */ -export type HealthChecks = { - database: DatabaseHealth; - /** - * Worker status (null if database is unreachable) - */ - workers?: WorkersHealth | null; - /** - * Queue status (null if database is unreachable) - */ - queue?: QueueHealth | null; - readiness: ReadinessHealth; -}; - -/** - * Database health status - */ -export type DatabaseHealth = { - /** - * Whether the database is reachable - */ - healthy: boolean; - /** - * Database query latency in milliseconds - */ - latency_ms: number; - pool: PoolStats; -}; - -/** - * Database connection pool statistics - */ -export type PoolStats = { - /** - * Current number of connections in the pool - */ - size: number; - /** - * Number of idle connections - */ - idle: number; - /** - * Maximum number of connections allowed - */ - max_connections: number; -}; - -/** - * Workers health status - */ -export type WorkersHealth = { - /** - * Whether any workers are active - */ - healthy: boolean; - /** - * Number of active workers (pinged in last 5 minutes) - */ - active_count: number; - /** - * List of active worker groups - */ - worker_groups: Array<(string)>; - /** - * Minimum required worker version - */ - min_version: string; - /** - * List of active worker versions - */ - versions: Array<(string)>; -}; - -/** - * Job queue status - */ -export type QueueHealth = { - /** - * Number of pending jobs in the queue - */ - pending_jobs: number; - /** - * Number of currently running jobs - */ - running_jobs: number; -}; - -/** - * Server readiness status - */ -export type ReadinessHealth = { - /** - * Whether the server is ready to accept requests - */ - healthy: boolean; -}; - -/** - * Configuration for auto-inviting users to the workspace - */ -export type AutoInviteConfig = { - enabled?: boolean; - domain?: string; - /** - * If true, auto-invited users are added as operators. If false, they are added as developers. - */ - operator?: boolean; - mode?: 'invite' | 'add'; - instance_groups?: Array<(string)>; - instance_groups_roles?: { - [key: string]: (string); - }; -}; - -/** - * Configuration for the workspace error handler - */ -export type ErrorHandlerConfig = { - /** - * Path to the error handler script or flow - */ - path?: string; - extra_args?: ScriptArgs; - muted_on_cancel?: boolean; - muted_on_user_path?: boolean; -}; - -/** - * Configuration for the workspace success handler - */ -export type SuccessHandlerConfig = { - /** - * Path to the success handler script or flow - */ - path?: string; - extra_args?: ScriptArgs; -}; - -/** - * Request body for editing the workspace error handler. Accepts both new grouped format and legacy flat format for backward compatibility. - */ -export type EditErrorHandler = EditErrorHandlerNew | EditErrorHandlerLegacy; - -/** - * New grouped format for editing error handler - */ -export type EditErrorHandlerNew = { - /** - * Path to the error handler script or flow - */ - path?: string; - extra_args?: ScriptArgs; - muted_on_cancel?: boolean; - muted_on_user_path?: boolean; -}; - -/** - * Legacy flat format for editing error handler (deprecated, use new format) - */ -export type EditErrorHandlerLegacy = { - /** - * Path to the error handler script or flow - */ - error_handler?: string; - error_handler_extra_args?: ScriptArgs; - error_handler_muted_on_cancel?: boolean; -}; - -/** - * Request body for editing the workspace success handler. Accepts both new grouped format and legacy flat format for backward compatibility. - */ -export type EditSuccessHandler = EditSuccessHandlerNew | EditSuccessHandlerLegacy; - -/** - * New grouped format for editing success handler - */ -export type EditSuccessHandlerNew = { - /** - * Path to the success handler script or flow - */ - path?: string; - extra_args?: ScriptArgs; -}; - -/** - * Legacy flat format for editing success handler (deprecated, use new format) - */ -export type EditSuccessHandlerLegacy = { - /** - * Path to the success handler script or flow - */ - success_handler?: string; - success_handler_extra_args?: ScriptArgs; -}; - -export type VaultSettings = { - /** - * HashiCorp Vault server address (e.g., https://vault.company.com:8200) - */ - address: string; - /** - * KV v2 secrets engine mount path (e.g., windmill) - */ - mount_path: string; - /** - * Vault JWT auth role name for Windmill (optional, if not provided token auth is used) - */ - jwt_role?: string; - /** - * Vault Enterprise namespace (optional) - */ - namespace?: string; - /** - * Static Vault token for testing/development (optional, if provided this is used instead of JWT authentication) - */ - token?: string; -}; - -export type SecretMigrationFailure = { - /** - * Workspace ID where the secret is located - */ - workspace_id: string; - /** - * Path of the secret that failed to migrate - */ - path: string; - /** - * Error message - */ - error: string; -}; - -export type SecretMigrationReport = { - /** - * Total number of secrets found - */ - total_secrets: number; - /** - * Number of secrets successfully migrated - */ - migrated_count: number; - /** - * Number of secrets that failed to migrate - */ - failed_count: number; - /** - * Details of any failures encountered during migration - */ - failures: Array; -}; - -export type JwksResponse = { - /** - * Array of JSON Web Keys for JWT verification - */ - keys: Array<{ - [key: string]: unknown; - }>; -}; - -export type FlowConversation = { - /** - * Unique identifier for the conversation - */ - id: string; - /** - * The workspace ID where the conversation belongs - */ - workspace_id: string; - /** - * Path of the flow this conversation is for - */ - flow_path: string; - /** - * Optional title for the conversation - */ - title?: string | null; - /** - * When the conversation was created - */ - created_at: string; - /** - * When the conversation was last updated - */ - updated_at: string; - /** - * Username who created the conversation - */ - created_by: string; -}; - -export type FlowConversationMessage = { - /** - * Unique identifier for the message - */ - id: string; - /** - * The conversation this message belongs to - */ - conversation_id: string; - /** - * Type of the message - */ - message_type: 'user' | 'assistant' | 'system' | 'tool'; - /** - * The message content - */ - content: string; - /** - * Associated job ID if this message came from a flow run - */ - job_id?: string | null; - /** - * When the message was created - */ - created_at: string; - /** - * The step name that produced that message - */ - step_name?: string; - /** - * Whether the message is a success - */ - success?: boolean; -}; - -export type EndpointTool = { - /** - * The tool name/operation ID - */ - name: string; - /** - * Short description of the tool - */ - description: string; - /** - * Detailed instructions for using the tool - */ - instructions: string; - /** - * API endpoint path - */ - path: string; - /** - * HTTP method (GET, POST, etc.) - */ - method: string; - /** - * JSON schema for path parameters - */ - path_params_schema?: { - [key: string]: unknown; - } | null; - /** - * JSON schema for query parameters - */ - query_params_schema?: { - [key: string]: unknown; - } | null; - /** - * JSON schema for request body - */ - body_schema?: { - [key: string]: unknown; - } | null; -}; - -export type AIProvider = 'openai' | 'azure_openai' | 'anthropic' | 'mistral' | 'deepseek' | 'googleai' | 'groq' | 'openrouter' | 'togetherai' | 'aws_bedrock' | 'customai'; - -export type GitSyncObjectType = 'script' | 'flow' | 'app' | 'folder' | 'resource' | 'variable' | 'secret' | 'resourcetype' | 'schedule' | 'user' | 'group' | 'trigger' | 'settings' | 'key' | 'workspacedependencies'; - -export type AIProviderModel = { - model: string; - provider: AIProvider; -}; - -export type AIProviderConfig = { - resource_path: string; - models: Array<(string)>; -}; - -export type AIConfig = { - providers?: { - [key: string]: AIProviderConfig; - }; - default_model?: AIProviderModel; - code_completion_model?: AIProviderModel; - custom_prompts?: { - [key: string]: (string); - }; - max_tokens_per_model?: { - [key: string]: (number); - }; -}; - -export type Alert = { - name: string; - tags_to_monitor: Array<(string)>; - jobs_num_threshold: number; - alert_cooldown_seconds: number; - alert_time_threshold_seconds: number; -}; - -export type Configs = { - alerts?: Array; -} | null; - -export type WorkspaceDependencies = { - id: number; - archived: boolean; - name?: string; - description?: string; - content: string; - language: ScriptLang; - workspace_id: string; - created_at: string; -}; - -export type NewWorkspaceDependencies = { - workspace_id: string; - language: ScriptLang; - name?: string; - description?: string; - content: string; -}; - -export type Script = { - workspace_id?: string; - hash: string; - path: string; - /** - * The first element is the direct parent of the script, the second is the parent of the first, etc - * - */ - parent_hashes?: Array<(string)>; - summary: string; - description: string; - content: string; - created_by: string; - created_at: string; - archived: boolean; - schema?: { - [key: string]: unknown; - }; - deleted: boolean; - is_template: boolean; - extra_perms: { - [key: string]: (boolean); - }; - lock?: string; - lock_error_logs?: string; - language: ScriptLang; - kind: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - starred: boolean; - tag?: string; - has_draft?: boolean; - draft_only?: boolean; - envs?: Array<(string)>; - concurrent_limit?: number; - concurrency_time_window_s?: number; - concurrency_key?: string; - debounce_key?: string; - debounce_delay_s?: number; - debounce_args_to_accumulate?: Array<(string)>; - max_total_debouncing_time?: number; - max_total_debounces_amount?: number; - cache_ttl?: number; - dedicated_worker?: boolean; - ws_error_handler_muted?: boolean; - priority?: number; - restart_unless_cancelled?: boolean; - timeout?: number; - delete_after_use?: boolean; - visible_to_runner_only?: boolean; - auto_kind?: string; - codebase?: string; - has_preprocessor: boolean; - on_behalf_of_email?: string; - /** - * Additional script modules keyed by relative file path - */ - modules?: { - [key: string]: ScriptModule; - } | null; -}; - -export type NewScript = { - path: string; - parent_hash?: string; - summary: string; - description?: string; - content: string; - schema?: { - [key: string]: unknown; - }; - is_template?: boolean; - lock?: string; - language: ScriptLang; - kind?: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - tag?: string; - draft_only?: boolean; - envs?: Array<(string)>; - concurrent_limit?: number; - concurrency_time_window_s?: number; - cache_ttl?: number; - cache_ignore_s3_path?: boolean; - dedicated_worker?: boolean; - ws_error_handler_muted?: boolean; - priority?: number; - restart_unless_cancelled?: boolean; - timeout?: number; - delete_after_use?: boolean; - deployment_message?: string; - concurrency_key?: string; - debounce_key?: string; - debounce_delay_s?: number; - debounce_args_to_accumulate?: Array<(string)>; - max_total_debouncing_time?: number; - max_total_debounces_amount?: number; - visible_to_runner_only?: boolean; - auto_kind?: string; - codebase?: string; - has_preprocessor?: boolean; - on_behalf_of_email?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email value instead of overwriting it. - */ - preserve_on_behalf_of?: boolean; - assets?: Array<{ - path: string; - kind: AssetKind; - access_type?: 'r' | 'w' | 'rw'; - alt_access_type?: 'r' | 'w' | 'rw'; - }>; - /** - * Additional script modules keyed by relative file path - */ - modules?: { - [key: string]: ScriptModule; - } | null; -}; - -export type NewScriptWithDraft = NewScript & { - draft?: NewScript; - hash: string; -}; - -export type ScriptHistory = { - script_hash: string; - deployment_msg?: string; -}; - -/** - * The arguments to pass to the script or flow - */ -export type ScriptArgs = { - [key: string]: unknown; -}; - -export type Input = { - id: string; - name: string; - created_by: string; - created_at: string; - is_public: boolean; - success?: boolean; -}; - -export type CreateInput = { - name: string; - args: { - [key: string]: unknown; - }; -}; - -export type UpdateInput = { - id: string; - name: string; - is_public: boolean; -}; - -export type RunnableType = 'ScriptHash' | 'ScriptPath' | 'FlowPath'; - -export type QueuedJob = { - workspace_id?: string; - id: string; - parent_job?: string; - created_by?: string; - created_at?: string; - started_at?: string; - scheduled_for?: string; - running: boolean; - script_path?: string; - script_hash?: string; - args?: ScriptArgs; - logs?: string; - raw_code?: string; - canceled: boolean; - canceled_by?: string; - canceled_reason?: string; - last_ping?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; - schedule_path?: string; - /** - * The user (u/userfoo) or group (g/groupfoo) whom - * the execution of this script will be permissioned_as and by extension its DT_TOKEN. - * - */ - permissioned_as: string; - flow_status?: FlowStatus; - workflow_as_code_status?: WorkflowStatus; - raw_flow?: FlowValue; - is_flow_step: boolean; - language?: ScriptLang; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag: string; - priority?: number; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - suspend?: number; - preprocessed?: boolean; - worker?: string; -}; - -export type CompletedJob = { - workspace_id?: string; - id: string; - parent_job?: string; - created_by: string; - created_at: string; - started_at: string; - completed_at?: string; - duration_ms: number; - success: boolean; - script_path?: string; - script_hash?: string; - args?: ScriptArgs; - result?: unknown; - logs?: string; - deleted?: boolean; - raw_code?: string; - canceled: boolean; - canceled_by?: string; - canceled_reason?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; - schedule_path?: string; - /** - * The user (u/userfoo) or group (g/groupfoo) whom - * the execution of this script will be permissioned_as and by extension its DT_TOKEN. - * - */ - permissioned_as: string; - flow_status?: FlowStatus; - workflow_as_code_status?: WorkflowStatus; - raw_flow?: FlowValue; - is_flow_step: boolean; - language?: ScriptLang; - is_skipped: boolean; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag: string; - priority?: number; - labels?: Array<(string)>; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - preprocessed?: boolean; - worker?: string; -}; - -/** - * Completed job with full data for export/import operations - */ -export type ExportableCompletedJob = { - id: string; - parent_job?: string; - created_by: string; - created_at: string; - started_at?: string; - completed_at?: string; - duration_ms?: number; - script_path?: string; - script_hash?: string; - /** - * Full job arguments without size restrictions - */ - args?: { - [key: string]: unknown; - }; - /** - * Full job result without size restrictions - */ - result?: { - [key: string]: unknown; - }; - /** - * Complete job logs from v2_job table - */ - logs?: string; - raw_code?: string; - raw_lock?: string; - canceled_by?: string; - canceled_reason?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; - /** - * Trigger path for the job (replaces schedule_path) - */ - trigger?: string; - trigger_kind?: 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'schedule' | 'app' | 'ui' | 'postgres' | 'sqs' | 'gcp'; - permissioned_as: string; - permissioned_as_email?: string; - /** - * Flow status from v2_job_status table - */ - flow_status?: { - [key: string]: unknown; - }; - workflow_as_code_status?: { - [key: string]: unknown; - }; - raw_flow?: { - [key: string]: unknown; - }; - is_flow_step?: boolean; - language?: ScriptLang; - is_skipped?: boolean; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag?: string; - priority?: number; - labels?: Array<(string)>; - same_worker?: boolean; - flow_step_id?: string; - flow_innermost_root_job?: string; - concurrent_limit?: number; - concurrency_time_window_s?: number; - timeout?: number; - cache_ttl?: number; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - preprocessed?: boolean; - worker?: string; - /** - * Actual job status from database - */ - status?: string; -}; - -/** - * Queued job with full data for export/import operations - */ -export type ExportableQueuedJob = { - id: string; - parent_job?: string; - created_by: string; - created_at: string; - started_at?: string; - scheduled_for?: string; - script_path?: string; - script_hash?: string; - /** - * Full job arguments without size restrictions - */ - args?: { - [key: string]: unknown; - }; - /** - * Complete job logs from v2_job table - */ - logs?: string; - raw_code?: string; - raw_lock?: string; - canceled_by?: string; - canceled_reason?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; - /** - * Trigger path for the job (replaces schedule_path) - */ - trigger?: string; - trigger_kind?: 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'schedule' | 'app' | 'ui' | 'postgres' | 'sqs' | 'gcp'; - permissioned_as: string; - permissioned_as_email?: string; - /** - * Flow status from v2_job_status table - */ - flow_status?: { - [key: string]: unknown; - }; - workflow_as_code_status?: { - [key: string]: unknown; - }; - raw_flow?: { - [key: string]: unknown; - }; - is_flow_step?: boolean; - language?: ScriptLang; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag?: string; - priority?: number; - labels?: Array<(string)>; - same_worker?: boolean; - flow_step_id?: string; - flow_innermost_root_job?: string; - concurrent_limit?: number; - concurrency_time_window_s?: number; - timeout?: number; - cache_ttl?: number; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - preprocessed?: boolean; - suspend?: number; - suspend_until?: string; -}; - -export type ObscuredJob = { - typ?: string; - started_at?: string; - duration_ms?: number; -}; - -export type Job = CompletedJob & { - type?: 'CompletedJob'; -} | QueuedJob & { - type?: 'QueuedJob'; -}; - -export type User = { - email: string; - username: string; - is_admin: boolean; - name?: string; - is_super_admin: boolean; - created_at: string; - operator: boolean; - disabled: boolean; - groups?: Array<(string)>; - folders: Array<(string)>; - folders_owners: Array<(string)>; - added_via?: (UserSource) | null; -}; - -export type UserSource = { - /** - * How the user was added to the workspace - */ - source: 'domain' | 'instance_group' | 'manual'; - /** - * The domain used for auto-invite (when source is 'domain') - */ - domain?: string; - /** - * The instance group name (when source is 'instance_group') - */ - group?: string; -}; - -export type UserUsage = { - email?: string; - executions?: number; -}; - -export type Login = { - email: string; - password: string; -}; - -export type PasswordResetResponse = { - message: string; -}; - -export type EditWorkspaceUser = { - is_admin?: boolean; - operator?: boolean; - disabled?: boolean; -}; - -export type TruncatedToken = { - label?: string; - expiration?: string; - token_prefix: string; - created_at: string; - last_used_at: string; - scopes?: Array<(string)>; - email?: string; -}; - -export type NewToken = { - label?: string; - expiration?: string; - scopes?: Array<(string)>; - workspace_id?: string; -}; - -export type NewTokenImpersonate = { - label?: string; - expiration?: string; - impersonate_email: string; - workspace_id?: string; -}; - -export type ListableVariable = { - workspace_id: string; - path: string; - value?: string; - is_secret: boolean; - description?: string; - account?: number; - is_oauth?: boolean; - extra_perms: { - [key: string]: (boolean); - }; - is_expired?: boolean; - refresh_error?: string; - is_linked?: boolean; - is_refreshed?: boolean; - expires_at?: string; -}; - -export type ContextualVariable = { - name: string; - value: string; - description: string; - is_custom: boolean; -}; - -export type CreateVariable = { - /** - * The path to the variable - */ - path: string; - /** - * The value of the variable - */ - value: string; - /** - * Whether the variable is a secret - */ - is_secret: boolean; - /** - * The description of the variable - */ - description: string; - /** - * The account identifier - */ - account?: number; - /** - * Whether the variable is an OAuth variable - */ - is_oauth?: boolean; - /** - * The expiration date of the variable - */ - expires_at?: string; -}; - -export type EditVariable = { - /** - * The path to the variable - */ - path?: string; - /** - * The new value of the variable - */ - value?: string; - /** - * Whether the variable is a secret - */ - is_secret?: boolean; - /** - * The new description of the variable - */ - description?: string; -}; - -export type AuditLog = { - workspace_id: string; - id: number; - timestamp: string; - username: string; - operation: 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.disapproval' | 'jobs.delete' | 'account.delete' | 'ai.request' | 'resources.create' | 'resources.update' | 'resources.delete' | 'resource_types.create' | 'resource_types.update' | 'resource_types.delete' | 'schedule.create' | 'schedule.setenabled' | 'schedule.edit' | 'schedule.delete' | 'scripts.create' | 'scripts.update' | 'scripts.archive' | 'scripts.delete' | 'users.create' | 'users.delete' | 'users.update' | 'users.login' | 'users.login_failure' | 'users.logout' | 'users.accept_invite' | 'users.decline_invite' | 'users.token.create' | 'users.token.delete' | 'users.add_to_workspace' | 'users.add_global' | 'users.setpassword' | 'users.impersonate' | 'users.leave_workspace' | 'oauth.login' | 'oauth.login_failure' | 'oauth.signup' | 'variables.create' | 'variables.delete' | 'variables.update' | 'flows.create' | 'flows.update' | 'flows.delete' | 'flows.archive' | 'apps.create' | 'apps.update' | 'apps.delete' | 'folder.create' | 'folder.update' | 'folder.delete' | 'folder.add_owner' | 'folder.remove_owner' | 'group.create' | 'group.delete' | 'group.edit' | 'group.adduser' | 'group.removeuser' | 'igroup.create' | 'igroup.delete' | 'igroup.adduser' | 'igroup.removeuser' | 'variables.decrypt_secret' | 'workspaces.edit_command_script' | 'workspaces.edit_deploy_to' | 'workspaces.edit_auto_invite_domain' | 'workspaces.edit_webhook' | 'workspaces.edit_copilot_config' | 'workspaces.edit_error_handler' | 'workspaces.create' | 'workspaces.update' | 'workspaces.archive' | 'workspaces.unarchive' | 'workspaces.delete'; - action_kind: 'Created' | 'Updated' | 'Delete' | 'Execute'; - resource?: string; - parameters?: { - [key: string]: unknown; - }; - span?: string; -}; - -export type MainArgSignature = { - type: 'Valid' | 'Invalid'; - error: string; - star_args: boolean; - star_kwargs?: boolean; - args: Array<{ - name: string; - typ: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - resource: string | null; -} | { - str: Array<(string)> | null; -} | { - object: { - name?: string; - props?: Array<{ - key: string; - typ: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - str: unknown; -}; - }>; - }; -} | { - list: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - str: unknown; -} | null; -}; - has_default?: boolean; - default?: unknown; - }>; - auto_kind: string | null; - has_preprocessor: boolean | null; -}; - -export type ScriptLang = 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'duckdb' | 'bunnative'; - -/** - * An additional module file associated with a script - */ -export type ScriptModule = { - /** - * The source code content of this module - */ - content: string; - language: ScriptLang; - /** - * Lock file content for this module's dependencies - */ - lock?: string | null; -}; - -export type Preview = { - /** - * The code to run - */ - content?: string; - /** - * The path to the script - */ - path?: string; - /** - * The hash of the script - */ - script_hash?: string; - args: ScriptArgs; - language?: ScriptLang; - tag?: string; - kind?: 'code' | 'identity' | 'http'; - dedicated_worker?: boolean; - lock?: string; - flow_path?: string; - /** - * Additional script modules keyed by relative file path - */ - modules?: { - [key: string]: ScriptModule; - } | null; -}; - -export type PreviewInline = { - /** - * The code to run - */ - content: string; - args: ScriptArgs; - language: ScriptLang; -}; - -export type InlineScriptArgs = { - args?: ScriptArgs; -}; - -export type WorkflowTask = { - args: ScriptArgs; -}; - -export type WorkflowStatusRecord = { - [key: string]: WorkflowStatus; -}; - -export type WorkflowStatus = { - scheduled_for?: string; - started_at?: string; - duration_ms?: number; - name?: string; -}; - -export type CreateResource = { - /** - * The path to the resource - */ - path: string; - value: unknown; - /** - * The description of the resource - */ - description?: string; - /** - * The resource_type associated with the resource - */ - resource_type: string; -}; - -export type EditResource = { - /** - * The path to the resource - */ - path?: string; - /** - * The new description of the resource - */ - description?: string; - value?: unknown; - /** - * The new resource_type to be associated with the resource - */ - resource_type?: string; -}; - -export type Resource = { - workspace_id?: string; - path: string; - description?: string; - resource_type: string; - value?: unknown; - is_oauth: boolean; - extra_perms?: { - [key: string]: (boolean); - }; - created_by?: string; - edited_at?: string; -}; - -export type ListableResource = { - workspace_id?: string; - path: string; - description?: string; - resource_type: string; - value?: unknown; - is_oauth: boolean; - extra_perms?: { - [key: string]: (boolean); - }; - is_expired?: boolean; - refresh_error?: string; - is_linked: boolean; - is_refreshed: boolean; - account?: number; - created_by?: string; - edited_at?: string; -}; - -export type ResourceType = { - workspace_id?: string; - name: string; - schema?: unknown; - description?: string; - created_by?: string; - edited_at?: string; - format_extension?: string; - is_fileset?: boolean; -}; - -export type EditResourceType = { - schema?: unknown; - description?: string; - is_fileset?: boolean; -}; - -export type Schedule = { - /** - * The unique path identifier for this schedule - */ - path: string; - /** - * Username of the last person who edited this schedule - */ - edited_by: string; - /** - * Timestamp of the last edit - */ - edited_at: string; - /** - * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon - */ - schedule: string; - /** - * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') - */ - timezone: string; - /** - * Whether the schedule is currently active and will trigger jobs - */ - enabled: boolean; - /** - * Path to the script or flow to execute when triggered - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - args?: ScriptArgs | null; - /** - * Additional permissions for this schedule - */ - extra_perms: { - [key: string]: (boolean); - }; - /** - * Email of the user who owns this schedule, used for permissioned_as - */ - email: string; - /** - * The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup') - */ - permissioned_as: string; - /** - * Last error message if the schedule failed to trigger - */ - error?: string | null; - /** - * Path to a script or flow to run when the scheduled job fails - */ - on_failure?: string | null; - /** - * Number of consecutive failures before the on_failure handler is triggered (default 1) - */ - on_failure_times?: number | null; - /** - * If true, trigger on_failure handler only on exactly N failures, not on every failure after N - */ - on_failure_exact?: boolean | null; - on_failure_extra_args?: ScriptArgs | null; - /** - * Path to a script or flow to run when the schedule recovers after failures - */ - on_recovery?: string | null; - /** - * Number of consecutive successes before the on_recovery handler is triggered (default 1) - */ - on_recovery_times?: number | null; - on_recovery_extra_args?: ScriptArgs | null; - /** - * Path to a script or flow to run after each successful execution - */ - on_success?: string | null; - on_success_extra_args?: ScriptArgs | null; - /** - * If true, the workspace-level error handler will not be triggered for this schedule's failures - */ - ws_error_handler_muted?: boolean; - retry?: Retry | null; - /** - * Short summary describing the purpose of this schedule - */ - summary?: string | null; - /** - * Detailed description of what this schedule does - */ - description?: string | null; - /** - * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) - */ - no_flow_overlap?: boolean; - /** - * Worker tag to route jobs to specific worker groups - */ - tag?: string | null; - /** - * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time - */ - paused_until?: string | null; - /** - * Cron parser version. Use 'v2' for extended syntax with additional features - */ - cron_version?: string | null; - /** - * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) - */ - dynamic_skip?: string | null; -}; - -export type ScheduleWJobs = Schedule & { - jobs?: Array<{ - id: string; - success: boolean; - duration_ms: number; - }>; -}; - -export type ErrorHandler = 'custom' | 'slack' | 'teams' | 'email'; - -export type NewSchedule = { - /** - * The unique path identifier for this schedule - */ - path: string; - /** - * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon - */ - schedule: string; - /** - * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') - */ - timezone: string; - /** - * Path to the script or flow to execute when triggered - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - args: ScriptArgs | null; - /** - * Whether the schedule is currently active and will trigger jobs - */ - enabled?: boolean; - /** - * Path to a script or flow to run when the scheduled job fails - */ - on_failure?: string | null; - /** - * Number of consecutive failures before the on_failure handler is triggered (default 1) - */ - on_failure_times?: number | null; - /** - * If true, trigger on_failure handler only on exactly N failures, not on every failure after N - */ - on_failure_exact?: boolean | null; - on_failure_extra_args?: ScriptArgs | null; - /** - * Path to a script or flow to run when the schedule recovers after failures - */ - on_recovery?: string | null; - /** - * Number of consecutive successes before the on_recovery handler is triggered (default 1) - */ - on_recovery_times?: number | null; - on_recovery_extra_args?: ScriptArgs | null; - /** - * Path to a script or flow to run after each successful execution - */ - on_success?: string | null; - on_success_extra_args?: ScriptArgs | null; - /** - * If true, the workspace-level error handler will not be triggered for this schedule's failures - */ - ws_error_handler_muted?: boolean; - retry?: Retry | null; - /** - * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) - */ - no_flow_overlap?: boolean; - /** - * Short summary describing the purpose of this schedule - */ - summary?: string | null; - /** - * Detailed description of what this schedule does - */ - description?: string | null; - /** - * Worker tag to route jobs to specific worker groups - */ - tag?: string | null; - /** - * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time - */ - paused_until?: string | null; - /** - * Cron parser version. Use 'v2' for extended syntax with additional features - */ - cron_version?: string | null; - /** - * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) - */ - dynamic_skip?: string | null; - /** - * The user or group this schedule runs as. Used during deployment to preserve the original schedule owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditSchedule = { - /** - * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon - */ - schedule: string; - /** - * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') - */ - timezone: string; - args: ScriptArgs | null; - /** - * Path to a script or flow to run when the scheduled job fails - */ - on_failure?: string | null; - /** - * Number of consecutive failures before the on_failure handler is triggered (default 1) - */ - on_failure_times?: number | null; - /** - * If true, trigger on_failure handler only on exactly N failures, not on every failure after N - */ - on_failure_exact?: boolean | null; - on_failure_extra_args?: ScriptArgs | null; - /** - * Path to a script or flow to run when the schedule recovers after failures - */ - on_recovery?: string | null; - /** - * Number of consecutive successes before the on_recovery handler is triggered (default 1) - */ - on_recovery_times?: number | null; - on_recovery_extra_args?: ScriptArgs | null; - /** - * Path to a script or flow to run after each successful execution - */ - on_success?: string | null; - on_success_extra_args?: ScriptArgs | null; - /** - * If true, the workspace-level error handler will not be triggered for this schedule's failures - */ - ws_error_handler_muted?: boolean; - retry?: Retry | null; - /** - * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) - */ - no_flow_overlap?: boolean; - /** - * Short summary describing the purpose of this schedule - */ - summary?: string | null; - /** - * Detailed description of what this schedule does - */ - description?: string | null; - /** - * Worker tag to route jobs to specific worker groups - */ - tag?: string | null; - /** - * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time - */ - paused_until?: string | null; - /** - * Cron parser version. Use 'v2' for extended syntax with additional features - */ - cron_version?: string | null; - /** - * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) - */ - dynamic_skip?: string | null; - /** - * The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup'). Only admins and wm_deployers can set this via preserve_permissioned_as. - */ - permissioned_as?: string | null; - /** - * If true and user is admin/wm_deployers, preserve the provided permissioned_as instead of using the deploying user's identity - */ - preserve_permissioned_as?: boolean | null; -}; - -/** - * job trigger kind (schedule, http, websocket...) - */ -export type JobTriggerKind = 'webhook' | 'default_email' | 'email' | 'schedule' | 'http' | 'websocket' | 'postgres' | 'kafka' | 'nats' | 'mqtt' | 'sqs' | 'gcp' | 'google'; - -/** - * job trigger mode - */ -export type TriggerMode = 'enabled' | 'disabled' | 'suspended'; - -export type TriggerExtraProperty = { - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when triggered - */ - script_path: string; - /** - * The user or group this trigger runs as (permissioned_as) - */ - permissioned_as: string; - /** - * Additional permissions for this trigger - */ - extra_perms: { - [key: string]: (boolean); - }; - /** - * The workspace this trigger belongs to - */ - workspace_id: string; - /** - * Username of the last person who edited this trigger - */ - edited_by: string; - /** - * Timestamp of the last edit - */ - edited_at: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * Trigger mode (enabled/disabled) - */ - mode: TriggerMode; -}; - -export type AuthenticationMethod = 'none' | 'windmill' | 'api_key' | 'basic_http' | 'custom_script' | 'signature'; - -export type RunnableKind = 'script' | 'flow'; - -export type OpenapiSpecFormat = 'yaml' | 'json'; - -export type OpenapiHttpRouteFilters = { - folder_regex: string; - path_regex: string; - route_path_regex: string; -}; - -export type WebhookFilters = { - user_or_folder_regex: '*' | 'u' | 'f'; - user_or_folder_regex_value: string; - path: string; - runnable_kind: RunnableKind; -}; - -export type OpenapiV3Info = { - title: string; - version: string; - description?: string; - terms_of_service?: string; - contact?: { - name?: string; - url?: string; - email?: string; - }; - license?: { - name: string; - identifier?: string; - url?: string; - }; -}; - -export type GenerateOpenapiSpec = { - info?: OpenapiV3Info; - url?: string; - openapi_spec_format?: OpenapiSpecFormat; - http_route_filters?: Array; - webhook_filters?: Array; -}; - -export type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'patch'; - -export type HttpRequestType = 'sync' | 'async' | 'sync_sse'; - -export type HttpTrigger = TriggerExtraProperty & { - /** - * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. - */ - route_path: string; - /** - * Configuration for serving static assets (s3 bucket, storage path, filename) - */ - static_asset_config?: { - /** - * S3 bucket path for static assets - */ - s3: string; - /** - * Storage path for static assets - */ - storage?: string; - /** - * Filename for the static asset - */ - filename?: string; - } | null; - /** - * HTTP method (get, post, put, delete, patch) that triggers this endpoint - */ - http_method: HttpMethod; - /** - * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) - */ - authentication_resource_path?: string | null; - /** - * Short summary describing the purpose of this trigger - */ - summary?: string | null; - /** - * Detailed description of what this trigger does - */ - description?: string | null; - /** - * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events - */ - request_type: HttpRequestType; - /** - * How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature' - */ - authentication_method: AuthenticationMethod; - /** - * If true, serves static files from S3/storage instead of running a script - */ - is_static_website: boolean; - /** - * If true, the route includes the workspace ID in the path - */ - workspaced_route: boolean; - /** - * If true, wraps the request body in a 'body' parameter - */ - wrap_body: boolean; - /** - * If true, passes the request body as a raw string instead of parsing as JSON - */ - raw_string: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type NewHttpTrigger = { - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when triggered - */ - script_path: string; - /** - * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. - */ - route_path: string; - /** - * If true, the route includes the workspace ID in the path - */ - workspaced_route?: boolean; - /** - * Short summary describing the purpose of this trigger - */ - summary?: string | null; - /** - * Detailed description of what this trigger does - */ - description?: string | null; - /** - * Configuration for serving static assets (s3 bucket, storage path, filename) - */ - static_asset_config?: { - /** - * S3 bucket path for static assets - */ - s3: string; - /** - * Storage path for static assets - */ - storage?: string; - /** - * Filename for the static asset - */ - filename?: string; - } | null; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * HTTP method (get, post, put, delete, patch) that triggers this endpoint - */ - http_method: HttpMethod; - /** - * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) - */ - authentication_resource_path?: string | null; - /** - * Deprecated, use request_type instead - */ - is_async?: boolean; - /** - * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events - */ - request_type?: HttpRequestType; - /** - * How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature' - */ - authentication_method: AuthenticationMethod; - /** - * If true, serves static files from S3/storage instead of running a script - */ - is_static_website: boolean; - /** - * If true, wraps the request body in a 'body' parameter - */ - wrap_body?: boolean; - mode?: TriggerMode; - /** - * If true, passes the request body as a raw string instead of parsing as JSON - */ - raw_string?: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditHttpTrigger = { - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when triggered - */ - script_path: string; - /** - * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. - */ - route_path?: string; - /** - * Short summary describing the purpose of this trigger - */ - summary?: string | null; - /** - * Detailed description of what this trigger does - */ - description?: string | null; - /** - * If true, the route includes the workspace ID in the path - */ - workspaced_route?: boolean; - /** - * Configuration for serving static assets (s3 bucket, storage path, filename) - */ - static_asset_config?: { - /** - * S3 bucket path for static assets - */ - s3: string; - /** - * Storage path for static assets - */ - storage?: string; - /** - * Filename for the static asset - */ - filename?: string; - } | null; - /** - * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) - */ - authentication_resource_path?: string | null; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * HTTP method (get, post, put, delete, patch) that triggers this endpoint - */ - http_method: HttpMethod; - /** - * Deprecated, use request_type instead - */ - is_async?: boolean; - /** - * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events - */ - request_type?: HttpRequestType; - /** - * How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature' - */ - authentication_method: AuthenticationMethod; - /** - * If true, serves static files from S3/storage instead of running a script - */ - is_static_website: boolean; - /** - * If true, wraps the request body in a 'body' parameter - */ - wrap_body?: boolean; - /** - * If true, passes the request body as a raw string instead of parsing as JSON - */ - raw_string?: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type TriggersCount = { - primary_schedule?: { - schedule?: string; - }; - schedule_count?: number; - http_routes_count?: number; - webhook_count?: number; - email_count?: number; - default_email_count?: number; - websocket_count?: number; - postgres_count?: number; - kafka_count?: number; - nats_count?: number; - mqtt_count?: number; - gcp_count?: number; - sqs_count?: number; - nextcloud_count?: number; - google_count?: number; -}; - -export type WebsocketTrigger = TriggerExtraProperty & { - /** - * The WebSocket URL to connect to (can be a static URL or computed by a runnable) - */ - url: string; - /** - * ID of the server currently handling this trigger (internal) - */ - server_id?: string; - /** - * Timestamp of last server heartbeat (internal) - */ - last_server_ping?: string; - /** - * Last error message if the trigger failed - */ - error?: string; - /** - * Array of key-value filters to match incoming messages (only matching messages trigger the script) - */ - filters: Array<{ - key: string; - value: unknown; - }>; - /** - * Messages to send immediately after connecting (can be raw strings or computed by runnables) - */ - initial_messages?: Array | null; - /** - * Arguments to pass to the script/flow that computes the WebSocket URL - */ - url_runnable_args?: ScriptArgs | null; - /** - * If true, the script can return a message to send back through the WebSocket - */ - can_return_message: boolean; - /** - * If true, error results are sent back through the WebSocket - */ - can_return_error_result: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type NewWebsocketTrigger = { - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * The WebSocket URL to connect to (can be a static URL or computed by a runnable) - */ - url: string; - mode?: TriggerMode; - /** - * Array of key-value filters to match incoming messages (only matching messages trigger the script) - */ - filters: Array<{ - key: string; - value: unknown; - }>; - /** - * Messages to send immediately after connecting (can be raw strings or computed by runnables) - */ - initial_messages?: Array | null; - /** - * Arguments to pass to the script/flow that computes the WebSocket URL - */ - url_runnable_args?: ScriptArgs | null; - /** - * If true, the script can return a message to send back through the WebSocket - */ - can_return_message: boolean; - /** - * If true, error results are sent back through the WebSocket - */ - can_return_error_result: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditWebsocketTrigger = { - /** - * The WebSocket URL to connect to (can be a static URL or computed by a runnable) - */ - url: string; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * Array of key-value filters to match incoming messages (only matching messages trigger the script) - */ - filters: Array<{ - key: string; - value: unknown; - }>; - /** - * Messages to send immediately after connecting (can be raw strings or computed by runnables) - */ - initial_messages?: Array | null; - /** - * Arguments to pass to the script/flow that computes the WebSocket URL - */ - url_runnable_args?: ScriptArgs | null; - /** - * If true, the script can return a message to send back through the WebSocket - */ - can_return_message: boolean; - /** - * If true, error results are sent back through the WebSocket - */ - can_return_error_result: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type WebsocketTriggerInitialMessage = { - raw_message: string; -} | { - runnable_result: { - path: string; - args: ScriptArgs; - is_flow: boolean; - }; -}; - -export type MqttQoS = 'qos0' | 'qos1' | 'qos2'; - -export type MqttV3Config = { - clean_session?: boolean; -}; - -export type MqttV5Config = { - clean_start?: boolean; - topic_alias_maximum?: number; - session_expiry_interval?: number; -}; - -export type MqttSubscribeTopic = { - qos: MqttQoS; - topic: string; -}; - -export type MqttClientVersion = 'v3' | 'v5'; - -export type MqttTrigger = TriggerExtraProperty & { - /** - * Path to the MQTT resource containing broker connection configuration - */ - mqtt_resource_path: string; - /** - * Array of MQTT topics to subscribe to, each with topic name and QoS level - */ - subscribe_topics: Array; - /** - * MQTT v3 specific configuration (clean_session) - */ - v3_config?: MqttV3Config | null; - /** - * MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval) - */ - v5_config?: MqttV5Config | null; - /** - * MQTT client ID for this connection - */ - client_id?: string | null; - /** - * MQTT protocol version ('v3' or 'v5') - */ - client_version?: MqttClientVersion | null; - /** - * ID of the server currently handling this trigger (internal) - */ - server_id?: string; - /** - * Timestamp of last server heartbeat (internal) - */ - last_server_ping?: string; - /** - * Last error message if the trigger failed - */ - error?: string; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type NewMqttTrigger = { - /** - * Path to the MQTT resource containing broker connection configuration - */ - mqtt_resource_path: string; - /** - * Array of MQTT topics to subscribe to, each with topic name and QoS level - */ - subscribe_topics: Array; - /** - * MQTT client ID for this connection - */ - client_id?: string | null; - /** - * MQTT v3 specific configuration (clean_session) - */ - v3_config?: MqttV3Config | null; - /** - * MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval) - */ - v5_config?: MqttV5Config | null; - /** - * MQTT protocol version ('v3' or 'v5') - */ - client_version?: MqttClientVersion | null; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditMqttTrigger = { - /** - * Path to the MQTT resource containing broker connection configuration - */ - mqtt_resource_path: string; - /** - * Array of MQTT topics to subscribe to, each with topic name and QoS level - */ - subscribe_topics: Array; - /** - * MQTT client ID for this connection - */ - client_id?: string | null; - /** - * MQTT v3 specific configuration (clean_session) - */ - v3_config?: MqttV3Config | null; - /** - * MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval) - */ - v5_config?: MqttV5Config | null; - /** - * MQTT protocol version ('v3' or 'v5') - */ - client_version?: MqttClientVersion | null; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -/** - * Delivery mode for messages. 'push' for HTTP push delivery where messages are sent to a webhook endpoint, 'pull' for polling where the trigger actively fetches messages. - */ -export type DeliveryType = 'push' | 'pull'; - -/** - * Configuration for push delivery mode. - */ -export type PushConfig = { - /** - * The audience claim for OIDC tokens used in push authentication. - */ - audience?: string; - /** - * If true, push messages will include OIDC authentication tokens. - */ - authenticate: boolean; -}; - -/** - * A Google Cloud Pub/Sub trigger that executes a script or flow when messages are received. - */ -export type GcpTrigger = TriggerExtraProperty & { - /** - * Path to the GCP resource containing service account credentials for authentication. - */ - gcp_resource_path: string; - /** - * Google Cloud Pub/Sub topic ID to subscribe to. - */ - topic_id: string; - /** - * Google Cloud Pub/Sub subscription ID. - */ - subscription_id: string; - /** - * ID of the server currently handling this trigger (internal use). - */ - server_id?: string; - delivery_type: DeliveryType; - delivery_config?: PushConfig | null; - subscription_mode: SubscriptionMode; - /** - * Timestamp of last server heartbeat (internal use). - */ - last_server_ping?: string; - /** - * Last error message if the trigger failed. - */ - error?: string; - /** - * Path to a script or flow to run when the triggered job fails. - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler. - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions. - */ - retry?: Retry; -}; - -/** - * The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription. - */ -export type SubscriptionMode = 'existing' | 'create_update'; - -/** - * Data for creating or updating a Google Cloud Pub/Sub trigger. - */ -export type GcpTriggerData = { - /** - * Path to the GCP resource containing service account credentials for authentication. - */ - gcp_resource_path: string; - subscription_mode: SubscriptionMode; - /** - * Google Cloud Pub/Sub topic ID to subscribe to. - */ - topic_id: string; - /** - * Google Cloud Pub/Sub subscription ID. - */ - subscription_id?: string; - /** - * Base URL for push delivery endpoint. - */ - base_endpoint?: string; - delivery_type?: DeliveryType; - delivery_config?: PushConfig | null; - /** - * The unique path identifier for this trigger. - */ - path: string; - /** - * Path to the script or flow to execute when a message is received. - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script. - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * If true, automatically acknowledge messages after processing. - */ - auto_acknowledge_msg?: boolean; - /** - * Time in seconds within which the message must be acknowledged. If not provided, defaults to the subscription's acknowledgment deadline (600 seconds). - */ - ack_deadline?: number; - /** - * Path to a script or flow to run when the triggered job fails. - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler. - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions. - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type GetAllTopicSubscription = { - topic_id: string; -}; - -export type DeleteGcpSubscription = { - subscription_id: string; -}; - -export type AwsAuthResourceType = 'oidc' | 'credentials'; - -export type SqsTrigger = TriggerExtraProperty & { - /** - * The full URL of the AWS SQS queue to poll for messages - */ - queue_url: string; - /** - * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect - */ - aws_auth_resource_type: AwsAuthResourceType; - /** - * Path to the AWS resource containing credentials or OIDC configuration - */ - aws_resource_path: string; - /** - * Array of SQS message attribute names to include with each message - */ - message_attributes?: Array<(string)> | null; - /** - * ID of the server currently handling this trigger (internal) - */ - server_id?: string; - /** - * Timestamp of last server heartbeat (internal) - */ - last_server_ping?: string; - /** - * Last error message if the trigger failed - */ - error?: string; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type LoggedWizardStatus = 'OK' | 'SKIP' | 'FAIL'; - -export type CustomInstanceDbLogs = { - super_admin?: LoggedWizardStatus; - database_credentials?: LoggedWizardStatus; - valid_dbname?: LoggedWizardStatus; - created_database?: LoggedWizardStatus; - db_connect?: LoggedWizardStatus; - grant_permissions?: LoggedWizardStatus; -}; - -export type CustomInstanceDbTag = 'ducklake' | 'datatable'; - -export type CustomInstanceDb = { - logs: CustomInstanceDbLogs; - /** - * Whether the operation completed successfully - */ - success: boolean; - /** - * Error message if the operation failed - */ - error?: string | null; - tag?: CustomInstanceDbTag; -}; - -export type NewSqsTrigger = { - /** - * The full URL of the AWS SQS queue to poll for messages - */ - queue_url: string; - /** - * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect - */ - aws_auth_resource_type: AwsAuthResourceType; - /** - * Path to the AWS resource containing credentials or OIDC configuration - */ - aws_resource_path: string; - /** - * Array of SQS message attribute names to include with each message - */ - message_attributes?: Array<(string)> | null; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditSqsTrigger = { - /** - * The full URL of the AWS SQS queue to poll for messages - */ - queue_url: string; - /** - * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect - */ - aws_auth_resource_type: AwsAuthResourceType; - /** - * Path to the AWS resource containing credentials or OIDC configuration - */ - aws_resource_path: string; - /** - * Array of SQS message attribute names to include with each message - */ - message_attributes?: Array<(string)> | null; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type Slot = { - name?: string; -}; - -export type SlotList = { - slot_name?: string; - active?: boolean; -}; - -export type PublicationData = { - table_to_track?: Array; - transaction_to_track: Array<(string)>; -}; - -export type TableToTrack = Array<{ - table_name: string; - columns_name?: Array<(string)>; - where_clause?: string; -}>; - -export type Relations = { - schema_name: string; - table_to_track: TableToTrack; -}; - -export type Language = 'Typescript'; - -export type TemplateScript = { - postgres_resource_path: string; - relations: Array; - language: Language; -}; - -export type PostgresTrigger = TriggerExtraProperty & { - /** - * Path to the PostgreSQL resource containing connection configuration - */ - postgres_resource_path: string; - /** - * Name of the PostgreSQL publication to subscribe to for change data capture - */ - publication_name: string; - /** - * ID of the server currently handling this trigger (internal) - */ - server_id?: string; - /** - * Name of the PostgreSQL logical replication slot to use - */ - replication_slot_name: string; - /** - * Last error message if the trigger failed - */ - error?: string; - /** - * Timestamp of last server heartbeat (internal) - */ - last_server_ping?: string; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type NewPostgresTrigger = { - /** - * Name of the PostgreSQL logical replication slot to use - */ - replication_slot_name?: string; - /** - * Name of the PostgreSQL publication to subscribe to for change data capture - */ - publication_name?: string; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when database changes are detected - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * Path to the PostgreSQL resource containing connection configuration - */ - postgres_resource_path: string; - /** - * Configuration for creating/managing the publication (tables, operations) - */ - publication?: PublicationData; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditPostgresTrigger = { - /** - * Name of the PostgreSQL logical replication slot to use - */ - replication_slot_name: string; - /** - * Name of the PostgreSQL publication to subscribe to for change data capture - */ - publication_name: string; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when database changes are detected - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - mode?: TriggerMode; - /** - * Path to the PostgreSQL resource containing connection configuration - */ - postgres_resource_path: string; - /** - * Configuration for creating/managing the publication (tables, operations) - */ - publication?: PublicationData; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type KafkaTrigger = TriggerExtraProperty & { - /** - * Path to the Kafka resource containing connection configuration - */ - kafka_resource_path: string; - /** - * Kafka consumer group ID for this trigger - */ - group_id: string; - /** - * Array of Kafka topic names to subscribe to - */ - topics: Array<(string)>; - filters: Array<{ - key: string; - value: unknown; - }>; - /** - * Initial offset behavior when consumer group has no committed offset. 'latest' starts from new messages only, 'earliest' starts from the beginning. - */ - auto_offset_reset?: 'latest' | 'earliest'; - /** - * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. - */ - auto_commit?: boolean; - /** - * ID of the server currently handling this trigger (internal) - */ - server_id?: string; - /** - * Timestamp of last server heartbeat (internal) - */ - last_server_ping?: string; - /** - * Last error message if the trigger failed - */ - error?: string; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type NewKafkaTrigger = { - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * Path to the Kafka resource containing connection configuration - */ - kafka_resource_path: string; - /** - * Kafka consumer group ID for this trigger - */ - group_id: string; - /** - * Array of Kafka topic names to subscribe to - */ - topics: Array<(string)>; - filters: Array<{ - key: string; - value: unknown; - }>; - /** - * Initial offset behavior when consumer group has no committed offset. - */ - auto_offset_reset?: 'latest' | 'earliest'; - /** - * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. - */ - auto_commit?: boolean; - mode?: TriggerMode; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditKafkaTrigger = { - /** - * Path to the Kafka resource containing connection configuration - */ - kafka_resource_path: string; - /** - * Kafka consumer group ID for this trigger - */ - group_id: string; - /** - * Array of Kafka topic names to subscribe to - */ - topics: Array<(string)>; - filters: Array<{ - key: string; - value: unknown; - }>; - /** - * Initial offset behavior when consumer group has no committed offset. - */ - auto_offset_reset?: 'latest' | 'earliest'; - /** - * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. - */ - auto_commit?: boolean; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type NatsTrigger = TriggerExtraProperty & { - /** - * Path to the NATS resource containing connection configuration - */ - nats_resource_path: string; - /** - * If true, uses NATS JetStream for durable message delivery - */ - use_jetstream: boolean; - /** - * JetStream stream name (required when use_jetstream is true) - */ - stream_name?: string | null; - /** - * JetStream consumer name (required when use_jetstream is true) - */ - consumer_name?: string | null; - /** - * Array of NATS subjects to subscribe to - */ - subjects: Array<(string)>; - /** - * ID of the server currently handling this trigger (internal) - */ - server_id?: string; - /** - * Timestamp of last server heartbeat (internal) - */ - last_server_ping?: string; - /** - * Last error message if the trigger failed - */ - error?: string; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; -}; - -export type NewNatsTrigger = { - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * Path to the NATS resource containing connection configuration - */ - nats_resource_path: string; - /** - * If true, uses NATS JetStream for durable message delivery - */ - use_jetstream: boolean; - /** - * JetStream stream name (required when use_jetstream is true) - */ - stream_name?: string | null; - /** - * JetStream consumer name (required when use_jetstream is true) - */ - consumer_name?: string | null; - /** - * Array of NATS subjects to subscribe to - */ - subjects: Array<(string)>; - mode?: TriggerMode; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditNatsTrigger = { - /** - * Path to the NATS resource containing connection configuration - */ - nats_resource_path: string; - /** - * If true, uses NATS JetStream for durable message delivery - */ - use_jetstream: boolean; - /** - * JetStream stream name (required when use_jetstream is true) - */ - stream_name?: string | null; - /** - * JetStream consumer name (required when use_jetstream is true) - */ - consumer_name?: string | null; - /** - * Array of NATS subjects to subscribe to - */ - subjects: Array<(string)>; - /** - * The unique path identifier for this trigger - */ - path: string; - /** - * Path to the script or flow to execute when a message is received - */ - script_path: string; - /** - * True if script_path points to a flow, false if it points to a script - */ - is_flow: boolean; - /** - * Path to a script or flow to run when the triggered job fails - */ - error_handler_path?: string; - /** - * Arguments to pass to the error handler - */ - error_handler_args?: ScriptArgs; - /** - * Retry configuration for failed executions - */ - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EmailTrigger = TriggerExtraProperty & { - local_part: string; - workspaced_local_part?: boolean; - error_handler_path?: string; - error_handler_args?: ScriptArgs; - retry?: Retry; -}; - -export type NewEmailTrigger = { - path: string; - script_path: string; - local_part: string; - workspaced_local_part?: boolean; - is_flow: boolean; - error_handler_path?: string; - error_handler_args?: ScriptArgs; - retry?: Retry; - mode?: TriggerMode; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type EditEmailTrigger = { - path: string; - script_path: string; - local_part?: string; - workspaced_local_part?: boolean; - is_flow: boolean; - error_handler_path?: string; - error_handler_args?: ScriptArgs; - retry?: Retry; - /** - * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. - */ - permissioned_as?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. - */ - preserve_permissioned_as?: boolean; -}; - -export type Group = { - name: string; - summary?: string; - members?: Array<(string)>; - extra_perms?: { - [key: string]: (boolean); - }; -}; - -export type InstanceGroup = { - name: string; - summary?: string; - emails?: Array<(string)>; - instance_role?: 'superadmin' | 'devops' | null; -}; - -export type InstanceGroupWithWorkspaces = { - name: string; - summary?: string; - emails?: Array<(string)>; - instance_role?: 'superadmin' | 'devops' | null; - workspaces?: Array; -}; - -export type WorkspaceInfo = { - workspace_id?: string; - workspace_name?: string; - role?: string; -}; - -export type Folder = { - name: string; - owners: Array<(string)>; - extra_perms: { - [key: string]: (boolean); - }; - summary?: string; - created_by?: string; - edited_at?: string; -}; - -export type WorkerPing = { - worker: string; - worker_instance: string; - last_ping?: number; - started_at: string; - ip: string; - jobs_executed: number; - custom_tags?: Array<(string)>; - worker_group: string; - wm_version: string; - last_job_id?: string; - last_job_workspace_id?: string; - occupancy_rate?: number; - occupancy_rate_15s?: number; - occupancy_rate_5m?: number; - occupancy_rate_30m?: number; - memory?: number; - vcpus?: number; - memory_usage?: number; - wm_memory_usage?: number; - job_isolation?: string; - native_mode?: boolean; -}; - -export type UserWorkspaceList = { - email: string; - workspaces: Array<{ - id: string; - name: string; - username: string; - color: string; - operator_settings?: OperatorSettings; - parent_workspace_id?: string | null; - created_by?: string | null; - disabled: boolean; - }>; -}; - -export type CreateWorkspace = { - id: string; - name: string; - username?: string; - color?: string; -}; - -export type CreateWorkspaceFork = { - id: string; - name: string; - color?: string; -}; - -export type Workspace = { - id: string; - name: string; - owner: string; - domain?: string; - color?: string; - parent_workspace_id?: string | null; -}; - -export type DependencyMap = { - workspace_id?: string | null; - importer_path?: string | null; - importer_kind?: string | null; - imported_path?: string | null; - importer_node_id?: string | null; -}; - -export type DependencyDependent = { - importer_path: string; - importer_kind: 'script' | 'flow' | 'app'; - importer_node_ids?: Array<(string)> | null; -}; - -export type DependentsAmount = { - imported_path: string; - count: number; -}; - -export type WorkspaceInvite = { - workspace_id: string; - email: string; - is_admin: boolean; - operator: boolean; - parent_workspace_id?: string | null; -}; - -export type GlobalUserInfo = { - email: string; - login_type: 'password' | 'github'; - super_admin: boolean; - devops?: boolean; - verified: boolean; - name?: string; - company?: string; - username?: string; - operator_only?: boolean; - first_time_user: boolean; - role_source: 'manual' | 'instance_group'; - disabled: boolean; -}; - -export type Flow = OpenFlow & FlowMetadata & { - lock_error_logs?: string; - version_id?: number; -}; - -export type ExtraPerms = { - [key: string]: (boolean); -}; - -export type FlowMetadata = { - workspace_id?: string; - path: string; - edited_by: string; - edited_at: string; - archived: boolean; - extra_perms: ExtraPerms; - starred?: boolean; - draft_only?: boolean; - tag?: string; - ws_error_handler_muted?: boolean; - priority?: number; - dedicated_worker?: boolean; - timeout?: number; - visible_to_runner_only?: boolean; - on_behalf_of_email?: string; -}; - -export type OpenFlowWPath = OpenFlow & { - path: string; - tag?: string; - ws_error_handler_muted?: boolean; - priority?: number; - dedicated_worker?: boolean; - timeout?: number; - visible_to_runner_only?: boolean; - on_behalf_of_email?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email value instead of overwriting it. - */ - preserve_on_behalf_of?: boolean; -}; - -export type FlowPreview = { - value: FlowValue; - path?: string; - args: ScriptArgs; - tag?: string; - restarted_from?: RestartedFrom; -}; - -export type RestartedFrom = { - flow_job_id?: string; - step_id?: string; - branch_or_iteration_n?: number; - flow_version?: number; -}; - -export type Policy = { - triggerables?: { - [key: string]: { - [key: string]: unknown; - }; - }; - triggerables_v2?: { - [key: string]: { - [key: string]: unknown; - }; - }; - s3_inputs?: Array<{ - [key: string]: unknown; - }>; - allowed_s3_keys?: Array<{ - s3_path?: string; - resource?: string; - }>; - execution_mode?: 'viewer' | 'publisher' | 'anonymous'; - on_behalf_of?: string; - on_behalf_of_email?: string; -}; - -export type ListableApp = { - id: number; - workspace_id: string; - path: string; - summary: string; - version: number; - extra_perms: { - [key: string]: (boolean); - }; - starred?: boolean; - edited_at: string; - execution_mode: 'viewer' | 'publisher' | 'anonymous'; - raw_app?: boolean; -}; - -export type ScopeDefinition = { - value: string; - label: string; - description?: string | null; - requires_resource_path: boolean; -}; - -export type ScopeDomain = { - name: string; - description?: string | null; - scopes: Array; -}; - -export type ListableRawApp = { - workspace_id: string; - path: string; - summary: string; - extra_perms: { - [key: string]: (boolean); - }; - starred?: boolean; - version: number; - edited_at: string; -}; - -export type AppWithLastVersion = { - id: number; - workspace_id: string; - path: string; - summary: string; - versions: Array<(number)>; - created_by: string; - created_at: string; - value: unknown; - policy: Policy; - execution_mode: 'viewer' | 'publisher' | 'anonymous'; - extra_perms: { - [key: string]: (boolean); - }; - custom_path?: string; - raw_app: boolean; - bundle_secret?: string; -}; - -export type AppWithLastVersionWDraft = AppWithLastVersion & { - draft_only?: boolean; - draft?: unknown; -}; - -export type AppHistory = { - version: number; - deployment_msg?: string; -}; - -export type FlowVersion = { - id: number; - created_at: string; - deployment_msg?: string; -}; - -export type SlackToken = { - access_token: string; - team_id: string; - team_name: string; - bot: { - bot_access_token?: string; - }; -}; - -export type TokenResponse = { - access_token: string; - expires_in?: number; - refresh_token?: string; - scope?: Array<(string)>; - grant_type?: string; -}; - -export type HubScriptKind = 'script' | 'failure' | 'trigger' | 'approval'; - -export type PolarsClientKwargs = { - region_name: string; -}; - -export type LargeFileStorage = { - type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc' | 'GoogleCloudStorage'; - s3_resource_path?: string; - azure_blob_resource_path?: string; - gcs_resource_path?: string; - public_resource?: boolean; - advanced_permissions?: Array; - secondary_storage?: { - [key: string]: { - type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc' | 'GoogleCloudStorage'; - s3_resource_path?: string; - azure_blob_resource_path?: string; - gcs_resource_path?: string; - public_resource?: boolean; - }; - }; -}; - -export type DucklakeSettings = { - ducklakes: { - [key: string]: { - catalog: { - resource_type: 'postgresql' | 'mysql' | 'instance'; - resource_path?: string; - }; - storage: { - storage?: string; - path: string; - }; - extra_args?: string; - }; - }; -}; - -export type DataTableSettings = { - datatables: { - [key: string]: { - database: { - resource_type: 'postgresql' | 'instance'; - resource_path?: string; - }; - }; - }; -}; - -export type DataTableSchema = { - datatable_name: string; - /** - * Hierarchical schema: schema_name -> table_name -> column_name -> compact_type (e.g. 'int4', 'text?', 'int4?=0') - */ - schemas: { - [key: string]: { - [key: string]: { - [key: string]: (string); - }; - }; - }; - error?: string; -}; - -export type DynamicInputData = { - /** - * Name of the function to execute for dynamic select - */ - entrypoint_function: string; - /** - * Arguments to pass to the function - */ - args?: { - [key: string]: unknown; - }; - runnable_ref: { - source: 'deployed'; - /** - * Path to the deployed script or flow - */ - path: string; - runnable_kind: RunnableKind; -} | { - source: 'inline'; - /** - * Code content for inline execution - */ - code: string; - language?: ScriptLang; -}; -}; - -export type WindmillLargeFile = { - s3: string; -}; - -export type WindmillFileMetadata = { - mime_type?: string; - size_in_bytes?: number; - last_modified?: string; - expires?: string; - version_id?: string; -}; - -export type WindmillFilePreview = { - msg?: string; - content?: string; - content_type: 'RawText' | 'Csv' | 'Parquet' | 'Unknown'; -}; - -export type S3Resource = { - bucket: string; - region: string; - endPoint: string; - useSSL: boolean; - accessKey?: string; - secretKey?: string; - pathStyle: boolean; -}; - -export type WorkspaceGitSyncSettings = { - repositories?: Array; -}; - -export type WorkspaceDeployUISettings = { - include_path?: Array<(string)>; - include_type?: Array; -}; - -export type WorkspaceDefaultScripts = { - order?: Array<(string)>; - hidden?: Array<(string)>; - default_script_content?: unknown; -}; - -export type S3PermissionRule = { - pattern: string; - allow: string; -}; - -export type GitRepositorySettings = { - script_path?: string; - git_repo_resource_path: string; - use_individual_branch?: boolean; - group_by_folder?: boolean; - force_branch?: string; - collapsed?: boolean; - settings?: { - include_path?: Array<(string)>; - include_type?: Array; - exclude_path?: Array<(string)>; - extra_include_path?: Array<(string)>; - }; - exclude_types_override?: Array; -}; - -export type MetricMetadata = { - id: string; - name?: string; -}; - -export type ScalarMetric = { - metric_id?: string; - value: number; -}; - -export type TimeseriesMetric = { - metric_id?: string; - values: Array; -}; - -export type MetricDataPoint = { - timestamp: string; - value: number; -}; - -export type RawScriptForDependencies = { - raw_code: string; - path: string; - language: ScriptLang; -}; - -export type ConcurrencyGroup = { - concurrency_key: string; - total_running: number; -}; - -export type ExtendedJobs = { - jobs: Array; - obscured_jobs: Array; - /** - * Obscured jobs omitted for security because of too specific filtering - */ - omitted_obscured_jobs?: boolean; -}; - -export type ExportedUser = { - email: string; - password_hash?: string; - super_admin: boolean; - verified: boolean; - name?: string; - company?: string; - first_time_user: boolean; - username?: string; -}; - -export type GlobalSetting = { - name: string; - value: unknown; -}; - -/** - * Unified instance configuration combining global settings and worker group configs - */ -export type InstanceConfig = { - /** - * Global settings keyed by setting name. Known fields include base_url, license_key, retention_period_secs, smtp_settings, otel, etc. Unknown fields are preserved as-is. - * - */ - global_settings?: { - [key: string]: unknown; - }; - /** - * Worker group configurations keyed by group name (e.g. "default", "gpu"). Each value contains worker_tags, init_bash, autoscaling, etc. - * - */ - worker_configs?: { - [key: string]: { - [key: string]: unknown; - }; - }; -}; - -export type Config = { - name: string; - config?: { - [key: string]: unknown; - }; -}; - -export type ExportedInstanceGroup = { - name: string; - summary?: string; - emails?: Array<(string)>; - id?: string; - scim_display_name?: string; - external_id?: string; - instance_role?: 'superadmin' | 'devops' | null; -}; - -export type JobSearchHit = { - dancer?: string; -}; - -export type LogSearchHit = { - dancer?: string; -}; - -export type AutoscalingEvent = { - id?: number; - worker_group?: string; - event_type?: string; - desired_workers?: number; - reason?: string; - applied_at?: string; -}; - -export type CriticalAlert = { - /** - * Unique identifier for the alert - */ - id?: number; - /** - * Type of alert (e.g., critical_error) - */ - alert_type?: string; - /** - * The message content of the alert - */ - message?: string; - /** - * Time when the alert was created - */ - created_at?: string; - /** - * Acknowledgment status of the alert, can be true, false, or null if not set - */ - acknowledged?: boolean | null; - /** - * Workspace id if the alert is in the scope of a workspace - */ - workspace_id?: string | null; -}; - -export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'default_email' | 'nats' | 'postgres' | 'sqs' | 'mqtt' | 'gcp' | 'email'; - -export type Capture = { - trigger_kind: CaptureTriggerKind; - main_args: unknown; - preprocessor_args: unknown; - id: number; - created_at: string; -}; - -export type CaptureConfig = { - trigger_config?: unknown; - trigger_kind: CaptureTriggerKind; - error?: string; - last_server_ping?: string; -}; - -export type OperatorSettings = { - /** - * Whether operators can view runs - */ - runs: boolean; - /** - * Whether operators can view schedules - */ - schedules: boolean; - /** - * Whether operators can view resources - */ - resources: boolean; - /** - * Whether operators can view variables - */ - variables: boolean; - /** - * Whether operators can view assets - */ - assets: boolean; - /** - * Whether operators can view audit logs - */ - audit_logs: boolean; - /** - * Whether operators can view triggers - */ - triggers: boolean; - /** - * Whether operators can view groups page - */ - groups: boolean; - /** - * Whether operators can view folders page - */ - folders: boolean; - /** - * Whether operators can view workers page - */ - workers: boolean; -} | null; - -export type WorkspaceComparison = { - /** - * All items with changes ahead are visible by the user of the request. - */ - all_ahead_items_visible: boolean; - /** - * All items with changes behind are visible by the user of the request. - */ - all_behind_items_visible: boolean; - /** - * Whether the comparison was skipped. This happens with old forks that where not being kept track of - */ - skipped_comparison: boolean; - /** - * List of differences found between workspaces - */ - diffs: Array; - /** - * Summary statistics of the comparison - */ - summary: CompareSummary; -}; - -export type WorkspaceItemDiff = { - /** - * Type of the item - */ - kind: 'script' | 'flow' | 'app' | 'raw_app' | 'resource' | 'variable' | 'resource_type'; - /** - * Path of the item in the workspace - */ - path: string; - /** - * Number of versions source is ahead of target - */ - ahead: number; - /** - * Number of versions source is behind target - */ - behind: number; - /** - * Whether the item has any differences - */ - has_changes: boolean; - /** - * If the item exists in the source workspace - */ - exists_in_source: boolean; - /** - * If the item exists in the fork workspace - */ - exists_in_fork: boolean; -}; - -export type CompareSummary = { - /** - * Total number of items with differences - */ - total_diffs: number; - /** - * Total number of ahead changes - */ - total_ahead: number; - /** - * Total number of behind changes - */ - total_behind: number; - /** - * Number of scripts with differences - */ - scripts_changed: number; - /** - * Number of flows with differences - */ - flows_changed: number; - /** - * Number of apps with differences - */ - apps_changed: number; - /** - * Number of resources with differences - */ - resources_changed: number; - /** - * Number of variables with differences - */ - variables_changed: number; - /** - * Number of resource types with differences - */ - resource_types_changed: number; - /** - * Number of folders with differences - */ - folders_changed: number; - /** - * Number of items that are both ahead and behind (conflicts) - */ - conflicts: number; -}; - -export type TeamInfo = { - /** - * The unique identifier of the Microsoft Teams team - */ - team_id: string; - /** - * The display name of the Microsoft Teams team - */ - team_name: string; - /** - * List of channels within the team - */ - channels: Array; -}; - -export type ChannelInfo = { - /** - * The unique identifier of the channel - */ - channel_id: string; - /** - * The display name of the channel - */ - channel_name: string; - /** - * The Microsoft Teams tenant identifier - */ - tenant_id: string; - /** - * The service URL for the channel - */ - service_url: string; -}; - -export type GithubInstallations = Array<{ - workspace_id?: string; - installation_id: number; - account_id: string; - repositories: Array<{ - name: string; - url: string; - }>; - /** - * Total number of repositories available for this installation - */ - total_count: number; - /** - * Number of repositories loaded per page - */ - per_page: number; - /** - * Error message if token retrieval failed - */ - error?: string; -}>; - -export type WorkspaceGithubInstallation = { - account_id: string; - installation_id: number; -}; - -export type S3Object = { - s3: string; - filename?: string; - storage?: string; - presigned?: string; -}; - -export type TeamsChannel = { - /** - * Microsoft Teams team ID - */ - team_id: string; - /** - * Microsoft Teams team name - */ - team_name: string; - /** - * Microsoft Teams channel ID - */ - channel_id: string; - /** - * Microsoft Teams channel name - */ - channel_name: string; -}; - -export type AssetUsageKind = 'script' | 'flow' | 'job'; - -export type AssetUsageAccessType = 'r' | 'w' | 'rw'; - -export type AssetKind = 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume'; - -export type Asset = { - path: string; - kind: AssetKind; -}; - -export type Volume = { - name: string; - size_bytes: number; - file_count: number; - created_at: string; - created_by: string; - updated_at?: string | null; - last_used_at?: string | null; - extra_perms?: { - [key: string]: unknown; - }; -}; - -/** - * A workspace protection rule defining restrictions and bypass permissions - */ -export type ProtectionRuleset = { - /** - * Unique name for the protection rule - */ - name: string; - workspace_id?: string; - rules: ProtectionRules; - bypass_groups: RuleBypasserGroups; - bypass_users: RuleBypasserUsers; -}; - -/** - * Configuration of protection restrictions - */ -export type ProtectionRules = Array; - -export type ProtectionRuleKind = 'DisableDirectDeployment' | 'DisableWorkspaceForking'; - -/** - * Groups that can bypass this ruleset - */ -export type RuleBypasserGroups = Array<(string)>; - -/** - * Users that can bypass this ruleset - */ -export type RuleBypasserUsers = Array<(string)>; - -export type QuotaInfo = { - used: number; - limit: number; - prunable: number; -}; - -export type NativeServiceName = 'nextcloud' | 'google'; - -/** - * A native trigger stored in Windmill - */ -export type NativeTrigger = { - /** - * The unique identifier from the external service - */ - external_id: string; - /** - * The workspace this trigger belongs to - */ - workspace_id: string; - service_name: NativeServiceName; - /** - * The path to the script or flow that will be triggered - */ - script_path: string; - /** - * Whether the trigger targets a flow (true) or a script (false) - */ - is_flow: boolean; - /** - * Configuration for the trigger including event_type and service_config - */ - service_config: { - [key: string]: unknown; - }; - /** - * Error message if the trigger is in an error state - */ - error?: string | null; - /** - * Short summary to be displayed when listed - */ - summary?: string | null; -}; - -/** - * Full trigger response containing both Windmill data and external service data - */ -export type NativeTriggerWithExternal = { - /** - * The unique identifier from the external service - */ - external_id: string; - /** - * The workspace this trigger belongs to - */ - workspace_id: string; - service_name: NativeServiceName; - /** - * The path to the script or flow that will be triggered - */ - script_path: string; - /** - * Whether the trigger targets a flow (true) or a script (false) - */ - is_flow: boolean; - /** - * Configuration for the trigger including event_type and service_config - */ - service_config: { - [key: string]: unknown; - }; - /** - * Error message if the trigger is in an error state - */ - error?: string | null; - /** - * Short summary to be displayed when listed - */ - summary?: string | null; - /** - * Configuration data from the external service - */ - external_data: { - [key: string]: unknown; - }; -}; - -export type WorkspaceIntegrations = { - service_name: NativeServiceName; - oauth_data?: WorkspaceOAuthConfig | null; - /** - * Path to the resource storing the OAuth token - */ - resource_path?: string | null; -}; - -export type WorkspaceOAuthConfig = { - /** - * The OAuth client ID for the workspace - */ - client_id: string; - /** - * The OAuth client secret for the workspace - */ - client_secret: string; - /** - * The base URL of the workspace - */ - base_url: string; - /** - * The OAuth redirect URI - */ - redirect_uri: string; -}; - -export type WebhookEvent = { - type: 'webhook'; - request_type: WebhookRequestType; -}; - -/** - * The type of webhook request (define possible values here) - */ -export type WebhookRequestType = 'async' | 'sync'; - -export type RedirectUri = { - redirect_uri: string; -}; - -/** - * Data for creating or updating a native trigger - */ -export type NativeTriggerData = { - /** - * The path to the script or flow that will be triggered - */ - script_path: string; - /** - * Whether the trigger targets a flow (true) or a script (false) - */ - is_flow: boolean; - /** - * Service-specific configuration (e.g., event types, filters) - */ - service_config: { - [key: string]: unknown; - }; - /** - * Short summary to be displayed when listed - */ - summary?: string | null; -}; - -/** - * Response returned when a native trigger is created - */ -export type CreateTriggerResponse = { - /** - * The external ID of the created trigger from the external service - */ - external_id: string; -}; - -export type SyncResult = { - already_in_sync: boolean; - added_count: number; - added_triggers: Array<(string)>; - total_external: number; - total_windmill: number; -}; - -export type NextCloudEventType = { - id: string; - name: string; - description?: string; - category?: string; - path: string; -}; - -export type GoogleCalendarEntry = { - id: string; - summary: string; - primary?: boolean; -}; - -export type GoogleDriveFile = { - id: string; - name: string; - mime_type: string; - is_folder?: boolean; -}; - -export type GoogleDriveFilesResponse = { - files: Array; - next_page_token?: string; -}; - -export type SharedDriveEntry = { - id: string; - name: string; -}; - -export type ParameterId = string; - -export type ParameterKey = string; - -export type ParameterWorkspaceId = string; - -/** - * The name of the publication - */ -export type ParameterPublicationName = string; - -export type ParameterVersionId = number; - -export type ParameterToken = string; - -export type ParameterAccountId = number; - -export type ParameterClientName = string; - -export type ParameterScriptPath = string; - -export type ParameterScriptHash = string; - -export type ParameterJobId = string; - -export type ParameterPath = string; - -export type ParameterCustomPath = string; - -export type ParameterPathId = number; - -export type ParameterPathVersion = number; - -export type ParameterName = string; - -/** - * which page to return (start at 1, default 1) - */ -export type ParameterPage = number; - -/** - * number of items to return for a given page (default 30, max 100) - */ -export type ParameterPerPage = number; - -/** - * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') - */ -export type ParameterJobTriggerKind = string; - -/** - * order by desc order (default true) - */ -export type ParameterOrderDesc = boolean; - -/** - * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - */ -export type ParameterCreatedBy = string; - -/** - * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') - */ -export type ParameterLabel = string; - -/** - * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') - */ -export type ParameterWorker = string; - -/** - * The parent job that is at the origin and responsible for the execution of this script if any - */ -export type ParameterParentJob = string; - -/** - * Override the tag to use - */ -export type ParameterWorkerTag = string; - -/** - * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - */ -export type ParameterCacheTtl = string; - -/** - * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - */ -export type ParameterNewJobId = string; - -/** - * List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - */ -export type ParameterIncludeHeader = string; - -/** - * The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - */ -export type ParameterQueueLimit = string; - -/** - * skip the preprocessor - */ -export type ParameterSkipPreprocessor = boolean; - -/** - * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - */ -export type ParameterPayload = string; - -/** - * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') - */ -export type ParameterScriptStartPath = string; - -/** - * mask to filter by schedule path - */ -export type ParameterSchedulePath = string; - -/** - * filter by trigger path. Supports comma-separated list (e.g. 'f/trigger1,f/trigger2') and negation by prefixing all values with '!' (e.g. '!f/trigger1,!f/trigger2') - */ -export type ParameterTriggerPath = string; - -/** - * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') - */ -export type ParameterScriptExactPath = string; - -/** - * mask to filter exact matching path - */ -export type ParameterScriptExactHash = string; - -/** - * filter on created before (inclusive) timestamp - */ -export type ParameterCreatedBefore = string; - -/** - * filter on created after (exclusive) timestamp - */ -export type ParameterCreatedAfter = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterStartedBefore = string; - -/** - * filter on started after (exclusive) timestamp - */ -export type ParameterStartedAfter = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterBefore = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterCompletedBefore = string; - -/** - * filter on started after (exclusive) timestamp - */ -export type ParameterCompletedAfter = string; - -/** - * filter on jobs created after X for jobs in the queue only - */ -export type ParameterCreatedAfterQueue = string; - -/** - * filter on jobs created before X for jobs in the queue only - */ -export type ParameterCreatedBeforeQueue = string; - -/** - * filter on successful jobs - */ -export type ParameterSuccess = boolean; - -/** - * filter on jobs scheduled_for before now (hence waitinf for a worker) - */ -export type ParameterScheduledForBeforeNow = boolean; - -/** - * filter on suspended jobs - */ -export type ParameterSuspended = boolean; - -/** - * filter on running jobs - */ -export type ParameterRunning = boolean; - -/** - * allow wildcards (*) in the filter of label, tag, worker - */ -export type ParameterAllowWildcards = boolean; - -/** - * filter on jobs containing those args as a json subset (@> in postgres) - */ -export type ParameterArgsFilter = string; - -/** - * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') - */ -export type ParameterTag = string; - -/** - * filter on jobs containing those result as a json subset (@> in postgres) - */ -export type ParameterResultFilter = string; - -/** - * filter on created after (exclusive) timestamp - */ -export type ParameterAfter = string; - -/** - * filter on exact username of user - */ -export type ParameterUsername = string; - -/** - * filter on exact or prefix name of operation - */ -export type ParameterOperation = string; - -/** - * filter on exact or prefix name of resource - */ -export type ParameterResourceName = string; - -/** - * filter on type of operation - */ -export type ParameterActionKind = 'Create' | 'Update' | 'Delete' | 'Execute'; - -/** - * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') - */ -export type ParameterJobKinds = string; - -export type ParameterRunnableId = string; - -export type ParameterRunnableTypeQuery = RunnableType; - -export type ParameterInputId = string; - -export type ParameterGetStarted = boolean; - -export type ParameterConcurrencyId = string; - -export type ParameterRunnableKind = 'script' | 'flow'; - -export type BackendVersionResponse = string; - -export type BackendUptodateResponse = string; - -export type GetLicenseIdResponse = string; - -export type GetOpenApiYamlResponse = string; - -export type GetHealthStatusData = { - /** - * Force a fresh check, bypassing the cache - */ - force?: boolean; -}; - -export type GetHealthStatusResponse = HealthStatusResponse; - -export type GetHealthDetailedResponse = DetailedHealthResponse; - -export type QueryDocumentationData = { - /** - * query to send to the AI documentation assistant - */ - requestBody: { - /** - * The documentation query to send to the AI assistant - */ - query: string; - }; -}; - -export type QueryDocumentationResponse = { - [key: string]: unknown; -}; - -export type GetAuditLogData = { - id: number; - workspace: string; -}; - -export type GetAuditLogResponse = AuditLog; - -export type ListAuditLogsData = { - /** - * filter on type of operation - */ - actionKind?: 'Create' | 'Update' | 'Delete' | 'Execute'; - /** - * filter on created after (exclusive) timestamp - */ - after?: string; - /** - * get audit logs for all workspaces - */ - allWorkspaces?: boolean; - /** - * filter on started before (inclusive) timestamp - */ - before?: string; - /** - * comma separated list of operations to exclude - */ - excludeOperations?: string; - /** - * filter on exact or prefix name of operation - */ - operation?: string; - /** - * comma separated list of exact operations to include - */ - operations?: string; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * filter on exact or prefix name of resource - */ - resource?: string; - /** - * filter on exact username of user - */ - username?: string; - workspace: string; -}; - -export type ListAuditLogsResponse = Array; - -export type LoginData = { - /** - * credentials - */ - requestBody: Login; -}; - -export type LoginResponse = string; - -export type LogoutResponse = string; - -export type IsSmtpConfiguredResponse = boolean; - -export type RequestPasswordResetData = { - /** - * email to send password reset link to - */ - requestBody: { - email: string; - }; -}; - -export type RequestPasswordResetResponse = PasswordResetResponse; - -export type ResetPasswordData = { - /** - * token and new password - */ - requestBody: { - token: string; - new_password: string; - }; -}; - -export type ResetPasswordResponse = PasswordResetResponse; - -export type GetUserData = { - username: string; - workspace: string; -}; - -export type GetUserResponse = User; - -export type UpdateUserData = { - /** - * new user - */ - requestBody: EditWorkspaceUser; - username: string; - workspace: string; -}; - -export type UpdateUserResponse = string; - -export type IsOwnerOfPathData = { - path: string; - workspace: string; -}; - -export type IsOwnerOfPathResponse = boolean; - -export type SetPasswordData = { - /** - * set password - */ - requestBody: { - password: string; - }; -}; - -export type SetPasswordResponse = string; - -export type SetPasswordForUserData = { - /** - * set password - */ - requestBody: { - password: string; - }; - user: string; -}; - -export type SetPasswordForUserResponse = string; - -export type SetLoginTypeForUserData = { - /** - * set login type - */ - requestBody: { - login_type: string; - }; - user: string; -}; - -export type SetLoginTypeForUserResponse = string; - -export type CreateUserGloballyData = { - /** - * user info - */ - requestBody: { - email: string; - password: string; - super_admin: boolean; - name?: string; - company?: string; - /** - * Skip sending email notifications to the user - */ - skip_email?: boolean; - }; -}; - -export type CreateUserGloballyResponse = string; - -export type GlobalUserUpdateData = { - email: string; - /** - * new user info - */ - requestBody: { - is_super_admin?: boolean; - is_devops?: boolean; - name?: string; - disabled?: boolean; - }; -}; - -export type GlobalUserUpdateResponse = string; - -export type GlobalUsernameInfoData = { - email: string; -}; - -export type GlobalUsernameInfoResponse = { - username: string; - workspace_usernames: Array<{ - workspace_id: string; - username: string; - }>; -}; - -export type GlobalUserRenameData = { - email: string; - /** - * new username - */ - requestBody: { - new_username: string; - }; -}; - -export type GlobalUserRenameResponse = string; - -export type GlobalUserDeleteData = { - email: string; -}; - -export type GlobalUserDeleteResponse = string; - -export type GlobalUsersOverwriteData = { - /** - * List of users - */ - requestBody: Array; -}; - -export type GlobalUsersOverwriteResponse = string; - -export type GlobalUsersExportResponse = Array; - -export type SubmitOnboardingDataData = { - requestBody: { - touch_point?: string; - use_case?: string; - }; -}; - -export type SubmitOnboardingDataResponse = string; - -export type DeleteUserData = { - username: string; - workspace: string; -}; - -export type DeleteUserResponse = string; - -export type ConvertUserToGroupData = { - username: string; - workspace: string; -}; - -export type ConvertUserToGroupResponse = string; - -export type GetCurrentEmailResponse = string; - -export type RefreshUserTokenData = { - ifExpiringInLessThanS?: number; -}; - -export type RefreshUserTokenResponse = string; - -export type GetTutorialProgressResponse = { - progress?: number; - skipped_all?: boolean; -}; - -export type UpdateTutorialProgressData = { - /** - * progress update - */ - requestBody: { - progress?: number; - skipped_all?: boolean; - }; -}; - -export type UpdateTutorialProgressResponse = string; - -export type LeaveInstanceResponse = string; - -export type GetUsageResponse = number; - -export type GetRunnableResponse = { - workspace: string; - endpoint_async: string; - endpoint_sync: string; - summary: string; - description?: string; - kind: string; -}; - -export type GlobalWhoamiResponse = GlobalUserInfo; - -export type ListWorkspaceInvitesResponse = Array; - -export type WhoamiData = { - workspace: string; -}; - -export type WhoamiResponse = User; - -export type AcceptInviteData = { - /** - * accept invite - */ - requestBody: { - workspace_id: string; - username?: string; - }; -}; - -export type AcceptInviteResponse = string; - -export type DeclineInviteData = { - /** - * decline invite - */ - requestBody: { - workspace_id: string; - }; -}; - -export type DeclineInviteResponse = string; - -export type WhoisData = { - username: string; - workspace: string; -}; - -export type WhoisResponse = User; - -export type ExistsEmailData = { - email: string; -}; - -export type ExistsEmailResponse = boolean; - -export type ListUsersAsSuperAdminData = { - /** - * filter only active users - */ - activeOnly?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListUsersAsSuperAdminResponse = Array; - -export type ListUsersData = { - workspace: string; -}; - -export type ListUsersResponse = Array; - -export type ListUsersUsageData = { - workspace: string; -}; - -export type ListUsersUsageResponse = Array; - -export type ListUsernamesData = { - workspace: string; -}; - -export type ListUsernamesResponse = Array<(string)>; - -export type UsernameToEmailData = { - username: string; - workspace: string; -}; - -export type UsernameToEmailResponse = string; - -export type CreateTokenData = { - /** - * new token - */ - requestBody: NewToken; -}; - -export type CreateTokenResponse = string; - -export type CreateTokenImpersonateData = { - /** - * new token - */ - requestBody: NewTokenImpersonate; -}; - -export type CreateTokenImpersonateResponse = string; - -export type DeleteTokenData = { - tokenPrefix: string; -}; - -export type DeleteTokenResponse = string; - -export type ListTokensData = { - excludeEphemeral?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListTokensResponse = Array; - -export type LoginWithOauthData = { - clientName: string; - /** - * Partially filled script - */ - requestBody: { - code?: string; - state?: string; - }; -}; - -export type LoginWithOauthResponse = string; - -export type GetGlobalConnectedRepositoriesData = { - /** - * Page number for pagination (default 1) - */ - page?: number; -}; - -export type GetGlobalConnectedRepositoriesResponse = GithubInstallations; - -export type InstallFromWorkspaceData = { - requestBody: { - /** - * The ID of the workspace containing the installation to copy - */ - source_workspace_id: string; - /** - * The ID of the GitHub installation to copy - */ - installation_id: number; - }; - workspace: string; -}; - -export type InstallFromWorkspaceResponse = unknown; - -export type DeleteFromWorkspaceData = { - /** - * The ID of the GitHub installation to delete - */ - installationId: number; - workspace: string; -}; - -export type DeleteFromWorkspaceResponse = unknown; - -export type ExportInstallationData = { - installationId: number; - workspace: string; -}; - -export type ExportInstallationResponse = { - jwt_token?: string; -}; - -export type ImportInstallationData = { - requestBody: { - jwt_token: string; - }; - workspace: string; -}; - -export type ImportInstallationResponse = unknown; - -export type GhesInstallationCallbackData = { - requestBody: { - /** - * The GitHub App installation ID from GHES - */ - installation_id: number; - }; - workspace: string; -}; - -export type GhesInstallationCallbackResponse = unknown; - -export type GetGhesConfigResponse = { - base_url: string; - app_slug: string; - client_id: string; -}; - -export type ListWorkspacesResponse = Array; - -export type IsDomainAllowedResponse = boolean; - -export type ListUserWorkspacesResponse = UserWorkspaceList; - -export type GetWorkspaceAsSuperAdminData = { - workspace: string; -}; - -export type GetWorkspaceAsSuperAdminResponse = Workspace; - -export type ListWorkspacesAsSuperAdminData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListWorkspacesAsSuperAdminResponse = Array; - -export type CreateWorkspaceData = { - /** - * new token - */ - requestBody: CreateWorkspace; -}; - -export type CreateWorkspaceResponse = string; - -export type CreateWorkspaceForkGitBranchData = { - /** - * new forked workspace - */ - requestBody: CreateWorkspaceFork; - workspace: string; -}; - -export type CreateWorkspaceForkGitBranchResponse = Array<(string)>; - -export type CreateWorkspaceForkData = { - /** - * new forked workspace - */ - requestBody: CreateWorkspaceFork; - workspace: string; -}; - -export type CreateWorkspaceForkResponse = string; - -export type ExistsWorkspaceData = { - /** - * id of workspace - */ - requestBody: { - id: string; - }; -}; - -export type ExistsWorkspaceResponse = boolean; - -export type ExistsUsernameData = { - requestBody: { - id: string; - username: string; - }; -}; - -export type ExistsUsernameResponse = boolean; - -export type GetGithubAppTokenData = { - /** - * jwt job token - */ - requestBody: { - job_token: string; - }; - workspace: string; -}; - -export type GetGithubAppTokenResponse = { - token: string; -}; - -export type InviteUserData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - operator: boolean; - parent_workspace_id?: string | null; - }; - workspace: string; -}; - -export type InviteUserResponse = string; - -export type AddUserData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - username?: string; - operator: boolean; - }; - workspace: string; -}; - -export type AddUserResponse = string; - -export type DeleteInviteData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - operator: boolean; - }; - workspace: string; -}; - -export type DeleteInviteResponse = string; - -export type ArchiveWorkspaceData = { - workspace: string; -}; - -export type ArchiveWorkspaceResponse = string; - -export type UnarchiveWorkspaceData = { - workspace: string; -}; - -export type UnarchiveWorkspaceResponse = string; - -export type DeleteWorkspaceData = { - onlyDeleteForks?: boolean; - workspace: string; -}; - -export type DeleteWorkspaceResponse = string; - -export type LeaveWorkspaceData = { - workspace: string; -}; - -export type LeaveWorkspaceResponse = string; - -export type GetWorkspaceNameData = { - workspace: string; -}; - -export type GetWorkspaceNameResponse = string; - -export type ChangeWorkspaceNameData = { - requestBody?: { - new_name?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceNameResponse = string; - -export type ChangeWorkspaceIdData = { - requestBody?: { - new_id?: string; - new_name?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceIdResponse = string; - -export type ChangeWorkspaceColorData = { - requestBody?: { - color?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceColorResponse = string; - -export type UpdateOperatorSettingsData = { - requestBody: OperatorSettings; - workspace: string; -}; - -export type UpdateOperatorSettingsResponse = string; - -export type CompareWorkspacesData = { - /** - * The ID of the workspace to compare with - */ - targetWorkspaceId: string; - workspace: string; -}; - -export type CompareWorkspacesResponse = WorkspaceComparison; - -export type ResetDiffTallyData = { - /** - * The ID of the workspace to compare with - */ - forkWorkspaceId: string; - workspace: string; -}; - -export type ResetDiffTallyResponse = unknown; - -export type ListPendingInvitesData = { - workspace: string; -}; - -export type ListPendingInvitesResponse = Array; - -export type GetSettingsData = { - workspace: string; -}; - -export type GetSettingsResponse = { - workspace_id?: string; - slack_name?: string; - slack_team_id?: string; - slack_command_script?: string; - slack_oauth_client_id?: string; - slack_oauth_client_secret?: string; - teams_team_id?: string; - teams_command_script?: string; - teams_team_name?: string; - teams_team_guid?: string; - auto_invite?: AutoInviteConfig; - plan?: string; - customer_id?: string; - webhook?: string; - deploy_to?: string; - ai_config?: AIConfig; - error_handler?: ErrorHandlerConfig; - success_handler?: SuccessHandlerConfig; - large_file_storage?: LargeFileStorage; - ducklake?: DucklakeSettings; - datatable?: DataTableSettings; - git_sync?: WorkspaceGitSyncSettings; - deploy_ui?: WorkspaceDeployUISettings; - default_app?: string; - default_scripts?: WorkspaceDefaultScripts; - mute_critical_alerts?: boolean; - color?: string; - operator_settings?: OperatorSettings; - /** - * Rate limit for public app executions per minute per server. NULL or 0 means disabled. - */ - public_app_execution_limit_per_minute?: number; -}; - -export type GetDeployToData = { - workspace: string; -}; - -export type GetDeployToResponse = { - deploy_to?: string; -}; - -export type GetIsPremiumData = { - workspace: string; -}; - -export type GetIsPremiumResponse = boolean; - -export type GetPremiumInfoData = { - /** - * skip fetching subscription status from stripe - */ - skipSubscriptionFetch?: boolean; - workspace: string; -}; - -export type GetPremiumInfoResponse = { - premium: boolean; - usage?: number; - owner: string; - status?: string; - is_past_due: boolean; - max_tolerated_executions?: number; -}; - -export type GetThresholdAlertData = { - workspace: string; -}; - -export type GetThresholdAlertResponse = { - threshold_alert_amount?: number; - last_alert_sent?: string; -}; - -export type SetThresholdAlertData = { - /** - * threshold alert info - */ - requestBody: { - threshold_alert_amount?: number; - }; - workspace: string; -}; - -export type SetThresholdAlertResponse = string; - -export type RebuildDependencyMapData = { - workspace: string; -}; - -export type RebuildDependencyMapResponse = string; - -export type GetDependentsData = { - /** - * The imported path to get dependents for - */ - importedPath: string; - workspace: string; -}; - -export type GetDependentsResponse = Array; - -export type GetDependentsAmountsData = { - /** - * List of imported paths to get dependents counts for - */ - requestBody: Array<(string)>; - workspace: string; -}; - -export type GetDependentsAmountsResponse = Array; - -export type GetDependencyMapData = { - workspace: string; -}; - -export type GetDependencyMapResponse = Array; - -export type EditSlackCommandData = { - /** - * WorkspaceInvite - */ - requestBody: { - slack_command_script?: string; - }; - workspace: string; -}; - -export type EditSlackCommandResponse = string; - -export type GetWorkspaceSlackOauthConfigData = { - workspace: string; -}; - -export type GetWorkspaceSlackOauthConfigResponse = { - slack_oauth_client_id?: string | null; - /** - * Masked with *** if set - */ - slack_oauth_client_secret?: string | null; -}; - -export type SetWorkspaceSlackOauthConfigData = { - /** - * Slack OAuth Configuration - */ - requestBody: { - slack_oauth_client_id: string; - slack_oauth_client_secret: string; - }; - workspace: string; -}; - -export type SetWorkspaceSlackOauthConfigResponse = string; - -export type DeleteWorkspaceSlackOauthConfigData = { - workspace: string; -}; - -export type DeleteWorkspaceSlackOauthConfigResponse = string; - -export type EditTeamsCommandData = { - /** - * WorkspaceInvite - */ - requestBody: { - slack_command_script?: string; - }; - workspace: string; -}; - -export type EditTeamsCommandResponse = string; - -export type ListAvailableTeamsIdsData = { - /** - * Pagination cursor URL from previous response. Pass this to fetch the next page of results. - */ - nextLink?: string; - /** - * Search teams by name. If omitted, returns first page of all teams. - */ - search?: string; - workspace: string; -}; - -export type ListAvailableTeamsIdsResponse = { - teams?: Array<{ - team_name?: string; - team_id?: string; - }>; - /** - * Total number of teams across all pages - */ - total_count?: number; - /** - * Number of teams per page (configurable via TEAMS_PER_PAGE env var) - */ - per_page?: number; - /** - * URL to fetch next page of results. Null if no more pages. - */ - next_link?: string | null; -}; - -export type ListAvailableTeamsChannelsData = { - /** - * Microsoft Teams team ID - */ - teamId: string; - workspace: string; -}; - -export type ListAvailableTeamsChannelsResponse = { - channels?: Array<{ - channel_name?: string; - channel_id?: string; - }>; - total_count?: number; -}; - -export type ConnectTeamsData = { - /** - * connect teams - */ - requestBody: { - team_id?: string; - team_name?: string; - }; - workspace: string; -}; - -export type ConnectTeamsResponse = string; - -export type RunSlackMessageTestJobData = { - /** - * path to hub script to run and its corresponding args - */ - requestBody: { - hub_script_path?: string; - channel?: string; - test_msg?: string; - }; - workspace: string; -}; - -export type RunSlackMessageTestJobResponse = { - job_uuid?: string; -}; - -export type RunTeamsMessageTestJobData = { - /** - * path to hub script to run and its corresponding args - */ - requestBody: { - hub_script_path?: string; - channel?: string; - test_msg?: string; - }; - workspace: string; -}; - -export type RunTeamsMessageTestJobResponse = { - job_uuid?: string; -}; - -export type EditDeployToData = { - requestBody: { - deploy_to?: string; - }; - workspace: string; -}; - -export type EditDeployToResponse = string; - -export type EditAutoInviteData = { - /** - * WorkspaceInvite - */ - requestBody: { - operator?: boolean; - invite_all?: boolean; - auto_add?: boolean; - }; - workspace: string; -}; - -export type EditAutoInviteResponse = string; - -export type EditInstanceGroupsData = { - /** - * Instance Groups Configuration - */ - requestBody: { - groups?: Array<(string)>; - roles?: { - [key: string]: (string); - }; - }; - workspace: string; -}; - -export type EditInstanceGroupsResponse = string; - -export type EditWebhookData = { - /** - * WorkspaceWebhook - */ - requestBody: { - webhook?: string; - }; - workspace: string; -}; - -export type EditWebhookResponse = string; - -export type EditCopilotConfigData = { - /** - * WorkspaceCopilotConfig - */ - requestBody: AIConfig; - workspace: string; -}; - -export type EditCopilotConfigResponse = string; - -export type GetCopilotInfoData = { - workspace: string; -}; - -export type GetCopilotInfoResponse = AIConfig; - -export type EditErrorHandlerData = { - /** - * WorkspaceErrorHandler - */ - requestBody: EditErrorHandler; - workspace: string; -}; - -export type EditErrorHandlerResponse = string; - -export type EditSuccessHandlerData = { - /** - * WorkspaceSuccessHandler - */ - requestBody: EditSuccessHandler; - workspace: string; -}; - -export type EditSuccessHandlerResponse = string; - -export type EditLargeFileStorageConfigData = { - /** - * LargeFileStorage info - */ - requestBody: { - large_file_storage?: LargeFileStorage; - }; - workspace: string; -}; - -export type EditLargeFileStorageConfigResponse = unknown; - -export type ListDucklakesData = { - workspace: string; -}; - -export type ListDucklakesResponse = Array<(string)>; - -export type ListDataTablesData = { - workspace: string; -}; - -export type ListDataTablesResponse = Array<(string)>; - -export type ListDataTableSchemasData = { - workspace: string; -}; - -export type ListDataTableSchemasResponse = Array; - -export type EditDucklakeConfigData = { - /** - * Ducklake settings - */ - requestBody: { - settings: DucklakeSettings; - }; - workspace: string; -}; - -export type EditDucklakeConfigResponse = unknown; - -export type EditDataTableConfigData = { - /** - * DataTable settings - */ - requestBody: { - settings: DataTableSettings; - }; - workspace: string; -}; - -export type EditDataTableConfigResponse = unknown; - -export type EditWorkspaceGitSyncConfigData = { - /** - * Workspace Git sync settings - */ - requestBody: { - git_sync_settings?: WorkspaceGitSyncSettings; - }; - workspace: string; -}; - -export type EditWorkspaceGitSyncConfigResponse = unknown; - -export type EditGitSyncRepositoryData = { - /** - * Git sync repository settings to add or update - */ - requestBody: { - /** - * The resource path of the git repository to update - */ - git_repo_resource_path: string; - repository: GitRepositorySettings; - }; - workspace: string; -}; - -export type EditGitSyncRepositoryResponse = unknown; - -export type DeleteGitSyncRepositoryData = { - /** - * Git sync repository to delete - */ - requestBody: { - /** - * The resource path of the git repository to delete - */ - git_repo_resource_path: string; - }; - workspace: string; -}; - -export type DeleteGitSyncRepositoryResponse = unknown; - -export type EditWorkspaceDeployUiSettingsData = { - /** - * Workspace deploy UI settings - */ - requestBody: { - deploy_ui_settings?: WorkspaceDeployUISettings; - }; - workspace: string; -}; - -export type EditWorkspaceDeployUiSettingsResponse = unknown; - -export type EditWorkspaceDefaultAppData = { - /** - * Workspace default app - */ - requestBody: { - default_app_path?: string; - }; - workspace: string; -}; - -export type EditWorkspaceDefaultAppResponse = string; - -export type EditDefaultScriptsData = { - /** - * Workspace default app - */ - requestBody?: WorkspaceDefaultScripts; - workspace: string; -}; - -export type EditDefaultScriptsResponse = string; - -export type GetDefaultScriptsData = { - workspace: string; -}; - -export type GetDefaultScriptsResponse = WorkspaceDefaultScripts; - -export type SetEnvironmentVariableData = { - /** - * Workspace default app - */ - requestBody: { - name: string; - value?: string; - }; - workspace: string; -}; - -export type SetEnvironmentVariableResponse = string; - -export type GetWorkspaceEncryptionKeyData = { - workspace: string; -}; - -export type GetWorkspaceEncryptionKeyResponse = { - key: string; -}; - -export type SetWorkspaceEncryptionKeyData = { - /** - * New encryption key - */ - requestBody: { - new_key: string; - skip_reencrypt?: boolean; - }; - workspace: string; -}; - -export type SetWorkspaceEncryptionKeyResponse = string; - -export type GetWorkspaceDefaultAppData = { - workspace: string; -}; - -export type GetWorkspaceDefaultAppResponse = { - default_app_path?: string; -}; - -export type GetWorkspaceUsageData = { - workspace: string; -}; - -export type GetWorkspaceUsageResponse = number; - -export type GetUsedTriggersData = { - workspace: string; -}; - -export type GetUsedTriggersResponse = { - http_routes_used: boolean; - websocket_used: boolean; - kafka_used: boolean; - nats_used: boolean; - postgres_used: boolean; - mqtt_used: boolean; - gcp_used: boolean; - sqs_used: boolean; - email_used: boolean; - nextcloud_used: boolean; - google_used: boolean; -}; - -export type ListProtectionRulesData = { - workspace: string; -}; - -export type ListProtectionRulesResponse = Array; - -export type CreateProtectionRuleData = { - /** - * New protection rule configuration - */ - requestBody: { - /** - * Unique name for the protection rule - */ - name: string; - rules: ProtectionRules; - bypass_groups: RuleBypasserGroups; - bypass_users: RuleBypasserUsers; - }; - workspace: string; -}; - -export type CreateProtectionRuleResponse = string; - -export type UpdateProtectionRuleData = { - /** - * Updated protection rule configuration - */ - requestBody: { - rules: ProtectionRules; - bypass_groups: RuleBypasserGroups; - bypass_users: RuleBypasserUsers; - }; - /** - * Name of the protection rule to update - */ - ruleName: string; - workspace: string; -}; - -export type UpdateProtectionRuleResponse = string; - -export type DeleteProtectionRuleData = { - /** - * Name of the protection rule to delete - */ - ruleName: string; - workspace: string; -}; - -export type DeleteProtectionRuleResponse = string; - -export type LogAiChatData = { - requestBody: { - session_id: string; - provider: string; - model: string; - mode: string; - }; - workspace: string; -}; - -export type LogAiChatResponse = void; - -export type GetCloudQuotasData = { - workspace: string; -}; - -export type GetCloudQuotasResponse = { - scripts: QuotaInfo; - flows: QuotaInfo; - apps: QuotaInfo; - variables: QuotaInfo; - resources: QuotaInfo; -}; - -export type PruneVersionsData = { - requestBody: { - resource_type: 'scripts' | 'flows' | 'apps'; - }; - workspace: string; -}; - -export type PruneVersionsResponse = { - pruned: number; -}; - -export type RefreshCustomInstanceUserPwdResponse = { - [key: string]: unknown; -}; - -export type ListCustomInstanceDbsResponse = { - [key: string]: CustomInstanceDb; -}; - -export type SetupCustomInstanceDbData = { - /** - * The name of the database to create - */ - name: string; - requestBody: { - tag?: CustomInstanceDbTag; - }; -}; - -export type SetupCustomInstanceDbResponse = CustomInstanceDb; - -export type GetGlobalData = { - key: string; -}; - -export type GetGlobalResponse = unknown; - -export type SetGlobalData = { - key: string; - /** - * value set - */ - requestBody: { - value?: unknown; - }; -}; - -export type SetGlobalResponse = string; - -export type GetLocalResponse = unknown; - -export type TestSmtpData = { - /** - * test smtp payload - */ - requestBody: { - to: string; - smtp: { - host: string; - username: string; - password: string; - port: number; - from: string; - tls_implicit: boolean; - disable_tls: boolean; - }; - }; -}; - -export type TestSmtpResponse = string; - -export type TestCriticalChannelsData = { - /** - * test critical channel payload - */ - requestBody: Array<{ - email?: string; - slack_channel?: string; - }>; -}; - -export type TestCriticalChannelsResponse = string; - -export type GetCriticalAlertsData = { - acknowledged?: boolean | null; - page?: number; - pageSize?: number; -}; - -export type GetCriticalAlertsResponse = { - alerts?: Array; - /** - * Total number of rows matching the query. - */ - total_rows?: number; - /** - * Total number of pages based on the page size. - */ - total_pages?: number; -}; - -export type AcknowledgeCriticalAlertData = { - /** - * The ID of the critical alert to acknowledge - */ - id: number; -}; - -export type AcknowledgeCriticalAlertResponse = string; - -export type AcknowledgeAllCriticalAlertsResponse = string; - -export type TestLicenseKeyData = { - /** - * test license key - */ - requestBody: { - license_key: string; - }; -}; - -export type TestLicenseKeyResponse = string; - -export type TestObjectStorageConfigData = { - /** - * test object storage config - */ - requestBody: { - [key: string]: unknown; - }; -}; - -export type TestObjectStorageConfigResponse = string; - -export type SendStatsResponse = string; - -export type GetStatsResponse = { - signature?: string; - data?: string; -}; - -export type GetLatestKeyRenewalAttemptResponse = { - result: string; - attempted_at: string; -} | null; - -export type RenewLicenseKeyData = { - licenseKey?: string; -}; - -export type RenewLicenseKeyResponse = string; - -export type CreateCustomerPortalSessionData = { - licenseKey?: string; -}; - -export type CreateCustomerPortalSessionResponse = string; - -export type TestMetadataData = { - /** - * test metadata - */ - requestBody: string; -}; - -export type TestMetadataResponse = string; - -export type ListGlobalSettingsResponse = Array; - -export type GetInstanceConfigResponse = InstanceConfig; - -export type SetInstanceConfigData = { - /** - * full instance configuration to apply - */ - requestBody: InstanceConfig; -}; - -export type SetInstanceConfigResponse = string; - -export type GetMinKeepAliveVersionResponse = { - /** - * minimum version for normal workers - */ - worker: string; - /** - * minimum version for agent workers - */ - agent: string; -}; - -export type GetJwksResponse = JwksResponse; - -export type TestSecretBackendData = { - /** - * Vault settings to test - */ - requestBody: VaultSettings; -}; - -export type TestSecretBackendResponse = string; - -export type MigrateSecretsToVaultData = { - /** - * Vault settings for migration target - */ - requestBody: VaultSettings; -}; - -export type MigrateSecretsToVaultResponse = SecretMigrationReport; - -export type MigrateSecretsToDatabaseData = { - /** - * Vault settings for migration source - */ - requestBody: VaultSettings; -}; - -export type MigrateSecretsToDatabaseResponse = SecretMigrationReport; - -export type GetSecondaryStorageNamesData = { - /** - * If true, include "_default_" in the list if primary workspace storage is set - */ - includeDefault?: boolean; - workspace: string; -}; - -export type GetSecondaryStorageNamesResponse = Array<(string)>; - -export type WorkspaceGetCriticalAlertsData = { - acknowledged?: boolean | null; - page?: number; - pageSize?: number; - workspace: string; -}; - -export type WorkspaceGetCriticalAlertsResponse = { - alerts?: Array; - /** - * Total number of rows matching the query. - */ - total_rows?: number; - /** - * Total number of pages based on the page size. - */ - total_pages?: number; -}; - -export type WorkspaceAcknowledgeCriticalAlertData = { - /** - * The ID of the critical alert to acknowledge - */ - id: number; - workspace: string; -}; - -export type WorkspaceAcknowledgeCriticalAlertResponse = string; - -export type WorkspaceAcknowledgeAllCriticalAlertsData = { - workspace: string; -}; - -export type WorkspaceAcknowledgeAllCriticalAlertsResponse = string; - -export type WorkspaceMuteCriticalAlertsUiData = { - /** - * Boolean flag to mute critical alerts. - */ - requestBody: { - /** - * Whether critical alerts should be muted. - */ - mute_critical_alerts?: boolean; - }; - workspace: string; -}; - -export type WorkspaceMuteCriticalAlertsUiResponse = string; - -export type SetPublicAppRateLimitData = { - /** - * Public app rate limit configuration - */ - requestBody: { - /** - * Rate limit for public app executions per minute per server. NULL or 0 to disable. - */ - public_app_execution_limit_per_minute?: number; - }; - workspace: string; -}; - -export type SetPublicAppRateLimitResponse = string; - -export type ListAvailableScopesResponse = Array; - -export type GetOidcTokenData = { - audience: string; - expiresIn?: number; - workspace: string; -}; - -export type GetOidcTokenResponse = string; - -export type CreateVariableData = { - /** - * whether the variable is already encrypted (default false) - */ - alreadyEncrypted?: boolean; - /** - * new variable - */ - requestBody: CreateVariable; - workspace: string; -}; - -export type CreateVariableResponse = string; - -export type EncryptValueData = { - /** - * new variable - */ - requestBody: string; - workspace: string; -}; - -export type EncryptValueResponse = string; - -export type DeleteVariableData = { - path: string; - workspace: string; -}; - -export type DeleteVariableResponse = string; - -export type DeleteVariablesBulkData = { - /** - * paths to delete - */ - requestBody: { - paths: Array<(string)>; - }; - workspace: string; -}; - -export type DeleteVariablesBulkResponse = Array<(string)>; - -export type UpdateVariableData = { - /** - * whether the variable is already encrypted (default false) - */ - alreadyEncrypted?: boolean; - path: string; - /** - * updated variable - */ - requestBody: EditVariable; - workspace: string; -}; - -export type UpdateVariableResponse = string; - -export type GetVariableData = { - /** - * ask to decrypt secret if this variable is secret - * (if not secret no effect, default: true) - * - */ - decryptSecret?: boolean; - /** - * ask to include the encrypted value if secret and decrypt secret is not true (default: false) - * - */ - includeEncrypted?: boolean; - path: string; - workspace: string; -}; - -export type GetVariableResponse = ListableVariable; - -export type GetVariableValueData = { - /** - * allow getting a cached value for improved performance - * - */ - allowCache?: boolean; - path: string; - workspace: string; -}; - -export type GetVariableValueResponse = string; - -export type ExistsVariableData = { - path: string; - workspace: string; -}; - -export type ExistsVariableResponse = boolean; - -export type ListVariableData = { - /** - * broad search across multiple fields (case-insensitive substring match) - */ - broadFilter?: string; - /** - * pattern match filter for description field (case-insensitive) - */ - description?: string; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * exact path match filter - */ - path?: string; - /** - * filter variables by path prefix - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * pattern match filter for non-secret variable values (case-insensitive) - */ - value?: string; - workspace: string; -}; - -export type ListVariableResponse = Array; - -export type ListContextualVariablesData = { - workspace: string; -}; - -export type ListContextualVariablesResponse = Array; - -export type ConnectSlackCallbackData = { - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; - workspace: string; -}; - -export type ConnectSlackCallbackResponse = string; - -export type ConnectSlackCallbackInstanceData = { - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; -}; - -export type ConnectSlackCallbackInstanceResponse = string; - -export type ConnectCallbackData = { - clientName: string; - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; -}; - -export type ConnectCallbackResponse = TokenResponse; - -export type CreateAccountData = { - /** - * code endpoint - */ - requestBody: { - /** - * OAuth refresh token. For authorization_code flow, this contains the actual refresh token. For client_credentials flow, this must be set to an empty string. - */ - refresh_token: string; - expires_in: number; - client: string; - grant_type?: string; - /** - * OAuth client ID for resource-level credentials (client_credentials flow only) - */ - cc_client_id?: string; - /** - * OAuth client secret for resource-level credentials (client_credentials flow only) - */ - cc_client_secret?: string; - /** - * OAuth token URL override for resource-level authentication (client_credentials flow only) - */ - cc_token_url?: string; - /** - * MCP server URL for MCP OAuth token refresh - */ - mcp_server_url?: string; - }; - workspace: string; -}; - -export type CreateAccountResponse = string; - -export type ConnectClientCredentialsData = { - /** - * OAuth client name - */ - client: string; - /** - * client credentials flow parameters - */ - requestBody: { - scopes?: Array<(string)>; - /** - * OAuth client ID for resource-level authentication - */ - cc_client_id: string; - /** - * OAuth client secret for resource-level authentication - */ - cc_client_secret: string; - /** - * OAuth token URL override for resource-level authentication - */ - cc_token_url?: string; - }; -}; - -export type ConnectClientCredentialsResponse = TokenResponse; - -export type RefreshTokenData = { - id: number; - /** - * variable path - */ - requestBody: { - path: string; - }; - workspace: string; -}; - -export type RefreshTokenResponse = string; - -export type DisconnectAccountData = { - id: number; - workspace: string; -}; - -export type DisconnectAccountResponse = string; - -export type DisconnectSlackData = { - workspace: string; -}; - -export type DisconnectSlackResponse = string; - -export type DisconnectTeamsData = { - workspace: string; -}; - -export type DisconnectTeamsResponse = string; - -export type ListOauthLoginsResponse = { - oauth: Array<{ - type: string; - display_name?: string; - }>; - saml?: string; -}; - -export type ListOauthConnectsResponse = Array<(string)>; - -export type GetOauthConnectData = { - /** - * client name - */ - client: string; -}; - -export type GetOauthConnectResponse = { - extra_params?: { - [key: string]: unknown; - }; - scopes?: Array<(string)>; - grant_types?: Array<(string)>; -}; - -export type SendMessageToConversationData = { - requestBody: { - /** - * The ID of the Teams conversation/activity - */ - conversation_id: string; - /** - * Used for styling the card conditionally - */ - success?: boolean; - /** - * The message text to be sent in the Teams card - */ - text: string; - /** - * The card block to be sent in the Teams card - */ - card_block?: { - [key: string]: unknown; - }; - }; -}; - -export type SendMessageToConversationResponse = unknown; - -export type CreateResourceData = { - /** - * new resource - */ - requestBody: CreateResource; - /** - * update the resource if it already exists (default false) - */ - updateIfExists?: boolean; - workspace: string; -}; - -export type CreateResourceResponse = string; - -export type DeleteResourceData = { - path: string; - workspace: string; -}; - -export type DeleteResourceResponse = string; - -export type DeleteResourcesBulkData = { - /** - * paths to delete - */ - requestBody: { - paths: Array<(string)>; - }; - workspace: string; -}; - -export type DeleteResourcesBulkResponse = Array<(string)>; - -export type UpdateResourceData = { - path: string; - /** - * updated resource - */ - requestBody: EditResource; - workspace: string; -}; - -export type UpdateResourceResponse = string; - -export type UpdateResourceValueData = { - path: string; - /** - * updated resource - */ - requestBody: { - value?: unknown; - }; - workspace: string; -}; - -export type UpdateResourceValueResponse = string; - -export type GetResourceData = { - path: string; - workspace: string; -}; - -export type GetResourceResponse = Resource; - -export type GetResourceValueInterpolatedData = { - /** - * allow getting a cached value for improved performance - */ - allowCache?: boolean; - /** - * job id - */ - jobId?: string; - path: string; - workspace: string; -}; - -export type GetResourceValueInterpolatedResponse = unknown; - -export type GetResourceValueData = { - path: string; - workspace: string; -}; - -export type GetResourceValueResponse = unknown; - -export type GetGitCommitHashData = { - gitSshIdentity?: string; - path: string; - workspace: string; -}; - -export type GetGitCommitHashResponse = { - /** - * Latest commit hash from git ls-remote - */ - commit_hash: string; -}; - -export type ExistsResourceData = { - path: string; - workspace: string; -}; - -export type ExistsResourceResponse = boolean; - -export type ListResourceData = { - /** - * broad search across multiple fields (case-insensitive substring match) - */ - broadFilter?: string; - /** - * pattern match filter for description field (case-insensitive) - */ - description?: string; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * exact path match filter - */ - path?: string; - /** - * filter resources by path prefix - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * resource_types to list from, separated by ',', - */ - resourceType?: string; - /** - * resource_types to not list from, separated by ',', - */ - resourceTypeExclude?: string; - /** - * JSONB subset match filter using base64 encoded JSON - */ - value?: string; - workspace: string; -}; - -export type ListResourceResponse = Array; - -export type ListSearchResourceData = { - workspace: string; -}; - -export type ListSearchResourceResponse = Array<{ - path: string; - value: unknown; -}>; - -export type GetMcpToolsData = { - path: string; - workspace: string; -}; - -export type GetMcpToolsResponse = Array<{ - name: string; - description?: string; - parameters: { - [key: string]: unknown; - }; -}>; - -export type ListResourceNamesData = { - name: string; - workspace: string; -}; - -export type ListResourceNamesResponse = Array<{ - name: string; - path: string; -}>; - -export type CreateResourceTypeData = { - /** - * new resource_type - */ - requestBody: ResourceType; - workspace: string; -}; - -export type CreateResourceTypeResponse = string; - -export type FileResourceTypeToFileExtMapData = { - workspace: string; -}; - -export type FileResourceTypeToFileExtMapResponse = { - [key: string]: { - format_extension?: string | null; - is_fileset?: boolean; - }; -}; - -export type DeleteResourceTypeData = { - path: string; - workspace: string; -}; - -export type DeleteResourceTypeResponse = string; - -export type UpdateResourceTypeData = { - path: string; - /** - * updated resource_type - */ - requestBody: EditResourceType; - workspace: string; -}; - -export type UpdateResourceTypeResponse = string; - -export type GetResourceTypeData = { - path: string; - workspace: string; -}; - -export type GetResourceTypeResponse = ResourceType; - -export type ExistsResourceTypeData = { - path: string; - workspace: string; -}; - -export type ExistsResourceTypeResponse = boolean; - -export type ListResourceTypeData = { - workspace: string; -}; - -export type ListResourceTypeResponse = Array; - -export type ListResourceTypeNamesData = { - workspace: string; -}; - -export type ListResourceTypeNamesResponse = Array<(string)>; - -export type QueryResourceTypesData = { - /** - * query limit - */ - limit?: number; - /** - * query text - */ - text: string; - workspace: string; -}; - -export type QueryResourceTypesResponse = Array<{ - name: string; - score: number; - schema?: unknown; -}>; - -export type GetNpmPackageMetadataData = { - /** - * npm package name - */ - _package: string; - workspace: string; -}; - -export type GetNpmPackageMetadataResponse = { - tags?: { - [key: string]: (string); - }; - versions?: Array<(string)>; -}; - -export type ResolveNpmPackageVersionData = { - /** - * npm package name - */ - _package: string; - /** - * version tag or reference - */ - tag?: string; - workspace: string; -}; - -export type ResolveNpmPackageVersionResponse = { - version?: string | null; -}; - -export type GetNpmPackageFiletreeData = { - /** - * npm package name - */ - _package: string; - /** - * package version - */ - version: string; - workspace: string; -}; - -export type GetNpmPackageFiletreeResponse = { - default?: string; - files?: Array<{ - name?: string; - }>; -}; - -export type GetNpmPackageFileData = { - /** - * npm package name - */ - _package: string; - /** - * file path within package - */ - filepath: string; - /** - * package version - */ - version: string; - workspace: string; -}; - -export type GetNpmPackageFileResponse = string; - -export type ListHubIntegrationsData = { - /** - * query integrations kind - */ - kind?: string; -}; - -export type ListHubIntegrationsResponse = Array<{ - name: string; -}>; - -export type ListHubFlowsResponse = { - flows?: Array<{ - id: number; - flow_id: number; - summary: string; - apps: Array<(string)>; - approved: boolean; - votes: number; - }>; -}; - -export type GetHubFlowByIdData = { - id: number; -}; - -export type GetHubFlowByIdResponse = { - flow?: OpenFlow; -}; - -export type ListFlowPathsData = { - workspace: string; -}; - -export type ListFlowPathsResponse = Array<(string)>; - -export type ListSearchFlowData = { - workspace: string; -}; - -export type ListSearchFlowResponse = Array<{ - path: string; - value: unknown; -}>; - -export type ListFlowsData = { - /** - * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - */ - createdBy?: string; - /** - * (default regardless) - * If true, show only flows with dedicated_worker enabled. - * If false, show only flows with dedicated_worker disabled. - * - */ - dedicatedWorker?: boolean; - /** - * (default false) - * include items that have no deployed version - * - */ - includeDraftOnly?: boolean; - /** - * order by desc order (default true) - */ - orderDesc?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * mask to filter exact matching path - */ - pathExact?: string; - /** - * mask to filter matching starting path - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are displayed. - * - */ - showArchived?: boolean; - /** - * (default false) - * show only the starred items - * - */ - starredOnly?: boolean; - /** - * (default false) - * include deployment message - * - */ - withDeploymentMsg?: boolean; - /** - * (default false) - * If true, the description field will be omitted from the response. - * - */ - withoutDescription?: boolean; - workspace: string; -}; - -export type ListFlowsResponse = Array<(Flow & { - has_draft?: boolean; - draft_only?: boolean; -})>; - -export type GetFlowHistoryData = { - path: string; - workspace: string; -}; - -export type GetFlowHistoryResponse = Array; - -export type GetFlowLatestVersionData = { - path: string; - workspace: string; -}; - -export type GetFlowLatestVersionResponse = FlowVersion; - -export type ListFlowPathsFromWorkspaceRunnableData = { - matchPathStart?: boolean; - path: string; - runnableKind: 'script' | 'flow'; - workspace: string; -}; - -export type ListFlowPathsFromWorkspaceRunnableResponse = Array<(string)>; - -export type GetFlowVersionData = { - version: number; - workspace: string; -}; - -export type GetFlowVersionResponse = Flow; - -export type UpdateFlowHistoryData = { - /** - * Flow deployment message - */ - requestBody: { - deployment_msg: string; - }; - version: number; - workspace: string; -}; - -export type UpdateFlowHistoryResponse = string; - -export type GetFlowByPathData = { - path: string; - withStarredInfo?: boolean; - workspace: string; -}; - -export type GetFlowByPathResponse = Flow; - -export type GetFlowDeploymentStatusData = { - path: string; - workspace: string; -}; - -export type GetFlowDeploymentStatusResponse = { - lock_error_logs?: string; - job_id?: string; -}; - -export type GetTriggersCountOfFlowData = { - path: string; - workspace: string; -}; - -export type GetTriggersCountOfFlowResponse = TriggersCount; - -export type ListTokensOfFlowData = { - path: string; - workspace: string; -}; - -export type ListTokensOfFlowResponse = Array; - -export type ToggleWorkspaceErrorHandlerForFlowData = { - path: string; - /** - * Workspace error handler enabled - */ - requestBody: { - muted?: boolean; - }; - workspace: string; -}; - -export type ToggleWorkspaceErrorHandlerForFlowResponse = string; - -export type GetFlowByPathWithDraftData = { - path: string; - workspace: string; -}; - -export type GetFlowByPathWithDraftResponse = Flow & { - draft?: Flow; -}; - -export type ExistsFlowByPathData = { - path: string; - workspace: string; -}; - -export type ExistsFlowByPathResponse = boolean; - -export type CreateFlowData = { - /** - * Partially filled flow - */ - requestBody: OpenFlowWPath & { - draft_only?: boolean; - deployment_message?: string; -}; - workspace: string; -}; - -export type CreateFlowResponse = string; - -export type UpdateFlowData = { - path: string; - /** - * Partially filled flow - */ - requestBody: OpenFlowWPath & { - deployment_message?: string; -}; - workspace: string; -}; - -export type UpdateFlowResponse = string; - -export type ArchiveFlowByPathData = { - path: string; - /** - * archiveFlow - */ - requestBody: { - archived?: boolean; - }; - workspace: string; -}; - -export type ArchiveFlowByPathResponse = string; - -export type DeleteFlowByPathData = { - /** - * keep captures - */ - keepCaptures?: boolean; - path: string; - workspace: string; -}; - -export type DeleteFlowByPathResponse = string; - -export type ListHubAppsResponse = { - apps?: Array<{ - id: number; - app_id: number; - summary: string; - apps: Array<(string)>; - approved: boolean; - votes: number; - }>; -}; - -export type GetHubAppByIdData = { - id: number; -}; - -export type GetHubAppByIdResponse = { - app: { - summary: string; - value: unknown; - }; -}; - -export type GetHubRawAppByIdData = { - id: number; -}; - -export type GetHubRawAppByIdResponse = { - app: { - summary: string; - value: unknown; - }; -}; - -export type GetPublicAppByCustomPathData = { - customPath: string; -}; - -export type GetPublicAppByCustomPathResponse = AppWithLastVersion & { - workspace_id?: string; -}; - -export type GetRawAppDataData = { - secretWithExtension: string; - workspace: string; -}; - -export type GetRawAppDataResponse = string; - -export type ListSearchAppData = { - workspace: string; -}; - -export type ListSearchAppResponse = Array<{ - path: string; - value: unknown; -}>; - -export type ListAppsData = { - /** - * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - */ - createdBy?: string; - /** - * (default false) - * include items that have no deployed version - * - */ - includeDraftOnly?: boolean; - /** - * order by desc order (default true) - */ - orderDesc?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * mask to filter exact matching path - */ - pathExact?: string; - /** - * mask to filter matching starting path - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * (default false) - * show only the starred items - * - */ - starredOnly?: boolean; - /** - * (default false) - * include deployment message - * - */ - withDeploymentMsg?: boolean; - workspace: string; -}; - -export type ListAppsResponse = Array; - -export type CreateAppData = { - /** - * new app - */ - requestBody: { - path: string; - value: unknown; - summary: string; - policy: Policy; - draft_only?: boolean; - deployment_message?: string; - custom_path?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. - */ - preserve_on_behalf_of?: boolean; - }; - workspace: string; -}; - -export type CreateAppResponse = string; - -export type CreateAppRawData = { - /** - * new app - */ - formData: { - app?: { - path: string; - value: unknown; - summary: string; - policy: Policy; - draft_only?: boolean; - deployment_message?: string; - custom_path?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. - */ - preserve_on_behalf_of?: boolean; - }; - js?: string; - css?: string; - }; - workspace: string; -}; - -export type CreateAppRawResponse = string; - -export type ExistsAppData = { - path: string; - workspace: string; -}; - -export type ExistsAppResponse = boolean; - -export type GetAppByPathData = { - path: string; - withStarredInfo?: boolean; - workspace: string; -}; - -export type GetAppByPathResponse = AppWithLastVersion; - -export type GetAppLiteByPathData = { - path: string; - workspace: string; -}; - -export type GetAppLiteByPathResponse = AppWithLastVersion; - -export type GetAppByPathWithDraftData = { - path: string; - workspace: string; -}; - -export type GetAppByPathWithDraftResponse = AppWithLastVersionWDraft; - -export type GetAppHistoryByPathData = { - path: string; - workspace: string; -}; - -export type GetAppHistoryByPathResponse = Array; - -export type GetAppLatestVersionData = { - path: string; - workspace: string; -}; - -export type GetAppLatestVersionResponse = AppHistory; - -export type ListAppPathsFromWorkspaceRunnableData = { - path: string; - runnableKind: 'script' | 'flow'; - workspace: string; -}; - -export type ListAppPathsFromWorkspaceRunnableResponse = Array<(string)>; - -export type UpdateAppHistoryData = { - id: number; - /** - * App deployment message - */ - requestBody: { - deployment_msg?: string; - }; - version: number; - workspace: string; -}; - -export type UpdateAppHistoryResponse = string; - -export type GetPublicAppBySecretData = { - path: string; - workspace: string; -}; - -export type GetPublicAppBySecretResponse = AppWithLastVersion; - -export type GetPublicResourceData = { - path: string; - workspace: string; -}; - -export type GetPublicResourceResponse = unknown; - -export type GetPublicSecretOfAppData = { - path: string; - workspace: string; -}; - -export type GetPublicSecretOfAppResponse = string; - -export type GetPublicSecretOfLatestVersionOfAppData = { - path: string; - workspace: string; -}; - -export type GetPublicSecretOfLatestVersionOfAppResponse = string; - -export type GetAppByVersionData = { - id: number; - workspace: string; -}; - -export type GetAppByVersionResponse = AppWithLastVersion; - -export type DeleteAppData = { - path: string; - workspace: string; -}; - -export type DeleteAppResponse = string; - -export type UpdateAppData = { - path: string; - /** - * update app - */ - requestBody: { - path?: string; - summary?: string; - value?: unknown; - policy?: Policy; - deployment_message?: string; - custom_path?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. - */ - preserve_on_behalf_of?: boolean; - }; - workspace: string; -}; - -export type UpdateAppResponse = string; - -export type UpdateAppRawData = { - /** - * update app - */ - formData: { - app?: { - path?: string; - summary?: string; - value?: unknown; - policy?: Policy; - deployment_message?: string; - custom_path?: string; - /** - * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. - */ - preserve_on_behalf_of?: boolean; - }; - js?: string; - css?: string; - }; - path: string; - workspace: string; -}; - -export type UpdateAppRawResponse = string; - -export type CustomPathExistsData = { - customPath: string; - workspace: string; -}; - -export type CustomPathExistsResponse = boolean; - -export type SignS3ObjectsData = { - /** - * s3 objects to sign - */ - requestBody: { - s3_objects: Array; - }; - workspace: string; -}; - -export type SignS3ObjectsResponse = Array; - -export type ExecuteComponentData = { - path: string; - /** - * update app - */ - requestBody: { - component: string; - path?: string; - version?: number; - args: unknown; - raw_code?: { - content: string; - language: string; - path?: string; - lock?: string; - cache_ttl?: number; - }; - id?: number; - force_viewer_static_fields?: { - [key: string]: unknown; - }; - force_viewer_one_of_fields?: { - [key: string]: unknown; - }; - force_viewer_allow_user_resources?: Array<(string)>; - /** - * Runnable query parameters - */ - run_query_params?: { - [key: string]: unknown; - }; - }; - workspace: string; -}; - -export type ExecuteComponentResponse = string; - -export type UploadS3FileFromAppData = { - contentDisposition?: string; - contentType?: string; - fileExtension?: string; - fileKey?: string; - path: string; - /** - * File content - */ - requestBody: (Blob | File); - resourceType?: string; - s3ResourcePath?: string; - storage?: string; - workspace: string; -}; - -export type UploadS3FileFromAppResponse = { - file_key: string; - delete_token: string; -}; - -export type DeleteS3FileFromAppData = { - deleteToken: string; - workspace: string; -}; - -export type DeleteS3FileFromAppResponse = string; - -export type GetHubScriptContentByPathData = { - path: string; -}; - -export type GetHubScriptContentByPathResponse = string; - -export type GetHubScriptByPathData = { - path: string; -}; - -export type GetHubScriptByPathResponse = { - content: string; - lockfile?: string; - schema?: unknown; - language: string; - summary?: string; -}; - -export type PickHubScriptByPathData = { - path: string; -}; - -export type PickHubScriptByPathResponse = { - success: boolean; -}; - -export type GetTopHubScriptsData = { - /** - * query scripts app - */ - app?: string; - /** - * query scripts kind - */ - kind?: string; - /** - * query limit - */ - limit?: number; -}; - -export type GetTopHubScriptsResponse = { - asks?: Array<{ - id: number; - ask_id: number; - summary: string; - app: string; - version_id: number; - kind: HubScriptKind; - votes: number; - views: number; - }>; -}; - -export type QueryHubScriptsData = { - /** - * query scripts app - */ - app?: string; - /** - * query scripts kind - */ - kind?: string; - /** - * query limit - */ - limit?: number; - /** - * query text - */ - text: string; -}; - -export type QueryHubScriptsResponse = Array<{ - ask_id: number; - id: number; - version_id: number; - summary: string; - app: string; - kind: HubScriptKind; - score: number; -}>; - -export type ListSearchScriptData = { - workspace: string; -}; - -export type ListSearchScriptResponse = Array<{ - path: string; - content: string; -}>; - -export type ListScriptsData = { - /** - * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') - */ - createdBy?: string; - /** - * (default regardless) - * If true, show only scripts with dedicated_worker enabled. - * If false, show only scripts with dedicated_worker disabled. - * - */ - dedicatedWorker?: boolean; - /** - * mask to filter scripts whom first direct parent has exact hash - */ - firstParentHash?: string; - /** - * (default false) - * include scripts that have no deployed version - * - */ - includeDraftOnly?: boolean; - /** - * (default false) - * include scripts without an exported main function - * - */ - includeWithoutMain?: boolean; - /** - * (default regardless) - * if true show only the templates - * if false show only the non templates - * if not defined, show all regardless of if the script is a template - * - */ - isTemplate?: boolean; - /** - * (default regardless) - * script kinds to filter, split by comma - * - */ - kinds?: string; - /** - * Filter to only include scripts written in the given languages. - * Accepts multiple values as a comma-separated list. - * - */ - languages?: string; - /** - * mask to filter scripts whom last parent in the chain has exact hash. - * Beware that each script stores only a limited number of parents. Hence - * the last parent hash for a script is not necessarily its top-most parent. - * To find the top-most parent you will have to jump from last to last hash - * until finding the parent - * - */ - lastParentHash?: string; - /** - * order by desc order (default true) - */ - orderDesc?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * is the hash present in the array of stored parent hashes for this script. - * The same warning applies than for last_parent_hash. A script only store a - * limited number of direct parent - * - */ - parentHash?: string; - /** - * mask to filter exact matching path - */ - pathExact?: string; - /** - * mask to filter matching starting path - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are - * ed. - * - */ - showArchived?: boolean; - /** - * (default false) - * show only the starred items - * - */ - starredOnly?: boolean; - /** - * (default false) - * include deployment message - * - */ - withDeploymentMsg?: boolean; - /** - * (default false) - * If true, the description field will be omitted from the response. - * - */ - withoutDescription?: boolean; - workspace: string; -}; - -export type ListScriptsResponse = Array