@widgetic/api-sdk-ts 1.11.109 → 1.11.151

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 (315) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/BrandKitApi.d.ts +130 -0
  3. package/dist/apis/BrandKitApi.js +381 -0
  4. package/dist/apis/CanvasesApi.d.ts +15 -15
  5. package/dist/apis/CompositionsApi.d.ts +257 -155
  6. package/dist/apis/CompositionsApi.js +338 -134
  7. package/dist/apis/CreditsApi.d.ts +11 -11
  8. package/dist/apis/CreditsApi.js +5 -5
  9. package/dist/apis/EntitlementsApi.d.ts +6 -6
  10. package/dist/apis/InvoicesApi.d.ts +6 -6
  11. package/dist/apis/InvoicesApi.js +2 -2
  12. package/dist/apis/ManagedUsersApi.d.ts +97 -63
  13. package/dist/apis/ManagedUsersApi.js +106 -39
  14. package/dist/apis/OperationsApi.d.ts +4 -4
  15. package/dist/apis/OperationsApi.js +5 -5
  16. package/dist/apis/OrganizationsApi.d.ts +74 -0
  17. package/dist/apis/OrganizationsApi.js +205 -0
  18. package/dist/apis/PartnersApi.d.ts +133 -133
  19. package/dist/apis/PartnersApi.js +19 -19
  20. package/dist/apis/PublicEmbedApi.d.ts +57 -42
  21. package/dist/apis/PublicEmbedApi.js +64 -29
  22. package/dist/apis/TokensApi.d.ts +2 -0
  23. package/dist/apis/TokensApi.js +2 -0
  24. package/dist/apis/UploadsApi.d.ts +40 -40
  25. package/dist/apis/UploadsApi.js +60 -60
  26. package/dist/apis/UsersApi.d.ts +30 -86
  27. package/dist/apis/UsersApi.js +6 -154
  28. package/dist/apis/WidgetsApi.d.ts +25 -25
  29. package/dist/apis/WidgetsApi.js +38 -38
  30. package/dist/apis/WorkflowsApi.d.ts +115 -157
  31. package/dist/apis/WorkflowsApi.js +111 -221
  32. package/dist/apis/index.d.ts +2 -2
  33. package/dist/apis/index.js +2 -2
  34. package/dist/esm/apis/BrandKitApi.js +344 -0
  35. package/dist/esm/apis/CompositionsApi.js +338 -134
  36. package/dist/esm/apis/CreditsApi.js +6 -6
  37. package/dist/esm/apis/InvoicesApi.js +1 -1
  38. package/dist/esm/apis/ManagedUsersApi.js +106 -39
  39. package/dist/esm/apis/OperationsApi.js +6 -6
  40. package/dist/esm/apis/OrganizationsApi.js +168 -0
  41. package/dist/esm/apis/PartnersApi.js +20 -20
  42. package/dist/esm/apis/PublicEmbedApi.js +65 -30
  43. package/dist/esm/apis/TokensApi.js +2 -0
  44. package/dist/esm/apis/UploadsApi.js +60 -60
  45. package/dist/esm/apis/UsersApi.js +7 -155
  46. package/dist/esm/apis/WidgetsApi.js +39 -39
  47. package/dist/esm/apis/WorkflowsApi.js +111 -221
  48. package/dist/esm/apis/index.js +2 -2
  49. package/dist/esm/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +8 -8
  50. package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +8 -8
  51. package/dist/esm/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +8 -8
  52. package/dist/esm/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +8 -8
  53. package/dist/esm/models/AddOrganizationDomainResponse.js +51 -0
  54. package/dist/esm/models/AddOrganizationDomainResponseData.js +44 -0
  55. package/dist/esm/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +8 -8
  56. package/dist/esm/models/BrandColor.js +64 -0
  57. package/dist/esm/models/BrandFont.js +72 -0
  58. package/dist/esm/models/BrandKitAssetView.js +96 -0
  59. package/dist/esm/models/BrandKitFigmaSource.js +59 -0
  60. package/dist/esm/models/BrandKitTokens.js +59 -0
  61. package/dist/esm/models/BrandKitTokensFonts.js +48 -0
  62. package/dist/esm/models/BrandKitView.js +75 -0
  63. package/dist/esm/models/BrandKitViewOwner.js +54 -0
  64. package/dist/esm/models/BrandKitViewResponse.js +51 -0
  65. package/dist/esm/models/BrandSpacing.js +71 -0
  66. package/dist/esm/models/BrandTextStyle.js +65 -0
  67. package/dist/esm/models/Canvas.js +3 -0
  68. package/dist/esm/models/CanvasActiveOperation.js +66 -0
  69. package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
  70. package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
  71. package/dist/esm/models/CreateWidget201ResponseData.js +6 -0
  72. package/dist/esm/models/{CreateCompositionFromWidget201Response.js → DeleteOrganizationDomainResponse.js} +11 -11
  73. package/dist/esm/models/DeleteOrganizationDomainResponseData.js +41 -0
  74. package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
  75. package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
  76. package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
  77. package/dist/esm/models/EditorSession.js +4 -0
  78. package/dist/esm/models/GetOperationResponse.js +51 -0
  79. package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +12 -11
  80. package/dist/esm/models/GetOperationResponseDataMetadata.js +69 -0
  81. package/dist/esm/models/GetOrganizationDomains200Response.js +51 -0
  82. package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
  83. package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
  84. package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
  85. package/dist/esm/models/NewWidget.js +0 -1
  86. package/dist/esm/models/{PersonalWorkspaceDomain.js → OrganizationDomain.js} +12 -18
  87. package/dist/esm/models/PatchBrandKitAssetRequest.js +68 -0
  88. package/dist/esm/models/PatchBrandKitRequest.js +57 -0
  89. package/dist/esm/models/PatchBrandKitRequestFonts.js +48 -0
  90. package/dist/esm/models/PatchBrandKitRequestSpacing.js +55 -0
  91. package/dist/esm/models/PostBrandKitIconRequest.js +47 -0
  92. package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
  93. package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
  94. package/dist/esm/models/PutBrandKitRequest.js +49 -0
  95. package/dist/esm/models/UpdateOrganizationDomainResponse.js +51 -0
  96. package/dist/esm/models/Upload.js +2 -0
  97. package/dist/esm/models/UserApiKey.js +2 -0
  98. package/dist/esm/models/ValidateToken200ResponseData.js +3 -0
  99. package/dist/esm/models/ValidateToken200ResponseDataWorkspace.js +43 -0
  100. package/dist/esm/models/Widget.js +6 -0
  101. package/dist/esm/models/WidgetClarification.js +52 -0
  102. package/dist/esm/models/WidgetClarificationOption.js +51 -0
  103. package/dist/esm/models/WidgetClarificationQuestion.js +64 -0
  104. package/dist/esm/models/WidgetCodeChange.js +68 -0
  105. package/dist/esm/models/WidgetCodeChanges.js +48 -0
  106. package/dist/esm/models/WidgetNextStep.js +71 -0
  107. package/dist/esm/models/WidgetPlan.js +61 -0
  108. package/dist/esm/models/WidgetPlanDecisions.js +72 -0
  109. package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
  110. package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
  111. package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
  112. package/dist/esm/models/WidgetPlanTask.js +80 -0
  113. package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
  114. package/dist/esm/models/WorkflowFailureReason.js +49 -0
  115. package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
  116. package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
  117. package/dist/esm/models/WorkflowStats.js +3 -0
  118. package/dist/esm/models/index.js +59 -25
  119. package/dist/esm/runtime.js +1 -1
  120. package/dist/models/AccountCreditBalance.d.ts +2 -2
  121. package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
  122. package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
  123. package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
  124. package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
  125. package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
  126. package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
  127. package/dist/models/AdapterConnectionResponse.d.ts +46 -0
  128. package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
  129. package/dist/models/AddOrganizationDomainResponse.d.ts +46 -0
  130. package/dist/models/AddOrganizationDomainResponse.js +58 -0
  131. package/dist/models/AddOrganizationDomainResponseData.d.ts +39 -0
  132. package/dist/models/AddOrganizationDomainResponseData.js +51 -0
  133. package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
  134. package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
  135. package/dist/models/BrandColor.d.ts +60 -0
  136. package/dist/models/BrandColor.js +72 -0
  137. package/dist/models/BrandFont.d.ts +73 -0
  138. package/dist/models/BrandFont.js +80 -0
  139. package/dist/models/BrandKitAssetView.d.ts +130 -0
  140. package/dist/models/BrandKitAssetView.js +104 -0
  141. package/dist/models/BrandKitFigmaSource.d.ts +56 -0
  142. package/dist/models/BrandKitFigmaSource.js +66 -0
  143. package/dist/models/BrandKitTokens.d.ts +60 -0
  144. package/dist/models/BrandKitTokens.js +66 -0
  145. package/dist/models/BrandKitTokensFonts.d.ts +51 -0
  146. package/dist/models/BrandKitTokensFonts.js +55 -0
  147. package/dist/models/BrandKitView.d.ts +90 -0
  148. package/dist/models/BrandKitView.js +82 -0
  149. package/dist/models/BrandKitViewOwner.d.ts +46 -0
  150. package/dist/models/BrandKitViewOwner.js +62 -0
  151. package/dist/models/BrandKitViewResponse.d.ts +46 -0
  152. package/dist/models/BrandKitViewResponse.js +58 -0
  153. package/dist/models/BrandSpacing.d.ts +74 -0
  154. package/dist/models/BrandSpacing.js +78 -0
  155. package/dist/models/BrandTextStyle.d.ts +59 -0
  156. package/dist/models/BrandTextStyle.js +73 -0
  157. package/dist/models/Canvas.d.ts +7 -0
  158. package/dist/models/Canvas.js +3 -0
  159. package/dist/models/CanvasActiveOperation.d.ts +65 -0
  160. package/dist/models/CanvasActiveOperation.js +74 -0
  161. package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
  162. package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
  163. package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
  164. package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
  165. package/dist/models/CreateWidget201ResponseData.d.ts +18 -0
  166. package/dist/models/CreateWidget201ResponseData.js +6 -0
  167. package/dist/models/DeleteOrganizationDomainResponse.d.ts +46 -0
  168. package/dist/models/DeleteOrganizationDomainResponse.js +58 -0
  169. package/dist/models/DeleteOrganizationDomainResponseData.d.ts +32 -0
  170. package/dist/models/DeleteOrganizationDomainResponseData.js +48 -0
  171. package/dist/models/DeleteUpload200Response.d.ts +46 -0
  172. package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
  173. package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
  174. package/dist/models/DeleteUpload200ResponseData.js +48 -0
  175. package/dist/models/DesignDefaultsResponse.d.ts +46 -0
  176. package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
  177. package/dist/models/EditorSession.d.ts +7 -0
  178. package/dist/models/EditorSession.js +4 -0
  179. package/dist/models/GetOperationResponse.d.ts +46 -0
  180. package/dist/models/GetOperationResponse.js +58 -0
  181. package/dist/models/GetOperationResponseData.d.ts +86 -0
  182. package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
  183. package/dist/models/GetOperationResponseDataMetadata.d.ts +87 -0
  184. package/dist/models/GetOperationResponseDataMetadata.js +77 -0
  185. package/dist/models/GetOrganizationDomains200Response.d.ts +46 -0
  186. package/dist/models/GetOrganizationDomains200Response.js +58 -0
  187. package/dist/models/ListUploads200Response.d.ts +46 -0
  188. package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
  189. package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
  190. package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
  191. package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
  192. package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
  193. package/dist/models/NewEditorSession.d.ts +1 -1
  194. package/dist/models/NewWidget.d.ts +2 -3
  195. package/dist/models/NewWidget.js +0 -1
  196. package/dist/models/OrganizationDomain.d.ts +56 -0
  197. package/dist/models/OrganizationDomain.js +56 -0
  198. package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +1 -1
  199. package/dist/models/PatchBrandKitAssetRequest.d.ts +73 -0
  200. package/dist/models/PatchBrandKitAssetRequest.js +76 -0
  201. package/dist/models/PatchBrandKitRequest.d.ts +72 -0
  202. package/dist/models/PatchBrandKitRequest.js +64 -0
  203. package/dist/models/PatchBrandKitRequestFonts.d.ts +51 -0
  204. package/dist/models/PatchBrandKitRequestFonts.js +55 -0
  205. package/dist/models/PatchBrandKitRequestSpacing.d.ts +74 -0
  206. package/dist/models/PatchBrandKitRequestSpacing.js +62 -0
  207. package/dist/models/PostBrandKitIconRequest.d.ts +38 -0
  208. package/dist/models/PostBrandKitIconRequest.js +54 -0
  209. package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
  210. package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
  211. package/dist/models/PublicWorkflowResponse.d.ts +46 -0
  212. package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
  213. package/dist/models/PutBrandKitRequest.d.ts +46 -0
  214. package/dist/models/PutBrandKitRequest.js +56 -0
  215. package/dist/models/UpdateOrganizationDomainResponse.d.ts +46 -0
  216. package/dist/models/UpdateOrganizationDomainResponse.js +58 -0
  217. package/dist/models/Upload.d.ts +7 -1
  218. package/dist/models/Upload.js +2 -0
  219. package/dist/models/UploadLimits.d.ts +3 -3
  220. package/dist/models/UserApiKey.d.ts +6 -0
  221. package/dist/models/UserApiKey.js +2 -0
  222. package/dist/models/ValidateToken200ResponseData.d.ts +7 -0
  223. package/dist/models/ValidateToken200ResponseData.js +3 -0
  224. package/dist/models/ValidateToken200ResponseDataWorkspace.d.ts +38 -0
  225. package/dist/models/ValidateToken200ResponseDataWorkspace.js +50 -0
  226. package/dist/models/Widget.d.ts +18 -0
  227. package/dist/models/Widget.js +6 -0
  228. package/dist/models/WidgetClarification.d.ts +45 -0
  229. package/dist/models/WidgetClarification.js +59 -0
  230. package/dist/models/WidgetClarificationOption.d.ts +44 -0
  231. package/dist/models/WidgetClarificationOption.js +58 -0
  232. package/dist/models/WidgetClarificationQuestion.d.ts +63 -0
  233. package/dist/models/WidgetClarificationQuestion.js +71 -0
  234. package/dist/models/WidgetCodeChange.d.ts +70 -0
  235. package/dist/models/WidgetCodeChange.js +76 -0
  236. package/dist/models/WidgetCodeChanges.d.ts +39 -0
  237. package/dist/models/WidgetCodeChanges.js +55 -0
  238. package/dist/models/WidgetNextStep.d.ts +69 -0
  239. package/dist/models/WidgetNextStep.js +79 -0
  240. package/dist/models/WidgetPlan.d.ts +58 -0
  241. package/dist/models/WidgetPlan.js +68 -0
  242. package/dist/models/WidgetPlanDecisions.d.ts +77 -0
  243. package/dist/models/WidgetPlanDecisions.js +79 -0
  244. package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
  245. package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
  246. package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
  247. package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
  248. package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
  249. package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
  250. package/dist/models/WidgetPlanTask.d.ts +77 -0
  251. package/dist/models/WidgetPlanTask.js +88 -0
  252. package/dist/models/WorkflowDetailAllOfLastEditedBy.d.ts +2 -2
  253. package/dist/models/WorkflowDetailResponse.d.ts +46 -0
  254. package/dist/models/WorkflowDetailResponse.js +58 -0
  255. package/dist/models/WorkflowFailureReason.d.ts +31 -0
  256. package/dist/models/WorkflowFailureReason.js +57 -0
  257. package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
  258. package/dist/models/WorkflowFailureReasonCounter.js +59 -0
  259. package/dist/models/WorkflowResponse.d.ts +46 -0
  260. package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
  261. package/dist/models/WorkflowStats.d.ts +16 -1
  262. package/dist/models/WorkflowStats.js +3 -0
  263. package/dist/models/index.d.ts +59 -25
  264. package/dist/models/index.js +59 -25
  265. package/dist/runtime.d.ts +2 -2
  266. package/dist/runtime.js +1 -1
  267. package/package.json +1 -1
  268. package/dist/apis/PartnerApi.d.ts +0 -2595
  269. package/dist/apis/PartnerApi.js +0 -6749
  270. package/dist/apis/WorkspacesApi.d.ts +0 -352
  271. package/dist/apis/WorkspacesApi.js +0 -946
  272. package/dist/esm/apis/PartnerApi.js +0 -6712
  273. package/dist/esm/apis/WorkspacesApi.js +0 -909
  274. package/dist/esm/models/DeletePersonalWorkspaceDomainResponse.js +0 -51
  275. package/dist/esm/models/DeletePersonalWorkspaceDomainResponseData.js +0 -41
  276. package/dist/esm/models/GetPersonalWorkspaceDomains200Response.js +0 -51
  277. package/dist/esm/models/PersonalWorkspaceDomainResult.js +0 -48
  278. package/dist/esm/models/PersonalWorkspaceDomainResultResponse.js +0 -51
  279. package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
  280. package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
  281. package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
  282. package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
  283. package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
  284. package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
  285. package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
  286. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
  287. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
  288. package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
  289. package/dist/models/DeletePersonalWorkspaceDomainResponse.d.ts +0 -46
  290. package/dist/models/DeletePersonalWorkspaceDomainResponse.js +0 -58
  291. package/dist/models/DeletePersonalWorkspaceDomainResponseData.d.ts +0 -32
  292. package/dist/models/DeletePersonalWorkspaceDomainResponseData.js +0 -48
  293. package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
  294. package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
  295. package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
  296. package/dist/models/GetPersonalWorkspaceDomains200Response.d.ts +0 -46
  297. package/dist/models/GetPersonalWorkspaceDomains200Response.js +0 -58
  298. package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
  299. package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
  300. package/dist/models/OperationsIdGetResponse.d.ts +0 -46
  301. package/dist/models/OperationsIdGetResponseData.d.ts +0 -88
  302. package/dist/models/PersonalWorkspaceDomain.d.ts +0 -56
  303. package/dist/models/PersonalWorkspaceDomain.js +0 -62
  304. package/dist/models/PersonalWorkspaceDomainResult.d.ts +0 -39
  305. package/dist/models/PersonalWorkspaceDomainResult.js +0 -55
  306. package/dist/models/PersonalWorkspaceDomainResultResponse.d.ts +0 -46
  307. package/dist/models/PersonalWorkspaceDomainResultResponse.js +0 -58
  308. package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
  309. package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
  310. package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
  311. package/dist/models/UploadsGet200Response.d.ts +0 -46
  312. package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
  313. package/dist/models/UploadsIdDelete200Response.js +0 -58
  314. package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
  315. package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
