@widgetic/api-sdk-ts 1.11.109 → 2.0.0
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 +255 -155
- package/dist/apis/CompositionsApi.js +333 -133
- package/dist/apis/CreditsApi.d.ts +7 -7
- package/dist/apis/CreditsApi.js +1 -1
- 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/PartnersApi.d.ts +125 -125
- package/dist/apis/PartnersApi.js +11 -11
- package/dist/apis/PublicEmbedApi.d.ts +42 -42
- package/dist/apis/PublicEmbedApi.js +29 -29
- package/dist/apis/UploadsApi.d.ts +38 -38
- package/dist/apis/UploadsApi.js +60 -60
- package/dist/apis/UsersApi.d.ts +40 -40
- package/dist/apis/UsersApi.js +4 -4
- package/dist/apis/WidgetsApi.d.ts +23 -23
- package/dist/apis/WidgetsApi.js +36 -36
- package/dist/apis/WorkflowsApi.d.ts +85 -127
- package/dist/apis/WorkflowsApi.js +82 -192
- package/dist/apis/index.d.ts +1 -2
- package/dist/apis/index.js +1 -2
- package/dist/esm/apis/BrandKitApi.js +344 -0
- package/dist/esm/apis/CompositionsApi.js +333 -133
- package/dist/esm/apis/CreditsApi.js +2 -2
- 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/PartnersApi.js +12 -12
- package/dist/esm/apis/PublicEmbedApi.js +30 -30
- package/dist/esm/apis/UploadsApi.js +60 -60
- package/dist/esm/apis/UsersApi.js +5 -5
- package/dist/esm/apis/WidgetsApi.js +37 -37
- package/dist/esm/apis/WorkflowsApi.js +82 -192
- 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/{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 +56 -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/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
- package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
- 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/GetOperationResponse.js +51 -0
- package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +9 -9
- 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/PatchBrandKitAssetRequest.js +68 -0
- package/dist/esm/models/PatchBrandKitRequest.js +54 -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/{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 +36 -19
- package/dist/esm/runtime.js +1 -1
- 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/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 +53 -0
- package/dist/models/BrandKitTokens.js +63 -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/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/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/GetOperationResponse.d.ts +46 -0
- package/dist/models/GetOperationResponse.js +58 -0
- package/dist/models/{OperationsIdGetResponseData.d.ts → GetOperationResponseData.d.ts} +19 -19
- package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +15 -15
- 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/PatchBrandKitAssetRequest.d.ts +73 -0
- package/dist/models/PatchBrandKitAssetRequest.js +76 -0
- package/dist/models/PatchBrandKitRequest.d.ts +65 -0
- package/dist/models/PatchBrandKitRequest.js +61 -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/Upload.d.ts +1 -1
- package/dist/models/UploadLimits.d.ts +3 -3
- 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 +36 -19
- package/dist/models/index.js +36 -19
- 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/CreateCompositionFromWidget201Response.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/GetManagedUserLimits200Response.d.ts +0 -46
- package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
- package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
- 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/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,7 +12,7 @@
|
|
|
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
|
*/
|
|
@@ -49,7 +49,7 @@ 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
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.
|
|
@@ -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. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. 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. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. 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. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. 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,20 +143,20 @@ 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. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. 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
|
/**
|
|
@@ -238,7 +238,7 @@ 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
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.
|
|
@@ -286,7 +286,7 @@ 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
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.
|
|
@@ -297,7 +297,49 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
297
297
|
return await response.value();
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
300
|
+
* 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.
|
|
301
|
+
* Get a Workflow
|
|
302
|
+
*/
|
|
303
|
+
async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
304
|
+
if (requestParameters['workspaceId'] == null) {
|
|
305
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
306
|
+
}
|
|
307
|
+
if (requestParameters['workflowId'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
309
|
+
}
|
|
310
|
+
const queryParameters = {};
|
|
311
|
+
const headerParameters = {};
|
|
312
|
+
if (requestParameters['xManagedUserId'] != null) {
|
|
313
|
+
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
314
|
+
}
|
|
315
|
+
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
316
|
+
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
317
|
+
}
|
|
318
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
319
|
+
const token = this.configuration.accessToken;
|
|
320
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
321
|
+
if (tokenString) {
|
|
322
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
const response = await this.request({
|
|
326
|
+
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
327
|
+
method: 'GET',
|
|
328
|
+
headers: headerParameters,
|
|
329
|
+
query: queryParameters,
|
|
330
|
+
}, initOverrides);
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* 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.
|
|
335
|
+
* Get a Workflow
|
|
336
|
+
*/
|
|
337
|
+
async getWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
338
|
+
const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
339
|
+
return await response.value();
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
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. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
301
343
|
* Get what Visitors Did in a Workflow
|
|
302
344
|
*/
|
|
303
345
|
async getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides) {
|
|
@@ -340,7 +382,7 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
340
382
|
return new runtime.JSONApiResponse(response, (jsonValue) => GetWorkspaceWorkflowStats200ResponseFromJSON(jsonValue));
|
|
341
383
|
}
|
|
342
384
|
/**
|
|
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.
|
|
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. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
|
|
344
386
|
* Get what Visitors Did in a Workflow
|
|
345
387
|
*/
|
|
346
388
|
async getWorkspaceWorkflowStats(requestParameters, initOverrides) {
|
|
@@ -392,81 +434,6 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
392
434
|
const response = await this.getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
|
|
393
435
|
return await response.value();
|
|
394
436
|
}
|
|
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 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']))),
|
|
456
|
-
method: 'GET',
|
|
457
|
-
headers: headerParameters,
|
|
458
|
-
query: queryParameters,
|
|
459
|
-
}, initOverrides);
|
|
460
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListPartnerWorkflowPresets200ResponseFromJSON(jsonValue));
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* 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.
|
|
464
|
-
* List the workflows a partner offers as places to start
|
|
465
|
-
*/
|
|
466
|
-
async listPartnerWorkflowPresets(requestParameters, initOverrides) {
|
|
467
|
-
const response = await this.listPartnerWorkflowPresetsRaw(requestParameters, initOverrides);
|
|
468
|
-
return await response.value();
|
|
469
|
-
}
|
|
470
437
|
/**
|
|
471
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.
|
|
472
439
|
* List the compositions a workflow can show, and what each can do
|
|
@@ -685,7 +652,7 @@ 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
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.
|
|
@@ -748,42 +715,6 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
748
715
|
const response = await this.publishWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
749
716
|
return await response.value();
|
|
750
717
|
}
|
|
751
|
-
/**
|
|
752
|
-
* 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`.
|
|
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
718
|
/**
|
|
788
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.
|
|
789
720
|
* Restore a Version of a Workflow into the Draft
|
|
@@ -824,7 +755,7 @@ 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
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.
|
|
@@ -866,7 +797,7 @@ 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
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.
|
|
@@ -913,7 +844,7 @@ 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
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.
|
|
@@ -923,47 +854,6 @@ export class WorkflowsApi extends runtime.BaseAPI {
|
|
|
923
854
|
const response = await this.saveWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
924
855
|
return await response.value();
|
|
925
856
|
}
|
|
926
|
-
/**
|
|
927
|
-
* 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.
|
|
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
857
|
/**
|
|
968
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.
|
|
969
859
|
* Unarchive a Workflow
|
|
@@ -996,7 +886,7 @@ 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
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.
|
|
@@ -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',
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './BrandKitApi.js';
|
|
3
4
|
export * from './CanvasesApi.js';
|
|
4
5
|
export * from './CompositionsApi.js';
|
|
5
6
|
export * from './CreditsApi.js';
|
|
@@ -7,7 +8,6 @@ export * from './EntitlementsApi.js';
|
|
|
7
8
|
export * from './InvoicesApi.js';
|
|
8
9
|
export * from './ManagedUsersApi.js';
|
|
9
10
|
export * from './OperationsApi.js';
|
|
10
|
-
export * from './PartnerApi.js';
|
|
11
11
|
export * from './PartnersApi.js';
|
|
12
12
|
export * from './PublicEmbedApi.js';
|
|
13
13
|
export * from './TokensApi.js';
|
|
@@ -15,4 +15,3 @@ export * from './UploadsApi.js';
|
|
|
15
15
|
export * from './UsersApi.js';
|
|
16
16
|
export * from './WidgetsApi.js';
|
|
17
17
|
export * from './WorkflowsApi.js';
|
|
18
|
-
export * from './WorkspacesApi.js';
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
import { AccountCreditTransactionFromJSON, AccountCreditTransactionToJSON, } from './AccountCreditTransaction.js';
|
|
15
15
|
import { ResponseMetaFromJSON, ResponseMetaToJSON, } from './ResponseMeta.js';
|
|
16
16
|
/**
|
|
17
|
-
* Check if a given object implements the
|
|
17
|
+
* Check if a given object implements the AccountCreditTransactionListResponse interface.
|
|
18
18
|
*/
|
|
19
|
-
export function
|
|
19
|
+
export function instanceOfAccountCreditTransactionListResponse(value) {
|
|
20
20
|
if (!('success' in value) || value['success'] === undefined)
|
|
21
21
|
return false;
|
|
22
22
|
if (!('data' in value) || value['data'] === undefined)
|
|
23
23
|
return false;
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
|
-
export function
|
|
27
|
-
return
|
|
26
|
+
export function AccountCreditTransactionListResponseFromJSON(json) {
|
|
27
|
+
return AccountCreditTransactionListResponseFromJSONTyped(json, false);
|
|
28
28
|
}
|
|
29
|
-
export function
|
|
29
|
+
export function AccountCreditTransactionListResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
30
|
if (json == null) {
|
|
31
31
|
return json;
|
|
32
32
|
}
|
|
@@ -36,10 +36,10 @@ export function GetPartnerCreditTransactions200ResponseFromJSONTyped(json, ignor
|
|
|
36
36
|
'meta': json['meta'] == null ? undefined : ResponseMetaFromJSON(json['meta']),
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
export function
|
|
40
|
-
return
|
|
39
|
+
export function AccountCreditTransactionListResponseToJSON(json) {
|
|
40
|
+
return AccountCreditTransactionListResponseToJSONTyped(json, false);
|
|
41
41
|
}
|
|
42
|
-
export function
|
|
42
|
+
export function AccountCreditTransactionListResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
43
|
if (value == null) {
|
|
44
44
|
return value;
|
|
45
45
|
}
|
package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js}
RENAMED
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
import { ResponseMetaFromJSON, ResponseMetaToJSON, } from './ResponseMeta.js';
|
|
15
15
|
import { AdapterConnectionFromJSON, AdapterConnectionToJSON, } from './AdapterConnection.js';
|
|
16
16
|
/**
|
|
17
|
-
* Check if a given object implements the
|
|
17
|
+
* Check if a given object implements the AdapterConnectionListResponse interface.
|
|
18
18
|
*/
|
|
19
|
-
export function
|
|
19
|
+
export function instanceOfAdapterConnectionListResponse(value) {
|
|
20
20
|
if (!('success' in value) || value['success'] === undefined)
|
|
21
21
|
return false;
|
|
22
22
|
if (!('data' in value) || value['data'] === undefined)
|
|
23
23
|
return false;
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
|
-
export function
|
|
27
|
-
return
|
|
26
|
+
export function AdapterConnectionListResponseFromJSON(json) {
|
|
27
|
+
return AdapterConnectionListResponseFromJSONTyped(json, false);
|
|
28
28
|
}
|
|
29
|
-
export function
|
|
29
|
+
export function AdapterConnectionListResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
30
|
if (json == null) {
|
|
31
31
|
return json;
|
|
32
32
|
}
|
|
@@ -36,10 +36,10 @@ export function GetUserAdapterConnections200ResponseFromJSONTyped(json, ignoreDi
|
|
|
36
36
|
'meta': json['meta'] == null ? undefined : ResponseMetaFromJSON(json['meta']),
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
export function
|
|
40
|
-
return
|
|
39
|
+
export function AdapterConnectionListResponseToJSON(json) {
|
|
40
|
+
return AdapterConnectionListResponseToJSONTyped(json, false);
|
|
41
41
|
}
|
|
42
|
-
export function
|
|
42
|
+
export function AdapterConnectionListResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
43
|
if (value == null) {
|
|
44
44
|
return value;
|
|
45
45
|
}
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
import { ResponseMetaFromJSON, ResponseMetaToJSON, } from './ResponseMeta.js';
|
|
15
15
|
import { AdapterConnectionRemovalFromJSON, AdapterConnectionRemovalToJSON, } from './AdapterConnectionRemoval.js';
|
|
16
16
|
/**
|
|
17
|
-
* Check if a given object implements the
|
|
17
|
+
* Check if a given object implements the AdapterConnectionRemovalResponse interface.
|
|
18
18
|
*/
|
|
19
|
-
export function
|
|
19
|
+
export function instanceOfAdapterConnectionRemovalResponse(value) {
|
|
20
20
|
if (!('success' in value) || value['success'] === undefined)
|
|
21
21
|
return false;
|
|
22
22
|
if (!('data' in value) || value['data'] === undefined)
|
|
23
23
|
return false;
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
|
-
export function
|
|
27
|
-
return
|
|
26
|
+
export function AdapterConnectionRemovalResponseFromJSON(json) {
|
|
27
|
+
return AdapterConnectionRemovalResponseFromJSONTyped(json, false);
|
|
28
28
|
}
|
|
29
|
-
export function
|
|
29
|
+
export function AdapterConnectionRemovalResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
30
|
if (json == null) {
|
|
31
31
|
return json;
|
|
32
32
|
}
|
|
@@ -36,10 +36,10 @@ export function RemoveUserAdapterConnection200ResponseFromJSONTyped(json, ignore
|
|
|
36
36
|
'meta': json['meta'] == null ? undefined : ResponseMetaFromJSON(json['meta']),
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
export function
|
|
40
|
-
return
|
|
39
|
+
export function AdapterConnectionRemovalResponseToJSON(json) {
|
|
40
|
+
return AdapterConnectionRemovalResponseToJSONTyped(json, false);
|
|
41
41
|
}
|
|
42
|
-
export function
|
|
42
|
+
export function AdapterConnectionRemovalResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
43
|
if (value == null) {
|
|
44
44
|
return value;
|
|
45
45
|
}
|