@widgetic/api-sdk 1.0.31 → 1.0.33

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 (308) hide show
  1. package/README.md +4 -0
  2. package/dist/apis/AdminApi.d.ts +30 -46
  3. package/dist/apis/AdminApi.js +53 -102
  4. package/dist/apis/AdminBillingApi.d.ts +2 -2
  5. package/dist/apis/AdminBillingApi.js +2 -2
  6. package/dist/apis/BillingApi.d.ts +44 -1
  7. package/dist/apis/BillingApi.js +127 -0
  8. package/dist/apis/CompositionsApi.d.ts +19 -15
  9. package/dist/apis/CompositionsApi.js +21 -14
  10. package/dist/apis/CreditsApi.d.ts +7 -7
  11. package/dist/apis/CreditsApi.js +5 -5
  12. package/dist/apis/OrganizationsApi.d.ts +35 -7
  13. package/dist/apis/OrganizationsApi.js +86 -6
  14. package/dist/apis/PartnerApi.d.ts +141 -36
  15. package/dist/apis/PartnerApi.js +333 -31
  16. package/dist/apis/PartnerCustomizationsApi.d.ts +4 -4
  17. package/dist/apis/PartnerCustomizationsApi.js +4 -4
  18. package/dist/apis/PartnersApi.d.ts +85 -67
  19. package/dist/apis/PartnersApi.js +198 -119
  20. package/dist/apis/PublicEmbedApi.d.ts +42 -3
  21. package/dist/apis/PublicEmbedApi.js +99 -2
  22. package/dist/apis/SubscriptionsApi.d.ts +2 -2
  23. package/dist/apis/SubscriptionsApi.js +2 -2
  24. package/dist/apis/UploadsApi.d.ts +4 -4
  25. package/dist/apis/UploadsApi.js +4 -4
  26. package/dist/apis/UsersApi.d.ts +4 -4
  27. package/dist/apis/UsersApi.js +4 -4
  28. package/dist/apis/index.d.ts +0 -4
  29. package/dist/apis/index.js +0 -4
  30. package/dist/esm/apis/AdminApi.d.ts +30 -46
  31. package/dist/esm/apis/AdminApi.js +54 -103
  32. package/dist/esm/apis/AdminBillingApi.d.ts +2 -2
  33. package/dist/esm/apis/AdminBillingApi.js +2 -2
  34. package/dist/esm/apis/BillingApi.d.ts +44 -1
  35. package/dist/esm/apis/BillingApi.js +128 -1
  36. package/dist/esm/apis/CompositionsApi.d.ts +19 -15
  37. package/dist/esm/apis/CompositionsApi.js +22 -15
  38. package/dist/esm/apis/CreditsApi.d.ts +7 -7
  39. package/dist/esm/apis/CreditsApi.js +6 -6
  40. package/dist/esm/apis/OrganizationsApi.d.ts +35 -7
  41. package/dist/esm/apis/OrganizationsApi.js +87 -7
  42. package/dist/esm/apis/PartnerApi.d.ts +141 -36
  43. package/dist/esm/apis/PartnerApi.js +334 -32
  44. package/dist/esm/apis/PartnerCustomizationsApi.d.ts +4 -4
  45. package/dist/esm/apis/PartnerCustomizationsApi.js +4 -4
  46. package/dist/esm/apis/PartnersApi.d.ts +85 -67
  47. package/dist/esm/apis/PartnersApi.js +198 -119
  48. package/dist/esm/apis/PublicEmbedApi.d.ts +42 -3
  49. package/dist/esm/apis/PublicEmbedApi.js +100 -3
  50. package/dist/esm/apis/SubscriptionsApi.d.ts +2 -2
  51. package/dist/esm/apis/SubscriptionsApi.js +2 -2
  52. package/dist/esm/apis/UploadsApi.d.ts +4 -4
  53. package/dist/esm/apis/UploadsApi.js +4 -4
  54. package/dist/esm/apis/UsersApi.d.ts +4 -4
  55. package/dist/esm/apis/UsersApi.js +4 -4
  56. package/dist/esm/apis/index.d.ts +0 -4
  57. package/dist/esm/apis/index.js +0 -4
  58. package/dist/esm/models/BillingUsersUserIdStorageCancelPackPostRequest.d.ts +40 -0
  59. package/dist/esm/models/BillingUsersUserIdStorageCancelPackPostRequest.js +43 -0
  60. package/dist/esm/models/BillingUsersUserIdStorageGet200Response.d.ts +39 -0
  61. package/dist/esm/models/BillingUsersUserIdStorageGet200Response.js +44 -0
  62. package/dist/esm/models/BillingUsersUserIdStorageGet200ResponseData.d.ts +33 -0
  63. package/dist/esm/models/BillingUsersUserIdStorageGet200ResponseData.js +42 -0
  64. package/dist/esm/models/Composition.d.ts +12 -0
  65. package/dist/esm/models/Composition.js +2 -0
  66. package/dist/esm/models/CompositionDataSource.d.ts +41 -0
  67. package/dist/esm/models/CompositionDataSource.js +47 -0
  68. package/dist/esm/models/CompositionEntriesReading.d.ts +20 -4
  69. package/dist/esm/models/CompositionEntriesReading.js +3 -0
  70. package/dist/esm/models/CompositionEntryAggregateTally.d.ts +15 -8
  71. package/dist/esm/models/CompositionEntryAggregatesBlock.d.ts +10 -0
  72. package/dist/esm/models/CompositionEntryItem.d.ts +4 -1
  73. package/dist/esm/models/CompositionEntryItemsMeta.d.ts +8 -0
  74. package/dist/esm/models/ConvertSoloToTeams200Response.d.ts +39 -0
  75. package/dist/esm/models/ConvertSoloToTeams200Response.js +44 -0
  76. package/dist/esm/models/CreatePartnerRequest.d.ts +7 -0
  77. package/dist/esm/models/CreatePartnerRequest.js +2 -0
  78. package/dist/esm/models/DeleteCompositionDataSource200Response.d.ts +32 -0
  79. package/dist/esm/models/DeleteCompositionDataSource200Response.js +43 -0
  80. package/dist/esm/models/GetCompositionContentSchema200Response.d.ts +2 -2
  81. package/dist/esm/models/GetOrganizationPricing200ResponseDataStorage.d.ts +3 -2
  82. package/dist/esm/models/GetOrganizationStorageUsage200ResponseDataStorageUsage.d.ts +5 -5
  83. package/dist/esm/models/GetPartnerCreditTransactions200Response.d.ts +39 -0
  84. package/dist/esm/models/GetPartnerCreditTransactions200Response.js +44 -0
  85. package/dist/esm/models/GetPublicCompositionEmbed200Response.d.ts +106 -0
  86. package/dist/esm/models/GetPublicCompositionEmbed200Response.js +67 -0
  87. package/dist/esm/models/GetPublicCompositionEmbed200ResponseDataSource.d.ts +38 -0
  88. package/dist/esm/models/GetPublicCompositionEmbed200ResponseDataSource.js +43 -0
  89. package/dist/esm/models/GetPublicCompositionEmbed200ResponseDirect.d.ts +44 -0
  90. package/dist/esm/models/GetPublicCompositionEmbed200ResponseDirect.js +45 -0
  91. package/dist/esm/models/GetPublicCompositionEmbed403Response.d.ts +51 -0
  92. package/dist/esm/models/GetPublicCompositionEmbed403Response.js +48 -0
  93. package/dist/esm/models/GetPublicCompositionEmbed403ResponseDetails.d.ts +46 -0
  94. package/dist/esm/models/GetPublicCompositionEmbed403ResponseDetails.js +50 -0
  95. package/dist/esm/models/GetPublicCompositionEmbed404Response.d.ts +47 -0
  96. package/dist/esm/models/GetPublicCompositionEmbed404Response.js +51 -0
  97. package/dist/esm/models/GetPublicCompositionEmbed429Response.d.ts +38 -0
  98. package/dist/esm/models/GetPublicCompositionEmbed429Response.js +43 -0
  99. package/dist/esm/models/IssuePartnerInvoiceRequest.d.ts +14 -1
  100. package/dist/esm/models/IssuePartnerInvoiceRequest.js +2 -0
  101. package/dist/esm/models/IssuedPartnerInvoice.d.ts +6 -0
  102. package/dist/esm/models/IssuedPartnerInvoice.js +4 -0
  103. package/dist/esm/models/ManagedUserEntryItem.d.ts +4 -1
  104. package/dist/esm/models/MyPartner.d.ts +7 -0
  105. package/dist/esm/models/MyPartner.js +4 -0
  106. package/dist/esm/models/MyPartners.d.ts +9 -1
  107. package/dist/esm/models/MyPartners.js +6 -1
  108. package/dist/esm/models/OrganizationsOrgIdBillingGet200ResponseData.d.ts +25 -5
  109. package/dist/esm/models/OrganizationsOrgIdBillingGet200ResponseData.js +9 -0
  110. package/dist/esm/models/Partner.d.ts +7 -0
  111. package/dist/esm/models/Partner.js +2 -0
  112. package/dist/esm/models/PartnerActivation.d.ts +1 -1
  113. package/dist/esm/models/PartnerBillingOverviewOperationalCredits.d.ts +0 -14
  114. package/dist/esm/models/PartnerBillingOverviewOperationalCredits.js +0 -4
  115. package/dist/esm/models/PartnerBillingProfile.d.ts +1 -1
  116. package/dist/esm/models/PartnerContract.d.ts +15 -3
  117. package/dist/esm/models/PartnerContract.js +6 -2
  118. package/dist/esm/models/PartnerCustomization.d.ts +15 -3
  119. package/dist/esm/models/PartnerCustomization.js +6 -2
  120. package/dist/esm/models/PartnerDetails.d.ts +7 -0
  121. package/dist/esm/models/PartnerDetails.js +2 -0
  122. package/dist/esm/models/PartnerEntryContextSecret.d.ts +39 -0
  123. package/dist/esm/models/PartnerEntryContextSecret.js +48 -0
  124. package/dist/esm/models/PartnerEntryContextSigning.d.ts +62 -0
  125. package/dist/esm/models/PartnerEntryContextSigning.js +63 -0
  126. package/dist/esm/models/PartnerExtraCreditsInvoice.d.ts +98 -0
  127. package/dist/esm/models/PartnerExtraCreditsInvoice.js +87 -0
  128. package/dist/esm/models/PartnerInvoiceSchedule.d.ts +66 -0
  129. package/dist/esm/models/PartnerInvoiceSchedule.js +67 -0
  130. package/dist/esm/models/PartnerInvoiceScheduleContract.d.ts +68 -0
  131. package/dist/esm/models/PartnerInvoiceScheduleContract.js +67 -0
  132. package/dist/esm/models/PartnerInvoiceScheduleNext.d.ts +94 -0
  133. package/dist/esm/models/PartnerInvoiceScheduleNext.js +91 -0
  134. package/dist/esm/models/PartnerInvoiceScheduleNextPeriod.d.ts +38 -0
  135. package/dist/esm/models/PartnerInvoiceScheduleNextPeriod.js +47 -0
  136. package/dist/esm/models/PartnerInvoiceScheduleOverdue.d.ts +38 -0
  137. package/dist/esm/models/PartnerInvoiceScheduleOverdue.js +47 -0
  138. package/dist/esm/models/PartnerInvoiceSchedulePeriod.d.ts +101 -0
  139. package/dist/esm/models/PartnerInvoiceSchedulePeriod.js +91 -0
  140. package/dist/esm/models/PartnerNotification.d.ts +1 -1
  141. package/dist/esm/models/PartnerNotificationEventType.d.ts +2 -0
  142. package/dist/esm/models/PartnerNotificationEventType.js +2 -0
  143. package/dist/esm/models/PartnerNotificationTestEventRequest.d.ts +33 -0
  144. package/dist/esm/models/PartnerNotificationTestEventRequest.js +44 -0
  145. package/dist/esm/models/PartnerNotificationTestEventResult.d.ts +50 -0
  146. package/dist/esm/models/PartnerNotificationTestEventResult.js +53 -0
  147. package/dist/esm/models/PartnerUpdateResult.d.ts +8 -16
  148. package/dist/esm/models/PartnerUpdateResult.js +2 -5
  149. package/dist/esm/models/PartnerWithWarnings.d.ts +7 -0
  150. package/dist/esm/models/PartnerWithWarnings.js +2 -0
  151. package/dist/esm/models/PersonalExtraStorage.d.ts +92 -0
  152. package/dist/esm/models/PersonalExtraStorage.js +83 -0
  153. package/dist/esm/models/PersonalExtraStorageBlock.d.ts +56 -0
  154. package/dist/esm/models/PersonalExtraStorageBlock.js +57 -0
  155. package/dist/esm/models/PersonalStorage.d.ts +80 -0
  156. package/dist/esm/models/PersonalStorage.js +73 -0
  157. package/dist/esm/models/PersonalStoragePack.d.ts +100 -0
  158. package/dist/esm/models/PersonalStoragePack.js +84 -0
  159. package/dist/esm/models/PostPublicCompositionEmbedStatus200Response.d.ts +39 -0
  160. package/dist/esm/models/PostPublicCompositionEmbedStatus200Response.js +44 -0
  161. package/dist/esm/models/PostPublicCompositionEmbedStatus200ResponseData.d.ts +45 -0
  162. package/dist/esm/models/PostPublicCompositionEmbedStatus200ResponseData.js +51 -0
  163. package/dist/esm/models/PostPublicCompositionEmbedStatus429Response.d.ts +32 -0
  164. package/dist/esm/models/PostPublicCompositionEmbedStatus429Response.js +41 -0
  165. package/dist/esm/models/PostPublicCompositionEmbedStatusRequest.d.ts +32 -0
  166. package/dist/esm/models/PostPublicCompositionEmbedStatusRequest.js +43 -0
  167. package/dist/esm/models/PublicCompositionEntryRequest.d.ts +1 -1
  168. package/dist/esm/models/RequestExtraCredits.d.ts +33 -0
  169. package/dist/esm/models/RequestExtraCredits.js +43 -0
  170. package/dist/esm/models/StorageChange.d.ts +4 -3
  171. package/dist/esm/models/SurfaceConversionResult.d.ts +85 -0
  172. package/dist/esm/models/SurfaceConversionResult.js +76 -0
  173. package/dist/esm/models/SurfaceConversionResultSubscription.d.ts +82 -0
  174. package/dist/esm/models/SurfaceConversionResultSubscription.js +62 -0
  175. package/dist/esm/models/UpdatePartnerCustomizationRequest.d.ts +3 -3
  176. package/dist/esm/models/UpdatePartnerCustomizationRequest.js +2 -2
  177. package/dist/esm/models/UpdatePartnerEntryContextSigningRequest.d.ts +32 -0
  178. package/dist/esm/models/UpdatePartnerEntryContextSigningRequest.js +43 -0
  179. package/dist/esm/models/UpdatePartnerRequest.d.ts +7 -24
  180. package/dist/esm/models/UpdatePartnerRequest.js +2 -8
  181. package/dist/esm/models/index.d.ts +37 -86
  182. package/dist/esm/models/index.js +37 -86
  183. package/dist/models/BillingUsersUserIdStorageCancelPackPostRequest.d.ts +40 -0
  184. package/dist/models/BillingUsersUserIdStorageCancelPackPostRequest.js +50 -0
  185. package/dist/models/BillingUsersUserIdStorageGet200Response.d.ts +39 -0
  186. package/dist/models/BillingUsersUserIdStorageGet200Response.js +51 -0
  187. package/dist/models/BillingUsersUserIdStorageGet200ResponseData.d.ts +33 -0
  188. package/dist/models/BillingUsersUserIdStorageGet200ResponseData.js +49 -0
  189. package/dist/models/Composition.d.ts +12 -0
  190. package/dist/models/Composition.js +2 -0
  191. package/dist/models/CompositionDataSource.d.ts +41 -0
  192. package/dist/models/CompositionDataSource.js +54 -0
  193. package/dist/models/CompositionEntriesReading.d.ts +20 -4
  194. package/dist/models/CompositionEntriesReading.js +3 -0
  195. package/dist/models/CompositionEntryAggregateTally.d.ts +15 -8
  196. package/dist/models/CompositionEntryAggregatesBlock.d.ts +10 -0
  197. package/dist/models/CompositionEntryItem.d.ts +4 -1
  198. package/dist/models/CompositionEntryItemsMeta.d.ts +8 -0
  199. package/dist/models/ConvertSoloToTeams200Response.d.ts +39 -0
  200. package/dist/models/ConvertSoloToTeams200Response.js +51 -0
  201. package/dist/models/CreatePartnerRequest.d.ts +7 -0
  202. package/dist/models/CreatePartnerRequest.js +2 -0
  203. package/dist/models/DeleteCompositionDataSource200Response.d.ts +32 -0
  204. package/dist/models/DeleteCompositionDataSource200Response.js +50 -0
  205. package/dist/models/GetCompositionContentSchema200Response.d.ts +2 -2
  206. package/dist/models/GetOrganizationPricing200ResponseDataStorage.d.ts +3 -2
  207. package/dist/models/GetOrganizationStorageUsage200ResponseDataStorageUsage.d.ts +5 -5
  208. package/dist/models/GetPartnerCreditTransactions200Response.d.ts +39 -0
  209. package/dist/models/GetPartnerCreditTransactions200Response.js +51 -0
  210. package/dist/models/GetPublicCompositionEmbed200Response.d.ts +106 -0
  211. package/dist/models/GetPublicCompositionEmbed200Response.js +74 -0
  212. package/dist/models/GetPublicCompositionEmbed200ResponseDataSource.d.ts +38 -0
  213. package/dist/models/GetPublicCompositionEmbed200ResponseDataSource.js +50 -0
  214. package/dist/models/GetPublicCompositionEmbed200ResponseDirect.d.ts +44 -0
  215. package/dist/models/GetPublicCompositionEmbed200ResponseDirect.js +52 -0
  216. package/dist/models/GetPublicCompositionEmbed403Response.d.ts +51 -0
  217. package/dist/models/GetPublicCompositionEmbed403Response.js +55 -0
  218. package/dist/models/GetPublicCompositionEmbed403ResponseDetails.d.ts +46 -0
  219. package/dist/models/GetPublicCompositionEmbed403ResponseDetails.js +58 -0
  220. package/dist/models/GetPublicCompositionEmbed404Response.d.ts +47 -0
  221. package/dist/models/GetPublicCompositionEmbed404Response.js +59 -0
  222. package/dist/models/GetPublicCompositionEmbed429Response.d.ts +38 -0
  223. package/dist/models/GetPublicCompositionEmbed429Response.js +50 -0
  224. package/dist/models/IssuePartnerInvoiceRequest.d.ts +14 -1
  225. package/dist/models/IssuePartnerInvoiceRequest.js +2 -0
  226. package/dist/models/IssuedPartnerInvoice.d.ts +6 -0
  227. package/dist/models/IssuedPartnerInvoice.js +4 -0
  228. package/dist/models/ManagedUserEntryItem.d.ts +4 -1
  229. package/dist/models/MyPartner.d.ts +7 -0
  230. package/dist/models/MyPartner.js +4 -0
  231. package/dist/models/MyPartners.d.ts +9 -1
  232. package/dist/models/MyPartners.js +6 -1
  233. package/dist/models/OrganizationsOrgIdBillingGet200ResponseData.d.ts +25 -5
  234. package/dist/models/OrganizationsOrgIdBillingGet200ResponseData.js +10 -0
  235. package/dist/models/Partner.d.ts +7 -0
  236. package/dist/models/Partner.js +2 -0
  237. package/dist/models/PartnerActivation.d.ts +1 -1
  238. package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +0 -14
  239. package/dist/models/PartnerBillingOverviewOperationalCredits.js +0 -4
  240. package/dist/models/PartnerBillingProfile.d.ts +1 -1
  241. package/dist/models/PartnerContract.d.ts +15 -3
  242. package/dist/models/PartnerContract.js +6 -2
  243. package/dist/models/PartnerCustomization.d.ts +15 -3
  244. package/dist/models/PartnerCustomization.js +6 -2
  245. package/dist/models/PartnerDetails.d.ts +7 -0
  246. package/dist/models/PartnerDetails.js +2 -0
  247. package/dist/models/PartnerEntryContextSecret.d.ts +39 -0
  248. package/dist/models/PartnerEntryContextSecret.js +55 -0
  249. package/dist/models/PartnerEntryContextSigning.d.ts +62 -0
  250. package/dist/models/PartnerEntryContextSigning.js +70 -0
  251. package/dist/models/PartnerExtraCreditsInvoice.d.ts +98 -0
  252. package/dist/models/PartnerExtraCreditsInvoice.js +94 -0
  253. package/dist/models/PartnerInvoiceSchedule.d.ts +66 -0
  254. package/dist/models/PartnerInvoiceSchedule.js +74 -0
  255. package/dist/models/PartnerInvoiceScheduleContract.d.ts +68 -0
  256. package/dist/models/PartnerInvoiceScheduleContract.js +74 -0
  257. package/dist/models/PartnerInvoiceScheduleNext.d.ts +94 -0
  258. package/dist/models/PartnerInvoiceScheduleNext.js +99 -0
  259. package/dist/models/PartnerInvoiceScheduleNextPeriod.d.ts +38 -0
  260. package/dist/models/PartnerInvoiceScheduleNextPeriod.js +54 -0
  261. package/dist/models/PartnerInvoiceScheduleOverdue.d.ts +38 -0
  262. package/dist/models/PartnerInvoiceScheduleOverdue.js +54 -0
  263. package/dist/models/PartnerInvoiceSchedulePeriod.d.ts +101 -0
  264. package/dist/models/PartnerInvoiceSchedulePeriod.js +99 -0
  265. package/dist/models/PartnerNotification.d.ts +1 -1
  266. package/dist/models/PartnerNotificationEventType.d.ts +2 -0
  267. package/dist/models/PartnerNotificationEventType.js +2 -0
  268. package/dist/models/PartnerNotificationTestEventRequest.d.ts +33 -0
  269. package/dist/models/PartnerNotificationTestEventRequest.js +51 -0
  270. package/dist/models/PartnerNotificationTestEventResult.d.ts +50 -0
  271. package/dist/models/PartnerNotificationTestEventResult.js +60 -0
  272. package/dist/models/PartnerUpdateResult.d.ts +8 -16
  273. package/dist/models/PartnerUpdateResult.js +2 -5
  274. package/dist/models/PartnerWithWarnings.d.ts +7 -0
  275. package/dist/models/PartnerWithWarnings.js +2 -0
  276. package/dist/models/PersonalExtraStorage.d.ts +92 -0
  277. package/dist/models/PersonalExtraStorage.js +91 -0
  278. package/dist/models/PersonalExtraStorageBlock.d.ts +56 -0
  279. package/dist/models/PersonalExtraStorageBlock.js +65 -0
  280. package/dist/models/PersonalStorage.d.ts +80 -0
  281. package/dist/models/PersonalStorage.js +80 -0
  282. package/dist/models/PersonalStoragePack.d.ts +100 -0
  283. package/dist/models/PersonalStoragePack.js +92 -0
  284. package/dist/models/PostPublicCompositionEmbedStatus200Response.d.ts +39 -0
  285. package/dist/models/PostPublicCompositionEmbedStatus200Response.js +51 -0
  286. package/dist/models/PostPublicCompositionEmbedStatus200ResponseData.d.ts +45 -0
  287. package/dist/models/PostPublicCompositionEmbedStatus200ResponseData.js +59 -0
  288. package/dist/models/PostPublicCompositionEmbedStatus429Response.d.ts +32 -0
  289. package/dist/models/PostPublicCompositionEmbedStatus429Response.js +48 -0
  290. package/dist/models/PostPublicCompositionEmbedStatusRequest.d.ts +32 -0
  291. package/dist/models/PostPublicCompositionEmbedStatusRequest.js +50 -0
  292. package/dist/models/PublicCompositionEntryRequest.d.ts +1 -1
  293. package/dist/models/RequestExtraCredits.d.ts +33 -0
  294. package/dist/models/RequestExtraCredits.js +50 -0
  295. package/dist/models/StorageChange.d.ts +4 -3
  296. package/dist/models/SurfaceConversionResult.d.ts +85 -0
  297. package/dist/models/SurfaceConversionResult.js +84 -0
  298. package/dist/models/SurfaceConversionResultSubscription.d.ts +82 -0
  299. package/dist/models/SurfaceConversionResultSubscription.js +70 -0
  300. package/dist/models/UpdatePartnerCustomizationRequest.d.ts +3 -3
  301. package/dist/models/UpdatePartnerCustomizationRequest.js +2 -2
  302. package/dist/models/UpdatePartnerEntryContextSigningRequest.d.ts +32 -0
  303. package/dist/models/UpdatePartnerEntryContextSigningRequest.js +50 -0
  304. package/dist/models/UpdatePartnerRequest.d.ts +7 -24
  305. package/dist/models/UpdatePartnerRequest.js +2 -8
  306. package/dist/models/index.d.ts +37 -86
  307. package/dist/models/index.js +37 -86
  308. package/package.json +3 -2
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { BillingPricingGet200ResponseFromJSON, BillingUsersUserIdInvoicesGet200ResponseFromJSON, BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200ResponseFromJSON, BillingUsersUserIdPortalPostRequestToJSON, BillingUsersUserIdSubscriptionCancelPost200ResponseFromJSON, BillingUsersUserIdSubscriptionCancelPostRequestToJSON, BillingUsersUserIdSubscriptionGet200ResponseFromJSON, BillingUsersUserIdSubscriptionPayPost200ResponseFromJSON, BillingUsersUserIdSubscriptionPost200ResponseFromJSON, BillingUsersUserIdSubscriptionPostRequestToJSON, OrganizationsOrgIdBillingPaymentMethodsGet200ResponseFromJSON, OrganizationsOrgIdBillingPaymentMethodsPost200ResponseFromJSON, OrganizationsOrgIdBillingPaymentMethodsPostRequestToJSON, OrganizationsOrgIdBillingPaymentMethodsSetupIntentPost200ResponseFromJSON, OrganizationsOrgIdBillingPortalPost200ResponseFromJSON, UploadsIdDelete200ResponseFromJSON, } from '../models/index.js';
24
+ import { BillingPricingGet200ResponseFromJSON, BillingUsersUserIdInvoicesGet200ResponseFromJSON, BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200ResponseFromJSON, BillingUsersUserIdPortalPostRequestToJSON, BillingUsersUserIdStorageCancelPackPostRequestToJSON, BillingUsersUserIdStorageGet200ResponseFromJSON, BillingUsersUserIdSubscriptionCancelPost200ResponseFromJSON, BillingUsersUserIdSubscriptionCancelPostRequestToJSON, BillingUsersUserIdSubscriptionGet200ResponseFromJSON, BillingUsersUserIdSubscriptionPayPost200ResponseFromJSON, BillingUsersUserIdSubscriptionPost200ResponseFromJSON, BillingUsersUserIdSubscriptionPostRequestToJSON, OrganizationsOrgIdBillingPaymentMethodsGet200ResponseFromJSON, OrganizationsOrgIdBillingPaymentMethodsPost200ResponseFromJSON, OrganizationsOrgIdBillingPaymentMethodsPostRequestToJSON, OrganizationsOrgIdBillingPaymentMethodsSetupIntentPost200ResponseFromJSON, OrganizationsOrgIdBillingPortalPost200ResponseFromJSON, PurchaseStoragePack200ResponseFromJSON, PurchaseStoragePackRequestToJSON, UploadsIdDelete200ResponseFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -321,6 +321,133 @@ export class BillingApi extends runtime.BaseAPI {
321
321
  return yield response.value();
322
322
  });
