@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,22 +21,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { AddPartnerCreditsRequestToJSON, ConfigureAutoReloadRequestToJSON, GetPartnerCreditBalance200ResponseFromJSON, GetPartnerDesignDefaults200ResponseFromJSON, ListPartnerPresets200ResponseFromJSON, MyPartnersFromJSON, PartnerAnalyticsByManagedUserFromJSON, PartnerAnalyticsSummaryFromJSON, PartnerAnalyticsTimelineFromJSON, PartnerAnalyticsTopWidgetsFromJSON, PartnerContractFromJSON, PartnerNotificationDeliveryFromJSON, PartnerNotificationDeliveryLogFromJSON, PartnerNotificationPageFromJSON, PartnerNotificationSettingsFromJSON, PartnerNotificationSettingsChangeFromJSON, PartnerPresetFromJSON, PartnerPresetRemovalFromJSON, PartnerStorageDestinationFromJSON, PartnerStorageRemovalFromJSON, PartnerStorageUsageFromJSON, SetPartnerDesignDefaultsRequestToJSON, SetPartnerPresetRequestToJSON, SetPartnerStorageDestinationRequestToJSON, UpdatePartnerNotificationSettingsRequestToJSON, } from '../models/index.js';
24
+ import { AccountCreditBalanceFromJSON, GetPartnerCreditTransactions200ResponseFromJSON, GetPartnerDesignDefaults200ResponseFromJSON, ListPartnerPresets200ResponseFromJSON, MyPartnersFromJSON, PartnerAnalyticsByManagedUserFromJSON, PartnerAnalyticsSummaryFromJSON, PartnerAnalyticsTimelineFromJSON, PartnerAnalyticsTopWidgetsFromJSON, PartnerContractFromJSON, PartnerEntryContextSecretFromJSON, PartnerEntryContextSigningFromJSON, PartnerExtraCreditsInvoiceFromJSON, PartnerNotificationDeliveryFromJSON, PartnerNotificationDeliveryLogFromJSON, PartnerNotificationPageFromJSON, PartnerNotificationSettingsFromJSON, PartnerNotificationSettingsChangeFromJSON, PartnerNotificationTestEventRequestToJSON, PartnerNotificationTestEventResultFromJSON, PartnerPresetFromJSON, PartnerPresetRemovalFromJSON, PartnerStorageDestinationFromJSON, PartnerStorageRemovalFromJSON, PartnerStorageUsageFromJSON, RequestExtraCreditsToJSON, SetPartnerDesignDefaultsRequestToJSON, SetPartnerPresetRequestToJSON, SetPartnerStorageDestinationRequestToJSON, UpdatePartnerEntryContextSigningRequestToJSON, UpdatePartnerNotificationSettingsRequestToJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class PartnersApi extends runtime.BaseAPI {
29
29
  /**
30
- * Adds credits to a partner\'s account, generating a checkout URL for payment. This call is left out of the public API description on purpose, so a generated client does not have it. The partner wallet it tops up is not used by anything a partner builds on (a partner pays by invoice under its contract). It stays available to the partner\'s administrator and to Widgetic staff.
31
- * Add credits to partner account
30
+ * Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Allowed whatever the partner\'s standing: a partner that has run out of credits, or is stopped for an unpaid contract invoice, can still buy. No contract is needed. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
31
+ * Buy extra credits for a partner
32
32
  */
33
- addPartnerCreditsRaw(requestParameters, initOverrides) {
33
+ createPartnerExtraCreditsInvoiceRaw(requestParameters, initOverrides) {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
35
  if (requestParameters['partnerId'] == null) {
36
- throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling addPartnerCredits().');
36
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling createPartnerExtraCreditsInvoice().');
37
37
  }
38
- if (requestParameters['addPartnerCreditsRequest'] == null) {
39
- throw new runtime.RequiredError('addPartnerCreditsRequest', 'Required parameter "addPartnerCreditsRequest" was null or undefined when calling addPartnerCredits().');
38
+ if (requestParameters['requestExtraCredits'] == null) {
39
+ throw new runtime.RequiredError('requestExtraCredits', 'Required parameter "requestExtraCredits" was null or undefined when calling createPartnerExtraCreditsInvoice().');
40
40
  }
41
41
  const queryParameters = {};
42
42
  const headerParameters = {};
@@ -52,106 +52,27 @@ export class PartnersApi extends runtime.BaseAPI {
52
52
  }
53
53
  }
54
54
  const response = yield this.request({
55
- path: `/partners/{partnerId}/credits/add`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
55
+ path: `/partners/{partnerId}/credits/extra-invoice`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
56
56
  method: 'POST',
57
57
  headers: headerParameters,
58
58
  query: queryParameters,
59
- body: AddPartnerCreditsRequestToJSON(requestParameters['addPartnerCreditsRequest']),
59
+ body: RequestExtraCreditsToJSON(requestParameters['requestExtraCredits']),
60
60
  }, initOverrides);
61
- return new runtime.VoidApiResponse(response);
62
- });
63
- }
64
- /**
65
- * Adds credits to a partner\'s account, generating a checkout URL for payment. This call is left out of the public API description on purpose, so a generated client does not have it. The partner wallet it tops up is not used by anything a partner builds on (a partner pays by invoice under its contract). It stays available to the partner\'s administrator and to Widgetic staff.
66
- * Add credits to partner account
67
- */
68
- addPartnerCredits(requestParameters, initOverrides) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- yield this.addPartnerCreditsRaw(requestParameters, initOverrides);
71
- });
72
- }
73
- /**
74
- * Checks all partner credit balances and triggers auto-reload where needed (Admin only)
75
- * Check all partner balances for auto-reload
76
- */
77
- checkPartnerCreditBalancesRaw(requestParameters, initOverrides) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- const queryParameters = {};
80
- const headerParameters = {};
81
- if (requestParameters['idempotencyKey'] != null) {
82
- headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
83
- }
84
- if (this.configuration && this.configuration.accessToken) {
85
- const token = this.configuration.accessToken;
86
- const tokenString = yield token("apiKeyAuth", []);
87
- if (tokenString) {
88
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
89
- }
90
- }
91
- const response = yield this.request({
92
- path: `/partners/credits/check-balances`,
93
- method: 'POST',
94
- headers: headerParameters,
95
- query: queryParameters,
96
- }, initOverrides);
97
- return new runtime.VoidApiResponse(response);
98
- });
99
- }
100
- /**
101
- * Checks all partner credit balances and triggers auto-reload where needed (Admin only)
102
- * Check all partner balances for auto-reload
103
- */
104
- checkPartnerCreditBalances() {
105
- return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
106
- yield this.checkPartnerCreditBalancesRaw(requestParameters, initOverrides);
107
- });
108
- }
109
- /**
110
- * Configures automatic credit reload when balance falls below threshold
111
- * Configure auto-reload settings
112
- */
113
- configureAutoReloadRaw(requestParameters, initOverrides) {
114
- return __awaiter(this, void 0, void 0, function* () {
115
- if (requestParameters['partnerId'] == null) {
116
- throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling configureAutoReload().');
117
- }
118
- if (requestParameters['configureAutoReloadRequest'] == null) {
119
- throw new runtime.RequiredError('configureAutoReloadRequest', 'Required parameter "configureAutoReloadRequest" was null or undefined when calling configureAutoReload().');
120
- }
121
- const queryParameters = {};
122
- const headerParameters = {};
123
- headerParameters['Content-Type'] = 'application/json';
124
- if (requestParameters['idempotencyKey'] != null) {
125
- headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
126
- }
127
- if (this.configuration && this.configuration.accessToken) {
128
- const token = this.configuration.accessToken;
129
- const tokenString = yield token("apiKeyAuth", []);
130
- if (tokenString) {
131
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
132
- }
133
- }
134
- const response = yield this.request({
135
- path: `/partners/{partnerId}/credits/auto-reload`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
136
- method: 'PUT',
137
- headers: headerParameters,
138
- query: queryParameters,
139
- body: ConfigureAutoReloadRequestToJSON(requestParameters['configureAutoReloadRequest']),
140
- }, initOverrides);
141
- return new runtime.VoidApiResponse(response);
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerExtraCreditsInvoiceFromJSON(jsonValue));
142
62
  });
