@widgetic/api-sdk-ts 1.11.111 → 2.0.1
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 +40 -40
- package/dist/apis/BrandKitApi.js +40 -40
- 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/TokensApi.d.ts +2 -0
- package/dist/apis/TokensApi.js +2 -0
- 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 +0 -2
- package/dist/apis/index.js +0 -2
- package/dist/esm/apis/BrandKitApi.js +39 -39
- 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/TokensApi.js +2 -0
- 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 +0 -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/{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} +12 -11
- package/dist/esm/models/GetOperationResponseDataMetadata.js +58 -0
- package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
- package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
- package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
- package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
- package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
- package/dist/esm/models/WidgetClarification.js +52 -0
- package/dist/esm/models/WidgetClarificationOption.js +51 -0
- package/dist/esm/models/WidgetClarificationQuestion.js +60 -0
- package/dist/esm/models/WidgetNextStep.js +67 -0
- package/dist/esm/models/WidgetPlan.js +61 -0
- package/dist/esm/models/WidgetPlanDecisions.js +68 -0
- package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
- package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
- package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
- package/dist/esm/models/WidgetPlanTask.js +80 -0
- package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
- package/dist/esm/models/WorkflowFailureReason.js +49 -0
- package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
- package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
- package/dist/esm/models/WorkflowStats.js +3 -0
- package/dist/esm/models/index.js +31 -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/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/GetOperationResponseData.d.ts +86 -0
- package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
- package/dist/models/GetOperationResponseDataMetadata.d.ts +65 -0
- package/dist/models/GetOperationResponseDataMetadata.js +66 -0
- package/dist/models/ListUploads200Response.d.ts +46 -0
- package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
- package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
- package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
- package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
- package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
- package/dist/models/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/Upload.d.ts +1 -1
- package/dist/models/UploadLimits.d.ts +3 -3
- package/dist/models/WidgetClarification.d.ts +45 -0
- package/dist/models/WidgetClarification.js +59 -0
- package/dist/models/WidgetClarificationOption.d.ts +44 -0
- package/dist/models/WidgetClarificationOption.js +58 -0
- package/dist/models/WidgetClarificationQuestion.d.ts +57 -0
- package/dist/models/WidgetClarificationQuestion.js +67 -0
- package/dist/models/WidgetNextStep.d.ts +63 -0
- package/dist/models/WidgetNextStep.js +75 -0
- package/dist/models/WidgetPlan.d.ts +58 -0
- package/dist/models/WidgetPlan.js +68 -0
- package/dist/models/WidgetPlanDecisions.d.ts +71 -0
- package/dist/models/WidgetPlanDecisions.js +75 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
- package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
- package/dist/models/WidgetPlanTask.d.ts +77 -0
- package/dist/models/WidgetPlanTask.js +88 -0
- package/dist/models/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 +31 -19
- package/dist/models/index.js +31 -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 -2707
- package/dist/apis/PartnerApi.js +0 -7073
- package/dist/apis/WorkspacesApi.d.ts +0 -352
- package/dist/apis/WorkspacesApi.js +0 -946
- package/dist/esm/apis/PartnerApi.js +0 -7036
- package/dist/esm/apis/WorkspacesApi.js +0 -909
- package/dist/esm/models/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/OperationsIdGetResponseData.d.ts +0 -88
- 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.ListCompositionEntryItemsOrderEnum = exports.GetAllCompositionsStatusEnum = exports.GetAllCompositionsWorkspaceEnum = exports.ExportCompositionEntryItemsOrderEnum = exports.ExportCompositionEntryItemsFormatEnum = exports.CompositionsApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
51
|
const index_1 = require("../models/index");
|
|
52
52
|
/**
|
|
@@ -87,7 +87,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
87
87
|
query: queryParameters,
|
|
88
88
|
body: (0, index_1.AddAiAnswersKnowledgeDocumentRequestToJSON)(requestParameters['addAiAnswersKnowledgeDocumentRequest']),
|
|
89
89
|
}, initOverrides);
|
|
90
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
90
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiAnswersKnowledgeDocumentResponseFromJSON)(jsonValue));
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Gives the widget\'s AI a document to answer visitors\' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). This call takes text. To add a text file or a picture of a document (a PDF too, once PDFs are read) without turning it into text yourself, use `addAiAnswersKnowledgeFile`. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person. A partner\'s customer in an editor session is one person of its own: its adds are not counted with the partner\'s other customers\'.
|
|
@@ -151,7 +151,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
151
151
|
query: queryParameters,
|
|
152
152
|
body: formParams,
|
|
153
153
|
}, initOverrides);
|
|
154
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
154
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiAnswersKnowledgeDocumentResponseFromJSON)(jsonValue));
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
157
|
* Gives the widget\'s AI a document made from a file. Send a `multipart/form-data` request with the file in the field named `file` and, if you like, a `title`. The file is turned into text and then added exactly as `addAiAnswersKnowledgeDocument` adds text: the same cleaning, the same limits, the same refusal of a copy of a document the widget already has. The call returns once the document is ready to be used, which takes a few seconds (a PDF is read first, so it takes longer). **PDFs are not read yet.** For now a PDF is refused with 415, in a sentence that says what to do instead: paste the text, upload it as a text file, or upload its pages as pictures. What this description says about a PDF is what will hold from the day PDFs are read. **Which files.** - A **PDF** (not read yet, see above), up to 10 MB and 300 pages. Its text is read and its paragraphs are put back together. A PDF that is only pictures of pages (a scan) has no text to read: upload the pages as pictures instead. A PDF locked with a password is refused. - A **text file**: `.txt`, `.text`, `.md`, `.markdown` or `.csv`, in UTF-8, UTF-16 or Windows-1252. - A **picture of a document**: PNG, JPEG or WebP, up to 4 MB. The text in it is read with the same text recognition as the `ocr` adapter. - Word and other office files are not read yet: save the file as a PDF and upload that. What a file is comes from what is in it, not from its name or the type it is sent as. A file that is none of these is refused with 415. **The title.** Left out, the name of the file (without its extension) is the title. Visitors see the title as the source of an answer, so send one that means something to them. **The file is not kept.** Only its text, cut into passages, is kept, and `getAiAnswersKnowledge` never returns it. **What leaves Widgetic.** As for text, the words of the document are sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. A picture is also sent to the text recognition service. A PDF is read on Widgetic\'s own servers and is not sent anywhere to be read. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** The widget\'s limits are those of `addAiAnswersKnowledgeDocument` (up to 20 documents, each up to 100000 characters of text, and up to 400000 characters in all; `getAiAnswersKnowledge` reports the current numbers), and the file is at most 10 MB. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds, from text or from a file, share one limit of ten in ten minutes per person. A partner\'s customer in an editor session is one person of its own: its adds are not counted with the partner\'s other customers\'.
|
|
@@ -194,6 +194,53 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
194
194
|
const response = await this.checkCompositionAccessRaw(requestParameters, initOverrides);
|
|
195
195
|
return await response.value();
|
|
196
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Creates a new composition. To make the composition for one of your managed users, send `managedUserId` or `managedUserExternalId`. The composition stays in your account and is yours to edit; the tag lets you list one user\'s compositions with `getAllCompositions`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. A copy made with `duplicateComposition` keeps the tag of the original. An editor session with the `creator` surface may call this to start a composition of a widget it built: it sends only `name`, `widgetId` (a widget made for the session\'s managed user) and `content`, and the composition is always made for that managed user. Send `databaseSchema` to give the composition tables of its own for what visitors send it (the shape, the allowed types and the limits are described on the field). A `databaseSchema` that cannot be used is refused before anything is created, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is created but its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. Leave `databaseSchema` out and the composition gets the tables its widget declares in its own source (`src/lib/meta/database.json`), if it declares any: they are made the same way, in a schema of the composition\'s own. A widget that keeps nothing leaves the composition without tables. If the widget\'s file cannot be used, or its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. The widget is read as it was when it was last published (as it is now, when it never was). The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
|
|
199
|
+
* Create Composition
|
|
200
|
+
*/
|
|
201
|
+
async createCompositionRaw(requestParameters, initOverrides) {
|
|
202
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
203
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createComposition().');
|
|
204
|
+
}
|
|
205
|
+
if (requestParameters['newComposition'] == null) {
|
|
206
|
+
throw new runtime.RequiredError('newComposition', 'Required parameter "newComposition" was null or undefined when calling createComposition().');
|
|
207
|
+
}
|
|
208
|
+
const queryParameters = {};
|
|
209
|
+
const headerParameters = {};
|
|
210
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
211
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
212
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
213
|
+
}
|
|
214
|
+
if (requestParameters['xManagedUserId'] != null) {
|
|
215
|
+
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
216
|
+
}
|
|
217
|
+
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
218
|
+
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
219
|
+
}
|
|
220
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
221
|
+
const token = this.configuration.accessToken;
|
|
222
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
223
|
+
if (tokenString) {
|
|
224
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const response = await this.request({
|
|
228
|
+
path: `/compositions`,
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
body: (0, index_1.NewCompositionToJSON)(requestParameters['newComposition']),
|
|
233
|
+
}, initOverrides);
|
|
234
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionResponseFromJSON)(jsonValue));
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Creates a new composition. To make the composition for one of your managed users, send `managedUserId` or `managedUserExternalId`. The composition stays in your account and is yours to edit; the tag lets you list one user\'s compositions with `getAllCompositions`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. A copy made with `duplicateComposition` keeps the tag of the original. An editor session with the `creator` surface may call this to start a composition of a widget it built: it sends only `name`, `widgetId` (a widget made for the session\'s managed user) and `content`, and the composition is always made for that managed user. Send `databaseSchema` to give the composition tables of its own for what visitors send it (the shape, the allowed types and the limits are described on the field). A `databaseSchema` that cannot be used is refused before anything is created, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is created but its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. Leave `databaseSchema` out and the composition gets the tables its widget declares in its own source (`src/lib/meta/database.json`), if it declares any: they are made the same way, in a schema of the composition\'s own. A widget that keeps nothing leaves the composition without tables. If the widget\'s file cannot be used, or its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. The widget is read as it was when it was last published (as it is now, when it never was). The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
|
|
238
|
+
* Create Composition
|
|
239
|
+
*/
|
|
240
|
+
async createComposition(requestParameters, initOverrides) {
|
|
241
|
+
const response = await this.createCompositionRaw(requestParameters, initOverrides);
|
|
242
|
+
return await response.value();
|
|
243
|
+
}
|
|
197
244
|
/**
|
|
198
245
|
* Creates one item in a widget content list without replacing the whole list. Item field keys are widget data (camelCase or snake_case are kept as sent). Partners use this to keep galleries in sync.
|
|
199
246
|
* Add a content list item
|
|
@@ -240,7 +287,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
240
287
|
query: queryParameters,
|
|
241
288
|
body: (0, index_1.CreateCompositionContentItemRequestToJSON)(requestParameters['createCompositionContentItemRequest']),
|
|
242
289
|
}, initOverrides);
|
|
243
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
290
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ContentItemWriteResultResponseFromJSON)(jsonValue));
|
|
244
291
|
}
|
|
245
292
|
/**
|
|
246
293
|
* Creates one item in a widget content list without replacing the whole list. Item field keys are widget data (camelCase or snake_case are kept as sent). Partners use this to keep galleries in sync.
|
|
@@ -293,7 +340,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
293
340
|
query: queryParameters,
|
|
294
341
|
body: requestParameters['body'],
|
|
295
342
|
}, initOverrides);
|
|
296
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
343
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionDatabaseRecordResponseFromJSON)(jsonValue));
|
|
297
344
|
}
|
|
298
345
|
/**
|
|
299
346
|
* Creates a new record in one of the composition\'s tables. Only the composition\'s own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
@@ -304,22 +351,15 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
304
351
|
return await response.value();
|
|
305
352
|
}
|
|
306
353
|
/**
|
|
307
|
-
*
|
|
308
|
-
*
|
|
354
|
+
* Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
|
|
355
|
+
* Delete Composition
|
|
309
356
|
*/
|
|
310
|
-
async
|
|
311
|
-
if (requestParameters['
|
|
312
|
-
throw new runtime.RequiredError('
|
|
313
|
-
}
|
|
314
|
-
if (requestParameters['newComposition'] == null) {
|
|
315
|
-
throw new runtime.RequiredError('newComposition', 'Required parameter "newComposition" was null or undefined when calling createComposition().');
|
|
357
|
+
async deleteCompositionRaw(requestParameters, initOverrides) {
|
|
358
|
+
if (requestParameters['id'] == null) {
|
|
359
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteComposition().');
|
|
316
360
|
}
|
|
317
361
|
const queryParameters = {};
|
|
318
362
|
const headerParameters = {};
|
|
319
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
320
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
321
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
322
|
-
}
|
|
323
363
|
if (requestParameters['xManagedUserId'] != null) {
|
|
324
364
|
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
325
365
|
}
|
|
@@ -334,21 +374,19 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
334
374
|
}
|
|
335
375
|
}
|
|
336
376
|
const response = await this.request({
|
|
337
|
-
path: `/compositions`,
|
|
338
|
-
method: '
|
|
377
|
+
path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
378
|
+
method: 'DELETE',
|
|
339
379
|
headers: headerParameters,
|
|
340
380
|
query: queryParameters,
|
|
341
|
-
body: (0, index_1.NewCompositionToJSON)(requestParameters['newComposition']),
|
|
342
381
|
}, initOverrides);
|
|
343
|
-
return new runtime.
|
|
382
|
+
return new runtime.VoidApiResponse(response);
|
|
344
383
|
}
|
|
345
384
|
/**
|
|
346
|
-
*
|
|
347
|
-
*
|
|
385
|
+
* Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
|
|
386
|
+
* Delete Composition
|
|
348
387
|
*/
|
|
349
|
-
async
|
|
350
|
-
|
|
351
|
-
return await response.value();
|
|
388
|
+
async deleteComposition(requestParameters, initOverrides) {
|
|
389
|
+
await this.deleteCompositionRaw(requestParameters, initOverrides);
|
|
352
390
|
}
|
|
353
391
|
/**
|
|
354
392
|
* Delete a content list item
|
|
@@ -482,7 +520,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
482
520
|
headers: headerParameters,
|
|
483
521
|
query: queryParameters,
|
|
484
522
|
}, initOverrides);
|
|
485
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
523
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionDatabaseRecordResponseFromJSON)(jsonValue));
|
|
486
524
|
}
|
|
487
525
|
/**
|
|
488
526
|
* Deletes a specific record from one of the composition\'s tables. Only the composition\'s own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
@@ -493,14 +531,26 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
493
531
|
return await response.value();
|
|
494
532
|
}
|
|
495
533
|
/**
|
|
496
|
-
*
|
|
497
|
-
* Delete
|
|
534
|
+
* Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
|
|
535
|
+
* Delete composition entry items by id or host context
|
|
498
536
|
*/
|
|
499
|
-
async
|
|
537
|
+
async deleteCompositionEntryItemsRaw(requestParameters, initOverrides) {
|
|
500
538
|
if (requestParameters['id'] == null) {
|
|
501
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
539
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionEntryItems().');
|
|
540
|
+
}
|
|
541
|
+
if (requestParameters['table'] == null) {
|
|
542
|
+
throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling deleteCompositionEntryItems().');
|
|
502
543
|
}
|
|
503
544
|
const queryParameters = {};
|
|
545
|
+
if (requestParameters['ids'] != null) {
|
|
546
|
+
queryParameters['ids'] = requestParameters['ids'];
|
|
547
|
+
}
|
|
548
|
+
if (requestParameters['context'] != null) {
|
|
549
|
+
queryParameters['context'] = requestParameters['context'];
|
|
550
|
+
}
|
|
551
|
+
if (requestParameters['filter'] != null) {
|
|
552
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
553
|
+
}
|
|
504
554
|
const headerParameters = {};
|
|
505
555
|
if (requestParameters['xManagedUserId'] != null) {
|
|
506
556
|
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
@@ -516,19 +566,20 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
516
566
|
}
|
|
517
567
|
}
|
|
518
568
|
const response = await this.request({
|
|
519
|
-
path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
569
|
+
path: `/compositions/{id}/entries/{table}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
|
|
520
570
|
method: 'DELETE',
|
|
521
571
|
headers: headerParameters,
|
|
522
572
|
query: queryParameters,
|
|
523
573
|
}, initOverrides);
|
|
524
|
-
return new runtime.
|
|
574
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionEntryDeleteSuccessFromJSON)(jsonValue));
|
|
525
575
|
}
|
|
526
576
|
/**
|
|
527
|
-
*
|
|
528
|
-
* Delete
|
|
577
|
+
* Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
|
|
578
|
+
* Delete composition entry items by id or host context
|
|
529
579
|
*/
|
|
530
|
-
async
|
|
531
|
-
await this.
|
|
580
|
+
async deleteCompositionEntryItems(requestParameters, initOverrides) {
|
|
581
|
+
const response = await this.deleteCompositionEntryItemsRaw(requestParameters, initOverrides);
|
|
582
|
+
return await response.value();
|
|
532
583
|
}
|
|
533
584
|
/**
|
|
534
585
|
* Names the tables a composition\'s widget keeps entries in (the votes, ratings, answers or sign-ups its visitors left), their columns, and how many entries each holds. Call it first to learn the table and column names that `readCompositionEntries` takes. A widget that only shows content keeps nothing of its own: the answer is `hasData: false` with no tables, and that is not an error. A table that could not be counted has `rows: null`, which is not zero. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
@@ -616,6 +667,71 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
616
667
|
const response = await this.duplicateCompositionRaw(requestParameters, initOverrides);
|
|
617
668
|
return await response.value();
|
|
618
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* Streams up to 50,000 matching rows in batches of 1,000. Tables without cursor paging export at most one batch; when more rows exist the response sets `X-Widgetic-Export-Truncated: true`. Rate limit 20 requests per minute.
|
|
672
|
+
* Export composition entry items
|
|
673
|
+
*/
|
|
674
|
+
async exportCompositionEntryItemsRaw(requestParameters, initOverrides) {
|
|
675
|
+
if (requestParameters['id'] == null) {
|
|
676
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling exportCompositionEntryItems().');
|
|
677
|
+
}
|
|
678
|
+
if (requestParameters['table'] == null) {
|
|
679
|
+
throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling exportCompositionEntryItems().');
|
|
680
|
+
}
|
|
681
|
+
const queryParameters = {};
|
|
682
|
+
if (requestParameters['format'] != null) {
|
|
683
|
+
queryParameters['format'] = requestParameters['format'];
|
|
684
|
+
}
|
|
685
|
+
if (requestParameters['order'] != null) {
|
|
686
|
+
queryParameters['order'] = requestParameters['order'];
|
|
687
|
+
}
|
|
688
|
+
if (requestParameters['since'] != null) {
|
|
689
|
+
queryParameters['since'] = requestParameters['since'].toISOString();
|
|
690
|
+
}
|
|
691
|
+
if (requestParameters['until'] != null) {
|
|
692
|
+
queryParameters['until'] = requestParameters['until'].toISOString();
|
|
693
|
+
}
|
|
694
|
+
if (requestParameters['context'] != null) {
|
|
695
|
+
queryParameters['context'] = requestParameters['context'];
|
|
696
|
+
}
|
|
697
|
+
if (requestParameters['filter'] != null) {
|
|
698
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
699
|
+
}
|
|
700
|
+
const headerParameters = {};
|
|
701
|
+
if (requestParameters['xManagedUserId'] != null) {
|
|
702
|
+
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
703
|
+
}
|
|
704
|
+
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
705
|
+
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
706
|
+
}
|
|
707
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
708
|
+
const token = this.configuration.accessToken;
|
|
709
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
710
|
+
if (tokenString) {
|
|
711
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
const response = await this.request({
|
|
715
|
+
path: `/compositions/{id}/entries/{table}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
|
|
716
|
+
method: 'GET',
|
|
717
|
+
headers: headerParameters,
|
|
718
|
+
query: queryParameters,
|
|
719
|
+
}, initOverrides);
|
|
720
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
721
|
+
return new runtime.JSONApiResponse(response);
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
return new runtime.TextApiResponse(response);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Streams up to 50,000 matching rows in batches of 1,000. Tables without cursor paging export at most one batch; when more rows exist the response sets `X-Widgetic-Export-Truncated: true`. Rate limit 20 requests per minute.
|
|
729
|
+
* Export composition entry items
|
|
730
|
+
*/
|
|
731
|
+
async exportCompositionEntryItems(requestParameters, initOverrides) {
|
|
732
|
+
const response = await this.exportCompositionEntryItemsRaw(requestParameters, initOverrides);
|
|
733
|
+
return await response.value();
|
|
734
|
+
}
|
|
619
735
|
/**
|
|
620
736
|
* The `ai-answers` adapter lets a widget answer a visitor\'s question with text an AI model writes from documents the widget\'s owner provides. This lists those documents, and how much room is left for more: `totals` carries the widget\'s limits next to what it uses. The list never contains what a document says, only which documents there are: their title, size and state. A `processing` document is not used to answer questions yet (or an add of it was interrupted: remove it and add it again). Add a document with `addAiAnswersKnowledgeDocument`; remove one with `removeAiAnswersKnowledgeDocument`. The caller must be allowed to see the widget: its owner, a partner for a customer it manages, or a Widgetic administrator. An API key needs the `content:read` scope.
|
|
621
737
|
* See the documents a widget\'s AI answers from
|
|
@@ -747,7 +863,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
747
863
|
headers: headerParameters,
|
|
748
864
|
query: queryParameters,
|
|
749
865
|
}, initOverrides);
|
|
750
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
866
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionResponseFromJSON)(jsonValue));
|
|
751
867
|
}
|
|
752
868
|
/**
|
|
753
869
|
* Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route looks at the website that page is on. While the composition\'s allowed list is empty (you have not restricted the allowed websites), every website may write; once you list websites, only those may, besides Widgetic\'s own sites, the visitor\'s own machine and your own platform. A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says. The public JSON of the composition stays open to every website. For a composition a team shares (one filed under a project of an organization, or made in a Shopify store\'s workspace) the answer also carries `lastEditedBy` and `lastEditedAt`: who made the latest change and when, so that a teammate who opens it can be told \"Anna changed this at 14:32\". A composition in a personal project leaves both out, and so does an answer given to an editor session or to a call made for one managed user: only a person is told who a teammate is.
|
|
@@ -758,12 +874,12 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
758
874
|
return await response.value();
|
|
759
875
|
}
|
|
760
876
|
/**
|
|
761
|
-
* Retrieves the content
|
|
762
|
-
* Get Content
|
|
877
|
+
* Retrieves the current content of a composition
|
|
878
|
+
* Get Current Content
|
|
763
879
|
*/
|
|
764
|
-
async
|
|
880
|
+
async getCompositionContentRaw(requestParameters, initOverrides) {
|
|
765
881
|
if (requestParameters['id'] == null) {
|
|
766
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
882
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContent().');
|
|
767
883
|
}
|
|
768
884
|
const queryParameters = {};
|
|
769
885
|
const headerParameters = {};
|
|
@@ -781,28 +897,28 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
781
897
|
}
|
|
782
898
|
}
|
|
783
899
|
const response = await this.request({
|
|
784
|
-
path: `/compositions/{id}/
|
|
900
|
+
path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
785
901
|
method: 'GET',
|
|
786
902
|
headers: headerParameters,
|
|
787
903
|
query: queryParameters,
|
|
788
904
|
}, initOverrides);
|
|
789
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
905
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCompositionContentResponseFromJSON)(jsonValue));
|
|
790
906
|
}
|
|
791
907
|
/**
|
|
792
|
-
* Retrieves the content
|
|
793
|
-
* Get Content
|
|
908
|
+
* Retrieves the current content of a composition
|
|
909
|
+
* Get Current Content
|
|
794
910
|
*/
|
|
795
|
-
async
|
|
796
|
-
const response = await this.
|
|
911
|
+
async getCompositionContent(requestParameters, initOverrides) {
|
|
912
|
+
const response = await this.getCompositionContentRaw(requestParameters, initOverrides);
|
|
797
913
|
return await response.value();
|
|
798
914
|
}
|
|
799
915
|
/**
|
|
800
|
-
* Retrieves the
|
|
801
|
-
* Get
|
|
916
|
+
* Retrieves the content schema for a composition based on its widget type
|
|
917
|
+
* Get Content Schema
|
|
802
918
|
*/
|
|
803
|
-
async
|
|
919
|
+
async getCompositionContentSchemaRaw(requestParameters, initOverrides) {
|
|
804
920
|
if (requestParameters['id'] == null) {
|
|
805
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
921
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContentSchema().');
|
|
806
922
|
}
|
|
807
923
|
const queryParameters = {};
|
|
808
924
|
const headerParameters = {};
|
|
@@ -820,19 +936,19 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
820
936
|
}
|
|
821
937
|
}
|
|
822
938
|
const response = await this.request({
|
|
823
|
-
path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
939
|
+
path: `/compositions/{id}/schema/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
824
940
|
method: 'GET',
|
|
825
941
|
headers: headerParameters,
|
|
826
942
|
query: queryParameters,
|
|
827
943
|
}, initOverrides);
|
|
828
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
944
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCompositionContentSchemaResponseFromJSON)(jsonValue));
|
|
829
945
|
}
|
|
830
946
|
/**
|
|
831
|
-
* Retrieves the
|
|
832
|
-
* Get
|
|
947
|
+
* Retrieves the content schema for a composition based on its widget type
|
|
948
|
+
* Get Content Schema
|
|
833
949
|
*/
|
|
834
|
-
async
|
|
835
|
-
const response = await this.
|
|
950
|
+
async getCompositionContentSchema(requestParameters, initOverrides) {
|
|
951
|
+
const response = await this.getCompositionContentSchemaRaw(requestParameters, initOverrides);
|
|
836
952
|
return await response.value();
|
|
837
953
|
}
|
|
838
954
|
/**
|
|
@@ -909,7 +1025,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
909
1025
|
headers: headerParameters,
|
|
910
1026
|
query: queryParameters,
|
|
911
1027
|
}, initOverrides);
|
|
912
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1028
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionDatabaseRecordResponseFromJSON)(jsonValue));
|
|
913
1029
|
}
|
|
914
1030
|
/**
|
|
915
1031
|
* Retrieves a specific record from one of the composition\'s tables. Only the composition\'s own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
@@ -962,12 +1078,12 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
962
1078
|
return await response.value();
|
|
963
1079
|
}
|
|
964
1080
|
/**
|
|
965
|
-
* Retrieves the design
|
|
966
|
-
* Get Design
|
|
1081
|
+
* Retrieves only the design field from a composition.
|
|
1082
|
+
* Get Composition Design
|
|
967
1083
|
*/
|
|
968
|
-
async
|
|
1084
|
+
async getCompositionDesignRaw(requestParameters, initOverrides) {
|
|
969
1085
|
if (requestParameters['id'] == null) {
|
|
970
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
1086
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesign().');
|
|
971
1087
|
}
|
|
972
1088
|
const queryParameters = {};
|
|
973
1089
|
const headerParameters = {};
|
|
@@ -985,28 +1101,28 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
985
1101
|
}
|
|
986
1102
|
}
|
|
987
1103
|
const response = await this.request({
|
|
988
|
-
path: `/compositions/{id}/
|
|
1104
|
+
path: `/compositions/{id}/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
989
1105
|
method: 'GET',
|
|
990
1106
|
headers: headerParameters,
|
|
991
1107
|
query: queryParameters,
|
|
992
1108
|
}, initOverrides);
|
|
993
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1109
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCompositionDesignResponseFromJSON)(jsonValue));
|
|
994
1110
|
}
|
|
995
1111
|
/**
|
|
996
|
-
* Retrieves the design
|
|
997
|
-
* Get Design
|
|
1112
|
+
* Retrieves only the design field from a composition.
|
|
1113
|
+
* Get Composition Design
|
|
998
1114
|
*/
|
|
999
|
-
async
|
|
1000
|
-
const response = await this.
|
|
1115
|
+
async getCompositionDesign(requestParameters, initOverrides) {
|
|
1116
|
+
const response = await this.getCompositionDesignRaw(requestParameters, initOverrides);
|
|
1001
1117
|
return await response.value();
|
|
1002
1118
|
}
|
|
1003
1119
|
/**
|
|
1004
|
-
* Retrieves
|
|
1005
|
-
* Get
|
|
1120
|
+
* Retrieves the design schema for a composition based on its widget type
|
|
1121
|
+
* Get Design Schema
|
|
1006
1122
|
*/
|
|
1007
|
-
async
|
|
1123
|
+
async getCompositionDesignSchemaRaw(requestParameters, initOverrides) {
|
|
1008
1124
|
if (requestParameters['id'] == null) {
|
|
1009
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
1125
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesignSchema().');
|
|
1010
1126
|
}
|
|
1011
1127
|
const queryParameters = {};
|
|
1012
1128
|
const headerParameters = {};
|
|
@@ -1024,19 +1140,19 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1024
1140
|
}
|
|
1025
1141
|
}
|
|
1026
1142
|
const response = await this.request({
|
|
1027
|
-
path: `/compositions/{id}/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
1143
|
+
path: `/compositions/{id}/schema/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
1028
1144
|
method: 'GET',
|
|
1029
1145
|
headers: headerParameters,
|
|
1030
1146
|
query: queryParameters,
|
|
1031
1147
|
}, initOverrides);
|
|
1032
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1148
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetCompositionDesignSchemaResponseFromJSON)(jsonValue));
|
|
1033
1149
|
}
|
|
1034
1150
|
/**
|
|
1035
|
-
* Retrieves
|
|
1036
|
-
* Get
|
|
1151
|
+
* Retrieves the design schema for a composition based on its widget type
|
|
1152
|
+
* Get Design Schema
|
|
1037
1153
|
*/
|
|
1038
|
-
async
|
|
1039
|
-
const response = await this.
|
|
1154
|
+
async getCompositionDesignSchema(requestParameters, initOverrides) {
|
|
1155
|
+
const response = await this.getCompositionDesignSchemaRaw(requestParameters, initOverrides);
|
|
1040
1156
|
return await response.value();
|
|
1041
1157
|
}
|
|
1042
1158
|
/**
|
|
@@ -1230,6 +1346,69 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1230
1346
|
const response = await this.getCompositionsBatchRaw(requestParameters, initOverrides);
|
|
1231
1347
|
return await response.value();
|
|
1232
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Reads one widget table with cursor paging (time then id in byte order), optional since/until on the time column, and up to five context filters plus ten column filters. Rate limit 120 requests per minute. Each read batch uses a 5 s statement timeout.
|
|
1351
|
+
* List composition entry items with paging and filters
|
|
1352
|
+
*/
|
|
1353
|
+
async listCompositionEntryItemsRaw(requestParameters, initOverrides) {
|
|
1354
|
+
if (requestParameters['id'] == null) {
|
|
1355
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listCompositionEntryItems().');
|
|
1356
|
+
}
|
|
1357
|
+
if (requestParameters['table'] == null) {
|
|
1358
|
+
throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling listCompositionEntryItems().');
|
|
1359
|
+
}
|
|
1360
|
+
const queryParameters = {};
|
|
1361
|
+
if (requestParameters['limit'] != null) {
|
|
1362
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1363
|
+
}
|
|
1364
|
+
if (requestParameters['order'] != null) {
|
|
1365
|
+
queryParameters['order'] = requestParameters['order'];
|
|
1366
|
+
}
|
|
1367
|
+
if (requestParameters['since'] != null) {
|
|
1368
|
+
queryParameters['since'] = requestParameters['since'].toISOString();
|
|
1369
|
+
}
|
|
1370
|
+
if (requestParameters['until'] != null) {
|
|
1371
|
+
queryParameters['until'] = requestParameters['until'].toISOString();
|
|
1372
|
+
}
|
|
1373
|
+
if (requestParameters['cursor'] != null) {
|
|
1374
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
1375
|
+
}
|
|
1376
|
+
if (requestParameters['context'] != null) {
|
|
1377
|
+
queryParameters['context'] = requestParameters['context'];
|
|
1378
|
+
}
|
|
1379
|
+
if (requestParameters['filter'] != null) {
|
|
1380
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
1381
|
+
}
|
|
1382
|
+
const headerParameters = {};
|
|
1383
|
+
if (requestParameters['xManagedUserId'] != null) {
|
|
1384
|
+
headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
|
|
1385
|
+
}
|
|
1386
|
+
if (requestParameters['xManagedUserExternalId'] != null) {
|
|
1387
|
+
headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
|
|
1388
|
+
}
|
|
1389
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1390
|
+
const token = this.configuration.accessToken;
|
|
1391
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
1392
|
+
if (tokenString) {
|
|
1393
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const response = await this.request({
|
|
1397
|
+
path: `/compositions/{id}/entries/{table}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
|
|
1398
|
+
method: 'GET',
|
|
1399
|
+
headers: headerParameters,
|
|
1400
|
+
query: queryParameters,
|
|
1401
|
+
}, initOverrides);
|
|
1402
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionEntryItemsPageSuccessFromJSON)(jsonValue));
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Reads one widget table with cursor paging (time then id in byte order), optional since/until on the time column, and up to five context filters plus ten column filters. Rate limit 120 requests per minute. Each read batch uses a 5 s statement timeout.
|
|
1406
|
+
* List composition entry items with paging and filters
|
|
1407
|
+
*/
|
|
1408
|
+
async listCompositionEntryItems(requestParameters, initOverrides) {
|
|
1409
|
+
const response = await this.listCompositionEntryItemsRaw(requestParameters, initOverrides);
|
|
1410
|
+
return await response.value();
|
|
1411
|
+
}
|
|
1233
1412
|
/**
|
|
1234
1413
|
* Update a content list item
|
|
1235
1414
|
*/
|
|
@@ -1278,7 +1457,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1278
1457
|
query: queryParameters,
|
|
1279
1458
|
body: requestParameters['requestBody'],
|
|
1280
1459
|
}, initOverrides);
|
|
1281
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1460
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ContentItemWriteResultResponseFromJSON)(jsonValue));
|
|
1282
1461
|
}
|
|
1283
1462
|
/**
|
|
1284
1463
|
* Update a content list item
|
|
@@ -1499,28 +1678,25 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1499
1678
|
return await response.value();
|
|
1500
1679
|
}
|
|
1501
1680
|
/**
|
|
1502
|
-
* Updates a specific
|
|
1503
|
-
* Update
|
|
1681
|
+
* Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so. **When several people edit the same composition.** A save that carries `content` can name the content version it started from in the `If-Match` header (the `contentVersion` of the composition you read, or the `ETag` of an earlier answer). If somebody saved the content since, nothing is overwritten: the save is refused with `412` and `CONTENT_VERSION_MISMATCH`, and `error.details.currentVersion` is the version to start again from. For a composition a team shares, `error.details` also says who got there first: `lastEditedBy` (`{ id, name }`, or `null` when nobody can be named) and `lastEditedAt`. An editor session, or a call made for one managed user, is told the version only. A save without `If-Match` still goes through, and the other person\'s change is replaced, as it always was.
|
|
1682
|
+
* Update Composition
|
|
1504
1683
|
*/
|
|
1505
|
-
async
|
|
1684
|
+
async updateCompositionRaw(requestParameters, initOverrides) {
|
|
1506
1685
|
if (requestParameters['id'] == null) {
|
|
1507
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
1508
|
-
}
|
|
1509
|
-
if (requestParameters['table'] == null) {
|
|
1510
|
-
throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1511
|
-
}
|
|
1512
|
-
if (requestParameters['recordId'] == null) {
|
|
1513
|
-
throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1686
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateComposition().');
|
|
1514
1687
|
}
|
|
1515
1688
|
if (requestParameters['idempotencyKey'] == null) {
|
|
1516
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
1689
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateComposition().');
|
|
1517
1690
|
}
|
|
1518
|
-
if (requestParameters['
|
|
1519
|
-
throw new runtime.RequiredError('
|
|
1691
|
+
if (requestParameters['updateComposition'] == null) {
|
|
1692
|
+
throw new runtime.RequiredError('updateComposition', 'Required parameter "updateComposition" was null or undefined when calling updateComposition().');
|
|
1520
1693
|
}
|
|
1521
1694
|
const queryParameters = {};
|
|
1522
1695
|
const headerParameters = {};
|
|
1523
1696
|
headerParameters['Content-Type'] = 'application/json';
|
|
1697
|
+
if (requestParameters['ifMatch'] != null) {
|
|
1698
|
+
headerParameters['If-Match'] = String(requestParameters['ifMatch']);
|
|
1699
|
+
}
|
|
1524
1700
|
if (requestParameters['idempotencyKey'] != null) {
|
|
1525
1701
|
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
1526
1702
|
}
|
|
@@ -1538,35 +1714,41 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1538
1714
|
}
|
|
1539
1715
|
}
|
|
1540
1716
|
const response = await this.request({
|
|
1541
|
-
path: `/compositions/{id}
|
|
1717
|
+
path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
1542
1718
|
method: 'PUT',
|
|
1543
1719
|
headers: headerParameters,
|
|
1544
1720
|
query: queryParameters,
|
|
1545
|
-
body: requestParameters['
|
|
1721
|
+
body: (0, index_1.UpdateCompositionToJSON)(requestParameters['updateComposition']),
|
|
1546
1722
|
}, initOverrides);
|
|
1547
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1723
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionResponseFromJSON)(jsonValue));
|
|
1548
1724
|
}
|
|
1549
1725
|
/**
|
|
1550
|
-
* Updates a specific
|
|
1551
|
-
* Update
|
|
1726
|
+
* Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so. **When several people edit the same composition.** A save that carries `content` can name the content version it started from in the `If-Match` header (the `contentVersion` of the composition you read, or the `ETag` of an earlier answer). If somebody saved the content since, nothing is overwritten: the save is refused with `412` and `CONTENT_VERSION_MISMATCH`, and `error.details.currentVersion` is the version to start again from. For a composition a team shares, `error.details` also says who got there first: `lastEditedBy` (`{ id, name }`, or `null` when nobody can be named) and `lastEditedAt`. An editor session, or a call made for one managed user, is told the version only. A save without `If-Match` still goes through, and the other person\'s change is replaced, as it always was.
|
|
1727
|
+
* Update Composition
|
|
1552
1728
|
*/
|
|
1553
|
-
async
|
|
1554
|
-
const response = await this.
|
|
1729
|
+
async updateComposition(requestParameters, initOverrides) {
|
|
1730
|
+
const response = await this.updateCompositionRaw(requestParameters, initOverrides);
|
|
1555
1731
|
return await response.value();
|
|
1556
1732
|
}
|
|
1557
1733
|
/**
|
|
1558
|
-
* Updates
|
|
1559
|
-
* Update Composition
|
|
1734
|
+
* Updates a specific record in one of the composition\'s tables. Only the composition\'s own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
1735
|
+
* Update Record In Composition Database
|
|
1560
1736
|
*/
|
|
1561
|
-
async
|
|
1737
|
+
async updateCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
|
|
1562
1738
|
if (requestParameters['id'] == null) {
|
|
1563
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
1739
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1740
|
+
}
|
|
1741
|
+
if (requestParameters['table'] == null) {
|
|
1742
|
+
throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1743
|
+
}
|
|
1744
|
+
if (requestParameters['recordId'] == null) {
|
|
1745
|
+
throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1564
1746
|
}
|
|
1565
1747
|
if (requestParameters['idempotencyKey'] == null) {
|
|
1566
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
1748
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1567
1749
|
}
|
|
1568
|
-
if (requestParameters['
|
|
1569
|
-
throw new runtime.RequiredError('
|
|
1750
|
+
if (requestParameters['body'] == null) {
|
|
1751
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling updateCompositionDatabaseRecord().');
|
|
1570
1752
|
}
|
|
1571
1753
|
const queryParameters = {};
|
|
1572
1754
|
const headerParameters = {};
|
|
@@ -1588,42 +1770,39 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1588
1770
|
}
|
|
1589
1771
|
}
|
|
1590
1772
|
const response = await this.request({
|
|
1591
|
-
path: `/compositions/{id}/
|
|
1773
|
+
path: `/compositions/{id}/database/{table}/{recordId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))).replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))),
|
|
1592
1774
|
method: 'PUT',
|
|
1593
1775
|
headers: headerParameters,
|
|
1594
1776
|
query: queryParameters,
|
|
1595
|
-
body:
|
|
1777
|
+
body: requestParameters['body'],
|
|
1596
1778
|
}, initOverrides);
|
|
1597
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1779
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionDatabaseRecordResponseFromJSON)(jsonValue));
|
|
1598
1780
|
}
|
|
1599
1781
|
/**
|
|
1600
|
-
* Updates
|
|
1601
|
-
* Update Composition
|
|
1782
|
+
* Updates a specific record in one of the composition\'s tables. Only the composition\'s own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
1783
|
+
* Update Record In Composition Database
|
|
1602
1784
|
*/
|
|
1603
|
-
async
|
|
1604
|
-
const response = await this.
|
|
1785
|
+
async updateCompositionDatabaseRecord(requestParameters, initOverrides) {
|
|
1786
|
+
const response = await this.updateCompositionDatabaseRecordRaw(requestParameters, initOverrides);
|
|
1605
1787
|
return await response.value();
|
|
1606
1788
|
}
|
|
1607
1789
|
/**
|
|
1608
|
-
* Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
1609
|
-
* Update Composition
|
|
1790
|
+
* Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
1791
|
+
* Update Composition Status
|
|
1610
1792
|
*/
|
|
1611
|
-
async
|
|
1793
|
+
async updateCompositionStatusRaw(requestParameters, initOverrides) {
|
|
1612
1794
|
if (requestParameters['id'] == null) {
|
|
1613
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
1795
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionStatus().');
|
|
1614
1796
|
}
|
|
1615
1797
|
if (requestParameters['idempotencyKey'] == null) {
|
|
1616
|
-
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling
|
|
1798
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionStatus().');
|
|
1617
1799
|
}
|
|
1618
|
-
if (requestParameters['
|
|
1619
|
-
throw new runtime.RequiredError('
|
|
1800
|
+
if (requestParameters['updateCompositionStatusRequest'] == null) {
|
|
1801
|
+
throw new runtime.RequiredError('updateCompositionStatusRequest', 'Required parameter "updateCompositionStatusRequest" was null or undefined when calling updateCompositionStatus().');
|
|
1620
1802
|
}
|
|
1621
1803
|
const queryParameters = {};
|
|
1622
1804
|
const headerParameters = {};
|
|
1623
1805
|
headerParameters['Content-Type'] = 'application/json';
|
|
1624
|
-
if (requestParameters['ifMatch'] != null) {
|
|
1625
|
-
headerParameters['If-Match'] = String(requestParameters['ifMatch']);
|
|
1626
|
-
}
|
|
1627
1806
|
if (requestParameters['idempotencyKey'] != null) {
|
|
1628
1807
|
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
1629
1808
|
}
|
|
@@ -1641,20 +1820,20 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1641
1820
|
}
|
|
1642
1821
|
}
|
|
1643
1822
|
const response = await this.request({
|
|
1644
|
-
path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
1823
|
+
path: `/compositions/{id}/status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
1645
1824
|
method: 'PUT',
|
|
1646
1825
|
headers: headerParameters,
|
|
1647
1826
|
query: queryParameters,
|
|
1648
|
-
body: (0, index_1.
|
|
1827
|
+
body: (0, index_1.UpdateCompositionStatusRequestToJSON)(requestParameters['updateCompositionStatusRequest']),
|
|
1649
1828
|
}, initOverrides);
|
|
1650
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1829
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionResponseFromJSON)(jsonValue));
|
|
1651
1830
|
}
|
|
1652
1831
|
/**
|
|
1653
|
-
* Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
1654
|
-
* Update Composition
|
|
1832
|
+
* Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
1833
|
+
* Update Composition Status
|
|
1655
1834
|
*/
|
|
1656
|
-
async
|
|
1657
|
-
const response = await this.
|
|
1835
|
+
async updateCompositionStatus(requestParameters, initOverrides) {
|
|
1836
|
+
const response = await this.updateCompositionStatusRaw(requestParameters, initOverrides);
|
|
1658
1837
|
return await response.value();
|
|
1659
1838
|
}
|
|
1660
1839
|
/**
|
|
@@ -1712,15 +1891,36 @@ exports.CompositionsApi = CompositionsApi;
|
|
|
1712
1891
|
/**
|
|
1713
1892
|
* @export
|
|
1714
1893
|
*/
|
|
1715
|
-
exports.
|
|
1894
|
+
exports.ExportCompositionEntryItemsFormatEnum = {
|
|
1895
|
+
Csv: 'csv',
|
|
1896
|
+
Json: 'json'
|
|
1897
|
+
};
|
|
1898
|
+
/**
|
|
1899
|
+
* @export
|
|
1900
|
+
*/
|
|
1901
|
+
exports.ExportCompositionEntryItemsOrderEnum = {
|
|
1902
|
+
Asc: 'asc',
|
|
1903
|
+
Desc: 'desc'
|
|
1904
|
+
};
|
|
1905
|
+
/**
|
|
1906
|
+
* @export
|
|
1907
|
+
*/
|
|
1908
|
+
exports.GetAllCompositionsWorkspaceEnum = {
|
|
1716
1909
|
True: 'true',
|
|
1717
1910
|
False: 'false'
|
|
1718
1911
|
};
|
|
1719
1912
|
/**
|
|
1720
1913
|
* @export
|
|
1721
1914
|
*/
|
|
1722
|
-
exports.
|
|
1915
|
+
exports.GetAllCompositionsStatusEnum = {
|
|
1723
1916
|
Draft: 'draft',
|
|
1724
1917
|
Published: 'published',
|
|
1725
1918
|
Archived: 'archived'
|
|
1726
1919
|
};
|
|
1920
|
+
/**
|
|
1921
|
+
* @export
|
|
1922
|
+
*/
|
|
1923
|
+
exports.ListCompositionEntryItemsOrderEnum = {
|
|
1924
|
+
Asc: 'asc',
|
|
1925
|
+
Desc: 'desc'
|
|
1926
|
+
};
|