323
323
  }
324
+ /**
325
+ * Gives back extra storage: removes `pack_size_gb` GB from the person\'s storage add-on, or all of it with `remove_all`. The add-on stops billing for the GB removed; what was already paid for the rest of the current period is credited on the next invoice. Removing storage does not delete files. A person who holds more than their limit afterwards can read and delete what they have but cannot upload until they are back under the limit. Send either `pack_size_gb` or `remove_all: true`, not both. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result. Removing is allowed on an overdue subscription and on one that ends with the period, so a person is never stuck paying for storage they want to drop. Users can only change their own storage.
326
+ * Remove Extra Storage from Your Own Storage
327
+ */
328
+ billingUsersUserIdStorageCancelPackPostRaw(requestParameters, initOverrides) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ if (requestParameters['userId'] == null) {
331
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling billingUsersUserIdStorageCancelPackPost().');
332
+ }
333
+ if (requestParameters['billingUsersUserIdStorageCancelPackPostRequest'] == null) {
334
+ throw new runtime.RequiredError('billingUsersUserIdStorageCancelPackPostRequest', 'Required parameter "billingUsersUserIdStorageCancelPackPostRequest" was null or undefined when calling billingUsersUserIdStorageCancelPackPost().');
335
+ }
336
+ const queryParameters = {};
337
+ const headerParameters = {};
338
+ headerParameters['Content-Type'] = 'application/json';
339
+ if (requestParameters['idempotencyKey'] != null) {
340
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
341
+ }
342
+ if (this.configuration && this.configuration.accessToken) {
343
+ const token = this.configuration.accessToken;
344
+ const tokenString = yield token("bearerAuth", []);
345
+ if (tokenString) {
346
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
347
+ }
348
+ }
349
+ const response = yield this.request({
350
+ path: `/billing/users/{userId}/storage/cancel-pack`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
351
+ method: 'POST',
352
+ headers: headerParameters,
353
+ query: queryParameters,
354
+ body: BillingUsersUserIdStorageCancelPackPostRequestToJSON(requestParameters['billingUsersUserIdStorageCancelPackPostRequest']),
355
+ }, initOverrides);
356
+ return new runtime.JSONApiResponse(response, (jsonValue) => PurchaseStoragePack200ResponseFromJSON(jsonValue));
357
+ });
358
+ }
359
+ /**
360
+ * Gives back extra storage: removes `pack_size_gb` GB from the person\'s storage add-on, or all of it with `remove_all`. The add-on stops billing for the GB removed; what was already paid for the rest of the current period is credited on the next invoice. Removing storage does not delete files. A person who holds more than their limit afterwards can read and delete what they have but cannot upload until they are back under the limit. Send either `pack_size_gb` or `remove_all: true`, not both. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result. Removing is allowed on an overdue subscription and on one that ends with the period, so a person is never stuck paying for storage they want to drop. Users can only change their own storage.
361
+ * Remove Extra Storage from Your Own Storage
362
+ */
363
+ billingUsersUserIdStorageCancelPackPost(requestParameters, initOverrides) {
364
+ return __awaiter(this, void 0, void 0, function* () {
365
+ const response = yield this.billingUsersUserIdStorageCancelPackPostRaw(requestParameters, initOverrides);
366
+ return yield response.value();
367
+ });
368
+ }
369
+ /**
370
+ * Returns a person\'s own storage and the extra storage they can add to it on Solo, in one call: the limit the upload check holds their own workspace to (plan plus extra storage), what they have stored, the extra storage they hold (one row per storage item on the subscription) and what it costs per billing period, and whether storage can be added or removed right now (`extraStorage.canAdd` and `extraStorage.canRemove`) with the reason when it cannot (`extraStorage.addBlockedReason`; its codes are the ones the purchase request answers with). A partner account is never offered extra storage (`PARTNER_STORAGE_NOT_SOLD`): its files are kept in its own storage destination. This is the person\'s OWN workspace. The storage of a team they belong to is the team\'s pool, read with `GET /organizations/{orgId}/storage/usage`; extra storage bought here does not add to it. Users can only read their own storage; internal callers can read anyone\'s.
371
+ * Get Your Own Storage and Extra Storage
372
+ */
373
+ billingUsersUserIdStorageGetRaw(requestParameters, initOverrides) {
374
+ return __awaiter(this, void 0, void 0, function* () {
375
+ if (requestParameters['userId'] == null) {
376
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling billingUsersUserIdStorageGet().');
377
+ }
378
+ const queryParameters = {};
379
+ const headerParameters = {};
380
+ if (this.configuration && this.configuration.accessToken) {
381
+ const token = this.configuration.accessToken;
382
+ const tokenString = yield token("bearerAuth", []);
383
+ if (tokenString) {
384
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
385
+ }
386
+ }
387
+ const response = yield this.request({
388
+ path: `/billing/users/{userId}/storage`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
389
+ method: 'GET',
390
+ headers: headerParameters,
391
+ query: queryParameters,
392
+ }, initOverrides);
393
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillingUsersUserIdStorageGet200ResponseFromJSON(jsonValue));
394
+ });
395
+ }
396
+ /**
397
+ * Returns a person\'s own storage and the extra storage they can add to it on Solo, in one call: the limit the upload check holds their own workspace to (plan plus extra storage), what they have stored, the extra storage they hold (one row per storage item on the subscription) and what it costs per billing period, and whether storage can be added or removed right now (`extraStorage.canAdd` and `extraStorage.canRemove`) with the reason when it cannot (`extraStorage.addBlockedReason`; its codes are the ones the purchase request answers with). A partner account is never offered extra storage (`PARTNER_STORAGE_NOT_SOLD`): its files are kept in its own storage destination. This is the person\'s OWN workspace. The storage of a team they belong to is the team\'s pool, read with `GET /organizations/{orgId}/storage/usage`; extra storage bought here does not add to it. Users can only read their own storage; internal callers can read anyone\'s.
398
+ * Get Your Own Storage and Extra Storage
399
+ */
400
+ billingUsersUserIdStorageGet(requestParameters, initOverrides) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ const response = yield this.billingUsersUserIdStorageGetRaw(requestParameters, initOverrides);
403
+ return yield response.value();
404
+ });
405
+ }
406
+ /**
407
+ * Adds extra storage to the person\'s own Solo subscription. Extra storage is a RECURRING add-on, not a one-time purchase: it is one more item on the same subscription as the plan, billed every period (per GB per month on a monthly subscription, per GB per year on a yearly one) until it is removed or the subscription ends. The GB are charged now, prorated for the rest of the current period, to the subscription\'s payment method, and join the person\'s own storage as soon as the charge succeeds. If the charge fails (for example a declined card) nothing is added and the request is refused with 402 `PAYMENT_FAILED`. Storage is sold in packs (the pricing payload\'s `storage.defaultPackSizeGb`, 50 GB). Ask for as many packs as you need in one request by sending a multiple of the pack size: `pack_size_gb: 50` is one pack, `100` is two, `500` is ten. `pack_size_gb` is added to what the person already has, so buying again adds more. Remove storage with `POST /billing/users/{userId}/storage/cancel-pack`. The extra storage adds to the person\'s OWN workspace only. It is not shared with a team the person belongs to: a team\'s storage is the team\'s pool, and its admins buy storage for it. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result instead of adding the storage twice. A refused request gives the key back: after a declined card (402 `PAYMENT_FAILED`), fix the payment method and send the request again with the same key. It is charged as a new attempt and is not answered with the old decline. Only a Solo subscription that Stripe bills and that is active can have extra storage. During the free trial the request is refused with 409 `TRIAL_NOT_ENDED` (storage added then would be free until the trial ends); a person with no Solo subscription is refused with a plan restriction pointing at Solo, and the owner account of a Shopify store (whose plan Shopify bills) with 409 `BILLED_THROUGH_SHOPIFY`. Users can only change their own storage. Extra storage is not sold to an account that administers a partner (403 `PARTNER_STORAGE_NOT_SOLD`): the files of a partner account are kept in the partner\'s own storage destination and never use Widgetic storage, so there would be nothing for the storage to add to. Giving storage back stays open to such an account.
408
+ * Add Extra Storage to Your Own Storage
409
+ */
410
+ billingUsersUserIdStoragePurchasePackPostRaw(requestParameters, initOverrides) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ if (requestParameters['userId'] == null) {
413
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling billingUsersUserIdStoragePurchasePackPost().');
414
+ }
415
+ if (requestParameters['purchaseStoragePackRequest'] == null) {
416
+ throw new runtime.RequiredError('purchaseStoragePackRequest', 'Required parameter "purchaseStoragePackRequest" was null or undefined when calling billingUsersUserIdStoragePurchasePackPost().');
417
+ }
418
+ const queryParameters = {};
419
+ const headerParameters = {};
420
+ headerParameters['Content-Type'] = 'application/json';
421
+ if (requestParameters['idempotencyKey'] != null) {
422
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
423
+ }
424
+ if (this.configuration && this.configuration.accessToken) {
425
+ const token = this.configuration.accessToken;
426
+ const tokenString = yield token("bearerAuth", []);
427
+ if (tokenString) {
428
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
429
+ }
430
+ }
431
+ const response = yield this.request({
432
+ path: `/billing/users/{userId}/storage/purchase-pack`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
433
+ method: 'POST',
434
+ headers: headerParameters,
435
+ query: queryParameters,
436
+ body: PurchaseStoragePackRequestToJSON(requestParameters['purchaseStoragePackRequest']),
437
+ }, initOverrides);
438
+ return new runtime.JSONApiResponse(response, (jsonValue) => PurchaseStoragePack200ResponseFromJSON(jsonValue));
439
+ });
440
+ }
441
+ /**
442
+ * Adds extra storage to the person\'s own Solo subscription. Extra storage is a RECURRING add-on, not a one-time purchase: it is one more item on the same subscription as the plan, billed every period (per GB per month on a monthly subscription, per GB per year on a yearly one) until it is removed or the subscription ends. The GB are charged now, prorated for the rest of the current period, to the subscription\'s payment method, and join the person\'s own storage as soon as the charge succeeds. If the charge fails (for example a declined card) nothing is added and the request is refused with 402 `PAYMENT_FAILED`. Storage is sold in packs (the pricing payload\'s `storage.defaultPackSizeGb`, 50 GB). Ask for as many packs as you need in one request by sending a multiple of the pack size: `pack_size_gb: 50` is one pack, `100` is two, `500` is ten. `pack_size_gb` is added to what the person already has, so buying again adds more. Remove storage with `POST /billing/users/{userId}/storage/cancel-pack`. The extra storage adds to the person\'s OWN workspace only. It is not shared with a team the person belongs to: a team\'s storage is the team\'s pool, and its admins buy storage for it. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result instead of adding the storage twice. A refused request gives the key back: after a declined card (402 `PAYMENT_FAILED`), fix the payment method and send the request again with the same key. It is charged as a new attempt and is not answered with the old decline. Only a Solo subscription that Stripe bills and that is active can have extra storage. During the free trial the request is refused with 409 `TRIAL_NOT_ENDED` (storage added then would be free until the trial ends); a person with no Solo subscription is refused with a plan restriction pointing at Solo, and the owner account of a Shopify store (whose plan Shopify bills) with 409 `BILLED_THROUGH_SHOPIFY`. Users can only change their own storage. Extra storage is not sold to an account that administers a partner (403 `PARTNER_STORAGE_NOT_SOLD`): the files of a partner account are kept in the partner\'s own storage destination and never use Widgetic storage, so there would be nothing for the storage to add to. Giving storage back stays open to such an account.
443
+ * Add Extra Storage to Your Own Storage
444
+ */
445
+ billingUsersUserIdStoragePurchasePackPost(requestParameters, initOverrides) {
446
+ return __awaiter(this, void 0, void 0, function* () {
447
+ const response = yield this.billingUsersUserIdStoragePurchasePackPostRaw(requestParameters, initOverrides);
448
+ return yield response.value();
449
+ });
450
+ }
324
451
  /**
325
452
  * Cancel the active subscription
326
453
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CheckCompositionAccess200Response, Composition, CompositionEntriesDescription, CompositionEntriesReading, CreateCompositionContentItemRequest, CreateCompositionFromWidget201Response, DeleteCompositionContentItem200Response, DuplicateComposition202Response, DuplicateCompositionRequest, GetAllCompositions200Response, GetCompositionContentSchema200Response, GetCompositionDesignSchema200Response, GetCompositionEmbedSchema200Response, GetCompositionPreview200Response, GetCompositionVersions200Response, GetCompositionsBatch200Response, GetCompositionsBatchRequest, NewComposition, SetCompositionDataSourceRequest, SetDynamicContent200Response, SetDynamicContentRequest, UpdateComposition, UpdateCompositionStatusRequest, ValidateCompositionContent200Response } from '../models/index';
13
+ import type { CheckCompositionAccess200Response, Composition, CompositionDataSource, CompositionEntriesDescription, CompositionEntriesReading, CreateCompositionContentItemRequest, CreateCompositionFromWidget201Response, DeleteCompositionContentItem200Response, DeleteCompositionDataSource200Response, DuplicateComposition202Response, DuplicateCompositionRequest, GetAllCompositions200Response, GetCompositionContentSchema200Response, GetCompositionDesignSchema200Response, GetCompositionEmbedSchema200Response, GetCompositionPreview200Response, GetCompositionVersions200Response, GetCompositionsBatch200Response, GetCompositionsBatchRequest, NewComposition, SetCompositionDataSourceRequest, SetDynamicContent200Response, SetDynamicContentRequest, UpdateComposition, UpdateCompositionStatusRequest, ValidateCompositionContent200Response } from '../models/index';
14
14
  export interface CheckCompositionAccessRequest {
15
15
  id: string;
16
16
  }
@@ -224,13 +224,15 @@ export declare class CompositionsApi extends runtime.BaseAPI {
224
224
  */