143
63
  }
144
64
  /**
145
- * Configures automatic credit reload when balance falls below threshold
146
- * Configure auto-reload settings
65
+ * Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Allowed whatever the partner\'s standing: a partner that has run out of credits, or is stopped for an unpaid contract invoice, can still buy. No contract is needed. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
66
+ * Buy extra credits for a partner
147
67
  */
148
- configureAutoReload(requestParameters, initOverrides) {
68
+ createPartnerExtraCreditsInvoice(requestParameters, initOverrides) {
149
69
  return __awaiter(this, void 0, void 0, function* () {
150
- yield this.configureAutoReloadRaw(requestParameters, initOverrides);
70
+ const response = yield this.createPartnerExtraCreditsInvoiceRaw(requestParameters, initOverrides);
71
+ return yield response.value();
151
72
  });
152
73
  }
153
74
  /**
154
- * Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: `active`, `inactive` (not activated yet) or `suspended` (paused, with the reason Widgetic gave). A partner API key is that account\'s key, so it reads its own partner here. An account that administers no partner is not refused: it gets `standing: not_a_partner` and an empty list, so a dashboard can tell \"this is not a partner account\" from \"something failed\". The call stays open while the partner is paused or not yet active: that is when its dashboard has to say why.
75
+ * Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: `active`, `inactive` (not activated yet), `suspended` (paused, with the reason Widgetic gave) or `payment_arrears` (a contract invoice is past its due date and unpaid, since `overdueSince`; the partner is stopped until it is paid). A partner API key is that account\'s key, so it reads its own partner here. An account that administers no partner is not refused: it gets `standing: not_a_partner` and an empty list, so a dashboard can tell \"this is not a partner account\" from \"something failed\". The call stays open while the partner is paused, not yet active or in payment arrears: that is when its dashboard has to say why.
155
76
  * Find the partner you administer
156
77
  */
157
78
  getMyPartnersRaw(initOverrides) {
@@ -175,7 +96,7 @@ export class PartnersApi extends runtime.BaseAPI {
175
96
  });
176
97
  }
