@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.
Files changed (185) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/BrandKitApi.d.ts +40 -40
  3. package/dist/apis/BrandKitApi.js +40 -40
  4. package/dist/apis/CanvasesApi.d.ts +15 -15
  5. package/dist/apis/CompositionsApi.d.ts +255 -155
  6. package/dist/apis/CompositionsApi.js +333 -133
  7. package/dist/apis/CreditsApi.d.ts +7 -7
  8. package/dist/apis/CreditsApi.js +1 -1
  9. package/dist/apis/EntitlementsApi.d.ts +6 -6
  10. package/dist/apis/InvoicesApi.d.ts +6 -6
  11. package/dist/apis/InvoicesApi.js +2 -2
  12. package/dist/apis/ManagedUsersApi.d.ts +97 -63
  13. package/dist/apis/ManagedUsersApi.js +106 -39
  14. package/dist/apis/OperationsApi.d.ts +4 -4
  15. package/dist/apis/OperationsApi.js +5 -5
  16. package/dist/apis/PartnersApi.d.ts +125 -125
  17. package/dist/apis/PartnersApi.js +11 -11
  18. package/dist/apis/PublicEmbedApi.d.ts +42 -42
  19. package/dist/apis/PublicEmbedApi.js +29 -29
  20. package/dist/apis/TokensApi.d.ts +2 -0
  21. package/dist/apis/TokensApi.js +2 -0
  22. package/dist/apis/UploadsApi.d.ts +38 -38
  23. package/dist/apis/UploadsApi.js +60 -60
  24. package/dist/apis/UsersApi.d.ts +40 -40
  25. package/dist/apis/UsersApi.js +4 -4
  26. package/dist/apis/WidgetsApi.d.ts +23 -23
  27. package/dist/apis/WidgetsApi.js +36 -36
  28. package/dist/apis/WorkflowsApi.d.ts +85 -127
  29. package/dist/apis/WorkflowsApi.js +82 -192
  30. package/dist/apis/index.d.ts +0 -2
  31. package/dist/apis/index.js +0 -2
  32. package/dist/esm/apis/BrandKitApi.js +39 -39
  33. package/dist/esm/apis/CompositionsApi.js +333 -133
  34. package/dist/esm/apis/CreditsApi.js +2 -2
  35. package/dist/esm/apis/InvoicesApi.js +1 -1
  36. package/dist/esm/apis/ManagedUsersApi.js +106 -39
  37. package/dist/esm/apis/OperationsApi.js +6 -6
  38. package/dist/esm/apis/PartnersApi.js +12 -12
  39. package/dist/esm/apis/PublicEmbedApi.js +30 -30
  40. package/dist/esm/apis/TokensApi.js +2 -0
  41. package/dist/esm/apis/UploadsApi.js +60 -60
  42. package/dist/esm/apis/UsersApi.js +5 -5
  43. package/dist/esm/apis/WidgetsApi.js +37 -37
  44. package/dist/esm/apis/WorkflowsApi.js +82 -192
  45. package/dist/esm/apis/index.js +0 -2
  46. package/dist/esm/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +8 -8
  47. package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +8 -8
  48. package/dist/esm/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +8 -8
  49. package/dist/esm/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +8 -8
  50. package/dist/esm/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +8 -8
  51. package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
  52. package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
  53. package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
  54. package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
  55. package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
  56. package/dist/esm/models/GetOperationResponse.js +51 -0
  57. package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +12 -11
  58. package/dist/esm/models/GetOperationResponseDataMetadata.js +58 -0
  59. package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
  60. package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
  61. package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
  62. package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
  63. package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
  64. package/dist/esm/models/WidgetClarification.js +52 -0
  65. package/dist/esm/models/WidgetClarificationOption.js +51 -0
  66. package/dist/esm/models/WidgetClarificationQuestion.js +60 -0
  67. package/dist/esm/models/WidgetNextStep.js +67 -0
  68. package/dist/esm/models/WidgetPlan.js +61 -0
  69. package/dist/esm/models/WidgetPlanDecisions.js +68 -0
  70. package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
  71. package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
  72. package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
  73. package/dist/esm/models/WidgetPlanTask.js +80 -0
  74. package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
  75. package/dist/esm/models/WorkflowFailureReason.js +49 -0
  76. package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
  77. package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
  78. package/dist/esm/models/WorkflowStats.js +3 -0
  79. package/dist/esm/models/index.js +31 -19
  80. package/dist/esm/runtime.js +1 -1
  81. package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
  82. package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
  83. package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
  84. package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
  85. package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
  86. package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
  87. package/dist/models/AdapterConnectionResponse.d.ts +46 -0
  88. package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
  89. package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
  90. package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
  91. package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
  92. package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
  93. package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
  94. package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
  95. package/dist/models/DeleteUpload200Response.d.ts +46 -0
  96. package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
  97. package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
  98. package/dist/models/DeleteUpload200ResponseData.js +48 -0
  99. package/dist/models/DesignDefaultsResponse.d.ts +46 -0
  100. package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
  101. package/dist/models/GetOperationResponse.d.ts +46 -0
  102. package/dist/models/GetOperationResponse.js +58 -0
  103. package/dist/models/GetOperationResponseData.d.ts +86 -0
  104. package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
  105. package/dist/models/GetOperationResponseDataMetadata.d.ts +65 -0
  106. package/dist/models/GetOperationResponseDataMetadata.js +66 -0
  107. package/dist/models/ListUploads200Response.d.ts +46 -0
  108. package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
  109. package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
  110. package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
  111. package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
  112. package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
  113. package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
  114. package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
  115. package/dist/models/PublicWorkflowResponse.d.ts +46 -0
  116. package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
  117. package/dist/models/Upload.d.ts +1 -1
  118. package/dist/models/UploadLimits.d.ts +3 -3
  119. package/dist/models/WidgetClarification.d.ts +45 -0
  120. package/dist/models/WidgetClarification.js +59 -0
  121. package/dist/models/WidgetClarificationOption.d.ts +44 -0
  122. package/dist/models/WidgetClarificationOption.js +58 -0
  123. package/dist/models/WidgetClarificationQuestion.d.ts +57 -0
  124. package/dist/models/WidgetClarificationQuestion.js +67 -0
  125. package/dist/models/WidgetNextStep.d.ts +63 -0
  126. package/dist/models/WidgetNextStep.js +75 -0
  127. package/dist/models/WidgetPlan.d.ts +58 -0
  128. package/dist/models/WidgetPlan.js +68 -0
  129. package/dist/models/WidgetPlanDecisions.d.ts +71 -0
  130. package/dist/models/WidgetPlanDecisions.js +75 -0
  131. package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
  132. package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
  133. package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
  134. package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
  135. package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
  136. package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
  137. package/dist/models/WidgetPlanTask.d.ts +77 -0
  138. package/dist/models/WidgetPlanTask.js +88 -0
  139. package/dist/models/WorkflowDetailResponse.d.ts +46 -0
  140. package/dist/models/WorkflowDetailResponse.js +58 -0
  141. package/dist/models/WorkflowFailureReason.d.ts +31 -0
  142. package/dist/models/WorkflowFailureReason.js +57 -0
  143. package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
  144. package/dist/models/WorkflowFailureReasonCounter.js +59 -0
  145. package/dist/models/WorkflowResponse.d.ts +46 -0
  146. package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
  147. package/dist/models/WorkflowStats.d.ts +16 -1
  148. package/dist/models/WorkflowStats.js +3 -0
  149. package/dist/models/index.d.ts +31 -19
  150. package/dist/models/index.js +31 -19
  151. package/dist/runtime.d.ts +2 -2
  152. package/dist/runtime.js +1 -1
  153. package/package.json +1 -1
  154. package/dist/apis/PartnerApi.d.ts +0 -2707
  155. package/dist/apis/PartnerApi.js +0 -7073
  156. package/dist/apis/WorkspacesApi.d.ts +0 -352
  157. package/dist/apis/WorkspacesApi.js +0 -946
  158. package/dist/esm/apis/PartnerApi.js +0 -7036
  159. package/dist/esm/apis/WorkspacesApi.js +0 -909
  160. package/dist/esm/models/CreateCompositionFromWidget201Response.js +0 -51
  161. package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
  162. package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
  163. package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
  164. package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
  165. package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
  166. package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
  167. package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
  168. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
  169. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
  170. package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
  171. package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
  172. package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
  173. package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
  174. package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
  175. package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
  176. package/dist/models/OperationsIdGetResponse.d.ts +0 -46
  177. package/dist/models/OperationsIdGetResponseData.d.ts +0 -88
  178. package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
  179. package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
  180. package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
  181. package/dist/models/UploadsGet200Response.d.ts +0 -46
  182. package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
  183. package/dist/models/UploadsIdDelete200Response.js +0 -58
  184. package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
  185. package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { AddAiAnswersKnowledgeDocument201ResponseFromJSON, AddAiAnswersKnowledgeDocumentRequestToJSON, CheckCompositionAccessResponseFromJSON, CompositionDataSourceResponseFromJSON, CompositionEntriesDescriptionResponseFromJSON, CompositionEntriesReadingResponseFromJSON, CompositionResponseFromJSON, CreateCompositionContentItem201ResponseFromJSON, CreateCompositionContentItemRequestToJSON, CreateCompositionDatabaseRecord201ResponseFromJSON, CreateCompositionFromWidget201ResponseFromJSON, DeleteCompositionContentItemResponseFromJSON, DeleteCompositionDataSourceResponseFromJSON, DuplicateComposition202ResponseFromJSON, DuplicateCompositionRequestToJSON, GetAiAnswersKnowledge200ResponseFromJSON, GetAllCompositions200ResponseFromJSON, GetCompositionContentResponseFromJSON, GetCompositionContentSchemaResponseFromJSON, GetCompositionDataSourceResponseFromJSON, GetCompositionDatabaseRecords200ResponseFromJSON, GetCompositionDesignResponseFromJSON, GetCompositionDesignSchemaResponseFromJSON, GetCompositionEmbedSchemaResponseFromJSON, GetCompositionEmbedSettingsResponseFromJSON, GetCompositionPreviewResponseFromJSON, GetCompositionVersions200ResponseFromJSON, GetCompositionsBatchRequestToJSON, GetCompositionsBatchResponseFromJSON, NewCompositionToJSON, RemoveAiAnswersKnowledgeDocument200ResponseFromJSON, SetCompositionDataSourceRequestToJSON, SetDynamicContentRequestToJSON, SetDynamicContentResponseFromJSON, UpdateCompositionToJSON, UpdateCompositionStatusRequestToJSON, ValidateCompositionContentResponseFromJSON, } from '../models/index.js';