@@ -12,13 +12,13 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { AccountCreditBalanceResponseFromJSON, GetPartnerCreditTransactions200ResponseFromJSON, } from '../models/index.js';
15
+ import { AccountCreditBalanceResponseFromJSON, AccountCreditTransactionListResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
19
19
  export class CreditsApi extends runtime.BaseAPI {
20
20
  /**
21
- * 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.
21
+ * Returns the credits an account holds in the workspace the request acts in: the balance, and how much of it is reserved by operations that are still running. A credential that belongs to a team acts in that team, a person signed in on widgetic.com acts in the workspace they last switched to, and any other credential acts in the person\'s default workspace (the oldest workspace they own, and for the person who administers a partner, the partner\'s own workspace). 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, and read all of it (the credits of every workspace of that account together). An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads the balance of the partner\'s workspace by partner id.
22
22
  * Get an account\'s credit balance
23
23
  */
24
24
  async getUserCreditBalanceRaw(requestParameters, initOverrides) {
@@ -43,7 +43,7 @@ export class CreditsApi extends runtime.BaseAPI {
43
43
  return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreditBalanceResponseFromJSON(jsonValue));
44
44
  }
45
45
  /**
46
- * 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.
46
+ * Returns the credits an account holds in the workspace the request acts in: the balance, and how much of it is reserved by operations that are still running. A credential that belongs to a team acts in that team, a person signed in on widgetic.com acts in the workspace they last switched to, and any other credential acts in the person\'s default workspace (the oldest workspace they own, and for the person who administers a partner, the partner\'s own workspace). 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, and read all of it (the credits of every workspace of that account together). An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads the balance of the partner\'s workspace by partner id.
47
47
  * Get an account\'s credit balance
48
48
  */
49
49
  async getUserCreditBalance(requestParameters, initOverrides) {
@@ -51,7 +51,7 @@ export class CreditsApi extends runtime.BaseAPI {
51
51
  return await response.value();
52
52
  }
53
53
  /**
54
- * 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.
54
+ * Lists the entries of an account\'s credit ledger in the workspace the request acts in, newest first: the entries a team\'s allowance and spending wrote when it is a team\'s workspace, the rest when it is the person\'s own. A credential that belongs to a team acts in that team, a person signed in on widgetic.com acts in the workspace they last switched to, and any other credential acts in the person\'s own workspace. 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 in that workspace, and the other types give what was added to it. 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, and read all of it (the entries of every workspace of that account together). `getPartnerCreditTransactions` reads the whole ledger of that account by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
55
55
  * List an account\'s credit ledger
56
56
  */
57
57
  async getUserCreditTransactionsRaw(requestParameters, initOverrides) {
@@ -82,10 +82,10 @@ export class CreditsApi extends runtime.BaseAPI {
82
82
  headers: headerParameters,
83
83
  query: queryParameters,
84
84
  }, initOverrides);
85
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerCreditTransactions200ResponseFromJSON(jsonValue));
85
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreditTransactionListResponseFromJSON(jsonValue));
86
86
  }