177
98
  /**
178
- * Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: `active`, `inactive` (not activated yet) or `suspended` (paused, with the reason Widgetic gave). A partner API key is that account\'s key, so it reads its own partner here. An account that administers no partner is not refused: it gets `standing: not_a_partner` and an empty list, so a dashboard can tell \"this is not a partner account\" from \"something failed\". The call stays open while the partner is paused or not yet active: that is when its dashboard has to say why.
99
+ * Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: `active`, `inactive` (not activated yet), `suspended` (paused, with the reason Widgetic gave) or `payment_arrears` (a contract invoice is past its due date and unpaid, since `overdueSince`; the partner is stopped until it is paid). A partner API key is that account\'s key, so it reads its own partner here. An account that administers no partner is not refused: it gets `standing: not_a_partner` and an empty list, so a dashboard can tell \"this is not a partner account\" from \"something failed\". The call stays open while the partner is paused, not yet active or in payment arrears: that is when its dashboard has to say why.
179
100
  * Find the partner you administer
180
101
  */
181
102
  getMyPartners(initOverrides) {
@@ -384,7 +305,7 @@ export class PartnersApi extends runtime.BaseAPI {
384
305
  });
385
306
  }
386
307
  /**
387
- * Retrieves operational credits, the partner\'s contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it.
308
+ * Retrieves the older partner wallet\'s figures (`operationalCredits`), the partner\'s contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it. `operationalCredits` is **not** what the partner spends: that is the balance of its administrator\'s account, read with `getPartnerCreditBalance` (and its ledger with `getPartnerCreditTransactions`). The wallet it shows was kept before credits followed the account, and nothing adds to it any more.
388
309
  * Get comprehensive partner billing overview
389
310
  */
390
311
  getPartnerBillingOverviewRaw(requestParameters, initOverrides) {
@@ -411,7 +332,7 @@ export class PartnersApi extends runtime.BaseAPI {
411
332
  });
412
333
  }
413
334
  /**
414
- * Retrieves operational credits, the partner\'s contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it.
335
+ * Retrieves the older partner wallet\'s figures (`operationalCredits`), the partner\'s contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it. `operationalCredits` is **not** what the partner spends: that is the balance of its administrator\'s account, read with `getPartnerCreditBalance` (and its ledger with `getPartnerCreditTransactions`). The wallet it shows was kept before credits followed the account, and nothing adds to it any more.
415
336
  * Get comprehensive partner billing overview
416
337
  */
417
338
  getPartnerBillingOverview(requestParameters, initOverrides) {
@@ -457,7 +378,7 @@ export class PartnersApi extends runtime.BaseAPI {
457
378
  });
458
379
  }
459
380
  /**
460
- * Retrieves the current credit balance for a partner
381
+ * Returns the credits the partner has: the balance of the account of the person who administers it, and how much of that is reserved by operations that are still running. That is the account its customers\' editor sessions and its own API calls spend from, and the one a paid invoice that carries credits adds to, so it is the same balance `getUserCreditBalance` reads for that person. The partner wallet that was kept before credits followed the account is not read here: nothing adds to it or spends from it any more. A partner with no administrator reads a balance of 0. Access: the person who administers the partner, or a Widgetic administrator.
461
382
  * Get partner credit balance
462
383
  */
463
384
  getPartnerCreditBalanceRaw(requestParameters, initOverrides) {
@@ -480,11 +401,11 @@ export class PartnersApi extends runtime.BaseAPI {
480
401
  headers: headerParameters,
481
402
  query: queryParameters,
482
403
  }, initOverrides);
483
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerCreditBalance200ResponseFromJSON(jsonValue));
404
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreditBalanceFromJSON(jsonValue));
484
405
  });
485
406
  }
486
407
  /**
487
- * Retrieves the current credit balance for a partner
408
+ * Returns the credits the partner has: the balance of the account of the person who administers it, and how much of that is reserved by operations that are still running. That is the account its customers\' editor sessions and its own API calls spend from, and the one a paid invoice that carries credits adds to, so it is the same balance `getUserCreditBalance` reads for that person. The partner wallet that was kept before credits followed the account is not read here: nothing adds to it or spends from it any more. A partner with no administrator reads a balance of 0. Access: the person who administers the partner, or a Widgetic administrator.
488
409
  * Get partner credit balance
489
410
  */
490
411
  getPartnerCreditBalance(requestParameters, initOverrides) {
@@ -494,7 +415,7 @@ export class PartnersApi extends runtime.BaseAPI {
494
415
  });
495
416
  }
496
417
  /**
497
- * Retrieves the transaction history for a partner\'s credits
418
+ * Lists what happened to the partner\'s credits, newest first: the entries of the credit ledger of the account of the person who administers it. Every operation that spends credits is a `debit` entry, and the credits an invoice carried arrive as `credit` entries when the invoice is paid, so this is also how the partner\'s usage is read. It is the same ledger `getUserCreditTransactions` reads for that person. The partner wallet that was kept before credits followed the account is not read here. A partner with no administrator has an empty ledger. The page is always bounded: `limit` defaults to 20 and is capped at 100, `offset` defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
498
419
  * Get partner credit transaction history
499
420
  */
500
421
  getPartnerCreditTransactionsRaw(requestParameters, initOverrides) {
@@ -526,16 +447,17 @@ export class PartnersApi extends runtime.BaseAPI {
526
447
  headers: headerParameters,
527
448
  query: queryParameters,
528
449
  }, initOverrides);