15
+ import { AddAiAnswersKnowledgeDocumentRequestToJSON, AiAnswersKnowledgeDocumentResponseFromJSON, CheckCompositionAccessResponseFromJSON, CompositionDataSourceResponseFromJSON, CompositionDatabaseRecordResponseFromJSON, CompositionEntriesDescriptionResponseFromJSON, CompositionEntriesReadingResponseFromJSON, CompositionEntryDeleteSuccessFromJSON, CompositionEntryItemsPageSuccessFromJSON, CompositionResponseFromJSON, ContentItemWriteResultResponseFromJSON, CreateCompositionContentItemRequestToJSON, DeleteCompositionContentItemResponseFromJSON, DeleteCompositionDataSourceResponseFromJSON, DuplicateComposition202ResponseFromJSON, DuplicateCompositionRequestToJSON, GetAiAnswersKnowledge200ResponseFromJSON, GetAllCompositions200ResponseFromJSON, GetCompositionContentResponseFromJSON, GetCompositionContentSchemaResponseFromJSON, GetCompositionDataSourceResponseFromJSON, GetCompositionDatabaseRecords200ResponseFromJSON, GetCompositionDesignResponseFromJSON, GetCompositionDesignSchemaResponseFromJSON, GetCompositionEmbedSchemaResponseFromJSON, GetCompositionEmbedSettingsResponseFromJSON, GetCompositionPreviewResponseFromJSON, GetCompositionVersions200ResponseFromJSON, GetCompositionsBatchRequestToJSON, GetCompositionsBatchResponseFromJSON, NewCompositionToJSON, RemoveAiAnswersKnowledgeDocument200ResponseFromJSON, SetCompositionDataSourceRequestToJSON, SetDynamicContentRequestToJSON, SetDynamicContentResponseFromJSON, UpdateCompositionToJSON, UpdateCompositionStatusRequestToJSON, ValidateCompositionContentResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -51,7 +51,7 @@ export class CompositionsApi extends runtime.BaseAPI {
51
51
  query: queryParameters,
52
52
  body: AddAiAnswersKnowledgeDocumentRequestToJSON(requestParameters['addAiAnswersKnowledgeDocumentRequest']),
53
53
  }, initOverrides);
