@widgetic/api-sdk 1.0.29 → 1.0.31

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 (547) hide show
  1. package/dist/apis/AdminApi.d.ts +3 -2
  2. package/dist/apis/AdminApi.js +3 -2
  3. package/dist/apis/AgentRepositoryManagementApi.d.ts +32 -0
  4. package/dist/apis/AgentRepositoryManagementApi.js +75 -0
  5. package/dist/apis/BillingApi.d.ts +3 -3
  6. package/dist/apis/BillingApi.js +1 -1
  7. package/dist/apis/CompositionsApi.d.ts +182 -83
  8. package/dist/apis/CompositionsApi.js +368 -84
  9. package/dist/apis/CreditsApi.d.ts +6 -6
  10. package/dist/apis/EnterpriseCustomizationsApi.d.ts +87 -0
  11. package/dist/apis/EnterpriseCustomizationsApi.js +233 -0
  12. package/dist/apis/InvoicesApi.d.ts +6 -6
  13. package/dist/apis/InvoicesApi.js +2 -2
  14. package/dist/apis/ManagedUsersApi.d.ts +104 -27
  15. package/dist/apis/ManagedUsersApi.js +247 -12
  16. package/dist/apis/OperationsApi.d.ts +3 -3
  17. package/dist/apis/PartnerApi.d.ts +1230 -0
  18. package/dist/apis/PartnerApi.js +3376 -0
  19. package/dist/apis/PartnersApi.d.ts +83 -43
  20. package/dist/apis/PartnersApi.js +119 -0
  21. package/dist/apis/PublicEmbedApi.d.ts +33 -0
  22. package/dist/apis/PublicEmbedApi.js +71 -0
  23. package/dist/apis/UIComponentsApi.d.ts +96 -0
  24. package/dist/apis/UIComponentsApi.js +209 -0
  25. package/dist/apis/UploadsApi.d.ts +29 -16
  26. package/dist/apis/UploadsApi.js +40 -3
  27. package/dist/apis/UsersApi.d.ts +27 -27
  28. package/dist/apis/WidgetsApi.d.ts +33 -18
  29. package/dist/apis/WidgetsApi.js +84 -39
  30. package/dist/apis/WorkflowsApi.d.ts +44 -0
  31. package/dist/apis/WorkflowsApi.js +111 -0
  32. package/dist/apis/index.d.ts +6 -0
  33. package/dist/apis/index.js +6 -0
  34. package/dist/esm/apis/AdminApi.d.ts +3 -2
  35. package/dist/esm/apis/AdminApi.js +3 -2
  36. package/dist/esm/apis/AgentRepositoryManagementApi.d.ts +32 -0
  37. package/dist/esm/apis/AgentRepositoryManagementApi.js +71 -0
  38. package/dist/esm/apis/BillingApi.d.ts +3 -3
  39. package/dist/esm/apis/BillingApi.js +2 -2
  40. package/dist/esm/apis/CompositionsApi.d.ts +182 -83
  41. package/dist/esm/apis/CompositionsApi.js +368 -84
  42. package/dist/esm/apis/CreditsApi.d.ts +6 -6
  43. package/dist/esm/apis/EnterpriseCustomizationsApi.d.ts +87 -0
  44. package/dist/esm/apis/EnterpriseCustomizationsApi.js +229 -0
  45. package/dist/esm/apis/InvoicesApi.d.ts +6 -6
  46. package/dist/esm/apis/InvoicesApi.js +1 -1
  47. package/dist/esm/apis/ManagedUsersApi.d.ts +104 -27
  48. package/dist/esm/apis/ManagedUsersApi.js +248 -13
  49. package/dist/esm/apis/OperationsApi.d.ts +3 -3
  50. package/dist/esm/apis/PartnerApi.d.ts +1230 -0
  51. package/dist/esm/apis/PartnerApi.js +3372 -0
  52. package/dist/esm/apis/PartnersApi.d.ts +83 -43
  53. package/dist/esm/apis/PartnersApi.js +120 -1
  54. package/dist/esm/apis/PublicEmbedApi.d.ts +33 -0
  55. package/dist/esm/apis/PublicEmbedApi.js +67 -0
  56. package/dist/esm/apis/UIComponentsApi.d.ts +96 -0
  57. package/dist/esm/apis/UIComponentsApi.js +205 -0
  58. package/dist/esm/apis/UploadsApi.d.ts +29 -16
  59. package/dist/esm/apis/UploadsApi.js +40 -3
  60. package/dist/esm/apis/UsersApi.d.ts +27 -27
  61. package/dist/esm/apis/WidgetsApi.d.ts +33 -18
  62. package/dist/esm/apis/WidgetsApi.js +85 -40
  63. package/dist/esm/apis/WorkflowsApi.d.ts +44 -0
  64. package/dist/esm/apis/WorkflowsApi.js +107 -0
  65. package/dist/esm/apis/index.d.ts +6 -0
  66. package/dist/esm/apis/index.js +6 -0
  67. package/dist/esm/models/AgentRepositoriesRepoIdSyncPost202Response.d.ts +32 -0
  68. package/dist/esm/models/AgentRepositoriesRepoIdSyncPost202Response.js +41 -0
  69. package/dist/esm/models/AgentRepositoriesRepoIdSyncPostRequest.d.ts +32 -0
  70. package/dist/esm/models/AgentRepositoriesRepoIdSyncPostRequest.js +43 -0
  71. package/dist/esm/models/AgentTasksTaskIdStatusPutRequest.d.ts +54 -0
  72. package/dist/esm/models/AgentTasksTaskIdStatusPutRequest.js +60 -0
  73. package/dist/esm/models/ApiV1AdminBillingGrantsGrantIdRejectPostRequest.d.ts +32 -0
  74. package/dist/esm/models/ApiV1AdminBillingGrantsGrantIdRejectPostRequest.js +41 -0
  75. package/dist/esm/models/ApiV1AdminBillingGrantsPostRequest.d.ts +82 -0
  76. package/dist/esm/models/ApiV1AdminBillingGrantsPostRequest.js +79 -0
  77. package/dist/esm/models/ApiV1AdminBillingPlansPricesBackfillPostRequest.d.ts +32 -0
  78. package/dist/esm/models/ApiV1AdminBillingPlansPricesBackfillPostRequest.js +41 -0
  79. package/dist/esm/models/ApiV1AdminBillingPlansPricesPlanTypeBillingFrequencyPutRequest.d.ts +32 -0
  80. package/dist/esm/models/ApiV1AdminBillingPlansPricesPlanTypeBillingFrequencyPutRequest.js +43 -0
  81. package/dist/esm/models/ApiV1AdminBillingRefundsPostRequest.d.ts +64 -0
  82. package/dist/esm/models/ApiV1AdminBillingRefundsPostRequest.js +60 -0
  83. package/dist/esm/models/ApiV1AdminBillingRefundsPreviewPost200Response.d.ts +71 -0
  84. package/dist/esm/models/ApiV1AdminBillingRefundsPreviewPost200Response.js +59 -0
  85. package/dist/esm/models/ApiV1AdminBillingRefundsPreviewPost200ResponseOrganizationPreview.d.ts +51 -0
  86. package/dist/esm/models/ApiV1AdminBillingRefundsPreviewPost200ResponseOrganizationPreview.js +48 -0
  87. package/dist/esm/models/ApiV1AdminBillingRefundsPreviewPostRequest.d.ts +70 -0
  88. package/dist/esm/models/ApiV1AdminBillingRefundsPreviewPostRequest.js +62 -0
  89. package/dist/esm/models/ApiV1AdminBillingSubscriptionsSubjectIdCancelPostRequest.d.ts +46 -0
  90. package/dist/esm/models/ApiV1AdminBillingSubscriptionsSubjectIdCancelPostRequest.js +52 -0
  91. package/dist/esm/models/ApiV1BillingPricingGet200Response.d.ts +39 -0
  92. package/dist/esm/models/ApiV1BillingPricingGet200Response.js +44 -0
  93. package/dist/esm/models/ApiV1BillingPricingGet200ResponseData.d.ts +46 -0
  94. package/dist/esm/models/ApiV1BillingPricingGet200ResponseData.js +47 -0
  95. package/dist/esm/models/ApiV1BillingPricingGet200ResponseDataPlansInner.d.ts +68 -0
  96. package/dist/esm/models/ApiV1BillingPricingGet200ResponseDataPlansInner.js +53 -0
  97. package/dist/esm/models/ApiV1BillingPricingGet200ResponseDataTrial.d.ts +44 -0
  98. package/dist/esm/models/ApiV1BillingPricingGet200ResponseDataTrial.js +45 -0
  99. package/dist/esm/models/ApiV1BillingUsersUserIdInvoicesGet200Response.d.ts +39 -0
  100. package/dist/esm/models/ApiV1BillingUsersUserIdInvoicesGet200Response.js +44 -0
  101. package/dist/esm/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseData.d.ts +33 -0
  102. package/dist/esm/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseData.js +42 -0
  103. package/dist/esm/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseDataInvoicesInner.d.ts +68 -0
  104. package/dist/esm/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseDataInvoicesInner.js +53 -0
  105. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200Response.d.ts +39 -0
  106. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200Response.js +44 -0
  107. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200ResponseData.d.ts +32 -0
  108. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200ResponseData.js +41 -0
  109. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.d.ts +39 -0
  110. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.js +44 -0
  111. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.d.ts +32 -0
  112. package/dist/esm/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.js +41 -0
  113. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200Response.d.ts +39 -0
  114. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200Response.js +44 -0
  115. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200ResponseData.d.ts +32 -0
  116. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200ResponseData.js +41 -0
  117. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionCancelPostRequest.d.ts +32 -0
  118. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionCancelPostRequest.js +41 -0
  119. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionGet200Response.d.ts +39 -0
  120. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionGet200Response.js +44 -0
  121. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionGet200ResponseData.d.ts +120 -0
  122. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionGet200ResponseData.js +76 -0
  123. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPayPost200Response.d.ts +39 -0
  124. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPayPost200Response.js +44 -0
  125. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPayPost200ResponseData.d.ts +38 -0
  126. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPayPost200ResponseData.js +43 -0
  127. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPost200Response.d.ts +39 -0
  128. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPost200Response.js +44 -0
  129. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPost200ResponseData.d.ts +38 -0
  130. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPost200ResponseData.js +43 -0
  131. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPostRequest.d.ts +53 -0
  132. package/dist/esm/models/ApiV1BillingUsersUserIdSubscriptionPostRequest.js +58 -0
  133. package/dist/esm/models/ApiV1MetricsGet200Response.d.ts +39 -0
  134. package/dist/esm/models/ApiV1MetricsGet200Response.js +44 -0
  135. package/dist/esm/models/ApiV1MetricsGet200ResponseData.d.ts +56 -0
  136. package/dist/esm/models/ApiV1MetricsGet200ResponseData.js +50 -0
  137. package/dist/esm/models/ApiV1MetricsGet200ResponseDataErrorsValue.d.ts +44 -0
  138. package/dist/esm/models/ApiV1MetricsGet200ResponseDataErrorsValue.js +45 -0
  139. package/dist/esm/models/ApiV1MetricsGet200ResponseDataLatencyValue.d.ts +50 -0
  140. package/dist/esm/models/ApiV1MetricsGet200ResponseDataLatencyValue.js +47 -0
  141. package/dist/esm/models/ApiV1MetricsLatencyGet200Response.d.ts +41 -0
  142. package/dist/esm/models/ApiV1MetricsLatencyGet200Response.js +45 -0
  143. package/dist/esm/models/ApiV1MetricsLatencyGet200ResponseDataValue.d.ts +62 -0
  144. package/dist/esm/models/ApiV1MetricsLatencyGet200ResponseDataValue.js +51 -0
  145. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPost200Response.d.ts +71 -0
  146. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPost200Response.js +59 -0
  147. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreview.d.ts +51 -0
  148. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreview.js +48 -0
  149. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreviewSharesInner.d.ts +38 -0
  150. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreviewSharesInner.js +43 -0
  151. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPostRequest.d.ts +44 -0
  152. package/dist/esm/models/ApiV1SubscriptionsIdRefundPreviewPostRequest.js +45 -0
  153. package/dist/esm/models/CancelCurrentSubscription200Response.d.ts +45 -0
  154. package/dist/esm/models/CancelCurrentSubscription200Response.js +46 -0
  155. package/dist/esm/models/CancelCurrentSubscriptionRequest.d.ts +44 -0
  156. package/dist/esm/models/CancelCurrentSubscriptionRequest.js +45 -0
  157. package/dist/esm/models/CanvasesCanvasIdComponentsComponentIdPublishPost202Response.d.ts +38 -0
  158. package/dist/esm/models/CanvasesCanvasIdComponentsComponentIdPublishPost202Response.js +43 -0
  159. package/dist/esm/models/CanvasesCanvasIdComponentsComponentIdPublishPostRequest.d.ts +38 -0
  160. package/dist/esm/models/CanvasesCanvasIdComponentsComponentIdPublishPostRequest.js +47 -0
  161. package/dist/esm/models/ComponentManifest.d.ts +52 -0
  162. package/dist/esm/models/ComponentManifest.js +49 -0
  163. package/dist/esm/models/ComponentManifestAssets.d.ts +38 -0
  164. package/dist/esm/models/ComponentManifestAssets.js +43 -0
  165. package/dist/esm/models/ComponentManifestConfig.d.ts +44 -0
  166. package/dist/esm/models/ComponentManifestConfig.js +45 -0
  167. package/dist/esm/models/Composition.d.ts +6 -0
  168. package/dist/esm/models/Composition.js +2 -0
  169. package/dist/esm/models/CompositionEntryAggregateTally.d.ts +62 -0
  170. package/dist/esm/models/CompositionEntryAggregateTally.js +51 -0
  171. package/dist/esm/models/CompositionEntryAggregatesBlock.d.ts +45 -0
  172. package/dist/esm/models/CompositionEntryAggregatesBlock.js +50 -0
  173. package/dist/esm/models/CompositionEntryDeleteSuccess.d.ts +39 -0
  174. package/dist/esm/models/CompositionEntryDeleteSuccess.js +48 -0
  175. package/dist/esm/models/CompositionEntryDeleteSuccessData.d.ts +32 -0
  176. package/dist/esm/models/CompositionEntryDeleteSuccessData.js +43 -0
  177. package/dist/esm/models/CompositionEntryItem.d.ts +60 -0
  178. package/dist/esm/models/CompositionEntryItem.js +57 -0
  179. package/dist/esm/models/CompositionEntryItemsMeta.d.ts +51 -0
  180. package/dist/esm/models/CompositionEntryItemsMeta.js +55 -0
  181. package/dist/esm/models/CompositionEntryItemsPageSuccess.d.ts +46 -0
  182. package/dist/esm/models/CompositionEntryItemsPageSuccess.js +53 -0
  183. package/dist/esm/models/CreateCanvasRequest.d.ts +6 -0
  184. package/dist/esm/models/CreateCanvasRequest.js +2 -0
  185. package/dist/esm/models/CreateCheckoutSession200Response.d.ts +38 -0
  186. package/dist/esm/models/CreateCheckoutSession200Response.js +43 -0
  187. package/dist/esm/models/CreateCheckoutSessionRequest.d.ts +32 -0
  188. package/dist/esm/models/CreateCheckoutSessionRequest.js +43 -0
  189. package/dist/esm/models/CreateCompositionContentItemRequest.d.ts +33 -0
  190. package/dist/esm/models/CreateCompositionContentItemRequest.js +37 -0
  191. package/dist/esm/models/CreateCompositionFromPresetRequest.d.ts +56 -0
  192. package/dist/esm/models/CreateCompositionFromPresetRequest.js +51 -0
  193. package/dist/esm/models/CreateCompositionFromWidget201Response.d.ts +39 -0
  194. package/dist/esm/models/CreateCompositionFromWidget201Response.js +44 -0
  195. package/dist/esm/models/CreateCompositionFromWidgetRequest.d.ts +62 -0
  196. package/dist/esm/models/CreateCompositionFromWidgetRequest.js +53 -0
  197. package/dist/esm/models/DeleteCompositionContentItem200Response.d.ts +38 -0
  198. package/dist/esm/models/DeleteCompositionContentItem200Response.js +43 -0
  199. package/dist/esm/models/DevelopmentPlan.d.ts +97 -0
  200. package/dist/esm/models/DevelopmentPlan.js +69 -0
  201. package/dist/esm/models/DevelopmentTask.d.ts +90 -0
  202. package/dist/esm/models/DevelopmentTask.js +66 -0
  203. package/dist/esm/models/EnterpriseCustomization.d.ts +125 -0
  204. package/dist/esm/models/EnterpriseCustomization.js +77 -0
  205. package/dist/esm/models/ExportCompositionEntryItems200Response.d.ts +46 -0
  206. package/dist/esm/models/ExportCompositionEntryItems200Response.js +53 -0
  207. package/dist/esm/models/ExportCompositionEntryItems200ResponseMeta.d.ts +38 -0
  208. package/dist/esm/models/ExportCompositionEntryItems200ResponseMeta.js +47 -0
  209. package/dist/esm/models/GenerateComponentWorkflowInput.d.ts +56 -0
  210. package/dist/esm/models/GenerateComponentWorkflowInput.js +55 -0
  211. package/dist/esm/models/GenerateMixedComponentInput.d.ts +62 -0
  212. package/dist/esm/models/GenerateMixedComponentInput.js +59 -0
  213. package/dist/esm/models/GetCompositionContentSchema200Response.d.ts +2 -2
  214. package/dist/esm/models/GetManagedUserLimits200Response.d.ts +39 -0
  215. package/dist/esm/models/GetManagedUserLimits200Response.js +44 -0
  216. package/dist/esm/models/GetManagedUserLimits200ResponseData.d.ts +50 -0
  217. package/dist/esm/models/GetManagedUserLimits200ResponseData.js +55 -0
  218. package/dist/esm/models/GetManagedUserStorageUsage200Response.d.ts +39 -0
  219. package/dist/esm/models/GetManagedUserStorageUsage200Response.js +44 -0
  220. package/dist/esm/models/GetManagedUserStorageUsage200ResponseData.d.ts +45 -0
  221. package/dist/esm/models/GetManagedUserStorageUsage200ResponseData.js +52 -0
  222. package/dist/esm/models/GetManagedUserStorageUsage200ResponseDataByPurpose.d.ts +51 -0
  223. package/dist/esm/models/GetManagedUserStorageUsage200ResponseDataByPurpose.js +48 -0
  224. package/dist/esm/models/GetOrganizationStorageUsage200ResponseDataBreakdown.d.ts +44 -0
  225. package/dist/esm/models/GetOrganizationStorageUsage200ResponseDataBreakdown.js +45 -0
  226. package/dist/esm/models/GetPartnerDesignDefaults200Response.d.ts +39 -0
  227. package/dist/esm/models/GetPartnerDesignDefaults200Response.js +44 -0
  228. package/dist/esm/models/GetPartnerDesignDefaults200ResponseData.d.ts +32 -0
  229. package/dist/esm/models/GetPartnerDesignDefaults200ResponseData.js +41 -0
  230. package/dist/esm/models/ListComponents200Response.d.ts +33 -0
  231. package/dist/esm/models/ListComponents200Response.js +42 -0
  232. package/dist/esm/models/ListEnterpriseCustomizations200Response.d.ts +40 -0
  233. package/dist/esm/models/ListEnterpriseCustomizations200Response.js +45 -0
  234. package/dist/esm/models/ListEnterpriseCustomizations200ResponsePagination.d.ts +50 -0
  235. package/dist/esm/models/ListEnterpriseCustomizations200ResponsePagination.js +47 -0
  236. package/dist/esm/models/ManagedUserEntriesMeta.d.ts +56 -0
  237. package/dist/esm/models/ManagedUserEntriesMeta.js +57 -0
  238. package/dist/esm/models/ManagedUserEntriesPageSuccess.d.ts +46 -0
  239. package/dist/esm/models/ManagedUserEntriesPageSuccess.js +53 -0
  240. package/dist/esm/models/ManagedUserEntryItem.d.ts +72 -0
  241. package/dist/esm/models/ManagedUserEntryItem.js +65 -0
  242. package/dist/esm/models/MountRequest.d.ts +45 -0
  243. package/dist/esm/models/MountRequest.js +48 -0
  244. package/dist/esm/models/MountRequestTheme.d.ts +54 -0
  245. package/dist/esm/models/MountRequestTheme.js +54 -0
  246. package/dist/esm/models/MountRequestThemeColors.d.ts +50 -0
  247. package/dist/esm/models/MountRequestThemeColors.js +47 -0
  248. package/dist/esm/models/MountRequestThemeTypography.d.ts +38 -0
  249. package/dist/esm/models/MountRequestThemeTypography.js +43 -0
  250. package/dist/esm/models/MountResponse.d.ts +46 -0
  251. package/dist/esm/models/MountResponse.js +50 -0
  252. package/dist/esm/models/NewWidgetComponentsMetadataInner.d.ts +64 -0
  253. package/dist/esm/models/NewWidgetComponentsMetadataInner.js +53 -0
  254. package/dist/esm/models/NewWidgetComponentsMetadataInnerPosition.d.ts +38 -0
  255. package/dist/esm/models/NewWidgetComponentsMetadataInnerPosition.js +43 -0
  256. package/dist/esm/models/NewWidgetComponentsMetadataInnerSize.d.ts +38 -0
  257. package/dist/esm/models/NewWidgetComponentsMetadataInnerSize.js +43 -0
  258. package/dist/esm/models/PartnerNotification.d.ts +1 -1
  259. package/dist/esm/models/PartnerNotificationDelivery.d.ts +6 -0
  260. package/dist/esm/models/PartnerNotificationDelivery.js +4 -0
  261. package/dist/esm/models/PartnerNotificationEvent.d.ts +15 -0
  262. package/dist/esm/models/PartnerNotificationEvent.js +13 -1
  263. package/dist/esm/models/PartnerNotificationEventType.d.ts +4 -0
  264. package/dist/esm/models/PartnerNotificationEventType.js +5 -1
  265. package/dist/esm/models/PublicCompositionEntryCreated.d.ts +39 -0
  266. package/dist/esm/models/PublicCompositionEntryCreated.js +48 -0
  267. package/dist/esm/models/PublicCompositionEntryCreatedData.d.ts +44 -0
  268. package/dist/esm/models/PublicCompositionEntryCreatedData.js +51 -0
  269. package/dist/esm/models/PublicCompositionEntryRequest.d.ts +40 -0
  270. package/dist/esm/models/PublicCompositionEntryRequest.js +45 -0
  271. package/dist/esm/models/PurchaseStoragePack200ResponseDataPaymentIntent.d.ts +50 -0
  272. package/dist/esm/models/PurchaseStoragePack200ResponseDataPaymentIntent.js +47 -0
  273. package/dist/esm/models/PurposeStorageBucket.d.ts +38 -0
  274. package/dist/esm/models/PurposeStorageBucket.js +47 -0
  275. package/dist/esm/models/RollbackComponentRequest.d.ts +38 -0
  276. package/dist/esm/models/RollbackComponentRequest.js +45 -0
  277. package/dist/esm/models/SetCompositionDataSourceRequest.d.ts +38 -0
  278. package/dist/esm/models/SetCompositionDataSourceRequest.js +47 -0
  279. package/dist/esm/models/SetDynamicContent200Response.d.ts +6 -0
  280. package/dist/esm/models/SetDynamicContent200Response.js +2 -0
  281. package/dist/esm/models/SetManagedUserLimitsRequest.d.ts +32 -0
  282. package/dist/esm/models/SetManagedUserLimitsRequest.js +43 -0
  283. package/dist/esm/models/SetPartnerDesignDefaultsRequest.d.ts +32 -0
  284. package/dist/esm/models/SetPartnerDesignDefaultsRequest.js +43 -0
  285. package/dist/esm/models/UIComponent.d.ts +65 -0
  286. package/dist/esm/models/UIComponent.js +57 -0
  287. package/dist/esm/models/UpdateCompositionRequest.d.ts +38 -0
  288. package/dist/esm/models/UpdateCompositionRequest.js +43 -0
  289. package/dist/esm/models/UpdateCurrentSubscriptionRequest.d.ts +38 -0
  290. package/dist/esm/models/UpdateCurrentSubscriptionRequest.js +43 -0
  291. package/dist/esm/models/UpdateEnterpriseCustomizationRequest.d.ts +95 -0
  292. package/dist/esm/models/UpdateEnterpriseCustomizationRequest.js +67 -0
  293. package/dist/esm/models/Upload.d.ts +15 -0
  294. package/dist/esm/models/Upload.js +10 -0
  295. package/dist/esm/models/UploadsIdDelete200Response.d.ts +39 -0
  296. package/dist/esm/models/UploadsIdDelete200Response.js +44 -0
  297. package/dist/esm/models/UploadsIdDelete200ResponseData.d.ts +32 -0
  298. package/dist/esm/models/UploadsIdDelete200ResponseData.js +41 -0
  299. package/dist/esm/models/WorkflowAcceptedResponse.d.ts +38 -0
  300. package/dist/esm/models/WorkflowAcceptedResponse.js +43 -0
  301. package/dist/esm/models/index.d.ts +109 -2
  302. package/dist/esm/models/index.js +109 -2
  303. package/dist/models/AgentRepositoriesRepoIdSyncPost202Response.d.ts +32 -0
  304. package/dist/models/AgentRepositoriesRepoIdSyncPost202Response.js +48 -0
  305. package/dist/models/AgentRepositoriesRepoIdSyncPostRequest.d.ts +32 -0
  306. package/dist/models/AgentRepositoriesRepoIdSyncPostRequest.js +50 -0
  307. package/dist/models/AgentTasksTaskIdStatusPutRequest.d.ts +54 -0
  308. package/dist/models/AgentTasksTaskIdStatusPutRequest.js +68 -0
  309. package/dist/models/ApiV1AdminBillingGrantsGrantIdRejectPostRequest.d.ts +32 -0
  310. package/dist/models/ApiV1AdminBillingGrantsGrantIdRejectPostRequest.js +48 -0
  311. package/dist/models/ApiV1AdminBillingGrantsPostRequest.d.ts +82 -0
  312. package/dist/models/ApiV1AdminBillingGrantsPostRequest.js +87 -0
  313. package/dist/models/ApiV1AdminBillingPlansPricesBackfillPostRequest.d.ts +32 -0
  314. package/dist/models/ApiV1AdminBillingPlansPricesBackfillPostRequest.js +48 -0
  315. package/dist/models/ApiV1AdminBillingPlansPricesPlanTypeBillingFrequencyPutRequest.d.ts +32 -0
  316. package/dist/models/ApiV1AdminBillingPlansPricesPlanTypeBillingFrequencyPutRequest.js +50 -0
  317. package/dist/models/ApiV1AdminBillingRefundsPostRequest.d.ts +64 -0
  318. package/dist/models/ApiV1AdminBillingRefundsPostRequest.js +68 -0
  319. package/dist/models/ApiV1AdminBillingRefundsPreviewPost200Response.d.ts +71 -0
  320. package/dist/models/ApiV1AdminBillingRefundsPreviewPost200Response.js +67 -0
  321. package/dist/models/ApiV1AdminBillingRefundsPreviewPost200ResponseOrganizationPreview.d.ts +51 -0
  322. package/dist/models/ApiV1AdminBillingRefundsPreviewPost200ResponseOrganizationPreview.js +55 -0
  323. package/dist/models/ApiV1AdminBillingRefundsPreviewPostRequest.d.ts +70 -0
  324. package/dist/models/ApiV1AdminBillingRefundsPreviewPostRequest.js +70 -0
  325. package/dist/models/ApiV1AdminBillingSubscriptionsSubjectIdCancelPostRequest.d.ts +46 -0
  326. package/dist/models/ApiV1AdminBillingSubscriptionsSubjectIdCancelPostRequest.js +60 -0
  327. package/dist/models/ApiV1BillingPricingGet200Response.d.ts +39 -0
  328. package/dist/models/ApiV1BillingPricingGet200Response.js +51 -0
  329. package/dist/models/ApiV1BillingPricingGet200ResponseData.d.ts +46 -0
  330. package/dist/models/ApiV1BillingPricingGet200ResponseData.js +54 -0
  331. package/dist/models/ApiV1BillingPricingGet200ResponseDataPlansInner.d.ts +68 -0
  332. package/dist/models/ApiV1BillingPricingGet200ResponseDataPlansInner.js +60 -0
  333. package/dist/models/ApiV1BillingPricingGet200ResponseDataTrial.d.ts +44 -0
  334. package/dist/models/ApiV1BillingPricingGet200ResponseDataTrial.js +52 -0
  335. package/dist/models/ApiV1BillingUsersUserIdInvoicesGet200Response.d.ts +39 -0
  336. package/dist/models/ApiV1BillingUsersUserIdInvoicesGet200Response.js +51 -0
  337. package/dist/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseData.d.ts +33 -0
  338. package/dist/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseData.js +49 -0
  339. package/dist/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseDataInvoicesInner.d.ts +68 -0
  340. package/dist/models/ApiV1BillingUsersUserIdInvoicesGet200ResponseDataInvoicesInner.js +60 -0
  341. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200Response.d.ts +39 -0
  342. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200Response.js +51 -0
  343. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200ResponseData.d.ts +32 -0
  344. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200ResponseData.js +48 -0
  345. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.d.ts +39 -0
  346. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.js +51 -0
  347. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.d.ts +32 -0
  348. package/dist/models/ApiV1BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.js +48 -0
  349. package/dist/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200Response.d.ts +39 -0
  350. package/dist/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200Response.js +51 -0
  351. package/dist/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200ResponseData.d.ts +32 -0
  352. package/dist/models/ApiV1BillingUsersUserIdSubscriptionCancelPost200ResponseData.js +48 -0
  353. package/dist/models/ApiV1BillingUsersUserIdSubscriptionCancelPostRequest.d.ts +32 -0
  354. package/dist/models/ApiV1BillingUsersUserIdSubscriptionCancelPostRequest.js +48 -0
  355. package/dist/models/ApiV1BillingUsersUserIdSubscriptionGet200Response.d.ts +39 -0
  356. package/dist/models/ApiV1BillingUsersUserIdSubscriptionGet200Response.js +51 -0
  357. package/dist/models/ApiV1BillingUsersUserIdSubscriptionGet200ResponseData.d.ts +120 -0
  358. package/dist/models/ApiV1BillingUsersUserIdSubscriptionGet200ResponseData.js +84 -0
  359. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPayPost200Response.d.ts +39 -0
  360. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPayPost200Response.js +51 -0
  361. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPayPost200ResponseData.d.ts +38 -0
  362. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPayPost200ResponseData.js +50 -0
  363. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPost200Response.d.ts +39 -0
  364. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPost200Response.js +51 -0
  365. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPost200ResponseData.d.ts +38 -0
  366. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPost200ResponseData.js +50 -0
  367. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPostRequest.d.ts +53 -0
  368. package/dist/models/ApiV1BillingUsersUserIdSubscriptionPostRequest.js +66 -0
  369. package/dist/models/ApiV1MetricsGet200Response.d.ts +39 -0
  370. package/dist/models/ApiV1MetricsGet200Response.js +51 -0
  371. package/dist/models/ApiV1MetricsGet200ResponseData.d.ts +56 -0
  372. package/dist/models/ApiV1MetricsGet200ResponseData.js +57 -0
  373. package/dist/models/ApiV1MetricsGet200ResponseDataErrorsValue.d.ts +44 -0
  374. package/dist/models/ApiV1MetricsGet200ResponseDataErrorsValue.js +52 -0
  375. package/dist/models/ApiV1MetricsGet200ResponseDataLatencyValue.d.ts +50 -0
  376. package/dist/models/ApiV1MetricsGet200ResponseDataLatencyValue.js +54 -0
  377. package/dist/models/ApiV1MetricsLatencyGet200Response.d.ts +41 -0
  378. package/dist/models/ApiV1MetricsLatencyGet200Response.js +52 -0
  379. package/dist/models/ApiV1MetricsLatencyGet200ResponseDataValue.d.ts +62 -0
  380. package/dist/models/ApiV1MetricsLatencyGet200ResponseDataValue.js +58 -0
  381. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPost200Response.d.ts +71 -0
  382. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPost200Response.js +67 -0
  383. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreview.d.ts +51 -0
  384. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreview.js +55 -0
  385. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreviewSharesInner.d.ts +38 -0
  386. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPost200ResponseOrganizationPreviewSharesInner.js +50 -0
  387. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPostRequest.d.ts +44 -0
  388. package/dist/models/ApiV1SubscriptionsIdRefundPreviewPostRequest.js +52 -0
  389. package/dist/models/CancelCurrentSubscription200Response.d.ts +45 -0
  390. package/dist/models/CancelCurrentSubscription200Response.js +53 -0
  391. package/dist/models/CancelCurrentSubscriptionRequest.d.ts +44 -0
  392. package/dist/models/CancelCurrentSubscriptionRequest.js +52 -0
  393. package/dist/models/CanvasesCanvasIdComponentsComponentIdPublishPost202Response.d.ts +38 -0
  394. package/dist/models/CanvasesCanvasIdComponentsComponentIdPublishPost202Response.js +50 -0
  395. package/dist/models/CanvasesCanvasIdComponentsComponentIdPublishPostRequest.d.ts +38 -0
  396. package/dist/models/CanvasesCanvasIdComponentsComponentIdPublishPostRequest.js +54 -0
  397. package/dist/models/ComponentManifest.d.ts +52 -0
  398. package/dist/models/ComponentManifest.js +56 -0
  399. package/dist/models/ComponentManifestAssets.d.ts +38 -0
  400. package/dist/models/ComponentManifestAssets.js +50 -0
  401. package/dist/models/ComponentManifestConfig.d.ts +44 -0
  402. package/dist/models/ComponentManifestConfig.js +52 -0
  403. package/dist/models/Composition.d.ts +6 -0
  404. package/dist/models/Composition.js +2 -0
  405. package/dist/models/CompositionEntryAggregateTally.d.ts +62 -0
  406. package/dist/models/CompositionEntryAggregateTally.js +58 -0
  407. package/dist/models/CompositionEntryAggregatesBlock.d.ts +45 -0
  408. package/dist/models/CompositionEntryAggregatesBlock.js +57 -0
  409. package/dist/models/CompositionEntryDeleteSuccess.d.ts +39 -0
  410. package/dist/models/CompositionEntryDeleteSuccess.js +55 -0
  411. package/dist/models/CompositionEntryDeleteSuccessData.d.ts +32 -0
  412. package/dist/models/CompositionEntryDeleteSuccessData.js +50 -0
  413. package/dist/models/CompositionEntryItem.d.ts +60 -0
  414. package/dist/models/CompositionEntryItem.js +64 -0
  415. package/dist/models/CompositionEntryItemsMeta.d.ts +51 -0
  416. package/dist/models/CompositionEntryItemsMeta.js +63 -0
  417. package/dist/models/CompositionEntryItemsPageSuccess.d.ts +46 -0
  418. package/dist/models/CompositionEntryItemsPageSuccess.js +60 -0
  419. package/dist/models/CreateCanvasRequest.d.ts +6 -0
  420. package/dist/models/CreateCanvasRequest.js +2 -0
  421. package/dist/models/CreateCheckoutSession200Response.d.ts +38 -0
  422. package/dist/models/CreateCheckoutSession200Response.js +50 -0
  423. package/dist/models/CreateCheckoutSessionRequest.d.ts +32 -0
  424. package/dist/models/CreateCheckoutSessionRequest.js +50 -0
  425. package/dist/models/CreateCompositionContentItemRequest.d.ts +33 -0
  426. package/dist/models/CreateCompositionContentItemRequest.js +44 -0
  427. package/dist/models/CreateCompositionFromPresetRequest.d.ts +56 -0
  428. package/dist/models/CreateCompositionFromPresetRequest.js +58 -0
  429. package/dist/models/CreateCompositionFromWidget201Response.d.ts +39 -0
  430. package/dist/models/CreateCompositionFromWidget201Response.js +51 -0
  431. package/dist/models/CreateCompositionFromWidgetRequest.d.ts +62 -0
  432. package/dist/models/CreateCompositionFromWidgetRequest.js +60 -0
  433. package/dist/models/DeleteCompositionContentItem200Response.d.ts +38 -0
  434. package/dist/models/DeleteCompositionContentItem200Response.js +50 -0
  435. package/dist/models/DevelopmentPlan.d.ts +97 -0
  436. package/dist/models/DevelopmentPlan.js +77 -0
  437. package/dist/models/DevelopmentTask.d.ts +90 -0
  438. package/dist/models/DevelopmentTask.js +74 -0
  439. package/dist/models/EnterpriseCustomization.d.ts +125 -0
  440. package/dist/models/EnterpriseCustomization.js +85 -0
  441. package/dist/models/ExportCompositionEntryItems200Response.d.ts +46 -0
  442. package/dist/models/ExportCompositionEntryItems200Response.js +60 -0
  443. package/dist/models/ExportCompositionEntryItems200ResponseMeta.d.ts +38 -0
  444. package/dist/models/ExportCompositionEntryItems200ResponseMeta.js +54 -0
  445. package/dist/models/GenerateComponentWorkflowInput.d.ts +56 -0
  446. package/dist/models/GenerateComponentWorkflowInput.js +62 -0
  447. package/dist/models/GenerateMixedComponentInput.d.ts +62 -0
  448. package/dist/models/GenerateMixedComponentInput.js +66 -0
  449. package/dist/models/GetCompositionContentSchema200Response.d.ts +2 -2
  450. package/dist/models/GetManagedUserLimits200Response.d.ts +39 -0
  451. package/dist/models/GetManagedUserLimits200Response.js +51 -0
  452. package/dist/models/GetManagedUserLimits200ResponseData.d.ts +50 -0
  453. package/dist/models/GetManagedUserLimits200ResponseData.js +62 -0
  454. package/dist/models/GetManagedUserStorageUsage200Response.d.ts +39 -0
  455. package/dist/models/GetManagedUserStorageUsage200Response.js +51 -0
  456. package/dist/models/GetManagedUserStorageUsage200ResponseData.d.ts +45 -0
  457. package/dist/models/GetManagedUserStorageUsage200ResponseData.js +59 -0
  458. package/dist/models/GetManagedUserStorageUsage200ResponseDataByPurpose.d.ts +51 -0
  459. package/dist/models/GetManagedUserStorageUsage200ResponseDataByPurpose.js +55 -0
  460. package/dist/models/GetOrganizationStorageUsage200ResponseDataBreakdown.d.ts +44 -0
  461. package/dist/models/GetOrganizationStorageUsage200ResponseDataBreakdown.js +52 -0
  462. package/dist/models/GetPartnerDesignDefaults200Response.d.ts +39 -0
  463. package/dist/models/GetPartnerDesignDefaults200Response.js +51 -0
  464. package/dist/models/GetPartnerDesignDefaults200ResponseData.d.ts +32 -0
  465. package/dist/models/GetPartnerDesignDefaults200ResponseData.js +48 -0
  466. package/dist/models/ListComponents200Response.d.ts +33 -0
  467. package/dist/models/ListComponents200Response.js +49 -0
  468. package/dist/models/ListEnterpriseCustomizations200Response.d.ts +40 -0
  469. package/dist/models/ListEnterpriseCustomizations200Response.js +52 -0
  470. package/dist/models/ListEnterpriseCustomizations200ResponsePagination.d.ts +50 -0
  471. package/dist/models/ListEnterpriseCustomizations200ResponsePagination.js +54 -0
  472. package/dist/models/ManagedUserEntriesMeta.d.ts +56 -0
  473. package/dist/models/ManagedUserEntriesMeta.js +64 -0
  474. package/dist/models/ManagedUserEntriesPageSuccess.d.ts +46 -0
  475. package/dist/models/ManagedUserEntriesPageSuccess.js +60 -0
  476. package/dist/models/ManagedUserEntryItem.d.ts +72 -0
  477. package/dist/models/ManagedUserEntryItem.js +72 -0
  478. package/dist/models/MountRequest.d.ts +45 -0
  479. package/dist/models/MountRequest.js +55 -0
  480. package/dist/models/MountRequestTheme.d.ts +54 -0
  481. package/dist/models/MountRequestTheme.js +62 -0
  482. package/dist/models/MountRequestThemeColors.d.ts +50 -0
  483. package/dist/models/MountRequestThemeColors.js +54 -0
  484. package/dist/models/MountRequestThemeTypography.d.ts +38 -0
  485. package/dist/models/MountRequestThemeTypography.js +50 -0
  486. package/dist/models/MountResponse.d.ts +46 -0
  487. package/dist/models/MountResponse.js +58 -0
  488. package/dist/models/NewWidgetComponentsMetadataInner.d.ts +64 -0
  489. package/dist/models/NewWidgetComponentsMetadataInner.js +60 -0
  490. package/dist/models/NewWidgetComponentsMetadataInnerPosition.d.ts +38 -0
  491. package/dist/models/NewWidgetComponentsMetadataInnerPosition.js +50 -0
  492. package/dist/models/NewWidgetComponentsMetadataInnerSize.d.ts +38 -0
  493. package/dist/models/NewWidgetComponentsMetadataInnerSize.js +50 -0
  494. package/dist/models/PartnerNotification.d.ts +1 -1
  495. package/dist/models/PartnerNotificationDelivery.d.ts +6 -0
  496. package/dist/models/PartnerNotificationDelivery.js +4 -0
  497. package/dist/models/PartnerNotificationEvent.d.ts +15 -0
  498. package/dist/models/PartnerNotificationEvent.js +14 -2
  499. package/dist/models/PartnerNotificationEventType.d.ts +4 -0
  500. package/dist/models/PartnerNotificationEventType.js +5 -1
  501. package/dist/models/PublicCompositionEntryCreated.d.ts +39 -0
  502. package/dist/models/PublicCompositionEntryCreated.js +55 -0
  503. package/dist/models/PublicCompositionEntryCreatedData.d.ts +44 -0
  504. package/dist/models/PublicCompositionEntryCreatedData.js +58 -0
  505. package/dist/models/PublicCompositionEntryRequest.d.ts +40 -0
  506. package/dist/models/PublicCompositionEntryRequest.js +52 -0
  507. package/dist/models/PurchaseStoragePack200ResponseDataPaymentIntent.d.ts +50 -0
  508. package/dist/models/PurchaseStoragePack200ResponseDataPaymentIntent.js +54 -0
  509. package/dist/models/PurposeStorageBucket.d.ts +38 -0
  510. package/dist/models/PurposeStorageBucket.js +54 -0
  511. package/dist/models/RollbackComponentRequest.d.ts +38 -0
  512. package/dist/models/RollbackComponentRequest.js +52 -0
  513. package/dist/models/SetCompositionDataSourceRequest.d.ts +38 -0
  514. package/dist/models/SetCompositionDataSourceRequest.js +54 -0
  515. package/dist/models/SetDynamicContent200Response.d.ts +6 -0
  516. package/dist/models/SetDynamicContent200Response.js +2 -0
  517. package/dist/models/SetManagedUserLimitsRequest.d.ts +32 -0
  518. package/dist/models/SetManagedUserLimitsRequest.js +50 -0
  519. package/dist/models/SetPartnerDesignDefaultsRequest.d.ts +32 -0
  520. package/dist/models/SetPartnerDesignDefaultsRequest.js +50 -0
  521. package/dist/models/UIComponent.d.ts +65 -0
  522. package/dist/models/UIComponent.js +65 -0
  523. package/dist/models/UpdateCompositionRequest.d.ts +38 -0
  524. package/dist/models/UpdateCompositionRequest.js +50 -0
  525. package/dist/models/UpdateCurrentSubscriptionRequest.d.ts +38 -0
  526. package/dist/models/UpdateCurrentSubscriptionRequest.js +50 -0
  527. package/dist/models/UpdateEnterpriseCustomizationRequest.d.ts +95 -0
  528. package/dist/models/UpdateEnterpriseCustomizationRequest.js +75 -0
  529. package/dist/models/Upload.d.ts +15 -0
  530. package/dist/models/Upload.js +11 -1
  531. package/dist/models/UploadsIdDelete200Response.d.ts +39 -0
  532. package/dist/models/UploadsIdDelete200Response.js +51 -0
  533. package/dist/models/UploadsIdDelete200ResponseData.d.ts +32 -0
  534. package/dist/models/UploadsIdDelete200ResponseData.js +48 -0
  535. package/dist/models/WorkflowAcceptedResponse.d.ts +38 -0
  536. package/dist/models/WorkflowAcceptedResponse.js +50 -0
  537. package/dist/models/index.d.ts +109 -2
  538. package/dist/models/index.js +109 -2
  539. package/package.json +1 -1
  540. package/dist/esm/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.d.ts +0 -39
  541. package/dist/esm/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.js +0 -44
  542. package/dist/esm/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.d.ts +0 -32
  543. package/dist/esm/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.js +0 -41
  544. package/dist/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.d.ts +0 -39
  545. package/dist/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200Response.js +0 -51
  546. package/dist/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.d.ts +0 -32
  547. package/dist/models/BillingUsersUserIdPaymentMethodsPaymentMethodIdDelete200ResponseData.js +0 -48