87
87
  /**
88
- * 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.
88
+ * Lists the entries of an account\'s credit ledger in the workspace the request acts in, newest first: the entries a team\'s allowance and spending wrote when it is a team\'s workspace, the rest when it is the person\'s own. A credential that belongs to a team acts in that team, a person signed in on widgetic.com acts in the workspace they last switched to, and any other credential acts in the person\'s own workspace. 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 in that workspace, and the other types give what was added to it. 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, and read all of it (the entries of every workspace of that account together). `getPartnerCreditTransactions` reads the whole ledger of that account by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
89
89
  * List an account\'s credit ledger
90
90
  */
91
91
  async getUserCreditTransactions(requestParameters, initOverrides) {
@@ -63,7 +63,7 @@ export class InvoicesApi extends runtime.BaseAPI {
63
63
  /**
64
64
  * @export
65
65
  */
66
- export const GetInvoicesByPartnerId0StatusEnum = {
66
+ export const GetInvoicesByPartnerIdStatusEnum = {
67
67
  Draft: 'draft',
68
68
  Open: 'open',
69
69
  Pending: 'pending',
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { CopyPartnerPresetRequestToJSON, CreateCompositionFromPresetRequestToJSON, CreateCompositionFromWidget201ResponseFromJSON, DeleteManagedUser200ResponseFromJSON, EditorSessionResponseFromJSON, GetAllManagedUsers200ResponseFromJSON, GetManagedUserLimits200ResponseFromJSON, GetManagedUserStorageUsage200ResponseFromJSON, GetManagedUsersByManagerIdResponseFromJSON, GetPartnerDesignDefaults200ResponseFromJSON, ManagedUserResponseFromJSON, ManagedUserUsageResponseFromJSON, NewEditorSessionToJSON, NewManagedUserToJSON, PartnerPresetCopyResponseFromJSON, RevokeManagedUserEditorSessionsResponseFromJSON, SetManagedUserLimitsRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, UpdateManagedUserToJSON, } from '../models/index.js';
15
+ import { CompositionResponseFromJSON, CopyPartnerPresetRequestToJSON, CreateCompositionFromPresetRequestToJSON, DesignDefaultsResponseFromJSON, EditorSessionResponseFromJSON, GetAllManagedUsers200ResponseFromJSON, GetManagedUserStorageUsage200ResponseFromJSON, GetManagedUsersByManagerIdResponseFromJSON, ManagedUserEntriesPageSuccessFromJSON, ManagedUserLimitsResponseFromJSON, ManagedUserRemovalResponseFromJSON, ManagedUserResponseFromJSON, ManagedUserUsageResponseFromJSON, NewEditorSessionToJSON, NewManagedUserToJSON, PartnerPresetCopyResponseFromJSON, RevokeManagedUserEditorSessionsResponseFromJSON, SetManagedUserLimitsRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, UpdateManagedUserToJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -98,7 +98,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
98
98
  query: queryParameters,
99
99
  body: CreateCompositionFromPresetRequestToJSON(requestParameters['createCompositionFromPresetRequest']),
100
100
  }, initOverrides);
101
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
102
102
  }
103
103
  /**
104
104
  * Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset\'s widget, in a single insert. A failure never leaves a half-made composition. The preset\'s widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget\'s file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
@@ -109,19 +109,22 @@ export class ManagedUsersApi extends runtime.BaseAPI {
109
109
  return await response.value();
110
110
  }
111
111
  /**
112
- * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget\'s repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
113
- * Create an editor session for a managed user
112
+ * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
113
+ * Create Managed User
114
114
  */
115
- async createManagedUserEditorSessionRaw(requestParameters, initOverrides) {
116
- if (requestParameters['id'] == null) {
117
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createManagedUserEditorSession().');
115
+ async createManagedUserRaw(requestParameters, initOverrides) {
116
+ if (requestParameters['idempotencyKey'] == null) {
117
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createManagedUser().');
118
118
  }
119
- if (requestParameters['newEditorSession'] == null) {
120
- throw new runtime.RequiredError('newEditorSession', 'Required parameter "newEditorSession" was null or undefined when calling createManagedUserEditorSession().');
119
+ if (requestParameters['newManagedUser'] == null) {
120
+ throw new runtime.RequiredError('newManagedUser', 'Required parameter "newManagedUser" was null or undefined when calling createManagedUser().');
121
121
  }
122
122
  const queryParameters = {};
123
123
  const headerParameters = {};
124
124
  headerParameters['Content-Type'] = 'application/json';
125
+ if (requestParameters['idempotencyKey'] != null) {
126
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
127
+ }
125
128
  if (this.configuration && this.configuration.accessToken) {
126
129
  const token = this.configuration.accessToken;
127
130
  const tokenString = await token("apiKeyAuth", []);
@@ -130,39 +133,36 @@ export class ManagedUsersApi extends runtime.BaseAPI {
130
133
  }
131
134
  }
132
135
  const response = await this.request({
133
- path: `/managed-users/{id}/editor-sessions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
136
+ path: `/managed-users`,
134
137
  method: 'POST',
135
138
  headers: headerParameters,
136
139
  query: queryParameters,
137
- body: NewEditorSessionToJSON(requestParameters['newEditorSession']),
140
+ body: NewManagedUserToJSON(requestParameters['newManagedUser']),
138
141
  }, initOverrides);
139
- return new runtime.JSONApiResponse(response, (jsonValue) => EditorSessionResponseFromJSON(jsonValue));
142
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserResponseFromJSON(jsonValue));
140
143
  }
141
144
  /**
142
- * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget\'s repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
143
- * Create an editor session for a managed user
145
+ * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
146
+ * Create Managed User
144
147
  */
145
- async createManagedUserEditorSession(requestParameters, initOverrides) {
146
- const response = await this.createManagedUserEditorSessionRaw(requestParameters, initOverrides);
148
+ async createManagedUser(requestParameters, initOverrides) {
149
+ const response = await this.createManagedUserRaw(requestParameters, initOverrides);
147
150
  return await response.value();
148
151
  }
149
152
  /**
150
- * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
151
- * Create Managed User
153
+ * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`listLlmModels`), open the widget\'s repository (`createRepository`, `getRepository`), start a generation and follow or cancel it (`generateCode`, `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`publishBuiltWidget`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is your partner workspace, the `workspaceId` the session answers with: a session has no other, and a path that names any other workspace (a team you belong to included) answers 404. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
154
+ * Create an editor session for a managed user
152
155
  */
153
- async createManagedUserRaw(requestParameters, initOverrides) {
154
- if (requestParameters['idempotencyKey'] == null) {
155
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createManagedUser().');
156
+ async createManagedUserEditorSessionRaw(requestParameters, initOverrides) {
157
+ if (requestParameters['id'] == null) {
158
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createManagedUserEditorSession().');
156
159
  }
157
- if (requestParameters['newManagedUser'] == null) {
158
- throw new runtime.RequiredError('newManagedUser', 'Required parameter "newManagedUser" was null or undefined when calling createManagedUser().');
160
+ if (requestParameters['newEditorSession'] == null) {
161
+ throw new runtime.RequiredError('newEditorSession', 'Required parameter "newEditorSession" was null or undefined when calling createManagedUserEditorSession().');
159
162
  }
160
163
  const queryParameters = {};
161
164
  const headerParameters = {};
162
165
  headerParameters['Content-Type'] = 'application/json';
163
- if (requestParameters['idempotencyKey'] != null) {
164
- headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
165
- }
166
166
  if (this.configuration && this.configuration.accessToken) {
167
167
  const token = this.configuration.accessToken;
168
168
  const tokenString = await token("apiKeyAuth", []);
@@ -171,20 +171,20 @@ export class ManagedUsersApi extends runtime.BaseAPI {
171
171
  }
172
172
  }
173
173
  const response = await this.request({
174
- path: `/managed-users`,
174
+ path: `/managed-users/{id}/editor-sessions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
175
175
  method: 'POST',
176
176
  headers: headerParameters,
177
177
  query: queryParameters,
178
- body: NewManagedUserToJSON(requestParameters['newManagedUser']),
178
+ body: NewEditorSessionToJSON(requestParameters['newEditorSession']),
179
179
  }, initOverrides);
180
- return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserResponseFromJSON(jsonValue));
180
+ return new runtime.JSONApiResponse(response, (jsonValue) => EditorSessionResponseFromJSON(jsonValue));
181
181
  }
182
182
  /**
183
- * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
184
- * Create Managed User
183
+ * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`listLlmModels`), open the widget\'s repository (`createRepository`, `getRepository`), start a generation and follow or cancel it (`generateCode`, `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`publishBuiltWidget`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is your partner workspace, the `workspaceId` the session answers with: a session has no other, and a path that names any other workspace (a team you belong to included) answers 404. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
184
+ * Create an editor session for a managed user
185
185
  */
186
- async createManagedUser(requestParameters, initOverrides) {
187
- const response = await this.createManagedUserRaw(requestParameters, initOverrides);
186
+ async createManagedUserEditorSession(requestParameters, initOverrides) {
187
+ const response = await this.createManagedUserEditorSessionRaw(requestParameters, initOverrides);
188
188
  return await response.value();
189
189
  }
190
190
  /**
@@ -210,7 +210,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
210
210
  headers: headerParameters,
211
211
  query: queryParameters,
212
212
  }, initOverrides);
213
- return new runtime.JSONApiResponse(response, (jsonValue) => DeleteManagedUser200ResponseFromJSON(jsonValue));
213
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserRemovalResponseFromJSON(jsonValue));
214
214
  }
215
215
  /**
216
216
  * Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
@@ -314,7 +314,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
314
314
  headers: headerParameters,
315
315
  query: queryParameters,
316
316
  }, initOverrides);
317
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
317
+ return new runtime.JSONApiResponse(response, (jsonValue) => DesignDefaultsResponseFromJSON(jsonValue));
318
318
  }
319
319
  /**
320
320
  * Read design defaults for one managed user
@@ -345,7 +345,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
345
345
  headers: headerParameters,
346
346
  query: queryParameters,
347
347
  }, initOverrides);
348
- return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUserLimits200ResponseFromJSON(jsonValue));
348
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserLimitsResponseFromJSON(jsonValue));
349
349
  }
350
350
  /**
351
351
  * Read monthly credit cap and usage for one managed user
@@ -466,6 +466,66 @@ export class ManagedUsersApi extends runtime.BaseAPI {
466
466
  const response = await this.getManagedUsersByManagerIdRaw(requestParameters, initOverrides);
467
467
  return await response.value();
468
468
  }
469
+ /**
470
+ * Merges eligible tables (time and id columns) across the managed user\'s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
471
+ * List entries across a managed user\'s compositions
472
+ */
473
+ async listManagedUserEntriesRaw(requestParameters, initOverrides) {
474
+ if (requestParameters['id'] == null) {
475
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listManagedUserEntries().');
476
+ }
477
+ const queryParameters = {};
478
+ if (requestParameters['compositionId'] != null) {
479
+ queryParameters['compositionId'] = requestParameters['compositionId'];
480
+ }
481
+ if (requestParameters['table'] != null) {
482
+ queryParameters['table'] = requestParameters['table'];
483
+ }
484
+ if (requestParameters['limit'] != null) {
485
+ queryParameters['limit'] = requestParameters['limit'];
486
+ }
487
+ if (requestParameters['order'] != null) {
488
+ queryParameters['order'] = requestParameters['order'];
489
+ }
490
+ if (requestParameters['since'] != null) {
491
+ queryParameters['since'] = requestParameters['since'].toISOString();
492
+ }
493
+ if (requestParameters['until'] != null) {
494
+ queryParameters['until'] = requestParameters['until'].toISOString();
495
+ }
496
+ if (requestParameters['cursor'] != null) {
497
+ queryParameters['cursor'] = requestParameters['cursor'];
498
+ }
499
+ if (requestParameters['context'] != null) {
500
+ queryParameters['context'] = requestParameters['context'];
501
+ }
502
+ if (requestParameters['filter'] != null) {
503
+ queryParameters['filter'] = requestParameters['filter'];
504
+ }
505
+ const headerParameters = {};
506
+ if (this.configuration && this.configuration.accessToken) {
507
+ const token = this.configuration.accessToken;
508
+ const tokenString = await token("apiKeyAuth", []);
509
+ if (tokenString) {
510
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
511
+ }
512
+ }
513
+ const response = await this.request({
514
+ path: `/managed-users/{id}/entries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
515
+ method: 'GET',
516
+ headers: headerParameters,
517
+ query: queryParameters,
518
+ }, initOverrides);
519
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserEntriesPageSuccessFromJSON(jsonValue));
520
+ }
521
+ /**
522
+ * Merges eligible tables (time and id columns) across the managed user\'s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
523
+ * List entries across a managed user\'s compositions
524
+ */
525
+ async listManagedUserEntries(requestParameters, initOverrides) {
526
+ const response = await this.listManagedUserEntriesRaw(requestParameters, initOverrides);
527
+ return await response.value();
528
+ }
469
529
  /**
470
530
  * Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
471
531
  * End one editor session of a managed user
@@ -492,7 +552,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
492
552
  headers: headerParameters,
493
553
  query: queryParameters,
494
554
  }, initOverrides);
495
- return new runtime.JSONApiResponse(response, (jsonValue) => DeleteManagedUser200ResponseFromJSON(jsonValue));
555
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserRemovalResponseFromJSON(jsonValue));
496
556
  }
497
557
  /**
498
558
  * Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
@@ -563,7 +623,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
563
623
  query: queryParameters,
564
624
  body: SetPartnerDesignDefaultsRequestToJSON(requestParameters['setPartnerDesignDefaultsRequest']),
565
625
  }, initOverrides);
566
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
626
+ return new runtime.JSONApiResponse(response, (jsonValue) => DesignDefaultsResponseFromJSON(jsonValue));
567
627
  }
568
628
  /**
569
629
  * Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
@@ -601,7 +661,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
601
661
  query: queryParameters,
602
662
  body: SetManagedUserLimitsRequestToJSON(requestParameters['setManagedUserLimitsRequest']),
603
663
  }, initOverrides);
604
- return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUserLimits200ResponseFromJSON(jsonValue));
664
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserLimitsResponseFromJSON(jsonValue));
605
665
  }
606
666
  /**
607
667
  * Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer\'s editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer\'s sessions spent that month (refunded credits do not count) and applies to all of the customer\'s sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
@@ -656,3 +716,10 @@ export class ManagedUsersApi extends runtime.BaseAPI {
656
716
  return await response.value();
657
717
  }
658
718
  }
719
+ /**
720
+ * @export
721
+ */
722
+ export const ListManagedUserEntriesOrderEnum = {
723
+ Asc: 'asc',
724
+ Desc: 'desc'
725
+ };
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { OperationsIdGetResponseFromJSON, } from '../models/index.js';
15
+ import { GetOperationResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -21,9 +21,9 @@ export class OperationsApi extends runtime.BaseAPI {
21
21
  * Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else\'s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
22
22
  * Get operation status
23
23
  */
24
- async operationsIdGetRaw(requestParameters, initOverrides) {
24
+ async getOperationRaw(requestParameters, initOverrides) {
25
25
  if (requestParameters['id'] == null) {
26
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling operationsIdGet().');
26
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOperation().');
27
27
  }
28
28
  const queryParameters = {};
29
29
  const headerParameters = {};
@@ -40,14 +40,14 @@ export class OperationsApi extends runtime.BaseAPI {
40
40
  headers: headerParameters,
41
41
  query: queryParameters,
42
42
  }, initOverrides);
43
- return new runtime.JSONApiResponse(response, (jsonValue) => OperationsIdGetResponseFromJSON(jsonValue));
43
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetOperationResponseFromJSON(jsonValue));
44
44
  }
45
45
  /**
46
46
  * Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else\'s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
47
47
  * Get operation status
48
48
  */
49
- async operationsIdGet(requestParameters, initOverrides) {
50
- const response = await this.operationsIdGetRaw(requestParameters, initOverrides);
49
+ async getOperation(requestParameters, initOverrides) {
50
+ const response = await this.getOperationRaw(requestParameters, initOverrides);
51
51
  return await response.value();
52
52
  }
53
53
  }
@@ -0,0 +1,168 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Widgetic API Gateway
5
+ * API documentation for the Widgetic API Gateway
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import * as runtime from '../runtime.js';
15
+ import { AddDomainRequestToJSON, AddOrganizationDomainResponseFromJSON, DeleteOrganizationDomainResponseFromJSON, GetOrganizationDomains200ResponseFromJSON, UpdateDomainRequestToJSON, UpdateOrganizationDomainResponseFromJSON, } from '../models/index.js';
16
+ /**
17
+ *
18
+ */
19
+ export class OrganizationsApi extends runtime.BaseAPI {
20
+ /**
21
+ * Adds a new domain to the workspace\'s allowed domains list for widget embedding restrictions. The list of an ordinary workspace holds at most 50 websites (a 409 says so); the home workspace of a partner has no limit, because a partner adds its customers\' websites by code.
22
+ * Add Organization Allowed Domain
23
+ */
24
+ async addOrganizationDomainRaw(requestParameters, initOverrides) {
25
+ if (requestParameters['orgId'] == null) {
26
+ throw new runtime.RequiredError('orgId', 'Required parameter "orgId" was null or undefined when calling addOrganizationDomain().');
27
+ }
28
+ if (requestParameters['addDomainRequest'] == null) {
29
+ throw new runtime.RequiredError('addDomainRequest', 'Required parameter "addDomainRequest" was null or undefined when calling addOrganizationDomain().');
30
+ }
31
+ const queryParameters = {};
32
+ const headerParameters = {};
33
+ headerParameters['Content-Type'] = 'application/json';
34
+ if (this.configuration && this.configuration.accessToken) {
35
+ const token = this.configuration.accessToken;
36
+ const tokenString = await token("apiKeyAuth", []);
37
+ if (tokenString) {
38
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
39
+ }
40
+ }
41
+ const response = await this.request({
42
+ path: `/organizations/{orgId}/domains`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))),
43
+ method: 'POST',
44
+ headers: headerParameters,
45
+ query: queryParameters,
46
+ body: AddDomainRequestToJSON(requestParameters['addDomainRequest']),
47
+ }, initOverrides);
48
+ return new runtime.JSONApiResponse(response, (jsonValue) => AddOrganizationDomainResponseFromJSON(jsonValue));
49
+ }
50
+ /**
51
+ * Adds a new domain to the workspace\'s allowed domains list for widget embedding restrictions. The list of an ordinary workspace holds at most 50 websites (a 409 says so); the home workspace of a partner has no limit, because a partner adds its customers\' websites by code.
52
+ * Add Organization Allowed Domain
53
+ */
54
+ async addOrganizationDomain(requestParameters, initOverrides) {
55
+ const response = await this.addOrganizationDomainRaw(requestParameters, initOverrides);
56
+ return await response.value();
57
+ }
58
+ /**
59
+ * Removes a domain from the organization\'s allowed domains list
60
+ * Delete Organization Allowed Domain
61
+ */
62
+ async deleteOrganizationDomainRaw(requestParameters, initOverrides) {
63
+ if (requestParameters['orgId'] == null) {
64
+ throw new runtime.RequiredError('orgId', 'Required parameter "orgId" was null or undefined when calling deleteOrganizationDomain().');
65
+ }
66
+ if (requestParameters['domainId'] == null) {
67
+ throw new runtime.RequiredError('domainId', 'Required parameter "domainId" was null or undefined when calling deleteOrganizationDomain().');
68
+ }
69
+ const queryParameters = {};
70
+ const headerParameters = {};
71
+ if (this.configuration && this.configuration.accessToken) {
72
+ const token = this.configuration.accessToken;
73
+ const tokenString = await token("apiKeyAuth", []);
74
+ if (tokenString) {
75
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
76
+ }
77
+ }
78
+ const response = await this.request({
79
+ path: `/organizations/{orgId}/domains/{domainId}`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))).replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters['domainId']))),
80
+ method: 'DELETE',
81
+ headers: headerParameters,
82
+ query: queryParameters,
83
+ }, initOverrides);
84
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteOrganizationDomainResponseFromJSON(jsonValue));
85
+ }
86
+ /**
87
+ * Removes a domain from the organization\'s allowed domains list
88
+ * Delete Organization Allowed Domain
89
+ */
90
+ async deleteOrganizationDomain(requestParameters, initOverrides) {
91
+ const response = await this.deleteOrganizationDomainRaw(requestParameters, initOverrides);
92
+ return await response.value();
93
+ }
94
+ /**
95
+ * Lists the websites on a workspace\'s own list, newest first. It is the list Widgetic checks when a widget of the workspace is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. A partner\'s home workspace also has the websites set on the partner record by Widgetic added to its list, and those are not in this answer. The answer holds the whole list, however long it is: a partner\'s list has no limit.
96
+ * Get Organization Allowed Domains
97
+ */
98
+ async getOrganizationDomainsRaw(requestParameters, initOverrides) {
99
+ if (requestParameters['orgId'] == null) {
100
+ throw new runtime.RequiredError('orgId', 'Required parameter "orgId" was null or undefined when calling getOrganizationDomains().');
101
+ }
102
+ const queryParameters = {};
103
+ const headerParameters = {};
104
+ if (this.configuration && this.configuration.accessToken) {
105
+ const token = this.configuration.accessToken;
106
+ const tokenString = await token("apiKeyAuth", []);
107
+ if (tokenString) {
108
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
109
+ }
110
+ }
111
+ const response = await this.request({
112
+ path: `/organizations/{orgId}/domains`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))),
113
+ method: 'GET',
114
+ headers: headerParameters,
115
+ query: queryParameters,
116
+ }, initOverrides);
117
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetOrganizationDomains200ResponseFromJSON(jsonValue));
118
+ }
119
+ /**
120
+ * Lists the websites on a workspace\'s own list, newest first. It is the list Widgetic checks when a widget of the workspace is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. A partner\'s home workspace also has the websites set on the partner record by Widgetic added to its list, and those are not in this answer. The answer holds the whole list, however long it is: a partner\'s list has no limit.
121
+ * Get Organization Allowed Domains
122
+ */
123
+ async getOrganizationDomains(requestParameters, initOverrides) {
124
+ const response = await this.getOrganizationDomainsRaw(requestParameters, initOverrides);
125
+ return await response.value();
126
+ }
127
+ /**
128
+ * Updates an existing domain in the organization\'s allowed domains list
129
+ * Update Organization Allowed Domain
130
+ */
131
+ async updateOrganizationDomainRaw(requestParameters, initOverrides) {
132
+ if (requestParameters['orgId'] == null) {
133
+ throw new runtime.RequiredError('orgId', 'Required parameter "orgId" was null or undefined when calling updateOrganizationDomain().');
134
+ }
135
+ if (requestParameters['domainId'] == null) {
136
+ throw new runtime.RequiredError('domainId', 'Required parameter "domainId" was null or undefined when calling updateOrganizationDomain().');
137
+ }
138
+ if (requestParameters['updateDomainRequest'] == null) {
139
+ throw new runtime.RequiredError('updateDomainRequest', 'Required parameter "updateDomainRequest" was null or undefined when calling updateOrganizationDomain().');
140
+ }
141
+ const queryParameters = {};
142
+ const headerParameters = {};
143
+ headerParameters['Content-Type'] = 'application/json';
144
+ if (this.configuration && this.configuration.accessToken) {
145
+ const token = this.configuration.accessToken;
146
+ const tokenString = await token("apiKeyAuth", []);
147
+ if (tokenString) {
148
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
149
+ }
150
+ }
151
+ const response = await this.request({
152
+ path: `/organizations/{orgId}/domains/{domainId}`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters['orgId']))).replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters['domainId']))),
153
+ method: 'PUT',
154
+ headers: headerParameters,
155
+ query: queryParameters,
156
+ body: UpdateDomainRequestToJSON(requestParameters['updateDomainRequest']),
157
+ }, initOverrides);
158
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateOrganizationDomainResponseFromJSON(jsonValue));
159
+ }
160
+ /**
161
+ * Updates an existing domain in the organization\'s allowed domains list
162
+ * Update Organization Allowed Domain
163
+ */
164
+ async updateOrganizationDomain(requestParameters, initOverrides) {
165
+ const response = await this.updateOrganizationDomainRaw(requestParameters, initOverrides);
166
+ return await response.value();
167
+ }
168
+ }