@widgetic/api-sdk-ts 1.11.111 → 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 +42 -42
- package/dist/apis/BrandKitApi.js +42 -42
- 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 +1 -2
- package/dist/apis/index.js +1 -2
- package/dist/esm/apis/BrandKitApi.js +41 -41
- 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 +1 -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/BrandKitTokens.js +3 -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/PatchBrandKitRequest.js +3 -0
- package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
- package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
- 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 +43 -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/BrandKitTokens.d.ts +8 -1
- package/dist/models/BrandKitTokens.js +3 -0
- package/dist/models/BrandKitView.d.ts +1 -1
- 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/PatchBrandKitRequest.d.ts +7 -0
- package/dist/models/PatchBrandKitRequest.js +3 -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/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 +43 -25
- package/dist/models/index.js +43 -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 -2707
- package/dist/apis/PartnerApi.js +0 -7073
- package/dist/apis/WorkspacesApi.d.ts +0 -352
- package/dist/apis/WorkspacesApi.js +0 -946
- package/dist/esm/apis/PartnerApi.js +0 -7036
- 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
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import * as runtime from '../runtime.js';
|
|
15
|
-
import {
|
|
15
|
+
import { CreateWorkspaceWorkflowFromPresetRequestToJSON, CreateWorkspaceWorkflowRequestToJSON, DeleteWorkspaceWorkflow200ResponseFromJSON, GetWorkspaceWorkflowStats200ResponseFromJSON, GetWorkspaceWorkflowVersion200ResponseFromJSON, ListWorkspaceWorkflowCompositionOptions200ResponseFromJSON, ListWorkspaceWorkflowPresets200ResponseFromJSON, ListWorkspaceWorkflowVersions200ResponseFromJSON, ListWorkspaceWorkflows200ResponseFromJSON, PublishWorkspaceWorkflow200ResponseFromJSON, PublishWorkspaceWorkflowRequestToJSON, SaveWorkspaceWorkflowRequestToJSON, WorkflowDetailResponseFromJSON, WorkflowResponseFromJSON, } from '../models/index.js';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
19
|
export class WorkflowsApi extends runtime.BaseAPI {
|
|
20
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.
|
|
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. The workspace is named by its UUID. Any active member can archive.
|
|
22
22
|
* Archive a Workflow
|
|
23
23
|
*/
|
|
24
24
|
async archiveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -49,10 +49,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
49
49
|
headers: headerParameters,
|
|
50
50
|
query: queryParameters,
|
|
51
51
|
}, initOverrides);
|
|
52
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowResponseFromJSON(jsonValue));
|
|
53
53
|
}
|
|
54
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.
|
|
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. The workspace is named by its UUID. Any active member can archive.
|
|
56
56
|
* Archive a Workflow
|
|
57
57
|
*/
|
|
58
58
|
async archiveWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -60,18 +60,18 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
60
60
|
return await response.value();
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Makes
|
|
64
|
-
*
|
|
63
|
+
* 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. The workspace is named by its UUID. Any active member can create one.
|
|
64
|
+
* Create a Workflow
|
|
65
65
|
*/
|
|
66
|
-
async
|
|
66
|
+
async createWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
67
67
|
if (requestParameters['workspaceId'] == null) {
|
|
68
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
68
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflow().');
|
|
69
69
|
}
|
|
70
70
|
if (requestParameters['idempotencyKey'] == null) {
|
|
71
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
71
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflow().');
|
|
72
72
|
}
|
|
73
|
-
if (requestParameters['
|
|
74
|
-
throw new runtime.RequiredError('
|
|
73
|
+
if (requestParameters['createWorkspaceWorkflowRequest'] == null) {
|
|
74
|
+
throw new runtime.RequiredError('createWorkspaceWorkflowRequest', 'Required parameter "createWorkspaceWorkflowRequest" was null or undefined when calling createWorkspaceWorkflow().');
|
|
75
75
|
}
|
|
76
76
|
const queryParameters = {};
|
|
77
77
|
const headerParameters = {};
|
|
@@ -93,35 +93,35 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
const response = await this.request({
|
|
96
|
-
path: `/workspaces/{workspaceId}/workflows
|
|
96
|
+
path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
97
97
|
method: 'POST',
|
|
98
98
|
headers: headerParameters,
|
|
99
99
|
query: queryParameters,
|
|
100
|
-
body:
|
|
100
|
+
body: CreateWorkspaceWorkflowRequestToJSON(requestParameters['createWorkspaceWorkflowRequest']),
|
|
101
101
|
}, initOverrides);
|
|
102
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
102
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* Makes
|
|
106
|
-
*
|
|
105
|
+
* 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. The workspace is named by its UUID. Any active member can create one.
|
|
106
|
+
* Create a Workflow
|
|
107
107
|
*/
|
|
108
|
-
async
|
|
109
|
-
const response = await this.
|
|
108
|
+
async createWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
109
|
+
const response = await this.createWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
110
110
|
return await response.value();
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* Makes a
|
|
114
|
-
*
|
|
113
|
+
* 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. The workspace is named by its UUID. Any active member can start one.
|
|
114
|
+
* Start a Workflow from a starting point
|
|
115
115
|
*/
|
|
116
|
-
async
|
|
116
|
+
async createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides) {
|
|
117
117
|
if (requestParameters['workspaceId'] == null) {
|
|
118
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
118
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
119
119
|
}
|
|
120
120
|
if (requestParameters['idempotencyKey'] == null) {
|
|
121
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
121
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
122
122
|
}
|
|
123
|
-
if (requestParameters['
|
|
124
|
-
throw new runtime.RequiredError('
|
|
123
|
+
if (requestParameters['createWorkspaceWorkflowFromPresetRequest'] == null) {
|
|
124
|
+
throw new runtime.RequiredError('createWorkspaceWorkflowFromPresetRequest', 'Required parameter "createWorkspaceWorkflowFromPresetRequest" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
125
125
|
}
|
|
126
126
|
const queryParameters = {};
|
|
127
127
|
const headerParameters = {};
|
|
@@ -143,24 +143,24 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
const response = await this.request({
|
|
146
|
-
path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
146
|
+
path: `/workspaces/{workspaceId}/workflows/from-preset`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
147
147
|
method: 'POST',
|
|
148
148
|
headers: headerParameters,
|
|
149
149
|
query: queryParameters,
|
|
150
|
-
body:
|
|
150
|
+
body: CreateWorkspaceWorkflowFromPresetRequestToJSON(requestParameters['createWorkspaceWorkflowFromPresetRequest']),
|
|
151
151
|
}, initOverrides);
|
|
152
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
152
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
|
-
* Makes a
|
|
156
|
-
*
|
|
155
|
+
* 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. The workspace is named by its UUID. Any active member can start one.
|
|
156
|
+
* Start a Workflow from a starting point
|
|
157
157
|
*/
|
|
158
|
-
async
|
|
159
|
-
const response = await this.
|
|
158
|
+
async createWorkspaceWorkflowFromPreset(requestParameters, initOverrides) {
|
|
159
|
+
const response = await this.createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides);
|
|
160
160
|
return await response.value();
|
|
161
161
|
}
|
|
162
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\".
|
|
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\". The workspace is named by its UUID. Any active member can delete.
|
|
164
164
|
* Delete a Workflow
|
|
165
165
|
*/
|
|
166
166
|
async deleteWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -194,7 +194,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
194
194
|
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
195
195
|
}
|
|
196
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\".
|
|
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\". The workspace is named by its UUID. Any active member can delete.
|
|
198
198
|
* Delete a Workflow
|
|
199
199
|
*/
|
|
200
200
|
async deleteWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -202,7 +202,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
202
202
|
return await response.value();
|
|
203
203
|
}
|
|
204
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.
|
|
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. The workspace is named by its UUID. Any active member can discard.
|
|
206
206
|
* Discard the Unpublished Changes of a Workflow
|
|
207
207
|
*/
|
|
208
208
|
async discardWorkspaceWorkflowChangesRaw(requestParameters, initOverrides) {
|
|
@@ -238,10 +238,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
238
238
|
query: queryParameters,
|
|
239
239
|
body: PublishWorkspaceWorkflowRequestToJSON(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
240
240
|
}, initOverrides);
|
|
241
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
241
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
242
242
|
}
|
|
243
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.
|
|
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. The workspace is named by its UUID. Any active member can discard.
|
|
245
245
|
* Discard the Unpublished Changes of a Workflow
|
|
246
246
|
*/
|
|
247
247
|
async discardWorkspaceWorkflowChanges(requestParameters, initOverrides) {
|
|
@@ -249,7 +249,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
249
249
|
return await response.value();
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
|
-
* Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\".
|
|
252
|
+
* Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". The workspace is named by its UUID. Any active member can duplicate.
|
|
253
253
|
* Duplicate a Workflow
|
|
254
254
|
*/
|
|
255
255
|
async duplicateWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -286,10 +286,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
286
286
|
headers: headerParameters,
|
|
287
287
|
query: queryParameters,
|
|
288
288
|
}, initOverrides);
|
|
289
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
289
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
|
-
* Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\".
|
|
292
|
+
* Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". The workspace is named by its UUID. Any active member can duplicate.
|
|
293
293
|
* Duplicate a Workflow
|
|
294
294
|
*/
|
|
295
295
|
async duplicateWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -297,26 +297,17 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
297
297
|
return await response.value();
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
301
|
-
* Get
|
|
300
|
+
* Reads a workflow with its draft graph and the version that is live. The workspace is named by its UUID. Any active member can read it.
|
|
301
|
+
* Get a Workflow
|
|
302
302
|
*/
|
|
303
|
-
async
|
|
303
|
+
async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
304
304
|
if (requestParameters['workspaceId'] == null) {
|
|
305
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
305
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
306
306
|
}
|
|
307
307
|
if (requestParameters['workflowId'] == null) {
|
|
308
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling
|
|
308
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
309
309
|
}
|
|
310
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
311
|
const headerParameters = {};
|
|
321
312
|
if (requestParameters['xManagedUserId'] != null) {
|
|
322
313
|
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
@@ -332,36 +323,42 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
332
323
|
}
|
|
333
324
|
}
|
|
334
325
|
const response = await this.request({
|
|
335
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}
|
|
326
|
+
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
336
327
|
method: 'GET',
|
|
337
328
|
headers: headerParameters,
|
|
338
329
|
query: queryParameters,
|
|
339
330
|
}, initOverrides);
|
|
340
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
341
332
|
}
|
|
342
333
|
/**
|
|
343
|
-
*
|
|
344
|
-
* Get
|
|
334
|
+
* Reads a workflow with its draft graph and the version that is live. The workspace is named by its UUID. Any active member can read it.
|
|
335
|
+
* Get a Workflow
|
|
345
336
|
*/
|
|
346
|
-
async
|
|
347
|
-
const response = await this.
|
|
337
|
+
async getWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
338
|
+
const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
348
339
|
return await response.value();
|
|
349
340
|
}
|
|
350
341
|
/**
|
|
351
|
-
*
|
|
352
|
-
* Get
|
|
342
|
+
* 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, and, where the visitor\'s browser said why a block could not be shown, how many of those failures had each reason (`failedReasons`: a timeout, an error of the widget, a build that failed, or another reason). No visitor and no value a visitor typed is ever stored. The workspace is named by its UUID. Any active member can read.
|
|
343
|
+
* Get what Visitors Did in a Workflow
|
|
353
344
|
*/
|
|
354
|
-
async
|
|
345
|
+
async getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides) {
|
|
355
346
|
if (requestParameters['workspaceId'] == null) {
|
|
356
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
347
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowStats().');
|
|
357
348
|
}
|
|
358
349
|
if (requestParameters['workflowId'] == null) {
|
|
359
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling
|
|
360
|
-
}
|
|
361
|
-
if (requestParameters['versionId'] == null) {
|
|
362
|
-
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
350
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowStats().');
|
|
363
351
|
}
|
|
364
352
|
const queryParameters = {};
|
|
353
|
+
if (requestParameters['versionId'] != null) {
|
|
354
|
+
queryParameters['versionId'] = requestParameters['versionId'];
|
|
355
|
+
}
|
|
356
|
+
if (requestParameters['from'] != null) {
|
|
357
|
+
queryParameters['from'] = requestParameters['from'];
|
|
358
|
+
}
|
|
359
|
+
if (requestParameters['to'] != null) {
|
|
360
|
+
queryParameters['to'] = requestParameters['to'];
|
|
361
|
+
}
|
|
365
362
|
const headerParameters = {};
|
|
366
363
|
if (requestParameters['xManagedUserId'] != null) {
|
|
367
364
|
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
@@ -377,31 +374,34 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
377
374
|
}
|
|
378
375
|
}
|
|
379
376
|
const response = await this.request({
|
|
380
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}/
|
|
377
|
+
path: `/workspaces/{workspaceId}/workflows/{workflowId}/stats`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
381
378
|
method: 'GET',
|
|
382
379
|
headers: headerParameters,
|
|
383
380
|
query: queryParameters,
|
|
384
381
|
}, initOverrides);
|
|
385
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
382
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetWorkspaceWorkflowStats200ResponseFromJSON(jsonValue));
|
|
386
383
|
}
|
|
387
384
|
/**
|
|
388
|
-
*
|
|
389
|
-
* Get
|
|
385
|
+
* 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, and, where the visitor\'s browser said why a block could not be shown, how many of those failures had each reason (`failedReasons`: a timeout, an error of the widget, a build that failed, or another reason). No visitor and no value a visitor typed is ever stored. The workspace is named by its UUID. Any active member can read.
|
|
386
|
+
* Get what Visitors Did in a Workflow
|
|
390
387
|
*/
|
|
391
|
-
async
|
|
392
|
-
const response = await this.
|
|
388
|
+
async getWorkspaceWorkflowStats(requestParameters, initOverrides) {
|
|
389
|
+
const response = await this.getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides);
|
|
393
390
|
return await response.value();
|
|
394
391
|
}
|
|
395
392
|
/**
|
|
396
|
-
*
|
|
397
|
-
* Get a Workflow
|
|
393
|
+
* One published version with its graph, for the read-only preview and for the Runs view. The workspace is named by its UUID. Any active member can read.
|
|
394
|
+
* Get a Published Version of a Workflow
|
|
398
395
|
*/
|
|
399
|
-
async
|
|
396
|
+
async getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
|
|
400
397
|
if (requestParameters['workspaceId'] == null) {
|
|
401
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
398
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
402
399
|
}
|
|
403
400
|
if (requestParameters['workflowId'] == null) {
|
|
404
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling
|
|
401
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
402
|
+
}
|
|
403
|
+
if (requestParameters['versionId'] == null) {
|
|
404
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getWorkspaceWorkflowVersion().');
|
|
405
405
|
}
|
|
406
406
|
const queryParameters = {};
|
|
407
407
|
const headerParameters = {};
|
|
@@ -419,56 +419,23 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
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 partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
439
|
-
* List the workflows a partner offers as places to start
|
|
440
|
-
*/
|
|
441
|
-
async listPartnerWorkflowPresetsRaw(requestParameters, initOverrides) {
|
|
442
|
-
if (requestParameters['partnerId'] == null) {
|
|
443
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerWorkflowPresets().');
|
|
444
|
-
}
|
|
445
|
-
const queryParameters = {};
|
|
446
|
-
const headerParameters = {};
|
|
447
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
448
|
-
const token = this.configuration.accessToken;
|
|
449
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
450
|
-
if (tokenString) {
|
|
451
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
const response = await this.request({
|
|
455
|
-
path: `/partners/{partnerId}/workflow-presets`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
|
|
422
|
+
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']))),
|
|
456
423
|
method: 'GET',
|
|
457
424
|
headers: headerParameters,
|
|
458
425
|
query: queryParameters,
|
|
459
426
|
}, initOverrides);
|
|
460
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
427
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetWorkspaceWorkflowVersion200ResponseFromJSON(jsonValue));
|
|
461
428
|
}
|
|
462
429
|
/**
|
|
463
|
-
*
|
|
464
|
-
*
|
|
430
|
+
* One published version with its graph, for the read-only preview and for the Runs view. The workspace is named by its UUID. Any active member can read.
|
|
431
|
+
* Get a Published Version of a Workflow
|
|
465
432
|
*/
|
|
466
|
-
async
|
|
467
|
-
const response = await this.
|
|
433
|
+
async getWorkspaceWorkflowVersion(requestParameters, initOverrides) {
|
|
434
|
+
const response = await this.getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
|
|
468
435
|
return await response.value();
|
|
469
436
|
}
|
|
470
437
|
/**
|
|
471
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can read it.
|
|
472
439
|
* List the compositions a workflow can show, and what each can do
|
|
473
440
|
*/
|
|
474
441
|
async listWorkspaceWorkflowCompositionOptionsRaw(requestParameters, initOverrides) {
|
|
@@ -511,7 +478,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
511
478
|
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflowCompositionOptions200ResponseFromJSON(jsonValue));
|
|
512
479
|
}
|
|
513
480
|
/**
|
|
514
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can read it.
|
|
515
482
|
* List the compositions a workflow can show, and what each can do
|
|
516
483
|
*/
|
|
517
484
|
async listWorkspaceWorkflowCompositionOptions(requestParameters, initOverrides) {
|
|
@@ -519,7 +486,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
519
486
|
return await response.value();
|
|
520
487
|
}
|
|
521
488
|
/**
|
|
522
|
-
* 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`.
|
|
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`. The workspace is named by its UUID. Any active member can read the list.
|
|
523
490
|
* List the starting points for a new Workflow
|
|
524
491
|
*/
|
|
525
492
|
async listWorkspaceWorkflowPresetsRaw(requestParameters, initOverrides) {
|
|
@@ -550,7 +517,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
550
517
|
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflowPresets200ResponseFromJSON(jsonValue));
|
|
551
518
|
}
|
|
552
519
|
/**
|
|
553
|
-
* 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`.
|
|
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`. The workspace is named by its UUID. Any active member can read the list.
|
|
554
521
|
* List the starting points for a new Workflow
|
|
555
522
|
*/
|
|
556
523
|
async listWorkspaceWorkflowPresets(requestParameters, initOverrides) {
|
|
@@ -558,7 +525,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
558
525
|
return await response.value();
|
|
559
526
|
}
|
|
560
527
|
/**
|
|
561
|
-
* Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`.
|
|
528
|
+
* Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. The workspace is named by its UUID. Any active member can read.
|
|
562
529
|
* List the Published Versions of a Workflow
|
|
563
530
|
*/
|
|
564
531
|
async listWorkspaceWorkflowVersionsRaw(requestParameters, initOverrides) {
|
|
@@ -592,7 +559,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
592
559
|
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflowVersions200ResponseFromJSON(jsonValue));
|
|
593
560
|
}
|
|
594
561
|
/**
|
|
595
|
-
* Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`.
|
|
562
|
+
* Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. The workspace is named by its UUID. Any active member can read.
|
|
596
563
|
* List the Published Versions of a Workflow
|
|
597
564
|
*/
|
|
598
565
|
async listWorkspaceWorkflowVersions(requestParameters, initOverrides) {
|
|
@@ -600,7 +567,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
600
567
|
return await response.value();
|
|
601
568
|
}
|
|
602
569
|
/**
|
|
603
|
-
* Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`).
|
|
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`). The workspace is named by its UUID. Any active member can read the list.
|
|
604
571
|
* List the Workflows of a Workspace
|
|
605
572
|
*/
|
|
606
573
|
async listWorkspaceWorkflowsRaw(requestParameters, initOverrides) {
|
|
@@ -646,7 +613,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
646
613
|
return new runtime.JSONApiResponse(response, (jsonValue) => ListWorkspaceWorkflows200ResponseFromJSON(jsonValue));
|
|
647
614
|
}
|
|
648
615
|
/**
|
|
649
|
-
* Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`).
|
|
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`). The workspace is named by its UUID. Any active member can read the list.
|
|
650
617
|
* List the Workflows of a Workspace
|
|
651
618
|
*/
|
|
652
619
|
async listWorkspaceWorkflows(requestParameters, initOverrides) {
|
|
@@ -654,7 +621,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
654
621
|
return await response.value();
|
|
655
622
|
}
|
|
656
623
|
/**
|
|
657
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can pause.
|
|
658
625
|
* Pause a Workflow
|
|
659
626
|
*/
|
|
660
627
|
async pauseWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -685,10 +652,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
685
652
|
headers: headerParameters,
|
|
686
653
|
query: queryParameters,
|
|
687
654
|
}, initOverrides);
|
|
688
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
655
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowResponseFromJSON(jsonValue));
|
|
689
656
|
}
|
|
690
657
|
/**
|
|
691
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can pause.
|
|
692
659
|
* Pause a Workflow
|
|
693
660
|
*/
|
|
694
661
|
async pauseWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -696,7 +663,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
696
663
|
return await response.value();
|
|
697
664
|
}
|
|
698
665
|
/**
|
|
699
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can publish.
|
|
700
667
|
* Publish the Draft of a Workflow
|
|
701
668
|
*/
|
|
702
669
|
async publishWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -741,7 +708,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
741
708
|
return new runtime.JSONApiResponse(response, (jsonValue) => PublishWorkspaceWorkflow200ResponseFromJSON(jsonValue));
|
|
742
709
|
}
|
|
743
710
|
/**
|
|
744
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can publish.
|
|
745
712
|
* Publish the Draft of a Workflow
|
|
746
713
|
*/
|
|
747
714
|
async publishWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -749,43 +716,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
749
716
|
return await response.value();
|
|
750
717
|
}
|
|
751
718
|
/**
|
|
752
|
-
*
|
|
753
|
-
* Stop offering a workflow as a place to start
|
|
754
|
-
*/
|
|
755
|
-
async removePartnerWorkflowPresetRaw(requestParameters, initOverrides) {
|
|
756
|
-
if (requestParameters['partnerId'] == null) {
|
|
757
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling removePartnerWorkflowPreset().');
|
|
758
|
-
}
|
|
759
|
-
if (requestParameters['key'] == null) {
|
|
760
|
-
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling removePartnerWorkflowPreset().');
|
|
761
|
-
}
|
|
762
|
-
const queryParameters = {};
|
|
763
|
-
const headerParameters = {};
|
|
764
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
765
|
-
const token = this.configuration.accessToken;
|
|
766
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
767
|
-
if (tokenString) {
|
|
768
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
const response = await this.request({
|
|
772
|
-
path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
773
|
-
method: 'DELETE',
|
|
774
|
-
headers: headerParameters,
|
|
775
|
-
query: queryParameters,
|
|
776
|
-
}, initOverrides);
|
|
777
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RemovePartnerWorkflowPreset200ResponseFromJSON(jsonValue));
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
|
|
781
|
-
* Stop offering a workflow as a place to start
|
|
782
|
-
*/
|
|
783
|
-
async removePartnerWorkflowPreset(requestParameters, initOverrides) {
|
|
784
|
-
const response = await this.removePartnerWorkflowPresetRaw(requestParameters, initOverrides);
|
|
785
|
-
return await response.value();
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can restore.
|
|
789
720
|
* Restore a Version of a Workflow into the Draft
|
|
790
721
|
*/
|
|
791
722
|
async restoreWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
|
|
@@ -824,10 +755,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
824
755
|
query: queryParameters,
|
|
825
756
|
body: PublishWorkspaceWorkflowRequestToJSON(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
826
757
|
}, initOverrides);
|
|
827
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
758
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
828
759
|
}
|
|
829
760
|
/**
|
|
830
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can restore.
|
|
831
762
|
* Restore a Version of a Workflow into the Draft
|
|
832
763
|
*/
|
|
833
764
|
async restoreWorkspaceWorkflowVersion(requestParameters, initOverrides) {
|
|
@@ -835,7 +766,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
835
766
|
return await response.value();
|
|
836
767
|
}
|
|
837
768
|
/**
|
|
838
|
-
* Makes a paused workflow live again, on the version that was live when it was paused.
|
|
769
|
+
* Makes a paused workflow live again, on the version that was live when it was paused. The workspace is named by its UUID. Any active member can resume.
|
|
839
770
|
* Resume a Paused Workflow
|
|
840
771
|
*/
|
|
841
772
|
async resumeWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -866,10 +797,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
866
797
|
headers: headerParameters,
|
|
867
798
|
query: queryParameters,
|
|
868
799
|
}, initOverrides);
|
|
869
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
800
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowResponseFromJSON(jsonValue));
|
|
870
801
|
}
|
|
871
802
|
/**
|
|
872
|
-
* Makes a paused workflow live again, on the version that was live when it was paused.
|
|
803
|
+
* Makes a paused workflow live again, on the version that was live when it was paused. The workspace is named by its UUID. Any active member can resume.
|
|
873
804
|
* Resume a Paused Workflow
|
|
874
805
|
*/
|
|
875
806
|
async resumeWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -877,7 +808,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
877
808
|
return await response.value();
|
|
878
809
|
}
|
|
879
810
|
/**
|
|
880
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can save.
|
|
881
812
|
* Save the Draft of a Workflow
|
|
882
813
|
*/
|
|
883
814
|
async saveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -913,10 +844,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
913
844
|
query: queryParameters,
|
|
914
845
|
body: SaveWorkspaceWorkflowRequestToJSON(requestParameters['saveWorkspaceWorkflowRequest']),
|
|
915
846
|
}, initOverrides);
|
|
916
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
847
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowResponseFromJSON(jsonValue));
|
|
917
848
|
}
|
|
918
849
|
/**
|
|
919
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can save.
|
|
920
851
|
* Save the Draft of a Workflow
|
|
921
852
|
*/
|
|
922
853
|
async saveWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -924,48 +855,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
924
855
|
return await response.value();
|
|
925
856
|
}
|
|
926
857
|
/**
|
|
927
|
-
*
|
|
928
|
-
* Offer a workflow as a place to start, or replace what a key offers
|
|
929
|
-
*/
|
|
930
|
-
async setPartnerWorkflowPresetRaw(requestParameters, initOverrides) {
|
|
931
|
-
if (requestParameters['partnerId'] == null) {
|
|
932
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
933
|
-
}
|
|
934
|
-
if (requestParameters['key'] == null) {
|
|
935
|
-
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
936
|
-
}
|
|
937
|
-
if (requestParameters['offerWorkflowPresetRequest'] == null) {
|
|
938
|
-
throw new runtime.RequiredError('offerWorkflowPresetRequest', 'Required parameter "offerWorkflowPresetRequest" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
939
|
-
}
|
|
940
|
-
const queryParameters = {};
|
|
941
|
-
const headerParameters = {};
|
|
942
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
943
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
944
|
-
const token = this.configuration.accessToken;
|
|
945
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
946
|
-
if (tokenString) {
|
|
947
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
const response = await this.request({
|
|
951
|
-
path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
952
|
-
method: 'PUT',
|
|
953
|
-
headers: headerParameters,
|
|
954
|
-
query: queryParameters,
|
|
955
|
-
body: OfferWorkflowPresetRequestToJSON(requestParameters['offerWorkflowPresetRequest']),
|
|
956
|
-
}, initOverrides);
|
|
957
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SetPartnerWorkflowPreset200ResponseFromJSON(jsonValue));
|
|
958
|
-
}
|
|
959
|
-
/**
|
|
960
|
-
* Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
|
|
961
|
-
* Offer a workflow as a place to start, or replace what a key offers
|
|
962
|
-
*/
|
|
963
|
-
async setPartnerWorkflowPreset(requestParameters, initOverrides) {
|
|
964
|
-
const response = await this.setPartnerWorkflowPresetRaw(requestParameters, initOverrides);
|
|
965
|
-
return await response.value();
|
|
966
|
-
}
|
|
967
|
-
/**
|
|
968
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can unarchive.
|
|
969
859
|
* Unarchive a Workflow
|
|
970
860
|
*/
|
|
971
861
|
async unarchiveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
@@ -996,10 +886,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
996
886
|
headers: headerParameters,
|
|
997
887
|
query: queryParameters,
|
|
998
888
|
}, initOverrides);
|
|
999
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
889
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowResponseFromJSON(jsonValue));
|
|
1000
890
|
}
|
|
1001
891
|
/**
|
|
1002
|
-
* 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.
|
|
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. The workspace is named by its UUID. Any active member can unarchive.
|
|
1003
893
|
* Unarchive a Workflow
|
|
1004
894
|
*/
|
|
1005
895
|
async unarchiveWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
@@ -1010,7 +900,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
1010
900
|
/**
|
|
1011
901
|
* @export
|
|
1012
902
|
*/
|
|
1013
|
-
export const
|
|
903
|
+
export const ListWorkspaceWorkflowsStatusEnum = {
|
|
1014
904
|
Draft: 'draft',
|
|
1015
905
|
Live: 'live',
|
|
1016
906
|
Paused: 'paused',
|