529
- return new runtime.VoidApiResponse(response);
450
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerCreditTransactions200ResponseFromJSON(jsonValue));
530
451
  });
531
452
  }
532
453
  /**
533
- * Retrieves the transaction history for a partner\'s credits
454
+ * Lists what happened to the partner\'s credits, newest first: the entries of the credit ledger of the account of the person who administers it. Every operation that spends credits is a `debit` entry, and the credits an invoice carried arrive as `credit` entries when the invoice is paid, so this is also how the partner\'s usage is read. It is the same ledger `getUserCreditTransactions` reads for that person. The partner wallet that was kept before credits followed the account is not read here. A partner with no administrator has an empty ledger. The page is always bounded: `limit` defaults to 20 and is capped at 100, `offset` defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
534
455
  * Get partner credit transaction history
535
456
  */
536
457
  getPartnerCreditTransactions(requestParameters, initOverrides) {
537
458
  return __awaiter(this, void 0, void 0, function* () {
538
- yield this.getPartnerCreditTransactionsRaw(requestParameters, initOverrides);
459
+ const response = yield this.getPartnerCreditTransactionsRaw(requestParameters, initOverrides);
460
+ return yield response.value();
539
461
  });
540
462
  }
541
463
  /**
@@ -573,6 +495,43 @@ export class PartnersApi extends runtime.BaseAPI {
573
495
  return yield response.value();
574
496
  });
575
497
  }
498
+ /**
499
+ * Says whether you have a secret to sign the `context` of your embeds with, when it was made, whether the secret it replaced is still accepted, and whether an entry without a valid signature is refused (`required`). The secret itself is never part of the answer: it is shown once, when it is made (`rotatePartnerEntryContextSecret`, which also explains what signing is for and how to sign). Signing covers the entries written through the gateway into the compositions of your managed users and into those of your own account. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
500
+ * See how the context of your embeds is signed
501
+ */
502
+ getPartnerEntryContextSigningRaw(requestParameters, initOverrides) {
503
+ return __awaiter(this, void 0, void 0, function* () {
504
+ if (requestParameters['partnerId'] == null) {
505
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerEntryContextSigning().');
506
+ }
507
+ const queryParameters = {};
508
+ const headerParameters = {};
509
+ if (this.configuration && this.configuration.accessToken) {
510
+ const token = this.configuration.accessToken;
511
+ const tokenString = yield token("apiKeyAuth", []);
512
+ if (tokenString) {
513
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
514
+ }
515
+ }
516
+ const response = yield this.request({
517
+ path: `/partners/{partnerId}/entry-context-signing`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
518
+ method: 'GET',
519
+ headers: headerParameters,
520
+ query: queryParameters,
521
+ }, initOverrides);
522
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerEntryContextSigningFromJSON(jsonValue));
523
+ });
524
+ }
525
+ /**
526
+ * Says whether you have a secret to sign the `context` of your embeds with, when it was made, whether the secret it replaced is still accepted, and whether an entry without a valid signature is refused (`required`). The secret itself is never part of the answer: it is shown once, when it is made (`rotatePartnerEntryContextSecret`, which also explains what signing is for and how to sign). Signing covers the entries written through the gateway into the compositions of your managed users and into those of your own account. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
527
+ * See how the context of your embeds is signed
528
+ */
529
+ getPartnerEntryContextSigning(requestParameters, initOverrides) {
530
+ return __awaiter(this, void 0, void 0, function* () {
531
+ const response = yield this.getPartnerEntryContextSigningRaw(requestParameters, initOverrides);
532
+ return yield response.value();
533
+ });
534
+ }
576
535
  /**
577
536
  * Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. `events` lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
578
537
  * Where your notifications go
@@ -851,7 +810,7 @@ export class PartnersApi extends runtime.BaseAPI {
851
810
  });
852
811
  }
853
812
  /**
854
- * Removes the partner\'s storage destination. Partner storage is not optional, so after this the account\'s own uploads with its API key and the uploads of your customers\' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner\'s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
813
+ * Removes the partner\'s storage destination. Partner storage is not optional, so after this every upload of the account, on any route, and the uploads of your customers\' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner\'s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
855
814
  * Stop storing a partner\'s uploaded files in its own bucket
856
815
  */
857
816
  removePartnerStorageDestinationRaw(requestParameters, initOverrides) {
@@ -878,7 +837,7 @@ export class PartnersApi extends runtime.BaseAPI {
878
837
  });
879
838
  }
880
839
  /**
881
- * Removes the partner\'s storage destination. Partner storage is not optional, so after this the account\'s own uploads with its API key and the uploads of your customers\' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner\'s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
840
+ * Removes the partner\'s storage destination. Partner storage is not optional, so after this every upload of the account, on any route, and the uploads of your customers\' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner\'s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
882
841
  * Stop storing a partner\'s uploaded files in its own bucket
883
842
  */
884
843
  removePartnerStorageDestination(requestParameters, initOverrides) {
@@ -930,6 +889,46 @@ export class PartnersApi extends runtime.BaseAPI {
930
889
  return yield response.value();
931
890
  });
