@widgetic/api-sdk-ts 0.0.0-stage → 1.11.64

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 (855) hide show
  1. package/README.md +98 -2
  2. package/dist/apis/CanvasesApi.d.ts +92 -0
  3. package/dist/apis/CanvasesApi.js +253 -0
  4. package/dist/apis/CompositionsApi.d.ts +619 -0
  5. package/dist/apis/CompositionsApi.js +1659 -0
  6. package/dist/apis/CreditsApi.d.ts +47 -0
  7. package/dist/apis/CreditsApi.js +132 -0
  8. package/dist/apis/EntitlementsApi.d.ts +50 -0
  9. package/dist/apis/EntitlementsApi.js +141 -0
  10. package/dist/apis/InvoicesApi.d.ts +49 -0
  11. package/dist/apis/InvoicesApi.js +113 -0
  12. package/dist/apis/ManagedUsersApi.d.ts +253 -0
  13. package/dist/apis/ManagedUsersApi.js +695 -0
  14. package/dist/apis/OperationsApi.d.ts +31 -0
  15. package/dist/apis/OperationsApi.js +90 -0
  16. package/dist/apis/PartnerApi.d.ts +2114 -0
  17. package/dist/apis/PartnerApi.js +5475 -0
  18. package/dist/apis/PartnersApi.d.ts +542 -0
  19. package/dist/apis/PartnersApi.js +1450 -0
  20. package/dist/apis/PublicEmbedApi.d.ts +104 -0
  21. package/dist/apis/PublicEmbedApi.js +250 -0
  22. package/dist/apis/TokensApi.d.ts +26 -0
  23. package/dist/apis/TokensApi.js +88 -0
  24. package/dist/apis/UploadsApi.d.ts +116 -0
  25. package/dist/apis/UploadsApi.js +285 -0
  26. package/dist/apis/UsersApi.d.ts +190 -0
  27. package/dist/apis/UsersApi.js +514 -0
  28. package/dist/apis/WidgetsApi.d.ts +77 -0
  29. package/dist/apis/WidgetsApi.js +222 -0
  30. package/dist/apis/index.d.ts +14 -0
  31. package/dist/apis/index.js +32 -0
  32. package/dist/esm/apis/CanvasesApi.js +216 -0
  33. package/dist/esm/apis/CompositionsApi.js +1622 -0
  34. package/dist/esm/apis/CreditsApi.js +95 -0
  35. package/dist/esm/apis/EntitlementsApi.js +104 -0
  36. package/dist/esm/apis/InvoicesApi.js +76 -0
  37. package/dist/esm/apis/ManagedUsersApi.js +658 -0
  38. package/dist/esm/apis/OperationsApi.js +53 -0
  39. package/dist/esm/apis/PartnerApi.js +5438 -0
  40. package/dist/esm/apis/PartnersApi.js +1413 -0
  41. package/dist/esm/apis/PublicEmbedApi.js +213 -0
  42. package/dist/esm/apis/TokensApi.js +51 -0
  43. package/dist/esm/apis/UploadsApi.js +248 -0
  44. package/dist/esm/apis/UsersApi.js +477 -0
  45. package/dist/esm/apis/WidgetsApi.js +185 -0
  46. package/dist/esm/apis/index.js +16 -0
  47. package/dist/esm/index.js +5 -0
  48. package/dist/esm/models/AccountCreditBalance.js +49 -0
  49. package/dist/esm/models/AccountCreditBalanceResponse.js +51 -0
  50. package/dist/esm/models/AccountCreditTransaction.js +53 -0
  51. package/dist/esm/models/AdapterConnection.js +75 -0
  52. package/dist/esm/models/AdapterConnectionRemoval.js +43 -0
  53. package/dist/esm/models/AddAiAnswersKnowledgeDocument201Response.js +51 -0
  54. package/dist/esm/models/AddAiAnswersKnowledgeDocumentRequest.js +47 -0
  55. package/dist/esm/models/AddDomainRequest.js +43 -0
  56. package/dist/esm/models/AiAnswersKnowledge.js +49 -0
  57. package/dist/esm/models/AiAnswersKnowledgeDocument.js +74 -0
  58. package/dist/esm/models/AiAnswersKnowledgeRemoval.js +43 -0
  59. package/dist/esm/models/AiAnswersKnowledgeTotals.js +55 -0
  60. package/dist/esm/models/ApiKeyScope.js +74 -0
  61. package/dist/esm/models/Canvas.js +63 -0
  62. package/dist/esm/models/CanvasResponse.js +51 -0
  63. package/dist/esm/models/CheckCompositionAccessResponse.js +51 -0
  64. package/dist/esm/models/CheckCompositionAccessResponseData.js +43 -0
  65. package/dist/esm/models/Composition.js +93 -0
  66. package/dist/esm/models/CompositionDataSource.js +47 -0
  67. package/dist/esm/models/CompositionDataSourceResponse.js +51 -0
  68. package/dist/esm/models/CompositionEntriesDescription.js +52 -0
  69. package/dist/esm/models/CompositionEntriesDescriptionResponse.js +51 -0
  70. package/dist/esm/models/CompositionEntriesReading.js +75 -0
  71. package/dist/esm/models/CompositionEntriesReadingResponse.js +51 -0
  72. package/dist/esm/models/CompositionEntryAggregateTally.js +51 -0
  73. package/dist/esm/models/CompositionEntryAggregatesBlock.js +50 -0
  74. package/dist/esm/models/CompositionEntryColumn.js +47 -0
  75. package/dist/esm/models/CompositionEntryDeleteSuccess.js +48 -0
  76. package/dist/esm/models/CompositionEntryDeleteSuccessData.js +43 -0
  77. package/dist/esm/models/CompositionEntryItem.js +57 -0
  78. package/dist/esm/models/CompositionEntryItemsMeta.js +55 -0
  79. package/dist/esm/models/CompositionEntryItemsPageSuccess.js +53 -0
  80. package/dist/esm/models/CompositionEntryTable.js +52 -0
  81. package/dist/esm/models/CompositionEntryTally.js +47 -0
  82. package/dist/esm/models/CompositionResponse.js +51 -0
  83. package/dist/esm/models/CompositionVersion.js +49 -0
  84. package/dist/esm/models/ContentCheckFinding.js +51 -0
  85. package/dist/esm/models/ContentItemWriteResult.js +52 -0
  86. package/dist/esm/models/ContentItemWriteResultValidationResult.js +45 -0
  87. package/dist/esm/models/CopyPartnerPresetRequest.js +41 -0
  88. package/dist/esm/models/CreateCanvasRequest.js +53 -0
  89. package/dist/esm/models/CreateCompositionContentItem201Response.js +51 -0
  90. package/dist/esm/models/CreateCompositionContentItemRequest.js +43 -0
  91. package/dist/esm/models/CreateCompositionDatabaseRecord201Response.js +50 -0
  92. package/dist/esm/models/CreateCompositionFromPresetRequest.js +51 -0
  93. package/dist/esm/models/CreateCompositionFromWidget201Response.js +51 -0
  94. package/dist/esm/models/CreateCompositionFromWidgetRequest.js +53 -0
  95. package/dist/esm/models/CreateUserApiKeyRequest.js +58 -0
  96. package/dist/esm/models/CreateWidget201Response.js +51 -0
  97. package/dist/esm/models/CreateWidget201ResponseData.js +92 -0
  98. package/dist/esm/models/CreatedUserApiKey.js +83 -0
  99. package/dist/esm/models/CreatedUserApiKeyResponse.js +51 -0
  100. package/dist/esm/models/DeleteCompositionContentItemResponse.js +51 -0
  101. package/dist/esm/models/DeleteCompositionContentItemResponseData.js +43 -0
  102. package/dist/esm/models/DeleteCompositionDataSourceResponse.js +51 -0
  103. package/dist/esm/models/DeleteCompositionDataSourceResponseData.js +43 -0
  104. package/dist/esm/models/DeleteManagedUser200Response.js +51 -0
  105. package/dist/esm/models/DeletePersonalWorkspaceDomainResponse.js +51 -0
  106. package/dist/esm/models/DeletePersonalWorkspaceDomainResponseData.js +41 -0
  107. package/dist/esm/models/DeleteUserApiKeyResponse.js +51 -0
  108. package/dist/esm/models/DeleteUserApiKeyResponseData.js +41 -0
  109. package/dist/esm/models/DesignDefaults.js +43 -0
  110. package/dist/esm/models/DuplicateComposition202Response.js +51 -0
  111. package/dist/esm/models/DuplicateComposition202ResponseData.js +41 -0
  112. package/dist/esm/models/DuplicateCompositionRequest.js +43 -0
  113. package/dist/esm/models/EditorSession.js +79 -0
  114. package/dist/esm/models/EditorSessionResponse.js +51 -0
  115. package/dist/esm/models/Entitlement.js +71 -0
  116. package/dist/esm/models/ErrorDetail.js +63 -0
  117. package/dist/esm/models/ErrorResponse.js +54 -0
  118. package/dist/esm/models/ExportCompositionEntryItems200Response.js +53 -0
  119. package/dist/esm/models/ExportCompositionEntryItems200ResponseMeta.js +47 -0
  120. package/dist/esm/models/GetAiAnswersKnowledge200Response.js +51 -0
  121. package/dist/esm/models/GetAllCanvasesResponse.js +51 -0
  122. package/dist/esm/models/GetAllCanvasesResponseData.js +48 -0
  123. package/dist/esm/models/GetAllCompositions200Response.js +51 -0
  124. package/dist/esm/models/GetAllManagedUsers200Response.js +51 -0
  125. package/dist/esm/models/GetCompositionContentResponse.js +50 -0
  126. package/dist/esm/models/GetCompositionContentSchemaResponse.js +51 -0
  127. package/dist/esm/models/GetCompositionContentSchemaResponseData.js +51 -0
  128. package/dist/esm/models/GetCompositionDataSourceResponse.js +51 -0
  129. package/dist/esm/models/GetCompositionDatabaseRecords200Response.js +50 -0
  130. package/dist/esm/models/GetCompositionDesignResponse.js +50 -0
  131. package/dist/esm/models/GetCompositionDesignSchemaResponse.js +51 -0
  132. package/dist/esm/models/GetCompositionDesignSchemaResponseData.js +51 -0
  133. package/dist/esm/models/GetCompositionEmbedSchemaResponse.js +51 -0
  134. package/dist/esm/models/GetCompositionEmbedSchemaResponseData.js +57 -0
  135. package/dist/esm/models/GetCompositionEmbedSettingsResponse.js +50 -0
  136. package/dist/esm/models/GetCompositionPreviewResponse.js +51 -0
  137. package/dist/esm/models/GetCompositionPreviewResponseData.js +47 -0
  138. package/dist/esm/models/GetCompositionVersions200Response.js +51 -0
  139. package/dist/esm/models/GetCompositionsBatchRequest.js +43 -0
  140. package/dist/esm/models/GetCompositionsBatchResponse.js +51 -0
  141. package/dist/esm/models/GetCompositionsBatchResponseData.js +45 -0
  142. package/dist/esm/models/GetInvoicesByPartnerId200Response.js +51 -0
  143. package/dist/esm/models/GetManagedUserEntitlementsResponse.js +51 -0
  144. package/dist/esm/models/GetManagedUserEntitlementsResponseData.js +44 -0
  145. package/dist/esm/models/GetManagedUserLimits200Response.js +51 -0
  146. package/dist/esm/models/GetManagedUserStorageUsage200Response.js +51 -0
  147. package/dist/esm/models/GetManagedUserStorageUsage200ResponseData.js +52 -0
  148. package/dist/esm/models/GetManagedUserStorageUsage200ResponseDataByPurpose.js +48 -0
  149. package/dist/esm/models/GetManagedUsersByManagerIdResponse.js +51 -0
  150. package/dist/esm/models/GetManagedUsersByManagerIdResponseData.js +48 -0
  151. package/dist/esm/models/GetPartnerBillingOverview200Response.js +51 -0
  152. package/dist/esm/models/GetPartnerCreditTransactions200Response.js +51 -0
  153. package/dist/esm/models/GetPartnerDesignDefaults200Response.js +51 -0
  154. package/dist/esm/models/GetPartnerEntitlementsResponse.js +51 -0
  155. package/dist/esm/models/GetPartnerEntitlementsResponseData.js +44 -0
  156. package/dist/esm/models/GetPersonalWorkspaceDomains200Response.js +51 -0
  157. package/dist/esm/models/GetPublicCompositionEmbed200Response.js +71 -0
  158. package/dist/esm/models/GetPublicCompositionEmbed200ResponseDataSource.js +43 -0
  159. package/dist/esm/models/GetPublicCompositionEmbed200ResponseDirect.js +45 -0
  160. package/dist/esm/models/GetUserAdapterConnections200Response.js +51 -0
  161. package/dist/esm/models/GetUserApiKeyUsageLogsResponse.js +51 -0
  162. package/dist/esm/models/GetUserApiKeyUsageLogsResponseData.js +44 -0
  163. package/dist/esm/models/GetUserApiKeys200Response.js +51 -0
  164. package/dist/esm/models/GetWidgets200Response.js +51 -0
  165. package/dist/esm/models/GetWidgetsBatchRequest.js +43 -0
  166. package/dist/esm/models/GetWidgetsBatchResponse.js +51 -0
  167. package/dist/esm/models/GetWidgetsBatchResponseData.js +45 -0
  168. package/dist/esm/models/GetWidgetsBatchResponseDataErrorsInner.js +43 -0
  169. package/dist/esm/models/ListPartnerPresets200Response.js +51 -0
  170. package/dist/esm/models/ManagedUser.js +63 -0
  171. package/dist/esm/models/ManagedUserEntriesMeta.js +57 -0
  172. package/dist/esm/models/ManagedUserEntriesPageSuccess.js +53 -0
  173. package/dist/esm/models/ManagedUserEntryItem.js +65 -0
  174. package/dist/esm/models/ManagedUserLimits.js +55 -0
  175. package/dist/esm/models/ManagedUserOperationUsage.js +59 -0
  176. package/dist/esm/models/ManagedUserRemoval.js +47 -0
  177. package/dist/esm/models/ManagedUserResponse.js +51 -0
  178. package/dist/esm/models/ManagedUserUsage.js +65 -0
  179. package/dist/esm/models/ManagedUserUsageResponse.js +51 -0
  180. package/dist/esm/models/ManagedUserUsageTotals.js +55 -0
  181. package/dist/esm/models/MyPartner.js +79 -0
  182. package/dist/esm/models/MyPartners.js +62 -0
  183. package/dist/esm/models/MyPartnersResponse.js +51 -0
  184. package/dist/esm/models/NewComposition.js +65 -0
  185. package/dist/esm/models/NewEditorSession.js +57 -0
  186. package/dist/esm/models/NewManagedUser.js +47 -0
  187. package/dist/esm/models/NewWidget.js +74 -0
  188. package/dist/esm/models/OperationsIdGetResponse.js +51 -0
  189. package/dist/esm/models/OperationsIdGetResponseData.js +65 -0
  190. package/dist/esm/models/PartnerAnalyticsByManagedUser.js +58 -0
  191. package/dist/esm/models/PartnerAnalyticsByManagedUserResponse.js +51 -0
  192. package/dist/esm/models/PartnerAnalyticsOfDay.js +55 -0
  193. package/dist/esm/models/PartnerAnalyticsOfManagedUser.js +79 -0
  194. package/dist/esm/models/PartnerAnalyticsOfWidget.js +63 -0
  195. package/dist/esm/models/PartnerAnalyticsSummary.js +72 -0
  196. package/dist/esm/models/PartnerAnalyticsSummaryResponse.js +51 -0
  197. package/dist/esm/models/PartnerAnalyticsTimeline.js +57 -0
  198. package/dist/esm/models/PartnerAnalyticsTimelineResponse.js +51 -0
  199. package/dist/esm/models/PartnerAnalyticsTopWidgets.js +57 -0
  200. package/dist/esm/models/PartnerAnalyticsTopWidgetsResponse.js +51 -0
  201. package/dist/esm/models/PartnerBillingOverview.js +57 -0
  202. package/dist/esm/models/PartnerBillingOverviewBillingIntegration.js +63 -0
  203. package/dist/esm/models/PartnerBillingOverviewOperationalCredits.js +56 -0
  204. package/dist/esm/models/PartnerBillingOverviewPartner.js +62 -0
  205. package/dist/esm/models/PartnerContract.js +79 -0
  206. package/dist/esm/models/PartnerContractResponse.js +51 -0
  207. package/dist/esm/models/PartnerCustomization.js +81 -0
  208. package/dist/esm/models/PartnerDataDatabase.js +71 -0
  209. package/dist/esm/models/PartnerDataDatabaseRemoval.js +43 -0
  210. package/dist/esm/models/PartnerDataDatabaseRemovalResponse.js +51 -0
  211. package/dist/esm/models/PartnerDataDatabaseResponse.js +51 -0
  212. package/dist/esm/models/PartnerEntryContextSecret.js +48 -0
  213. package/dist/esm/models/PartnerEntryContextSecretResponse.js +51 -0
  214. package/dist/esm/models/PartnerEntryContextSigning.js +63 -0
  215. package/dist/esm/models/PartnerEntryContextSigningResponse.js +51 -0
  216. package/dist/esm/models/PartnerExtraCreditsInvoice.js +87 -0
  217. package/dist/esm/models/PartnerExtraCreditsInvoiceResponse.js +51 -0
  218. package/dist/esm/models/PartnerInvoice.js +101 -0
  219. package/dist/esm/models/PartnerNotification.js +77 -0
  220. package/dist/esm/models/PartnerNotificationDefaultRecipients.js +47 -0
  221. package/dist/esm/models/PartnerNotificationDelivery.js +115 -0
  222. package/dist/esm/models/PartnerNotificationDeliveryLog.js +44 -0
  223. package/dist/esm/models/PartnerNotificationDeliveryLogResponse.js +51 -0
  224. package/dist/esm/models/PartnerNotificationDeliveryResponse.js +51 -0
  225. package/dist/esm/models/PartnerNotificationEvent.js +81 -0
  226. package/dist/esm/models/PartnerNotificationEventType.js +57 -0
  227. package/dist/esm/models/PartnerNotificationPage.js +48 -0
  228. package/dist/esm/models/PartnerNotificationPageResponse.js +51 -0
  229. package/dist/esm/models/PartnerNotificationSettings.js +82 -0
  230. package/dist/esm/models/PartnerNotificationSettingsChange.js +48 -0
  231. package/dist/esm/models/PartnerNotificationSettingsChangeResponse.js +51 -0
  232. package/dist/esm/models/PartnerNotificationSettingsResponse.js +51 -0
  233. package/dist/esm/models/PartnerNotificationTestEventRequest.js +44 -0
  234. package/dist/esm/models/PartnerNotificationTestEventResult.js +53 -0
  235. package/dist/esm/models/PartnerNotificationTestEventResultResponse.js +51 -0
  236. package/dist/esm/models/PartnerPreset.js +75 -0
  237. package/dist/esm/models/PartnerPresetCopy.js +63 -0
  238. package/dist/esm/models/PartnerPresetCopyResponse.js +51 -0
  239. package/dist/esm/models/PartnerPresetRemoval.js +43 -0
  240. package/dist/esm/models/PartnerPresetRemovalResponse.js +51 -0
  241. package/dist/esm/models/PartnerPresetResponse.js +51 -0
  242. package/dist/esm/models/PartnerReportPage.js +51 -0
  243. package/dist/esm/models/PartnerReportPeriod.js +47 -0
  244. package/dist/esm/models/PartnerStorageDestination.js +83 -0
  245. package/dist/esm/models/PartnerStorageDestinationResponse.js +51 -0
  246. package/dist/esm/models/PartnerStorageRemoval.js +43 -0
  247. package/dist/esm/models/PartnerStorageRemovalResponse.js +51 -0
  248. package/dist/esm/models/PartnerStorageUsage.js +58 -0
  249. package/dist/esm/models/PartnerStorageUsageOfManagedUser.js +75 -0
  250. package/dist/esm/models/PartnerStorageUsageResponse.js +51 -0
  251. package/dist/esm/models/PartnerStorageUsageTotals.js +55 -0
  252. package/dist/esm/models/PersonalWorkspaceDomain.js +55 -0
  253. package/dist/esm/models/PersonalWorkspaceDomainResult.js +48 -0
  254. package/dist/esm/models/PersonalWorkspaceDomainResultResponse.js +51 -0
  255. package/dist/esm/models/PostPublicCompositionEmbedStatus200Response.js +51 -0
  256. package/dist/esm/models/PostPublicCompositionEmbedStatus200ResponseData.js +51 -0
  257. package/dist/esm/models/PostPublicCompositionEmbedStatusRequest.js +43 -0
  258. package/dist/esm/models/PublicAdapterCallError.js +53 -0
  259. package/dist/esm/models/PublicAdapterCallRequest.js +51 -0
  260. package/dist/esm/models/PublicAdapterCallResult.js +48 -0
  261. package/dist/esm/models/PublicAdapterCallResultData.js +43 -0
  262. package/dist/esm/models/PublicAdapterFileResult.js +48 -0
  263. package/dist/esm/models/PublicAdapterFileResultData.js +44 -0
  264. package/dist/esm/models/PublicAdapterFileResultDataFile.js +63 -0
  265. package/dist/esm/models/PublicCompositionEntryCreated.js +48 -0
  266. package/dist/esm/models/PublicCompositionEntryCreatedData.js +51 -0
  267. package/dist/esm/models/PublicCompositionEntryRequest.js +47 -0
  268. package/dist/esm/models/PublicEmbedFailure.js +61 -0
  269. package/dist/esm/models/PublicEmbedFailureDetails.js +52 -0
  270. package/dist/esm/models/PublicEmbedFailureError.js +57 -0
  271. package/dist/esm/models/PurposeStorageBucket.js +47 -0
  272. package/dist/esm/models/RemoveAiAnswersKnowledgeDocument200Response.js +51 -0
  273. package/dist/esm/models/RemoveUserAdapterConnection200Response.js +51 -0
  274. package/dist/esm/models/RequestExtraCredits.js +43 -0
  275. package/dist/esm/models/ResponseMeta.js +59 -0
  276. package/dist/esm/models/RevokeManagedUserEditorSessionsResponse.js +51 -0
  277. package/dist/esm/models/RevokeManagedUserEditorSessionsResponseData.js +41 -0
  278. package/dist/esm/models/SetAdapterConnectionRequest.js +43 -0
  279. package/dist/esm/models/SetCompositionDataSourceRequest.js +47 -0
  280. package/dist/esm/models/SetDynamicContentRequest.js +51 -0
  281. package/dist/esm/models/SetDynamicContentResponse.js +51 -0
  282. package/dist/esm/models/SetDynamicContentResponseData.js +50 -0
  283. package/dist/esm/models/SetDynamicContentResponseDataValidationResult.js +45 -0
  284. package/dist/esm/models/SetManagedUserLimitsRequest.js +43 -0
  285. package/dist/esm/models/SetPartnerDataDatabaseRequest.js +43 -0
  286. package/dist/esm/models/SetPartnerDesignDefaultsRequest.js +43 -0
  287. package/dist/esm/models/SetPartnerPresetRequest.js +49 -0
  288. package/dist/esm/models/SetPartnerStorageDestinationRequest.js +67 -0
  289. package/dist/esm/models/SetUserAdapterConnection200Response.js +51 -0
  290. package/dist/esm/models/SuccessResponse.js +50 -0
  291. package/dist/esm/models/UpdateCanvasRequest.js +45 -0
  292. package/dist/esm/models/UpdateComposition.js +55 -0
  293. package/dist/esm/models/UpdateCompositionStatusRequest.js +51 -0
  294. package/dist/esm/models/UpdateDomainRequest.js +43 -0
  295. package/dist/esm/models/UpdateManagedUser.js +45 -0
  296. package/dist/esm/models/UpdatePartnerEntryContextSigningRequest.js +43 -0
  297. package/dist/esm/models/UpdatePartnerNotificationSettingsRequest.js +48 -0
  298. package/dist/esm/models/UpdateUserApiKeyRequest.js +43 -0
  299. package/dist/esm/models/Upload.js +110 -0
  300. package/dist/esm/models/UploadLimits.js +51 -0
  301. package/dist/esm/models/UploadLimitsResponse.js +51 -0
  302. package/dist/esm/models/UploadResponse.js +51 -0
  303. package/dist/esm/models/UploadsGet200Response.js +51 -0
  304. package/dist/esm/models/UploadsIdDelete200Response.js +51 -0
  305. package/dist/esm/models/UploadsIdDelete200ResponseData.js +41 -0
  306. package/dist/esm/models/UserApiKey.js +81 -0
  307. package/dist/esm/models/UserApiKeyResponse.js +51 -0
  308. package/dist/esm/models/UserApiKeyUsageLog.js +67 -0
  309. package/dist/esm/models/ValidateCompositionContentResponse.js +51 -0
  310. package/dist/esm/models/ValidateCompositionContentResponseData.js +50 -0
  311. package/dist/esm/models/ValidateToken200Response.js +51 -0
  312. package/dist/esm/models/ValidateToken200ResponseData.js +57 -0
  313. package/dist/esm/models/Widget.js +90 -0
  314. package/dist/esm/models/index.js +268 -0
  315. package/dist/esm/package.json +3 -0
  316. package/dist/esm/runtime.js +516 -0
  317. package/dist/index.d.ts +3 -0
  318. package/dist/index.js +21 -0
  319. package/dist/models/AccountCreditBalance.d.ts +58 -0
  320. package/dist/models/AccountCreditBalance.js +56 -0
  321. package/dist/models/AccountCreditBalanceResponse.d.ts +46 -0
  322. package/dist/models/AccountCreditBalanceResponse.js +58 -0
  323. package/dist/models/AccountCreditTransaction.d.ts +69 -0
  324. package/dist/models/AccountCreditTransaction.js +60 -0
  325. package/dist/models/AdapterConnection.d.ts +77 -0
  326. package/dist/models/AdapterConnection.js +83 -0
  327. package/dist/models/AdapterConnectionRemoval.d.ts +32 -0
  328. package/dist/models/AdapterConnectionRemoval.js +50 -0
  329. package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +46 -0
  330. package/dist/models/AddAiAnswersKnowledgeDocument201Response.js +58 -0
  331. package/dist/models/AddAiAnswersKnowledgeDocumentRequest.d.ts +38 -0
  332. package/dist/models/AddAiAnswersKnowledgeDocumentRequest.js +54 -0
  333. package/dist/models/AddDomainRequest.d.ts +32 -0
  334. package/dist/models/AddDomainRequest.js +50 -0
  335. package/dist/models/AiAnswersKnowledge.d.ts +40 -0
  336. package/dist/models/AiAnswersKnowledge.js +56 -0
  337. package/dist/models/AiAnswersKnowledgeDocument.d.ts +76 -0
  338. package/dist/models/AiAnswersKnowledgeDocument.js +82 -0
  339. package/dist/models/AiAnswersKnowledgeRemoval.d.ts +32 -0
  340. package/dist/models/AiAnswersKnowledgeRemoval.js +50 -0
  341. package/dist/models/AiAnswersKnowledgeTotals.d.ts +50 -0
  342. package/dist/models/AiAnswersKnowledgeTotals.js +62 -0
  343. package/dist/models/ApiKeyScope.d.ts +56 -0
  344. package/dist/models/ApiKeyScope.js +82 -0
  345. package/dist/models/Canvas.d.ts +74 -0
  346. package/dist/models/Canvas.js +70 -0
  347. package/dist/models/CanvasResponse.d.ts +46 -0
  348. package/dist/models/CanvasResponse.js +58 -0
  349. package/dist/models/CheckCompositionAccessResponse.d.ts +46 -0
  350. package/dist/models/CheckCompositionAccessResponse.js +58 -0
  351. package/dist/models/CheckCompositionAccessResponseData.d.ts +38 -0
  352. package/dist/models/CheckCompositionAccessResponseData.js +50 -0
  353. package/dist/models/Composition.d.ts +131 -0
  354. package/dist/models/Composition.js +101 -0
  355. package/dist/models/CompositionDataSource.d.ts +41 -0
  356. package/dist/models/CompositionDataSource.js +54 -0
  357. package/dist/models/CompositionDataSourceResponse.d.ts +46 -0
  358. package/dist/models/CompositionDataSourceResponse.js +58 -0
  359. package/dist/models/CompositionEntriesDescription.d.ts +47 -0
  360. package/dist/models/CompositionEntriesDescription.js +59 -0
  361. package/dist/models/CompositionEntriesDescriptionResponse.d.ts +46 -0
  362. package/dist/models/CompositionEntriesDescriptionResponse.js +58 -0
  363. package/dist/models/CompositionEntriesReading.d.ts +99 -0
  364. package/dist/models/CompositionEntriesReading.js +82 -0
  365. package/dist/models/CompositionEntriesReadingResponse.d.ts +46 -0
  366. package/dist/models/CompositionEntriesReadingResponse.js +58 -0
  367. package/dist/models/CompositionEntryAggregateTally.d.ts +69 -0
  368. package/dist/models/CompositionEntryAggregateTally.js +58 -0
  369. package/dist/models/CompositionEntryAggregatesBlock.d.ts +55 -0
  370. package/dist/models/CompositionEntryAggregatesBlock.js +57 -0
  371. package/dist/models/CompositionEntryColumn.d.ts +38 -0
  372. package/dist/models/CompositionEntryColumn.js +54 -0
  373. package/dist/models/CompositionEntryDeleteSuccess.d.ts +39 -0
  374. package/dist/models/CompositionEntryDeleteSuccess.js +55 -0
  375. package/dist/models/CompositionEntryDeleteSuccessData.d.ts +32 -0
  376. package/dist/models/CompositionEntryDeleteSuccessData.js +50 -0
  377. package/dist/models/CompositionEntryItem.d.ts +63 -0
  378. package/dist/models/CompositionEntryItem.js +64 -0
  379. package/dist/models/CompositionEntryItemsMeta.d.ts +59 -0
  380. package/dist/models/CompositionEntryItemsMeta.js +63 -0
  381. package/dist/models/CompositionEntryItemsPageSuccess.d.ts +46 -0
  382. package/dist/models/CompositionEntryItemsPageSuccess.js +60 -0
  383. package/dist/models/CompositionEntryTable.d.ts +45 -0
  384. package/dist/models/CompositionEntryTable.js +59 -0
  385. package/dist/models/CompositionEntryTally.d.ts +40 -0
  386. package/dist/models/CompositionEntryTally.js +54 -0
  387. package/dist/models/CompositionResponse.d.ts +46 -0
  388. package/dist/models/CompositionResponse.js +58 -0
  389. package/dist/models/CompositionVersion.d.ts +56 -0
  390. package/dist/models/CompositionVersion.js +56 -0
  391. package/dist/models/ContentCheckFinding.d.ts +50 -0
  392. package/dist/models/ContentCheckFinding.js +58 -0
  393. package/dist/models/ContentItemWriteResult.d.ts +65 -0
  394. package/dist/models/ContentItemWriteResult.js +59 -0
  395. package/dist/models/ContentItemWriteResultValidationResult.d.ts +48 -0
  396. package/dist/models/ContentItemWriteResultValidationResult.js +52 -0
  397. package/dist/models/CopyPartnerPresetRequest.d.ts +32 -0
  398. package/dist/models/CopyPartnerPresetRequest.js +48 -0
  399. package/dist/models/CreateCanvasRequest.d.ts +62 -0
  400. package/dist/models/CreateCanvasRequest.js +60 -0
  401. package/dist/models/CreateCompositionContentItem201Response.d.ts +46 -0
  402. package/dist/models/CreateCompositionContentItem201Response.js +58 -0
  403. package/dist/models/CreateCompositionContentItemRequest.d.ts +33 -0
  404. package/dist/models/CreateCompositionContentItemRequest.js +50 -0
  405. package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +48 -0
  406. package/dist/models/CreateCompositionDatabaseRecord201Response.js +57 -0
  407. package/dist/models/CreateCompositionFromPresetRequest.d.ts +56 -0
  408. package/dist/models/CreateCompositionFromPresetRequest.js +58 -0
  409. package/dist/models/CreateCompositionFromWidget201Response.d.ts +46 -0
  410. package/dist/models/CreateCompositionFromWidget201Response.js +58 -0
  411. package/dist/models/CreateCompositionFromWidgetRequest.d.ts +62 -0
  412. package/dist/models/CreateCompositionFromWidgetRequest.js +60 -0
  413. package/dist/models/CreateUserApiKeyRequest.d.ts +60 -0
  414. package/dist/models/CreateUserApiKeyRequest.js +66 -0
  415. package/dist/models/CreateWidget201Response.d.ts +46 -0
  416. package/dist/models/CreateWidget201Response.js +58 -0
  417. package/dist/models/CreateWidget201ResponseData.d.ts +174 -0
  418. package/dist/models/CreateWidget201ResponseData.js +100 -0
  419. package/dist/models/CreatedUserApiKey.d.ts +91 -0
  420. package/dist/models/CreatedUserApiKey.js +91 -0
  421. package/dist/models/CreatedUserApiKeyResponse.d.ts +46 -0
  422. package/dist/models/CreatedUserApiKeyResponse.js +58 -0
  423. package/dist/models/DeleteCompositionContentItemResponse.d.ts +46 -0
  424. package/dist/models/DeleteCompositionContentItemResponse.js +58 -0
  425. package/dist/models/DeleteCompositionContentItemResponseData.d.ts +38 -0
  426. package/dist/models/DeleteCompositionContentItemResponseData.js +50 -0
  427. package/dist/models/DeleteCompositionDataSourceResponse.d.ts +46 -0
  428. package/dist/models/DeleteCompositionDataSourceResponse.js +58 -0
  429. package/dist/models/DeleteCompositionDataSourceResponseData.d.ts +32 -0
  430. package/dist/models/DeleteCompositionDataSourceResponseData.js +50 -0
  431. package/dist/models/DeleteManagedUser200Response.d.ts +46 -0
  432. package/dist/models/DeleteManagedUser200Response.js +58 -0
  433. package/dist/models/DeletePersonalWorkspaceDomainResponse.d.ts +46 -0
  434. package/dist/models/DeletePersonalWorkspaceDomainResponse.js +58 -0
  435. package/dist/models/DeletePersonalWorkspaceDomainResponseData.d.ts +32 -0
  436. package/dist/models/DeletePersonalWorkspaceDomainResponseData.js +48 -0
  437. package/dist/models/DeleteUserApiKeyResponse.d.ts +46 -0
  438. package/dist/models/DeleteUserApiKeyResponse.js +58 -0
  439. package/dist/models/DeleteUserApiKeyResponseData.d.ts +32 -0
  440. package/dist/models/DeleteUserApiKeyResponseData.js +48 -0
  441. package/dist/models/DesignDefaults.d.ts +34 -0
  442. package/dist/models/DesignDefaults.js +50 -0
  443. package/dist/models/DuplicateComposition202Response.d.ts +46 -0
  444. package/dist/models/DuplicateComposition202Response.js +58 -0
  445. package/dist/models/DuplicateComposition202ResponseData.d.ts +32 -0
  446. package/dist/models/DuplicateComposition202ResponseData.js +48 -0
  447. package/dist/models/DuplicateCompositionRequest.d.ts +41 -0
  448. package/dist/models/DuplicateCompositionRequest.js +50 -0
  449. package/dist/models/EditorSession.d.ts +91 -0
  450. package/dist/models/EditorSession.js +87 -0
  451. package/dist/models/EditorSessionResponse.d.ts +46 -0
  452. package/dist/models/EditorSessionResponse.js +58 -0
  453. package/dist/models/Entitlement.d.ts +103 -0
  454. package/dist/models/Entitlement.js +79 -0
  455. package/dist/models/ErrorDetail.d.ts +82 -0
  456. package/dist/models/ErrorDetail.js +70 -0
  457. package/dist/models/ErrorResponse.d.ts +46 -0
  458. package/dist/models/ErrorResponse.js +61 -0
  459. package/dist/models/ExportCompositionEntryItems200Response.d.ts +46 -0
  460. package/dist/models/ExportCompositionEntryItems200Response.js +60 -0
  461. package/dist/models/ExportCompositionEntryItems200ResponseMeta.d.ts +38 -0
  462. package/dist/models/ExportCompositionEntryItems200ResponseMeta.js +54 -0
  463. package/dist/models/GetAiAnswersKnowledge200Response.d.ts +46 -0
  464. package/dist/models/GetAiAnswersKnowledge200Response.js +58 -0
  465. package/dist/models/GetAllCanvasesResponse.d.ts +46 -0
  466. package/dist/models/GetAllCanvasesResponse.js +58 -0
  467. package/dist/models/GetAllCanvasesResponseData.d.ts +51 -0
  468. package/dist/models/GetAllCanvasesResponseData.js +55 -0
  469. package/dist/models/GetAllCompositions200Response.d.ts +46 -0
  470. package/dist/models/GetAllCompositions200Response.js +58 -0
  471. package/dist/models/GetAllManagedUsers200Response.d.ts +46 -0
  472. package/dist/models/GetAllManagedUsers200Response.js +58 -0
  473. package/dist/models/GetCompositionContentResponse.d.ts +45 -0
  474. package/dist/models/GetCompositionContentResponse.js +57 -0
  475. package/dist/models/GetCompositionContentSchemaResponse.d.ts +46 -0
  476. package/dist/models/GetCompositionContentSchemaResponse.js +58 -0
  477. package/dist/models/GetCompositionContentSchemaResponseData.d.ts +62 -0
  478. package/dist/models/GetCompositionContentSchemaResponseData.js +58 -0
  479. package/dist/models/GetCompositionDataSourceResponse.d.ts +46 -0
  480. package/dist/models/GetCompositionDataSourceResponse.js +58 -0
  481. package/dist/models/GetCompositionDatabaseRecords200Response.d.ts +47 -0
  482. package/dist/models/GetCompositionDatabaseRecords200Response.js +57 -0
  483. package/dist/models/GetCompositionDesignResponse.d.ts +45 -0
  484. package/dist/models/GetCompositionDesignResponse.js +57 -0
  485. package/dist/models/GetCompositionDesignSchemaResponse.d.ts +46 -0
  486. package/dist/models/GetCompositionDesignSchemaResponse.js +58 -0
  487. package/dist/models/GetCompositionDesignSchemaResponseData.d.ts +62 -0
  488. package/dist/models/GetCompositionDesignSchemaResponseData.js +58 -0
  489. package/dist/models/GetCompositionEmbedSchemaResponse.d.ts +46 -0
  490. package/dist/models/GetCompositionEmbedSchemaResponse.js +58 -0
  491. package/dist/models/GetCompositionEmbedSchemaResponseData.d.ts +74 -0
  492. package/dist/models/GetCompositionEmbedSchemaResponseData.js +65 -0
  493. package/dist/models/GetCompositionEmbedSettingsResponse.d.ts +45 -0
  494. package/dist/models/GetCompositionEmbedSettingsResponse.js +57 -0
  495. package/dist/models/GetCompositionPreviewResponse.d.ts +46 -0
  496. package/dist/models/GetCompositionPreviewResponse.js +58 -0
  497. package/dist/models/GetCompositionPreviewResponseData.d.ts +50 -0
  498. package/dist/models/GetCompositionPreviewResponseData.js +54 -0
  499. package/dist/models/GetCompositionVersions200Response.d.ts +46 -0
  500. package/dist/models/GetCompositionVersions200Response.js +58 -0
  501. package/dist/models/GetCompositionsBatchRequest.d.ts +32 -0
  502. package/dist/models/GetCompositionsBatchRequest.js +50 -0
  503. package/dist/models/GetCompositionsBatchResponse.d.ts +46 -0
  504. package/dist/models/GetCompositionsBatchResponse.js +58 -0
  505. package/dist/models/GetCompositionsBatchResponseData.d.ts +40 -0
  506. package/dist/models/GetCompositionsBatchResponseData.js +52 -0
  507. package/dist/models/GetInvoicesByPartnerId200Response.d.ts +46 -0
  508. package/dist/models/GetInvoicesByPartnerId200Response.js +58 -0
  509. package/dist/models/GetManagedUserEntitlementsResponse.d.ts +46 -0
  510. package/dist/models/GetManagedUserEntitlementsResponse.js +58 -0
  511. package/dist/models/GetManagedUserEntitlementsResponseData.d.ts +39 -0
  512. package/dist/models/GetManagedUserEntitlementsResponseData.js +51 -0
  513. package/dist/models/GetManagedUserLimits200Response.d.ts +46 -0
  514. package/dist/models/GetManagedUserLimits200Response.js +58 -0
  515. package/dist/models/GetManagedUserStorageUsage200Response.d.ts +46 -0
  516. package/dist/models/GetManagedUserStorageUsage200Response.js +58 -0
  517. package/dist/models/GetManagedUserStorageUsage200ResponseData.d.ts +45 -0
  518. package/dist/models/GetManagedUserStorageUsage200ResponseData.js +59 -0
  519. package/dist/models/GetManagedUserStorageUsage200ResponseDataByPurpose.d.ts +51 -0
  520. package/dist/models/GetManagedUserStorageUsage200ResponseDataByPurpose.js +55 -0
  521. package/dist/models/GetManagedUsersByManagerIdResponse.d.ts +46 -0
  522. package/dist/models/GetManagedUsersByManagerIdResponse.js +58 -0
  523. package/dist/models/GetManagedUsersByManagerIdResponseData.d.ts +51 -0
  524. package/dist/models/GetManagedUsersByManagerIdResponseData.js +55 -0
  525. package/dist/models/GetPartnerBillingOverview200Response.d.ts +46 -0
  526. package/dist/models/GetPartnerBillingOverview200Response.js +58 -0
  527. package/dist/models/GetPartnerCreditTransactions200Response.d.ts +46 -0
  528. package/dist/models/GetPartnerCreditTransactions200Response.js +58 -0
  529. package/dist/models/GetPartnerDesignDefaults200Response.d.ts +46 -0
  530. package/dist/models/GetPartnerDesignDefaults200Response.js +58 -0
  531. package/dist/models/GetPartnerEntitlementsResponse.d.ts +46 -0
  532. package/dist/models/GetPartnerEntitlementsResponse.js +58 -0
  533. package/dist/models/GetPartnerEntitlementsResponseData.d.ts +39 -0
  534. package/dist/models/GetPartnerEntitlementsResponseData.js +51 -0
  535. package/dist/models/GetPersonalWorkspaceDomains200Response.d.ts +46 -0
  536. package/dist/models/GetPersonalWorkspaceDomains200Response.js +58 -0
  537. package/dist/models/GetPublicCompositionEmbed200Response.d.ts +120 -0
  538. package/dist/models/GetPublicCompositionEmbed200Response.js +78 -0
  539. package/dist/models/GetPublicCompositionEmbed200ResponseDataSource.d.ts +38 -0
  540. package/dist/models/GetPublicCompositionEmbed200ResponseDataSource.js +50 -0
  541. package/dist/models/GetPublicCompositionEmbed200ResponseDirect.d.ts +44 -0
  542. package/dist/models/GetPublicCompositionEmbed200ResponseDirect.js +52 -0
  543. package/dist/models/GetUserAdapterConnections200Response.d.ts +46 -0
  544. package/dist/models/GetUserAdapterConnections200Response.js +58 -0
  545. package/dist/models/GetUserApiKeyUsageLogsResponse.d.ts +46 -0
  546. package/dist/models/GetUserApiKeyUsageLogsResponse.js +58 -0
  547. package/dist/models/GetUserApiKeyUsageLogsResponseData.d.ts +33 -0
  548. package/dist/models/GetUserApiKeyUsageLogsResponseData.js +51 -0
  549. package/dist/models/GetUserApiKeys200Response.d.ts +46 -0
  550. package/dist/models/GetUserApiKeys200Response.js +58 -0
  551. package/dist/models/GetWidgets200Response.d.ts +46 -0
  552. package/dist/models/GetWidgets200Response.js +58 -0
  553. package/dist/models/GetWidgetsBatchRequest.d.ts +32 -0
  554. package/dist/models/GetWidgetsBatchRequest.js +50 -0
  555. package/dist/models/GetWidgetsBatchResponse.d.ts +46 -0
  556. package/dist/models/GetWidgetsBatchResponse.js +58 -0
  557. package/dist/models/GetWidgetsBatchResponseData.d.ts +40 -0
  558. package/dist/models/GetWidgetsBatchResponseData.js +52 -0
  559. package/dist/models/GetWidgetsBatchResponseDataErrorsInner.d.ts +38 -0
  560. package/dist/models/GetWidgetsBatchResponseDataErrorsInner.js +50 -0
  561. package/dist/models/ListPartnerPresets200Response.d.ts +46 -0
  562. package/dist/models/ListPartnerPresets200Response.js +58 -0
  563. package/dist/models/ManagedUser.d.ts +70 -0
  564. package/dist/models/ManagedUser.js +70 -0
  565. package/dist/models/ManagedUserEntriesMeta.d.ts +56 -0
  566. package/dist/models/ManagedUserEntriesMeta.js +64 -0
  567. package/dist/models/ManagedUserEntriesPageSuccess.d.ts +46 -0
  568. package/dist/models/ManagedUserEntriesPageSuccess.js +60 -0
  569. package/dist/models/ManagedUserEntryItem.d.ts +75 -0
  570. package/dist/models/ManagedUserEntryItem.js +72 -0
  571. package/dist/models/ManagedUserLimits.d.ts +50 -0
  572. package/dist/models/ManagedUserLimits.js +62 -0
  573. package/dist/models/ManagedUserOperationUsage.d.ts +56 -0
  574. package/dist/models/ManagedUserOperationUsage.js +66 -0
  575. package/dist/models/ManagedUserRemoval.d.ts +38 -0
  576. package/dist/models/ManagedUserRemoval.js +54 -0
  577. package/dist/models/ManagedUserResponse.d.ts +46 -0
  578. package/dist/models/ManagedUserResponse.js +58 -0
  579. package/dist/models/ManagedUserUsage.d.ts +65 -0
  580. package/dist/models/ManagedUserUsage.js +72 -0
  581. package/dist/models/ManagedUserUsageResponse.d.ts +46 -0
  582. package/dist/models/ManagedUserUsageResponse.js +58 -0
  583. package/dist/models/ManagedUserUsageTotals.d.ts +50 -0
  584. package/dist/models/ManagedUserUsageTotals.js +62 -0
  585. package/dist/models/MyPartner.d.ts +93 -0
  586. package/dist/models/MyPartner.js +87 -0
  587. package/dist/models/MyPartners.d.ts +58 -0
  588. package/dist/models/MyPartners.js +70 -0
  589. package/dist/models/MyPartnersResponse.d.ts +46 -0
  590. package/dist/models/MyPartnersResponse.js +58 -0
  591. package/dist/models/NewComposition.d.ts +122 -0
  592. package/dist/models/NewComposition.js +72 -0
  593. package/dist/models/NewEditorSession.d.ts +62 -0
  594. package/dist/models/NewEditorSession.js +65 -0
  595. package/dist/models/NewManagedUser.d.ts +44 -0
  596. package/dist/models/NewManagedUser.js +54 -0
  597. package/dist/models/NewWidget.d.ts +106 -0
  598. package/dist/models/NewWidget.js +82 -0
  599. package/dist/models/OperationsIdGetResponse.d.ts +46 -0
  600. package/dist/models/OperationsIdGetResponse.js +58 -0
  601. package/dist/models/OperationsIdGetResponseData.d.ts +88 -0
  602. package/dist/models/OperationsIdGetResponseData.js +73 -0
  603. package/dist/models/PartnerAnalyticsByManagedUser.d.ts +54 -0
  604. package/dist/models/PartnerAnalyticsByManagedUser.js +65 -0
  605. package/dist/models/PartnerAnalyticsByManagedUserResponse.d.ts +46 -0
  606. package/dist/models/PartnerAnalyticsByManagedUserResponse.js +58 -0
  607. package/dist/models/PartnerAnalyticsOfDay.d.ts +50 -0
  608. package/dist/models/PartnerAnalyticsOfDay.js +62 -0
  609. package/dist/models/PartnerAnalyticsOfManagedUser.d.ts +86 -0
  610. package/dist/models/PartnerAnalyticsOfManagedUser.js +86 -0
  611. package/dist/models/PartnerAnalyticsOfWidget.d.ts +62 -0
  612. package/dist/models/PartnerAnalyticsOfWidget.js +70 -0
  613. package/dist/models/PartnerAnalyticsSummary.d.ts +76 -0
  614. package/dist/models/PartnerAnalyticsSummary.js +79 -0
  615. package/dist/models/PartnerAnalyticsSummaryResponse.d.ts +46 -0
  616. package/dist/models/PartnerAnalyticsSummaryResponse.js +58 -0
  617. package/dist/models/PartnerAnalyticsTimeline.d.ts +52 -0
  618. package/dist/models/PartnerAnalyticsTimeline.js +64 -0
  619. package/dist/models/PartnerAnalyticsTimelineResponse.d.ts +46 -0
  620. package/dist/models/PartnerAnalyticsTimelineResponse.js +58 -0
  621. package/dist/models/PartnerAnalyticsTopWidgets.d.ts +52 -0
  622. package/dist/models/PartnerAnalyticsTopWidgets.js +64 -0
  623. package/dist/models/PartnerAnalyticsTopWidgetsResponse.d.ts +46 -0
  624. package/dist/models/PartnerAnalyticsTopWidgetsResponse.js +58 -0
  625. package/dist/models/PartnerBillingOverview.d.ts +54 -0
  626. package/dist/models/PartnerBillingOverview.js +64 -0
  627. package/dist/models/PartnerBillingOverviewBillingIntegration.d.ts +59 -0
  628. package/dist/models/PartnerBillingOverviewBillingIntegration.js +71 -0
  629. package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +52 -0
  630. package/dist/models/PartnerBillingOverviewOperationalCredits.js +63 -0
  631. package/dist/models/PartnerBillingOverviewPartner.d.ts +58 -0
  632. package/dist/models/PartnerBillingOverviewPartner.js +70 -0
  633. package/dist/models/PartnerContract.d.ts +132 -0
  634. package/dist/models/PartnerContract.js +87 -0
  635. package/dist/models/PartnerContractResponse.d.ts +46 -0
  636. package/dist/models/PartnerContractResponse.js +58 -0
  637. package/dist/models/PartnerCustomization.d.ts +137 -0
  638. package/dist/models/PartnerCustomization.js +89 -0
  639. package/dist/models/PartnerDataDatabase.d.ts +74 -0
  640. package/dist/models/PartnerDataDatabase.js +78 -0
  641. package/dist/models/PartnerDataDatabaseRemoval.d.ts +32 -0
  642. package/dist/models/PartnerDataDatabaseRemoval.js +50 -0
  643. package/dist/models/PartnerDataDatabaseRemovalResponse.d.ts +46 -0
  644. package/dist/models/PartnerDataDatabaseRemovalResponse.js +58 -0
  645. package/dist/models/PartnerDataDatabaseResponse.d.ts +46 -0
  646. package/dist/models/PartnerDataDatabaseResponse.js +58 -0
  647. package/dist/models/PartnerEntryContextSecret.d.ts +39 -0
  648. package/dist/models/PartnerEntryContextSecret.js +55 -0
  649. package/dist/models/PartnerEntryContextSecretResponse.d.ts +46 -0
  650. package/dist/models/PartnerEntryContextSecretResponse.js +58 -0
  651. package/dist/models/PartnerEntryContextSigning.d.ts +62 -0
  652. package/dist/models/PartnerEntryContextSigning.js +70 -0
  653. package/dist/models/PartnerEntryContextSigningResponse.d.ts +46 -0
  654. package/dist/models/PartnerEntryContextSigningResponse.js +58 -0
  655. package/dist/models/PartnerExtraCreditsInvoice.d.ts +98 -0
  656. package/dist/models/PartnerExtraCreditsInvoice.js +94 -0
  657. package/dist/models/PartnerExtraCreditsInvoiceResponse.d.ts +46 -0
  658. package/dist/models/PartnerExtraCreditsInvoiceResponse.js +58 -0
  659. package/dist/models/PartnerInvoice.d.ts +189 -0
  660. package/dist/models/PartnerInvoice.js +109 -0
  661. package/dist/models/PartnerNotification.d.ts +81 -0
  662. package/dist/models/PartnerNotification.js +85 -0
  663. package/dist/models/PartnerNotificationDefaultRecipients.d.ts +38 -0
  664. package/dist/models/PartnerNotificationDefaultRecipients.js +54 -0
  665. package/dist/models/PartnerNotificationDelivery.d.ts +134 -0
  666. package/dist/models/PartnerNotificationDelivery.js +123 -0
  667. package/dist/models/PartnerNotificationDeliveryLog.d.ts +33 -0
  668. package/dist/models/PartnerNotificationDeliveryLog.js +51 -0
  669. package/dist/models/PartnerNotificationDeliveryLogResponse.d.ts +46 -0
  670. package/dist/models/PartnerNotificationDeliveryLogResponse.js +58 -0
  671. package/dist/models/PartnerNotificationDeliveryResponse.d.ts +46 -0
  672. package/dist/models/PartnerNotificationDeliveryResponse.js +58 -0
  673. package/dist/models/PartnerNotificationEvent.d.ts +82 -0
  674. package/dist/models/PartnerNotificationEvent.js +89 -0
  675. package/dist/models/PartnerNotificationEventType.d.ts +39 -0
  676. package/dist/models/PartnerNotificationEventType.js +65 -0
  677. package/dist/models/PartnerNotificationPage.d.ts +39 -0
  678. package/dist/models/PartnerNotificationPage.js +55 -0
  679. package/dist/models/PartnerNotificationPageResponse.d.ts +46 -0
  680. package/dist/models/PartnerNotificationPageResponse.js +58 -0
  681. package/dist/models/PartnerNotificationSettings.d.ts +89 -0
  682. package/dist/models/PartnerNotificationSettings.js +89 -0
  683. package/dist/models/PartnerNotificationSettingsChange.d.ts +39 -0
  684. package/dist/models/PartnerNotificationSettingsChange.js +55 -0
  685. package/dist/models/PartnerNotificationSettingsChangeResponse.d.ts +46 -0
  686. package/dist/models/PartnerNotificationSettingsChangeResponse.js +58 -0
  687. package/dist/models/PartnerNotificationSettingsResponse.d.ts +46 -0
  688. package/dist/models/PartnerNotificationSettingsResponse.js +58 -0
  689. package/dist/models/PartnerNotificationTestEventRequest.d.ts +33 -0
  690. package/dist/models/PartnerNotificationTestEventRequest.js +51 -0
  691. package/dist/models/PartnerNotificationTestEventResult.d.ts +50 -0
  692. package/dist/models/PartnerNotificationTestEventResult.js +60 -0
  693. package/dist/models/PartnerNotificationTestEventResultResponse.d.ts +46 -0
  694. package/dist/models/PartnerNotificationTestEventResultResponse.js +58 -0
  695. package/dist/models/PartnerPreset.d.ts +81 -0
  696. package/dist/models/PartnerPreset.js +82 -0
  697. package/dist/models/PartnerPresetCopy.d.ts +62 -0
  698. package/dist/models/PartnerPresetCopy.js +70 -0
  699. package/dist/models/PartnerPresetCopyResponse.d.ts +46 -0
  700. package/dist/models/PartnerPresetCopyResponse.js +58 -0
  701. package/dist/models/PartnerPresetRemoval.d.ts +32 -0
  702. package/dist/models/PartnerPresetRemoval.js +50 -0
  703. package/dist/models/PartnerPresetRemovalResponse.d.ts +46 -0
  704. package/dist/models/PartnerPresetRemovalResponse.js +58 -0
  705. package/dist/models/PartnerPresetResponse.d.ts +46 -0
  706. package/dist/models/PartnerPresetResponse.js +58 -0
  707. package/dist/models/PartnerReportPage.d.ts +44 -0
  708. package/dist/models/PartnerReportPage.js +58 -0
  709. package/dist/models/PartnerReportPeriod.d.ts +38 -0
  710. package/dist/models/PartnerReportPeriod.js +54 -0
  711. package/dist/models/PartnerStorageDestination.d.ts +99 -0
  712. package/dist/models/PartnerStorageDestination.js +90 -0
  713. package/dist/models/PartnerStorageDestinationResponse.d.ts +46 -0
  714. package/dist/models/PartnerStorageDestinationResponse.js +58 -0
  715. package/dist/models/PartnerStorageRemoval.d.ts +32 -0
  716. package/dist/models/PartnerStorageRemoval.js +50 -0
  717. package/dist/models/PartnerStorageRemovalResponse.d.ts +46 -0
  718. package/dist/models/PartnerStorageRemovalResponse.js +58 -0
  719. package/dist/models/PartnerStorageUsage.d.ts +54 -0
  720. package/dist/models/PartnerStorageUsage.js +65 -0
  721. package/dist/models/PartnerStorageUsageOfManagedUser.d.ts +81 -0
  722. package/dist/models/PartnerStorageUsageOfManagedUser.js +82 -0
  723. package/dist/models/PartnerStorageUsageResponse.d.ts +46 -0
  724. package/dist/models/PartnerStorageUsageResponse.js +58 -0
  725. package/dist/models/PartnerStorageUsageTotals.d.ts +50 -0
  726. package/dist/models/PartnerStorageUsageTotals.js +62 -0
  727. package/dist/models/PersonalWorkspaceDomain.d.ts +56 -0
  728. package/dist/models/PersonalWorkspaceDomain.js +62 -0
  729. package/dist/models/PersonalWorkspaceDomainResult.d.ts +39 -0
  730. package/dist/models/PersonalWorkspaceDomainResult.js +55 -0
  731. package/dist/models/PersonalWorkspaceDomainResultResponse.d.ts +46 -0
  732. package/dist/models/PersonalWorkspaceDomainResultResponse.js +58 -0
  733. package/dist/models/PostPublicCompositionEmbedStatus200Response.d.ts +46 -0
  734. package/dist/models/PostPublicCompositionEmbedStatus200Response.js +58 -0
  735. package/dist/models/PostPublicCompositionEmbedStatus200ResponseData.d.ts +45 -0
  736. package/dist/models/PostPublicCompositionEmbedStatus200ResponseData.js +59 -0
  737. package/dist/models/PostPublicCompositionEmbedStatusRequest.d.ts +32 -0
  738. package/dist/models/PostPublicCompositionEmbedStatusRequest.js +50 -0
  739. package/dist/models/PublicAdapterCallError.d.ts +50 -0
  740. package/dist/models/PublicAdapterCallError.js +60 -0
  741. package/dist/models/PublicAdapterCallRequest.d.ts +60 -0
  742. package/dist/models/PublicAdapterCallRequest.js +58 -0
  743. package/dist/models/PublicAdapterCallResult.d.ts +39 -0
  744. package/dist/models/PublicAdapterCallResult.js +55 -0
  745. package/dist/models/PublicAdapterCallResultData.d.ts +34 -0
  746. package/dist/models/PublicAdapterCallResultData.js +50 -0
  747. package/dist/models/PublicAdapterFileResult.d.ts +39 -0
  748. package/dist/models/PublicAdapterFileResult.js +55 -0
  749. package/dist/models/PublicAdapterFileResultData.d.ts +33 -0
  750. package/dist/models/PublicAdapterFileResultData.js +51 -0
  751. package/dist/models/PublicAdapterFileResultDataFile.d.ts +62 -0
  752. package/dist/models/PublicAdapterFileResultDataFile.js +70 -0
  753. package/dist/models/PublicCompositionEntryCreated.d.ts +39 -0
  754. package/dist/models/PublicCompositionEntryCreated.js +55 -0
  755. package/dist/models/PublicCompositionEntryCreatedData.d.ts +44 -0
  756. package/dist/models/PublicCompositionEntryCreatedData.js +58 -0
  757. package/dist/models/PublicCompositionEntryRequest.d.ts +46 -0
  758. package/dist/models/PublicCompositionEntryRequest.js +54 -0
  759. package/dist/models/PublicEmbedFailure.d.ts +64 -0
  760. package/dist/models/PublicEmbedFailure.js +68 -0
  761. package/dist/models/PublicEmbedFailureDetails.d.ts +47 -0
  762. package/dist/models/PublicEmbedFailureDetails.js +60 -0
  763. package/dist/models/PublicEmbedFailureError.d.ts +64 -0
  764. package/dist/models/PublicEmbedFailureError.js +64 -0
  765. package/dist/models/PurposeStorageBucket.d.ts +38 -0
  766. package/dist/models/PurposeStorageBucket.js +54 -0
  767. package/dist/models/RemoveAiAnswersKnowledgeDocument200Response.d.ts +46 -0
  768. package/dist/models/RemoveAiAnswersKnowledgeDocument200Response.js +58 -0
  769. package/dist/models/RemoveUserAdapterConnection200Response.d.ts +46 -0
  770. package/dist/models/RemoveUserAdapterConnection200Response.js +58 -0
  771. package/dist/models/RequestExtraCredits.d.ts +33 -0
  772. package/dist/models/RequestExtraCredits.js +50 -0
  773. package/dist/models/ResponseMeta.d.ts +81 -0
  774. package/dist/models/ResponseMeta.js +66 -0
  775. package/dist/models/RevokeManagedUserEditorSessionsResponse.d.ts +46 -0
  776. package/dist/models/RevokeManagedUserEditorSessionsResponse.js +58 -0
  777. package/dist/models/RevokeManagedUserEditorSessionsResponseData.d.ts +32 -0
  778. package/dist/models/RevokeManagedUserEditorSessionsResponseData.js +48 -0
  779. package/dist/models/SetAdapterConnectionRequest.d.ts +32 -0
  780. package/dist/models/SetAdapterConnectionRequest.js +50 -0
  781. package/dist/models/SetCompositionDataSourceRequest.d.ts +38 -0
  782. package/dist/models/SetCompositionDataSourceRequest.js +54 -0
  783. package/dist/models/SetDynamicContentRequest.d.ts +56 -0
  784. package/dist/models/SetDynamicContentRequest.js +58 -0
  785. package/dist/models/SetDynamicContentResponse.d.ts +46 -0
  786. package/dist/models/SetDynamicContentResponse.js +58 -0
  787. package/dist/models/SetDynamicContentResponseData.d.ts +57 -0
  788. package/dist/models/SetDynamicContentResponseData.js +57 -0
  789. package/dist/models/SetDynamicContentResponseDataValidationResult.d.ts +44 -0
  790. package/dist/models/SetDynamicContentResponseDataValidationResult.js +52 -0
  791. package/dist/models/SetManagedUserLimitsRequest.d.ts +32 -0
  792. package/dist/models/SetManagedUserLimitsRequest.js +50 -0
  793. package/dist/models/SetPartnerDataDatabaseRequest.d.ts +32 -0
  794. package/dist/models/SetPartnerDataDatabaseRequest.js +50 -0
  795. package/dist/models/SetPartnerDesignDefaultsRequest.d.ts +32 -0
  796. package/dist/models/SetPartnerDesignDefaultsRequest.js +50 -0
  797. package/dist/models/SetPartnerPresetRequest.d.ts +50 -0
  798. package/dist/models/SetPartnerPresetRequest.js +56 -0
  799. package/dist/models/SetPartnerStorageDestinationRequest.d.ts +79 -0
  800. package/dist/models/SetPartnerStorageDestinationRequest.js +74 -0
  801. package/dist/models/SetUserAdapterConnection200Response.d.ts +46 -0
  802. package/dist/models/SetUserAdapterConnection200Response.js +58 -0
  803. package/dist/models/SuccessResponse.d.ts +47 -0
  804. package/dist/models/SuccessResponse.js +57 -0
  805. package/dist/models/UpdateCanvasRequest.d.ts +44 -0
  806. package/dist/models/UpdateCanvasRequest.js +52 -0
  807. package/dist/models/UpdateComposition.d.ts +80 -0
  808. package/dist/models/UpdateComposition.js +62 -0
  809. package/dist/models/UpdateCompositionStatusRequest.d.ts +41 -0
  810. package/dist/models/UpdateCompositionStatusRequest.js +59 -0
  811. package/dist/models/UpdateDomainRequest.d.ts +32 -0
  812. package/dist/models/UpdateDomainRequest.js +50 -0
  813. package/dist/models/UpdateManagedUser.d.ts +45 -0
  814. package/dist/models/UpdateManagedUser.js +52 -0
  815. package/dist/models/UpdatePartnerEntryContextSigningRequest.d.ts +32 -0
  816. package/dist/models/UpdatePartnerEntryContextSigningRequest.js +50 -0
  817. package/dist/models/UpdatePartnerNotificationSettingsRequest.d.ts +51 -0
  818. package/dist/models/UpdatePartnerNotificationSettingsRequest.js +55 -0
  819. package/dist/models/UpdateUserApiKeyRequest.d.ts +38 -0
  820. package/dist/models/UpdateUserApiKeyRequest.js +50 -0
  821. package/dist/models/Upload.d.ts +140 -0
  822. package/dist/models/Upload.js +118 -0
  823. package/dist/models/UploadLimits.d.ts +62 -0
  824. package/dist/models/UploadLimits.js +58 -0
  825. package/dist/models/UploadLimitsResponse.d.ts +46 -0
  826. package/dist/models/UploadLimitsResponse.js +58 -0
  827. package/dist/models/UploadResponse.d.ts +46 -0
  828. package/dist/models/UploadResponse.js +58 -0
  829. package/dist/models/UploadsGet200Response.d.ts +46 -0
  830. package/dist/models/UploadsGet200Response.js +58 -0
  831. package/dist/models/UploadsIdDelete200Response.d.ts +46 -0
  832. package/dist/models/UploadsIdDelete200Response.js +58 -0
  833. package/dist/models/UploadsIdDelete200ResponseData.d.ts +32 -0
  834. package/dist/models/UploadsIdDelete200ResponseData.js +48 -0
  835. package/dist/models/UserApiKey.d.ts +91 -0
  836. package/dist/models/UserApiKey.js +89 -0
  837. package/dist/models/UserApiKeyResponse.d.ts +46 -0
  838. package/dist/models/UserApiKeyResponse.js +58 -0
  839. package/dist/models/UserApiKeyUsageLog.d.ts +76 -0
  840. package/dist/models/UserApiKeyUsageLog.js +74 -0
  841. package/dist/models/ValidateCompositionContentResponse.d.ts +46 -0
  842. package/dist/models/ValidateCompositionContentResponse.js +58 -0
  843. package/dist/models/ValidateCompositionContentResponseData.d.ts +53 -0
  844. package/dist/models/ValidateCompositionContentResponseData.js +57 -0
  845. package/dist/models/ValidateToken200Response.d.ts +46 -0
  846. package/dist/models/ValidateToken200Response.js +58 -0
  847. package/dist/models/ValidateToken200ResponseData.d.ts +65 -0
  848. package/dist/models/ValidateToken200ResponseData.js +65 -0
  849. package/dist/models/Widget.d.ts +168 -0
  850. package/dist/models/Widget.js +98 -0
  851. package/dist/models/index.d.ts +266 -0
  852. package/dist/models/index.js +284 -0
  853. package/dist/runtime.d.ts +238 -0
  854. package/dist/runtime.js +534 -0
  855. package/package.json +42 -4