@@ -0,0 +1,3372 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime.js';
24
+ import { AccountCreditBalanceFromJSON, AddDomainRequestToJSON, CompositionEntriesDescriptionFromJSON, CompositionEntriesReadingFromJSON, CompositionEntryDeleteSuccessFromJSON, CompositionEntryItemsPageSuccessFromJSON, CopyPartnerPresetRequestToJSON, CreateCompositionContentItemRequestToJSON, CreateCompositionFromPresetRequestToJSON, CreateCompositionFromWidget201ResponseFromJSON, CreateCompositionFromWidgetRequestToJSON, CreateUserApiKeyRequestToJSON, CreateWidget201ResponseFromJSON, CreatedUserApiKeyFromJSON, DeleteCompositionContentItem200ResponseFromJSON, DeletePersonalWorkspaceDomain200ResponseFromJSON, DeleteUserApiKey200ResponseFromJSON, DuplicateComposition202ResponseFromJSON, DuplicateCompositionRequestToJSON, GetAllCompositions200ResponseFromJSON, GetAllManagedUsers200ResponseFromJSON, GetCompositionContentSchema200ResponseFromJSON, GetCompositionDesignSchema200ResponseFromJSON, GetCompositionEmbedSchema200ResponseFromJSON, GetInvoicesByPartnerId200ResponseFromJSON, GetManagedUserLimits200ResponseFromJSON, GetManagedUserStorageUsage200ResponseFromJSON, GetManagedUsersByManagerId200ResponseFromJSON, GetPartnerDesignDefaults200ResponseFromJSON, GetPersonalWorkspaceDomains200ResponseFromJSON, GetUserApiKeyUsageLogs200ResponseFromJSON, GetUserApiKeys200ResponseFromJSON, GetUserCreditTransactions200ResponseFromJSON, GetWidgets200ResponseFromJSON, ListPartnerPresets200ResponseFromJSON, ManagedUserFromJSON, ManagedUserEntriesPageSuccessFromJSON, NewCompositionToJSON, NewManagedUserToJSON, NewWidgetToJSON, OperationsIdGet200ResponseFromJSON, PartnerContractFromJSON, PartnerNotificationDeliveryFromJSON, PartnerNotificationDeliveryLogFromJSON, PartnerNotificationPageFromJSON, PartnerNotificationSettingsFromJSON, PartnerNotificationSettingsChangeFromJSON, PartnerPresetFromJSON, PartnerPresetCopyFromJSON, PartnerPresetRemovalFromJSON, PartnerStorageDestinationFromJSON, PartnerStorageRemovalFromJSON, PersonalWorkspaceDomainResultFromJSON, SetCompositionDataSourceRequestToJSON, SetDynamicContent200ResponseFromJSON, SetDynamicContentRequestToJSON, SetManagedUserLimitsRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, SetPartnerPresetRequestToJSON, SetPartnerStorageDestinationRequestToJSON, UpdateCompositionToJSON, UpdateDomainRequestToJSON, UpdateManagedUserToJSON, UpdatePartnerNotificationSettingsRequestToJSON, UpdateUserApiKeyRequestToJSON, UploadFromJSON, UploadLimitsFromJSON, UploadsGet200ResponseFromJSON, UploadsIdDelete200ResponseFromJSON, UserApiKeyFromJSON, ValidateToken200ResponseFromJSON, } from '../models/index.js';
25
+ /**
26
+ *
27
+ */
28
+ export class PartnerApi extends runtime.BaseAPI {
29
+ /**
30
+ * Adds a website to an account\'s own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic\'s own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor\'s browser. It is not access control: anyone who knows a widget\'s id can still fetch its published content with a plain request that names no website. An account can list at most 50 websites. Use `*.example.com` for a website and all of its subdomains instead of listing each one.
31
+ * Allow a website to show your widgets
32
+ */
33
+ addPersonalWorkspaceDomainRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['id'] == null) {
36
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addPersonalWorkspaceDomain().');
37
+ }
38
+ if (requestParameters['addDomainRequest'] == null) {
39
+ throw new runtime.RequiredError('addDomainRequest', 'Required parameter "addDomainRequest" was null or undefined when calling addPersonalWorkspaceDomain().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ headerParameters['Content-Type'] = 'application/json';
44
+ if (this.configuration && this.configuration.accessToken) {
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = yield token("apiKeyAuth", []);
47
+ if (tokenString) {
48
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
+ }
50
+ }
51
+ const response = yield this.request({
52
+ path: `/users/{id}/workspace/domains`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ body: AddDomainRequestToJSON(requestParameters['addDomainRequest']),
57
+ }, initOverrides);
58
+ return new runtime.JSONApiResponse(response, (jsonValue) => PersonalWorkspaceDomainResultFromJSON(jsonValue));
59
+ });
60
+ }
61
+ /**
62
+ * Adds a website to an account\'s own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic\'s own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor\'s browser. It is not access control: anyone who knows a widget\'s id can still fetch its published content with a plain request that names no website. An account can list at most 50 websites. Use `*.example.com` for a website and all of its subdomains instead of listing each one.
63
+ * Allow a website to show your widgets
64
+ */
65
+ addPersonalWorkspaceDomain(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const response = yield this.addPersonalWorkspaceDomainRaw(requestParameters, initOverrides);
68
+ return yield response.value();
69
+ });
70
+ }
71
+ /**
72
+ * Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user\'s editor can reach it. The copy carries the preset\'s code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user\'s chat edits begin where yours left off. It does not carry the preset\'s database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset\'s `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
73
+ * Give a managed user a copy of one of your presets
74
+ */
75
+ copyPresetForManagedUserRaw(requestParameters, initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ if (requestParameters['id'] == null) {
78
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling copyPresetForManagedUser().');
79
+ }
80
+ if (requestParameters['key'] == null) {
81
+ throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling copyPresetForManagedUser().');
82
+ }
83
+ const queryParameters = {};
84
+ const headerParameters = {};
85
+ headerParameters['Content-Type'] = 'application/json';
86
+ if (requestParameters['idempotencyKey'] != null) {
87
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
88
+ }
89
+ if (this.configuration && this.configuration.accessToken) {
90
+ const token = this.configuration.accessToken;
91
+ const tokenString = yield token("apiKeyAuth", []);
92
+ if (tokenString) {
93
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
94
+ }
95
+ }
96
+ const response = yield this.request({
97
+ path: `/managed-users/{id}/presets/{key}/copy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
98
+ method: 'POST',
99
+ headers: headerParameters,
100
+ query: queryParameters,
101
+ body: CopyPartnerPresetRequestToJSON(requestParameters['copyPartnerPresetRequest']),
102
+ }, initOverrides);
103
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerPresetCopyFromJSON(jsonValue));
104
+ });
105
+ }
106
+ /**
107
+ * Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user\'s editor can reach it. The copy carries the preset\'s code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user\'s chat edits begin where yours left off. It does not carry the preset\'s database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset\'s `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
108
+ * Give a managed user a copy of one of your presets
109
+ */
110
+ copyPresetForManagedUser(requestParameters, initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ const response = yield this.copyPresetForManagedUserRaw(requestParameters, initOverrides);
113
+ return yield response.value();
114
+ });
115
+ }
116
+ /**
117
+ * 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. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
118
+ * Create Composition
119
+ */
120
+ createCompositionRaw(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ if (requestParameters['newComposition'] == null) {
123
+ throw new runtime.RequiredError('newComposition', 'Required parameter "newComposition" was null or undefined when calling createComposition().');
124
+ }
125
+ const queryParameters = {};
126
+ const headerParameters = {};
127
+ headerParameters['Content-Type'] = 'application/json';
128
+ if (requestParameters['idempotencyKey'] != null) {
129
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
130
+ }
131
+ if (this.configuration && this.configuration.accessToken) {
132
+ const token = this.configuration.accessToken;
133
+ const tokenString = yield token("apiKeyAuth", []);
134
+ if (tokenString) {
135
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
136
+ }
137
+ }
138
+ const response = yield this.request({
139
+ path: `/compositions`,
140
+ method: 'POST',
141
+ headers: headerParameters,
142
+ query: queryParameters,
143
+ body: NewCompositionToJSON(requestParameters['newComposition']),
144
+ }, initOverrides);
145
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
146
+ });
147
+ }
148
+ /**
149
+ * 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. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
150
+ * Create Composition
151
+ */
152
+ createComposition(requestParameters, initOverrides) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ const response = yield this.createCompositionRaw(requestParameters, initOverrides);
155
+ return yield response.value();
156
+ });
157
+ }
158
+ /**
159
+ * 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.
160
+ * Add a content list item
161
+ */
162
+ createCompositionContentItemRaw(requestParameters, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ if (requestParameters['id'] == null) {
165
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createCompositionContentItem().');
166
+ }
167
+ if (requestParameters['list'] == null) {
168
+ throw new runtime.RequiredError('list', 'Required parameter "list" was null or undefined when calling createCompositionContentItem().');
169
+ }
170
+ if (requestParameters['createCompositionContentItemRequest'] == null) {
171
+ throw new runtime.RequiredError('createCompositionContentItemRequest', 'Required parameter "createCompositionContentItemRequest" was null or undefined when calling createCompositionContentItem().');
172
+ }
173
+ const queryParameters = {};
174
+ const headerParameters = {};
175
+ headerParameters['Content-Type'] = 'application/json';
176
+ if (requestParameters['ifMatch'] != null) {
177
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
178
+ }
179
+ if (requestParameters['idempotencyKey'] != null) {
180
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
181
+ }
182
+ if (this.configuration && this.configuration.accessToken) {
183
+ const token = this.configuration.accessToken;
184
+ const tokenString = yield token("apiKeyAuth", []);
185
+ if (tokenString) {
186
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
187
+ }
188
+ }
189
+ const response = yield this.request({
190
+ path: `/compositions/{id}/content/{list}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"list"}}`, encodeURIComponent(String(requestParameters['list']))),
191
+ method: 'POST',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ body: CreateCompositionContentItemRequestToJSON(requestParameters['createCompositionContentItemRequest']),
195
+ }, initOverrides);
196
+ return new runtime.VoidApiResponse(response);
197
+ });
198
+ }
199
+ /**
200
+ * 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.
201
+ * Add a content list item
202
+ */
203
+ createCompositionContentItem(requestParameters, initOverrides) {
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ yield this.createCompositionContentItemRaw(requestParameters, initOverrides);
206
+ });
207
+ }
208
+ /**
209
+ * Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset\'s widget, in a single insert. A failure never leaves a half-made composition. The preset\'s widget must be published. The managed user must be yours and active. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
210
+ * Create a composition from one of your presets in one call
211
+ */
212
+ createCompositionFromPresetRaw(requestParameters, initOverrides) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ if (requestParameters['id'] == null) {
215
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createCompositionFromPreset().');
216
+ }
217
+ if (requestParameters['key'] == null) {
218
+ throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling createCompositionFromPreset().');
219
+ }
220
+ if (requestParameters['createCompositionFromPresetRequest'] == null) {
221
+ throw new runtime.RequiredError('createCompositionFromPresetRequest', 'Required parameter "createCompositionFromPresetRequest" was null or undefined when calling createCompositionFromPreset().');
222
+ }
223
+ const queryParameters = {};
224
+ const headerParameters = {};
225
+ headerParameters['Content-Type'] = 'application/json';
226
+ if (requestParameters['idempotencyKey'] != null) {
227
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
228
+ }
229
+ if (this.configuration && this.configuration.accessToken) {
230
+ const token = this.configuration.accessToken;
231
+ const tokenString = yield token("apiKeyAuth", []);
232
+ if (tokenString) {
233
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
234
+ }
235
+ }
236
+ const response = yield this.request({
237
+ path: `/managed-users/{id}/presets/{key}/composition`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
238
+ method: 'POST',
239
+ headers: headerParameters,
240
+ query: queryParameters,
241
+ body: CreateCompositionFromPresetRequestToJSON(requestParameters['createCompositionFromPresetRequest']),
242
+ }, initOverrides);
243
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
244
+ });
245
+ }
246
+ /**
247
+ * Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset\'s widget, in a single insert. A failure never leaves a half-made composition. The preset\'s widget must be published. The managed user must be yours and active. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
248
+ * Create a composition from one of your presets in one call
249
+ */
250
+ createCompositionFromPreset(requestParameters, initOverrides) {
251
+ return __awaiter(this, void 0, void 0, function* () {
252
+ const response = yield this.createCompositionFromPresetRaw(requestParameters, initOverrides);
253
+ return yield response.value();
254
+ });
255
+ }
256
+ /**
257
+ * After a managed user publishes a widget from the creator, call this with the widget id, the customer\'s managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managed_user_id`. When you send it, it must match that tag. The widget must be published. The `Idempotency-Key` header is required.
258
+ * Create a composition for a widget in one call
259
+ */
260
+ createCompositionFromWidgetRaw(requestParameters, initOverrides) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ if (requestParameters['id'] == null) {
263
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createCompositionFromWidget().');
264
+ }
265
+ if (requestParameters['createCompositionFromWidgetRequest'] == null) {
266
+ throw new runtime.RequiredError('createCompositionFromWidgetRequest', 'Required parameter "createCompositionFromWidgetRequest" was null or undefined when calling createCompositionFromWidget().');
267
+ }
268
+ const queryParameters = {};
269
+ const headerParameters = {};
270
+ headerParameters['Content-Type'] = 'application/json';
271
+ if (requestParameters['idempotencyKey'] != null) {
272
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
273
+ }
274
+ if (this.configuration && this.configuration.accessToken) {
275
+ const token = this.configuration.accessToken;
276
+ const tokenString = yield token("apiKeyAuth", []);
277
+ if (tokenString) {
278
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
279
+ }
280
+ }
281
+ const response = yield this.request({
282
+ path: `/widgets/{id}/composition`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
283
+ method: 'POST',
284
+ headers: headerParameters,
285
+ query: queryParameters,
286
+ body: CreateCompositionFromWidgetRequestToJSON(requestParameters['createCompositionFromWidgetRequest']),
287
+ }, initOverrides);
288
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
289
+ });
290
+ }
291
+ /**
292
+ * After a managed user publishes a widget from the creator, call this with the widget id, the customer\'s managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managed_user_id`. When you send it, it must match that tag. The widget must be published. The `Idempotency-Key` header is required.
293
+ * Create a composition for a widget in one call
294
+ */
295
+ createCompositionFromWidget(requestParameters, initOverrides) {
296
+ return __awaiter(this, void 0, void 0, function* () {
297
+ const response = yield this.createCompositionFromWidgetRaw(requestParameters, initOverrides);
298
+ return yield response.value();
299
+ });
300
+ }
301
+ /**
302
+ * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
303
+ * Create Managed User
304
+ */
305
+ createManagedUserRaw(requestParameters, initOverrides) {
306
+ return __awaiter(this, void 0, void 0, function* () {
307
+ if (requestParameters['newManagedUser'] == null) {
308
+ throw new runtime.RequiredError('newManagedUser', 'Required parameter "newManagedUser" was null or undefined when calling createManagedUser().');
309
+ }
310
+ const queryParameters = {};
311
+ const headerParameters = {};
312
+ headerParameters['Content-Type'] = 'application/json';
313
+ if (requestParameters['idempotencyKey'] != null) {
314
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
315
+ }
316
+ if (this.configuration && this.configuration.accessToken) {
317
+ const token = this.configuration.accessToken;
318
+ const tokenString = yield token("apiKeyAuth", []);
319
+ if (tokenString) {
320
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
321
+ }
322
+ }
323
+ const response = yield this.request({
324
+ path: `/managed-users`,
325
+ method: 'POST',
326
+ headers: headerParameters,
327
+ query: queryParameters,
328
+ body: NewManagedUserToJSON(requestParameters['newManagedUser']),
329
+ }, initOverrides);
330
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserFromJSON(jsonValue));
331
+ });
332
+ }
333
+ /**
334
+ * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
335
+ * Create Managed User
336
+ */
337
+ createManagedUser(requestParameters, initOverrides) {
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ const response = yield this.createManagedUserRaw(requestParameters, initOverrides);
340
+ return yield response.value();
341
+ });
342
+ }
343
+ /**
344
+ * Makes a new API key for an account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. An account can hold at most 25 keys. An account on a plan without API access cannot make one.
345
+ * Create an API key
346
+ */
347
+ createUserApiKeyRaw(requestParameters, initOverrides) {
348
+ return __awaiter(this, void 0, void 0, function* () {
349
+ if (requestParameters['id'] == null) {
350
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createUserApiKey().');
351
+ }
352
+ if (requestParameters['createUserApiKeyRequest'] == null) {
353
+ throw new runtime.RequiredError('createUserApiKeyRequest', 'Required parameter "createUserApiKeyRequest" was null or undefined when calling createUserApiKey().');
354
+ }
355
+ const queryParameters = {};
356
+ const headerParameters = {};
357
+ headerParameters['Content-Type'] = 'application/json';
358
+ if (requestParameters['idempotencyKey'] != null) {
359
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
360
+ }
361
+ if (this.configuration && this.configuration.accessToken) {
362
+ const token = this.configuration.accessToken;
363
+ const tokenString = yield token("apiKeyAuth", []);
364
+ if (tokenString) {
365
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
366
+ }
367
+ }
368
+ const response = yield this.request({
369
+ path: `/users/{id}/keys`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
370
+ method: 'POST',
371
+ headers: headerParameters,
372
+ query: queryParameters,
373
+ body: CreateUserApiKeyRequestToJSON(requestParameters['createUserApiKeyRequest']),
374
+ }, initOverrides);
375
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreatedUserApiKeyFromJSON(jsonValue));
376
+ });
377
+ }
378
+ /**
379
+ * Makes a new API key for an account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. An account can hold at most 25 keys. An account on a plan without API access cannot make one.
380
+ * Create an API key
381
+ */
382
+ createUserApiKey(requestParameters, initOverrides) {
383
+ return __awaiter(this, void 0, void 0, function* () {
384
+ const response = yield this.createUserApiKeyRaw(requestParameters, initOverrides);
385
+ return yield response.value();
386
+ });
387
+ }
388
+ /**
389
+ * Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name), with a database provisioned for it. It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If the database cannot be provisioned the widget is still created, and `data.warnings` says what did not go through. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in an organization where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user\'s widgets with `getWidgets`. 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. Creating a widget provisions its database, so this call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
390
+ * Create Widget
391
+ */
392
+ createWidgetRaw(requestParameters, initOverrides) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ if (requestParameters['newWidget'] == null) {
395
+ throw new runtime.RequiredError('newWidget', 'Required parameter "newWidget" was null or undefined when calling createWidget().');
396
+ }
397
+ const queryParameters = {};
398
+ const headerParameters = {};
399
+ headerParameters['Content-Type'] = 'application/json';
400
+ if (requestParameters['idempotencyKey'] != null) {
401
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
402
+ }
403
+ if (this.configuration && this.configuration.accessToken) {
404
+ const token = this.configuration.accessToken;
405
+ const tokenString = yield token("apiKeyAuth", []);
406
+ if (tokenString) {
407
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
408
+ }
409
+ }
410
+ const response = yield this.request({
411
+ path: `/widgets`,
412
+ method: 'POST',
413
+ headers: headerParameters,
414
+ query: queryParameters,
415
+ body: NewWidgetToJSON(requestParameters['newWidget']),
416
+ }, initOverrides);
417
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateWidget201ResponseFromJSON(jsonValue));
418
+ });
419
+ }
420
+ /**
421
+ * Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name), with a database provisioned for it. It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If the database cannot be provisioned the widget is still created, and `data.warnings` says what did not go through. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in an organization where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user\'s widgets with `getWidgets`. 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. Creating a widget provisions its database, so this call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
422
+ * Create Widget
423
+ */
424
+ createWidget(requestParameters, initOverrides) {
425
+ return __awaiter(this, void 0, void 0, function* () {
426
+ const response = yield this.createWidgetRaw(requestParameters, initOverrides);
427
+ return yield response.value();
428
+ });
429
+ }
430
+ /**
431
+ * Deletes a specific composition.
432
+ * Delete Composition
433
+ */
434
+ deleteCompositionRaw(requestParameters, initOverrides) {
435
+ return __awaiter(this, void 0, void 0, function* () {
436
+ if (requestParameters['id'] == null) {
437
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteComposition().');
438
+ }
439
+ const queryParameters = {};
440
+ const headerParameters = {};
441
+ if (this.configuration && this.configuration.accessToken) {
442
+ const token = this.configuration.accessToken;
443
+ const tokenString = yield token("apiKeyAuth", []);
444
+ if (tokenString) {
445
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
446
+ }
447
+ }
448
+ const response = yield this.request({
449
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
450
+ method: 'DELETE',
451
+ headers: headerParameters,
452
+ query: queryParameters,
453
+ }, initOverrides);
454
+ return new runtime.VoidApiResponse(response);
455
+ });
456
+ }
457
+ /**
458
+ * Deletes a specific composition.
459
+ * Delete Composition
460
+ */
461
+ deleteComposition(requestParameters, initOverrides) {
462
+ return __awaiter(this, void 0, void 0, function* () {
463
+ yield this.deleteCompositionRaw(requestParameters, initOverrides);
464
+ });
465
+ }
466
+ /**
467
+ * Delete a content list item
468
+ */
469
+ deleteCompositionContentItemRaw(requestParameters, initOverrides) {
470
+ return __awaiter(this, void 0, void 0, function* () {
471
+ if (requestParameters['id'] == null) {
472
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionContentItem().');
473
+ }
474
+ if (requestParameters['list'] == null) {
475
+ throw new runtime.RequiredError('list', 'Required parameter "list" was null or undefined when calling deleteCompositionContentItem().');
476
+ }
477
+ if (requestParameters['itemId'] == null) {
478
+ throw new runtime.RequiredError('itemId', 'Required parameter "itemId" was null or undefined when calling deleteCompositionContentItem().');
479
+ }
480
+ const queryParameters = {};
481
+ const headerParameters = {};
482
+ if (requestParameters['ifMatch'] != null) {
483
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
484
+ }
485
+ if (requestParameters['idempotencyKey'] != null) {
486
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
487
+ }
488
+ if (this.configuration && this.configuration.accessToken) {
489
+ const token = this.configuration.accessToken;
490
+ const tokenString = yield token("apiKeyAuth", []);
491
+ if (tokenString) {
492
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
493
+ }
494
+ }
495
+ const response = yield this.request({
496
+ 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']))),
497
+ method: 'DELETE',
498
+ headers: headerParameters,
499
+ query: queryParameters,
500
+ }, initOverrides);
501
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteCompositionContentItem200ResponseFromJSON(jsonValue));
502
+ });
503
+ }
504
+ /**
505
+ * Delete a content list item
506
+ */
507
+ deleteCompositionContentItem(requestParameters, initOverrides) {
508
+ return __awaiter(this, void 0, void 0, function* () {
509
+ const response = yield this.deleteCompositionContentItemRaw(requestParameters, initOverrides);
510
+ return yield response.value();
511
+ });
512
+ }
513
+ /**
514
+ * Remove the composition data source binding
515
+ */
516
+ deleteCompositionDataSourceRaw(requestParameters, initOverrides) {
517
+ return __awaiter(this, void 0, void 0, function* () {
518
+ if (requestParameters['id'] == null) {
519
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionDataSource().');
520
+ }
521
+ const queryParameters = {};
522
+ const headerParameters = {};
523
+ if (requestParameters['idempotencyKey'] != null) {
524
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
525
+ }
526
+ if (this.configuration && this.configuration.accessToken) {
527
+ const token = this.configuration.accessToken;
528
+ const tokenString = yield token("apiKeyAuth", []);
529
+ if (tokenString) {
530
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
531
+ }
532
+ }
533
+ const response = yield this.request({
534
+ path: `/compositions/{id}/data-source`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
535
+ method: 'DELETE',
536
+ headers: headerParameters,
537
+ query: queryParameters,
538
+ }, initOverrides);
539
+ return new runtime.VoidApiResponse(response);
540
+ });
541
+ }
542
+ /**
543
+ * Remove the composition data source binding
544
+ */
545
+ deleteCompositionDataSource(requestParameters, initOverrides) {
546
+ return __awaiter(this, void 0, void 0, function* () {
547
+ yield this.deleteCompositionDataSourceRaw(requestParameters, initOverrides);
548
+ });
549
+ }
550
+ /**
551
+ * Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
552
+ * Delete composition entry items by id or host context
553
+ */
554
+ deleteCompositionEntryItemsRaw(requestParameters, initOverrides) {
555
+ return __awaiter(this, void 0, void 0, function* () {
556
+ if (requestParameters['id'] == null) {
557
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteCompositionEntryItems().');
558
+ }
559
+ if (requestParameters['table'] == null) {
560
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling deleteCompositionEntryItems().');
561
+ }
562
+ const queryParameters = {};
563
+ if (requestParameters['ids'] != null) {
564
+ queryParameters['ids'] = requestParameters['ids'];
565
+ }
566
+ if (requestParameters['context'] != null) {
567
+ queryParameters['context'] = requestParameters['context'];
568
+ }
569
+ if (requestParameters['filter'] != null) {
570
+ queryParameters['filter'] = requestParameters['filter'];
571
+ }
572
+ const headerParameters = {};
573
+ if (this.configuration && this.configuration.accessToken) {
574
+ const token = this.configuration.accessToken;
575
+ const tokenString = yield token("apiKeyAuth", []);
576
+ if (tokenString) {
577
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
578
+ }
579
+ }
580
+ const response = yield this.request({
581
+ path: `/compositions/{id}/entries/{table}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
582
+ method: 'DELETE',
583
+ headers: headerParameters,
584
+ query: queryParameters,
585
+ }, initOverrides);
586
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntryDeleteSuccessFromJSON(jsonValue));
587
+ });
588
+ }
589
+ /**
590
+ * Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
591
+ * Delete composition entry items by id or host context
592
+ */
593
+ deleteCompositionEntryItems(requestParameters, initOverrides) {
594
+ return __awaiter(this, void 0, void 0, function* () {
595
+ const response = yield this.deleteCompositionEntryItemsRaw(requestParameters, initOverrides);
596
+ return yield response.value();
597
+ });
598
+ }
599
+ /**
600
+ * Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
601
+ * Delete Managed User
602
+ */
603
+ deleteManagedUserRaw(requestParameters, initOverrides) {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ if (requestParameters['id'] == null) {
606
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteManagedUser().');
607
+ }
608
+ const queryParameters = {};
609
+ const headerParameters = {};
610
+ if (this.configuration && this.configuration.accessToken) {
611
+ const token = this.configuration.accessToken;
612
+ const tokenString = yield token("apiKeyAuth", []);
613
+ if (tokenString) {
614
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
615
+ }
616
+ }
617
+ const response = yield this.request({
618
+ path: `/managed-users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
619
+ method: 'DELETE',
620
+ headers: headerParameters,
621
+ query: queryParameters,
622
+ }, initOverrides);
623
+ return new runtime.VoidApiResponse(response);
624
+ });
625
+ }
626
+ /**
627
+ * Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
628
+ * Delete Managed User
629
+ */
630
+ deleteManagedUser(requestParameters, initOverrides) {
631
+ return __awaiter(this, void 0, void 0, function* () {
632
+ yield this.deleteManagedUserRaw(requestParameters, initOverrides);
633
+ });
634
+ }
635
+ /**
636
+ * Removes one entry from an account\'s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
637
+ * Stop allowing a website to show your widgets
638
+ */
639
+ deletePersonalWorkspaceDomainRaw(requestParameters, initOverrides) {
640
+ return __awaiter(this, void 0, void 0, function* () {
641
+ if (requestParameters['id'] == null) {
642
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deletePersonalWorkspaceDomain().');
643
+ }
644
+ if (requestParameters['domainId'] == null) {
645
+ throw new runtime.RequiredError('domainId', 'Required parameter "domainId" was null or undefined when calling deletePersonalWorkspaceDomain().');
646
+ }
647
+ const queryParameters = {};
648
+ const headerParameters = {};
649
+ if (this.configuration && this.configuration.accessToken) {
650
+ const token = this.configuration.accessToken;
651
+ const tokenString = yield token("apiKeyAuth", []);
652
+ if (tokenString) {
653
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
654
+ }
655
+ }
656
+ const response = yield this.request({
657
+ path: `/users/{id}/workspace/domains/{domainId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters['domainId']))),
658
+ method: 'DELETE',
659
+ headers: headerParameters,
660
+ query: queryParameters,
661
+ }, initOverrides);
662
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeletePersonalWorkspaceDomain200ResponseFromJSON(jsonValue));
663
+ });
664
+ }
665
+ /**
666
+ * Removes one entry from an account\'s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
667
+ * Stop allowing a website to show your widgets
668
+ */
669
+ deletePersonalWorkspaceDomain(requestParameters, initOverrides) {
670
+ return __awaiter(this, void 0, void 0, function* () {
671
+ const response = yield this.deletePersonalWorkspaceDomainRaw(requestParameters, initOverrides);
672
+ return yield response.value();
673
+ });
674
+ }
675
+ /**
676
+ * Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with `updateUserApiKey`.
677
+ * Delete an API key
678
+ */
679
+ deleteUserApiKeyRaw(requestParameters, initOverrides) {
680
+ return __awaiter(this, void 0, void 0, function* () {
681
+ if (requestParameters['id'] == null) {
682
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteUserApiKey().');
683
+ }
684
+ if (requestParameters['keyId'] == null) {
685
+ throw new runtime.RequiredError('keyId', 'Required parameter "keyId" was null or undefined when calling deleteUserApiKey().');
686
+ }
687
+ const queryParameters = {};
688
+ const headerParameters = {};
689
+ if (this.configuration && this.configuration.accessToken) {
690
+ const token = this.configuration.accessToken;
691
+ const tokenString = yield token("apiKeyAuth", []);
692
+ if (tokenString) {
693
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
694
+ }
695
+ }
696
+ const response = yield this.request({
697
+ path: `/users/{id}/keys/{keyId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"keyId"}}`, encodeURIComponent(String(requestParameters['keyId']))),
698
+ method: 'DELETE',
699
+ headers: headerParameters,
700
+ query: queryParameters,
701
+ }, initOverrides);
702
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteUserApiKey200ResponseFromJSON(jsonValue));
703
+ });
704
+ }
705
+ /**
706
+ * Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with `updateUserApiKey`.
707
+ * Delete an API key
708
+ */
709
+ deleteUserApiKey(requestParameters, initOverrides) {
710
+ return __awaiter(this, void 0, void 0, function* () {
711
+ const response = yield this.deleteUserApiKeyRaw(requestParameters, initOverrides);
712
+ return yield response.value();
713
+ });
714
+ }
715
+ /**
716
+ * 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.
717
+ * Describe What a Composition Keeps
718
+ */
719
+ describeCompositionEntriesRaw(requestParameters, initOverrides) {
720
+ return __awaiter(this, void 0, void 0, function* () {
721
+ if (requestParameters['id'] == null) {
722
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling describeCompositionEntries().');
723
+ }
724
+ const queryParameters = {};
725
+ const headerParameters = {};
726
+ if (this.configuration && this.configuration.accessToken) {
727
+ const token = this.configuration.accessToken;
728
+ const tokenString = yield token("apiKeyAuth", []);
729
+ if (tokenString) {
730
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
731
+ }
732
+ }
733
+ const response = yield this.request({
734
+ path: `/compositions/{id}/entries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
735
+ method: 'GET',
736
+ headers: headerParameters,
737
+ query: queryParameters,
738
+ }, initOverrides);
739
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntriesDescriptionFromJSON(jsonValue));
740
+ });
741
+ }
742
+ /**
743
+ * 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.
744
+ * Describe What a Composition Keeps
745
+ */
746
+ describeCompositionEntries(requestParameters, initOverrides) {
747
+ return __awaiter(this, void 0, void 0, function* () {
748
+ const response = yield this.describeCompositionEntriesRaw(requestParameters, initOverrides);
749
+ return yield response.value();
750
+ });
751
+ }
752
+ /**
753
+ * 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, one that could not be copied) 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.
754
+ * Duplicate Composition
755
+ */
756
+ duplicateCompositionRaw(requestParameters, initOverrides) {
757
+ return __awaiter(this, void 0, void 0, function* () {
758
+ if (requestParameters['id'] == null) {
759
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling duplicateComposition().');
760
+ }
761
+ const queryParameters = {};
762
+ const headerParameters = {};
763
+ headerParameters['Content-Type'] = 'application/json';
764
+ if (requestParameters['idempotencyKey'] != null) {
765
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
766
+ }
767
+ if (this.configuration && this.configuration.accessToken) {
768
+ const token = this.configuration.accessToken;
769
+ const tokenString = yield token("apiKeyAuth", []);
770
+ if (tokenString) {
771
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
772
+ }
773
+ }
774
+ const response = yield this.request({
775
+ path: `/compositions/{id}/duplicate`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
776
+ method: 'POST',
777
+ headers: headerParameters,
778
+ query: queryParameters,
779
+ body: DuplicateCompositionRequestToJSON(requestParameters['duplicateCompositionRequest']),
780
+ }, initOverrides);
781
+ return new runtime.JSONApiResponse(response, (jsonValue) => DuplicateComposition202ResponseFromJSON(jsonValue));
782
+ });
783
+ }
784
+ /**
785
+ * 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, one that could not be copied) 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.
786
+ * Duplicate Composition
787
+ */
788
+ duplicateComposition(requestParameters, initOverrides) {
789
+ return __awaiter(this, void 0, void 0, function* () {
790
+ const response = yield this.duplicateCompositionRaw(requestParameters, initOverrides);
791
+ return yield response.value();
792
+ });
793
+ }
794
+ /**
795
+ * Streams up to 50,000 matching rows in batches of 1,000. Tables without cursor paging export at most one batch; when more rows exist the response sets `X-Widgetic-Export-Truncated: true`. Rate limit 20 requests per minute.
796
+ * Export composition entry items
797
+ */
798
+ exportCompositionEntryItemsRaw(requestParameters, initOverrides) {
799
+ return __awaiter(this, void 0, void 0, function* () {
800
+ if (requestParameters['id'] == null) {
801
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling exportCompositionEntryItems().');
802
+ }
803
+ if (requestParameters['table'] == null) {
804
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling exportCompositionEntryItems().');
805
+ }
806
+ const queryParameters = {};
807
+ if (requestParameters['format'] != null) {
808
+ queryParameters['format'] = requestParameters['format'];
809
+ }
810
+ if (requestParameters['order'] != null) {
811
+ queryParameters['order'] = requestParameters['order'];
812
+ }
813
+ if (requestParameters['since'] != null) {
814
+ queryParameters['since'] = requestParameters['since'].toISOString();
815
+ }
816
+ if (requestParameters['until'] != null) {
817
+ queryParameters['until'] = requestParameters['until'].toISOString();
818
+ }
819
+ if (requestParameters['context'] != null) {
820
+ queryParameters['context'] = requestParameters['context'];
821
+ }
822
+ if (requestParameters['filter'] != null) {
823
+ queryParameters['filter'] = requestParameters['filter'];
824
+ }
825
+ const headerParameters = {};
826
+ if (this.configuration && this.configuration.accessToken) {
827
+ const token = this.configuration.accessToken;
828
+ const tokenString = yield token("apiKeyAuth", []);
829
+ if (tokenString) {
830
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
831
+ }
832
+ }
833
+ const response = yield this.request({
834
+ path: `/compositions/{id}/entries/{table}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
835
+ method: 'GET',
836
+ headers: headerParameters,
837
+ query: queryParameters,
838
+ }, initOverrides);
839
+ if (this.isJsonMime(response.headers.get('content-type'))) {
840
+ return new runtime.JSONApiResponse(response);
841
+ }
842
+ else {
843
+ return new runtime.TextApiResponse(response);
844
+ }
845
+ });
846
+ }
847
+ /**
848
+ * Streams up to 50,000 matching rows in batches of 1,000. Tables without cursor paging export at most one batch; when more rows exist the response sets `X-Widgetic-Export-Truncated: true`. Rate limit 20 requests per minute.
849
+ * Export composition entry items
850
+ */
851
+ exportCompositionEntryItems(requestParameters, initOverrides) {
852
+ return __awaiter(this, void 0, void 0, function* () {
853
+ const response = yield this.exportCompositionEntryItemsRaw(requestParameters, initOverrides);
854
+ return yield response.value();
855
+ });
856
+ }
857
+ /**
858
+ * 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 `widget_id`, and the answer holds only the compositions made for the session\'s managed user.
859
+ * Get All Compositions
860
+ */
861
+ getAllCompositionsRaw(requestParameters, initOverrides) {
862
+ return __awaiter(this, void 0, void 0, function* () {
863
+ const queryParameters = {};
864
+ if (requestParameters['page'] != null) {
865
+ queryParameters['page'] = requestParameters['page'];
866
+ }
867
+ if (requestParameters['size'] != null) {
868
+ queryParameters['size'] = requestParameters['size'];
869
+ }
870
+ if (requestParameters['sort'] != null) {
871
+ queryParameters['sort'] = requestParameters['sort'];
872
+ }
873
+ if (requestParameters['widgetId'] != null) {
874
+ queryParameters['widget_id'] = requestParameters['widgetId'];
875
+ }
876
+ if (requestParameters['workspace'] != null) {
877
+ queryParameters['workspace'] = requestParameters['workspace'];
878
+ }
879
+ if (requestParameters['projectFolder'] != null) {
880
+ queryParameters['project_folder'] = requestParameters['projectFolder'];
881
+ }
882
+ if (requestParameters['status'] != null) {
883
+ queryParameters['status'] = requestParameters['status'];
884
+ }
885
+ if (requestParameters['include'] != null) {
886
+ queryParameters['include'] = requestParameters['include'];
887
+ }
888
+ if (requestParameters['managedUserId'] != null) {
889
+ queryParameters['managedUserId'] = requestParameters['managedUserId'];
890
+ }
891
+ if (requestParameters['managedUserExternalId'] != null) {
892
+ queryParameters['managedUserExternalId'] = requestParameters['managedUserExternalId'];
893
+ }
894
+ const headerParameters = {};
895
+ if (this.configuration && this.configuration.accessToken) {
896
+ const token = this.configuration.accessToken;
897
+ const tokenString = yield token("apiKeyAuth", []);
898
+ if (tokenString) {
899
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
900
+ }
901
+ }
902
+ const response = yield this.request({
903
+ path: `/compositions`,
904
+ method: 'GET',
905
+ headers: headerParameters,
906
+ query: queryParameters,
907
+ }, initOverrides);
908
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAllCompositions200ResponseFromJSON(jsonValue));
909
+ });
910
+ }
911
+ /**
912
+ * 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 `widget_id`, and the answer holds only the compositions made for the session\'s managed user.
913
+ * Get All Compositions
914
+ */
915
+ getAllCompositions() {
916
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
917
+ const response = yield this.getAllCompositionsRaw(requestParameters, initOverrides);
918
+ return yield response.value();
919
+ });
920
+ }
921
+ /**
922
+ * Retrieve the managed users you manage, with pagination support. (Admins see every partner\'s managed users.)
923
+ * Get Managed Users
924
+ */
925
+ getAllManagedUsersRaw(requestParameters, initOverrides) {
926
+ return __awaiter(this, void 0, void 0, function* () {
927
+ const queryParameters = {};
928
+ if (requestParameters['page'] != null) {
929
+ queryParameters['page'] = requestParameters['page'];
930
+ }
931
+ if (requestParameters['size'] != null) {
932
+ queryParameters['size'] = requestParameters['size'];
933
+ }
934
+ if (requestParameters['sort'] != null) {
935
+ queryParameters['sort'] = requestParameters['sort'];
936
+ }
937
+ const headerParameters = {};
938
+ if (this.configuration && this.configuration.accessToken) {
939
+ const token = this.configuration.accessToken;
940
+ const tokenString = yield token("apiKeyAuth", []);
941
+ if (tokenString) {
942
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
943
+ }
944
+ }
945
+ const response = yield this.request({
946
+ path: `/managed-users`,
947
+ method: 'GET',
948
+ headers: headerParameters,
949
+ query: queryParameters,
950
+ }, initOverrides);
951
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetAllManagedUsers200ResponseFromJSON(jsonValue));
952
+ });
953
+ }
954
+ /**
955
+ * Retrieve the managed users you manage, with pagination support. (Admins see every partner\'s managed users.)
956
+ * Get Managed Users
957
+ */
958
+ getAllManagedUsers() {
959
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
960
+ const response = yield this.getAllManagedUsersRaw(requestParameters, initOverrides);
961
+ return yield response.value();
962
+ });
963
+ }
964
+ /**
965
+ * Retrieves a specific composition by its ID.
966
+ * Get Composition
967
+ */
968
+ getCompositionByIdRaw(requestParameters, initOverrides) {
969
+ return __awaiter(this, void 0, void 0, function* () {
970
+ if (requestParameters['id'] == null) {
971
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionById().');
972
+ }
973
+ const queryParameters = {};
974
+ const headerParameters = {};
975
+ if (this.configuration && this.configuration.accessToken) {
976
+ const token = this.configuration.accessToken;
977
+ const tokenString = yield token("apiKeyAuth", []);
978
+ if (tokenString) {
979
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
980
+ }
981
+ }
982
+ const response = yield this.request({
983
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
984
+ method: 'GET',
985
+ headers: headerParameters,
986
+ query: queryParameters,
987
+ }, initOverrides);
988
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
989
+ });
990
+ }
991
+ /**
992
+ * Retrieves a specific composition by its ID.
993
+ * Get Composition
994
+ */
995
+ getCompositionById(requestParameters, initOverrides) {
996
+ return __awaiter(this, void 0, void 0, function* () {
997
+ const response = yield this.getCompositionByIdRaw(requestParameters, initOverrides);
998
+ return yield response.value();
999
+ });
1000
+ }
1001
+ /**
1002
+ * Retrieves the current content of a composition
1003
+ * Get Current Content
1004
+ */
1005
+ getCompositionContentRaw(requestParameters, initOverrides) {
1006
+ return __awaiter(this, void 0, void 0, function* () {
1007
+ if (requestParameters['id'] == null) {
1008
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContent().');
1009
+ }
1010
+ const queryParameters = {};
1011
+ const headerParameters = {};
1012
+ if (this.configuration && this.configuration.accessToken) {
1013
+ const token = this.configuration.accessToken;
1014
+ const tokenString = yield token("apiKeyAuth", []);
1015
+ if (tokenString) {
1016
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1017
+ }
1018
+ }
1019
+ const response = yield this.request({
1020
+ path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1021
+ method: 'GET',
1022
+ headers: headerParameters,
1023
+ query: queryParameters,
1024
+ }, initOverrides);
1025
+ return new runtime.JSONApiResponse(response);
1026
+ });
1027
+ }
1028
+ /**
1029
+ * Retrieves the current content of a composition
1030
+ * Get Current Content
1031
+ */
1032
+ getCompositionContent(requestParameters, initOverrides) {
1033
+ return __awaiter(this, void 0, void 0, function* () {
1034
+ const response = yield this.getCompositionContentRaw(requestParameters, initOverrides);
1035
+ return yield response.value();
1036
+ });
1037
+ }
1038
+ /**
1039
+ * Retrieves the content schema for a composition based on its widget type
1040
+ * Get Content Schema
1041
+ */
1042
+ getCompositionContentSchemaRaw(requestParameters, initOverrides) {
1043
+ return __awaiter(this, void 0, void 0, function* () {
1044
+ if (requestParameters['id'] == null) {
1045
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionContentSchema().');
1046
+ }
1047
+ const queryParameters = {};
1048
+ const headerParameters = {};
1049
+ if (this.configuration && this.configuration.accessToken) {
1050
+ const token = this.configuration.accessToken;
1051
+ const tokenString = yield token("apiKeyAuth", []);
1052
+ if (tokenString) {
1053
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1054
+ }
1055
+ }
1056
+ const response = yield this.request({
1057
+ path: `/compositions/{id}/schema/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1058
+ method: 'GET',
1059
+ headers: headerParameters,
1060
+ query: queryParameters,
1061
+ }, initOverrides);
1062
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionContentSchema200ResponseFromJSON(jsonValue));
1063
+ });
1064
+ }
1065
+ /**
1066
+ * Retrieves the content schema for a composition based on its widget type
1067
+ * Get Content Schema
1068
+ */
1069
+ getCompositionContentSchema(requestParameters, initOverrides) {
1070
+ return __awaiter(this, void 0, void 0, function* () {
1071
+ const response = yield this.getCompositionContentSchemaRaw(requestParameters, initOverrides);
1072
+ return yield response.value();
1073
+ });
1074
+ }
1075
+ /**
1076
+ * Read the composition data source binding
1077
+ */
1078
+ getCompositionDataSourceRaw(requestParameters, initOverrides) {
1079
+ return __awaiter(this, void 0, void 0, function* () {
1080
+ if (requestParameters['id'] == null) {
1081
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDataSource().');
1082
+ }
1083
+ const queryParameters = {};
1084
+ const headerParameters = {};
1085
+ if (this.configuration && this.configuration.accessToken) {
1086
+ const token = this.configuration.accessToken;
1087
+ const tokenString = yield token("apiKeyAuth", []);
1088
+ if (tokenString) {
1089
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1090
+ }
1091
+ }
1092
+ const response = yield this.request({
1093
+ path: `/compositions/{id}/data-source`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1094
+ method: 'GET',
1095
+ headers: headerParameters,
1096
+ query: queryParameters,
1097
+ }, initOverrides);
1098
+ return new runtime.VoidApiResponse(response);
1099
+ });
1100
+ }
1101
+ /**
1102
+ * Read the composition data source binding
1103
+ */
1104
+ getCompositionDataSource(requestParameters, initOverrides) {
1105
+ return __awaiter(this, void 0, void 0, function* () {
1106
+ yield this.getCompositionDataSourceRaw(requestParameters, initOverrides);
1107
+ });
1108
+ }
1109
+ /**
1110
+ * Retrieves only the design field from a composition.
1111
+ * Get Composition Design
1112
+ */
1113
+ getCompositionDesignRaw(requestParameters, initOverrides) {
1114
+ return __awaiter(this, void 0, void 0, function* () {
1115
+ if (requestParameters['id'] == null) {
1116
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesign().');
1117
+ }
1118
+ const queryParameters = {};
1119
+ const headerParameters = {};
1120
+ if (this.configuration && this.configuration.accessToken) {
1121
+ const token = this.configuration.accessToken;
1122
+ const tokenString = yield token("apiKeyAuth", []);
1123
+ if (tokenString) {
1124
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1125
+ }
1126
+ }
1127
+ const response = yield this.request({
1128
+ path: `/compositions/{id}/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1129
+ method: 'GET',
1130
+ headers: headerParameters,
1131
+ query: queryParameters,
1132
+ }, initOverrides);
1133
+ return new runtime.JSONApiResponse(response);
1134
+ });
1135
+ }
1136
+ /**
1137
+ * Retrieves only the design field from a composition.
1138
+ * Get Composition Design
1139
+ */
1140
+ getCompositionDesign(requestParameters, initOverrides) {
1141
+ return __awaiter(this, void 0, void 0, function* () {
1142
+ const response = yield this.getCompositionDesignRaw(requestParameters, initOverrides);
1143
+ return yield response.value();
1144
+ });
1145
+ }
1146
+ /**
1147
+ * Retrieves the design schema for a composition based on its widget type
1148
+ * Get Design Schema
1149
+ */
1150
+ getCompositionDesignSchemaRaw(requestParameters, initOverrides) {
1151
+ return __awaiter(this, void 0, void 0, function* () {
1152
+ if (requestParameters['id'] == null) {
1153
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionDesignSchema().');
1154
+ }
1155
+ const queryParameters = {};
1156
+ const headerParameters = {};
1157
+ if (this.configuration && this.configuration.accessToken) {
1158
+ const token = this.configuration.accessToken;
1159
+ const tokenString = yield token("apiKeyAuth", []);
1160
+ if (tokenString) {
1161
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1162
+ }
1163
+ }
1164
+ const response = yield this.request({
1165
+ path: `/compositions/{id}/schema/design`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1166
+ method: 'GET',
1167
+ headers: headerParameters,
1168
+ query: queryParameters,
1169
+ }, initOverrides);
1170
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionDesignSchema200ResponseFromJSON(jsonValue));
1171
+ });
1172
+ }
1173
+ /**
1174
+ * Retrieves the design schema for a composition based on its widget type
1175
+ * Get Design Schema
1176
+ */
1177
+ getCompositionDesignSchema(requestParameters, initOverrides) {
1178
+ return __awaiter(this, void 0, void 0, function* () {
1179
+ const response = yield this.getCompositionDesignSchemaRaw(requestParameters, initOverrides);
1180
+ return yield response.value();
1181
+ });
1182
+ }
1183
+ /**
1184
+ * 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).
1185
+ * Get Embed Schema
1186
+ */
1187
+ getCompositionEmbedSchemaRaw(requestParameters, initOverrides) {
1188
+ return __awaiter(this, void 0, void 0, function* () {
1189
+ if (requestParameters['id'] == null) {
1190
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionEmbedSchema().');
1191
+ }
1192
+ const queryParameters = {};
1193
+ const headerParameters = {};
1194
+ if (this.configuration && this.configuration.accessToken) {
1195
+ const token = this.configuration.accessToken;
1196
+ const tokenString = yield token("apiKeyAuth", []);
1197
+ if (tokenString) {
1198
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1199
+ }
1200
+ }
1201
+ const response = yield this.request({
1202
+ path: `/compositions/{id}/schema/embed`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1203
+ method: 'GET',
1204
+ headers: headerParameters,
1205
+ query: queryParameters,
1206
+ }, initOverrides);
1207
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCompositionEmbedSchema200ResponseFromJSON(jsonValue));
1208
+ });
1209
+ }
1210
+ /**
1211
+ * 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).
1212
+ * Get Embed Schema
1213
+ */
1214
+ getCompositionEmbedSchema(requestParameters, initOverrides) {
1215
+ return __awaiter(this, void 0, void 0, function* () {
1216
+ const response = yield this.getCompositionEmbedSchemaRaw(requestParameters, initOverrides);
1217
+ return yield response.value();
1218
+ });
1219
+ }
1220
+ /**
1221
+ * Retrieves only the embedSettings field from a composition.
1222
+ * Get Composition Embed Settings
1223
+ */
1224
+ getCompositionEmbedSettingsRaw(requestParameters, initOverrides) {
1225
+ return __awaiter(this, void 0, void 0, function* () {
1226
+ if (requestParameters['id'] == null) {
1227
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCompositionEmbedSettings().');
1228
+ }
1229
+ const queryParameters = {};
1230
+ const headerParameters = {};
1231
+ if (this.configuration && this.configuration.accessToken) {
1232
+ const token = this.configuration.accessToken;
1233
+ const tokenString = yield token("apiKeyAuth", []);
1234
+ if (tokenString) {
1235
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1236
+ }
1237
+ }
1238
+ const response = yield this.request({
1239
+ path: `/compositions/{id}/embed-settings`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1240
+ method: 'GET',
1241
+ headers: headerParameters,
1242
+ query: queryParameters,
1243
+ }, initOverrides);
1244
+ return new runtime.JSONApiResponse(response);
1245
+ });
1246
+ }
1247
+ /**
1248
+ * Retrieves only the embedSettings field from a composition.
1249
+ * Get Composition Embed Settings
1250
+ */
1251
+ getCompositionEmbedSettings(requestParameters, initOverrides) {
1252
+ return __awaiter(this, void 0, void 0, function* () {
1253
+ const response = yield this.getCompositionEmbedSettingsRaw(requestParameters, initOverrides);
1254
+ return yield response.value();
1255
+ });
1256
+ }
1257
+ /**
1258
+ * Lists the invoices issued to a partner, newest first. Each carries the price (`subtotal`), the tax on it (`taxAmount`) and what is paid (`total`), its status as the payment provider reports it, why the last payment failed (`failureReason`), and the page where it is paid (`hostedInvoiceUrl`). A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner\'s and see exactly what the partner sees; the full records, with the internal fields, are `getAllInvoices` filtered by partner. The page is always bounded: `limit` defaults to 50 and is capped at 100, `offset` defaults to 0.
1259
+ * List a partner\'s invoices
1260
+ */
1261
+ getInvoicesByPartnerIdRaw(requestParameters, initOverrides) {
1262
+ return __awaiter(this, void 0, void 0, function* () {
1263
+ if (requestParameters['partnerId'] == null) {
1264
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getInvoicesByPartnerId().');
1265
+ }
1266
+ const queryParameters = {};
1267
+ if (requestParameters['status'] != null) {
1268
+ queryParameters['status'] = requestParameters['status'];
1269
+ }
1270
+ if (requestParameters['limit'] != null) {
1271
+ queryParameters['limit'] = requestParameters['limit'];
1272
+ }
1273
+ if (requestParameters['offset'] != null) {
1274
+ queryParameters['offset'] = requestParameters['offset'];
1275
+ }
1276
+ const headerParameters = {};
1277
+ if (this.configuration && this.configuration.accessToken) {
1278
+ const token = this.configuration.accessToken;
1279
+ const tokenString = yield token("apiKeyAuth", []);
1280
+ if (tokenString) {
1281
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1282
+ }
1283
+ }
1284
+ const response = yield this.request({
1285
+ path: `/invoices/partner/{partnerId}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1286
+ method: 'GET',
1287
+ headers: headerParameters,
1288
+ query: queryParameters,
1289
+ }, initOverrides);
1290
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetInvoicesByPartnerId200ResponseFromJSON(jsonValue));
1291
+ });
1292
+ }
1293
+ /**
1294
+ * Lists the invoices issued to a partner, newest first. Each carries the price (`subtotal`), the tax on it (`taxAmount`) and what is paid (`total`), its status as the payment provider reports it, why the last payment failed (`failureReason`), and the page where it is paid (`hostedInvoiceUrl`). A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner\'s and see exactly what the partner sees; the full records, with the internal fields, are `getAllInvoices` filtered by partner. The page is always bounded: `limit` defaults to 50 and is capped at 100, `offset` defaults to 0.
1295
+ * List a partner\'s invoices
1296
+ */
1297
+ getInvoicesByPartnerId(requestParameters, initOverrides) {
1298
+ return __awaiter(this, void 0, void 0, function* () {
1299
+ const response = yield this.getInvoicesByPartnerIdRaw(requestParameters, initOverrides);
1300
+ return yield response.value();
1301
+ });
1302
+ }
1303
+ /**
1304
+ * Retrieves a specific managed user by ID.
1305
+ * Get Managed User By ID
1306
+ */
1307
+ getManagedUserByIdRaw(requestParameters, initOverrides) {
1308
+ return __awaiter(this, void 0, void 0, function* () {
1309
+ if (requestParameters['id'] == null) {
1310
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getManagedUserById().');
1311
+ }
1312
+ const queryParameters = {};
1313
+ const headerParameters = {};
1314
+ if (this.configuration && this.configuration.accessToken) {
1315
+ const token = this.configuration.accessToken;
1316
+ const tokenString = yield token("apiKeyAuth", []);
1317
+ if (tokenString) {
1318
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1319
+ }
1320
+ }
1321
+ const response = yield this.request({
1322
+ path: `/managed-users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1323
+ method: 'GET',
1324
+ headers: headerParameters,
1325
+ query: queryParameters,
1326
+ }, initOverrides);
1327
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserFromJSON(jsonValue));
1328
+ });
1329
+ }
1330
+ /**
1331
+ * Retrieves a specific managed user by ID.
1332
+ * Get Managed User By ID
1333
+ */
1334
+ getManagedUserById(requestParameters, initOverrides) {
1335
+ return __awaiter(this, void 0, void 0, function* () {
1336
+ const response = yield this.getManagedUserByIdRaw(requestParameters, initOverrides);
1337
+ return yield response.value();
1338
+ });
1339
+ }
1340
+ /**
1341
+ * Read design defaults for one managed user
1342
+ */
1343
+ getManagedUserDesignDefaultsRaw(requestParameters, initOverrides) {
1344
+ return __awaiter(this, void 0, void 0, function* () {
1345
+ if (requestParameters['id'] == null) {
1346
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getManagedUserDesignDefaults().');
1347
+ }
1348
+ const queryParameters = {};
1349
+ const headerParameters = {};
1350
+ if (this.configuration && this.configuration.accessToken) {
1351
+ const token = this.configuration.accessToken;
1352
+ const tokenString = yield token("apiKeyAuth", []);
1353
+ if (tokenString) {
1354
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1355
+ }
1356
+ }
1357
+ const response = yield this.request({
1358
+ path: `/managed-users/{id}/design-defaults`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1359
+ method: 'GET',
1360
+ headers: headerParameters,
1361
+ query: queryParameters,
1362
+ }, initOverrides);
1363
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
1364
+ });
1365
+ }
1366
+ /**
1367
+ * Read design defaults for one managed user
1368
+ */
1369
+ getManagedUserDesignDefaults(requestParameters, initOverrides) {
1370
+ return __awaiter(this, void 0, void 0, function* () {
1371
+ const response = yield this.getManagedUserDesignDefaultsRaw(requestParameters, initOverrides);
1372
+ return yield response.value();
1373
+ });
1374
+ }
1375
+ /**
1376
+ * Read monthly credit cap and usage for one managed user
1377
+ */
1378
+ getManagedUserLimitsRaw(requestParameters, initOverrides) {
1379
+ return __awaiter(this, void 0, void 0, function* () {
1380
+ if (requestParameters['id'] == null) {
1381
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getManagedUserLimits().');
1382
+ }
1383
+ const queryParameters = {};
1384
+ const headerParameters = {};
1385
+ if (this.configuration && this.configuration.accessToken) {
1386
+ const token = this.configuration.accessToken;
1387
+ const tokenString = yield token("apiKeyAuth", []);
1388
+ if (tokenString) {
1389
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1390
+ }
1391
+ }
1392
+ const response = yield this.request({
1393
+ path: `/managed-users/{id}/limits`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1394
+ method: 'GET',
1395
+ headers: headerParameters,
1396
+ query: queryParameters,
1397
+ }, initOverrides);
1398
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUserLimits200ResponseFromJSON(jsonValue));
1399
+ });
1400
+ }
1401
+ /**
1402
+ * Read monthly credit cap and usage for one managed user
1403
+ */
1404
+ getManagedUserLimits(requestParameters, initOverrides) {
1405
+ return __awaiter(this, void 0, void 0, function* () {
1406
+ const response = yield this.getManagedUserLimitsRaw(requestParameters, initOverrides);
1407
+ return yield response.value();
1408
+ });
1409
+ }
1410
+ /**
1411
+ * Storage used by one managed user\'s uploads
1412
+ */
1413
+ getManagedUserStorageUsageRaw(requestParameters, initOverrides) {
1414
+ return __awaiter(this, void 0, void 0, function* () {
1415
+ if (requestParameters['id'] == null) {
1416
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getManagedUserStorageUsage().');
1417
+ }
1418
+ const queryParameters = {};
1419
+ const headerParameters = {};
1420
+ if (this.configuration && this.configuration.accessToken) {
1421
+ const token = this.configuration.accessToken;
1422
+ const tokenString = yield token("apiKeyAuth", []);
1423
+ if (tokenString) {
1424
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1425
+ }
1426
+ }
1427
+ const response = yield this.request({
1428
+ path: `/managed-users/{id}/storage-usage`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1429
+ method: 'GET',
1430
+ headers: headerParameters,
1431
+ query: queryParameters,
1432
+ }, initOverrides);
1433
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUserStorageUsage200ResponseFromJSON(jsonValue));
1434
+ });
1435
+ }
1436
+ /**
1437
+ * Storage used by one managed user\'s uploads
1438
+ */
1439
+ getManagedUserStorageUsage(requestParameters, initOverrides) {
1440
+ return __awaiter(this, void 0, void 0, function* () {
1441
+ const response = yield this.getManagedUserStorageUsageRaw(requestParameters, initOverrides);
1442
+ return yield response.value();
1443
+ });
1444
+ }
1445
+ /**
1446
+ * Retrieve managed users for a specific manager with pagination support.
1447
+ * Get Managed Users By Manager
1448
+ */
1449
+ getManagedUsersByManagerIdRaw(requestParameters, initOverrides) {
1450
+ return __awaiter(this, void 0, void 0, function* () {
1451
+ if (requestParameters['managerId'] == null) {
1452
+ throw new runtime.RequiredError('managerId', 'Required parameter "managerId" was null or undefined when calling getManagedUsersByManagerId().');
1453
+ }
1454
+ const queryParameters = {};
1455
+ if (requestParameters['page'] != null) {
1456
+ queryParameters['page'] = requestParameters['page'];
1457
+ }
1458
+ if (requestParameters['size'] != null) {
1459
+ queryParameters['size'] = requestParameters['size'];
1460
+ }
1461
+ if (requestParameters['sort'] != null) {
1462
+ queryParameters['sort'] = requestParameters['sort'];
1463
+ }
1464
+ const headerParameters = {};
1465
+ if (this.configuration && this.configuration.accessToken) {
1466
+ const token = this.configuration.accessToken;
1467
+ const tokenString = yield token("apiKeyAuth", []);
1468
+ if (tokenString) {
1469
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1470
+ }
1471
+ }
1472
+ const response = yield this.request({
1473
+ path: `/users/{managerId}/managed-users`.replace(`{${"managerId"}}`, encodeURIComponent(String(requestParameters['managerId']))),
1474
+ method: 'GET',
1475
+ headers: headerParameters,
1476
+ query: queryParameters,
1477
+ }, initOverrides);
1478
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUsersByManagerId200ResponseFromJSON(jsonValue));
1479
+ });
1480
+ }
1481
+ /**
1482
+ * Retrieve managed users for a specific manager with pagination support.
1483
+ * Get Managed Users By Manager
1484
+ */
1485
+ getManagedUsersByManagerId(requestParameters, initOverrides) {
1486
+ return __awaiter(this, void 0, void 0, function* () {
1487
+ const response = yield this.getManagedUsersByManagerIdRaw(requestParameters, initOverrides);
1488
+ return yield response.value();
1489
+ });
1490
+ }
1491
+ /**
1492
+ * Retrieves operational credits, the partner\'s contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it.
1493
+ * Get comprehensive partner billing overview
1494
+ */
1495
+ getPartnerBillingOverviewRaw(requestParameters, initOverrides) {
1496
+ return __awaiter(this, void 0, void 0, function* () {
1497
+ if (requestParameters['partnerId'] == null) {
1498
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerBillingOverview().');
1499
+ }
1500
+ const queryParameters = {};
1501
+ const headerParameters = {};
1502
+ if (this.configuration && this.configuration.accessToken) {
1503
+ const token = this.configuration.accessToken;
1504
+ const tokenString = yield token("apiKeyAuth", []);
1505
+ if (tokenString) {
1506
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1507
+ }
1508
+ }
1509
+ const response = yield this.request({
1510
+ path: `/partners/{partnerId}/billing-overview`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1511
+ method: 'GET',
1512
+ headers: headerParameters,
1513
+ query: queryParameters,
1514
+ }, initOverrides);
1515
+ return new runtime.VoidApiResponse(response);
1516
+ });
1517
+ }
1518
+ /**
1519
+ * Retrieves operational credits, the partner\'s contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it.
1520
+ * Get comprehensive partner billing overview
1521
+ */
1522
+ getPartnerBillingOverview(requestParameters, initOverrides) {
1523
+ return __awaiter(this, void 0, void 0, function* () {
1524
+ yield this.getPartnerBillingOverviewRaw(requestParameters, initOverrides);
1525
+ });
1526
+ }
1527
+ /**
1528
+ * Returns the commercial terms agreed with the partner: price, included credits and storage, billing cycle, commitment, support level, and the dates the contract runs between. A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner\'s. Responds 404 while no contract has been recorded for the partner, which is the case until Widgetic sets its terms.
1529
+ * Get a partner\'s contract
1530
+ */
1531
+ getPartnerContractRaw(requestParameters, initOverrides) {
1532
+ return __awaiter(this, void 0, void 0, function* () {
1533
+ if (requestParameters['partnerId'] == null) {
1534
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerContract().');
1535
+ }
1536
+ const queryParameters = {};
1537
+ const headerParameters = {};
1538
+ if (this.configuration && this.configuration.accessToken) {
1539
+ const token = this.configuration.accessToken;
1540
+ const tokenString = yield token("apiKeyAuth", []);
1541
+ if (tokenString) {
1542
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1543
+ }
1544
+ }
1545
+ const response = yield this.request({
1546
+ path: `/partners/{partnerId}/contract`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1547
+ method: 'GET',
1548
+ headers: headerParameters,
1549
+ query: queryParameters,
1550
+ }, initOverrides);
1551
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerContractFromJSON(jsonValue));
1552
+ });
1553
+ }
1554
+ /**
1555
+ * Returns the commercial terms agreed with the partner: price, included credits and storage, billing cycle, commitment, support level, and the dates the contract runs between. A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner\'s. Responds 404 while no contract has been recorded for the partner, which is the case until Widgetic sets its terms.
1556
+ * Get a partner\'s contract
1557
+ */
1558
+ getPartnerContract(requestParameters, initOverrides) {
1559
+ return __awaiter(this, void 0, void 0, function* () {
1560
+ const response = yield this.getPartnerContractRaw(requestParameters, initOverrides);
1561
+ return yield response.value();
1562
+ });
1563
+ }
1564
+ /**
1565
+ * Read partner-wide design defaults
1566
+ */
1567
+ getPartnerDesignDefaultsRaw(requestParameters, initOverrides) {
1568
+ return __awaiter(this, void 0, void 0, function* () {
1569
+ if (requestParameters['partnerId'] == null) {
1570
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerDesignDefaults().');
1571
+ }
1572
+ const queryParameters = {};
1573
+ const headerParameters = {};
1574
+ if (this.configuration && this.configuration.accessToken) {
1575
+ const token = this.configuration.accessToken;
1576
+ const tokenString = yield token("apiKeyAuth", []);
1577
+ if (tokenString) {
1578
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1579
+ }
1580
+ }
1581
+ const response = yield this.request({
1582
+ path: `/partners/{partnerId}/design-defaults`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1583
+ method: 'GET',
1584
+ headers: headerParameters,
1585
+ query: queryParameters,
1586
+ }, initOverrides);
1587
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
1588
+ });
1589
+ }
1590
+ /**
1591
+ * Read partner-wide design defaults
1592
+ */
1593
+ getPartnerDesignDefaults(requestParameters, initOverrides) {
1594
+ return __awaiter(this, void 0, void 0, function* () {
1595
+ const response = yield this.getPartnerDesignDefaultsRaw(requestParameters, initOverrides);
1596
+ return yield response.value();
1597
+ });
1598
+ }
1599
+ /**
1600
+ * Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. `events` lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
1601
+ * Where your notifications go
1602
+ */
1603
+ getPartnerNotificationSettingsRaw(requestParameters, initOverrides) {
1604
+ return __awaiter(this, void 0, void 0, function* () {
1605
+ if (requestParameters['partnerId'] == null) {
1606
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerNotificationSettings().');
1607
+ }
1608
+ const queryParameters = {};
1609
+ const headerParameters = {};
1610
+ if (this.configuration && this.configuration.accessToken) {
1611
+ const token = this.configuration.accessToken;
1612
+ const tokenString = yield token("apiKeyAuth", []);
1613
+ if (tokenString) {
1614
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1615
+ }
1616
+ }
1617
+ const response = yield this.request({
1618
+ path: `/partners/{partnerId}/notifications/settings`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1619
+ method: 'GET',
1620
+ headers: headerParameters,
1621
+ query: queryParameters,
1622
+ }, initOverrides);
1623
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationSettingsFromJSON(jsonValue));
1624
+ });
1625
+ }
1626
+ /**
1627
+ * Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. `events` lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
1628
+ * Where your notifications go
1629
+ */
1630
+ getPartnerNotificationSettings(requestParameters, initOverrides) {
1631
+ return __awaiter(this, void 0, void 0, function* () {
1632
+ const response = yield this.getPartnerNotificationSettingsRaw(requestParameters, initOverrides);
1633
+ return yield response.value();
1634
+ });
1635
+ }
1636
+ /**
1637
+ * Returns the partner\'s storage destination without its secret: the endpoint, bucket, folder and public address, the last four characters of the access key id, when the destination last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no destination, which means the partner cannot be activated, its uploads are refused, and no editor session is made for its customers until a destination is set. The caller must be the person who administers the partner, or a Widgetic administrator.
1638
+ * Get where a partner\'s uploaded files are stored
1639
+ */
1640
+ getPartnerStorageDestinationRaw(requestParameters, initOverrides) {
1641
+ return __awaiter(this, void 0, void 0, function* () {
1642
+ if (requestParameters['partnerId'] == null) {
1643
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerStorageDestination().');
1644
+ }
1645
+ const queryParameters = {};
1646
+ const headerParameters = {};
1647
+ if (this.configuration && this.configuration.accessToken) {
1648
+ const token = this.configuration.accessToken;
1649
+ const tokenString = yield token("apiKeyAuth", []);
1650
+ if (tokenString) {
1651
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1652
+ }
1653
+ }
1654
+ const response = yield this.request({
1655
+ path: `/partners/{partnerId}/storage`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1656
+ method: 'GET',
1657
+ headers: headerParameters,
1658
+ query: queryParameters,
1659
+ }, initOverrides);
1660
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStorageDestinationFromJSON(jsonValue));
1661
+ });
1662
+ }
1663
+ /**
1664
+ * Returns the partner\'s storage destination without its secret: the endpoint, bucket, folder and public address, the last four characters of the access key id, when the destination last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no destination, which means the partner cannot be activated, its uploads are refused, and no editor session is made for its customers until a destination is set. The caller must be the person who administers the partner, or a Widgetic administrator.
1665
+ * Get where a partner\'s uploaded files are stored
1666
+ */
1667
+ getPartnerStorageDestination(requestParameters, initOverrides) {
1668
+ return __awaiter(this, void 0, void 0, function* () {
1669
+ const response = yield this.getPartnerStorageDestinationRaw(requestParameters, initOverrides);
1670
+ return yield response.value();
1671
+ });
1672
+ }
1673
+ /**
1674
+ * Lists the websites on an account\'s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization\'s list instead.
1675
+ * List the websites allowed to show your widgets
1676
+ */
1677
+ getPersonalWorkspaceDomainsRaw(requestParameters, initOverrides) {
1678
+ return __awaiter(this, void 0, void 0, function* () {
1679
+ if (requestParameters['id'] == null) {
1680
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getPersonalWorkspaceDomains().');
1681
+ }
1682
+ const queryParameters = {};
1683
+ const headerParameters = {};
1684
+ if (this.configuration && this.configuration.accessToken) {
1685
+ const token = this.configuration.accessToken;
1686
+ const tokenString = yield token("apiKeyAuth", []);
1687
+ if (tokenString) {
1688
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1689
+ }
1690
+ }
1691
+ const response = yield this.request({
1692
+ path: `/users/{id}/workspace/domains`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1693
+ method: 'GET',
1694
+ headers: headerParameters,
1695
+ query: queryParameters,
1696
+ }, initOverrides);
1697
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPersonalWorkspaceDomains200ResponseFromJSON(jsonValue));
1698
+ });
1699
+ }
1700
+ /**
1701
+ * Lists the websites on an account\'s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization\'s list instead.
1702
+ * List the websites allowed to show your widgets
1703
+ */
1704
+ getPersonalWorkspaceDomains(requestParameters, initOverrides) {
1705
+ return __awaiter(this, void 0, void 0, function* () {
1706
+ const response = yield this.getPersonalWorkspaceDomainsRaw(requestParameters, initOverrides);
1707
+ return yield response.value();
1708
+ });
1709
+ }
1710
+ /**
1711
+ * Lists the calls made with one key, newest first: when, which path and method, and the status each ended with. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing.
1712
+ * Read what an API key was used for
1713
+ */
1714
+ getUserApiKeyUsageLogsRaw(requestParameters, initOverrides) {
1715
+ return __awaiter(this, void 0, void 0, function* () {
1716
+ if (requestParameters['id'] == null) {
1717
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getUserApiKeyUsageLogs().');
1718
+ }
1719
+ if (requestParameters['keyId'] == null) {
1720
+ throw new runtime.RequiredError('keyId', 'Required parameter "keyId" was null or undefined when calling getUserApiKeyUsageLogs().');
1721
+ }
1722
+ const queryParameters = {};
1723
+ if (requestParameters['limit'] != null) {
1724
+ queryParameters['limit'] = requestParameters['limit'];
1725
+ }
1726
+ const headerParameters = {};
1727
+ if (this.configuration && this.configuration.accessToken) {
1728
+ const token = this.configuration.accessToken;
1729
+ const tokenString = yield token("apiKeyAuth", []);
1730
+ if (tokenString) {
1731
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1732
+ }
1733
+ }
1734
+ const response = yield this.request({
1735
+ path: `/users/{id}/api-keys/{keyId}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"keyId"}}`, encodeURIComponent(String(requestParameters['keyId']))),
1736
+ method: 'GET',
1737
+ headers: headerParameters,
1738
+ query: queryParameters,
1739
+ }, initOverrides);
1740
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetUserApiKeyUsageLogs200ResponseFromJSON(jsonValue));
1741
+ });
1742
+ }
1743
+ /**
1744
+ * Lists the calls made with one key, newest first: when, which path and method, and the status each ended with. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing.
1745
+ * Read what an API key was used for
1746
+ */
1747
+ getUserApiKeyUsageLogs(requestParameters, initOverrides) {
1748
+ return __awaiter(this, void 0, void 0, function* () {
1749
+ const response = yield this.getUserApiKeyUsageLogsRaw(requestParameters, initOverrides);
1750
+ return yield response.value();
1751
+ });
1752
+ }
1753
+ /**
1754
+ * Lists the API keys of an account, in the order they were made: name, the first characters of the key, when it was made, when it expires, when it was last used, whether it is switched on and what it is limited to (`scopes` and `preset`). The secret of a key is never part of the list. A caller can list its own account\'s keys; Widgetic staff can list any account\'s.
1755
+ * List the API keys of an account
1756
+ */
1757
+ getUserApiKeysRaw(requestParameters, initOverrides) {
1758
+ return __awaiter(this, void 0, void 0, function* () {
1759
+ if (requestParameters['id'] == null) {
1760
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getUserApiKeys().');
1761
+ }
1762
+ const queryParameters = {};
1763
+ const headerParameters = {};
1764
+ if (this.configuration && this.configuration.accessToken) {
1765
+ const token = this.configuration.accessToken;
1766
+ const tokenString = yield token("apiKeyAuth", []);
1767
+ if (tokenString) {
1768
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1769
+ }
1770
+ }
1771
+ const response = yield this.request({
1772
+ path: `/users/{id}/keys`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
1773
+ method: 'GET',
1774
+ headers: headerParameters,
1775
+ query: queryParameters,
1776
+ }, initOverrides);
1777
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetUserApiKeys200ResponseFromJSON(jsonValue));
1778
+ });
1779
+ }
1780
+ /**
1781
+ * Lists the API keys of an account, in the order they were made: name, the first characters of the key, when it was made, when it expires, when it was last used, whether it is switched on and what it is limited to (`scopes` and `preset`). The secret of a key is never part of the list. A caller can list its own account\'s keys; Widgetic staff can list any account\'s.
1782
+ * List the API keys of an account
1783
+ */
1784
+ getUserApiKeys(requestParameters, initOverrides) {
1785
+ return __awaiter(this, void 0, void 0, function* () {
1786
+ const response = yield this.getUserApiKeysRaw(requestParameters, initOverrides);
1787
+ return yield response.value();
1788
+ });
1789
+ }
1790
+ /**
1791
+ * Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0.
1792
+ * Get an account\'s credit balance
1793
+ */
1794
+ getUserCreditBalanceRaw(requestParameters, initOverrides) {
1795
+ return __awaiter(this, void 0, void 0, function* () {
1796
+ if (requestParameters['userId'] == null) {
1797
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserCreditBalance().');
1798
+ }
1799
+ const queryParameters = {};
1800
+ const headerParameters = {};
1801
+ if (this.configuration && this.configuration.accessToken) {
1802
+ const token = this.configuration.accessToken;
1803
+ const tokenString = yield token("apiKeyAuth", []);
1804
+ if (tokenString) {
1805
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1806
+ }
1807
+ }
1808
+ const response = yield this.request({
1809
+ path: `/credits/user/{userId}/balance`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
1810
+ method: 'GET',
1811
+ headers: headerParameters,
1812
+ query: queryParameters,
1813
+ }, initOverrides);
1814
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreditBalanceFromJSON(jsonValue));
1815
+ });
1816
+ }
1817
+ /**
1818
+ * Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0.
1819
+ * Get an account\'s credit balance
1820
+ */
1821
+ getUserCreditBalance(requestParameters, initOverrides) {
1822
+ return __awaiter(this, void 0, void 0, function* () {
1823
+ const response = yield this.getUserCreditBalanceRaw(requestParameters, initOverrides);
1824
+ return yield response.value();
1825
+ });
1826
+ }
1827
+ /**
1828
+ * Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. A partner\'s wallet is a separate ledger, read with `getPartnerCreditTransactions`. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
1829
+ * List an account\'s credit ledger
1830
+ */
1831
+ getUserCreditTransactionsRaw(requestParameters, initOverrides) {
1832
+ return __awaiter(this, void 0, void 0, function* () {
1833
+ if (requestParameters['userId'] == null) {
1834
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserCreditTransactions().');
1835
+ }
1836
+ const queryParameters = {};
1837
+ if (requestParameters['transactionType'] != null) {
1838
+ queryParameters['transaction_type'] = requestParameters['transactionType'];
1839
+ }
1840
+ if (requestParameters['limit'] != null) {
1841
+ queryParameters['limit'] = requestParameters['limit'];
1842
+ }
1843
+ if (requestParameters['offset'] != null) {
1844
+ queryParameters['offset'] = requestParameters['offset'];
1845
+ }
1846
+ const headerParameters = {};
1847
+ if (this.configuration && this.configuration.accessToken) {
1848
+ const token = this.configuration.accessToken;
1849
+ const tokenString = yield token("apiKeyAuth", []);
1850
+ if (tokenString) {
1851
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1852
+ }
1853
+ }
1854
+ const response = yield this.request({
1855
+ path: `/credits/user/{userId}/transactions`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
1856
+ method: 'GET',
1857
+ headers: headerParameters,
1858
+ query: queryParameters,
1859
+ }, initOverrides);
1860
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetUserCreditTransactions200ResponseFromJSON(jsonValue));
1861
+ });
1862
+ }
1863
+ /**
1864
+ * Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. A partner\'s wallet is a separate ledger, read with `getPartnerCreditTransactions`. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
1865
+ * List an account\'s credit ledger
1866
+ */
1867
+ getUserCreditTransactions(requestParameters, initOverrides) {
1868
+ return __awaiter(this, void 0, void 0, function* () {
1869
+ const response = yield this.getUserCreditTransactionsRaw(requestParameters, initOverrides);
1870
+ return yield response.value();
1871
+ });
1872
+ }
1873
+ /**
1874
+ * Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic\'s widgets. Pass `page` (counting from 1) and `size` (1 to 100, 20 when left out) to read the list one page at a time. `meta` then carries `total`, `hasNextPage` and `hasPreviousPage`, so a client can walk the list to its end. A page past the end is an empty list. Without `page` and `size` the call returns the whole list in one response, which only suits an account with a few widgets. Pass `canvasId` to list only the widgets on one of your canvases. That list is always returned whole, whatever `page` and `size` say. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with `page`, `size` and `canvasId`. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`.
1875
+ * List Widgets
1876
+ */
1877
+ getWidgetsRaw(requestParameters, initOverrides) {
1878
+ return __awaiter(this, void 0, void 0, function* () {
1879
+ const queryParameters = {};
1880
+ if (requestParameters['page'] != null) {
1881
+ queryParameters['page'] = requestParameters['page'];
1882
+ }
1883
+ if (requestParameters['size'] != null) {
1884
+ queryParameters['size'] = requestParameters['size'];
1885
+ }
1886
+ if (requestParameters['canvasId'] != null) {
1887
+ queryParameters['canvasId'] = requestParameters['canvasId'];
1888
+ }
1889
+ if (requestParameters['managedUserId'] != null) {
1890
+ queryParameters['managedUserId'] = requestParameters['managedUserId'];
1891
+ }
1892
+ if (requestParameters['managedUserExternalId'] != null) {
1893
+ queryParameters['managedUserExternalId'] = requestParameters['managedUserExternalId'];
1894
+ }
1895
+ const headerParameters = {};
1896
+ if (this.configuration && this.configuration.accessToken) {
1897
+ const token = this.configuration.accessToken;
1898
+ const tokenString = yield token("apiKeyAuth", []);
1899
+ if (tokenString) {
1900
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1901
+ }
1902
+ }
1903
+ const response = yield this.request({
1904
+ path: `/widgets`,
1905
+ method: 'GET',
1906
+ headers: headerParameters,
1907
+ query: queryParameters,
1908
+ }, initOverrides);
1909
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetWidgets200ResponseFromJSON(jsonValue));
1910
+ });
1911
+ }
1912
+ /**
1913
+ * Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic\'s widgets. Pass `page` (counting from 1) and `size` (1 to 100, 20 when left out) to read the list one page at a time. `meta` then carries `total`, `hasNextPage` and `hasPreviousPage`, so a client can walk the list to its end. A page past the end is an empty list. Without `page` and `size` the call returns the whole list in one response, which only suits an account with a few widgets. Pass `canvasId` to list only the widgets on one of your canvases. That list is always returned whole, whatever `page` and `size` say. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with `page`, `size` and `canvasId`. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`.
1914
+ * List Widgets
1915
+ */
1916
+ getWidgets() {
1917
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
1918
+ const response = yield this.getWidgetsRaw(requestParameters, initOverrides);
1919
+ return yield response.value();
1920
+ });
1921
+ }
1922
+ /**
1923
+ * Reads one widget table with cursor paging (time then id in byte order), optional since/until on the time column, and up to five context filters plus ten column filters. Rate limit 120 requests per minute. Each read batch uses a 5 s statement timeout.
1924
+ * List composition entry items with paging and filters
1925
+ */
1926
+ listCompositionEntryItemsRaw(requestParameters, initOverrides) {
1927
+ return __awaiter(this, void 0, void 0, function* () {
1928
+ if (requestParameters['id'] == null) {
1929
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listCompositionEntryItems().');
1930
+ }
1931
+ if (requestParameters['table'] == null) {
1932
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling listCompositionEntryItems().');
1933
+ }
1934
+ const queryParameters = {};
1935
+ if (requestParameters['limit'] != null) {
1936
+ queryParameters['limit'] = requestParameters['limit'];
1937
+ }
1938
+ if (requestParameters['order'] != null) {
1939
+ queryParameters['order'] = requestParameters['order'];
1940
+ }
1941
+ if (requestParameters['since'] != null) {
1942
+ queryParameters['since'] = requestParameters['since'].toISOString();
1943
+ }
1944
+ if (requestParameters['until'] != null) {
1945
+ queryParameters['until'] = requestParameters['until'].toISOString();
1946
+ }
1947
+ if (requestParameters['cursor'] != null) {
1948
+ queryParameters['cursor'] = requestParameters['cursor'];
1949
+ }
1950
+ if (requestParameters['context'] != null) {
1951
+ queryParameters['context'] = requestParameters['context'];
1952
+ }
1953
+ if (requestParameters['filter'] != null) {
1954
+ queryParameters['filter'] = requestParameters['filter'];
1955
+ }
1956
+ const headerParameters = {};
1957
+ if (this.configuration && this.configuration.accessToken) {
1958
+ const token = this.configuration.accessToken;
1959
+ const tokenString = yield token("apiKeyAuth", []);
1960
+ if (tokenString) {
1961
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1962
+ }
1963
+ }
1964
+ const response = yield this.request({
1965
+ path: `/compositions/{id}/entries/{table}/items`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
1966
+ method: 'GET',
1967
+ headers: headerParameters,
1968
+ query: queryParameters,
1969
+ }, initOverrides);
1970
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntryItemsPageSuccessFromJSON(jsonValue));
1971
+ });
1972
+ }
1973
+ /**
1974
+ * Reads one widget table with cursor paging (time then id in byte order), optional since/until on the time column, and up to five context filters plus ten column filters. Rate limit 120 requests per minute. Each read batch uses a 5 s statement timeout.
1975
+ * List composition entry items with paging and filters
1976
+ */
1977
+ listCompositionEntryItems(requestParameters, initOverrides) {
1978
+ return __awaiter(this, void 0, void 0, function* () {
1979
+ const response = yield this.listCompositionEntryItemsRaw(requestParameters, initOverrides);
1980
+ return yield response.value();
1981
+ });
1982
+ }
1983
+ /**
1984
+ * Merges eligible tables (time and id columns) across the managed user\'s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 120 requests per minute.
1985
+ * List entries across a managed user\'s compositions
1986
+ */
1987
+ listManagedUserEntriesRaw(requestParameters, initOverrides) {
1988
+ return __awaiter(this, void 0, void 0, function* () {
1989
+ if (requestParameters['id'] == null) {
1990
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listManagedUserEntries().');
1991
+ }
1992
+ const queryParameters = {};
1993
+ if (requestParameters['compositionId'] != null) {
1994
+ queryParameters['compositionId'] = requestParameters['compositionId'];
1995
+ }
1996
+ if (requestParameters['table'] != null) {
1997
+ queryParameters['table'] = requestParameters['table'];
1998
+ }
1999
+ if (requestParameters['limit'] != null) {
2000
+ queryParameters['limit'] = requestParameters['limit'];
2001
+ }
2002
+ if (requestParameters['order'] != null) {
2003
+ queryParameters['order'] = requestParameters['order'];
2004
+ }
2005
+ if (requestParameters['since'] != null) {
2006
+ queryParameters['since'] = requestParameters['since'].toISOString();
2007
+ }
2008
+ if (requestParameters['until'] != null) {
2009
+ queryParameters['until'] = requestParameters['until'].toISOString();
2010
+ }
2011
+ if (requestParameters['cursor'] != null) {
2012
+ queryParameters['cursor'] = requestParameters['cursor'];
2013
+ }
2014
+ if (requestParameters['context'] != null) {
2015
+ queryParameters['context'] = requestParameters['context'];
2016
+ }
2017
+ if (requestParameters['filter'] != null) {
2018
+ queryParameters['filter'] = requestParameters['filter'];
2019
+ }
2020
+ const headerParameters = {};
2021
+ if (this.configuration && this.configuration.accessToken) {
2022
+ const token = this.configuration.accessToken;
2023
+ const tokenString = yield token("apiKeyAuth", []);
2024
+ if (tokenString) {
2025
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2026
+ }
2027
+ }
2028
+ const response = yield this.request({
2029
+ path: `/managed-users/{id}/entries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2030
+ method: 'GET',
2031
+ headers: headerParameters,
2032
+ query: queryParameters,
2033
+ }, initOverrides);
2034
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserEntriesPageSuccessFromJSON(jsonValue));
2035
+ });
2036
+ }
2037
+ /**
2038
+ * Merges eligible tables (time and id columns) across the managed user\'s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 120 requests per minute.
2039
+ * List entries across a managed user\'s compositions
2040
+ */
2041
+ listManagedUserEntries(requestParameters, initOverrides) {
2042
+ return __awaiter(this, void 0, void 0, function* () {
2043
+ const response = yield this.listManagedUserEntriesRaw(requestParameters, initOverrides);
2044
+ return yield response.value();
2045
+ });
2046
+ }
2047
+ /**
2048
+ * Lists the sends of your notifications, the newest first: each email to one address and each call to your webhook, with whether it was delivered, when it is tried again if not, how many attempts it had, and why the last one failed. Use it to find out why a webhook of yours did not receive an event. An email counts as delivered when it was handed to the mail service; a call to your webhook counts as delivered when your endpoint answered with a 2xx status. Anything else is tried again, after 1 minute, then 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day, eight attempts in all, because your address is read again at each attempt and you may have mended it. Two answers end the delivery at once: `410 Gone` and `413 Payload Too Large`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
2049
+ * How your notifications reached you
2050
+ */
2051
+ listPartnerNotificationDeliveriesRaw(requestParameters, initOverrides) {
2052
+ return __awaiter(this, void 0, void 0, function* () {
2053
+ if (requestParameters['partnerId'] == null) {
2054
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerNotificationDeliveries().');
2055
+ }
2056
+ const queryParameters = {};
2057
+ if (requestParameters['limit'] != null) {
2058
+ queryParameters['limit'] = requestParameters['limit'];
2059
+ }
2060
+ const headerParameters = {};
2061
+ if (this.configuration && this.configuration.accessToken) {
2062
+ const token = this.configuration.accessToken;
2063
+ const tokenString = yield token("apiKeyAuth", []);
2064
+ if (tokenString) {
2065
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2066
+ }
2067
+ }
2068
+ const response = yield this.request({
2069
+ path: `/partners/{partnerId}/notifications/deliveries`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2070
+ method: 'GET',
2071
+ headers: headerParameters,
2072
+ query: queryParameters,
2073
+ }, initOverrides);
2074
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationDeliveryLogFromJSON(jsonValue));
2075
+ });
2076
+ }
2077
+ /**
2078
+ * Lists the sends of your notifications, the newest first: each email to one address and each call to your webhook, with whether it was delivered, when it is tried again if not, how many attempts it had, and why the last one failed. Use it to find out why a webhook of yours did not receive an event. An email counts as delivered when it was handed to the mail service; a call to your webhook counts as delivered when your endpoint answered with a 2xx status. Anything else is tried again, after 1 minute, then 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day, eight attempts in all, because your address is read again at each attempt and you may have mended it. Two answers end the delivery at once: `410 Gone` and `413 Payload Too Large`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
2079
+ * How your notifications reached you
2080
+ */
2081
+ listPartnerNotificationDeliveries(requestParameters, initOverrides) {
2082
+ return __awaiter(this, void 0, void 0, function* () {
2083
+ const response = yield this.listPartnerNotificationDeliveriesRaw(requestParameters, initOverrides);
2084
+ return yield response.value();
2085
+ });
2086
+ }
2087
+ /**
2088
+ * Lists the notifications of a partner, the newest first: the invoices Widgetic issued and their payments, the reminders to pay them, a warning when your credits run low, and the changes to the standing of the account (activated, paused, resumed). It is the same list your dashboard shows, and each entry is what your webhook receives as `data` when you have one (`updatePartnerNotificationSettings`). A page holds `limit` notifications (20 by default, at most 100). When there are older ones `nextBefore` is set: ask again with it as `before` to get the next page. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
2089
+ * What your partner account was told
2090
+ */
2091
+ listPartnerNotificationsRaw(requestParameters, initOverrides) {
2092
+ return __awaiter(this, void 0, void 0, function* () {
2093
+ if (requestParameters['partnerId'] == null) {
2094
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerNotifications().');
2095
+ }
2096
+ const queryParameters = {};
2097
+ if (requestParameters['limit'] != null) {
2098
+ queryParameters['limit'] = requestParameters['limit'];
2099
+ }
2100
+ if (requestParameters['before'] != null) {
2101
+ queryParameters['before'] = requestParameters['before'].toISOString();
2102
+ }
2103
+ const headerParameters = {};
2104
+ if (this.configuration && this.configuration.accessToken) {
2105
+ const token = this.configuration.accessToken;
2106
+ const tokenString = yield token("apiKeyAuth", []);
2107
+ if (tokenString) {
2108
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2109
+ }
2110
+ }
2111
+ const response = yield this.request({
2112
+ path: `/partners/{partnerId}/notifications`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2113
+ method: 'GET',
2114
+ headers: headerParameters,
2115
+ query: queryParameters,
2116
+ }, initOverrides);
2117
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationPageFromJSON(jsonValue));
2118
+ });
2119
+ }
2120
+ /**
2121
+ * Lists the notifications of a partner, the newest first: the invoices Widgetic issued and their payments, the reminders to pay them, a warning when your credits run low, and the changes to the standing of the account (activated, paused, resumed). It is the same list your dashboard shows, and each entry is what your webhook receives as `data` when you have one (`updatePartnerNotificationSettings`). A page holds `limit` notifications (20 by default, at most 100). When there are older ones `nextBefore` is set: ask again with it as `before` to get the next page. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
2122
+ * What your partner account was told
2123
+ */
2124
+ listPartnerNotifications(requestParameters, initOverrides) {
2125
+ return __awaiter(this, void 0, void 0, function* () {
2126
+ const response = yield this.listPartnerNotificationsRaw(requestParameters, initOverrides);
2127
+ return yield response.value();
2128
+ });
2129
+ }
2130
+ /**
2131
+ * Returns the partner\'s presets, ordered by `position` and then by `key`: the widgets it offers its managed users as starting points. The list is the same for every managed user. Use a preset in one of two ways: - **Make a composition of it** (the content and design editor): call `createComposition` with the preset\'s `widgetId` and the managed user. The widget itself stays yours; a composition is the user\'s own content. - **Give the user a copy to build on** (the widget creator): call `copyPresetForManagedUser`. The user gets a widget and a canvas of their own. Presets are not the same as the widgets Widgetic puts on every new Widgetic account. Those are chosen by Widgetic and are copied at sign-up. A preset here is yours, and is copied only when you ask. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
2132
+ * List the widgets a partner offers as presets
2133
+ */
2134
+ listPartnerPresetsRaw(requestParameters, initOverrides) {
2135
+ return __awaiter(this, void 0, void 0, function* () {
2136
+ if (requestParameters['partnerId'] == null) {
2137
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerPresets().');
2138
+ }
2139
+ const queryParameters = {};
2140
+ const headerParameters = {};
2141
+ if (this.configuration && this.configuration.accessToken) {
2142
+ const token = this.configuration.accessToken;
2143
+ const tokenString = yield token("apiKeyAuth", []);
2144
+ if (tokenString) {
2145
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2146
+ }
2147
+ }
2148
+ const response = yield this.request({
2149
+ path: `/partners/{partnerId}/presets`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2150
+ method: 'GET',
2151
+ headers: headerParameters,
2152
+ query: queryParameters,
2153
+ }, initOverrides);
2154
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListPartnerPresets200ResponseFromJSON(jsonValue));
2155
+ });
2156
+ }
2157
+ /**
2158
+ * Returns the partner\'s presets, ordered by `position` and then by `key`: the widgets it offers its managed users as starting points. The list is the same for every managed user. Use a preset in one of two ways: - **Make a composition of it** (the content and design editor): call `createComposition` with the preset\'s `widgetId` and the managed user. The widget itself stays yours; a composition is the user\'s own content. - **Give the user a copy to build on** (the widget creator): call `copyPresetForManagedUser`. The user gets a widget and a canvas of their own. Presets are not the same as the widgets Widgetic puts on every new Widgetic account. Those are chosen by Widgetic and are copied at sign-up. A preset here is yours, and is copied only when you ask. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
2159
+ * List the widgets a partner offers as presets
2160
+ */
2161
+ listPartnerPresets(requestParameters, initOverrides) {
2162
+ return __awaiter(this, void 0, void 0, function* () {
2163
+ const response = yield this.listPartnerPresetsRaw(requestParameters, initOverrides);
2164
+ return yield response.value();
2165
+ });
2166
+ }
2167
+ /**
2168
+ * Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else\'s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
2169
+ * Get operation status
2170
+ */
2171
+ operationsIdGetRaw(requestParameters, initOverrides) {
2172
+ return __awaiter(this, void 0, void 0, function* () {
2173
+ if (requestParameters['id'] == null) {
2174
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling operationsIdGet().');
2175
+ }
2176
+ const queryParameters = {};
2177
+ const headerParameters = {};
2178
+ if (this.configuration && this.configuration.accessToken) {
2179
+ const token = this.configuration.accessToken;
2180
+ const tokenString = yield token("bearerAuth", []);
2181
+ if (tokenString) {
2182
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2183
+ }
2184
+ }
2185
+ const response = yield this.request({
2186
+ path: `/operations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2187
+ method: 'GET',
2188
+ headers: headerParameters,
2189
+ query: queryParameters,
2190
+ }, initOverrides);
2191
+ return new runtime.JSONApiResponse(response, (jsonValue) => OperationsIdGet200ResponseFromJSON(jsonValue));
2192
+ });
2193
+ }
2194
+ /**
2195
+ * Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else\'s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
2196
+ * Get operation status
2197
+ */
2198
+ operationsIdGet(requestParameters, initOverrides) {
2199
+ return __awaiter(this, void 0, void 0, function* () {
2200
+ const response = yield this.operationsIdGetRaw(requestParameters, initOverrides);
2201
+ return yield response.value();
2202
+ });
2203
+ }
2204
+ /**
2205
+ * Update a content list item
2206
+ */
2207
+ patchCompositionContentItemRaw(requestParameters, initOverrides) {
2208
+ return __awaiter(this, void 0, void 0, function* () {
2209
+ if (requestParameters['id'] == null) {
2210
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling patchCompositionContentItem().');
2211
+ }
2212
+ if (requestParameters['list'] == null) {
2213
+ throw new runtime.RequiredError('list', 'Required parameter "list" was null or undefined when calling patchCompositionContentItem().');
2214
+ }
2215
+ if (requestParameters['itemId'] == null) {
2216
+ throw new runtime.RequiredError('itemId', 'Required parameter "itemId" was null or undefined when calling patchCompositionContentItem().');
2217
+ }
2218
+ if (requestParameters['requestBody'] == null) {
2219
+ throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling patchCompositionContentItem().');
2220
+ }
2221
+ const queryParameters = {};
2222
+ const headerParameters = {};
2223
+ headerParameters['Content-Type'] = 'application/json';
2224
+ if (requestParameters['ifMatch'] != null) {
2225
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
2226
+ }
2227
+ if (requestParameters['idempotencyKey'] != null) {
2228
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2229
+ }
2230
+ if (this.configuration && this.configuration.accessToken) {
2231
+ const token = this.configuration.accessToken;
2232
+ const tokenString = yield token("apiKeyAuth", []);
2233
+ if (tokenString) {
2234
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2235
+ }
2236
+ }
2237
+ const response = yield this.request({
2238
+ 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']))),
2239
+ method: 'PATCH',
2240
+ headers: headerParameters,
2241
+ query: queryParameters,
2242
+ body: requestParameters['requestBody'],
2243
+ }, initOverrides);
2244
+ return new runtime.VoidApiResponse(response);
2245
+ });
2246
+ }
2247
+ /**
2248
+ * Update a content list item
2249
+ */
2250
+ patchCompositionContentItem(requestParameters, initOverrides) {
2251
+ return __awaiter(this, void 0, void 0, function* () {
2252
+ yield this.patchCompositionContentItemRaw(requestParameters, initOverrides);
2253
+ });
2254
+ }
2255
+ /**
2256
+ * 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. This read is bounded on purpose: it never returns more than 25 entries, 20 groups, 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`. **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.
2257
+ * Read the Entries of a Composition\'s Table
2258
+ */
2259
+ readCompositionEntriesRaw(requestParameters, initOverrides) {
2260
+ return __awaiter(this, void 0, void 0, function* () {
2261
+ if (requestParameters['id'] == null) {
2262
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling readCompositionEntries().');
2263
+ }
2264
+ if (requestParameters['table'] == null) {
2265
+ throw new runtime.RequiredError('table', 'Required parameter "table" was null or undefined when calling readCompositionEntries().');
2266
+ }
2267
+ const queryParameters = {};
2268
+ if (requestParameters['groupBy'] != null) {
2269
+ queryParameters['groupBy'] = requestParameters['groupBy'];
2270
+ }
2271
+ if (requestParameters['rows'] != null) {
2272
+ queryParameters['rows'] = requestParameters['rows'];
2273
+ }
2274
+ if (requestParameters['aggregate'] != null) {
2275
+ queryParameters['aggregate'] = requestParameters['aggregate'];
2276
+ }
2277
+ if (requestParameters['column'] != null) {
2278
+ queryParameters['column'] = requestParameters['column'];
2279
+ }
2280
+ if (requestParameters['since'] != null) {
2281
+ queryParameters['since'] = requestParameters['since'].toISOString();
2282
+ }
2283
+ if (requestParameters['until'] != null) {
2284
+ queryParameters['until'] = requestParameters['until'].toISOString();
2285
+ }
2286
+ if (requestParameters['context'] != null) {
2287
+ queryParameters['context'] = requestParameters['context'];
2288
+ }
2289
+ if (requestParameters['filter'] != null) {
2290
+ queryParameters['filter'] = requestParameters['filter'];
2291
+ }
2292
+ const headerParameters = {};
2293
+ if (this.configuration && this.configuration.accessToken) {
2294
+ const token = this.configuration.accessToken;
2295
+ const tokenString = yield token("apiKeyAuth", []);
2296
+ if (tokenString) {
2297
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2298
+ }
2299
+ }
2300
+ const response = yield this.request({
2301
+ path: `/compositions/{id}/entries/{table}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"table"}}`, encodeURIComponent(String(requestParameters['table']))),
2302
+ method: 'GET',
2303
+ headers: headerParameters,
2304
+ query: queryParameters,
2305
+ }, initOverrides);
2306
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionEntriesReadingFromJSON(jsonValue));
2307
+ });
2308
+ }
2309
+ /**
2310
+ * 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. This read is bounded on purpose: it never returns more than 25 entries, 20 groups, 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`. **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.
2311
+ * Read the Entries of a Composition\'s Table
2312
+ */
2313
+ readCompositionEntries(requestParameters, initOverrides) {
2314
+ return __awaiter(this, void 0, void 0, function* () {
2315
+ const response = yield this.readCompositionEntriesRaw(requestParameters, initOverrides);
2316
+ return yield response.value();
2317
+ });
2318
+ }
2319
+ /**
2320
+ * Removes the preset under `key`. The widget itself is not touched, and neither are the copies and the compositions already made from it. Removing a preset the partner does not have is not an error: the answer is `removed: false`.
2321
+ * Take a widget off the partner\'s presets
2322
+ */
2323
+ removePartnerPresetRaw(requestParameters, initOverrides) {
2324
+ return __awaiter(this, void 0, void 0, function* () {
2325
+ if (requestParameters['partnerId'] == null) {
2326
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling removePartnerPreset().');
2327
+ }
2328
+ if (requestParameters['key'] == null) {
2329
+ throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling removePartnerPreset().');
2330
+ }
2331
+ const queryParameters = {};
2332
+ const headerParameters = {};
2333
+ if (this.configuration && this.configuration.accessToken) {
2334
+ const token = this.configuration.accessToken;
2335
+ const tokenString = yield token("apiKeyAuth", []);
2336
+ if (tokenString) {
2337
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2338
+ }
2339
+ }
2340
+ const response = yield this.request({
2341
+ path: `/partners/{partnerId}/presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
2342
+ method: 'DELETE',
2343
+ headers: headerParameters,
2344
+ query: queryParameters,
2345
+ }, initOverrides);
2346
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerPresetRemovalFromJSON(jsonValue));
2347
+ });
2348
+ }
2349
+ /**
2350
+ * Removes the preset under `key`. The widget itself is not touched, and neither are the copies and the compositions already made from it. Removing a preset the partner does not have is not an error: the answer is `removed: false`.
2351
+ * Take a widget off the partner\'s presets
2352
+ */
2353
+ removePartnerPreset(requestParameters, initOverrides) {
2354
+ return __awaiter(this, void 0, void 0, function* () {
2355
+ const response = yield this.removePartnerPresetRaw(requestParameters, initOverrides);
2356
+ return yield response.value();
2357
+ });
2358
+ }
2359
+ /**
2360
+ * Removes the partner\'s storage destination. Partner storage is not optional, so after this the account\'s own uploads with its API key and the uploads of your customers\' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner\'s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
2361
+ * Stop storing a partner\'s uploaded files in its own bucket
2362
+ */
2363
+ removePartnerStorageDestinationRaw(requestParameters, initOverrides) {
2364
+ return __awaiter(this, void 0, void 0, function* () {
2365
+ if (requestParameters['partnerId'] == null) {
2366
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling removePartnerStorageDestination().');
2367
+ }
2368
+ const queryParameters = {};
2369
+ const headerParameters = {};
2370
+ if (this.configuration && this.configuration.accessToken) {
2371
+ const token = this.configuration.accessToken;
2372
+ const tokenString = yield token("apiKeyAuth", []);
2373
+ if (tokenString) {
2374
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2375
+ }
2376
+ }
2377
+ const response = yield this.request({
2378
+ path: `/partners/{partnerId}/storage`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2379
+ method: 'DELETE',
2380
+ headers: headerParameters,
2381
+ query: queryParameters,
2382
+ }, initOverrides);
2383
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStorageRemovalFromJSON(jsonValue));
2384
+ });
2385
+ }
2386
+ /**
2387
+ * Removes the partner\'s storage destination. Partner storage is not optional, so after this the account\'s own uploads with its API key and the uploads of your customers\' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner\'s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
2388
+ * Stop storing a partner\'s uploaded files in its own bucket
2389
+ */
2390
+ removePartnerStorageDestination(requestParameters, initOverrides) {
2391
+ return __awaiter(this, void 0, void 0, function* () {
2392
+ const response = yield this.removePartnerStorageDestinationRaw(requestParameters, initOverrides);
2393
+ return yield response.value();
2394
+ });
2395
+ }
2396
+ /**
2397
+ * Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event `id` (`webhook-id`) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new `createdAt` and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2398
+ * Send a webhook delivery again
2399
+ */
2400
+ replayPartnerNotificationDeliveryRaw(requestParameters, initOverrides) {
2401
+ return __awaiter(this, void 0, void 0, function* () {
2402
+ if (requestParameters['partnerId'] == null) {
2403
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling replayPartnerNotificationDelivery().');
2404
+ }
2405
+ if (requestParameters['deliveryId'] == null) {
2406
+ throw new runtime.RequiredError('deliveryId', 'Required parameter "deliveryId" was null or undefined when calling replayPartnerNotificationDelivery().');
2407
+ }
2408
+ const queryParameters = {};
2409
+ const headerParameters = {};
2410
+ if (requestParameters['idempotencyKey'] != null) {
2411
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2412
+ }
2413
+ if (this.configuration && this.configuration.accessToken) {
2414
+ const token = this.configuration.accessToken;
2415
+ const tokenString = yield token("apiKeyAuth", []);
2416
+ if (tokenString) {
2417
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2418
+ }
2419
+ }
2420
+ const response = yield this.request({
2421
+ path: `/partners/{partnerId}/notifications/deliveries/{deliveryId}/replay`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"deliveryId"}}`, encodeURIComponent(String(requestParameters['deliveryId']))),
2422
+ method: 'POST',
2423
+ headers: headerParameters,
2424
+ query: queryParameters,
2425
+ }, initOverrides);
2426
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationDeliveryFromJSON(jsonValue));
2427
+ });
2428
+ }
2429
+ /**
2430
+ * Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event `id` (`webhook-id`) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new `createdAt` and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2431
+ * Send a webhook delivery again
2432
+ */
2433
+ replayPartnerNotificationDelivery(requestParameters, initOverrides) {
2434
+ return __awaiter(this, void 0, void 0, function* () {
2435
+ const response = yield this.replayPartnerNotificationDeliveryRaw(requestParameters, initOverrides);
2436
+ return yield response.value();
2437
+ });
2438
+ }
2439
+ /**
2440
+ * Makes a new secret to sign your webhook with, and returns it in `webhookSecret`: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see `updatePartnerNotificationSettings` for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2441
+ * Make a new secret for your webhook
2442
+ */
2443
+ rotatePartnerWebhookSecretRaw(requestParameters, initOverrides) {
2444
+ return __awaiter(this, void 0, void 0, function* () {
2445
+ if (requestParameters['partnerId'] == null) {
2446
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling rotatePartnerWebhookSecret().');
2447
+ }
2448
+ const queryParameters = {};
2449
+ const headerParameters = {};
2450
+ if (requestParameters['idempotencyKey'] != null) {
2451
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2452
+ }
2453
+ if (this.configuration && this.configuration.accessToken) {
2454
+ const token = this.configuration.accessToken;
2455
+ const tokenString = yield token("apiKeyAuth", []);
2456
+ if (tokenString) {
2457
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2458
+ }
2459
+ }
2460
+ const response = yield this.request({
2461
+ path: `/partners/{partnerId}/notifications/webhook-secret`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2462
+ method: 'POST',
2463
+ headers: headerParameters,
2464
+ query: queryParameters,
2465
+ }, initOverrides);
2466
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationSettingsChangeFromJSON(jsonValue));
2467
+ });
2468
+ }
2469
+ /**
2470
+ * Makes a new secret to sign your webhook with, and returns it in `webhookSecret`: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see `updatePartnerNotificationSettings` for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2471
+ * Make a new secret for your webhook
2472
+ */
2473
+ rotatePartnerWebhookSecret(requestParameters, initOverrides) {
2474
+ return __awaiter(this, void 0, void 0, function* () {
2475
+ const response = yield this.rotatePartnerWebhookSecretRaw(requestParameters, initOverrides);
2476
+ return yield response.value();
2477
+ });
2478
+ }
2479
+ /**
2480
+ * Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses).
2481
+ * Bind a public JSON data source for embed refresh
2482
+ */
2483
+ setCompositionDataSourceRaw(requestParameters, initOverrides) {
2484
+ return __awaiter(this, void 0, void 0, function* () {
2485
+ if (requestParameters['id'] == null) {
2486
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setCompositionDataSource().');
2487
+ }
2488
+ if (requestParameters['setCompositionDataSourceRequest'] == null) {
2489
+ throw new runtime.RequiredError('setCompositionDataSourceRequest', 'Required parameter "setCompositionDataSourceRequest" was null or undefined when calling setCompositionDataSource().');
2490
+ }
2491
+ const queryParameters = {};
2492
+ const headerParameters = {};
2493
+ headerParameters['Content-Type'] = 'application/json';
2494
+ if (requestParameters['idempotencyKey'] != null) {
2495
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2496
+ }
2497
+ if (this.configuration && this.configuration.accessToken) {
2498
+ const token = this.configuration.accessToken;
2499
+ const tokenString = yield token("apiKeyAuth", []);
2500
+ if (tokenString) {
2501
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2502
+ }
2503
+ }
2504
+ const response = yield this.request({
2505
+ path: `/compositions/{id}/data-source`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2506
+ method: 'PUT',
2507
+ headers: headerParameters,
2508
+ query: queryParameters,
2509
+ body: SetCompositionDataSourceRequestToJSON(requestParameters['setCompositionDataSourceRequest']),
2510
+ }, initOverrides);
2511
+ return new runtime.VoidApiResponse(response);
2512
+ });
2513
+ }
2514
+ /**
2515
+ * Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses).
2516
+ * Bind a public JSON data source for embed refresh
2517
+ */
2518
+ setCompositionDataSource(requestParameters, initOverrides) {
2519
+ return __awaiter(this, void 0, void 0, function* () {
2520
+ yield this.setCompositionDataSourceRaw(requestParameters, initOverrides);
2521
+ });
2522
+ }
2523
+ /**
2524
+ * 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`.
2525
+ * Set Dynamic Content
2526
+ */
2527
+ setDynamicContentRaw(requestParameters, initOverrides) {
2528
+ return __awaiter(this, void 0, void 0, function* () {
2529
+ if (requestParameters['id'] == null) {
2530
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setDynamicContent().');
2531
+ }
2532
+ if (requestParameters['setDynamicContentRequest'] == null) {
2533
+ throw new runtime.RequiredError('setDynamicContentRequest', 'Required parameter "setDynamicContentRequest" was null or undefined when calling setDynamicContent().');
2534
+ }
2535
+ const queryParameters = {};
2536
+ const headerParameters = {};
2537
+ headerParameters['Content-Type'] = 'application/json';
2538
+ if (requestParameters['ifMatch'] != null) {
2539
+ headerParameters['If-Match'] = String(requestParameters['ifMatch']);
2540
+ }
2541
+ if (requestParameters['idempotencyKey'] != null) {
2542
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2543
+ }
2544
+ if (this.configuration && this.configuration.accessToken) {
2545
+ const token = this.configuration.accessToken;
2546
+ const tokenString = yield token("apiKeyAuth", []);
2547
+ if (tokenString) {
2548
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2549
+ }
2550
+ }
2551
+ const response = yield this.request({
2552
+ path: `/compositions/{id}/content`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2553
+ method: 'PUT',
2554
+ headers: headerParameters,
2555
+ query: queryParameters,
2556
+ body: SetDynamicContentRequestToJSON(requestParameters['setDynamicContentRequest']),
2557
+ }, initOverrides);
2558
+ return new runtime.JSONApiResponse(response, (jsonValue) => SetDynamicContent200ResponseFromJSON(jsonValue));
2559
+ });
2560
+ }
2561
+ /**
2562
+ * 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`.
2563
+ * Set Dynamic Content
2564
+ */
2565
+ setDynamicContent(requestParameters, initOverrides) {
2566
+ return __awaiter(this, void 0, void 0, function* () {
2567
+ const response = yield this.setDynamicContentRaw(requestParameters, initOverrides);
2568
+ return yield response.value();
2569
+ });
2570
+ }
2571
+ /**
2572
+ * Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
2573
+ * Set or clear design defaults for one managed user
2574
+ */
2575
+ setManagedUserDesignDefaultsRaw(requestParameters, initOverrides) {
2576
+ return __awaiter(this, void 0, void 0, function* () {
2577
+ if (requestParameters['id'] == null) {
2578
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setManagedUserDesignDefaults().');
2579
+ }
2580
+ if (requestParameters['setPartnerDesignDefaultsRequest'] == null) {
2581
+ throw new runtime.RequiredError('setPartnerDesignDefaultsRequest', 'Required parameter "setPartnerDesignDefaultsRequest" was null or undefined when calling setManagedUserDesignDefaults().');
2582
+ }
2583
+ const queryParameters = {};
2584
+ const headerParameters = {};
2585
+ headerParameters['Content-Type'] = 'application/json';
2586
+ if (this.configuration && this.configuration.accessToken) {
2587
+ const token = this.configuration.accessToken;
2588
+ const tokenString = yield token("apiKeyAuth", []);
2589
+ if (tokenString) {
2590
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2591
+ }
2592
+ }
2593
+ const response = yield this.request({
2594
+ path: `/managed-users/{id}/design-defaults`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2595
+ method: 'PUT',
2596
+ headers: headerParameters,
2597
+ query: queryParameters,
2598
+ body: SetPartnerDesignDefaultsRequestToJSON(requestParameters['setPartnerDesignDefaultsRequest']),
2599
+ }, initOverrides);
2600
+ return new runtime.VoidApiResponse(response);
2601
+ });
2602
+ }
2603
+ /**
2604
+ * Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
2605
+ * Set or clear design defaults for one managed user
2606
+ */
2607
+ setManagedUserDesignDefaults(requestParameters, initOverrides) {
2608
+ return __awaiter(this, void 0, void 0, function* () {
2609
+ yield this.setManagedUserDesignDefaultsRaw(requestParameters, initOverrides);
2610
+ });
2611
+ }
2612
+ /**
2613
+ * Send monthly_credits as a whole number from 0 up to 2147483647 to cap what this customer\'s editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer\'s sessions spent that month (refunded credits do not count) and applies to all of the customer\'s sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
2614
+ * Set or clear the monthly credit cap for one managed user
2615
+ */
2616
+ setManagedUserLimitsRaw(requestParameters, initOverrides) {
2617
+ return __awaiter(this, void 0, void 0, function* () {
2618
+ if (requestParameters['id'] == null) {
2619
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setManagedUserLimits().');
2620
+ }
2621
+ if (requestParameters['setManagedUserLimitsRequest'] == null) {
2622
+ throw new runtime.RequiredError('setManagedUserLimitsRequest', 'Required parameter "setManagedUserLimitsRequest" was null or undefined when calling setManagedUserLimits().');
2623
+ }
2624
+ const queryParameters = {};
2625
+ const headerParameters = {};
2626
+ headerParameters['Content-Type'] = 'application/json';
2627
+ if (this.configuration && this.configuration.accessToken) {
2628
+ const token = this.configuration.accessToken;
2629
+ const tokenString = yield token("apiKeyAuth", []);
2630
+ if (tokenString) {
2631
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2632
+ }
2633
+ }
2634
+ const response = yield this.request({
2635
+ path: `/managed-users/{id}/limits`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2636
+ method: 'PUT',
2637
+ headers: headerParameters,
2638
+ query: queryParameters,
2639
+ body: SetManagedUserLimitsRequestToJSON(requestParameters['setManagedUserLimitsRequest']),
2640
+ }, initOverrides);
2641
+ return new runtime.VoidApiResponse(response);
2642
+ });
2643
+ }
2644
+ /**
2645
+ * Send monthly_credits as a whole number from 0 up to 2147483647 to cap what this customer\'s editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer\'s sessions spent that month (refunded credits do not count) and applies to all of the customer\'s sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
2646
+ * Set or clear the monthly credit cap for one managed user
2647
+ */
2648
+ setManagedUserLimits(requestParameters, initOverrides) {
2649
+ return __awaiter(this, void 0, void 0, function* () {
2650
+ yield this.setManagedUserLimitsRaw(requestParameters, initOverrides);
2651
+ });
2652
+ }
2653
+ /**
2654
+ * Send `{ \"design\": { ... } }` or `{ \"design\": null }` to remove. New compositions merge this layer over the widget base and under each managed user\'s default and the request body.
2655
+ * Set or clear partner-wide design defaults
2656
+ */
2657
+ setPartnerDesignDefaultsRaw(requestParameters, initOverrides) {
2658
+ return __awaiter(this, void 0, void 0, function* () {
2659
+ if (requestParameters['partnerId'] == null) {
2660
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerDesignDefaults().');
2661
+ }
2662
+ if (requestParameters['setPartnerDesignDefaultsRequest'] == null) {
2663
+ throw new runtime.RequiredError('setPartnerDesignDefaultsRequest', 'Required parameter "setPartnerDesignDefaultsRequest" was null or undefined when calling setPartnerDesignDefaults().');
2664
+ }
2665
+ const queryParameters = {};
2666
+ const headerParameters = {};
2667
+ headerParameters['Content-Type'] = 'application/json';
2668
+ if (this.configuration && this.configuration.accessToken) {
2669
+ const token = this.configuration.accessToken;
2670
+ const tokenString = yield token("apiKeyAuth", []);
2671
+ if (tokenString) {
2672
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2673
+ }
2674
+ }
2675
+ const response = yield this.request({
2676
+ path: `/partners/{partnerId}/design-defaults`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2677
+ method: 'PUT',
2678
+ headers: headerParameters,
2679
+ query: queryParameters,
2680
+ body: SetPartnerDesignDefaultsRequestToJSON(requestParameters['setPartnerDesignDefaultsRequest']),
2681
+ }, initOverrides);
2682
+ return new runtime.VoidApiResponse(response);
2683
+ });
2684
+ }
2685
+ /**
2686
+ * Send `{ \"design\": { ... } }` or `{ \"design\": null }` to remove. New compositions merge this layer over the widget base and under each managed user\'s default and the request body.
2687
+ * Set or clear partner-wide design defaults
2688
+ */
2689
+ setPartnerDesignDefaults(requestParameters, initOverrides) {
2690
+ return __awaiter(this, void 0, void 0, function* () {
2691
+ yield this.setPartnerDesignDefaultsRaw(requestParameters, initOverrides);
2692
+ });
2693
+ }
2694
+ /**
2695
+ * Offers one of the partner\'s own widgets as a preset under `key`. If the partner already has a preset under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole preset: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit (`rating`, `quiz-3`). The widget must belong to the partner\'s account; a widget that does not exist and one that belongs to somebody else are refused in the same way (404 `PRESET_WIDGET_NOT_FOUND`). A widget is a preset under at most one key (409 `PRESET_WIDGET_ALREADY_USED`; `details.key` says which), and an account can have at most 100 presets (409 `PRESET_LIMIT_REACHED`). Later changes to the widget reach new copies and new compositions; copies made earlier are not touched. Deleting the widget removes its preset.
2696
+ * Make a widget a preset, or replace a preset
2697
+ */
2698
+ setPartnerPresetRaw(requestParameters, initOverrides) {
2699
+ return __awaiter(this, void 0, void 0, function* () {
2700
+ if (requestParameters['partnerId'] == null) {
2701
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerPreset().');
2702
+ }
2703
+ if (requestParameters['key'] == null) {
2704
+ throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling setPartnerPreset().');
2705
+ }
2706
+ if (requestParameters['setPartnerPresetRequest'] == null) {
2707
+ throw new runtime.RequiredError('setPartnerPresetRequest', 'Required parameter "setPartnerPresetRequest" was null or undefined when calling setPartnerPreset().');
2708
+ }
2709
+ const queryParameters = {};
2710
+ const headerParameters = {};
2711
+ headerParameters['Content-Type'] = 'application/json';
2712
+ if (this.configuration && this.configuration.accessToken) {
2713
+ const token = this.configuration.accessToken;
2714
+ const tokenString = yield token("apiKeyAuth", []);
2715
+ if (tokenString) {
2716
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2717
+ }
2718
+ }
2719
+ const response = yield this.request({
2720
+ path: `/partners/{partnerId}/presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
2721
+ method: 'PUT',
2722
+ headers: headerParameters,
2723
+ query: queryParameters,
2724
+ body: SetPartnerPresetRequestToJSON(requestParameters['setPartnerPresetRequest']),
2725
+ }, initOverrides);
2726
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerPresetFromJSON(jsonValue));
2727
+ });
2728
+ }
2729
+ /**
2730
+ * Offers one of the partner\'s own widgets as a preset under `key`. If the partner already has a preset under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole preset: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit (`rating`, `quiz-3`). The widget must belong to the partner\'s account; a widget that does not exist and one that belongs to somebody else are refused in the same way (404 `PRESET_WIDGET_NOT_FOUND`). A widget is a preset under at most one key (409 `PRESET_WIDGET_ALREADY_USED`; `details.key` says which), and an account can have at most 100 presets (409 `PRESET_LIMIT_REACHED`). Later changes to the widget reach new copies and new compositions; copies made earlier are not touched. Deleting the widget removes its preset.
2731
+ * Make a widget a preset, or replace a preset
2732
+ */
2733
+ setPartnerPreset(requestParameters, initOverrides) {
2734
+ return __awaiter(this, void 0, void 0, function* () {
2735
+ const response = yield this.setPartnerPresetRaw(requestParameters, initOverrides);
2736
+ return yield response.value();
2737
+ });
2738
+ }
2739
+ /**
2740
+ * Points the partner at a bucket of its own on an S3-compatible service (Amazon S3, Backblaze B2, Cloudflare R2, Wasabi, MinIO and the like). From then on, a file uploaded with `uploadsPost` by the account that administers the partner is stored in that bucket instead of with Widgetic. It takes none of the account\'s storage allowance, and its `url` is served from `public_base_url`. Only uploads sent with an API key, an SDK token or an editor session use the destination. Uploads from the Widgetic website, resumable uploads and the media library keep using Widgetic\'s storage. A destination is required. Partner storage is not optional: your customers\' files, and your own uploads with your API key, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<key_prefix>widgetic-check/`, reads it back from `<public_base_url>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `public_base_url`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
2741
+ * Set where a partner\'s uploaded files are stored
2742
+ */
2743
+ setPartnerStorageDestinationRaw(requestParameters, initOverrides) {
2744
+ return __awaiter(this, void 0, void 0, function* () {
2745
+ if (requestParameters['partnerId'] == null) {
2746
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerStorageDestination().');
2747
+ }
2748
+ if (requestParameters['setPartnerStorageDestinationRequest'] == null) {
2749
+ throw new runtime.RequiredError('setPartnerStorageDestinationRequest', 'Required parameter "setPartnerStorageDestinationRequest" was null or undefined when calling setPartnerStorageDestination().');
2750
+ }
2751
+ const queryParameters = {};
2752
+ const headerParameters = {};
2753
+ headerParameters['Content-Type'] = 'application/json';
2754
+ if (this.configuration && this.configuration.accessToken) {
2755
+ const token = this.configuration.accessToken;
2756
+ const tokenString = yield token("apiKeyAuth", []);
2757
+ if (tokenString) {
2758
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2759
+ }
2760
+ }
2761
+ const response = yield this.request({
2762
+ path: `/partners/{partnerId}/storage`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2763
+ method: 'PUT',
2764
+ headers: headerParameters,
2765
+ query: queryParameters,
2766
+ body: SetPartnerStorageDestinationRequestToJSON(requestParameters['setPartnerStorageDestinationRequest']),
2767
+ }, initOverrides);
2768
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStorageDestinationFromJSON(jsonValue));
2769
+ });
2770
+ }
2771
+ /**
2772
+ * Points the partner at a bucket of its own on an S3-compatible service (Amazon S3, Backblaze B2, Cloudflare R2, Wasabi, MinIO and the like). From then on, a file uploaded with `uploadsPost` by the account that administers the partner is stored in that bucket instead of with Widgetic. It takes none of the account\'s storage allowance, and its `url` is served from `public_base_url`. Only uploads sent with an API key, an SDK token or an editor session use the destination. Uploads from the Widgetic website, resumable uploads and the media library keep using Widgetic\'s storage. A destination is required. Partner storage is not optional: your customers\' files, and your own uploads with your API key, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<key_prefix>widgetic-check/`, reads it back from `<public_base_url>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `public_base_url`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
2773
+ * Set where a partner\'s uploaded files are stored
2774
+ */
2775
+ setPartnerStorageDestination(requestParameters, initOverrides) {
2776
+ return __awaiter(this, void 0, void 0, function* () {
2777
+ const response = yield this.setPartnerStorageDestinationRaw(requestParameters, initOverrides);
2778
+ return yield response.value();
2779
+ });
2780
+ }
2781
+ /**
2782
+ * 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`.
2783
+ * Update Composition
2784
+ */
2785
+ updateCompositionRaw(requestParameters, initOverrides) {
2786
+ return __awaiter(this, void 0, void 0, function* () {
2787
+ if (requestParameters['id'] == null) {
2788
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateComposition().');
2789
+ }
2790
+ if (requestParameters['updateComposition'] == null) {
2791
+ throw new runtime.RequiredError('updateComposition', 'Required parameter "updateComposition" was null or undefined when calling updateComposition().');
2792
+ }
2793
+ const queryParameters = {};
2794
+ const headerParameters = {};
2795
+ headerParameters['Content-Type'] = 'application/json';
2796
+ if (requestParameters['idempotencyKey'] != null) {
2797
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2798
+ }
2799
+ if (this.configuration && this.configuration.accessToken) {
2800
+ const token = this.configuration.accessToken;
2801
+ const tokenString = yield token("apiKeyAuth", []);
2802
+ if (tokenString) {
2803
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2804
+ }
2805
+ }
2806
+ const response = yield this.request({
2807
+ path: `/compositions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2808
+ method: 'PUT',
2809
+ headers: headerParameters,
2810
+ query: queryParameters,
2811
+ body: UpdateCompositionToJSON(requestParameters['updateComposition']),
2812
+ }, initOverrides);
2813
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
2814
+ });
2815
+ }
2816
+ /**
2817
+ * 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`.
2818
+ * Update Composition
2819
+ */
2820
+ updateComposition(requestParameters, initOverrides) {
2821
+ return __awaiter(this, void 0, void 0, function* () {
2822
+ const response = yield this.updateCompositionRaw(requestParameters, initOverrides);
2823
+ return yield response.value();
2824
+ });
2825
+ }
2826
+ /**
2827
+ * Updates an existing managed user. Only `external_id`, `metadata` and `is_active` can change, and `metadata` is replaced as a whole, so send all of it. `is_active: false` switches the managed user off: what it already has stays, and nothing new can be filed under it until you send `is_active: true`. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The `Idempotency-Key` header is required (`400` without it).
2828
+ * Update Managed User
2829
+ */
2830
+ updateManagedUserRaw(requestParameters, initOverrides) {
2831
+ return __awaiter(this, void 0, void 0, function* () {
2832
+ if (requestParameters['id'] == null) {
2833
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateManagedUser().');
2834
+ }
2835
+ if (requestParameters['updateManagedUser'] == null) {
2836
+ throw new runtime.RequiredError('updateManagedUser', 'Required parameter "updateManagedUser" was null or undefined when calling updateManagedUser().');
2837
+ }
2838
+ const queryParameters = {};
2839
+ const headerParameters = {};
2840
+ headerParameters['Content-Type'] = 'application/json';
2841
+ if (requestParameters['idempotencyKey'] != null) {
2842
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2843
+ }
2844
+ if (this.configuration && this.configuration.accessToken) {
2845
+ const token = this.configuration.accessToken;
2846
+ const tokenString = yield token("apiKeyAuth", []);
2847
+ if (tokenString) {
2848
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2849
+ }
2850
+ }
2851
+ const response = yield this.request({
2852
+ path: `/managed-users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
2853
+ method: 'PUT',
2854
+ headers: headerParameters,
2855
+ query: queryParameters,
2856
+ body: UpdateManagedUserToJSON(requestParameters['updateManagedUser']),
2857
+ }, initOverrides);
2858
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserFromJSON(jsonValue));
2859
+ });
2860
+ }
2861
+ /**
2862
+ * Updates an existing managed user. Only `external_id`, `metadata` and `is_active` can change, and `metadata` is replaced as a whole, so send all of it. `is_active: false` switches the managed user off: what it already has stays, and nothing new can be filed under it until you send `is_active: true`. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The `Idempotency-Key` header is required (`400` without it).
2863
+ * Update Managed User
2864
+ */
2865
+ updateManagedUser(requestParameters, initOverrides) {
2866
+ return __awaiter(this, void 0, void 0, function* () {
2867
+ const response = yield this.updateManagedUserRaw(requestParameters, initOverrides);
2868
+ return yield response.value();
2869
+ });
2870
+ }
2871
+ /**
2872
+ * Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** `emailRecipients` is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever `emailEvents` says; it narrows the others. **Webhook.** `webhookUrl` is where Widgetic sends a signed `POST` for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be `https` on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as `webhookSecret`: **keep it now, it is shown once**. `webhookEvents` narrows what is sent. Each call has a JSON body, `{ \"id\": \"evt_...\", \"type\": \"invoice.paid\", \"createdAt\": \"...\", \"partnerId\": \"...\", \"data\": { ... } }` (`data` is the `data` of `PartnerNotification`), and these headers: `webhook-id` (the same as `id`, and the same on every retry), `webhook-timestamp` (seconds since 1970) and `webhook-signature` (`v1,` and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the `whsec_` prefix, decode it from base64, and sign the text `<webhook-id>.<webhook-timestamp>.<the raw body>` with it; the header holds `v1,<base64 of the result>` (two signatures separated by a space while a rotated secret overlaps). Reject a `webhook-timestamp` that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (`listPartnerNotificationDeliveries` shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same `id`, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
2873
+ * Choose where your notifications go
2874
+ */
2875
+ updatePartnerNotificationSettingsRaw(requestParameters, initOverrides) {
2876
+ return __awaiter(this, void 0, void 0, function* () {
2877
+ if (requestParameters['partnerId'] == null) {
2878
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling updatePartnerNotificationSettings().');
2879
+ }
2880
+ if (requestParameters['updatePartnerNotificationSettingsRequest'] == null) {
2881
+ throw new runtime.RequiredError('updatePartnerNotificationSettingsRequest', 'Required parameter "updatePartnerNotificationSettingsRequest" was null or undefined when calling updatePartnerNotificationSettings().');
2882
+ }
2883
+ const queryParameters = {};
2884
+ const headerParameters = {};
2885
+ headerParameters['Content-Type'] = 'application/json';
2886
+ if (requestParameters['idempotencyKey'] != null) {
2887
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
2888
+ }
2889
+ if (this.configuration && this.configuration.accessToken) {
2890
+ const token = this.configuration.accessToken;
2891
+ const tokenString = yield token("apiKeyAuth", []);
2892
+ if (tokenString) {
2893
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2894
+ }
2895
+ }
2896
+ const response = yield this.request({
2897
+ path: `/partners/{partnerId}/notifications/settings`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
2898
+ method: 'PUT',
2899
+ headers: headerParameters,
2900
+ query: queryParameters,
2901
+ body: UpdatePartnerNotificationSettingsRequestToJSON(requestParameters['updatePartnerNotificationSettingsRequest']),
2902
+ }, initOverrides);
2903
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationSettingsChangeFromJSON(jsonValue));
2904
+ });
2905
+ }
2906
+ /**
2907
+ * Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** `emailRecipients` is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever `emailEvents` says; it narrows the others. **Webhook.** `webhookUrl` is where Widgetic sends a signed `POST` for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be `https` on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as `webhookSecret`: **keep it now, it is shown once**. `webhookEvents` narrows what is sent. Each call has a JSON body, `{ \"id\": \"evt_...\", \"type\": \"invoice.paid\", \"createdAt\": \"...\", \"partnerId\": \"...\", \"data\": { ... } }` (`data` is the `data` of `PartnerNotification`), and these headers: `webhook-id` (the same as `id`, and the same on every retry), `webhook-timestamp` (seconds since 1970) and `webhook-signature` (`v1,` and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the `whsec_` prefix, decode it from base64, and sign the text `<webhook-id>.<webhook-timestamp>.<the raw body>` with it; the header holds `v1,<base64 of the result>` (two signatures separated by a space while a rotated secret overlaps). Reject a `webhook-timestamp` that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (`listPartnerNotificationDeliveries` shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same `id`, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
2908
+ * Choose where your notifications go
2909
+ */
2910
+ updatePartnerNotificationSettings(requestParameters, initOverrides) {
2911
+ return __awaiter(this, void 0, void 0, function* () {
2912
+ const response = yield this.updatePartnerNotificationSettingsRaw(requestParameters, initOverrides);
2913
+ return yield response.value();
2914
+ });
2915
+ }
2916
+ /**
2917
+ * Replaces the website of one entry on an account\'s own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
2918
+ * Change a website on your list
2919
+ */
2920
+ updatePersonalWorkspaceDomainRaw(requestParameters, initOverrides) {
2921
+ return __awaiter(this, void 0, void 0, function* () {
2922
+ if (requestParameters['id'] == null) {
2923
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updatePersonalWorkspaceDomain().');
2924
+ }
2925
+ if (requestParameters['domainId'] == null) {
2926
+ throw new runtime.RequiredError('domainId', 'Required parameter "domainId" was null or undefined when calling updatePersonalWorkspaceDomain().');
2927
+ }
2928
+ if (requestParameters['updateDomainRequest'] == null) {
2929
+ throw new runtime.RequiredError('updateDomainRequest', 'Required parameter "updateDomainRequest" was null or undefined when calling updatePersonalWorkspaceDomain().');
2930
+ }
2931
+ const queryParameters = {};
2932
+ const headerParameters = {};
2933
+ headerParameters['Content-Type'] = 'application/json';
2934
+ if (this.configuration && this.configuration.accessToken) {
2935
+ const token = this.configuration.accessToken;
2936
+ const tokenString = yield token("apiKeyAuth", []);
2937
+ if (tokenString) {
2938
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2939
+ }
2940
+ }
2941
+ const response = yield this.request({
2942
+ path: `/users/{id}/workspace/domains/{domainId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters['domainId']))),
2943
+ method: 'PUT',
2944
+ headers: headerParameters,
2945
+ query: queryParameters,
2946
+ body: UpdateDomainRequestToJSON(requestParameters['updateDomainRequest']),
2947
+ }, initOverrides);
2948
+ return new runtime.JSONApiResponse(response, (jsonValue) => PersonalWorkspaceDomainResultFromJSON(jsonValue));
2949
+ });
2950
+ }
2951
+ /**
2952
+ * Replaces the website of one entry on an account\'s own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
2953
+ * Change a website on your list
2954
+ */
2955
+ updatePersonalWorkspaceDomain(requestParameters, initOverrides) {
2956
+ return __awaiter(this, void 0, void 0, function* () {
2957
+ const response = yield this.updatePersonalWorkspaceDomainRaw(requestParameters, initOverrides);
2958
+ return yield response.value();
2959
+ });
2960
+ }
2961
+ /**
2962
+ * Renames a key, or switches it off (`isActive: false`) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code `API_KEY_SCOPE_MISSING`. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
2963
+ * Rename an API key, or switch it off or on
2964
+ */
2965
+ updateUserApiKeyRaw(requestParameters, initOverrides) {
2966
+ return __awaiter(this, void 0, void 0, function* () {
2967
+ if (requestParameters['id'] == null) {
2968
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateUserApiKey().');
2969
+ }
2970
+ if (requestParameters['keyId'] == null) {
2971
+ throw new runtime.RequiredError('keyId', 'Required parameter "keyId" was null or undefined when calling updateUserApiKey().');
2972
+ }
2973
+ if (requestParameters['updateUserApiKeyRequest'] == null) {
2974
+ throw new runtime.RequiredError('updateUserApiKeyRequest', 'Required parameter "updateUserApiKeyRequest" was null or undefined when calling updateUserApiKey().');
2975
+ }
2976
+ const queryParameters = {};
2977
+ const headerParameters = {};
2978
+ headerParameters['Content-Type'] = 'application/json';
2979
+ if (this.configuration && this.configuration.accessToken) {
2980
+ const token = this.configuration.accessToken;
2981
+ const tokenString = yield token("apiKeyAuth", []);
2982
+ if (tokenString) {
2983
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2984
+ }
2985
+ }
2986
+ const response = yield this.request({
2987
+ path: `/users/{id}/keys/{keyId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"keyId"}}`, encodeURIComponent(String(requestParameters['keyId']))),
2988
+ method: 'PUT',
2989
+ headers: headerParameters,
2990
+ query: queryParameters,
2991
+ body: UpdateUserApiKeyRequestToJSON(requestParameters['updateUserApiKeyRequest']),
2992
+ }, initOverrides);
2993
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserApiKeyFromJSON(jsonValue));
2994
+ });
2995
+ }
2996
+ /**
2997
+ * Renames a key, or switches it off (`isActive: false`) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code `API_KEY_SCOPE_MISSING`. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
2998
+ * Rename an API key, or switch it off or on
2999
+ */
3000
+ updateUserApiKey(requestParameters, initOverrides) {
3001
+ return __awaiter(this, void 0, void 0, function* () {
3002
+ const response = yield this.updateUserApiKeyRaw(requestParameters, initOverrides);
3003
+ return yield response.value();
3004
+ });
3005
+ }
3006
+ /**
3007
+ * The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user\'s files with `managed_user_id` or `managed_user_external_id`.
3008
+ * List the account\'s uploads
3009
+ */
3010
+ uploadsGetRaw(requestParameters, initOverrides) {
3011
+ return __awaiter(this, void 0, void 0, function* () {
3012
+ const queryParameters = {};
3013
+ if (requestParameters['limit'] != null) {
3014
+ queryParameters['limit'] = requestParameters['limit'];
3015
+ }
3016
+ if (requestParameters['managedUserId'] != null) {
3017
+ queryParameters['managed_user_id'] = requestParameters['managedUserId'];
3018
+ }
3019
+ if (requestParameters['managedUserExternalId'] != null) {
3020
+ queryParameters['managed_user_external_id'] = requestParameters['managedUserExternalId'];
3021
+ }
3022
+ const headerParameters = {};
3023
+ if (this.configuration && this.configuration.accessToken) {
3024
+ const token = this.configuration.accessToken;
3025
+ const tokenString = yield token("apiKeyAuth", []);
3026
+ if (tokenString) {
3027
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3028
+ }
3029
+ }
3030
+ const response = yield this.request({
3031
+ path: `/uploads`,
3032
+ method: 'GET',
3033
+ headers: headerParameters,
3034
+ query: queryParameters,
3035
+ }, initOverrides);
3036
+ return new runtime.JSONApiResponse(response, (jsonValue) => UploadsGet200ResponseFromJSON(jsonValue));
3037
+ });
3038
+ }
3039
+ /**
3040
+ * The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user\'s files with `managed_user_id` or `managed_user_external_id`.
3041
+ * List the account\'s uploads
3042
+ */
3043
+ uploadsGet() {
3044
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
3045
+ const response = yield this.uploadsGetRaw(requestParameters, initOverrides);
3046
+ return yield response.value();
3047
+ });
3048
+ }
3049
+ /**
3050
+ * Removes the stored file and the upload row. A file in Widgetic\'s own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
3051
+ * Delete an upload
3052
+ */
3053
+ uploadsIdDeleteRaw(requestParameters, initOverrides) {
3054
+ return __awaiter(this, void 0, void 0, function* () {
3055
+ if (requestParameters['id'] == null) {
3056
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling uploadsIdDelete().');
3057
+ }
3058
+ const queryParameters = {};
3059
+ const headerParameters = {};
3060
+ if (this.configuration && this.configuration.accessToken) {
3061
+ const token = this.configuration.accessToken;
3062
+ const tokenString = yield token("apiKeyAuth", []);
3063
+ if (tokenString) {
3064
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3065
+ }
3066
+ }
3067
+ const response = yield this.request({
3068
+ path: `/uploads/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
3069
+ method: 'DELETE',
3070
+ headers: headerParameters,
3071
+ query: queryParameters,
3072
+ }, initOverrides);
3073
+ return new runtime.JSONApiResponse(response, (jsonValue) => UploadsIdDelete200ResponseFromJSON(jsonValue));
3074
+ });
3075
+ }
3076
+ /**
3077
+ * Removes the stored file and the upload row. A file in Widgetic\'s own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
3078
+ * Delete an upload
3079
+ */
3080
+ uploadsIdDelete(requestParameters, initOverrides) {
3081
+ return __awaiter(this, void 0, void 0, function* () {
3082
+ const response = yield this.uploadsIdDeleteRaw(requestParameters, initOverrides);
3083
+ return yield response.value();
3084
+ });
3085
+ }
3086
+ /**
3087
+ * The details of one of the account\'s uploads. An upload that belongs to another account is not found.
3088
+ * Get an upload by id
3089
+ */
3090
+ uploadsIdGetRaw(requestParameters, initOverrides) {
3091
+ return __awaiter(this, void 0, void 0, function* () {
3092
+ if (requestParameters['id'] == null) {
3093
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling uploadsIdGet().');
3094
+ }
3095
+ const queryParameters = {};
3096
+ const headerParameters = {};
3097
+ if (this.configuration && this.configuration.accessToken) {
3098
+ const token = this.configuration.accessToken;
3099
+ const tokenString = yield token("apiKeyAuth", []);
3100
+ if (tokenString) {
3101
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3102
+ }
3103
+ }
3104
+ const response = yield this.request({
3105
+ path: `/uploads/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
3106
+ method: 'GET',
3107
+ headers: headerParameters,
3108
+ query: queryParameters,
3109
+ }, initOverrides);
3110
+ return new runtime.JSONApiResponse(response, (jsonValue) => UploadFromJSON(jsonValue));
3111
+ });
3112
+ }
3113
+ /**
3114
+ * The details of one of the account\'s uploads. An upload that belongs to another account is not found.
3115
+ * Get an upload by id
3116
+ */
3117
+ uploadsIdGet(requestParameters, initOverrides) {
3118
+ return __awaiter(this, void 0, void 0, function* () {
3119
+ const response = yield this.uploadsIdGetRaw(requestParameters, initOverrides);
3120
+ return yield response.value();
3121
+ });
3122
+ }
3123
+ /**
3124
+ * The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
3125
+ * Upload size limits and accepted file types
3126
+ */
3127
+ uploadsLimitsGetRaw(initOverrides) {
3128
+ return __awaiter(this, void 0, void 0, function* () {
3129
+ const queryParameters = {};
3130
+ const headerParameters = {};
3131
+ if (this.configuration && this.configuration.accessToken) {
3132
+ const token = this.configuration.accessToken;
3133
+ const tokenString = yield token("apiKeyAuth", []);
3134
+ if (tokenString) {
3135
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3136
+ }
3137
+ }
3138
+ const response = yield this.request({
3139
+ path: `/uploads/limits`,
3140
+ method: 'GET',
3141
+ headers: headerParameters,
3142
+ query: queryParameters,
3143
+ }, initOverrides);
3144
+ return new runtime.JSONApiResponse(response, (jsonValue) => UploadLimitsFromJSON(jsonValue));
3145
+ });
3146
+ }
3147
+ /**
3148
+ * The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
3149
+ * Upload size limits and accepted file types
3150
+ */
3151
+ uploadsLimitsGet(initOverrides) {
3152
+ return __awaiter(this, void 0, void 0, function* () {
3153
+ const response = yield this.uploadsLimitsGetRaw(initOverrides);
3154
+ return yield response.value();
3155
+ });
3156
+ }
3157
+ /**
3158
+ * Stores one file for the account and returns its public address. This is how a user\'s own images, video and PDFs reach a widget\'s content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the account\'s storage allowance, and a full allowance is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `uploadsLimitsGet` lists the size limit and the accepted types. To upload the file for one of your managed users, send `managed_user_id` (Widgetic\'s id for the user) or `managed_user_external_id` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user\'s files with `uploadsGet`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session\'s own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `context_type`, `source`, `widget_id` and `conversation_id` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner\'s business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner\'s own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner\'s public address, and its `storage_key` is the key in the partner\'s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner\'s storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional. A partner\'s own uploads (with its API key) and the uploads of its customers\' editor sessions are kept in the partner\'s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session\'s browser is only told that the feature is not available right now.
3159
+ * Upload a file
3160
+ */
3161
+ uploadsPostRaw(requestParameters, initOverrides) {
3162
+ return __awaiter(this, void 0, void 0, function* () {
3163
+ if (requestParameters['file'] == null) {
3164
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadsPost().');
3165
+ }
3166
+ const queryParameters = {};
3167
+ const headerParameters = {};
3168
+ if (this.configuration && this.configuration.accessToken) {
3169
+ const token = this.configuration.accessToken;
3170
+ const tokenString = yield token("apiKeyAuth", []);
3171
+ if (tokenString) {
3172
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3173
+ }
3174
+ }
3175
+ const consumes = [
3176
+ { contentType: 'multipart/form-data' },
3177
+ ];
3178
+ // @ts-ignore: canConsumeForm may be unused
3179
+ const canConsumeForm = runtime.canConsumeForm(consumes);
3180
+ let formParams;
3181
+ let useForm = false;
3182
+ // use FormData to transmit files using content-type "multipart/form-data"
3183
+ useForm = canConsumeForm;
3184
+ if (useForm) {
3185
+ formParams = new FormData();
3186
+ }
3187
+ else {
3188
+ formParams = new URLSearchParams();
3189
+ }
3190
+ if (requestParameters['file'] != null) {
3191
+ formParams.append('file', requestParameters['file']);
3192
+ }
3193
+ if (requestParameters['contextType'] != null) {
3194
+ formParams.append('context_type', requestParameters['contextType']);
3195
+ }
3196
+ if (requestParameters['source'] != null) {
3197
+ formParams.append('source', requestParameters['source']);
3198
+ }
3199
+ if (requestParameters['managedUserId'] != null) {
3200
+ formParams.append('managed_user_id', requestParameters['managedUserId']);
3201
+ }
3202
+ if (requestParameters['managedUserExternalId'] != null) {
3203
+ formParams.append('managed_user_external_id', requestParameters['managedUserExternalId']);
3204
+ }
3205
+ const response = yield this.request({
3206
+ path: `/uploads`,
3207
+ method: 'POST',
3208
+ headers: headerParameters,
3209
+ query: queryParameters,
3210
+ body: formParams,
3211
+ }, initOverrides);
3212
+ return new runtime.JSONApiResponse(response, (jsonValue) => UploadFromJSON(jsonValue));
3213
+ });
3214
+ }
3215
+ /**
3216
+ * Stores one file for the account and returns its public address. This is how a user\'s own images, video and PDFs reach a widget\'s content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the account\'s storage allowance, and a full allowance is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `uploadsLimitsGet` lists the size limit and the accepted types. To upload the file for one of your managed users, send `managed_user_id` (Widgetic\'s id for the user) or `managed_user_external_id` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user\'s files with `uploadsGet`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session\'s own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `context_type`, `source`, `widget_id` and `conversation_id` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner\'s business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner\'s own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner\'s public address, and its `storage_key` is the key in the partner\'s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner\'s storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional. A partner\'s own uploads (with its API key) and the uploads of its customers\' editor sessions are kept in the partner\'s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session\'s browser is only told that the feature is not available right now.
3217
+ * Upload a file
3218
+ */
3219
+ uploadsPost(requestParameters, initOverrides) {
3220
+ return __awaiter(this, void 0, void 0, function* () {
3221
+ const response = yield this.uploadsPostRaw(requestParameters, initOverrides);
3222
+ return yield response.value();
3223
+ });
3224
+ }
3225
+ /**
3226
+ * Validate current authentication token
3227
+ */
3228
+ validateTokenRaw(initOverrides) {
3229
+ return __awaiter(this, void 0, void 0, function* () {
3230
+ const queryParameters = {};
3231
+ const headerParameters = {};
3232
+ if (this.configuration && this.configuration.apiKey) {
3233
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
3234
+ }
3235
+ if (this.configuration && this.configuration.accessToken) {
3236
+ const token = this.configuration.accessToken;
3237
+ const tokenString = yield token("BearerAuth", []);
3238
+ if (tokenString) {
3239
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3240
+ }
3241
+ }
3242
+ const response = yield this.request({
3243
+ path: `/tokens/validate`,
3244
+ method: 'GET',
3245
+ headers: headerParameters,
3246
+ query: queryParameters,
3247
+ }, initOverrides);
3248
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidateToken200ResponseFromJSON(jsonValue));
3249
+ });
3250
+ }
3251
+ /**
3252
+ * Validate current authentication token
3253
+ */
3254
+ validateToken(initOverrides) {
3255
+ return __awaiter(this, void 0, void 0, function* () {
3256
+ const response = yield this.validateTokenRaw(initOverrides);
3257
+ return yield response.value();
3258
+ });
3259
+ }
3260
+ /**
3261
+ * Runs the same check as `setPartnerStorageDestination` against the destination already saved: a test file is written, read back from the public address and deleted. Use it after rotating a key or changing a bucket policy, or when uploads are failing with 502 or 503. The result is recorded either way. A pass refreshes `verifiedAt` and clears `lastVerificationError`; a failure answers 422 `STORAGE_DESTINATION_UNVERIFIED` and is recorded in `lastVerificationError` and `lastVerificationFailedAt`, so the destination shows what went wrong the next time it is read. A failed check does not remove the destination or stop uploads from using it. The caller must be the person who administers the partner, or a Widgetic administrator.
3262
+ * Check that a partner\'s storage destination still works
3263
+ */
3264
+ verifyPartnerStorageDestinationRaw(requestParameters, initOverrides) {
3265
+ return __awaiter(this, void 0, void 0, function* () {
3266
+ if (requestParameters['partnerId'] == null) {
3267
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling verifyPartnerStorageDestination().');
3268
+ }
3269
+ const queryParameters = {};
3270
+ const headerParameters = {};
3271
+ if (this.configuration && this.configuration.accessToken) {
3272
+ const token = this.configuration.accessToken;
3273
+ const tokenString = yield token("apiKeyAuth", []);
3274
+ if (tokenString) {
3275
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3276
+ }
3277
+ }
3278
+ const response = yield this.request({
3279
+ path: `/partners/{partnerId}/storage/verify`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
3280
+ method: 'POST',
3281
+ headers: headerParameters,
3282
+ query: queryParameters,
3283
+ }, initOverrides);
3284
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStorageDestinationFromJSON(jsonValue));
3285
+ });
3286
+ }
3287
+ /**
3288
+ * Runs the same check as `setPartnerStorageDestination` against the destination already saved: a test file is written, read back from the public address and deleted. Use it after rotating a key or changing a bucket policy, or when uploads are failing with 502 or 503. The result is recorded either way. A pass refreshes `verifiedAt` and clears `lastVerificationError`; a failure answers 422 `STORAGE_DESTINATION_UNVERIFIED` and is recorded in `lastVerificationError` and `lastVerificationFailedAt`, so the destination shows what went wrong the next time it is read. A failed check does not remove the destination or stop uploads from using it. The caller must be the person who administers the partner, or a Widgetic administrator.
3289
+ * Check that a partner\'s storage destination still works
3290
+ */
3291
+ verifyPartnerStorageDestination(requestParameters, initOverrides) {
3292
+ return __awaiter(this, void 0, void 0, function* () {
3293
+ const response = yield this.verifyPartnerStorageDestinationRaw(requestParameters, initOverrides);
3294
+ return yield response.value();
3295
+ });
3296
+ }
3297
+ }
3298
+ /**
3299
+ * @export
3300
+ */
3301
+ export const ExportCompositionEntryItemsFormatEnum = {
3302
+ Csv: 'csv',
3303
+ Json: 'json'
3304
+ };
3305
+ /**
3306
+ * @export
3307
+ */
3308
+ export const ExportCompositionEntryItemsOrderEnum = {
3309
+ Asc: 'asc',
3310
+ Desc: 'desc'
3311
+ };
3312
+ /**
3313
+ * @export
3314
+ */
3315
+ export const GetAllCompositionsWorkspaceEnum = {
3316
+ True: 'true',
3317
+ False: 'false'
3318
+ };
3319
+ /**
3320
+ * @export
3321
+ */
3322
+ export const GetAllCompositionsStatusEnum = {
3323
+ Draft: 'draft',
3324
+ Published: 'published',
3325
+ Archived: 'archived'
3326
+ };
3327
+ /**
3328
+ * @export
3329
+ */
3330
+ export const GetInvoicesByPartnerIdStatusEnum = {
3331
+ Draft: 'draft',
3332
+ Open: 'open',
3333
+ Pending: 'pending',
3334
+ Paid: 'paid',
3335
+ Failed: 'failed',
3336
+ Void: 'void',
3337
+ Uncollectible: 'uncollectible',
3338
+ Refunded: 'refunded',
3339
+ Canceled: 'canceled'
3340
+ };
3341
+ /**
3342
+ * @export
3343
+ */
3344
+ export const ListCompositionEntryItemsOrderEnum = {
3345
+ Asc: 'asc',
3346
+ Desc: 'desc'
3347
+ };
3348
+ /**
3349
+ * @export
3350
+ */
3351
+ export const ListManagedUserEntriesOrderEnum = {
3352
+ Asc: 'asc',
3353
+ Desc: 'desc'
3354
+ };
3355
+ /**
3356
+ * @export
3357
+ */
3358
+ export const UploadsPostContextTypeEnum = {
3359
+ WidgetCodegen: 'widget-codegen',
3360
+ BrowserIc: 'browser-ic',
3361
+ ContentProperty: 'content-property'
3362
+ };
3363
+ /**
3364
+ * @export
3365
+ */
3366
+ export const UploadsPostSourceEnum = {
3367
+ ChatUpload: 'chat-upload',
3368
+ ChatScreenshot: 'chat-screenshot',
3369
+ BrowserIcScreenshot: 'browser-ic-screenshot',
3370
+ PreviewScreenshot: 'preview-screenshot',
3371
+ FileBrowserUpload: 'file-browser-upload'
3372
+ };