932
891
  }
892
+ /**
893
+ * Makes a secret to sign the `context` of your embeds with, and returns it in `secret`: **keep it now, it is shown once** and cannot be read again. Keep it on your server only: whoever holds it can write contexts your compositions accept. Call this again to make a new secret; the one it replaces is still accepted for a day, so that your server can switch without an entry being refused (making another within that day ends the overlap with the first). **What signing is for.** `<widgetic composition-id=\"...\" context=\'{\"customerId\":\"c_42\"}\'>` hands attribution to a widget, which sends it with every entry it saves. The page is yours but the browser is the visitor\'s: anybody can change that attribute and file an entry under another customer\'s id. When your server signs the context, the gateway refuses an entry whose context was changed, and the entries you keep hold attribution your server wrote. **How to sign** (on your server, for each page you render): 1. Take the context to give the widget. It may hold text and whole numbers only (within ±2^53, written without a fraction or an exponent). 2. Choose when the signature stops being good: `widgetic_exp`, in seconds since 1970 (UTC), no more than seven days from now. A minute of difference between clocks is forgiven. 3. Write the text to sign, with no spaces except those inside values: `widgetic-context.v1.<compositionId>.<widgetic_exp>.<json>`. `<compositionId>` is the id of the composition in lower case. `<json>` is the context as JSON with the keys in character-code order (so `Z` comes before `a`, and `10` before `9`), no spaces, strings escaped as JSON escapes them, and the two keys of the signature left out. 4. Sign that text: HMAC-SHA256 with the 32 bytes the secret stands for (the base64 text after `ctxsec_`), and write the result as base64url without padding. 5. Give the widget the context with two keys added: `widgetic_exp` and `widgetic_sig` (the signature). The whole attribute, the two keys included, stays within the limits of any context: at most 20 keys, 2048 bytes of JSON, strings up to 500 characters. The two keys take two of the 20 keys and 87 bytes of the 2048. A test vector, to check your code against before you rely on it. Secret `ctxsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=` (the bytes 0 to 31), composition `7c9e6679-7425-40de-944b-e07fc1f90ae7`, `widgetic_exp` 1792000000 and context `{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` sign the text `widgetic-context.v1.7c9e6679-7425-40de-944b-e07fc1f90ae7.1792000000.{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` and give the signature `j6g7151F54tl9C8oEY9levaYSppHME4fAPZ7WPwL8C8`. (The secret is the example\'s, not a real one.) **What the gateway does with an entry.** When you have a secret, an entry whose context carries a signature is checked: a signature that does not match is refused with 403 `CONTEXT_SIGNATURE_INVALID`, and one that is past `widgetic_exp` with 403 `CONTEXT_SIGNATURE_EXPIRED`. When you also require signatures (`updatePartnerEntryContextSigning`) an entry whose context carries none is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`. The two keys are taken out before the entry is stored or announced: your entries and your `entry.created` events hold the context you wrote. A change you make reaches every part of the gateway within a minute. **What it does not do.** A signed context that has been seen (a page\'s source is public) can be sent again by anyone until `widgetic_exp`; when you must not accept the same context twice, put a value that is new for each page view in it (a `submissionId` you made up) and keep the ones you have seen. The signature covers the entries that reach Widgetic\'s gateway: a widget that writes straight into its own database does not pass through it. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
894
+ * Make a secret to sign the context of your embeds
895
+ */
896
+ rotatePartnerEntryContextSecretRaw(requestParameters, initOverrides) {
897
+ return __awaiter(this, void 0, void 0, function* () {
898
+ if (requestParameters['partnerId'] == null) {
899
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling rotatePartnerEntryContextSecret().');
900
+ }
901
+ const queryParameters = {};
902
+ const headerParameters = {};
903
+ if (requestParameters['idempotencyKey'] != null) {
904
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
905
+ }
906
+ if (this.configuration && this.configuration.accessToken) {
907
+ const token = this.configuration.accessToken;
908
+ const tokenString = yield token("apiKeyAuth", []);
909
+ if (tokenString) {
910
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
911
+ }
912
+ }
913
+ const response = yield this.request({
914
+ path: `/partners/{partnerId}/entry-context-signing/secret`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
915
+ method: 'POST',
916
+ headers: headerParameters,
917
+ query: queryParameters,
918
+ }, initOverrides);
919
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerEntryContextSecretFromJSON(jsonValue));
920
+ });
921
+ }
922
+ /**
923
+ * Makes a secret to sign the `context` of your embeds with, and returns it in `secret`: **keep it now, it is shown once** and cannot be read again. Keep it on your server only: whoever holds it can write contexts your compositions accept. Call this again to make a new secret; the one it replaces is still accepted for a day, so that your server can switch without an entry being refused (making another within that day ends the overlap with the first). **What signing is for.** `<widgetic composition-id=\"...\" context=\'{\"customerId\":\"c_42\"}\'>` hands attribution to a widget, which sends it with every entry it saves. The page is yours but the browser is the visitor\'s: anybody can change that attribute and file an entry under another customer\'s id. When your server signs the context, the gateway refuses an entry whose context was changed, and the entries you keep hold attribution your server wrote. **How to sign** (on your server, for each page you render): 1. Take the context to give the widget. It may hold text and whole numbers only (within ±2^53, written without a fraction or an exponent). 2. Choose when the signature stops being good: `widgetic_exp`, in seconds since 1970 (UTC), no more than seven days from now. A minute of difference between clocks is forgiven. 3. Write the text to sign, with no spaces except those inside values: `widgetic-context.v1.<compositionId>.<widgetic_exp>.<json>`. `<compositionId>` is the id of the composition in lower case. `<json>` is the context as JSON with the keys in character-code order (so `Z` comes before `a`, and `10` before `9`), no spaces, strings escaped as JSON escapes them, and the two keys of the signature left out. 4. Sign that text: HMAC-SHA256 with the 32 bytes the secret stands for (the base64 text after `ctxsec_`), and write the result as base64url without padding. 5. Give the widget the context with two keys added: `widgetic_exp` and `widgetic_sig` (the signature). The whole attribute, the two keys included, stays within the limits of any context: at most 20 keys, 2048 bytes of JSON, strings up to 500 characters. The two keys take two of the 20 keys and 87 bytes of the 2048. A test vector, to check your code against before you rely on it. Secret `ctxsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=` (the bytes 0 to 31), composition `7c9e6679-7425-40de-944b-e07fc1f90ae7`, `widgetic_exp` 1792000000 and context `{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` sign the text `widgetic-context.v1.7c9e6679-7425-40de-944b-e07fc1f90ae7.1792000000.{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` and give the signature `j6g7151F54tl9C8oEY9levaYSppHME4fAPZ7WPwL8C8`. (The secret is the example\'s, not a real one.) **What the gateway does with an entry.** When you have a secret, an entry whose context carries a signature is checked: a signature that does not match is refused with 403 `CONTEXT_SIGNATURE_INVALID`, and one that is past `widgetic_exp` with 403 `CONTEXT_SIGNATURE_EXPIRED`. When you also require signatures (`updatePartnerEntryContextSigning`) an entry whose context carries none is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`. The two keys are taken out before the entry is stored or announced: your entries and your `entry.created` events hold the context you wrote. A change you make reaches every part of the gateway within a minute. **What it does not do.** A signed context that has been seen (a page\'s source is public) can be sent again by anyone until `widgetic_exp`; when you must not accept the same context twice, put a value that is new for each page view in it (a `submissionId` you made up) and keep the ones you have seen. The signature covers the entries that reach Widgetic\'s gateway: a widget that writes straight into its own database does not pass through it. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
924
+ * Make a secret to sign the context of your embeds
925
+ */
926
+ rotatePartnerEntryContextSecret(requestParameters, initOverrides) {
927
+ return __awaiter(this, void 0, void 0, function* () {
928
+ const response = yield this.rotatePartnerEntryContextSecretRaw(requestParameters, initOverrides);
929
+ return yield response.value();
930
+ });
931
+ }
933
932
  /**
934
933
  * Makes a new secret to sign your webhook with, and returns it in `webhookSecret`: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see `updatePartnerNotificationSettings` for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
935
934
  * Make a new secret for your webhook
@@ -970,6 +969,51 @@ export class PartnersApi extends runtime.BaseAPI {
970
969
  return yield response.value();
971
970
  });
972
971
  }
972
+ /**
973
+ * Sends ONE signed call, right now, to the webhook address you saved under notification settings, with a sample of what an event of the type you name carries, and answers how it went: whether your receiver answered with a 2xx status, which status, how long it took, and why not when it did not arrive. Use it to write and try your receiver (above all the signature check) before a real event happens. The call is made like every other: it is signed with your current secret (and the previous one while a rotation overlaps), it carries the headers `webhook-id`, `webhook-timestamp`, `webhook-signature` and `x-widgetic-event` (the event type), and its body is `{ \"id\", \"type\", \"createdAt\", \"partnerId\", \"data\" }`. Three things differ. `id` starts with `evt_test_` and is new every time, so a receiver that remembers ids can tell a test from an event and drop it. `data` holds made-up values of the shape a real event of that type carries (`PartnerNotification` describes each), never anything about your account. And the call is made once: it is not tried again, nothing is stored, and it appears neither in the delivery log nor in the notification list. It is sent whatever `webhookEvents` says: a test is not filtered by what you subscribed to. The answer is 200 whether or not your receiver took the call (read `delivered`); a call that gets no answer within ten seconds is given up and reported as a `timeout`. A webhook address and a signing secret must be saved first (`updatePartnerNotificationSettings`); until then the answer is 409. This needs an API key with full access, and `Idempotency-Key` is required: a retry with the same key gets the first answer back and no second call is made. The caller must be the person who administers the partner, or a Widgetic administrator. Five tests a minute.
974
+ * Send a test event to your webhook
975
+ */
976
+ sendPartnerNotificationTestEventRaw(requestParameters, initOverrides) {
977
+ return __awaiter(this, void 0, void 0, function* () {
978
+ if (requestParameters['partnerId'] == null) {
979
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling sendPartnerNotificationTestEvent().');
980
+ }
981
+ if (requestParameters['partnerNotificationTestEventRequest'] == null) {
982
+ throw new runtime.RequiredError('partnerNotificationTestEventRequest', 'Required parameter "partnerNotificationTestEventRequest" was null or undefined when calling sendPartnerNotificationTestEvent().');
983
+ }
984
+ const queryParameters = {};
985
+ const headerParameters = {};
986
+ headerParameters['Content-Type'] = 'application/json';
987
+ if (requestParameters['idempotencyKey'] != null) {
988
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
989
+ }
990
+ if (this.configuration && this.configuration.accessToken) {
991
+ const token = this.configuration.accessToken;
992
+ const tokenString = yield token("apiKeyAuth", []);
993
+ if (tokenString) {
994
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
995
+ }
996
+ }
997
+ const response = yield this.request({
998
+ path: `/partners/{partnerId}/notifications/test-event`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
999
+ method: 'POST',
1000
+ headers: headerParameters,
1001
+ query: queryParameters,
1002
+ body: PartnerNotificationTestEventRequestToJSON(requestParameters['partnerNotificationTestEventRequest']),
1003
+ }, initOverrides);
1004
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerNotificationTestEventResultFromJSON(jsonValue));
1005
+ });
1006
+ }
1007
+ /**
1008
+ * Sends ONE signed call, right now, to the webhook address you saved under notification settings, with a sample of what an event of the type you name carries, and answers how it went: whether your receiver answered with a 2xx status, which status, how long it took, and why not when it did not arrive. Use it to write and try your receiver (above all the signature check) before a real event happens. The call is made like every other: it is signed with your current secret (and the previous one while a rotation overlaps), it carries the headers `webhook-id`, `webhook-timestamp`, `webhook-signature` and `x-widgetic-event` (the event type), and its body is `{ \"id\", \"type\", \"createdAt\", \"partnerId\", \"data\" }`. Three things differ. `id` starts with `evt_test_` and is new every time, so a receiver that remembers ids can tell a test from an event and drop it. `data` holds made-up values of the shape a real event of that type carries (`PartnerNotification` describes each), never anything about your account. And the call is made once: it is not tried again, nothing is stored, and it appears neither in the delivery log nor in the notification list. It is sent whatever `webhookEvents` says: a test is not filtered by what you subscribed to. The answer is 200 whether or not your receiver took the call (read `delivered`); a call that gets no answer within ten seconds is given up and reported as a `timeout`. A webhook address and a signing secret must be saved first (`updatePartnerNotificationSettings`); until then the answer is 409. This needs an API key with full access, and `Idempotency-Key` is required: a retry with the same key gets the first answer back and no second call is made. The caller must be the person who administers the partner, or a Widgetic administrator. Five tests a minute.
1009
+ * Send a test event to your webhook
1010
+ */
1011
+ sendPartnerNotificationTestEvent(requestParameters, initOverrides) {
1012
+ return __awaiter(this, void 0, void 0, function* () {
1013
+ const response = yield this.sendPartnerNotificationTestEventRaw(requestParameters, initOverrides);
1014
+ return yield response.value();
1015
+ });
1016
+ }
973
1017
  /**
974
1018
  * Send `{ \"design\": { ... } }` or `{ \"design\": null }` to remove. New compositions merge this layer over the widget base and under each managed user\'s default and the request body.
975
1019
  * Set or clear partner-wide design defaults
@@ -1057,7 +1101,7 @@ export class PartnersApi extends runtime.BaseAPI {
1057
1101
  });
1058
1102
  }
1059
1103
  /**
1060
- * Points the partner at a bucket of its own on an S3-compatible service (Amazon S3, Backblaze B2, Cloudflare R2, Wasabi, MinIO and the like). From then on, a file uploaded with `uploadsPost` by the account that administers the partner is stored in that bucket instead of with Widgetic. It takes none of the account\'s storage allowance, and its `url` is served from `public_base_url`. Only uploads sent with an API key, an SDK token or an editor session use the destination. Uploads from the Widgetic website, resumable uploads and the media library keep using Widgetic\'s storage. A destination is required. Partner storage is not optional: your customers\' files, and your own uploads with your API key, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<key_prefix>widgetic-check/`, reads it back from `<public_base_url>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `public_base_url`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1104
+ * Points the partner at a bucket of its own on an S3-compatible service (Amazon S3, Backblaze B2, Cloudflare R2, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadsPost` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account\'s storage allowance, and its `url` is served from `public_base_url`. The chunks of a resumable upload wait in Widgetic\'s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers\' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<key_prefix>widgetic-check/`, reads it back from `<public_base_url>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `public_base_url`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1061
1105
  * Set where a partner\'s uploaded files are stored
1062
1106
  */