@@ -0,0 +1,1622 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Widgetic API Gateway
5
+ * API documentation for the Widgetic API Gateway
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
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';
16
+ /**
17
+ *
18
+ */
19
+ export class CompositionsApi extends runtime.BaseAPI {
20
+ /**
21
+ * 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). Text only: convert PDF or Word files to text first. 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.
22
+ * Add a document for a widget\'s AI to answer from
23
+ */
24
+ async addAiAnswersKnowledgeDocumentRaw(requestParameters, initOverrides) {
25
+ if (requestParameters['id'] == null) {
26
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addAiAnswersKnowledgeDocument().');
27
+ }
28
+ if (requestParameters['addAiAnswersKnowledgeDocumentRequest'] == null) {
29
+ throw new runtime.RequiredError('addAiAnswersKnowledgeDocumentRequest', 'Required parameter "addAiAnswersKnowledgeDocumentRequest" was null or undefined when calling addAiAnswersKnowledgeDocument().');
30
+ }
31
+ const queryParameters = {};
32
+ const headerParameters = {};
33
+ headerParameters['Content-Type'] = 'application/json';
34
+ if (requestParameters['xManagedUserId'] != null) {
35
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
36
+ }
37
+ if (requestParameters['xManagedUserExternalId'] != null) {
38
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
39
+ }
40
+ if (this.configuration && this.configuration.accessToken) {
41
+ const token = this.configuration.accessToken;
42
+ const tokenString = await token("apiKeyAuth", []);
43
+ if (tokenString) {
44
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
45
+ }
46
+ }
47
+ const response = await this.request({
48
+ path: `/compositions/{id}/adapters/ai-answers/knowledge/documents`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
49
+ method: 'POST',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ body: AddAiAnswersKnowledgeDocumentRequestToJSON(requestParameters['addAiAnswersKnowledgeDocumentRequest']),
53
+ }, initOverrides);
54
+ return new runtime.JSONApiResponse(response, (jsonValue) => AddAiAnswersKnowledgeDocument201ResponseFromJSON(jsonValue));
55
+ }
56
+ /**
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). Text only: convert PDF or Word files to text first. 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.
58
+ * Add a document for a widget\'s AI to answer from
59
+ */
60
+ async addAiAnswersKnowledgeDocument(requestParameters, initOverrides) {
61
+ const response = await this.addAiAnswersKnowledgeDocumentRaw(requestParameters, initOverrides);
62
+ return await response.value();
63
+ }
64
+ /**
65
+ * Checks if the authenticated user can access a specific composition based on workspace context and permissions.
66
+ * Check Composition Access
67
+ */
68
+ async checkCompositionAccessRaw(requestParameters, initOverrides) {
69
+ if (requestParameters['id'] == null) {
70
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling checkCompositionAccess().');
71
+ }
72
+ const queryParameters = {};
73
+ const headerParameters = {};
74
+ if (this.configuration && this.configuration.accessToken) {
75
+ const token = this.configuration.accessToken;
76
+ const tokenString = await token("apiKeyAuth", []);
77
+ if (tokenString) {
78
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
79
+ }
80
+ }
81
+ const response = await this.request({
82
+ path: `/compositions/{id}/access`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
83
+ method: 'GET',
84
+ headers: headerParameters,
85
+ query: queryParameters,
86
+ }, initOverrides);
87
+ return new runtime.JSONApiResponse(response, (jsonValue) => CheckCompositionAccessResponseFromJSON(jsonValue));
88
+ }
89
+ /**
90
+ * Checks if the authenticated user can access a specific composition based on workspace context and permissions.
91
+ * Check Composition Access
92
+ */
93
+ async checkCompositionAccess(requestParameters, initOverrides) {
94
+ const response = await this.checkCompositionAccessRaw(requestParameters, initOverrides);
95
+ return await response.value();
96
+ }
97
+ /**
98
+ * 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.
99
+ * Add a content list item
100
+ */
101
+ async createCompositionContentItemRaw(requestParameters, initOverrides) {
102
+ if (requestParameters['id'] == null) {
103
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createCompositionContentItem().');
104
+ }
105
+ if (requestParameters['list'] == null) {
106
+ throw new runtime.RequiredError('list', 'Required parameter "list" was null or undefined when calling createCompositionContentItem().');
107
+ }
108
+ if (requestParameters['idempotencyKey'] == null) {
109
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createCompositionContentItem().');
110
+ }
111
+ if (requestParameters['createCompositionContentItemRequest'] == null) {
112
+ throw new runtime.RequiredError('createCompositionContentItemRequest', 'Required parameter "createCompositionContentItemRequest" was null or undefined when calling createCompositionContentItem().');
113
+ }
114
+ const queryParameters = {};
115
+ const headerParameters = {};
116
+ headerParameters['Content-Type'] = 'application/json';
117
+ if (requestParameters['ifMatch'] != null) {
118
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
119
+ }
120
+ if (requestParameters['idempotencyKey'] != null) {
121
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
122
+ }
123
+ if (requestParameters['xManagedUserId'] != null) {
124
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
125
+ }
126
+ if (requestParameters['xManagedUserExternalId'] != null) {
127
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
128
+ }
129
+ if (this.configuration && this.configuration.accessToken) {
130
+ const token = this.configuration.accessToken;
131
+ const tokenString = await token("apiKeyAuth", []);
132
+ if (tokenString) {
133
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
134
+ }
135
+ }
136
+ const response = await this.request({
137
+ path: `/compositions/{id}/content/{list}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"list"}}`, encodeURIComponent(String(requestParameters['list']))),
138
+ method: 'POST',
139
+ headers: headerParameters,
140
+ query: queryParameters,
141
+ body: CreateCompositionContentItemRequestToJSON(requestParameters['createCompositionContentItemRequest']),
142
+ }, initOverrides);
143
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionContentItem201ResponseFromJSON(jsonValue));
144
+ }
145
+ /**
146
+ * 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.
147
+ * Add a content list item
148
+ */
149
+ async createCompositionContentItem(requestParameters, initOverrides) {
150
+ const response = await this.createCompositionContentItemRaw(requestParameters, initOverrides);
151
+ return await response.value();
152
+ }
153
+ /**
154
+ * 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`.
155
+ * Create Record In Composition Database
156
+ */
157
+ async createCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
158
+ if (requestParameters['id'] == null) {
159
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createCompositionDatabaseRecord().');
160
+ }
161
+ if (requestParameters['table'] == null) {
162
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling createCompositionDatabaseRecord().');
163
+ }
164
+ if (requestParameters['idempotencyKey'] == null) {
165
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createCompositionDatabaseRecord().');
166
+ }
167
+ if (requestParameters['body'] == null) {
168
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling createCompositionDatabaseRecord().');
169
+ }
170
+ const queryParameters = {};
171
+ const headerParameters = {};
172
+ headerParameters['Content-Type'] = 'application/json';
173
+ if (requestParameters['idempotencyKey'] != null) {
174
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
175
+ }
176
+ if (requestParameters['xManagedUserId'] != null) {
177
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
178
+ }
179
+ if (requestParameters['xManagedUserExternalId'] != null) {
180
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
181
+ }
182
+ if (this.configuration && this.configuration.accessToken) {
183
+ const token = this.configuration.accessToken;
184
+ const tokenString = await token("apiKeyAuth", []);
185
+ if (tokenString) {
186
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
187
+ }
188
+ }
189
+ const response = await this.request({
190
+ path: `/compositions/{id}/database/{table}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
191
+ method: 'POST',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ body: requestParameters['body'],
195
+ }, initOverrides);
196
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
197
+ }
198
+ /**
199
+ * 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`.
200
+ * Create Record In Composition Database
201
+ */
202
+ async createCompositionDatabaseRecord(requestParameters, initOverrides) {
203
+ const response = await this.createCompositionDatabaseRecordRaw(requestParameters, initOverrides);
204
+ return await response.value();
205
+ }
206
+ /**
207
+ * 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.
208
+ * Create Composition
209
+ */
210
+ async createCompositionRaw(requestParameters, initOverrides) {
211
+ if (requestParameters['idempotencyKey'] == null) {
212
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createComposition().');
213
+ }
214
+ if (requestParameters['newComposition'] == null) {
215
+ throw new runtime.RequiredError('newComposition', 'Required parameter "newComposition" was null or undefined when calling createComposition().');
216
+ }
217
+ const queryParameters = {};
218
+ const headerParameters = {};
219
+ headerParameters['Content-Type'] = 'application/json';
220
+ if (requestParameters['idempotencyKey'] != null) {
221
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
222
+ }
223
+ if (requestParameters['xManagedUserId'] != null) {
224
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
225
+ }
226
+ if (requestParameters['xManagedUserExternalId'] != null) {
227
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
228
+ }
229
+ if (this.configuration && this.configuration.accessToken) {
230
+ const token = this.configuration.accessToken;
231
+ const tokenString = await token("apiKeyAuth", []);
232
+ if (tokenString) {
233
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
234
+ }
235
+ }
236
+ const response = await this.request({
237
+ path: `/compositions`,
238
+ method: 'POST',
239
+ headers: headerParameters,
240
+ query: queryParameters,
241
+ body: NewCompositionToJSON(requestParameters['newComposition']),
242
+ }, initOverrides);
243
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
244
+ }
245
+ /**
246
+ * 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.
247
+ * Create Composition
248
+ */
249
+ async createComposition(requestParameters, initOverrides) {
250
+ const response = await this.createCompositionRaw(requestParameters, initOverrides);
251
+ return await response.value();
252
+ }
253
+ /**
254
+ * Delete a content list item
255
+ */
256
+ async deleteCompositionContentItemRaw(requestParameters, initOverrides) {
257
+ if (requestParameters['id'] == null) {
258
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionContentItem().');
259
+ }
260
+ if (requestParameters['list'] == null) {
261
+ throw new runtime.RequiredError('list', 'Required parameter "list" was null or undefined when calling deleteCompositionContentItem().');
262
+ }
263
+ if (requestParameters['itemId'] == null) {
264
+ throw new runtime.RequiredError('itemId', 'Required parameter "itemId" was null or undefined when calling deleteCompositionContentItem().');
265
+ }
266
+ if (requestParameters['idempotencyKey'] == null) {
267
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling deleteCompositionContentItem().');
268
+ }
269
+ const queryParameters = {};
270
+ const headerParameters = {};
271
+ if (requestParameters['ifMatch'] != null) {
272
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
273
+ }
274
+ if (requestParameters['idempotencyKey'] != null) {
275
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
276
+ }
277
+ if (requestParameters['xManagedUserId'] != null) {
278
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
279
+ }
280
+ if (requestParameters['xManagedUserExternalId'] != null) {
281
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
282
+ }
283
+ if (this.configuration && this.configuration.accessToken) {
284
+ const token = this.configuration.accessToken;
285
+ const tokenString = await token("apiKeyAuth", []);
286
+ if (tokenString) {
287
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
288
+ }
289
+ }
290
+ const response = await this.request({
291
+ path: `/compositions/{id}/content/{list}/items/{itemId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"list"}}`, encodeURIComponent(String(requestParameters['list']))).replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters['itemId']))),
292
+ method: 'DELETE',
293
+ headers: headerParameters,
294
+ query: queryParameters,
295
+ }, initOverrides);
296
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteCompositionContentItemResponseFromJSON(jsonValue));
297
+ }
298
+ /**
299
+ * Delete a content list item
300
+ */
301
+ async deleteCompositionContentItem(requestParameters, initOverrides) {
302
+ const response = await this.deleteCompositionContentItemRaw(requestParameters, initOverrides);
303
+ return await response.value();
304
+ }
305
+ /**
306
+ * Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
307
+ * Remove the composition data source binding
308
+ */
309
+ async deleteCompositionDataSourceRaw(requestParameters, initOverrides) {
310
+ if (requestParameters['id'] == null) {
311
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionDataSource().');
312
+ }
313
+ if (requestParameters['idempotencyKey'] == null) {
314
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling deleteCompositionDataSource().');
315
+ }
316
+ const queryParameters = {};
317
+ const headerParameters = {};
318
+ if (requestParameters['idempotencyKey'] != null) {
319
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
320
+ }
321
+ if (requestParameters['xManagedUserId'] != null) {
322
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
323
+ }
324
+ if (requestParameters['xManagedUserExternalId'] != null) {
325
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
326
+ }
327
+ if (this.configuration && this.configuration.accessToken) {
328
+ const token = this.configuration.accessToken;
329
+ const tokenString = await token("apiKeyAuth", []);
330
+ if (tokenString) {
331
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
332
+ }
333
+ }
334
+ const response = await this.request({
335
+ path: `/compositions/{id}/data-source`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
336
+ method: 'DELETE',
337
+ headers: headerParameters,
338
+ query: queryParameters,
339
+ }, initOverrides);
340
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteCompositionDataSourceResponseFromJSON(jsonValue));
341
+ }
342
+ /**
343
+ * Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
344
+ * Remove the composition data source binding
345
+ */
346
+ async deleteCompositionDataSource(requestParameters, initOverrides) {
347
+ const response = await this.deleteCompositionDataSourceRaw(requestParameters, initOverrides);
348
+ return await response.value();
349
+ }
350
+ /**
351
+ * 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`.
352
+ * Delete Record From Composition Database
353
+ */
354
+ async deleteCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
355
+ if (requestParameters['id'] == null) {
356
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionDatabaseRecord().');
357
+ }
358
+ if (requestParameters['table'] == null) {
359
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling deleteCompositionDatabaseRecord().');
360
+ }
361
+ if (requestParameters['recordId'] == null) {
362
+ throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling deleteCompositionDatabaseRecord().');
363
+ }
364
+ const queryParameters = {};
365
+ const headerParameters = {};
366
+ if (requestParameters['xManagedUserId'] != null) {
367
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
368
+ }
369
+ if (requestParameters['xManagedUserExternalId'] != null) {
370
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
371
+ }
372
+ if (this.configuration && this.configuration.accessToken) {
373
+ const token = this.configuration.accessToken;
374
+ const tokenString = await token("apiKeyAuth", []);
375
+ if (tokenString) {
376
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
377
+ }
378
+ }
379
+ const response = await this.request({
380
+ path: `/compositions/{id}/database/{table}/{recordId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))).replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))),
381
+ method: 'DELETE',
382
+ headers: headerParameters,
383
+ query: queryParameters,
384
+ }, initOverrides);
385
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
386
+ }
387
+ /**
388
+ * 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`.
389
+ * Delete Record From Composition Database
390
+ */
391
+ async deleteCompositionDatabaseRecord(requestParameters, initOverrides) {
392
+ const response = await this.deleteCompositionDatabaseRecordRaw(requestParameters, initOverrides);
393
+ return await response.value();
394
+ }
395
+ /**
396
+ * Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
397
+ * Delete Composition
398
+ */
399
+ async deleteCompositionRaw(requestParameters, initOverrides) {
400
+ if (requestParameters['id'] == null) {
401
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteComposition().');
402
+ }
403
+ const queryParameters = {};
404
+ const headerParameters = {};
405
+ if (requestParameters['xManagedUserId'] != null) {
406
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
407
+ }
408
+ if (requestParameters['xManagedUserExternalId'] != null) {
409
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
410
+ }
411
+ if (this.configuration && this.configuration.accessToken) {
412
+ const token = this.configuration.accessToken;
413
+ const tokenString = await token("apiKeyAuth", []);
414
+ if (tokenString) {
415
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
416
+ }
417
+ }
418
+ const response = await this.request({
419
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
420
+ method: 'DELETE',
421
+ headers: headerParameters,
422
+ query: queryParameters,
423
+ }, initOverrides);
424
+ return new runtime.VoidApiResponse(response);
425
+ }
426
+ /**
427
+ * Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
428
+ * Delete Composition
429
+ */
430
+ async deleteComposition(requestParameters, initOverrides) {
431
+ await this.deleteCompositionRaw(requestParameters, initOverrides);
432
+ }
433
+ /**
434
+ * 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.
435
+ * Describe What a Composition Keeps
436
+ */
437
+ async describeCompositionEntriesRaw(requestParameters, initOverrides) {
438
+ if (requestParameters['id'] == null) {
439
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling describeCompositionEntries().');
440
+ }
441
+ const queryParameters = {};
442
+ const headerParameters = {};
443
+ if (requestParameters['xManagedUserId'] != null) {
444
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
445
+ }
446
+ if (requestParameters['xManagedUserExternalId'] != null) {
447
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
448
+ }
449
+ if (this.configuration && this.configuration.accessToken) {
450
+ const token = this.configuration.accessToken;
451
+ const tokenString = await token("apiKeyAuth", []);
452
+ if (tokenString) {
453
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
454
+ }
455
+ }
456
+ const response = await this.request({
457
+ path: `/compositions/{id}/entries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
458
+ method: 'GET',
459
+ headers: headerParameters,
460
+ query: queryParameters,
461
+ }, initOverrides);
462
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntriesDescriptionResponseFromJSON(jsonValue));
463
+ }
464
+ /**
465
+ * 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.
466
+ * Describe What a Composition Keeps
467
+ */
468
+ async describeCompositionEntries(requestParameters, initOverrides) {
469
+ const response = await this.describeCompositionEntriesRaw(requestParameters, initOverrides);
470
+ return await response.value();
471
+ }
472
+ /**
473
+ * Creates a duplicate of an existing composition for the authenticated user. The duplicate is made after the answer: the call returns `202` with an `operationId`. Ask `GET /operations/{id}` for that operation until its `status` is `completed`; the new composition is named in `metadata.newCompositionId`. A problem with the duplicate\'s database (for example, tables that could not be made just now) is listed in `metadata.warnings`, which is absent when there is none. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one duplicate is made, not two.
474
+ * Duplicate Composition
475
+ */
476
+ async duplicateCompositionRaw(requestParameters, initOverrides) {
477
+ if (requestParameters['id'] == null) {
478
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling duplicateComposition().');
479
+ }
480
+ if (requestParameters['idempotencyKey'] == null) {
481
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling duplicateComposition().');
482
+ }
483
+ const queryParameters = {};
484
+ const headerParameters = {};
485
+ headerParameters['Content-Type'] = 'application/json';
486
+ if (requestParameters['idempotencyKey'] != null) {
487
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
488
+ }
489
+ if (requestParameters['xManagedUserId'] != null) {
490
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
491
+ }
492
+ if (requestParameters['xManagedUserExternalId'] != null) {
493
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
494
+ }
495
+ if (this.configuration && this.configuration.accessToken) {
496
+ const token = this.configuration.accessToken;
497
+ const tokenString = await token("apiKeyAuth", []);
498
+ if (tokenString) {
499
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
500
+ }
501
+ }
502
+ const response = await this.request({
503
+ path: `/compositions/{id}/duplicate`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
504
+ method: 'POST',
505
+ headers: headerParameters,
506
+ query: queryParameters,
507
+ body: DuplicateCompositionRequestToJSON(requestParameters['duplicateCompositionRequest']),
508
+ }, initOverrides);
509
+ return new runtime.JSONApiResponse(response, (jsonValue) => DuplicateComposition202ResponseFromJSON(jsonValue));
510
+ }
511
+ /**
512
+ * Creates a duplicate of an existing composition for the authenticated user. The duplicate is made after the answer: the call returns `202` with an `operationId`. Ask `GET /operations/{id}` for that operation until its `status` is `completed`; the new composition is named in `metadata.newCompositionId`. A problem with the duplicate\'s database (for example, tables that could not be made just now) is listed in `metadata.warnings`, which is absent when there is none. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one duplicate is made, not two.
513
+ * Duplicate Composition
514
+ */
515
+ async duplicateComposition(requestParameters, initOverrides) {
516
+ const response = await this.duplicateCompositionRaw(requestParameters, initOverrides);
517
+ return await response.value();
518
+ }
519
+ /**
520
+ * 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.
521
+ * See the documents a widget\'s AI answers from
522
+ */
523
+ async getAiAnswersKnowledgeRaw(requestParameters, initOverrides) {
524
+ if (requestParameters['id'] == null) {
525
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getAiAnswersKnowledge().');
526
+ }
527
+ const queryParameters = {};
528
+ const headerParameters = {};
529
+ if (requestParameters['xManagedUserId'] != null) {
530
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
531
+ }
532
+ if (requestParameters['xManagedUserExternalId'] != null) {
533
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
534
+ }
535
+ if (this.configuration && this.configuration.accessToken) {
536
+ const token = this.configuration.accessToken;
537
+ const tokenString = await token("apiKeyAuth", []);
538
+ if (tokenString) {
539
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
540
+ }
541
+ }
542
+ const response = await this.request({
543
+ path: `/compositions/{id}/adapters/ai-answers/knowledge`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
544
+ method: 'GET',
545
+ headers: headerParameters,
546
+ query: queryParameters,
547
+ }, initOverrides);
548
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAiAnswersKnowledge200ResponseFromJSON(jsonValue));
549
+ }
550
+ /**
551
+ * 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.
552
+ * See the documents a widget\'s AI answers from
553
+ */
554
+ async getAiAnswersKnowledge(requestParameters, initOverrides) {
555
+ const response = await this.getAiAnswersKnowledgeRaw(requestParameters, initOverrides);
556
+ return await response.value();
557
+ }
558
+ /**
559
+ * Retrieves all compositions with pagination support. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the compositions made for that managed user. The compositions of your other managed users, and your own, are left out. It combines with the other filters and with paging. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`. An editor session with the `creator` surface may call this to list the compositions of ONE widget it built: it must send `widgetId`, and the answer holds only the compositions made for the session\'s managed user.
560
+ * Get All Compositions
561
+ */
562
+ async getAllCompositionsRaw(requestParameters, initOverrides) {
563
+ const queryParameters = {};
564
+ if (requestParameters['page'] != null) {
565
+ queryParameters['page'] = requestParameters['page'];
566
+ }
567
+ if (requestParameters['size'] != null) {
568
+ queryParameters['size'] = requestParameters['size'];
569
+ }
570
+ if (requestParameters['sort'] != null) {
571
+ queryParameters['sort'] = requestParameters['sort'];
572
+ }
573
+ if (requestParameters['widgetId'] != null) {
574
+ queryParameters['widgetId'] = requestParameters['widgetId'];
575
+ }
576
+ if (requestParameters['workspace'] != null) {
577
+ queryParameters['workspace'] = requestParameters['workspace'];
578
+ }
579
+ if (requestParameters['projectFolder'] != null) {
580
+ queryParameters['projectFolder'] = requestParameters['projectFolder'];
581
+ }
582
+ if (requestParameters['status'] != null) {
583
+ queryParameters['status'] = requestParameters['status'];
584
+ }
585
+ if (requestParameters['managedUserId'] != null) {
586
+ queryParameters['managedUserId'] = requestParameters['managedUserId'];
587
+ }
588
+ if (requestParameters['managedUserExternalId'] != null) {
589
+ queryParameters['managedUserExternalId'] = requestParameters['managedUserExternalId'];
590
+ }
591
+ const headerParameters = {};
592
+ if (requestParameters['xManagedUserId'] != null) {
593
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
594
+ }
595
+ if (requestParameters['xManagedUserExternalId'] != null) {
596
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
597
+ }
598
+ if (this.configuration && this.configuration.accessToken) {
599
+ const token = this.configuration.accessToken;
600
+ const tokenString = await token("apiKeyAuth", []);
601
+ if (tokenString) {
602
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
603
+ }
604
+ }
605
+ const response = await this.request({
606
+ path: `/compositions`,
607
+ method: 'GET',
608
+ headers: headerParameters,
609
+ query: queryParameters,
610
+ }, initOverrides);
611
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAllCompositions200ResponseFromJSON(jsonValue));
612
+ }
613
+ /**
614
+ * Retrieves all compositions with pagination support. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the compositions made for that managed user. The compositions of your other managed users, and your own, are left out. It combines with the other filters and with paging. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`. An editor session with the `creator` surface may call this to list the compositions of ONE widget it built: it must send `widgetId`, and the answer holds only the compositions made for the session\'s managed user.
615
+ * Get All Compositions
616
+ */
617
+ async getAllCompositions(requestParameters = {}, initOverrides) {
618
+ const response = await this.getAllCompositionsRaw(requestParameters, initOverrides);
619
+ return await response.value();
620
+ }
621
+ /**
622
+ * 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 accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
623
+ * Get Composition
624
+ */
625
+ async getCompositionByIdRaw(requestParameters, initOverrides) {
626
+ if (requestParameters['id'] == null) {
627
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionById().');
628
+ }
629
+ const queryParameters = {};
630
+ const headerParameters = {};
631
+ if (requestParameters['xManagedUserId'] != null) {
632
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
633
+ }
634
+ if (requestParameters['xManagedUserExternalId'] != null) {
635
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
636
+ }
637
+ if (this.configuration && this.configuration.accessToken) {
638
+ const token = this.configuration.accessToken;
639
+ const tokenString = await token("apiKeyAuth", []);
640
+ if (tokenString) {
641
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
642
+ }
643
+ }
644
+ const response = await this.request({
645
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
646
+ method: 'GET',
647
+ headers: headerParameters,
648
+ query: queryParameters,
649
+ }, initOverrides);
650
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
651
+ }
652
+ /**
653
+ * 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 accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
654
+ * Get Composition
655
+ */
656
+ async getCompositionById(requestParameters, initOverrides) {
657
+ const response = await this.getCompositionByIdRaw(requestParameters, initOverrides);
658
+ return await response.value();
659
+ }
660
+ /**
661
+ * Retrieves the content schema for a composition based on its widget type
662
+ * Get Content Schema
663
+ */
664
+ async getCompositionContentSchemaRaw(requestParameters, initOverrides) {
665
+ if (requestParameters['id'] == null) {
666
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContentSchema().');
667
+ }
668
+ const queryParameters = {};
669
+ const headerParameters = {};
670
+ if (requestParameters['xManagedUserId'] != null) {
671
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
672
+ }
673
+ if (requestParameters['xManagedUserExternalId'] != null) {
674
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
675
+ }
676
+ if (this.configuration && this.configuration.accessToken) {
677
+ const token = this.configuration.accessToken;
678
+ const tokenString = await token("apiKeyAuth", []);
679
+ if (tokenString) {
680
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
681
+ }
682
+ }
683
+ const response = await this.request({
684
+ path: `/compositions/{id}/schema/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
685
+ method: 'GET',
686
+ headers: headerParameters,
687
+ query: queryParameters,
688
+ }, initOverrides);
689
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentSchemaResponseFromJSON(jsonValue));
690
+ }
691
+ /**
692
+ * Retrieves the content schema for a composition based on its widget type
693
+ * Get Content Schema
694
+ */
695
+ async getCompositionContentSchema(requestParameters, initOverrides) {
696
+ const response = await this.getCompositionContentSchemaRaw(requestParameters, initOverrides);
697
+ return await response.value();
698
+ }
699
+ /**
700
+ * Retrieves the current content of a composition
701
+ * Get Current Content
702
+ */
703
+ async getCompositionContentRaw(requestParameters, initOverrides) {
704
+ if (requestParameters['id'] == null) {
705
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContent().');
706
+ }
707
+ const queryParameters = {};
708
+ const headerParameters = {};
709
+ if (requestParameters['xManagedUserId'] != null) {
710
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
711
+ }
712
+ if (requestParameters['xManagedUserExternalId'] != null) {
713
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
714
+ }
715
+ if (this.configuration && this.configuration.accessToken) {
716
+ const token = this.configuration.accessToken;
717
+ const tokenString = await token("apiKeyAuth", []);
718
+ if (tokenString) {
719
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
720
+ }
721
+ }
722
+ const response = await this.request({
723
+ path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
724
+ method: 'GET',
725
+ headers: headerParameters,
726
+ query: queryParameters,
727
+ }, initOverrides);
728
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentResponseFromJSON(jsonValue));
729
+ }
730
+ /**
731
+ * Retrieves the current content of a composition
732
+ * Get Current Content
733
+ */
734
+ async getCompositionContent(requestParameters, initOverrides) {
735
+ const response = await this.getCompositionContentRaw(requestParameters, initOverrides);
736
+ return await response.value();
737
+ }
738
+ /**
739
+ * The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
740
+ * Read the composition data source binding
741
+ */
742
+ async getCompositionDataSourceRaw(requestParameters, initOverrides) {
743
+ if (requestParameters['id'] == null) {
744
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDataSource().');
745
+ }
746
+ const queryParameters = {};
747
+ const headerParameters = {};
748
+ if (requestParameters['xManagedUserId'] != null) {
749
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
750
+ }
751
+ if (requestParameters['xManagedUserExternalId'] != null) {
752
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
753
+ }
754
+ if (this.configuration && this.configuration.accessToken) {
755
+ const token = this.configuration.accessToken;
756
+ const tokenString = await token("apiKeyAuth", []);
757
+ if (tokenString) {
758
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
759
+ }
760
+ }
761
+ const response = await this.request({
762
+ path: `/compositions/{id}/data-source`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
763
+ method: 'GET',
764
+ headers: headerParameters,
765
+ query: queryParameters,
766
+ }, initOverrides);
767
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDataSourceResponseFromJSON(jsonValue));
768
+ }
769
+ /**
770
+ * The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
771
+ * Read the composition data source binding
772
+ */
773
+ async getCompositionDataSource(requestParameters, initOverrides) {
774
+ const response = await this.getCompositionDataSourceRaw(requestParameters, initOverrides);
775
+ return await response.value();
776
+ }
777
+ /**
778
+ * 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`.
779
+ * Get Record From Composition Database
780
+ */
781
+ async getCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
782
+ if (requestParameters['id'] == null) {
783
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDatabaseRecord().');
784
+ }
785
+ if (requestParameters['table'] == null) {
786
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling getCompositionDatabaseRecord().');
787
+ }
788
+ if (requestParameters['recordId'] == null) {
789
+ throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling getCompositionDatabaseRecord().');
790
+ }
791
+ const queryParameters = {};
792
+ const headerParameters = {};
793
+ if (requestParameters['xManagedUserId'] != null) {
794
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
795
+ }
796
+ if (requestParameters['xManagedUserExternalId'] != null) {
797
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
798
+ }
799
+ if (this.configuration && this.configuration.accessToken) {
800
+ const token = this.configuration.accessToken;
801
+ const tokenString = await token("apiKeyAuth", []);
802
+ if (tokenString) {
803
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
804
+ }
805
+ }
806
+ const response = await this.request({
807
+ path: `/compositions/{id}/database/{table}/{recordId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))).replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))),
808
+ method: 'GET',
809
+ headers: headerParameters,
810
+ query: queryParameters,
811
+ }, initOverrides);
812
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
813
+ }
814
+ /**
815
+ * 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`.
816
+ * Get Record From Composition Database
817
+ */
818
+ async getCompositionDatabaseRecord(requestParameters, initOverrides) {
819
+ const response = await this.getCompositionDatabaseRecordRaw(requestParameters, initOverrides);
820
+ return await response.value();
821
+ }
822
+ /**
823
+ * Retrieves all records 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`.
824
+ * Get All Records From Composition Database Table
825
+ */
826
+ async getCompositionDatabaseRecordsRaw(requestParameters, initOverrides) {
827
+ if (requestParameters['id'] == null) {
828
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDatabaseRecords().');
829
+ }
830
+ if (requestParameters['table'] == null) {
831
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling getCompositionDatabaseRecords().');
832
+ }
833
+ const queryParameters = {};
834
+ const headerParameters = {};
835
+ if (requestParameters['xManagedUserId'] != null) {
836
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
837
+ }
838
+ if (requestParameters['xManagedUserExternalId'] != null) {
839
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
840
+ }
841
+ if (this.configuration && this.configuration.accessToken) {
842
+ const token = this.configuration.accessToken;
843
+ const tokenString = await token("apiKeyAuth", []);
844
+ if (tokenString) {
845
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
846
+ }
847
+ }
848
+ const response = await this.request({
849
+ path: `/compositions/{id}/database/{table}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
850
+ method: 'GET',
851
+ headers: headerParameters,
852
+ query: queryParameters,
853
+ }, initOverrides);
854
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDatabaseRecords200ResponseFromJSON(jsonValue));
855
+ }
856
+ /**
857
+ * Retrieves all records 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`.
858
+ * Get All Records From Composition Database Table
859
+ */
860
+ async getCompositionDatabaseRecords(requestParameters, initOverrides) {
861
+ const response = await this.getCompositionDatabaseRecordsRaw(requestParameters, initOverrides);
862
+ return await response.value();
863
+ }
864
+ /**
865
+ * Retrieves the design schema for a composition based on its widget type
866
+ * Get Design Schema
867
+ */
868
+ async getCompositionDesignSchemaRaw(requestParameters, initOverrides) {
869
+ if (requestParameters['id'] == null) {
870
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesignSchema().');
871
+ }
872
+ const queryParameters = {};
873
+ const headerParameters = {};
874
+ if (requestParameters['xManagedUserId'] != null) {
875
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
876
+ }
877
+ if (requestParameters['xManagedUserExternalId'] != null) {
878
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
879
+ }
880
+ if (this.configuration && this.configuration.accessToken) {
881
+ const token = this.configuration.accessToken;
882
+ const tokenString = await token("apiKeyAuth", []);
883
+ if (tokenString) {
884
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
885
+ }
886
+ }
887
+ const response = await this.request({
888
+ path: `/compositions/{id}/schema/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
889
+ method: 'GET',
890
+ headers: headerParameters,
891
+ query: queryParameters,
892
+ }, initOverrides);
893
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignSchemaResponseFromJSON(jsonValue));
894
+ }
895
+ /**
896
+ * Retrieves the design schema for a composition based on its widget type
897
+ * Get Design Schema
898
+ */
899
+ async getCompositionDesignSchema(requestParameters, initOverrides) {
900
+ const response = await this.getCompositionDesignSchemaRaw(requestParameters, initOverrides);
901
+ return await response.value();
902
+ }
903
+ /**
904
+ * Retrieves only the design field from a composition.
905
+ * Get Composition Design
906
+ */
907
+ async getCompositionDesignRaw(requestParameters, initOverrides) {
908
+ if (requestParameters['id'] == null) {
909
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesign().');
910
+ }
911
+ const queryParameters = {};
912
+ const headerParameters = {};
913
+ if (requestParameters['xManagedUserId'] != null) {
914
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
915
+ }
916
+ if (requestParameters['xManagedUserExternalId'] != null) {
917
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
918
+ }
919
+ if (this.configuration && this.configuration.accessToken) {
920
+ const token = this.configuration.accessToken;
921
+ const tokenString = await token("apiKeyAuth", []);
922
+ if (tokenString) {
923
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
924
+ }
925
+ }
926
+ const response = await this.request({
927
+ path: `/compositions/{id}/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
928
+ method: 'GET',
929
+ headers: headerParameters,
930
+ query: queryParameters,
931
+ }, initOverrides);
932
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignResponseFromJSON(jsonValue));
933
+ }
934
+ /**
935
+ * Retrieves only the design field from a composition.
936
+ * Get Composition Design
937
+ */
938
+ async getCompositionDesign(requestParameters, initOverrides) {
939
+ const response = await this.getCompositionDesignRaw(requestParameters, initOverrides);
940
+ return await response.value();
941
+ }
942
+ /**
943
+ * Retrieves the definition of the composition\'s Embed tab: which settings exist, what each one holds, what it defaults to, and when its control is shown. It is the third tab beside `schema/content` and `schema/design`, in the same format (`componentGroups` → `components` → `propertyGroups` → `properties`, each property with a `type`, a `defaultValue` and an `inputController`), so a client that draws those two tabs draws this one with the same code. The schema is the same for every composition (it is the one Widgetic\'s own Embed Editor draws). The composition id decides who may ask: the caller must be able to read the composition. Reading and saving the values: - `GET /compositions/{id}/embed-settings` returns what the composition saved. A composition whose Embed tab was never saved has nothing to return; seed the form from `defaults`, which holds the `defaultValue` of every setting that declares one. - `PUT /compositions/{id}` with `embedSettings` saves them. The gateway stores `embedSettings` as given and does not check it against this schema; the schema is how a client knows what to put there. A property\'s `visibilityCondition` says when its control is shown: `condition` is a comparison of the current values of the properties named in `dependsOn` (`useIframe === false`, `embedTarget === \'mixed\' && keepDimensions === false`). While it is false the Embed Editor does not show the control. A colour picker with `showOpacityControls` saves its opacity next to the colour, under the key `<name>_opacity` as a number from 0 to 1 (`overlayBackgroundColor` → `overlayBackgroundColor_opacity`). Its `defaultTransparency` is a percentage and the saved value a fraction (50 → 0.5).
944
+ * Get Embed Schema
945
+ */
946
+ async getCompositionEmbedSchemaRaw(requestParameters, initOverrides) {
947
+ if (requestParameters['id'] == null) {
948
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionEmbedSchema().');
949
+ }
950
+ const queryParameters = {};
951
+ const headerParameters = {};
952
+ if (requestParameters['xManagedUserId'] != null) {
953
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
954
+ }
955
+ if (requestParameters['xManagedUserExternalId'] != null) {
956
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
957
+ }
958
+ if (this.configuration && this.configuration.accessToken) {
959
+ const token = this.configuration.accessToken;
960
+ const tokenString = await token("apiKeyAuth", []);
961
+ if (tokenString) {
962
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
963
+ }
964
+ }
965
+ const response = await this.request({
966
+ path: `/compositions/{id}/schema/embed`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
967
+ method: 'GET',
968
+ headers: headerParameters,
969
+ query: queryParameters,
970
+ }, initOverrides);
971
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionEmbedSchemaResponseFromJSON(jsonValue));
972
+ }
973
+ /**
974
+ * Retrieves the definition of the composition\'s Embed tab: which settings exist, what each one holds, what it defaults to, and when its control is shown. It is the third tab beside `schema/content` and `schema/design`, in the same format (`componentGroups` → `components` → `propertyGroups` → `properties`, each property with a `type`, a `defaultValue` and an `inputController`), so a client that draws those two tabs draws this one with the same code. The schema is the same for every composition (it is the one Widgetic\'s own Embed Editor draws). The composition id decides who may ask: the caller must be able to read the composition. Reading and saving the values: - `GET /compositions/{id}/embed-settings` returns what the composition saved. A composition whose Embed tab was never saved has nothing to return; seed the form from `defaults`, which holds the `defaultValue` of every setting that declares one. - `PUT /compositions/{id}` with `embedSettings` saves them. The gateway stores `embedSettings` as given and does not check it against this schema; the schema is how a client knows what to put there. A property\'s `visibilityCondition` says when its control is shown: `condition` is a comparison of the current values of the properties named in `dependsOn` (`useIframe === false`, `embedTarget === \'mixed\' && keepDimensions === false`). While it is false the Embed Editor does not show the control. A colour picker with `showOpacityControls` saves its opacity next to the colour, under the key `<name>_opacity` as a number from 0 to 1 (`overlayBackgroundColor` → `overlayBackgroundColor_opacity`). Its `defaultTransparency` is a percentage and the saved value a fraction (50 → 0.5).
975
+ * Get Embed Schema
976
+ */
977
+ async getCompositionEmbedSchema(requestParameters, initOverrides) {
978
+ const response = await this.getCompositionEmbedSchemaRaw(requestParameters, initOverrides);
979
+ return await response.value();
980
+ }
981
+ /**
982
+ * Retrieves only the embedSettings field from a composition.
983
+ * Get Composition Embed Settings
984
+ */
985
+ async getCompositionEmbedSettingsRaw(requestParameters, initOverrides) {
986
+ if (requestParameters['id'] == null) {
987
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionEmbedSettings().');
988
+ }
989
+ const queryParameters = {};
990
+ const headerParameters = {};
991
+ if (requestParameters['xManagedUserId'] != null) {
992
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
993
+ }
994
+ if (requestParameters['xManagedUserExternalId'] != null) {
995
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
996
+ }
997
+ if (this.configuration && this.configuration.accessToken) {
998
+ const token = this.configuration.accessToken;
999
+ const tokenString = await token("apiKeyAuth", []);
1000
+ if (tokenString) {
1001
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1002
+ }
1003
+ }
1004
+ const response = await this.request({
1005
+ path: `/compositions/{id}/embed-settings`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1006
+ method: 'GET',
1007
+ headers: headerParameters,
1008
+ query: queryParameters,
1009
+ }, initOverrides);
1010
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionEmbedSettingsResponseFromJSON(jsonValue));
1011
+ }
1012
+ /**
1013
+ * Retrieves only the embedSettings field from a composition.
1014
+ * Get Composition Embed Settings
1015
+ */
1016
+ async getCompositionEmbedSettings(requestParameters, initOverrides) {
1017
+ const response = await this.getCompositionEmbedSettingsRaw(requestParameters, initOverrides);
1018
+ return await response.value();
1019
+ }
1020
+ /**
1021
+ * Returns the address of the page an editor shows the composition in: the page of the widget\'s published version on the CDN, with the widget and version it is. Load it in a frame, then send the frame what to show (the content, design and embed settings you read from the composition, and every change the user makes) with `postMessage`: `{ type: \'widgetic:update\', design }`, `{ type: \'widgetic:update\', content }` or `{ type: \'widgetic:update\', contentItems }`. The version is the one embeds show, so the editor previews what a visitor gets. The address does not carry the composition id: an embed uses the id to fetch the saved composition itself, while an editor sends the current state (unsaved changes included). A widget that has never been published has no page to show: the answer is 409 `WIDGET_NOT_PUBLISHED`.
1022
+ * Get Composition Preview
1023
+ */
1024
+ async getCompositionPreviewRaw(requestParameters, initOverrides) {
1025
+ if (requestParameters['id'] == null) {
1026
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionPreview().');
1027
+ }
1028
+ const queryParameters = {};
1029
+ const headerParameters = {};
1030
+ if (requestParameters['xManagedUserId'] != null) {
1031
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1032
+ }
1033
+ if (requestParameters['xManagedUserExternalId'] != null) {
1034
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1035
+ }
1036
+ if (this.configuration && this.configuration.accessToken) {
1037
+ const token = this.configuration.accessToken;
1038
+ const tokenString = await token("apiKeyAuth", []);
1039
+ if (tokenString) {
1040
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1041
+ }
1042
+ }
1043
+ const response = await this.request({
1044
+ path: `/compositions/{id}/preview`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1045
+ method: 'GET',
1046
+ headers: headerParameters,
1047
+ query: queryParameters,
1048
+ }, initOverrides);
1049
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionPreviewResponseFromJSON(jsonValue));
1050
+ }
1051
+ /**
1052
+ * Returns the address of the page an editor shows the composition in: the page of the widget\'s published version on the CDN, with the widget and version it is. Load it in a frame, then send the frame what to show (the content, design and embed settings you read from the composition, and every change the user makes) with `postMessage`: `{ type: \'widgetic:update\', design }`, `{ type: \'widgetic:update\', content }` or `{ type: \'widgetic:update\', contentItems }`. The version is the one embeds show, so the editor previews what a visitor gets. The address does not carry the composition id: an embed uses the id to fetch the saved composition itself, while an editor sends the current state (unsaved changes included). A widget that has never been published has no page to show: the answer is 409 `WIDGET_NOT_PUBLISHED`.
1053
+ * Get Composition Preview
1054
+ */
1055
+ async getCompositionPreview(requestParameters, initOverrides) {
1056
+ const response = await this.getCompositionPreviewRaw(requestParameters, initOverrides);
1057
+ return await response.value();
1058
+ }
1059
+ /**
1060
+ * Retrieves version history for a specific composition.
1061
+ * Get Composition Versions
1062
+ */
1063
+ async getCompositionVersionsRaw(requestParameters, initOverrides) {
1064
+ if (requestParameters['id'] == null) {
1065
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionVersions().');
1066
+ }
1067
+ const queryParameters = {};
1068
+ const headerParameters = {};
1069
+ if (requestParameters['xManagedUserId'] != null) {
1070
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1071
+ }
1072
+ if (requestParameters['xManagedUserExternalId'] != null) {
1073
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1074
+ }
1075
+ if (this.configuration && this.configuration.accessToken) {
1076
+ const token = this.configuration.accessToken;
1077
+ const tokenString = await token("apiKeyAuth", []);
1078
+ if (tokenString) {
1079
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1080
+ }
1081
+ }
1082
+ const response = await this.request({
1083
+ path: `/compositions/{id}/versions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1084
+ method: 'GET',
1085
+ headers: headerParameters,
1086
+ query: queryParameters,
1087
+ }, initOverrides);
1088
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionVersions200ResponseFromJSON(jsonValue));
1089
+ }
1090
+ /**
1091
+ * Retrieves version history for a specific composition.
1092
+ * Get Composition Versions
1093
+ */
1094
+ async getCompositionVersions(requestParameters, initOverrides) {
1095
+ const response = await this.getCompositionVersionsRaw(requestParameters, initOverrides);
1096
+ return await response.value();
1097
+ }
1098
+ /**
1099
+ * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
1100
+ * Get Compositions Batch
1101
+ */
1102
+ async getCompositionsBatchRaw(requestParameters, initOverrides) {
1103
+ if (requestParameters['getCompositionsBatchRequest'] == null) {
1104
+ throw new runtime.RequiredError('getCompositionsBatchRequest', 'Required parameter "getCompositionsBatchRequest" was null or undefined when calling getCompositionsBatch().');
1105
+ }
1106
+ const queryParameters = {};
1107
+ const headerParameters = {};
1108
+ headerParameters['Content-Type'] = 'application/json';
1109
+ if (this.configuration && this.configuration.accessToken) {
1110
+ const token = this.configuration.accessToken;
1111
+ const tokenString = await token("apiKeyAuth", []);
1112
+ if (tokenString) {
1113
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1114
+ }
1115
+ }
1116
+ const response = await this.request({
1117
+ path: `/compositions/batch`,
1118
+ method: 'POST',
1119
+ headers: headerParameters,
1120
+ query: queryParameters,
1121
+ body: GetCompositionsBatchRequestToJSON(requestParameters['getCompositionsBatchRequest']),
1122
+ }, initOverrides);
1123
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionsBatchResponseFromJSON(jsonValue));
1124
+ }
1125
+ /**
1126
+ * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
1127
+ * Get Compositions Batch
1128
+ */
1129
+ async getCompositionsBatch(requestParameters, initOverrides) {
1130
+ const response = await this.getCompositionsBatchRaw(requestParameters, initOverrides);
1131
+ return await response.value();
1132
+ }
1133
+ /**
1134
+ * Update a content list item
1135
+ */
1136
+ async patchCompositionContentItemRaw(requestParameters, initOverrides) {
1137
+ if (requestParameters['id'] == null) {
1138
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling patchCompositionContentItem().');
1139
+ }
1140
+ if (requestParameters['list'] == null) {
1141
+ throw new runtime.RequiredError('list', 'Required parameter "list" was null or undefined when calling patchCompositionContentItem().');
1142
+ }
1143
+ if (requestParameters['itemId'] == null) {
1144
+ throw new runtime.RequiredError('itemId', 'Required parameter "itemId" was null or undefined when calling patchCompositionContentItem().');
1145
+ }
1146
+ if (requestParameters['idempotencyKey'] == null) {
1147
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling patchCompositionContentItem().');
1148
+ }
1149
+ if (requestParameters['requestBody'] == null) {
1150
+ throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling patchCompositionContentItem().');
1151
+ }
1152
+ const queryParameters = {};
1153
+ const headerParameters = {};
1154
+ headerParameters['Content-Type'] = 'application/json';
1155
+ if (requestParameters['ifMatch'] != null) {
1156
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
1157
+ }
1158
+ if (requestParameters['idempotencyKey'] != null) {
1159
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1160
+ }
1161
+ if (requestParameters['xManagedUserId'] != null) {
1162
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1163
+ }
1164
+ if (requestParameters['xManagedUserExternalId'] != null) {
1165
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1166
+ }
1167
+ if (this.configuration && this.configuration.accessToken) {
1168
+ const token = this.configuration.accessToken;
1169
+ const tokenString = await token("apiKeyAuth", []);
1170
+ if (tokenString) {
1171
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1172
+ }
1173
+ }
1174
+ const response = await this.request({
1175
+ path: `/compositions/{id}/content/{list}/items/{itemId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"list"}}`, encodeURIComponent(String(requestParameters['list']))).replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters['itemId']))),
1176
+ method: 'PATCH',
1177
+ headers: headerParameters,
1178
+ query: queryParameters,
1179
+ body: requestParameters['requestBody'],
1180
+ }, initOverrides);
1181
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionContentItem201ResponseFromJSON(jsonValue));
1182
+ }
1183
+ /**
1184
+ * Update a content list item
1185
+ */
1186
+ async patchCompositionContentItem(requestParameters, initOverrides) {
1187
+ const response = await this.patchCompositionContentItemRaw(requestParameters, initOverrides);
1188
+ return await response.value();
1189
+ }
1190
+ /**
1191
+ * Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. 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.
1192
+ * Read the Entries of a Composition\'s Table
1193
+ */
1194
+ async readCompositionEntriesRaw(requestParameters, initOverrides) {
1195
+ if (requestParameters['id'] == null) {
1196
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling readCompositionEntries().');
1197
+ }
1198
+ if (requestParameters['table'] == null) {
1199
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling readCompositionEntries().');
1200
+ }
1201
+ const queryParameters = {};
1202
+ if (requestParameters['groupBy'] != null) {
1203
+ queryParameters['groupBy'] = requestParameters['groupBy'];
1204
+ }
1205
+ if (requestParameters['rows'] != null) {
1206
+ queryParameters['rows'] = requestParameters['rows'];
1207
+ }
1208
+ if (requestParameters['aggregate'] != null) {
1209
+ queryParameters['aggregate'] = requestParameters['aggregate'];
1210
+ }
1211
+ if (requestParameters['column'] != null) {
1212
+ queryParameters['column'] = requestParameters['column'];
1213
+ }
1214
+ if (requestParameters['since'] != null) {
1215
+ queryParameters['since'] = requestParameters['since'].toISOString();
1216
+ }
1217
+ if (requestParameters['until'] != null) {
1218
+ queryParameters['until'] = requestParameters['until'].toISOString();
1219
+ }
1220
+ if (requestParameters['context'] != null) {
1221
+ queryParameters['context'] = requestParameters['context'];
1222
+ }
1223
+ if (requestParameters['filter'] != null) {
1224
+ queryParameters['filter'] = requestParameters['filter'];
1225
+ }
1226
+ const headerParameters = {};
1227
+ if (requestParameters['xManagedUserId'] != null) {
1228
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1229
+ }
1230
+ if (requestParameters['xManagedUserExternalId'] != null) {
1231
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1232
+ }
1233
+ if (this.configuration && this.configuration.accessToken) {
1234
+ const token = this.configuration.accessToken;
1235
+ const tokenString = await token("apiKeyAuth", []);
1236
+ if (tokenString) {
1237
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1238
+ }
1239
+ }
1240
+ const response = await this.request({
1241
+ path: `/compositions/{id}/entries/{table}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
1242
+ method: 'GET',
1243
+ headers: headerParameters,
1244
+ query: queryParameters,
1245
+ }, initOverrides);
1246
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntriesReadingResponseFromJSON(jsonValue));
1247
+ }
1248
+ /**
1249
+ * Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. 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.
1250
+ * Read the Entries of a Composition\'s Table
1251
+ */
1252
+ async readCompositionEntries(requestParameters, initOverrides) {
1253
+ const response = await this.readCompositionEntriesRaw(requestParameters, initOverrides);
1254
+ return await response.value();
1255
+ }
1256
+ /**
1257
+ * Removes one document and its passages: the widget\'s AI stops answering from it at once. Take the `documentId` from `getAiAnswersKnowledge`. The caller must be allowed to change the widget. An API key needs the `content:write` scope.
1258
+ * Remove a document from a widget\'s knowledge base
1259
+ */
1260
+ async removeAiAnswersKnowledgeDocumentRaw(requestParameters, initOverrides) {
1261
+ if (requestParameters['id'] == null) {
1262
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling removeAiAnswersKnowledgeDocument().');
1263
+ }
1264
+ if (requestParameters['documentId'] == null) {
1265
+ throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling removeAiAnswersKnowledgeDocument().');
1266
+ }
1267
+ const queryParameters = {};
1268
+ const headerParameters = {};
1269
+ if (requestParameters['xManagedUserId'] != null) {
1270
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1271
+ }
1272
+ if (requestParameters['xManagedUserExternalId'] != null) {
1273
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1274
+ }
1275
+ if (this.configuration && this.configuration.accessToken) {
1276
+ const token = this.configuration.accessToken;
1277
+ const tokenString = await token("apiKeyAuth", []);
1278
+ if (tokenString) {
1279
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1280
+ }
1281
+ }
1282
+ const response = await this.request({
1283
+ path: `/compositions/{id}/adapters/ai-answers/knowledge/documents/{documentId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId']))),
1284
+ method: 'DELETE',
1285
+ headers: headerParameters,
1286
+ query: queryParameters,
1287
+ }, initOverrides);
1288
+ return new runtime.JSONApiResponse(response, (jsonValue) => RemoveAiAnswersKnowledgeDocument200ResponseFromJSON(jsonValue));
1289
+ }
1290
+ /**
1291
+ * Removes one document and its passages: the widget\'s AI stops answering from it at once. Take the `documentId` from `getAiAnswersKnowledge`. The caller must be allowed to change the widget. An API key needs the `content:write` scope.
1292
+ * Remove a document from a widget\'s knowledge base
1293
+ */
1294
+ async removeAiAnswersKnowledgeDocument(requestParameters, initOverrides) {
1295
+ const response = await this.removeAiAnswersKnowledgeDocumentRaw(requestParameters, initOverrides);
1296
+ return await response.value();
1297
+ }
1298
+ /**
1299
+ * Stores an https URL the widget runtime may read on load and every `refreshSeconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
1300
+ * Bind a public JSON data source for embed refresh
1301
+ */
1302
+ async setCompositionDataSourceRaw(requestParameters, initOverrides) {
1303
+ if (requestParameters['id'] == null) {
1304
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setCompositionDataSource().');
1305
+ }
1306
+ if (requestParameters['idempotencyKey'] == null) {
1307
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling setCompositionDataSource().');
1308
+ }
1309
+ if (requestParameters['setCompositionDataSourceRequest'] == null) {
1310
+ throw new runtime.RequiredError('setCompositionDataSourceRequest', 'Required parameter "setCompositionDataSourceRequest" was null or undefined when calling setCompositionDataSource().');
1311
+ }
1312
+ const queryParameters = {};
1313
+ const headerParameters = {};
1314
+ headerParameters['Content-Type'] = 'application/json';
1315
+ if (requestParameters['idempotencyKey'] != null) {
1316
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1317
+ }
1318
+ if (requestParameters['xManagedUserId'] != null) {
1319
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1320
+ }
1321
+ if (requestParameters['xManagedUserExternalId'] != null) {
1322
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1323
+ }
1324
+ if (this.configuration && this.configuration.accessToken) {
1325
+ const token = this.configuration.accessToken;
1326
+ const tokenString = await token("apiKeyAuth", []);
1327
+ if (tokenString) {
1328
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1329
+ }
1330
+ }
1331
+ const response = await this.request({
1332
+ path: `/compositions/{id}/data-source`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1333
+ method: 'PUT',
1334
+ headers: headerParameters,
1335
+ query: queryParameters,
1336
+ body: SetCompositionDataSourceRequestToJSON(requestParameters['setCompositionDataSourceRequest']),
1337
+ }, initOverrides);
1338
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDataSourceResponseFromJSON(jsonValue));
1339
+ }
1340
+ /**
1341
+ * Stores an https URL the widget runtime may read on load and every `refreshSeconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
1342
+ * Bind a public JSON data source for embed refresh
1343
+ */
1344
+ async setCompositionDataSource(requestParameters, initOverrides) {
1345
+ const response = await this.setCompositionDataSourceRaw(requestParameters, initOverrides);
1346
+ return await response.value();
1347
+ }
1348
+ /**
1349
+ * Updates the content of a composition dynamically with optional schema validation. An editor session (see `createManagedUserEditorSession`) can send only `content`, `validate` and `partial`, and only for a composition made for its managed user. A body that names `version`, `source` or any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.
1350
+ * Set Dynamic Content
1351
+ */
1352
+ async setDynamicContentRaw(requestParameters, initOverrides) {
1353
+ if (requestParameters['id'] == null) {
1354
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setDynamicContent().');
1355
+ }
1356
+ if (requestParameters['idempotencyKey'] == null) {
1357
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling setDynamicContent().');
1358
+ }
1359
+ if (requestParameters['setDynamicContentRequest'] == null) {
1360
+ throw new runtime.RequiredError('setDynamicContentRequest', 'Required parameter "setDynamicContentRequest" was null or undefined when calling setDynamicContent().');
1361
+ }
1362
+ const queryParameters = {};
1363
+ const headerParameters = {};
1364
+ headerParameters['Content-Type'] = 'application/json';
1365
+ if (requestParameters['ifMatch'] != null) {
1366
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
1367
+ }
1368
+ if (requestParameters['idempotencyKey'] != null) {
1369
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1370
+ }
1371
+ if (requestParameters['xManagedUserId'] != null) {
1372
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1373
+ }
1374
+ if (requestParameters['xManagedUserExternalId'] != null) {
1375
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1376
+ }
1377
+ if (this.configuration && this.configuration.accessToken) {
1378
+ const token = this.configuration.accessToken;
1379
+ const tokenString = await token("apiKeyAuth", []);
1380
+ if (tokenString) {
1381
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1382
+ }
1383
+ }
1384
+ const response = await this.request({
1385
+ path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1386
+ method: 'PUT',
1387
+ headers: headerParameters,
1388
+ query: queryParameters,
1389
+ body: SetDynamicContentRequestToJSON(requestParameters['setDynamicContentRequest']),
1390
+ }, initOverrides);
1391
+ return new runtime.JSONApiResponse(response, (jsonValue) => SetDynamicContentResponseFromJSON(jsonValue));
1392
+ }
1393
+ /**
1394
+ * Updates the content of a composition dynamically with optional schema validation. An editor session (see `createManagedUserEditorSession`) can send only `content`, `validate` and `partial`, and only for a composition made for its managed user. A body that names `version`, `source` or any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.
1395
+ * Set Dynamic Content
1396
+ */
1397
+ async setDynamicContent(requestParameters, initOverrides) {
1398
+ const response = await this.setDynamicContentRaw(requestParameters, initOverrides);
1399
+ return await response.value();
1400
+ }
1401
+ /**
1402
+ * 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`.
1403
+ * Update Record In Composition Database
1404
+ */
1405
+ async updateCompositionDatabaseRecordRaw(requestParameters, initOverrides) {
1406
+ if (requestParameters['id'] == null) {
1407
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionDatabaseRecord().');
1408
+ }
1409
+ if (requestParameters['table'] == null) {
1410
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling updateCompositionDatabaseRecord().');
1411
+ }
1412
+ if (requestParameters['recordId'] == null) {
1413
+ throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling updateCompositionDatabaseRecord().');
1414
+ }
1415
+ if (requestParameters['idempotencyKey'] == null) {
1416
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionDatabaseRecord().');
1417
+ }
1418
+ if (requestParameters['body'] == null) {
1419
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling updateCompositionDatabaseRecord().');
1420
+ }
1421
+ const queryParameters = {};
1422
+ const headerParameters = {};
1423
+ headerParameters['Content-Type'] = 'application/json';
1424
+ if (requestParameters['idempotencyKey'] != null) {
1425
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1426
+ }
1427
+ if (requestParameters['xManagedUserId'] != null) {
1428
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1429
+ }
1430
+ if (requestParameters['xManagedUserExternalId'] != null) {
1431
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1432
+ }
1433
+ if (this.configuration && this.configuration.accessToken) {
1434
+ const token = this.configuration.accessToken;
1435
+ const tokenString = await token("apiKeyAuth", []);
1436
+ if (tokenString) {
1437
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1438
+ }
1439
+ }
1440
+ const response = await this.request({
1441
+ path: `/compositions/{id}/database/{table}/{recordId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))).replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))),
1442
+ method: 'PUT',
1443
+ headers: headerParameters,
1444
+ query: queryParameters,
1445
+ body: requestParameters['body'],
1446
+ }, initOverrides);
1447
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionDatabaseRecord201ResponseFromJSON(jsonValue));
1448
+ }
1449
+ /**
1450
+ * 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`.
1451
+ * Update Record In Composition Database
1452
+ */
1453
+ async updateCompositionDatabaseRecord(requestParameters, initOverrides) {
1454
+ const response = await this.updateCompositionDatabaseRecordRaw(requestParameters, initOverrides);
1455
+ return await response.value();
1456
+ }
1457
+ /**
1458
+ * Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
1459
+ * Update Composition Status
1460
+ */
1461
+ async updateCompositionStatusRaw(requestParameters, initOverrides) {
1462
+ if (requestParameters['id'] == null) {
1463
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateCompositionStatus().');
1464
+ }
1465
+ if (requestParameters['idempotencyKey'] == null) {
1466
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateCompositionStatus().');
1467
+ }
1468
+ if (requestParameters['updateCompositionStatusRequest'] == null) {
1469
+ throw new runtime.RequiredError('updateCompositionStatusRequest', 'Required parameter "updateCompositionStatusRequest" was null or undefined when calling updateCompositionStatus().');
1470
+ }
1471
+ const queryParameters = {};
1472
+ const headerParameters = {};
1473
+ headerParameters['Content-Type'] = 'application/json';
1474
+ if (requestParameters['idempotencyKey'] != null) {
1475
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1476
+ }
1477
+ if (requestParameters['xManagedUserId'] != null) {
1478
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1479
+ }
1480
+ if (requestParameters['xManagedUserExternalId'] != null) {
1481
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1482
+ }
1483
+ if (this.configuration && this.configuration.accessToken) {
1484
+ const token = this.configuration.accessToken;
1485
+ const tokenString = await token("apiKeyAuth", []);
1486
+ if (tokenString) {
1487
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1488
+ }
1489
+ }
1490
+ const response = await this.request({
1491
+ path: `/compositions/{id}/status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1492
+ method: 'PUT',
1493
+ headers: headerParameters,
1494
+ query: queryParameters,
1495
+ body: UpdateCompositionStatusRequestToJSON(requestParameters['updateCompositionStatusRequest']),
1496
+ }, initOverrides);
1497
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
1498
+ }
1499
+ /**
1500
+ * Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
1501
+ * Update Composition Status
1502
+ */
1503
+ async updateCompositionStatus(requestParameters, initOverrides) {
1504
+ const response = await this.updateCompositionStatusRaw(requestParameters, initOverrides);
1505
+ return await response.value();
1506
+ }
1507
+ /**
1508
+ * 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.
1509
+ * Update Composition
1510
+ */
1511
+ async updateCompositionRaw(requestParameters, initOverrides) {
1512
+ if (requestParameters['id'] == null) {
1513
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateComposition().');
1514
+ }
1515
+ if (requestParameters['idempotencyKey'] == null) {
1516
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling updateComposition().');
1517
+ }
1518
+ if (requestParameters['updateComposition'] == null) {
1519
+ throw new runtime.RequiredError('updateComposition', 'Required parameter "updateComposition" was null or undefined when calling updateComposition().');
1520
+ }
1521
+ const queryParameters = {};
1522
+ const headerParameters = {};
1523
+ headerParameters['Content-Type'] = 'application/json';
1524
+ if (requestParameters['idempotencyKey'] != null) {
1525
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1526
+ }
1527
+ if (requestParameters['xManagedUserId'] != null) {
1528
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1529
+ }
1530
+ if (requestParameters['xManagedUserExternalId'] != null) {
1531
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1532
+ }
1533
+ if (this.configuration && this.configuration.accessToken) {
1534
+ const token = this.configuration.accessToken;
1535
+ const tokenString = await token("apiKeyAuth", []);
1536
+ if (tokenString) {
1537
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1538
+ }
1539
+ }
1540
+ const response = await this.request({
1541
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1542
+ method: 'PUT',
1543
+ headers: headerParameters,
1544
+ query: queryParameters,
1545
+ body: UpdateCompositionToJSON(requestParameters['updateComposition']),
1546
+ }, initOverrides);
1547
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
1548
+ }
1549
+ /**
1550
+ * 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.
1551
+ * Update Composition
1552
+ */
1553
+ async updateComposition(requestParameters, initOverrides) {
1554
+ const response = await this.updateCompositionRaw(requestParameters, initOverrides);
1555
+ return await response.value();
1556
+ }
1557
+ /**
1558
+ * Checks content against the composition\'s widget schema without saving it. Send what a content update (`PUT /compositions/{id}/content`) would store, `{ \"design\": {...}, \"content\": {...} }`, or the widget\'s values alone. Each value is checked by the kind of field the widget declares for it: text, a number within the limits of its slider, true or false, one of the choices of a dropdown, a color, a font, the address of an image, a date. The items of the widget\'s list are checked the same way, and their number against the limits of the list. A value that cannot be what the field holds, or a number outside its range, is an error and `valid` is false. Text longer than the field takes, a number or true/false sent as text, and a name the widget has no field for are warnings, and `valid` stays true. The design is not checked here. Nothing is saved and nothing in the body is changed.
1559
+ * Validate Content
1560
+ */
1561
+ async validateCompositionContentRaw(requestParameters, initOverrides) {
1562
+ if (requestParameters['id'] == null) {
1563
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling validateCompositionContent().');
1564
+ }
1565
+ if (requestParameters['idempotencyKey'] == null) {
1566
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling validateCompositionContent().');
1567
+ }
1568
+ if (requestParameters['requestBody'] == null) {
1569
+ throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling validateCompositionContent().');
1570
+ }
1571
+ const queryParameters = {};
1572
+ const headerParameters = {};
1573
+ headerParameters['Content-Type'] = 'application/json';
1574
+ if (requestParameters['idempotencyKey'] != null) {
1575
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1576
+ }
1577
+ if (requestParameters['xManagedUserId'] != null) {
1578
+ headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
1579
+ }
1580
+ if (requestParameters['xManagedUserExternalId'] != null) {
1581
+ headerParameters['X-Managed-User-External-Id'] = String(requestParameters['xManagedUserExternalId']);
1582
+ }
1583
+ if (this.configuration && this.configuration.accessToken) {
1584
+ const token = this.configuration.accessToken;
1585
+ const tokenString = await token("apiKeyAuth", []);
1586
+ if (tokenString) {
1587
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1588
+ }
1589
+ }
1590
+ const response = await this.request({
1591
+ path: `/compositions/{id}/content/validate`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1592
+ method: 'POST',
1593
+ headers: headerParameters,
1594
+ query: queryParameters,
1595
+ body: requestParameters['requestBody'],
1596
+ }, initOverrides);
1597
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidateCompositionContentResponseFromJSON(jsonValue));
1598
+ }
1599
+ /**
1600
+ * Checks content against the composition\'s widget schema without saving it. Send what a content update (`PUT /compositions/{id}/content`) would store, `{ \"design\": {...}, \"content\": {...} }`, or the widget\'s values alone. Each value is checked by the kind of field the widget declares for it: text, a number within the limits of its slider, true or false, one of the choices of a dropdown, a color, a font, the address of an image, a date. The items of the widget\'s list are checked the same way, and their number against the limits of the list. A value that cannot be what the field holds, or a number outside its range, is an error and `valid` is false. Text longer than the field takes, a number or true/false sent as text, and a name the widget has no field for are warnings, and `valid` stays true. The design is not checked here. Nothing is saved and nothing in the body is changed.
1601
+ * Validate Content
1602
+ */
1603
+ async validateCompositionContent(requestParameters, initOverrides) {
1604
+ const response = await this.validateCompositionContentRaw(requestParameters, initOverrides);
1605
+ return await response.value();
1606
+ }
1607
+ }
1608
+ /**
1609
+ * @export
1610
+ */
1611
+ export const GetAllCompositions0WorkspaceEnum = {
1612
+ True: 'true',
1613
+ False: 'false'
1614
+ };
1615
+ /**
1616
+ * @export
1617
+ */
1618
+ export const GetAllCompositions0StatusEnum = {
1619
+ Draft: 'draft',
1620
+ Published: 'published',
1621
+ Archived: 'archived'
1622
+ };