225
225
  deleteCompositionContentItem(requestParameters: DeleteCompositionContentItem0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteCompositionContentItem200Response>;
226
226
  /**
227
+ * Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
227
228
  * Remove the composition data source binding
228
229
  */
229
- deleteCompositionDataSourceRaw(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
230
+ deleteCompositionDataSourceRaw(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteCompositionDataSource200Response>>;
230
231
  /**
232
+ * Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
231
233
  * Remove the composition data source binding
232
234
  */
233
- deleteCompositionDataSource(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
235
+ deleteCompositionDataSource(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteCompositionDataSource200Response>;
234
236
  /**
235
237
  * Deletes a specific record from a table in the composition\'s database.
236
238
  * Delete Record From Composition Database
@@ -282,12 +284,12 @@ export declare class CompositionsApi extends runtime.BaseAPI {
282
284
  */
283
285
  getAllCompositions(requestParameters?: GetAllCompositions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllCompositions200Response>;
284
286
  /**
285
- * Retrieves a specific composition by its ID.
287
+ * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
286
288
  * Get Composition
287
289
  */
288
290
  getCompositionByIdRaw(requestParameters: GetCompositionById0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateCompositionFromWidget201Response>>;
289
291
  /**
290
- * Retrieves a specific composition by its ID.
292
+ * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
291
293
  * Get Composition
292
294
  */
293
295
  getCompositionById(requestParameters: GetCompositionById0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateCompositionFromWidget201Response>;
@@ -312,13 +314,15 @@ export declare class CompositionsApi extends runtime.BaseAPI {
312
314
  */
313
315
  getCompositionContent(requestParameters: GetCompositionContent0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
314
316
  /**
317
+ * The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
315
318
  * Read the composition data source binding
316
319
  */
317
- getCompositionDataSourceRaw(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
320
+ getCompositionDataSourceRaw(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionDataSource>>;
318
321
  /**
322
+ * The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
319
323
  * Read the composition data source binding
320
324
  */
321
- getCompositionDataSource(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
325
+ getCompositionDataSource(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionDataSource>;
322
326
  /**
323
327
  * Retrieves a specific record from a table in the composition\'s database.
324
328
  * Get Record From Composition Database
@@ -400,12 +404,12 @@ export declare class CompositionsApi extends runtime.BaseAPI {
400
404
  */
401
405
  getCompositionVersions(requestParameters: GetCompositionVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCompositionVersions200Response>;
402
406
  /**
403
- * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
407
+ * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
404
408
  * Get Compositions Batch
405
409
  */
406
410
  getCompositionsBatchRaw(requestParameters: GetCompositionsBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCompositionsBatch200Response>>;
407
411
  /**
408
- * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
412
+ * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
409
413
  * Get Compositions Batch
410
414
  */
411
415
  getCompositionsBatch(requestParameters: GetCompositionsBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCompositionsBatch200Response>;
@@ -418,25 +422,25 @@ export declare class CompositionsApi extends runtime.BaseAPI {
418
422
  */
419
423
  patchCompositionContentItem(requestParameters: PatchCompositionContentItem0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
420
424
  /**
421
- * 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.
425
+ * Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
422
426
  * Read the Entries of a Composition\'s Table
423
427
  */
424
428
  readCompositionEntriesRaw(requestParameters: ReadCompositionEntries0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionEntriesReading>>;
425
429
  /**
426
- * 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.
430
+ * Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
427
431
  * Read the Entries of a Composition\'s Table
428
432
  */
429
433
  readCompositionEntries(requestParameters: ReadCompositionEntries0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionEntriesReading>;
430
434
  /**
431
- * 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).
435
+ * 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). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
432
436
  * Bind a public JSON data source for embed refresh
433
437
  */
434
- setCompositionDataSourceRaw(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
438
+ setCompositionDataSourceRaw(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionDataSource>>;
435
439
  /**
436
- * 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).
440
+ * 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). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
437
441
  * Bind a public JSON data source for embed refresh
438
442
  */
439
- setCompositionDataSource(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
443
+ setCompositionDataSource(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionDataSource>;
440
444
  /**
441
445
  * 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`.
442
446
  * Set Dynamic Content
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { CheckCompositionAccess200ResponseFromJSON, CompositionFromJSON, CompositionEntriesDescriptionFromJSON, CompositionEntriesReadingFromJSON, CreateCompositionContentItemRequestToJSON, CreateCompositionFromWidget201ResponseFromJSON, DeleteCompositionContentItem200ResponseFromJSON, DuplicateComposition202ResponseFromJSON, DuplicateCompositionRequestToJSON, GetAllCompositions200ResponseFromJSON, GetCompositionContentSchema200ResponseFromJSON, GetCompositionDesignSchema200ResponseFromJSON, GetCompositionEmbedSchema200ResponseFromJSON, GetCompositionPreview200ResponseFromJSON, GetCompositionVersions200ResponseFromJSON, GetCompositionsBatch200ResponseFromJSON, GetCompositionsBatchRequestToJSON, NewCompositionToJSON, SetCompositionDataSourceRequestToJSON, SetDynamicContent200ResponseFromJSON, SetDynamicContentRequestToJSON, UpdateCompositionToJSON, UpdateCompositionStatusRequestToJSON, ValidateCompositionContent200ResponseFromJSON, } from '../models/index.js';
24
+ import { CheckCompositionAccess200ResponseFromJSON, CompositionFromJSON, CompositionDataSourceFromJSON, CompositionEntriesDescriptionFromJSON, CompositionEntriesReadingFromJSON, CreateCompositionContentItemRequestToJSON, CreateCompositionFromWidget201ResponseFromJSON, DeleteCompositionContentItem200ResponseFromJSON, DeleteCompositionDataSource200ResponseFromJSON, DuplicateComposition202ResponseFromJSON, DuplicateCompositionRequestToJSON, GetAllCompositions200ResponseFromJSON, GetCompositionContentSchema200ResponseFromJSON, GetCompositionDesignSchema200ResponseFromJSON, GetCompositionEmbedSchema200ResponseFromJSON, GetCompositionPreview200ResponseFromJSON, GetCompositionVersions200ResponseFromJSON, GetCompositionsBatch200ResponseFromJSON, GetCompositionsBatchRequestToJSON, NewCompositionToJSON, SetCompositionDataSourceRequestToJSON, SetDynamicContent200ResponseFromJSON, SetDynamicContentRequestToJSON, UpdateCompositionToJSON, UpdateCompositionStatusRequestToJSON, ValidateCompositionContent200ResponseFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -250,6 +250,7 @@ export class CompositionsApi extends runtime.BaseAPI {
250
250
  });
251
251
  }
252
252
  /**
253
+ * Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
253
254
  * Remove the composition data source binding
254
255
  */
255
256
  deleteCompositionDataSourceRaw(requestParameters, initOverrides) {
@@ -275,15 +276,17 @@ export class CompositionsApi extends runtime.BaseAPI {
275
276
  headers: headerParameters,
276
277
  query: queryParameters,
277
278
  }, initOverrides);
278
- return new runtime.VoidApiResponse(response);
279
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteCompositionDataSource200ResponseFromJSON(jsonValue));
279
280
  });
280
281
  }
281
282
  /**
283
+ * Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
282
284
  * Remove the composition data source binding
283
285
  */
284
286
  deleteCompositionDataSource(requestParameters, initOverrides) {
285
287
  return __awaiter(this, void 0, void 0, function* () {
286
- yield this.deleteCompositionDataSourceRaw(requestParameters, initOverrides);
288
+ const response = yield this.deleteCompositionDataSourceRaw(requestParameters, initOverrides);
289
+ return yield response.value();
287
290
  });
288
291
  }
289
292
  /**
@@ -508,7 +511,7 @@ export class CompositionsApi extends runtime.BaseAPI {
508
511
  });
509
512
  }
510
513
  /**
511
- * Retrieves a specific composition by its ID.
514
+ * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
512
515
  * Get Composition
513
516
  */
514
517
  getCompositionByIdRaw(requestParameters, initOverrides) {
@@ -535,7 +538,7 @@ export class CompositionsApi extends runtime.BaseAPI {
535
538
  });
536
539
  }
537
540
  /**
538
- * Retrieves a specific composition by its ID.
541
+ * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
539
542
  * Get Composition
540
543
  */
541
544
  getCompositionById(requestParameters, initOverrides) {
@@ -619,6 +622,7 @@ export class CompositionsApi extends runtime.BaseAPI {
619
622
  });
620
623
  }
621
624
  /**
625
+ * The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
622
626
  * Read the composition data source binding
623
627
  */
624
628
  getCompositionDataSourceRaw(requestParameters, initOverrides) {
@@ -641,15 +645,17 @@ export class CompositionsApi extends runtime.BaseAPI {
641
645
  headers: headerParameters,
642
646
  query: queryParameters,
643
647
  }, initOverrides);
644
- return new runtime.VoidApiResponse(response);
648
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDataSourceFromJSON(jsonValue));
645
649
  });
646
650
  }
647
651
  /**
652
+ * The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
648
653
  * Read the composition data source binding
649
654
  */
650
655
  getCompositionDataSource(requestParameters, initOverrides) {
651
656
  return __awaiter(this, void 0, void 0, function* () {
652
- yield this.getCompositionDataSourceRaw(requestParameters, initOverrides);
657
+ const response = yield this.getCompositionDataSourceRaw(requestParameters, initOverrides);
658
+ return yield response.value();
653
659
  });
654
660
  }
655
661
  /**
@@ -956,7 +962,7 @@ export class CompositionsApi extends runtime.BaseAPI {
956
962
  });
957
963
  }
958
964
  /**
959
- * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
965
+ * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
960
966
  * Get Compositions Batch
961
967
  */
962
968
  getCompositionsBatchRaw(requestParameters, initOverrides) {
@@ -985,7 +991,7 @@ export class CompositionsApi extends runtime.BaseAPI {
985
991
  });
986
992
  }
987
993
  /**
988
- * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
994
+ * Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
989
995
  * Get Compositions Batch
990
996
  */
991
997
  getCompositionsBatch(requestParameters, initOverrides) {
@@ -1046,7 +1052,7 @@ export class CompositionsApi extends runtime.BaseAPI {
1046
1052
  });
1047
1053
  }
1048
1054
  /**
1049
- * 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.
1055
+ * Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
1050
1056
  * Read the Entries of a Composition\'s Table
1051
1057
  */
1052
1058
  readCompositionEntriesRaw(requestParameters, initOverrides) {
@@ -1100,7 +1106,7 @@ export class CompositionsApi extends runtime.BaseAPI {
1100
1106
  });
1101
1107
  }
1102
1108
  /**
1103
- * 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.
1109
+ * Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
1104
1110
  * Read the Entries of a Composition\'s Table
1105
1111
  */
1106
1112
  readCompositionEntries(requestParameters, initOverrides) {
@@ -1110,7 +1116,7 @@ export class CompositionsApi extends runtime.BaseAPI {
1110
1116
  });
1111
1117
  }
1112
1118
  /**
1113
- * 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).
1119
+ * 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). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
1114
1120
  * Bind a public JSON data source for embed refresh
1115
1121
  */
1116
1122
  setCompositionDataSourceRaw(requestParameters, initOverrides) {
@@ -1141,16 +1147,17 @@ export class CompositionsApi extends runtime.BaseAPI {
1141
1147
  query: queryParameters,
1142
1148
  body: SetCompositionDataSourceRequestToJSON(requestParameters['setCompositionDataSourceRequest']),
1143
1149
  }, initOverrides);
1144
- return new runtime.VoidApiResponse(response);
1150
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionDataSourceFromJSON(jsonValue));
1145
1151
  });
1146
1152
  }
1147
1153
  /**
1148
- * 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).
1154
+ * 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). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
1149
1155
  * Bind a public JSON data source for embed refresh
1150
1156
  */
1151
1157
  setCompositionDataSource(requestParameters, initOverrides) {
1152
1158
  return __awaiter(this, void 0, void 0, function* () {
1153
- yield this.setCompositionDataSourceRaw(requestParameters, initOverrides);
1159
+ const response = yield this.setCompositionDataSourceRaw(requestParameters, initOverrides);
1160
+ return yield response.value();
1154
1161
  });
1155
1162
  }
1156
1163
  /**
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountCreditBalance, GetUserCreditTransactions200Response } from '../models/index';
13
+ import type { AccountCreditBalance, GetPartnerCreditTransactions200Response } from '../models/index';
14
14
  export interface AddCreditsRequest {
15
15
  body: object;
16
16
  idempotencyKey?: string;
@@ -57,25 +57,25 @@ export declare class CreditsApi extends runtime.BaseAPI {
57
57
  */
58
58
  getAllCreditBalances(requestParameters?: GetAllCreditBalancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<object>>;
59
59
  /**
60
- * 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.
60
+ * 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. `getPartnerCreditBalance` reads this same balance by partner id.
61
61
  * Get an account\'s credit balance
62
62
  */
63
63
  getUserCreditBalanceRaw(requestParameters: GetUserCreditBalance0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCreditBalance>>;
64
64
  /**
65
- * 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.
65
+ * 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. `getPartnerCreditBalance` reads this same balance by partner id.
66
66
  * Get an account\'s credit balance
67
67
  */
68
68
  getUserCreditBalance(requestParameters: GetUserCreditBalance0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCreditBalance>;
69
69
  /**
70
- * 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.
70
+ * 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. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
71
71
  * List an account\'s credit ledger
72
72
  */
73
- getUserCreditTransactionsRaw(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserCreditTransactions200Response>>;
73
+ getUserCreditTransactionsRaw(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPartnerCreditTransactions200Response>>;
74
74
  /**
75
- * 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.
75
+ * 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. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
76
76
  * List an account\'s credit ledger
77
77
  */
78
- getUserCreditTransactions(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserCreditTransactions200Response>;
78
+ getUserCreditTransactions(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPartnerCreditTransactions200Response>;
79
79
  /**
80
80
  * Subtracts credits from a user\'s balance. Admin only. A `referenceId` in the body names the deduction event; when it is omitted the request\'s `Idempotency-Key` header is used instead, and the request is refused with 400 when neither is present, so a retried deduction cannot be applied twice.
81
81
  * Subtract credits from user balance
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { AccountCreditBalanceFromJSON, GetUserCreditTransactions200ResponseFromJSON, } from '../models/index.js';
24
+ import { AccountCreditBalanceFromJSON, GetPartnerCreditTransactions200ResponseFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -109,7 +109,7 @@ export class CreditsApi extends runtime.BaseAPI {
109
109
  });
110
110
  }
111
111
  /**
112
- * 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.
112
+ * 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. `getPartnerCreditBalance` reads this same balance by partner id.
113
113
  * Get an account\'s credit balance
114
114
  */
115
115
  getUserCreditBalanceRaw(requestParameters, initOverrides) {
@@ -136,7 +136,7 @@ export class CreditsApi extends runtime.BaseAPI {
136
136
  });
137
137
  }
138
138
  /**
139
- * 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.
139
+ * 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. `getPartnerCreditBalance` reads this same balance by partner id.
140
140
  * Get an account\'s credit balance
141
141
  */
142
142
  getUserCreditBalance(requestParameters, initOverrides) {
@@ -146,7 +146,7 @@ export class CreditsApi extends runtime.BaseAPI {
146
146
  });
147
147
  }
148
148
  /**
149
- * 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.
149
+ * 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. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
150
150
  * List an account\'s credit ledger
151
151
  */
152
152
  getUserCreditTransactionsRaw(requestParameters, initOverrides) {
@@ -178,11 +178,11 @@ export class CreditsApi extends runtime.BaseAPI {
178
178
  headers: headerParameters,
179
179
  query: queryParameters,
180
180
  }, initOverrides);
181
- return new runtime.JSONApiResponse(response, (jsonValue) => GetUserCreditTransactions200ResponseFromJSON(jsonValue));
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerCreditTransactions200ResponseFromJSON(jsonValue));
182
182
  });
183
183
  }
184
184
  /**
185
- * 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.
185
+ * 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. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
186
186
  * List an account\'s credit ledger
187
187
  */
188
188
  getUserCreditTransactions(requestParameters, initOverrides) {