1063
1107
  setPartnerStorageDestinationRaw(requestParameters, initOverrides) {
@@ -1089,7 +1133,7 @@ export class PartnersApi extends runtime.BaseAPI {
1089
1133
  });
1090
1134
  }
1091
1135
  /**
1092
- * Points the partner at a bucket of its own on an S3-compatible service (Amazon S3, Backblaze B2, Cloudflare R2, Wasabi, MinIO and the like). From then on, a file uploaded with `uploadsPost` by the account that administers the partner is stored in that bucket instead of with Widgetic. It takes none of the account\'s storage allowance, and its `url` is served from `public_base_url`. Only uploads sent with an API key, an SDK token or an editor session use the destination. Uploads from the Widgetic website, resumable uploads and the media library keep using Widgetic\'s storage. A destination is required. Partner storage is not optional: your customers\' files, and your own uploads with your API key, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<key_prefix>widgetic-check/`, reads it back from `<public_base_url>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `public_base_url`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1136
+ * Points the partner at a bucket of its own on an S3-compatible service (Amazon S3, Backblaze B2, Cloudflare R2, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadsPost` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account\'s storage allowance, and its `url` is served from `public_base_url`. The chunks of a resumable upload wait in Widgetic\'s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers\' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<key_prefix>widgetic-check/`, reads it back from `<public_base_url>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `public_base_url`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1093
1137
  * Set where a partner\'s uploaded files are stored
1094
1138
  */
