@widgetic/api-sdk-ts 1.11.109 → 1.11.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/apis/BrandKitApi.d.ts +130 -0
- package/dist/apis/BrandKitApi.js +381 -0
- package/dist/apis/CanvasesApi.d.ts +15 -15
- package/dist/apis/CompositionsApi.d.ts +257 -155
- package/dist/apis/CompositionsApi.js +338 -134
- package/dist/apis/CreditsApi.d.ts +11 -11
- package/dist/apis/CreditsApi.js +5 -5
- package/dist/apis/EntitlementsApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.js +2 -2
- package/dist/apis/ManagedUsersApi.d.ts +97 -63
- package/dist/apis/ManagedUsersApi.js +106 -39
- package/dist/apis/OperationsApi.d.ts +4 -4
- package/dist/apis/OperationsApi.js +5 -5
- package/dist/apis/OrganizationsApi.d.ts +74 -0
- package/dist/apis/OrganizationsApi.js +205 -0
- package/dist/apis/PartnersApi.d.ts +133 -133
- package/dist/apis/PartnersApi.js +19 -19
- package/dist/apis/PublicEmbedApi.d.ts +57 -42
- package/dist/apis/PublicEmbedApi.js +64 -29
- package/dist/apis/TokensApi.d.ts +2 -0
- package/dist/apis/TokensApi.js +2 -0
- package/dist/apis/UploadsApi.d.ts +40 -40
- package/dist/apis/UploadsApi.js +60 -60
- package/dist/apis/UsersApi.d.ts +30 -86
- package/dist/apis/UsersApi.js +6 -154
- package/dist/apis/WidgetsApi.d.ts +25 -25
- package/dist/apis/WidgetsApi.js +38 -38
- package/dist/apis/WorkflowsApi.d.ts +115 -157
- package/dist/apis/WorkflowsApi.js +111 -221
- package/dist/apis/index.d.ts +2 -2
- package/dist/apis/index.js +2 -2
- package/dist/esm/apis/BrandKitApi.js +344 -0
- package/dist/esm/apis/CompositionsApi.js +338 -134
- package/dist/esm/apis/CreditsApi.js +6 -6
- package/dist/esm/apis/InvoicesApi.js +1 -1
- package/dist/esm/apis/ManagedUsersApi.js +106 -39
- package/dist/esm/apis/OperationsApi.js +6 -6
- package/dist/esm/apis/OrganizationsApi.js +168 -0
- package/dist/esm/apis/PartnersApi.js +20 -20
- package/dist/esm/apis/PublicEmbedApi.js +65 -30
- package/dist/esm/apis/TokensApi.js +2 -0
- package/dist/esm/apis/UploadsApi.js +60 -60
- package/dist/esm/apis/UsersApi.js +7 -155
- package/dist/esm/apis/WidgetsApi.js +39 -39
- package/dist/esm/apis/WorkflowsApi.js +111 -221
- package/dist/esm/apis/index.js +2 -2
- package/dist/esm/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +8 -8
- package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +8 -8
- package/dist/esm/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +8 -8
- package/dist/esm/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +8 -8
- package/dist/esm/models/AddOrganizationDomainResponse.js +51 -0
- package/dist/esm/models/AddOrganizationDomainResponseData.js +44 -0
- package/dist/esm/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +8 -8
- package/dist/esm/models/BrandColor.js +64 -0
- package/dist/esm/models/BrandFont.js +72 -0
- package/dist/esm/models/BrandKitAssetView.js +96 -0
- package/dist/esm/models/BrandKitFigmaSource.js +59 -0
- package/dist/esm/models/BrandKitTokens.js +59 -0
- package/dist/esm/models/BrandKitTokensFonts.js +48 -0
- package/dist/esm/models/BrandKitView.js +75 -0
- package/dist/esm/models/BrandKitViewOwner.js +54 -0
- package/dist/esm/models/BrandKitViewResponse.js +51 -0
- package/dist/esm/models/BrandSpacing.js +71 -0
- package/dist/esm/models/BrandTextStyle.js +65 -0
- package/dist/esm/models/Canvas.js +3 -0
- package/dist/esm/models/CanvasActiveOperation.js +66 -0
- package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
- package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
- package/dist/esm/models/CreateWidget201ResponseData.js +6 -0
- package/dist/esm/models/{CreateCompositionFromWidget201Response.js → DeleteOrganizationDomainResponse.js} +11 -11
- package/dist/esm/models/DeleteOrganizationDomainResponseData.js +41 -0
- package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
- package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
- package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
- package/dist/esm/models/EditorSession.js +4 -0
- package/dist/esm/models/GetOperationResponse.js +51 -0
- package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +12 -11
- package/dist/esm/models/GetOperationResponseDataMetadata.js +69 -0
- package/dist/esm/models/GetOrganizationDomains200Response.js +51 -0
- package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
- package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
- package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
- package/dist/esm/models/NewWidget.js +0 -1
- package/dist/esm/models/{PersonalWorkspaceDomain.js → OrganizationDomain.js} +12 -18
- package/dist/esm/models/PatchBrandKitAssetRequest.js +68 -0
- package/dist/esm/models/PatchBrandKitRequest.js +57 -0
- package/dist/esm/models/PatchBrandKitRequestFonts.js +48 -0
- package/dist/esm/models/PatchBrandKitRequestSpacing.js +55 -0
- package/dist/esm/models/PostBrandKitIconRequest.js +47 -0
- package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
- package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
- package/dist/esm/models/PutBrandKitRequest.js +49 -0
- package/dist/esm/models/UpdateOrganizationDomainResponse.js +51 -0
- package/dist/esm/models/Upload.js +2 -0
- package/dist/esm/models/UserApiKey.js +2 -0
- package/dist/esm/models/ValidateToken200ResponseData.js +3 -0
- package/dist/esm/models/ValidateToken200ResponseDataWorkspace.js +43 -0
- package/dist/esm/models/Widget.js +6 -0
- package/dist/esm/models/WidgetClarification.js +52 -0
- package/dist/esm/models/WidgetClarificationOption.js +51 -0
- package/dist/esm/models/WidgetClarificationQuestion.js +64 -0
- package/dist/esm/models/WidgetCodeChange.js +68 -0
- package/dist/esm/models/WidgetCodeChanges.js +48 -0
- package/dist/esm/models/WidgetNextStep.js +71 -0
- package/dist/esm/models/WidgetPlan.js +61 -0
- package/dist/esm/models/WidgetPlanDecisions.js +72 -0
- package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
- package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
- package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
- package/dist/esm/models/WidgetPlanTask.js +80 -0
- package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
- package/dist/esm/models/WorkflowFailureReason.js +49 -0
- package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
- package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
- package/dist/esm/models/WorkflowStats.js +3 -0
- package/dist/esm/models/index.js +59 -25
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AccountCreditBalance.d.ts +2 -2
- package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
- package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
- package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
- package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
- package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
- package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
- package/dist/models/AdapterConnectionResponse.d.ts +46 -0
- package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
- package/dist/models/AddOrganizationDomainResponse.d.ts +46 -0
- package/dist/models/AddOrganizationDomainResponse.js +58 -0
- package/dist/models/AddOrganizationDomainResponseData.d.ts +39 -0
- package/dist/models/AddOrganizationDomainResponseData.js +51 -0
- package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
- package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
- package/dist/models/BrandColor.d.ts +60 -0
- package/dist/models/BrandColor.js +72 -0
- package/dist/models/BrandFont.d.ts +73 -0
- package/dist/models/BrandFont.js +80 -0
- package/dist/models/BrandKitAssetView.d.ts +130 -0
- package/dist/models/BrandKitAssetView.js +104 -0
- package/dist/models/BrandKitFigmaSource.d.ts +56 -0
- package/dist/models/BrandKitFigmaSource.js +66 -0
- package/dist/models/BrandKitTokens.d.ts +60 -0
- package/dist/models/BrandKitTokens.js +66 -0
- package/dist/models/BrandKitTokensFonts.d.ts +51 -0
- package/dist/models/BrandKitTokensFonts.js +55 -0
- package/dist/models/BrandKitView.d.ts +90 -0
- package/dist/models/BrandKitView.js +82 -0
- package/dist/models/BrandKitViewOwner.d.ts +46 -0
- package/dist/models/BrandKitViewOwner.js +62 -0
- package/dist/models/BrandKitViewResponse.d.ts +46 -0
- package/dist/models/BrandKitViewResponse.js +58 -0
- package/dist/models/BrandSpacing.d.ts +74 -0
- package/dist/models/BrandSpacing.js +78 -0
- package/dist/models/BrandTextStyle.d.ts +59 -0
- package/dist/models/BrandTextStyle.js +73 -0
- package/dist/models/Canvas.d.ts +7 -0
- package/dist/models/Canvas.js +3 -0
- package/dist/models/CanvasActiveOperation.d.ts +65 -0
- package/dist/models/CanvasActiveOperation.js +74 -0
- package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
- package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
- package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
- package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
- package/dist/models/CreateWidget201ResponseData.d.ts +18 -0
- package/dist/models/CreateWidget201ResponseData.js +6 -0
- package/dist/models/DeleteOrganizationDomainResponse.d.ts +46 -0
- package/dist/models/DeleteOrganizationDomainResponse.js +58 -0
- package/dist/models/DeleteOrganizationDomainResponseData.d.ts +32 -0
- package/dist/models/DeleteOrganizationDomainResponseData.js +48 -0
- package/dist/models/DeleteUpload200Response.d.ts +46 -0
- package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
- package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
- package/dist/models/DeleteUpload200ResponseData.js +48 -0
- package/dist/models/DesignDefaultsResponse.d.ts +46 -0
- package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
- package/dist/models/EditorSession.d.ts +7 -0
- package/dist/models/EditorSession.js +4 -0
- package/dist/models/GetOperationResponse.d.ts +46 -0
- package/dist/models/GetOperationResponse.js +58 -0
- package/dist/models/GetOperationResponseData.d.ts +86 -0
- package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
- package/dist/models/GetOperationResponseDataMetadata.d.ts +87 -0
- package/dist/models/GetOperationResponseDataMetadata.js +77 -0
- package/dist/models/GetOrganizationDomains200Response.d.ts +46 -0
- package/dist/models/GetOrganizationDomains200Response.js +58 -0
- package/dist/models/ListUploads200Response.d.ts +46 -0
- package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
- package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
- package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
- package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
- package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
- package/dist/models/NewEditorSession.d.ts +1 -1
- package/dist/models/NewWidget.d.ts +2 -3
- package/dist/models/NewWidget.js +0 -1
- package/dist/models/OrganizationDomain.d.ts +56 -0
- package/dist/models/OrganizationDomain.js +56 -0
- package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +1 -1
- package/dist/models/PatchBrandKitAssetRequest.d.ts +73 -0
- package/dist/models/PatchBrandKitAssetRequest.js +76 -0
- package/dist/models/PatchBrandKitRequest.d.ts +72 -0
- package/dist/models/PatchBrandKitRequest.js +64 -0
- package/dist/models/PatchBrandKitRequestFonts.d.ts +51 -0
- package/dist/models/PatchBrandKitRequestFonts.js +55 -0
- package/dist/models/PatchBrandKitRequestSpacing.d.ts +74 -0
- package/dist/models/PatchBrandKitRequestSpacing.js +62 -0
- package/dist/models/PostBrandKitIconRequest.d.ts +38 -0
- package/dist/models/PostBrandKitIconRequest.js +54 -0
- package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
- package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
- package/dist/models/PublicWorkflowResponse.d.ts +46 -0
- package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
- package/dist/models/PutBrandKitRequest.d.ts +46 -0
- package/dist/models/PutBrandKitRequest.js +56 -0
- package/dist/models/UpdateOrganizationDomainResponse.d.ts +46 -0
- package/dist/models/UpdateOrganizationDomainResponse.js +58 -0
- package/dist/models/Upload.d.ts +7 -1
- package/dist/models/Upload.js +2 -0
- package/dist/models/UploadLimits.d.ts +3 -3
- package/dist/models/UserApiKey.d.ts +6 -0
- package/dist/models/UserApiKey.js +2 -0
- package/dist/models/ValidateToken200ResponseData.d.ts +7 -0
- package/dist/models/ValidateToken200ResponseData.js +3 -0
- package/dist/models/ValidateToken200ResponseDataWorkspace.d.ts +38 -0
- package/dist/models/ValidateToken200ResponseDataWorkspace.js +50 -0
- package/dist/models/Widget.d.ts +18 -0
- package/dist/models/Widget.js +6 -0
- package/dist/models/WidgetClarification.d.ts +45 -0
- package/dist/models/WidgetClarification.js +59 -0
- package/dist/models/WidgetClarificationOption.d.ts +44 -0
- package/dist/models/WidgetClarificationOption.js +58 -0
- package/dist/models/WidgetClarificationQuestion.d.ts +63 -0
- package/dist/models/WidgetClarificationQuestion.js +71 -0
- package/dist/models/WidgetCodeChange.d.ts +70 -0
- package/dist/models/WidgetCodeChange.js +76 -0
- package/dist/models/WidgetCodeChanges.d.ts +39 -0
- package/dist/models/WidgetCodeChanges.js +55 -0
- package/dist/models/WidgetNextStep.d.ts +69 -0
- package/dist/models/WidgetNextStep.js +79 -0
- package/dist/models/WidgetPlan.d.ts +58 -0
- package/dist/models/WidgetPlan.js +68 -0
- package/dist/models/WidgetPlanDecisions.d.ts +77 -0
- package/dist/models/WidgetPlanDecisions.js +79 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
- package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
- package/dist/models/WidgetPlanTask.d.ts +77 -0
- package/dist/models/WidgetPlanTask.js +88 -0
- package/dist/models/WorkflowDetailAllOfLastEditedBy.d.ts +2 -2
- package/dist/models/WorkflowDetailResponse.d.ts +46 -0
- package/dist/models/WorkflowDetailResponse.js +58 -0
- package/dist/models/WorkflowFailureReason.d.ts +31 -0
- package/dist/models/WorkflowFailureReason.js +57 -0
- package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
- package/dist/models/WorkflowFailureReasonCounter.js +59 -0
- package/dist/models/WorkflowResponse.d.ts +46 -0
- package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
- package/dist/models/WorkflowStats.d.ts +16 -1
- package/dist/models/WorkflowStats.js +3 -0
- package/dist/models/index.d.ts +59 -25
- package/dist/models/index.js +59 -25
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/apis/PartnerApi.d.ts +0 -2595
- package/dist/apis/PartnerApi.js +0 -6749
- package/dist/apis/WorkspacesApi.d.ts +0 -352
- package/dist/apis/WorkspacesApi.js +0 -946
- package/dist/esm/apis/PartnerApi.js +0 -6712
- package/dist/esm/apis/WorkspacesApi.js +0 -909
- package/dist/esm/models/DeletePersonalWorkspaceDomainResponse.js +0 -51
- package/dist/esm/models/DeletePersonalWorkspaceDomainResponseData.js +0 -41
- package/dist/esm/models/GetPersonalWorkspaceDomains200Response.js +0 -51
- package/dist/esm/models/PersonalWorkspaceDomainResult.js +0 -48
- package/dist/esm/models/PersonalWorkspaceDomainResultResponse.js +0 -51
- package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
- package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
- package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
- package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
- package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
- package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
- package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
- package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
- package/dist/models/DeletePersonalWorkspaceDomainResponse.d.ts +0 -46
- package/dist/models/DeletePersonalWorkspaceDomainResponse.js +0 -58
- package/dist/models/DeletePersonalWorkspaceDomainResponseData.d.ts +0 -32
- package/dist/models/DeletePersonalWorkspaceDomainResponseData.js +0 -48
- package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
- package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
- package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
- package/dist/models/GetPersonalWorkspaceDomains200Response.d.ts +0 -46
- package/dist/models/GetPersonalWorkspaceDomains200Response.js +0 -58
- package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
- package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
- package/dist/models/OperationsIdGetResponse.d.ts +0 -46
- package/dist/models/OperationsIdGetResponseData.d.ts +0 -88
- package/dist/models/PersonalWorkspaceDomain.d.ts +0 -56
- package/dist/models/PersonalWorkspaceDomain.js +0 -62
- package/dist/models/PersonalWorkspaceDomainResult.d.ts +0 -39
- package/dist/models/PersonalWorkspaceDomainResult.js +0 -55
- package/dist/models/PersonalWorkspaceDomainResultResponse.d.ts +0 -46
- package/dist/models/PersonalWorkspaceDomainResultResponse.js +0 -58
- package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
- package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
- package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
- package/dist/models/UploadsGet200Response.d.ts +0 -46
- package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
- package/dist/models/UploadsIdDelete200Response.js +0 -58
- package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
- package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
|
@@ -1,909 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Widgetic API Gateway
|
|
5
|
-
* API documentation for the Widgetic API Gateway
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
import * as runtime from '../runtime.js';
|
|
15
|
-
import { CreateWorkspaceWorkflowFromPreset201ResponseFromJSON, CreateWorkspaceWorkflowFromPresetRequestToJSON, CreateWorkspaceWorkflowRequestToJSON, DeleteWorkspaceWorkflow200ResponseFromJSON, GetWorkspaceWorkflowStats200ResponseFromJSON, GetWorkspaceWorkflowVersion200ResponseFromJSON, ListWorkspaceWorkflowCompositionOptions200ResponseFromJSON, ListWorkspaceWorkflowPresets200ResponseFromJSON, ListWorkspaceWorkflowVersions200ResponseFromJSON, ListWorkspaceWorkflows200ResponseFromJSON, PublishWorkspaceWorkflow200ResponseFromJSON, PublishWorkspaceWorkflowRequestToJSON, SaveWorkspaceWorkflow200ResponseFromJSON, SaveWorkspaceWorkflowRequestToJSON, } from '../models/index.js';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export class WorkspacesApi extends runtime.BaseAPI {
|
|
20
|
-
/**
|
|
21
|
-
* Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can archive.
|
|
22
|
-
* Archive a Workflow
|
|
23
|
-
*/
|
|
24
|
-
async archiveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
25
|
-
if (requestParameters['workspaceId'] == null) {
|
|
26
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling archiveWorkspaceWorkflow().');
|
|
27
|
-
}
|
|
28
|
-
if (requestParameters['workflowId'] == null) {
|
|
29
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling archiveWorkspaceWorkflow().');
|
|
30
|
-
}
|
|
31
|
-
const queryParameters = {};
|
|
32
|
-
const headerParameters = {};
|
|
33
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
34
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
35
|
-
}
|
|
36
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
37
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
38
|
-
}
|
|
39
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
40
|
-
const token = this.configuration.accessToken;
|
|
41
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
42
|
-
if (tokenString) {
|
|
43
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const response = await this.request({
|
|
47
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/archive`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
48
|
-
method: 'POST',
|
|
49
|
-
headers: headerParameters,
|
|
50
|
-
query: queryParameters,
|
|
51
|
-
}, initOverrides);
|
|
52
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SaveWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can archive.
|
|
56
|
-
* Archive a Workflow
|
|
57
|
-
*/
|
|
58
|
-
async archiveWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
59
|
-
const response = await this.archiveWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
60
|
-
return await response.value();
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point\'s published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point\'s live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace\'s limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can start one.
|
|
64
|
-
* Start a Workflow from a starting point
|
|
65
|
-
*/
|
|
66
|
-
async createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides) {
|
|
67
|
-
if (requestParameters['workspaceId'] == null) {
|
|
68
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
69
|
-
}
|
|
70
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
71
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
72
|
-
}
|
|
73
|
-
if (requestParameters['createWorkspaceWorkflowFromPresetRequest'] == null) {
|
|
74
|
-
throw new runtime.RequiredError('createWorkspaceWorkflowFromPresetRequest', 'Required parameter "createWorkspaceWorkflowFromPresetRequest" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
75
|
-
}
|
|
76
|
-
const queryParameters = {};
|
|
77
|
-
const headerParameters = {};
|
|
78
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
79
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
80
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
81
|
-
}
|
|
82
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
83
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
84
|
-
}
|
|
85
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
86
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
87
|
-
}
|
|
88
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
89
|
-
const token = this.configuration.accessToken;
|
|
90
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
91
|
-
if (tokenString) {
|
|
92
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
const response = await this.request({
|
|
96
|
-
path: `/workspaces/{workspaceId}/workflows/from-preset`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
97
|
-
method: 'POST',
|
|
98
|
-
headers: headerParameters,
|
|
99
|
-
query: queryParameters,
|
|
100
|
-
body: CreateWorkspaceWorkflowFromPresetRequestToJSON(requestParameters['createWorkspaceWorkflowFromPresetRequest']),
|
|
101
|
-
}, initOverrides);
|
|
102
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CreateWorkspaceWorkflowFromPreset201ResponseFromJSON(jsonValue));
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point\'s published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point\'s live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace\'s limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can start one.
|
|
106
|
-
* Start a Workflow from a starting point
|
|
107
|
-
*/
|
|
108
|
-
async createWorkspaceWorkflowFromPreset(requestParameters, initOverrides) {
|
|
109
|
-
const response = await this.createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides);
|
|
110
|
-
return await response.value();
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can create one.
|
|
114
|
-
* Create a Workflow
|
|
115
|
-
*/
|
|
116
|
-
async createWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
117
|
-
if (requestParameters['workspaceId'] == null) {
|
|
118
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflow().');
|
|
119
|
-
}
|
|
120
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
121
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflow().');
|
|
122
|
-
}
|
|
123
|
-
if (requestParameters['createWorkspaceWorkflowRequest'] == null) {
|
|
124
|
-
throw new runtime.RequiredError('createWorkspaceWorkflowRequest', 'Required parameter "createWorkspaceWorkflowRequest" was null or undefined when calling createWorkspaceWorkflow().');
|
|
125
|
-
}
|
|
126
|
-
const queryParameters = {};
|
|
127
|
-
const headerParameters = {};
|
|
128
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
129
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
130
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
131
|
-
}
|
|
132
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
133
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
134
|
-
}
|
|
135
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
136
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
137
|
-
}
|
|
138
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
139
|
-
const token = this.configuration.accessToken;
|
|
140
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
141
|
-
if (tokenString) {
|
|
142
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
const response = await this.request({
|
|
146
|
-
path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
147
|
-
method: 'POST',
|
|
148
|
-
headers: headerParameters,
|
|
149
|
-
query: queryParameters,
|
|
150
|
-
body: CreateWorkspaceWorkflowRequestToJSON(requestParameters['createWorkspaceWorkflowRequest']),
|
|
151
|
-
}, initOverrides);
|
|
152
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CreateWorkspaceWorkflowFromPreset201ResponseFromJSON(jsonValue));
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can create one.
|
|
156
|
-
* Create a Workflow
|
|
157
|
-
*/
|
|
158
|
-
async createWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
159
|
-
const response = await this.createWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
160
|
-
return await response.value();
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed\'s first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can delete.
|
|
164
|
-
* Delete a Workflow
|
|
165
|
-
*/
|
|
166
|
-
async deleteWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
167
|
-
if (requestParameters['workspaceId'] == null) {
|
|
168
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling deleteWorkspaceWorkflow().');
|
|
169
|
-
}
|
|
170
|
-
if (requestParameters['workflowId'] == null) {
|
|
171
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling deleteWorkspaceWorkflow().');
|
|
172
|
-
}
|
|
173
|
-
const queryParameters = {};
|
|
174
|
-
const headerParameters = {};
|
|
175
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
176
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
177
|
-
}
|
|
178
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
179
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
180
|
-
}
|
|
181
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
182
|
-
const token = this.configuration.accessToken;
|
|
183
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
184
|
-
if (tokenString) {
|
|
185
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
const response = await this.request({
|
|
189
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
190
|
-
method: 'DELETE',
|
|
191
|
-
headers: headerParameters,
|
|
192
|
-
query: queryParameters,
|
|
193
|
-
}, initOverrides);
|
|
194
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed\'s first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can delete.
|
|
198
|
-
* Delete a Workflow
|
|
199
|
-
*/
|
|
200
|
-
async deleteWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
201
|
-
const response = await this.deleteWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
202
|
-
return await response.value();
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can discard.
|
|
206
|
-
* Discard the Unpublished Changes of a Workflow
|
|
207
|
-
*/
|
|
208
|
-
async discardWorkspaceWorkflowChangesRaw(requestParameters, initOverrides) {
|
|
209
|
-
if (requestParameters['workspaceId'] == null) {
|
|
210
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling discardWorkspaceWorkflowChanges().');
|
|
211
|
-
}
|
|
212
|
-
if (requestParameters['workflowId'] == null) {
|
|
213
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling discardWorkspaceWorkflowChanges().');
|
|
214
|
-
}
|
|
215
|
-
if (requestParameters['publishWorkspaceWorkflowRequest'] == null) {
|
|
216
|
-
throw new runtime.RequiredError('publishWorkspaceWorkflowRequest', 'Required parameter "publishWorkspaceWorkflowRequest" was null or undefined when calling discardWorkspaceWorkflowChanges().');
|
|
217
|
-
}
|
|
218
|
-
const queryParameters = {};
|
|
219
|
-
const headerParameters = {};
|
|
220
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
221
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
222
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
223
|
-
}
|
|
224
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
225
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
226
|
-
}
|
|
227
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
228
|
-
const token = this.configuration.accessToken;
|
|
229
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
230
|
-
if (tokenString) {
|
|
231
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
const response = await this.request({
|
|
235
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/discard`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
236
|
-
method: 'POST',
|
|
237
|
-
headers: headerParameters,
|
|
238
|
-
query: queryParameters,
|
|
239
|
-
body: PublishWorkspaceWorkflowRequestToJSON(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
240
|
-
}, initOverrides);
|
|
241
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CreateWorkspaceWorkflowFromPreset201ResponseFromJSON(jsonValue));
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can discard.
|
|
245
|
-
* Discard the Unpublished Changes of a Workflow
|
|
246
|
-
*/
|
|
247
|
-
async discardWorkspaceWorkflowChanges(requestParameters, initOverrides) {
|
|
248
|
-
const response = await this.discardWorkspaceWorkflowChangesRaw(requestParameters, initOverrides);
|
|
249
|
-
return await response.value();
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can duplicate.
|
|
253
|
-
* Duplicate a Workflow
|
|
254
|
-
*/
|
|
255
|
-
async duplicateWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
256
|
-
if (requestParameters['workspaceId'] == null) {
|
|
257
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling duplicateWorkspaceWorkflow().');
|
|
258
|
-
}
|
|
259
|
-
if (requestParameters['workflowId'] == null) {
|
|
260
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling duplicateWorkspaceWorkflow().');
|
|
261
|
-
}
|
|
262
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
263
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling duplicateWorkspaceWorkflow().');
|
|
264
|
-
}
|
|
265
|
-
const queryParameters = {};
|
|
266
|
-
const headerParameters = {};
|
|
267
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
268
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
269
|
-
}
|
|
270
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
271
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
272
|
-
}
|
|
273
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
274
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
275
|
-
}
|
|
276
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
277
|
-
const token = this.configuration.accessToken;
|
|
278
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
279
|
-
if (tokenString) {
|
|
280
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
const response = await this.request({
|
|
284
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/duplicate`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
285
|
-
method: 'POST',
|
|
286
|
-
headers: headerParameters,
|
|
287
|
-
query: queryParameters,
|
|
288
|
-
}, initOverrides);
|
|
289
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CreateWorkspaceWorkflowFromPreset201ResponseFromJSON(jsonValue));
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can duplicate.
|
|
293
|
-
* Duplicate a Workflow
|
|
294
|
-
*/
|
|
295
|
-
async duplicateWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
296
|
-
const response = await this.duplicateWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
297
|
-
return await response.value();
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on. No visitor and no value a visitor typed is ever stored. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
301
|
-
* Get what Visitors Did in a Workflow
|
|
302
|
-
*/
|
|
303
|
-
async getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides) {
|
|
304
|
-
if (requestParameters['workspaceId'] == null) {
|
|
305
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowStats().');
|
|
306
|
-
}
|
|
307
|
-
if (requestParameters['workflowId'] == null) {
|
|
308
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowStats().');
|
|
309
|
-
}
|
|
310
|
-
const queryParameters = {};
|
|
311
|
-
if (requestParameters['versionId'] != null) {
|
|
312
|
-
queryParameters['versionId'] = requestParameters['versionId'];
|
|
313
|
-
}
|
|
314
|
-
if (requestParameters['from'] != null) {
|
|
315
|
-
queryParameters['from'] = requestParameters['from'];
|
|
316
|
-
}
|
|
317
|
-
if (requestParameters['to'] != null) {
|
|
318
|
-
queryParameters['to'] = requestParameters['to'];
|
|
319
|
-
}
|
|
320
|
-
const headerParameters = {};
|
|
321
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
322
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
323
|
-
}
|
|
324
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
325
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
326
|
-
}
|
|
327
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
328
|
-
const token = this.configuration.accessToken;
|
|
329
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
330
|
-
if (tokenString) {
|
|
331
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
const response = await this.request({
|
|
335
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/stats`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
336
|
-
method: 'GET',
|
|
337
|
-
headers: headerParameters,
|
|
338
|
-
query: queryParameters,
|
|
339
|
-
}, initOverrides);
|
|
340
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GetWorkspaceWorkflowStats200ResponseFromJSON(jsonValue));
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on. No visitor and no value a visitor typed is ever stored. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
344
|
-
* Get what Visitors Did in a Workflow
|
|
345
|
-
*/
|
|
346
|
-
async getWorkspaceWorkflowStats(requestParameters, initOverrides) {
|
|
347
|
-
const response = await this.getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides);
|
|
348
|
-
return await response.value();
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* One published version with its graph, for the read-only preview and for the Runs view. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
352
|
-
* Get a Published Version of a Workflow
|
|
353
|
-
*/
|
|
354
|
-
async getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
|
|
355
|
-
if (requestParameters['workspaceId'] == null) {
|
|
356
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
357
|
-
}
|
|
358
|
-
if (requestParameters['workflowId'] == null) {
|
|
359
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
360
|
-
}
|
|
361
|
-
if (requestParameters['versionId'] == null) {
|
|
362
|
-
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
363
|
-
}
|
|
364
|
-
const queryParameters = {};
|
|
365
|
-
const headerParameters = {};
|
|
366
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
367
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
368
|
-
}
|
|
369
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
370
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
371
|
-
}
|
|
372
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
373
|
-
const token = this.configuration.accessToken;
|
|
374
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
375
|
-
if (tokenString) {
|
|
376
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
const response = await this.request({
|
|
380
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
381
|
-
method: 'GET',
|
|
382
|
-
headers: headerParameters,
|
|
383
|
-
query: queryParameters,
|
|
384
|
-
}, initOverrides);
|
|
385
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GetWorkspaceWorkflowVersion200ResponseFromJSON(jsonValue));
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* One published version with its graph, for the read-only preview and for the Runs view. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
389
|
-
* Get a Published Version of a Workflow
|
|
390
|
-
*/
|
|
391
|
-
async getWorkspaceWorkflowVersion(requestParameters, initOverrides) {
|
|
392
|
-
const response = await this.getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
|
|
393
|
-
return await response.value();
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Reads a workflow with its draft graph and the version that is live. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
|
|
397
|
-
* Get a Workflow
|
|
398
|
-
*/
|
|
399
|
-
async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
400
|
-
if (requestParameters['workspaceId'] == null) {
|
|
401
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
402
|
-
}
|
|
403
|
-
if (requestParameters['workflowId'] == null) {
|
|
404
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
405
|
-
}
|
|
406
|
-
const queryParameters = {};
|
|
407
|
-
const headerParameters = {};
|
|
408
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
409
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
410
|
-
}
|
|
411
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
412
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
413
|
-
}
|
|
414
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
415
|
-
const token = this.configuration.accessToken;
|
|
416
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
417
|
-
if (tokenString) {
|
|
418
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
const response = await this.request({
|
|
422
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
423
|
-
method: 'GET',
|
|
424
|
-
headers: headerParameters,
|
|
425
|
-
query: queryParameters,
|
|
426
|
-
}, initOverrides);
|
|
427
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CreateWorkspaceWorkflowFromPreset201ResponseFromJSON(jsonValue));
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* Reads a workflow with its draft graph and the version that is live. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
|
|
431
|
-
* Get a Workflow
|
|
432
|
-
*/
|
|
433
|
-
async getWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
434
|
-
const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
435
|
-
return await response.value();
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* The workspace\'s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor\'s entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person\'s private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
|
|
439
|
-
* List the compositions a workflow can show, and what each can do
|
|
440
|
-
*/
|
|
441
|
-
async listWorkspaceWorkflowCompositionOptionsRaw(requestParameters, initOverrides) {
|
|
442
|
-
if (requestParameters['workspaceId'] == null) {
|
|
443
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling listWorkspaceWorkflowCompositionOptions().');
|
|
444
|
-
}
|
|
445
|
-
const queryParameters = {};
|
|
446
|
-
if (requestParameters['search'] != null) {
|
|
447
|
-
queryParameters['search'] = requestParameters['search'];
|
|
448
|
-
}
|
|
449
|
-
if (requestParameters['ids'] != null) {
|
|
450
|
-
queryParameters['ids'] = requestParameters['ids'];
|
|
451
|
-
}
|
|
452
|
-
if (requestParameters['limit'] != null) {
|
|
453
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
454
|
-
}
|
|
455
|
-
if (requestParameters['offset'] != null) {
|
|
456
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
457
|
-
}
|
|
458
|
-
const headerParameters = {};
|
|
459
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
460
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
461
|
-
}
|
|
462
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
463
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
464
|
-
}
|
|
465
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
466
|
-
const token = this.configuration.accessToken;
|
|
467
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
468
|
-
if (tokenString) {
|
|
469
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
const response = await this.request({
|
|
473
|
-
path: `/workspaces/{workspaceId}/workflows/composition-options`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
474
|
-
method: 'GET',
|
|
475
|
-
headers: headerParameters,
|
|
476
|
-
query: queryParameters,
|
|
477
|
-
}, initOverrides);
|
|
478
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflowCompositionOptions200ResponseFromJSON(jsonValue));
|
|
479
|
-
}
|
|
480
|
-
/**
|
|
481
|
-
* The workspace\'s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor\'s entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person\'s private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
|
|
482
|
-
* List the compositions a workflow can show, and what each can do
|
|
483
|
-
*/
|
|
484
|
-
async listWorkspaceWorkflowCompositionOptions(requestParameters, initOverrides) {
|
|
485
|
-
const response = await this.listWorkspaceWorkflowCompositionOptionsRaw(requestParameters, initOverrides);
|
|
486
|
-
return await response.value();
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner\'s managed users, that the partner offers (a managed user is never shown Widgetic\'s, and a person is never shown a partner\'s). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
|
|
490
|
-
* List the starting points for a new Workflow
|
|
491
|
-
*/
|
|
492
|
-
async listWorkspaceWorkflowPresetsRaw(requestParameters, initOverrides) {
|
|
493
|
-
if (requestParameters['workspaceId'] == null) {
|
|
494
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling listWorkspaceWorkflowPresets().');
|
|
495
|
-
}
|
|
496
|
-
const queryParameters = {};
|
|
497
|
-
const headerParameters = {};
|
|
498
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
499
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
500
|
-
}
|
|
501
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
502
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
503
|
-
}
|
|
504
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
505
|
-
const token = this.configuration.accessToken;
|
|
506
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
507
|
-
if (tokenString) {
|
|
508
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
const response = await this.request({
|
|
512
|
-
path: `/workspaces/{workspaceId}/workflows/presets`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
513
|
-
method: 'GET',
|
|
514
|
-
headers: headerParameters,
|
|
515
|
-
query: queryParameters,
|
|
516
|
-
}, initOverrides);
|
|
517
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflowPresets200ResponseFromJSON(jsonValue));
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner\'s managed users, that the partner offers (a managed user is never shown Widgetic\'s, and a person is never shown a partner\'s). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
|
|
521
|
-
* List the starting points for a new Workflow
|
|
522
|
-
*/
|
|
523
|
-
async listWorkspaceWorkflowPresets(requestParameters, initOverrides) {
|
|
524
|
-
const response = await this.listWorkspaceWorkflowPresetsRaw(requestParameters, initOverrides);
|
|
525
|
-
return await response.value();
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
529
|
-
* List the Published Versions of a Workflow
|
|
530
|
-
*/
|
|
531
|
-
async listWorkspaceWorkflowVersionsRaw(requestParameters, initOverrides) {
|
|
532
|
-
if (requestParameters['workspaceId'] == null) {
|
|
533
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling listWorkspaceWorkflowVersions().');
|
|
534
|
-
}
|
|
535
|
-
if (requestParameters['workflowId'] == null) {
|
|
536
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling listWorkspaceWorkflowVersions().');
|
|
537
|
-
}
|
|
538
|
-
const queryParameters = {};
|
|
539
|
-
const headerParameters = {};
|
|
540
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
541
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
542
|
-
}
|
|
543
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
544
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
545
|
-
}
|
|
546
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
547
|
-
const token = this.configuration.accessToken;
|
|
548
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
549
|
-
if (tokenString) {
|
|
550
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
const response = await this.request({
|
|
554
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/versions`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
555
|
-
method: 'GET',
|
|
556
|
-
headers: headerParameters,
|
|
557
|
-
query: queryParameters,
|
|
558
|
-
}, initOverrides);
|
|
559
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflowVersions200ResponseFromJSON(jsonValue));
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
563
|
-
* List the Published Versions of a Workflow
|
|
564
|
-
*/
|
|
565
|
-
async listWorkspaceWorkflowVersions(requestParameters, initOverrides) {
|
|
566
|
-
const response = await this.listWorkspaceWorkflowVersionsRaw(requestParameters, initOverrides);
|
|
567
|
-
return await response.value();
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
|
|
571
|
-
* List the Workflows of a Workspace
|
|
572
|
-
*/
|
|
573
|
-
async listWorkspaceWorkflowsRaw(requestParameters, initOverrides) {
|
|
574
|
-
if (requestParameters['workspaceId'] == null) {
|
|
575
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling listWorkspaceWorkflows().');
|
|
576
|
-
}
|
|
577
|
-
const queryParameters = {};
|
|
578
|
-
if (requestParameters['search'] != null) {
|
|
579
|
-
queryParameters['search'] = requestParameters['search'];
|
|
580
|
-
}
|
|
581
|
-
if (requestParameters['status'] != null) {
|
|
582
|
-
queryParameters['status'] = requestParameters['status'];
|
|
583
|
-
}
|
|
584
|
-
if (requestParameters['sort'] != null) {
|
|
585
|
-
queryParameters['sort'] = requestParameters['sort'];
|
|
586
|
-
}
|
|
587
|
-
if (requestParameters['limit'] != null) {
|
|
588
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
589
|
-
}
|
|
590
|
-
if (requestParameters['offset'] != null) {
|
|
591
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
592
|
-
}
|
|
593
|
-
const headerParameters = {};
|
|
594
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
595
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
596
|
-
}
|
|
597
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
598
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
599
|
-
}
|
|
600
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
601
|
-
const token = this.configuration.accessToken;
|
|
602
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
603
|
-
if (tokenString) {
|
|
604
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
const response = await this.request({
|
|
608
|
-
path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
609
|
-
method: 'GET',
|
|
610
|
-
headers: headerParameters,
|
|
611
|
-
query: queryParameters,
|
|
612
|
-
}, initOverrides);
|
|
613
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflows200ResponseFromJSON(jsonValue));
|
|
614
|
-
}
|
|
615
|
-
/**
|
|
616
|
-
* Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
|
|
617
|
-
* List the Workflows of a Workspace
|
|
618
|
-
*/
|
|
619
|
-
async listWorkspaceWorkflows(requestParameters, initOverrides) {
|
|
620
|
-
const response = await this.listWorkspaceWorkflowsRaw(requestParameters, initOverrides);
|
|
621
|
-
return await response.value();
|
|
622
|
-
}
|
|
623
|
-
/**
|
|
624
|
-
* While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can pause.
|
|
625
|
-
* Pause a Workflow
|
|
626
|
-
*/
|
|
627
|
-
async pauseWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
628
|
-
if (requestParameters['workspaceId'] == null) {
|
|
629
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling pauseWorkspaceWorkflow().');
|
|
630
|
-
}
|
|
631
|
-
if (requestParameters['workflowId'] == null) {
|
|
632
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling pauseWorkspaceWorkflow().');
|
|
633
|
-
}
|
|
634
|
-
const queryParameters = {};
|
|
635
|
-
const headerParameters = {};
|
|
636
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
637
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
638
|
-
}
|
|
639
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
640
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
641
|
-
}
|
|
642
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
643
|
-
const token = this.configuration.accessToken;
|
|
644
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
645
|
-
if (tokenString) {
|
|
646
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
const response = await this.request({
|
|
650
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/pause`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
651
|
-
method: 'POST',
|
|
652
|
-
headers: headerParameters,
|
|
653
|
-
query: queryParameters,
|
|
654
|
-
}, initOverrides);
|
|
655
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SaveWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can pause.
|
|
659
|
-
* Pause a Workflow
|
|
660
|
-
*/
|
|
661
|
-
async pauseWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
662
|
-
const response = await this.pauseWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
663
|
-
return await response.value();
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error\'s `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can publish.
|
|
667
|
-
* Publish the Draft of a Workflow
|
|
668
|
-
*/
|
|
669
|
-
async publishWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
670
|
-
if (requestParameters['workspaceId'] == null) {
|
|
671
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling publishWorkspaceWorkflow().');
|
|
672
|
-
}
|
|
673
|
-
if (requestParameters['workflowId'] == null) {
|
|
674
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling publishWorkspaceWorkflow().');
|
|
675
|
-
}
|
|
676
|
-
if (requestParameters['idempotencyKey'] == null) {
|
|
677
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling publishWorkspaceWorkflow().');
|
|
678
|
-
}
|
|
679
|
-
if (requestParameters['publishWorkspaceWorkflowRequest'] == null) {
|
|
680
|
-
throw new runtime.RequiredError('publishWorkspaceWorkflowRequest', 'Required parameter "publishWorkspaceWorkflowRequest" was null or undefined when calling publishWorkspaceWorkflow().');
|
|
681
|
-
}
|
|
682
|
-
const queryParameters = {};
|
|
683
|
-
const headerParameters = {};
|
|
684
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
685
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
686
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
687
|
-
}
|
|
688
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
689
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
690
|
-
}
|
|
691
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
692
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
693
|
-
}
|
|
694
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
695
|
-
const token = this.configuration.accessToken;
|
|
696
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
697
|
-
if (tokenString) {
|
|
698
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
const response = await this.request({
|
|
702
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/publish`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
703
|
-
method: 'POST',
|
|
704
|
-
headers: headerParameters,
|
|
705
|
-
query: queryParameters,
|
|
706
|
-
body: PublishWorkspaceWorkflowRequestToJSON(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
707
|
-
}, initOverrides);
|
|
708
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => PublishWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error\'s `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can publish.
|
|
712
|
-
* Publish the Draft of a Workflow
|
|
713
|
-
*/
|
|
714
|
-
async publishWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
715
|
-
const response = await this.publishWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
716
|
-
return await response.value();
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can restore.
|
|
720
|
-
* Restore a Version of a Workflow into the Draft
|
|
721
|
-
*/
|
|
722
|
-
async restoreWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
|
|
723
|
-
if (requestParameters['workspaceId'] == null) {
|
|
724
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling restoreWorkspaceWorkflowVersion().');
|
|
725
|
-
}
|
|
726
|
-
if (requestParameters['workflowId'] == null) {
|
|
727
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling restoreWorkspaceWorkflowVersion().');
|
|
728
|
-
}
|
|
729
|
-
if (requestParameters['versionId'] == null) {
|
|
730
|
-
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling restoreWorkspaceWorkflowVersion().');
|
|
731
|
-
}
|
|
732
|
-
if (requestParameters['publishWorkspaceWorkflowRequest'] == null) {
|
|
733
|
-
throw new runtime.RequiredError('publishWorkspaceWorkflowRequest', 'Required parameter "publishWorkspaceWorkflowRequest" was null or undefined when calling restoreWorkspaceWorkflowVersion().');
|
|
734
|
-
}
|
|
735
|
-
const queryParameters = {};
|
|
736
|
-
const headerParameters = {};
|
|
737
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
738
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
739
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
740
|
-
}
|
|
741
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
742
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
743
|
-
}
|
|
744
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
745
|
-
const token = this.configuration.accessToken;
|
|
746
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
747
|
-
if (tokenString) {
|
|
748
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
const response = await this.request({
|
|
752
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}/restore`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
753
|
-
method: 'POST',
|
|
754
|
-
headers: headerParameters,
|
|
755
|
-
query: queryParameters,
|
|
756
|
-
body: PublishWorkspaceWorkflowRequestToJSON(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
757
|
-
}, initOverrides);
|
|
758
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CreateWorkspaceWorkflowFromPreset201ResponseFromJSON(jsonValue));
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can restore.
|
|
762
|
-
* Restore a Version of a Workflow into the Draft
|
|
763
|
-
*/
|
|
764
|
-
async restoreWorkspaceWorkflowVersion(requestParameters, initOverrides) {
|
|
765
|
-
const response = await this.restoreWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
|
|
766
|
-
return await response.value();
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Makes a paused workflow live again, on the version that was live when it was paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can resume.
|
|
770
|
-
* Resume a Paused Workflow
|
|
771
|
-
*/
|
|
772
|
-
async resumeWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
773
|
-
if (requestParameters['workspaceId'] == null) {
|
|
774
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling resumeWorkspaceWorkflow().');
|
|
775
|
-
}
|
|
776
|
-
if (requestParameters['workflowId'] == null) {
|
|
777
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling resumeWorkspaceWorkflow().');
|
|
778
|
-
}
|
|
779
|
-
const queryParameters = {};
|
|
780
|
-
const headerParameters = {};
|
|
781
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
782
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
783
|
-
}
|
|
784
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
785
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
786
|
-
}
|
|
787
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
788
|
-
const token = this.configuration.accessToken;
|
|
789
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
790
|
-
if (tokenString) {
|
|
791
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
const response = await this.request({
|
|
795
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/resume`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
796
|
-
method: 'POST',
|
|
797
|
-
headers: headerParameters,
|
|
798
|
-
query: queryParameters,
|
|
799
|
-
}, initOverrides);
|
|
800
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SaveWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* Makes a paused workflow live again, on the version that was live when it was paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can resume.
|
|
804
|
-
* Resume a Paused Workflow
|
|
805
|
-
*/
|
|
806
|
-
async resumeWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
807
|
-
const response = await this.resumeWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
808
|
-
return await response.value();
|
|
809
|
-
}
|
|
810
|
-
/**
|
|
811
|
-
* Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can save.
|
|
812
|
-
* Save the Draft of a Workflow
|
|
813
|
-
*/
|
|
814
|
-
async saveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
815
|
-
if (requestParameters['workspaceId'] == null) {
|
|
816
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling saveWorkspaceWorkflow().');
|
|
817
|
-
}
|
|
818
|
-
if (requestParameters['workflowId'] == null) {
|
|
819
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling saveWorkspaceWorkflow().');
|
|
820
|
-
}
|
|
821
|
-
if (requestParameters['saveWorkspaceWorkflowRequest'] == null) {
|
|
822
|
-
throw new runtime.RequiredError('saveWorkspaceWorkflowRequest', 'Required parameter "saveWorkspaceWorkflowRequest" was null or undefined when calling saveWorkspaceWorkflow().');
|
|
823
|
-
}
|
|
824
|
-
const queryParameters = {};
|
|
825
|
-
const headerParameters = {};
|
|
826
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
827
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
828
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
829
|
-
}
|
|
830
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
831
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
832
|
-
}
|
|
833
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
834
|
-
const token = this.configuration.accessToken;
|
|
835
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
836
|
-
if (tokenString) {
|
|
837
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
const response = await this.request({
|
|
841
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
842
|
-
method: 'PUT',
|
|
843
|
-
headers: headerParameters,
|
|
844
|
-
query: queryParameters,
|
|
845
|
-
body: SaveWorkspaceWorkflowRequestToJSON(requestParameters['saveWorkspaceWorkflowRequest']),
|
|
846
|
-
}, initOverrides);
|
|
847
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SaveWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
848
|
-
}
|
|
849
|
-
/**
|
|
850
|
-
* Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can save.
|
|
851
|
-
* Save the Draft of a Workflow
|
|
852
|
-
*/
|
|
853
|
-
async saveWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
854
|
-
const response = await this.saveWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
855
|
-
return await response.value();
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can unarchive.
|
|
859
|
-
* Unarchive a Workflow
|
|
860
|
-
*/
|
|
861
|
-
async unarchiveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
862
|
-
if (requestParameters['workspaceId'] == null) {
|
|
863
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling unarchiveWorkspaceWorkflow().');
|
|
864
|
-
}
|
|
865
|
-
if (requestParameters['workflowId'] == null) {
|
|
866
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling unarchiveWorkspaceWorkflow().');
|
|
867
|
-
}
|
|
868
|
-
const queryParameters = {};
|
|
869
|
-
const headerParameters = {};
|
|
870
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
871
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
872
|
-
}
|
|
873
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
874
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
875
|
-
}
|
|
876
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
877
|
-
const token = this.configuration.accessToken;
|
|
878
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
879
|
-
if (tokenString) {
|
|
880
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
const response = await this.request({
|
|
884
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/unarchive`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
885
|
-
method: 'POST',
|
|
886
|
-
headers: headerParameters,
|
|
887
|
-
query: queryParameters,
|
|
888
|
-
}, initOverrides);
|
|
889
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SaveWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
890
|
-
}
|
|
891
|
-
/**
|
|
892
|
-
* Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can unarchive.
|
|
893
|
-
* Unarchive a Workflow
|
|
894
|
-
*/
|
|
895
|
-
async unarchiveWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
896
|
-
const response = await this.unarchiveWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
897
|
-
return await response.value();
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
/**
|
|
901
|
-
* @export
|
|
902
|
-
*/
|
|
903
|
-
export const ListWorkspaceWorkflows1StatusEnum = {
|
|
904
|
-
Draft: 'draft',
|
|
905
|
-
Live: 'live',
|
|
906
|
-
Paused: 'paused',
|
|
907
|
-
Archived: 'archived',
|
|
908
|
-
All: 'all'
|
|
909
|
-
};
|