@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
|
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
};
|
|
47
47
|
})();
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.
|
|
49
|
+
exports.ListWorkspaceWorkflowsStatusEnum = exports.WorkflowsApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
51
|
const index_1 = require("../models/index");
|
|
52
52
|
/**
|
|
@@ -85,7 +85,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
85
85
|
headers: headerParameters,
|
|
86
86
|
query: queryParameters,
|
|
87
87
|
}, initOverrides);
|
|
88
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
88
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* 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.
|
|
@@ -96,18 +96,18 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
96
96
|
return await response.value();
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
* Makes
|
|
100
|
-
*
|
|
99
|
+
* 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.
|
|
100
|
+
* Create a Workflow
|
|
101
101
|
*/
|
|
102
|
-
async
|
|
102
|
+
async createWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
103
103
|
if (requestParameters['workspaceId'] == null) {
|
|
104
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
104
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflow().');
|
|
105
105
|
}
|
|
106
106
|
if (requestParameters['idempotencyKey'] == null) {
|
|
107
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
107
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflow().');
|
|
108
108
|
}
|
|
109
|
-
if (requestParameters['
|
|
110
|
-
throw new runtime.RequiredError('
|
|
109
|
+
if (requestParameters['createWorkspaceWorkflowRequest'] == null) {
|
|
110
|
+
throw new runtime.RequiredError('createWorkspaceWorkflowRequest', 'Required parameter "createWorkspaceWorkflowRequest" was null or undefined when calling createWorkspaceWorkflow().');
|
|
111
111
|
}
|
|
112
112
|
const queryParameters = {};
|
|
113
113
|
const headerParameters = {};
|
|
@@ -129,35 +129,35 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
const response = await this.request({
|
|
132
|
-
path: `/workspaces/{workspaceId}/workflows
|
|
132
|
+
path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
133
133
|
method: 'POST',
|
|
134
134
|
headers: headerParameters,
|
|
135
135
|
query: queryParameters,
|
|
136
|
-
body: (0, index_1.
|
|
136
|
+
body: (0, index_1.CreateWorkspaceWorkflowRequestToJSON)(requestParameters['createWorkspaceWorkflowRequest']),
|
|
137
137
|
}, initOverrides);
|
|
138
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
138
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
|
-
* Makes
|
|
142
|
-
*
|
|
141
|
+
* 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.
|
|
142
|
+
* Create a Workflow
|
|
143
143
|
*/
|
|
144
|
-
async
|
|
145
|
-
const response = await this.
|
|
144
|
+
async createWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
145
|
+
const response = await this.createWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
146
146
|
return await response.value();
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
-
* Makes a
|
|
150
|
-
*
|
|
149
|
+
* 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.
|
|
150
|
+
* Start a Workflow from a starting point
|
|
151
151
|
*/
|
|
152
|
-
async
|
|
152
|
+
async createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides) {
|
|
153
153
|
if (requestParameters['workspaceId'] == null) {
|
|
154
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling
|
|
154
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
155
155
|
}
|
|
156
156
|
if (requestParameters['idempotencyKey'] == null) {
|
|
157
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
157
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
158
158
|
}
|
|
159
|
-
if (requestParameters['
|
|
160
|
-
throw new runtime.RequiredError('
|
|
159
|
+
if (requestParameters['createWorkspaceWorkflowFromPresetRequest'] == null) {
|
|
160
|
+
throw new runtime.RequiredError('createWorkspaceWorkflowFromPresetRequest', 'Required parameter "createWorkspaceWorkflowFromPresetRequest" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
|
|
161
161
|
}
|
|
162
162
|
const queryParameters = {};
|
|
163
163
|
const headerParameters = {};
|
|
@@ -179,20 +179,20 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
const response = await this.request({
|
|
182
|
-
path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
182
|
+
path: `/workspaces/{workspaceId}/workflows/from-preset`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
|
|
183
183
|
method: 'POST',
|
|
184
184
|
headers: headerParameters,
|
|
185
185
|
query: queryParameters,
|
|
186
|
-
body: (0, index_1.
|
|
186
|
+
body: (0, index_1.CreateWorkspaceWorkflowFromPresetRequestToJSON)(requestParameters['createWorkspaceWorkflowFromPresetRequest']),
|
|
187
187
|
}, initOverrides);
|
|
188
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
188
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
|
-
* Makes a
|
|
192
|
-
*
|
|
191
|
+
* 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.
|
|
192
|
+
* Start a Workflow from a starting point
|
|
193
193
|
*/
|
|
194
|
-
async
|
|
195
|
-
const response = await this.
|
|
194
|
+
async createWorkspaceWorkflowFromPreset(requestParameters, initOverrides) {
|
|
195
|
+
const response = await this.createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides);
|
|
196
196
|
return await response.value();
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
@@ -274,7 +274,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
274
274
|
query: queryParameters,
|
|
275
275
|
body: (0, index_1.PublishWorkspaceWorkflowRequestToJSON)(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
276
276
|
}, initOverrides);
|
|
277
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
277
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* 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.
|
|
@@ -322,7 +322,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
322
322
|
headers: headerParameters,
|
|
323
323
|
query: queryParameters,
|
|
324
324
|
}, initOverrides);
|
|
325
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
325
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
326
326
|
}
|
|
327
327
|
/**
|
|
328
328
|
* 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.
|
|
@@ -333,7 +333,49 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
333
333
|
return await response.value();
|
|
334
334
|
}
|
|
335
335
|
/**
|
|
336
|
-
*
|
|
336
|
+
* 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.
|
|
337
|
+
* Get a Workflow
|
|
338
|
+
*/
|
|
339
|
+
async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
340
|
+
if (requestParameters['workspaceId'] == null) {
|
|
341
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
342
|
+
}
|
|
343
|
+
if (requestParameters['workflowId'] == null) {
|
|
344
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
345
|
+
}
|
|
346
|
+
const queryParameters = {};
|
|
347
|
+
const headerParameters = {};
|
|
348
|
+
if (requestParameters['xManagedUserId'] != null) {
|
|
349
|
+
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
350
|
+
}
|
|
351
|
+
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
352
|
+
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
353
|
+
}
|
|
354
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
355
|
+
const token = this.configuration.accessToken;
|
|
356
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
357
|
+
if (tokenString) {
|
|
358
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
363
|
+
method: 'GET',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
}, initOverrides);
|
|
367
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* 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.
|
|
371
|
+
* Get a Workflow
|
|
372
|
+
*/
|
|
373
|
+
async getWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
374
|
+
const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
375
|
+
return await response.value();
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* 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.
|
|
337
379
|
* Get what Visitors Did in a Workflow
|
|
338
380
|
*/
|
|
339
381
|
async getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides) {
|
|
@@ -376,7 +418,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
376
418
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWorkspaceWorkflowStats200ResponseFromJSON)(jsonValue));
|
|
377
419
|
}
|
|
378
420
|
/**
|
|
379
|
-
* 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.
|
|
421
|
+
* 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.
|
|
380
422
|
* Get what Visitors Did in a Workflow
|
|
381
423
|
*/
|
|
382
424
|
async getWorkspaceWorkflowStats(requestParameters, initOverrides) {
|
|
@@ -428,81 +470,6 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
428
470
|
const response = await this.getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
|
|
429
471
|
return await response.value();
|
|
430
472
|
}
|
|
431
|
-
/**
|
|
432
|
-
* 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.
|
|
433
|
-
* Get a Workflow
|
|
434
|
-
*/
|
|
435
|
-
async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
|
|
436
|
-
if (requestParameters['workspaceId'] == null) {
|
|
437
|
-
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
438
|
-
}
|
|
439
|
-
if (requestParameters['workflowId'] == null) {
|
|
440
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
|
|
441
|
-
}
|
|
442
|
-
const queryParameters = {};
|
|
443
|
-
const headerParameters = {};
|
|
444
|
-
if (requestParameters['xManagedUserId'] != null) {
|
|
445
|
-
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
446
|
-
}
|
|
447
|
-
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
448
|
-
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
449
|
-
}
|
|
450
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
451
|
-
const token = this.configuration.accessToken;
|
|
452
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
453
|
-
if (tokenString) {
|
|
454
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
const response = await this.request({
|
|
458
|
-
path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
|
|
459
|
-
method: 'GET',
|
|
460
|
-
headers: headerParameters,
|
|
461
|
-
query: queryParameters,
|
|
462
|
-
}, initOverrides);
|
|
463
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* 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.
|
|
467
|
-
* Get a Workflow
|
|
468
|
-
*/
|
|
469
|
-
async getWorkspaceWorkflow(requestParameters, initOverrides) {
|
|
470
|
-
const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
471
|
-
return await response.value();
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* 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.
|
|
475
|
-
* List the workflows a partner offers as places to start
|
|
476
|
-
*/
|
|
477
|
-
async listPartnerWorkflowPresetsRaw(requestParameters, initOverrides) {
|
|
478
|
-
if (requestParameters['partnerId'] == null) {
|
|
479
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerWorkflowPresets().');
|
|
480
|
-
}
|
|
481
|
-
const queryParameters = {};
|
|
482
|
-
const headerParameters = {};
|
|
483
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
484
|
-
const token = this.configuration.accessToken;
|
|
485
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
486
|
-
if (tokenString) {
|
|
487
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
const response = await this.request({
|
|
491
|
-
path: `/partners/{partnerId}/workflow-presets`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
|
|
492
|
-
method: 'GET',
|
|
493
|
-
headers: headerParameters,
|
|
494
|
-
query: queryParameters,
|
|
495
|
-
}, initOverrides);
|
|
496
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListPartnerWorkflowPresets200ResponseFromJSON)(jsonValue));
|
|
497
|
-
}
|
|
498
|
-
/**
|
|
499
|
-
* 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.
|
|
500
|
-
* List the workflows a partner offers as places to start
|
|
501
|
-
*/
|
|
502
|
-
async listPartnerWorkflowPresets(requestParameters, initOverrides) {
|
|
503
|
-
const response = await this.listPartnerWorkflowPresetsRaw(requestParameters, initOverrides);
|
|
504
|
-
return await response.value();
|
|
505
|
-
}
|
|
506
473
|
/**
|
|
507
474
|
* 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.
|
|
508
475
|
* List the compositions a workflow can show, and what each can do
|
|
@@ -721,7 +688,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
721
688
|
headers: headerParameters,
|
|
722
689
|
query: queryParameters,
|
|
723
690
|
}, initOverrides);
|
|
724
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
691
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
|
|
725
692
|
}
|
|
726
693
|
/**
|
|
727
694
|
* 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.
|
|
@@ -784,42 +751,6 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
784
751
|
const response = await this.publishWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
785
752
|
return await response.value();
|
|
786
753
|
}
|
|
787
|
-
/**
|
|
788
|
-
* 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`.
|
|
789
|
-
* Stop offering a workflow as a place to start
|
|
790
|
-
*/
|
|
791
|
-
async removePartnerWorkflowPresetRaw(requestParameters, initOverrides) {
|
|
792
|
-
if (requestParameters['partnerId'] == null) {
|
|
793
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling removePartnerWorkflowPreset().');
|
|
794
|
-
}
|
|
795
|
-
if (requestParameters['key'] == null) {
|
|
796
|
-
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling removePartnerWorkflowPreset().');
|
|
797
|
-
}
|
|
798
|
-
const queryParameters = {};
|
|
799
|
-
const headerParameters = {};
|
|
800
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
801
|
-
const token = this.configuration.accessToken;
|
|
802
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
803
|
-
if (tokenString) {
|
|
804
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
const response = await this.request({
|
|
808
|
-
path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
809
|
-
method: 'DELETE',
|
|
810
|
-
headers: headerParameters,
|
|
811
|
-
query: queryParameters,
|
|
812
|
-
}, initOverrides);
|
|
813
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RemovePartnerWorkflowPreset200ResponseFromJSON)(jsonValue));
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* 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`.
|
|
817
|
-
* Stop offering a workflow as a place to start
|
|
818
|
-
*/
|
|
819
|
-
async removePartnerWorkflowPreset(requestParameters, initOverrides) {
|
|
820
|
-
const response = await this.removePartnerWorkflowPresetRaw(requestParameters, initOverrides);
|
|
821
|
-
return await response.value();
|
|
822
|
-
}
|
|
823
754
|
/**
|
|
824
755
|
* 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.
|
|
825
756
|
* Restore a Version of a Workflow into the Draft
|
|
@@ -860,7 +791,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
860
791
|
query: queryParameters,
|
|
861
792
|
body: (0, index_1.PublishWorkspaceWorkflowRequestToJSON)(requestParameters['publishWorkspaceWorkflowRequest']),
|
|
862
793
|
}, initOverrides);
|
|
863
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
794
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
864
795
|
}
|
|
865
796
|
/**
|
|
866
797
|
* 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.
|
|
@@ -902,7 +833,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
902
833
|
headers: headerParameters,
|
|
903
834
|
query: queryParameters,
|
|
904
835
|
}, initOverrides);
|
|
905
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
836
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
|
|
906
837
|
}
|
|
907
838
|
/**
|
|
908
839
|
* 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.
|
|
@@ -949,7 +880,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
949
880
|
query: queryParameters,
|
|
950
881
|
body: (0, index_1.SaveWorkspaceWorkflowRequestToJSON)(requestParameters['saveWorkspaceWorkflowRequest']),
|
|
951
882
|
}, initOverrides);
|
|
952
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
883
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
|
|
953
884
|
}
|
|
954
885
|
/**
|
|
955
886
|
* 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.
|
|
@@ -959,47 +890,6 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
959
890
|
const response = await this.saveWorkspaceWorkflowRaw(requestParameters, initOverrides);
|
|
960
891
|
return await response.value();
|
|
961
892
|
}
|
|
962
|
-
/**
|
|
963
|
-
* 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.
|
|
964
|
-
* Offer a workflow as a place to start, or replace what a key offers
|
|
965
|
-
*/
|
|
966
|
-
async setPartnerWorkflowPresetRaw(requestParameters, initOverrides) {
|
|
967
|
-
if (requestParameters['partnerId'] == null) {
|
|
968
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
969
|
-
}
|
|
970
|
-
if (requestParameters['key'] == null) {
|
|
971
|
-
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
972
|
-
}
|
|
973
|
-
if (requestParameters['offerWorkflowPresetRequest'] == null) {
|
|
974
|
-
throw new runtime.RequiredError('offerWorkflowPresetRequest', 'Required parameter "offerWorkflowPresetRequest" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
975
|
-
}
|
|
976
|
-
const queryParameters = {};
|
|
977
|
-
const headerParameters = {};
|
|
978
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
979
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
980
|
-
const token = this.configuration.accessToken;
|
|
981
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
982
|
-
if (tokenString) {
|
|
983
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
const response = await this.request({
|
|
987
|
-
path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
988
|
-
method: 'PUT',
|
|
989
|
-
headers: headerParameters,
|
|
990
|
-
query: queryParameters,
|
|
991
|
-
body: (0, index_1.OfferWorkflowPresetRequestToJSON)(requestParameters['offerWorkflowPresetRequest']),
|
|
992
|
-
}, initOverrides);
|
|
993
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SetPartnerWorkflowPreset200ResponseFromJSON)(jsonValue));
|
|
994
|
-
}
|
|
995
|
-
/**
|
|
996
|
-
* 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.
|
|
997
|
-
* Offer a workflow as a place to start, or replace what a key offers
|
|
998
|
-
*/
|
|
999
|
-
async setPartnerWorkflowPreset(requestParameters, initOverrides) {
|
|
1000
|
-
const response = await this.setPartnerWorkflowPresetRaw(requestParameters, initOverrides);
|
|
1001
|
-
return await response.value();
|
|
1002
|
-
}
|
|
1003
893
|
/**
|
|
1004
894
|
* 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.
|
|
1005
895
|
* Unarchive a Workflow
|
|
@@ -1032,7 +922,7 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
1032
922
|
headers: headerParameters,
|
|
1033
923
|
query: queryParameters,
|
|
1034
924
|
}, initOverrides);
|
|
1035
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
925
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
|
|
1036
926
|
}
|
|
1037
927
|
/**
|
|
1038
928
|
* 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.
|
|
@@ -1047,7 +937,7 @@ exports.WorkflowsApi = WorkflowsApi;
|
|
|
1047
937
|
/**
|
|
1048
938
|
* @export
|
|
1049
939
|
*/
|
|
1050
|
-
exports.
|
|
940
|
+
exports.ListWorkspaceWorkflowsStatusEnum = {
|
|
1051
941
|
Draft: 'draft',
|
|
1052
942
|
Live: 'live',
|
|
1053
943
|
Paused: 'paused',
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './BrandKitApi';
|
|
1
2
|
export * from './CanvasesApi';
|
|
2
3
|
export * from './CompositionsApi';
|
|
3
4
|
export * from './CreditsApi';
|
|
@@ -5,7 +6,6 @@ export * from './EntitlementsApi';
|
|
|
5
6
|
export * from './InvoicesApi';
|
|
6
7
|
export * from './ManagedUsersApi';
|
|
7
8
|
export * from './OperationsApi';
|
|
8
|
-
export * from './PartnerApi';
|
|
9
9
|
export * from './PartnersApi';
|
|
10
10
|
export * from './PublicEmbedApi';
|
|
11
11
|
export * from './TokensApi';
|
|
@@ -13,4 +13,3 @@ export * from './UploadsApi';
|
|
|
13
13
|
export * from './UsersApi';
|
|
14
14
|
export * from './WidgetsApi';
|
|
15
15
|
export * from './WorkflowsApi';
|
|
16
|
-
export * from './WorkspacesApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./BrandKitApi"), exports);
|
|
19
20
|
__exportStar(require("./CanvasesApi"), exports);
|
|
20
21
|
__exportStar(require("./CompositionsApi"), exports);
|
|
21
22
|
__exportStar(require("./CreditsApi"), exports);
|
|
@@ -23,7 +24,6 @@ __exportStar(require("./EntitlementsApi"), exports);
|
|
|
23
24
|
__exportStar(require("./InvoicesApi"), exports);
|
|
24
25
|
__exportStar(require("./ManagedUsersApi"), exports);
|
|
25
26
|
__exportStar(require("./OperationsApi"), exports);
|
|
26
|
-
__exportStar(require("./PartnerApi"), exports);
|
|
27
27
|
__exportStar(require("./PartnersApi"), exports);
|
|
28
28
|
__exportStar(require("./PublicEmbedApi"), exports);
|
|
29
29
|
__exportStar(require("./TokensApi"), exports);
|
|
@@ -31,4 +31,3 @@ __exportStar(require("./UploadsApi"), exports);
|
|
|
31
31
|
__exportStar(require("./UsersApi"), exports);
|
|
32
32
|
__exportStar(require("./WidgetsApi"), exports);
|
|
33
33
|
__exportStar(require("./WorkflowsApi"), exports);
|
|
34
|
-
__exportStar(require("./WorkspacesApi"), exports);
|