1095
1139
  setPartnerStorageDestination(requestParameters, initOverrides) {
@@ -1098,6 +1142,51 @@ export class PartnersApi extends runtime.BaseAPI {
1098
1142
  return yield response.value();
1099
1143
  });
1100
1144
  }
1145
+ /**
1146
+ * Chooses what the gateway does with an entry whose `context` carries no valid signature. With `required: false` (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With `required: true` an entry without a valid signature is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (`rotatePartnerEntryContextSecret`): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and `Idempotency-Key` is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1147
+ * Require a signed context, or stop requiring it
1148
+ */
1149
+ updatePartnerEntryContextSigningRaw(requestParameters, initOverrides) {
1150
+ return __awaiter(this, void 0, void 0, function* () {
1151
+ if (requestParameters['partnerId'] == null) {
1152
+ throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling updatePartnerEntryContextSigning().');
1153
+ }
1154
+ if (requestParameters['updatePartnerEntryContextSigningRequest'] == null) {
1155
+ throw new runtime.RequiredError('updatePartnerEntryContextSigningRequest', 'Required parameter "updatePartnerEntryContextSigningRequest" was null or undefined when calling updatePartnerEntryContextSigning().');
1156
+ }
1157
+ const queryParameters = {};
1158
+ const headerParameters = {};
1159
+ headerParameters['Content-Type'] = 'application/json';
1160
+ if (requestParameters['idempotencyKey'] != null) {
1161
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
1162
+ }
1163
+ if (this.configuration && this.configuration.accessToken) {
1164
+ const token = this.configuration.accessToken;
1165
+ const tokenString = yield token("apiKeyAuth", []);
1166
+ if (tokenString) {
1167
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1168
+ }
1169
+ }
1170
+ const response = yield this.request({
1171
+ path: `/partners/{partnerId}/entry-context-signing`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
1172
+ method: 'PUT',
1173
+ headers: headerParameters,
1174
+ query: queryParameters,
1175
+ body: UpdatePartnerEntryContextSigningRequestToJSON(requestParameters['updatePartnerEntryContextSigningRequest']),
1176
+ }, initOverrides);
1177
+ return new runtime.JSONApiResponse(response, (jsonValue) => PartnerEntryContextSigningFromJSON(jsonValue));
1178
+ });
1179
+ }
1180
+ /**
1181
+ * Chooses what the gateway does with an entry whose `context` carries no valid signature. With `required: false` (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With `required: true` an entry without a valid signature is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (`rotatePartnerEntryContextSecret`): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and `Idempotency-Key` is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1182
+ * Require a signed context, or stop requiring it
1183
+ */
1184
+ updatePartnerEntryContextSigning(requestParameters, initOverrides) {
1185
+ return __awaiter(this, void 0, void 0, function* () {
1186
+ const response = yield this.updatePartnerEntryContextSigningRaw(requestParameters, initOverrides);
1187
+ return yield response.value();
1188
+ });
1189
+ }
1101
1190
  /**
1102
1191
  * Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** `emailRecipients` is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever `emailEvents` says; it narrows the others. **Webhook.** `webhookUrl` is where Widgetic sends a signed `POST` for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be `https` on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as `webhookSecret`: **keep it now, it is shown once**. `webhookEvents` narrows what is sent. Each call has a JSON body, `{ \"id\": \"evt_...\", \"type\": \"invoice.paid\", \"createdAt\": \"...\", \"partnerId\": \"...\", \"data\": { ... } }` (`data` is the `data` of `PartnerNotification`), and these headers: `webhook-id` (the same as `id`, and the same on every retry), `webhook-timestamp` (seconds since 1970) and `webhook-signature` (`v1,` and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the `whsec_` prefix, decode it from base64, and sign the text `<webhook-id>.<webhook-timestamp>.<the raw body>` with it; the header holds `v1,<base64 of the result>` (two signatures separated by a space while a rotated secret overlaps). Reject a `webhook-timestamp` that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (`listPartnerNotificationDeliveries` shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same `id`, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
1103
1192
  * Choose where your notifications go
@@ -1181,13 +1270,3 @@ export class PartnersApi extends runtime.BaseAPI {
1181
1270
  });
1182
1271
  }
1183
1272
  }
1184
- /**
1185
- * @export
1186
- */
1187
- export const GetPartnerCreditTransactionsTypeEnum = {
1188
- Credit: 'credit',
1189
- Debit: 'debit',
1190
- Purchase: 'purchase',
1191
- Usage: 'usage',
1192
- Refund: 'refund'
1193
- };