54
- return new runtime.JSONApiResponse(response, (jsonValue) => AddAiAnswersKnowledgeDocument201ResponseFromJSON(jsonValue));
54
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiAnswersKnowledgeDocumentResponseFromJSON(jsonValue));
55
55
  }
56
56
  /**
57
57
  * 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\'.
@@ -115,7 +115,7 @@ export class CompositionsApi extends runtime.BaseAPI {
115
115
  query: queryParameters,
116
116
  body: formParams,
117
117
  }, initOverrides);
118
- return new runtime.JSONApiResponse(response, (jsonValue) => AddAiAnswersKnowledgeDocument201ResponseFromJSON(jsonValue));
118
+ return new runtime.JSONApiResponse(response, (jsonValue) => AiAnswersKnowledgeDocumentResponseFromJSON(jsonValue));
119
119
  }
120
120
  /**
121
121
  * 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\'.
@@ -158,6 +158,53 @@ export class CompositionsApi extends runtime.BaseAPI {
158
158
  const response = await this.checkCompositionAccessRaw(requestParameters, initOverrides);
159
159
  return await response.value();
160
160
  }
161
+ /**
162
+ * 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.
163
+ * Create Composition
164
+ */
165
+ async createCompositionRaw(requestParameters, initOverrides) {
166
+ if (requestParameters['idempotencyKey'] == null) {
167
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createComposition().');
168
+ }
169
+ if (requestParameters['newComposition'] == null) {
170
+ throw new runtime.RequiredError('newComposition', 'Required parameter "newComposition" was null or undefined when calling createComposition().');
171
+ }
172
+ const queryParameters = {};
173
+ const headerParameters = {};
174
+ headerParameters['Content-Type'] = 'application/json';
175
+ if (requestParameters['idempotencyKey'] != null) {
176
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
177
+ }
178
+ if (requestParameters['xManagedUserId'] != null) {
179
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
180
+ }
181
+ if (requestParameters['xManagedUserExternalId'] != null) {
182
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
183
+ }
184
+ if (this.configuration && this.configuration.accessToken) {
185
+ const token = this.configuration.accessToken;
186
+ const tokenString = await token("apiKeyAuth", []);
187
+ if (tokenString) {
188
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
189
+ }
190
+ }
191
+ const response = await this.request({
192
+ path: `/compositions`,
193
+ method: 'POST',
194
+ headers: headerParameters,
195
+ query: queryParameters,
196
+ body: NewCompositionToJSON(requestParameters['newComposition']),
197
+ }, initOverrides);
198
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
199
+ }
200
+ /**
201
+ * 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.
202
+ * Create Composition
203
+ */
204
+ async createComposition(requestParameters, initOverrides) {
205
+ const response = await this.createCompositionRaw(requestParameters, initOverrides);
206
+ return await response.value();
207
+ }
161
208
  /**
162
209
  * 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.
163
210
  * Add a content list item
@@ -204,7 +251,7 @@ export class CompositionsApi extends runtime.BaseAPI {
204
251
  query: queryParameters,
205
252
  body: CreateCompositionContentItemRequestToJSON(requestParameters['createCompositionContentItemRequest']),
206
253
  }, initOverrides);
207
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionContentItem201ResponseFromJSON(jsonValue));
254
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContentItemWriteResultResponseFromJSON(jsonValue));
208
255
  }
209
256
  /**
210
257
  * 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.
@@ -257,7 +304,7 @@ export class CompositionsApi extends runtime.BaseAPI {
257
304
  query: queryParameters,
258
305
  body: requestParameters['body'],
259
306
  }, initOverrides);
260
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
307
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDatabaseRecordResponseFromJSON(jsonValue));
261
308
  }
262
309
  /**
263
310
  * 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`.
@@ -268,22 +315,15 @@ export class CompositionsApi extends runtime.BaseAPI {
268
315
  return await response.value();
269
316
  }
270
317
  /**
271
- * 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.
272
- * Create Composition
318
+ * Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
319
+ * Delete Composition
273
320
  */
274
- async createCompositionRaw(requestParameters, initOverrides) {
275
- if (requestParameters['idempotencyKey'] == null) {
276
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createComposition().');
277
- }
278
- if (requestParameters['newComposition'] == null) {
279
- throw new runtime.RequiredError('newComposition', 'Required parameter "newComposition" was null or undefined when calling createComposition().');
321
+ async deleteCompositionRaw(requestParameters, initOverrides) {
322
+ if (requestParameters['id'] == null) {
323
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteComposition().');
280
324
  }
281
325
  const queryParameters = {};
282
326
  const headerParameters = {};
283
- headerParameters['Content-Type'] = 'application/json';
284
- if (requestParameters['idempotencyKey'] != null) {
285
- headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
286
- }
287
327
  if (requestParameters['xManagedUserId'] != null) {
288
328
  headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
289
329
  }
@@ -298,21 +338,19 @@ export class CompositionsApi extends runtime.BaseAPI {
298
338
  }
299
339
  }
300
340
  const response = await this.request({
301
- path: `/compositions`,
302
- method: 'POST',
341
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
342
+ method: 'DELETE',
303
343
  headers: headerParameters,
304
344
  query: queryParameters,
305
- body: NewCompositionToJSON(requestParameters['newComposition']),
306
345
  }, initOverrides);
307
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
346
+ return new runtime.VoidApiResponse(response);
308
347
  }
309
348
  /**
310
- * 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.
311
- * Create Composition
349
+ * Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
350
+ * Delete Composition
312
351
  */
313
- async createComposition(requestParameters, initOverrides) {
314
- const response = await this.createCompositionRaw(requestParameters, initOverrides);
315
- return await response.value();
352
+ async deleteComposition(requestParameters, initOverrides) {
353
+ await this.deleteCompositionRaw(requestParameters, initOverrides);
316
354
  }
317
355
  /**
318
356
  * Delete a content list item
@@ -446,7 +484,7 @@ export class CompositionsApi extends runtime.BaseAPI {
446
484
  headers: headerParameters,
447
485
  query: queryParameters,
448
486
  }, initOverrides);
449
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
487
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDatabaseRecordResponseFromJSON(jsonValue));
450
488
  }
451
489
  /**
452
490
  * 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`.
@@ -457,14 +495,26 @@ export class CompositionsApi extends runtime.BaseAPI {
457
495
  return await response.value();
458
496
  }
459
497
  /**
460
- * Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
461
- * Delete Composition
498
+ * Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
499
+ * Delete composition entry items by id or host context
462
500
  */
463
- async deleteCompositionRaw(requestParameters, initOverrides) {
501
+ async deleteCompositionEntryItemsRaw(requestParameters, initOverrides) {
464
502
  if (requestParameters['id'] == null) {
465
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteComposition().');
503
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionEntryItems().');
504
+ }
505
+ if (requestParameters['table'] == null) {
506
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling deleteCompositionEntryItems().');
466
507
  }
467
508
  const queryParameters = {};
509
+ if (requestParameters['ids'] != null) {
510
+ queryParameters['ids'] = requestParameters['ids'];
511
+ }
512
+ if (requestParameters['context'] != null) {
513
+ queryParameters['context'] = requestParameters['context'];
514
+ }
515
+ if (requestParameters['filter'] != null) {
516
+ queryParameters['filter'] = requestParameters['filter'];
517
+ }
468
518
  const headerParameters = {};
469
519
  if (requestParameters['xManagedUserId'] != null) {
470
520
  headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
@@ -480,19 +530,20 @@ export class CompositionsApi extends runtime.BaseAPI {
480
530
  }
481
531
  }
482
532
  const response = await this.request({
483
- path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
533
+ path: `/compositions/{id}/entries/{table}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
484
534
  method: 'DELETE',
485
535
  headers: headerParameters,
486
536
  query: queryParameters,
487
537
  }, initOverrides);
488
- return new runtime.VoidApiResponse(response);
538
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntryDeleteSuccessFromJSON(jsonValue));
489
539
  }
490
540
  /**
491
- * Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
492
- * Delete Composition
541
+ * Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
542
+ * Delete composition entry items by id or host context
493
543
  */
494
- async deleteComposition(requestParameters, initOverrides) {
495
- await this.deleteCompositionRaw(requestParameters, initOverrides);
544
+ async deleteCompositionEntryItems(requestParameters, initOverrides) {
545
+ const response = await this.deleteCompositionEntryItemsRaw(requestParameters, initOverrides);
546
+ return await response.value();
496
547
  }
497
548
  /**
498
549
  * 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.
@@ -580,6 +631,71 @@ export class CompositionsApi extends runtime.BaseAPI {
580
631
  const response = await this.duplicateCompositionRaw(requestParameters, initOverrides);
581
632
  return await response.value();
582
633
  }
634
+ /**
635
+ * 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.
636
+ * Export composition entry items
637
+ */
638
+ async exportCompositionEntryItemsRaw(requestParameters, initOverrides) {
639
+ if (requestParameters['id'] == null) {
640
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling exportCompositionEntryItems().');
641
+ }
642
+ if (requestParameters['table'] == null) {
643
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling exportCompositionEntryItems().');
644
+ }
645
+ const queryParameters = {};
646
+ if (requestParameters['format'] != null) {
647
+ queryParameters['format'] = requestParameters['format'];
648
+ }
649
+ if (requestParameters['order'] != null) {
650
+ queryParameters['order'] = requestParameters['order'];
651
+ }
652
+ if (requestParameters['since'] != null) {
653
+ queryParameters['since'] = requestParameters['since'].toISOString();
654
+ }
655
+ if (requestParameters['until'] != null) {
656
+ queryParameters['until'] = requestParameters['until'].toISOString();
657
+ }
658
+ if (requestParameters['context'] != null) {
659
+ queryParameters['context'] = requestParameters['context'];
660
+ }
661
+ if (requestParameters['filter'] != null) {
662
+ queryParameters['filter'] = requestParameters['filter'];
663
+ }
664
+ const headerParameters = {};
665
+ if (requestParameters['xManagedUserId'] != null) {
666
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
667
+ }
668
+ if (requestParameters['xManagedUserExternalId'] != null) {
669
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
670
+ }
671
+ if (this.configuration && this.configuration.accessToken) {
672
+ const token = this.configuration.accessToken;
673
+ const tokenString = await token("apiKeyAuth", []);
674
+ if (tokenString) {
675
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
676
+ }
677
+ }
678
+ const response = await this.request({
679
+ path: `/compositions/{id}/entries/{table}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
680
+ method: 'GET',
681
+ headers: headerParameters,
682
+ query: queryParameters,
683
+ }, initOverrides);
684
+ if (this.isJsonMime(response.headers.get('content-type'))) {
685
+ return new runtime.JSONApiResponse(response);
686
+ }
687
+ else {
688
+ return new runtime.TextApiResponse(response);
689
+ }
690
+ }
691
+ /**
692
+ * 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.
693
+ * Export composition entry items
694
+ */
695
+ async exportCompositionEntryItems(requestParameters, initOverrides) {
696
+ const response = await this.exportCompositionEntryItemsRaw(requestParameters, initOverrides);
697
+ return await response.value();
698
+ }
583
699
  /**
584
700
  * 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.
585
701
  * See the documents a widget\'s AI answers from
@@ -711,7 +827,7 @@ export class CompositionsApi extends runtime.BaseAPI {
711
827
  headers: headerParameters,
712
828
  query: queryParameters,
713
829
  }, initOverrides);
714
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
830
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
715
831
  }
716
832
  /**
717
833
  * 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.
@@ -722,12 +838,12 @@ export class CompositionsApi extends runtime.BaseAPI {
722
838
  return await response.value();
723
839
  }
724
840
  /**
725
- * Retrieves the content schema for a composition based on its widget type
726
- * Get Content Schema
841
+ * Retrieves the current content of a composition
842
+ * Get Current Content
727
843
  */
728
- async getCompositionContentSchemaRaw(requestParameters, initOverrides) {
844
+ async getCompositionContentRaw(requestParameters, initOverrides) {
729
845
  if (requestParameters['id'] == null) {
730
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContentSchema().');
846
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContent().');
731
847
  }
732
848
  const queryParameters = {};
733
849
  const headerParameters = {};
@@ -745,28 +861,28 @@ export class CompositionsApi extends runtime.BaseAPI {
745
861
  }
746
862
  }
747
863
  const response = await this.request({
748
- path: `/compositions/{id}/schema/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
864
+ path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
749
865
  method: 'GET',
750
866
  headers: headerParameters,
751
867
  query: queryParameters,
752
868
  }, initOverrides);
753
- return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentSchemaResponseFromJSON(jsonValue));
869
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentResponseFromJSON(jsonValue));
754
870
  }
755
871
  /**
756
- * Retrieves the content schema for a composition based on its widget type
757
- * Get Content Schema
872
+ * Retrieves the current content of a composition
873
+ * Get Current Content
758
874
  */
759
- async getCompositionContentSchema(requestParameters, initOverrides) {
760
- const response = await this.getCompositionContentSchemaRaw(requestParameters, initOverrides);
875
+ async getCompositionContent(requestParameters, initOverrides) {
876
+ const response = await this.getCompositionContentRaw(requestParameters, initOverrides);
761
877
  return await response.value();
762
878
  }
763
879
  /**
764
- * Retrieves the current content of a composition
765
- * Get Current Content
880
+ * Retrieves the content schema for a composition based on its widget type
881
+ * Get Content Schema
766
882
  */
767
- async getCompositionContentRaw(requestParameters, initOverrides) {
883
+ async getCompositionContentSchemaRaw(requestParameters, initOverrides) {
768
884
  if (requestParameters['id'] == null) {
769
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContent().');
885
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContentSchema().');
770
886
  }
771
887
  const queryParameters = {};
772
888
  const headerParameters = {};
@@ -784,19 +900,19 @@ export class CompositionsApi extends runtime.BaseAPI {
784
900
  }
785
901
  }
786
902
  const response = await this.request({
787
- path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
903
+ path: `/compositions/{id}/schema/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
788
904
  method: 'GET',
789
905
  headers: headerParameters,
790
906
  query: queryParameters,
791
907
  }, initOverrides);
792
- return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentResponseFromJSON(jsonValue));
908
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentSchemaResponseFromJSON(jsonValue));
793
909
  }
794
910
  /**
795
- * Retrieves the current content of a composition
796
- * Get Current Content
911
+ * Retrieves the content schema for a composition based on its widget type
912
+ * Get Content Schema
797
913
  */
798
- async getCompositionContent(requestParameters, initOverrides) {
799
- const response = await this.getCompositionContentRaw(requestParameters, initOverrides);
914
+ async getCompositionContentSchema(requestParameters, initOverrides) {
915
+ const response = await this.getCompositionContentSchemaRaw(requestParameters, initOverrides);
800
916
  return await response.value();
801
917
  }
802
918
  /**
@@ -873,7 +989,7 @@ export class CompositionsApi extends runtime.BaseAPI {
873
989
  headers: headerParameters,
874
990
  query: queryParameters,
875
991
  }, initOverrides);
876
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
992
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDatabaseRecordResponseFromJSON(jsonValue));
877
993
  }
878
994
  /**
879
995
  * 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`.
@@ -926,12 +1042,12 @@ export class CompositionsApi extends runtime.BaseAPI {
926
1042
  return await response.value();
927
1043
  }
928
1044
  /**
929
- * Retrieves the design schema for a composition based on its widget type
930
- * Get Design Schema
1045
+ * Retrieves only the design field from a composition.
1046
+ * Get Composition Design
931
1047
  */
932
- async getCompositionDesignSchemaRaw(requestParameters, initOverrides) {
1048
+ async getCompositionDesignRaw(requestParameters, initOverrides) {
933
1049
  if (requestParameters['id'] == null) {
934
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesignSchema().');
1050
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesign().');
935
1051
  }
936
1052
  const queryParameters = {};
937
1053
  const headerParameters = {};
@@ -949,28 +1065,28 @@ export class CompositionsApi extends runtime.BaseAPI {
949
1065
  }
950
1066
  }
951
1067
  const response = await this.request({
952
- path: `/compositions/{id}/schema/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1068
+ path: `/compositions/{id}/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
953
1069
  method: 'GET',
954
1070
  headers: headerParameters,
955
1071
  query: queryParameters,
956
1072
  }, initOverrides);
957
- return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignSchemaResponseFromJSON(jsonValue));
1073
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignResponseFromJSON(jsonValue));
958
1074
  }
959
1075
  /**
960
- * Retrieves the design schema for a composition based on its widget type
961
- * Get Design Schema
1076
+ * Retrieves only the design field from a composition.
1077
+ * Get Composition Design
962
1078
  */
963
- async getCompositionDesignSchema(requestParameters, initOverrides) {
964
- const response = await this.getCompositionDesignSchemaRaw(requestParameters, initOverrides);
1079
+ async getCompositionDesign(requestParameters, initOverrides) {
1080
+ const response = await this.getCompositionDesignRaw(requestParameters, initOverrides);
965
1081
  return await response.value();
966
1082
  }
967
1083
  /**
968
- * Retrieves only the design field from a composition.
969
- * Get Composition Design
1084
+ * Retrieves the design schema for a composition based on its widget type
1085
+ * Get Design Schema
970
1086
  */
971
- async getCompositionDesignRaw(requestParameters, initOverrides) {
1087
+ async getCompositionDesignSchemaRaw(requestParameters, initOverrides) {
972
1088
  if (requestParameters['id'] == null) {
973
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesign().');
1089
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesignSchema().');
974
1090
  }
975
1091
  const queryParameters = {};
976
1092
  const headerParameters = {};
@@ -988,19 +1104,19 @@ export class CompositionsApi extends runtime.BaseAPI {
988
1104
  }
989
1105
  }
990
1106
  const response = await this.request({
991
- path: `/compositions/{id}/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1107
+ path: `/compositions/{id}/schema/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
992
1108
  method: 'GET',
993
1109
  headers: headerParameters,
994
1110
  query: queryParameters,
995
1111
  }, initOverrides);
996
- return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignResponseFromJSON(jsonValue));
1112
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignSchemaResponseFromJSON(jsonValue));
997
1113
  }
998
1114
  /**
999
- * Retrieves only the design field from a composition.
1000
- * Get Composition Design
1115
+ * Retrieves the design schema for a composition based on its widget type
1116
+ * Get Design Schema
1001
1117
  */
1002
- async getCompositionDesign(requestParameters, initOverrides) {
1003
- const response = await this.getCompositionDesignRaw(requestParameters, initOverrides);
1118
+ async getCompositionDesignSchema(requestParameters, initOverrides) {
1119
+ const response = await this.getCompositionDesignSchemaRaw(requestParameters, initOverrides);
1004
1120
  return await response.value();
1005
1121
  }
1006
1122
  /**
@@ -1194,6 +1310,69 @@ export class CompositionsApi extends runtime.BaseAPI {
1194
1310
  const response = await this.getCompositionsBatchRaw(requestParameters, initOverrides);
1195
1311
  return await response.value();
1196
1312
  }
1313
+ /**
1314
+ * 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.
1315
+ * List composition entry items with paging and filters
1316
+ */
1317
+ async listCompositionEntryItemsRaw(requestParameters, initOverrides) {
1318
+ if (requestParameters['id'] == null) {
1319
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listCompositionEntryItems().');
1320
+ }
1321
+ if (requestParameters['table'] == null) {
1322
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling listCompositionEntryItems().');
1323
+ }
1324
+ const queryParameters = {};
1325
+ if (requestParameters['limit'] != null) {
1326
+ queryParameters['limit'] = requestParameters['limit'];
1327
+ }
1328
+ if (requestParameters['order'] != null) {
1329
+ queryParameters['order'] = requestParameters['order'];
1330
+ }
1331
+ if (requestParameters['since'] != null) {
1332
+ queryParameters['since'] = requestParameters['since'].toISOString();
1333
+ }
1334
+ if (requestParameters['until'] != null) {
1335
+ queryParameters['until'] = requestParameters['until'].toISOString();
1336
+ }
1337
+ if (requestParameters['cursor'] != null) {
1338
+ queryParameters['cursor'] = requestParameters['cursor'];
1339
+ }
1340
+ if (requestParameters['context'] != null) {
1341
+ queryParameters['context'] = requestParameters['context'];
1342
+ }
1343
+ if (requestParameters['filter'] != null) {
1344
+ queryParameters['filter'] = requestParameters['filter'];
1345
+ }
1346
+ const headerParameters = {};
1347
+ if (requestParameters['xManagedUserId'] != null) {
1348
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1349
+ }
1350
+ if (requestParameters['xManagedUserExternalId'] != null) {
1351
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1352
+ }
1353
+ if (this.configuration && this.configuration.accessToken) {
1354
+ const token = this.configuration.accessToken;
1355
+ const tokenString = await token("apiKeyAuth", []);
1356
+ if (tokenString) {
1357
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1358
+ }
1359
+ }
1360
+ const response = await this.request({
1361
+ path: `/compositions/{id}/entries/{table}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
1362
+ method: 'GET',
1363
+ headers: headerParameters,
1364
+ query: queryParameters,
1365
+ }, initOverrides);
1366
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntryItemsPageSuccessFromJSON(jsonValue));
1367
+ }
1368
+ /**
1369
+ * 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.
1370
+ * List composition entry items with paging and filters
1371
+ */
1372
+ async listCompositionEntryItems(requestParameters, initOverrides) {
1373
+ const response = await this.listCompositionEntryItemsRaw(requestParameters, initOverrides);
1374
+ return await response.value();
1375
+ }
1197
1376
  /**
1198
1377
  * Update a content list item
1199
1378
  */
@@ -1242,7 +1421,7 @@ export class CompositionsApi extends runtime.BaseAPI {
1242
1421
  query: queryParameters,
1243
1422
  body: requestParameters['requestBody'],
1244
1423
  }, initOverrides);
1245
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionContentItem201ResponseFromJSON(jsonValue));
1424
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContentItemWriteResultResponseFromJSON(jsonValue));
1246
1425
  }
1247
1426
  /**
1248
1427
  * Update a content list item
@@ -1463,28 +1642,25 @@ export class CompositionsApi extends runtime.BaseAPI {
1463
1642
  return await response.value();
1464
1643
  }
1465
1644
  /**
1466
- * 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`.
1467
- * Update Record In Composition Database
1645
+ * 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.
1646
+ * Update Composition
1468
1647
  */
1469
- async updateCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
1648
+ async updateCompositionRaw(requestParameters, initOverrides) {
1470
1649
  if (requestParameters['id'] == null) {
1471
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionDatabaseRecord().');
1472
- }
1473
- if (requestParameters['table'] == null) {
1474
- throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling updateCompositionDatabaseRecord().');
1475
- }
1476
- if (requestParameters['recordId'] == null) {
1477
- throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling updateCompositionDatabaseRecord().');
1650
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateComposition().');
1478
1651
  }
1479
1652
  if (requestParameters['idempotencyKey'] == null) {
1480
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionDatabaseRecord().');
1653
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateComposition().');
1481
1654
  }
1482
- if (requestParameters['body'] == null) {
1483
- throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling updateCompositionDatabaseRecord().');
1655
+ if (requestParameters['updateComposition'] == null) {
1656
+ throw new runtime.RequiredError('updateComposition', 'Required parameter "updateComposition" was null or undefined when calling updateComposition().');
1484
1657
  }
1485
1658
  const queryParameters = {};
1486
1659
  const headerParameters = {};
1487
1660
  headerParameters['Content-Type'] = 'application/json';
1661
+ if (requestParameters['ifMatch'] != null) {
1662
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
1663
+ }
1488
1664
  if (requestParameters['idempotencyKey'] != null) {
1489
1665
  headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1490
1666
  }
@@ -1502,35 +1678,41 @@ export class CompositionsApi extends runtime.BaseAPI {
1502
1678
  }
1503
1679
  }
1504
1680
  const response = await this.request({
1505
- path: `/compositions/{id}/database/{table}/{recordId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))).replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))),
1681
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1506
1682
  method: 'PUT',
1507
1683
  headers: headerParameters,
1508
1684
  query: queryParameters,
1509
- body: requestParameters['body'],
1685
+ body: UpdateCompositionToJSON(requestParameters['updateComposition']),
1510
1686
  }, initOverrides);
1511
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
1687
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
1512
1688
  }
1513
1689
  /**
1514
- * 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`.
1515
- * Update Record In Composition Database
1690
+ * 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.
1691
+ * Update Composition
1516
1692
  */
1517
- async updateCompositionDatabaseRecord(requestParameters, initOverrides) {
1518
- const response = await this.updateCompositionDatabaseRecordRaw(requestParameters, initOverrides);
1693
+ async updateComposition(requestParameters, initOverrides) {
1694
+ const response = await this.updateCompositionRaw(requestParameters, initOverrides);
1519
1695
  return await response.value();
1520
1696
  }
1521
1697
  /**
1522
- * Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
1523
- * Update Composition Status
1698
+ * 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`.
1699
+ * Update Record In Composition Database
1524
1700
  */
1525
- async updateCompositionStatusRaw(requestParameters, initOverrides) {
1701
+ async updateCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
1526
1702
  if (requestParameters['id'] == null) {
1527
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionStatus().');
1703
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionDatabaseRecord().');
1704
+ }
1705
+ if (requestParameters['table'] == null) {
1706
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling updateCompositionDatabaseRecord().');
1707
+ }
1708
+ if (requestParameters['recordId'] == null) {
1709
+ throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling updateCompositionDatabaseRecord().');
1528
1710
  }
1529
1711
  if (requestParameters['idempotencyKey'] == null) {
1530
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionStatus().');
1712
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionDatabaseRecord().');
1531
1713
  }
1532
- if (requestParameters['updateCompositionStatusRequest'] == null) {
1533
- throw new runtime.RequiredError('updateCompositionStatusRequest', 'Required parameter "updateCompositionStatusRequest" was null or undefined when calling updateCompositionStatus().');
1714
+ if (requestParameters['body'] == null) {
1715
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling updateCompositionDatabaseRecord().');
1534
1716
  }
1535
1717
  const queryParameters = {};
1536
1718
  const headerParameters = {};
@@ -1552,42 +1734,39 @@ export class CompositionsApi extends runtime.BaseAPI {
1552
1734
  }
1553
1735
  }
1554
1736
  const response = await this.request({
1555
- path: `/compositions/{id}/status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1737
+ path: `/compositions/{id}/database/{table}/{recordId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))).replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))),
1556
1738
  method: 'PUT',
1557
1739
  headers: headerParameters,
1558
1740
  query: queryParameters,
1559
- body: UpdateCompositionStatusRequestToJSON(requestParameters['updateCompositionStatusRequest']),
1741
+ body: requestParameters['body'],
1560
1742
  }, initOverrides);
1561
- return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
1743
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDatabaseRecordResponseFromJSON(jsonValue));
1562
1744
  }
1563
1745
  /**
1564
- * Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
1565
- * Update Composition Status
1746
+ * 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`.
1747
+ * Update Record In Composition Database
1566
1748
  */
1567
- async updateCompositionStatus(requestParameters, initOverrides) {
1568
- const response = await this.updateCompositionStatusRaw(requestParameters, initOverrides);
1749
+ async updateCompositionDatabaseRecord(requestParameters, initOverrides) {
1750
+ const response = await this.updateCompositionDatabaseRecordRaw(requestParameters, initOverrides);
1569
1751
  return await response.value();
1570
1752
  }
1571
1753
  /**
1572
- * 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.
1573
- * Update Composition
1754
+ * Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
1755
+ * Update Composition Status
1574
1756
  */
1575
- async updateCompositionRaw(requestParameters, initOverrides) {
1757
+ async updateCompositionStatusRaw(requestParameters, initOverrides) {
1576
1758
  if (requestParameters['id'] == null) {
1577
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateComposition().');
1759
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionStatus().');
1578
1760
  }
1579
1761
  if (requestParameters['idempotencyKey'] == null) {
1580
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateComposition().');
1762
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionStatus().');
1581
1763
  }
1582
- if (requestParameters['updateComposition'] == null) {
1583
- throw new runtime.RequiredError('updateComposition', 'Required parameter "updateComposition" was null or undefined when calling updateComposition().');
1764
+ if (requestParameters['updateCompositionStatusRequest'] == null) {
1765
+ throw new runtime.RequiredError('updateCompositionStatusRequest', 'Required parameter "updateCompositionStatusRequest" was null or undefined when calling updateCompositionStatus().');
1584
1766
  }
1585
1767
  const queryParameters = {};
1586
1768
  const headerParameters = {};
1587
1769
  headerParameters['Content-Type'] = 'application/json';
1588
- if (requestParameters['ifMatch'] != null) {
1589
- headerParameters['If-Match'] = String(requestParameters['ifMatch']);
1590
- }
1591
1770
  if (requestParameters['idempotencyKey'] != null) {
1592
1771
  headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1593
1772
  }
@@ -1605,20 +1784,20 @@ export class CompositionsApi extends runtime.BaseAPI {
1605
1784
  }
1606
1785
  }
1607
1786
  const response = await this.request({
1608
- path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1787
+ path: `/compositions/{id}/status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1609
1788
  method: 'PUT',
1610
1789
  headers: headerParameters,
1611
1790
  query: queryParameters,
1612
- body: UpdateCompositionToJSON(requestParameters['updateComposition']),
1791
+ body: UpdateCompositionStatusRequestToJSON(requestParameters['updateCompositionStatusRequest']),
1613
1792
  }, initOverrides);
1614
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
1793
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
1615
1794
  }
1616
1795
  /**
1617
- * 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.
1618
- * Update Composition
1796
+ * Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
1797
+ * Update Composition Status
1619
1798
  */
1620
- async updateComposition(requestParameters, initOverrides) {
1621
- const response = await this.updateCompositionRaw(requestParameters, initOverrides);
1799
+ async updateCompositionStatus(requestParameters, initOverrides) {
1800
+ const response = await this.updateCompositionStatusRaw(requestParameters, initOverrides);
1622
1801
  return await response.value();
1623
1802
  }
1624
1803
  /**
@@ -1675,15 +1854,36 @@ export class CompositionsApi extends runtime.BaseAPI {
1675
1854
  /**
1676
1855
  * @export
1677
1856
  */
1678
- export const GetAllCompositions0WorkspaceEnum = {
1857
+ export const ExportCompositionEntryItemsFormatEnum = {
1858
+ Csv: 'csv',
1859
+ Json: 'json'
1860
+ };
1861
+ /**
1862
+ * @export
1863
+ */
1864
+ export const ExportCompositionEntryItemsOrderEnum = {
1865
+ Asc: 'asc',
1866
+ Desc: 'desc'
1867
+ };
1868
+ /**
1869
+ * @export
1870
+ */
1871
+ export const GetAllCompositionsWorkspaceEnum = {
1679
1872
  True: 'true',
1680
1873
  False: 'false'
1681
1874
  };
1682
1875
  /**
1683
1876
  * @export
1684
1877
  */
1685
- export const GetAllCompositions0StatusEnum = {
1878
+ export const GetAllCompositionsStatusEnum = {
1686
1879
  Draft: 'draft',
1687
1880
  Published: 'published',
1688
1881
  Archived: 'archived'
1689
1882
  };
1883
+ /**
1884
+ * @export
1885
+ */
1886
+ export const ListCompositionEntryItemsOrderEnum = {
1887
+ Asc: 'asc',
1888
+ Desc: 'desc'
1889
+ };