@widgetic/api-sdk-ts 1.11.111 → 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 (274) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/BrandKitApi.d.ts +42 -42
  3. package/dist/apis/BrandKitApi.js +42 -42
  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 +1 -2
  33. package/dist/apis/index.js +1 -2
  34. package/dist/esm/apis/BrandKitApi.js +41 -41
  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 +1 -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/BrandKitTokens.js +3 -0
  57. package/dist/esm/models/BrandTextStyle.js +65 -0
  58. package/dist/esm/models/Canvas.js +3 -0
  59. package/dist/esm/models/CanvasActiveOperation.js +66 -0
  60. package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
  61. package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
  62. package/dist/esm/models/CreateWidget201ResponseData.js +6 -0
  63. package/dist/esm/models/{CreateCompositionFromWidget201Response.js → DeleteOrganizationDomainResponse.js} +11 -11
  64. package/dist/esm/models/DeleteOrganizationDomainResponseData.js +41 -0
  65. package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
  66. package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
  67. package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
  68. package/dist/esm/models/EditorSession.js +4 -0
  69. package/dist/esm/models/GetOperationResponse.js +51 -0
  70. package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +12 -11
  71. package/dist/esm/models/GetOperationResponseDataMetadata.js +69 -0
  72. package/dist/esm/models/GetOrganizationDomains200Response.js +51 -0
  73. package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
  74. package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
  75. package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
  76. package/dist/esm/models/NewWidget.js +0 -1
  77. package/dist/esm/models/{PersonalWorkspaceDomain.js → OrganizationDomain.js} +12 -18
  78. package/dist/esm/models/PatchBrandKitRequest.js +3 -0
  79. package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
  80. package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
  81. package/dist/esm/models/UpdateOrganizationDomainResponse.js +51 -0
  82. package/dist/esm/models/Upload.js +2 -0
  83. package/dist/esm/models/UserApiKey.js +2 -0
  84. package/dist/esm/models/ValidateToken200ResponseData.js +3 -0
  85. package/dist/esm/models/ValidateToken200ResponseDataWorkspace.js +43 -0
  86. package/dist/esm/models/Widget.js +6 -0
  87. package/dist/esm/models/WidgetClarification.js +52 -0
  88. package/dist/esm/models/WidgetClarificationOption.js +51 -0
  89. package/dist/esm/models/WidgetClarificationQuestion.js +64 -0
  90. package/dist/esm/models/WidgetCodeChange.js +68 -0
  91. package/dist/esm/models/WidgetCodeChanges.js +48 -0
  92. package/dist/esm/models/WidgetNextStep.js +71 -0
  93. package/dist/esm/models/WidgetPlan.js +61 -0
  94. package/dist/esm/models/WidgetPlanDecisions.js +72 -0
  95. package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
  96. package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
  97. package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
  98. package/dist/esm/models/WidgetPlanTask.js +80 -0
  99. package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
  100. package/dist/esm/models/WorkflowFailureReason.js +49 -0
  101. package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
  102. package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
  103. package/dist/esm/models/WorkflowStats.js +3 -0
  104. package/dist/esm/models/index.js +43 -25
  105. package/dist/esm/runtime.js +1 -1
  106. package/dist/models/AccountCreditBalance.d.ts +2 -2
  107. package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
  108. package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
  109. package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
  110. package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
  111. package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
  112. package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
  113. package/dist/models/AdapterConnectionResponse.d.ts +46 -0
  114. package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
  115. package/dist/models/AddOrganizationDomainResponse.d.ts +46 -0
  116. package/dist/models/AddOrganizationDomainResponse.js +58 -0
  117. package/dist/models/AddOrganizationDomainResponseData.d.ts +39 -0
  118. package/dist/models/AddOrganizationDomainResponseData.js +51 -0
  119. package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
  120. package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
  121. package/dist/models/BrandKitTokens.d.ts +8 -1
  122. package/dist/models/BrandKitTokens.js +3 -0
  123. package/dist/models/BrandKitView.d.ts +1 -1
  124. package/dist/models/BrandTextStyle.d.ts +59 -0
  125. package/dist/models/BrandTextStyle.js +73 -0
  126. package/dist/models/Canvas.d.ts +7 -0
  127. package/dist/models/Canvas.js +3 -0
  128. package/dist/models/CanvasActiveOperation.d.ts +65 -0
  129. package/dist/models/CanvasActiveOperation.js +74 -0
  130. package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
  131. package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
  132. package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
  133. package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
  134. package/dist/models/CreateWidget201ResponseData.d.ts +18 -0
  135. package/dist/models/CreateWidget201ResponseData.js +6 -0
  136. package/dist/models/DeleteOrganizationDomainResponse.d.ts +46 -0
  137. package/dist/models/DeleteOrganizationDomainResponse.js +58 -0
  138. package/dist/models/DeleteOrganizationDomainResponseData.d.ts +32 -0
  139. package/dist/models/DeleteOrganizationDomainResponseData.js +48 -0
  140. package/dist/models/DeleteUpload200Response.d.ts +46 -0
  141. package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
  142. package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
  143. package/dist/models/DeleteUpload200ResponseData.js +48 -0
  144. package/dist/models/DesignDefaultsResponse.d.ts +46 -0
  145. package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
  146. package/dist/models/EditorSession.d.ts +7 -0
  147. package/dist/models/EditorSession.js +4 -0
  148. package/dist/models/GetOperationResponse.d.ts +46 -0
  149. package/dist/models/GetOperationResponse.js +58 -0
  150. package/dist/models/GetOperationResponseData.d.ts +86 -0
  151. package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
  152. package/dist/models/GetOperationResponseDataMetadata.d.ts +87 -0
  153. package/dist/models/GetOperationResponseDataMetadata.js +77 -0
  154. package/dist/models/GetOrganizationDomains200Response.d.ts +46 -0
  155. package/dist/models/GetOrganizationDomains200Response.js +58 -0
  156. package/dist/models/ListUploads200Response.d.ts +46 -0
  157. package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
  158. package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
  159. package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
  160. package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
  161. package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
  162. package/dist/models/NewEditorSession.d.ts +1 -1
  163. package/dist/models/NewWidget.d.ts +2 -3
  164. package/dist/models/NewWidget.js +0 -1
  165. package/dist/models/OrganizationDomain.d.ts +56 -0
  166. package/dist/models/OrganizationDomain.js +56 -0
  167. package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +1 -1
  168. package/dist/models/PatchBrandKitRequest.d.ts +7 -0
  169. package/dist/models/PatchBrandKitRequest.js +3 -0
  170. package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
  171. package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
  172. package/dist/models/PublicWorkflowResponse.d.ts +46 -0
  173. package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
  174. package/dist/models/UpdateOrganizationDomainResponse.d.ts +46 -0
  175. package/dist/models/UpdateOrganizationDomainResponse.js +58 -0
  176. package/dist/models/Upload.d.ts +7 -1
  177. package/dist/models/Upload.js +2 -0
  178. package/dist/models/UploadLimits.d.ts +3 -3
  179. package/dist/models/UserApiKey.d.ts +6 -0
  180. package/dist/models/UserApiKey.js +2 -0
  181. package/dist/models/ValidateToken200ResponseData.d.ts +7 -0
  182. package/dist/models/ValidateToken200ResponseData.js +3 -0
  183. package/dist/models/ValidateToken200ResponseDataWorkspace.d.ts +38 -0
  184. package/dist/models/ValidateToken200ResponseDataWorkspace.js +50 -0
  185. package/dist/models/Widget.d.ts +18 -0
  186. package/dist/models/Widget.js +6 -0
  187. package/dist/models/WidgetClarification.d.ts +45 -0
  188. package/dist/models/WidgetClarification.js +59 -0
  189. package/dist/models/WidgetClarificationOption.d.ts +44 -0
  190. package/dist/models/WidgetClarificationOption.js +58 -0
  191. package/dist/models/WidgetClarificationQuestion.d.ts +63 -0
  192. package/dist/models/WidgetClarificationQuestion.js +71 -0
  193. package/dist/models/WidgetCodeChange.d.ts +70 -0
  194. package/dist/models/WidgetCodeChange.js +76 -0
  195. package/dist/models/WidgetCodeChanges.d.ts +39 -0
  196. package/dist/models/WidgetCodeChanges.js +55 -0
  197. package/dist/models/WidgetNextStep.d.ts +69 -0
  198. package/dist/models/WidgetNextStep.js +79 -0
  199. package/dist/models/WidgetPlan.d.ts +58 -0
  200. package/dist/models/WidgetPlan.js +68 -0
  201. package/dist/models/WidgetPlanDecisions.d.ts +77 -0
  202. package/dist/models/WidgetPlanDecisions.js +79 -0
  203. package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
  204. package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
  205. package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
  206. package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
  207. package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
  208. package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
  209. package/dist/models/WidgetPlanTask.d.ts +77 -0
  210. package/dist/models/WidgetPlanTask.js +88 -0
  211. package/dist/models/WorkflowDetailAllOfLastEditedBy.d.ts +2 -2
  212. package/dist/models/WorkflowDetailResponse.d.ts +46 -0
  213. package/dist/models/WorkflowDetailResponse.js +58 -0
  214. package/dist/models/WorkflowFailureReason.d.ts +31 -0
  215. package/dist/models/WorkflowFailureReason.js +57 -0
  216. package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
  217. package/dist/models/WorkflowFailureReasonCounter.js +59 -0
  218. package/dist/models/WorkflowResponse.d.ts +46 -0
  219. package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
  220. package/dist/models/WorkflowStats.d.ts +16 -1
  221. package/dist/models/WorkflowStats.js +3 -0
  222. package/dist/models/index.d.ts +43 -25
  223. package/dist/models/index.js +43 -25
  224. package/dist/runtime.d.ts +2 -2
  225. package/dist/runtime.js +1 -1
  226. package/package.json +1 -1
  227. package/dist/apis/PartnerApi.d.ts +0 -2707
  228. package/dist/apis/PartnerApi.js +0 -7073
  229. package/dist/apis/WorkspacesApi.d.ts +0 -352
  230. package/dist/apis/WorkspacesApi.js +0 -946
  231. package/dist/esm/apis/PartnerApi.js +0 -7036
  232. package/dist/esm/apis/WorkspacesApi.js +0 -909
  233. package/dist/esm/models/DeletePersonalWorkspaceDomainResponse.js +0 -51
  234. package/dist/esm/models/DeletePersonalWorkspaceDomainResponseData.js +0 -41
  235. package/dist/esm/models/GetPersonalWorkspaceDomains200Response.js +0 -51
  236. package/dist/esm/models/PersonalWorkspaceDomainResult.js +0 -48
  237. package/dist/esm/models/PersonalWorkspaceDomainResultResponse.js +0 -51
  238. package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
  239. package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
  240. package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
  241. package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
  242. package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
  243. package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
  244. package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
  245. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
  246. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
  247. package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
  248. package/dist/models/DeletePersonalWorkspaceDomainResponse.d.ts +0 -46
  249. package/dist/models/DeletePersonalWorkspaceDomainResponse.js +0 -58
  250. package/dist/models/DeletePersonalWorkspaceDomainResponseData.d.ts +0 -32
  251. package/dist/models/DeletePersonalWorkspaceDomainResponseData.js +0 -48
  252. package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
  253. package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
  254. package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
  255. package/dist/models/GetPersonalWorkspaceDomains200Response.d.ts +0 -46
  256. package/dist/models/GetPersonalWorkspaceDomains200Response.js +0 -58
  257. package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
  258. package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
  259. package/dist/models/OperationsIdGetResponse.d.ts +0 -46
  260. package/dist/models/OperationsIdGetResponseData.d.ts +0 -88
  261. package/dist/models/PersonalWorkspaceDomain.d.ts +0 -56
  262. package/dist/models/PersonalWorkspaceDomain.js +0 -62
  263. package/dist/models/PersonalWorkspaceDomainResult.d.ts +0 -39
  264. package/dist/models/PersonalWorkspaceDomainResult.js +0 -55
  265. package/dist/models/PersonalWorkspaceDomainResultResponse.d.ts +0 -46
  266. package/dist/models/PersonalWorkspaceDomainResultResponse.js +0 -58
  267. package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
  268. package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
  269. package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
  270. package/dist/models/UploadsGet200Response.d.ts +0 -46
  271. package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
  272. package/dist/models/UploadsIdDelete200Response.js +0 -58
  273. package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
  274. package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
46
46
  };
47
47
  })();
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.UploadsPost0PurposeEnum = exports.UploadsPost0SourceEnum = exports.UploadsPost0ContextTypeEnum = exports.UploadsApi = void 0;
49
+ exports.UploadFilePurposeEnum = exports.UploadFileSourceEnum = exports.UploadFileContextTypeEnum = exports.UploadsApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -54,20 +54,14 @@ const index_1 = require("../models/index");
54
54
  */
55
55
  class UploadsApi extends runtime.BaseAPI {
56
56
  /**
57
- * The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user\'s files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget\'s upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account\'s own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
58
- * List the account\'s uploads
57
+ * Removes the stored file and the upload row. A file in Widgetic\'s own storage gives back the space it took from the storage allowance it was charged to (the team\'s shared space for a file uploaded in a team workspace); a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. A file you uploaded can always be deleted by you. A file in a team\'s workspace can also be deleted by the owner and by every active member of that team, whoever uploaded it (the files of a workspace are the whole team\'s). An upload that belongs to another account, or to a team you are not a member of, is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
58
+ * Delete an upload
59
59
  */
60
- async uploadsGetRaw(requestParameters, initOverrides) {
61
- const queryParameters = {};
62
- if (requestParameters['limit'] != null) {
63
- queryParameters['limit'] = requestParameters['limit'];
64
- }
65
- if (requestParameters['managedUserId'] != null) {
66
- queryParameters['managedUserId'] = requestParameters['managedUserId'];
67
- }
68
- if (requestParameters['managedUserExternalId'] != null) {
69
- queryParameters['managedUserExternalId'] = requestParameters['managedUserExternalId'];
60
+ async deleteUploadRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['id'] == null) {
62
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteUpload().');
70
63
  }
64
+ const queryParameters = {};
71
65
  const headerParameters = {};
72
66
  if (this.configuration && this.configuration.accessToken) {
73
67
  const token = this.configuration.accessToken;
@@ -77,28 +71,28 @@ class UploadsApi extends runtime.BaseAPI {
77
71
  }
78
72
  }
79
73
  const response = await this.request({
80
- path: `/uploads`,
81
- method: 'GET',
74
+ path: `/uploads/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
75
+ method: 'DELETE',
82
76
  headers: headerParameters,
83
77
  query: queryParameters,
84
78
  }, initOverrides);
85
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadsGet200ResponseFromJSON)(jsonValue));
79
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteUpload200ResponseFromJSON)(jsonValue));
86
80
  }
87
81
  /**
88
- * The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user\'s files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget\'s upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account\'s own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
89
- * List the account\'s uploads
82
+ * Removes the stored file and the upload row. A file in Widgetic\'s own storage gives back the space it took from the storage allowance it was charged to (the team\'s shared space for a file uploaded in a team workspace); a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. A file you uploaded can always be deleted by you. A file in a team\'s workspace can also be deleted by the owner and by every active member of that team, whoever uploaded it (the files of a workspace are the whole team\'s). An upload that belongs to another account, or to a team you are not a member of, is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
83
+ * Delete an upload
90
84
  */
91
- async uploadsGet(requestParameters = {}, initOverrides) {
92
- const response = await this.uploadsGetRaw(requestParameters, initOverrides);
85
+ async deleteUpload(requestParameters, initOverrides) {
86
+ const response = await this.deleteUploadRaw(requestParameters, initOverrides);
93
87
  return await response.value();
94
88
  }
95
89
  /**
96
- * Removes the stored file and the upload row. A file in Widgetic\'s own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
97
- * Delete an upload
90
+ * The details of one of the account\'s uploads. An upload that belongs to another account is not found.
91
+ * Get an upload by id
98
92
  */
99
- async uploadsIdDeleteRaw(requestParameters, initOverrides) {
93
+ async getUploadRaw(requestParameters, initOverrides) {
100
94
  if (requestParameters['id'] == null) {
101
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling uploadsIdDelete().');
95
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getUpload().');
102
96
  }
103
97
  const queryParameters = {};
104
98
  const headerParameters = {};
@@ -111,28 +105,25 @@ class UploadsApi extends runtime.BaseAPI {
111
105
  }
112
106
  const response = await this.request({
113
107
  path: `/uploads/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
114
- method: 'DELETE',
108
+ method: 'GET',
115
109
  headers: headerParameters,
116
110
  query: queryParameters,
117
111
  }, initOverrides);
118
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadsIdDelete200ResponseFromJSON)(jsonValue));
112
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadResponseFromJSON)(jsonValue));
119
113
  }
120
114
  /**
121
- * Removes the stored file and the upload row. A file in Widgetic\'s own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
122
- * Delete an upload
115
+ * The details of one of the account\'s uploads. An upload that belongs to another account is not found.
116
+ * Get an upload by id
123
117
  */
124
- async uploadsIdDelete(requestParameters, initOverrides) {
125
- const response = await this.uploadsIdDeleteRaw(requestParameters, initOverrides);
118
+ async getUpload(requestParameters, initOverrides) {
119
+ const response = await this.getUploadRaw(requestParameters, initOverrides);
126
120
  return await response.value();
127
121
  }
128
122
  /**
129
- * The details of one of the account\'s uploads. An upload that belongs to another account is not found.
130
- * Get an upload by id
123
+ * The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
124
+ * Upload size limits and accepted file types
131
125
  */
132
- async uploadsIdGetRaw(requestParameters, initOverrides) {
133
- if (requestParameters['id'] == null) {
134
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling uploadsIdGet().');
135
- }
126
+ async getUploadLimitsRaw(initOverrides) {
136
127
  const queryParameters = {};
137
128
  const headerParameters = {};
138
129
  if (this.configuration && this.configuration.accessToken) {
@@ -143,27 +134,36 @@ class UploadsApi extends runtime.BaseAPI {
143
134
  }
144
135
  }
145
136
  const response = await this.request({
146
- path: `/uploads/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
137
+ path: `/uploads/limits`,
147
138
  method: 'GET',
148
139
  headers: headerParameters,
149
140
  query: queryParameters,
150
141
  }, initOverrides);
151
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadResponseFromJSON)(jsonValue));
142
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadLimitsResponseFromJSON)(jsonValue));
152
143
  }
153
144
  /**
154
- * The details of one of the account\'s uploads. An upload that belongs to another account is not found.
155
- * Get an upload by id
145
+ * The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
146
+ * Upload size limits and accepted file types
156
147
  */
157
- async uploadsIdGet(requestParameters, initOverrides) {
158
- const response = await this.uploadsIdGetRaw(requestParameters, initOverrides);
148
+ async getUploadLimits(initOverrides) {
149
+ const response = await this.getUploadLimitsRaw(initOverrides);
159
150
  return await response.value();
160
151
  }
161
152
  /**
162
- * The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
163
- * Upload size limits and accepted file types
153
+ * The files of the workspace the caller works in, newest first: the workspace\'s shared files (every member\'s, and those of members who have since left). The workspace is the one a person signed in on widgetic.com switched to, or the one an API key or a connection belongs to; an editor session names none and lists the files of the account. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user\'s files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget\'s upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account\'s own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
154
+ * List the account\'s uploads
164
155
  */
165
- async uploadsLimitsGetRaw(initOverrides) {
156
+ async listUploadsRaw(requestParameters, initOverrides) {
166
157
  const queryParameters = {};
158
+ if (requestParameters['limit'] != null) {
159
+ queryParameters['limit'] = requestParameters['limit'];
160
+ }
161
+ if (requestParameters['managedUserId'] != null) {
162
+ queryParameters['managedUserId'] = requestParameters['managedUserId'];
163
+ }
164
+ if (requestParameters['managedUserExternalId'] != null) {
165
+ queryParameters['managedUserExternalId'] = requestParameters['managedUserExternalId'];
166
+ }
167
167
  const headerParameters = {};
168
168
  if (this.configuration && this.configuration.accessToken) {
169
169
  const token = this.configuration.accessToken;
@@ -173,28 +173,28 @@ class UploadsApi extends runtime.BaseAPI {
173
173
  }
174
174
  }
175
175
  const response = await this.request({
176
- path: `/uploads/limits`,
176
+ path: `/uploads`,
177
177
  method: 'GET',
178
178
  headers: headerParameters,
179
179
  query: queryParameters,
180
180
  }, initOverrides);
181
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadLimitsResponseFromJSON)(jsonValue));
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListUploads200ResponseFromJSON)(jsonValue));
182
182
  }
183
183
  /**
184
- * The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
185
- * Upload size limits and accepted file types
184
+ * The files of the workspace the caller works in, newest first: the workspace\'s shared files (every member\'s, and those of members who have since left). The workspace is the one a person signed in on widgetic.com switched to, or the one an API key or a connection belongs to; an editor session names none and lists the files of the account. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user\'s files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget\'s upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account\'s own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
185
+ * List the account\'s uploads
186
186
  */
187
- async uploadsLimitsGet(initOverrides) {
188
- const response = await this.uploadsLimitsGetRaw(initOverrides);
187
+ async listUploads(requestParameters = {}, initOverrides) {
188
+ const response = await this.listUploadsRaw(requestParameters, initOverrides);
189
189
  return await response.value();
190
190
  }
191
191
  /**
192
- * Stores one file for the account and returns its public address. This is how a user\'s own images, video and PDFs reach a widget\'s content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team\'s shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store\'s session, always work in that team\'s shared storage. A personal API key or an SDK token always uses the account\'s own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `uploadsLimitsGet` lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store\'s team\'s, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person\'s own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic\'s id for the user) or `managedUserExternalId` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user\'s files with `uploadsGet`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session\'s own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner\'s business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner\'s own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner\'s public address, and its `storage_key` is the key in the partner\'s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner\'s storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner\'s own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers\' editor sessions are kept in the partner\'s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session\'s browser is only told that the feature is not available right now.
192
+ * Stores one file for the account and returns its public address. This is how a user\'s own images, video and PDFs reach a widget\'s content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team\'s shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store\'s session, always work in that team\'s shared storage. A personal API key or an SDK token always uses the account\'s own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `getUploadLimits` lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store\'s team\'s, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person\'s own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic\'s id for the user) or `managedUserExternalId` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user\'s files with `listUploads`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session\'s own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner\'s business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner\'s own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner\'s public address, and its `storage_key` is the key in the partner\'s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner\'s storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner\'s own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers\' editor sessions are kept in the partner\'s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session\'s browser is only told that the feature is not available right now.
193
193
  * Upload a file
194
194
  */
195
- async uploadsPostRaw(requestParameters, initOverrides) {
195
+ async uploadFileRaw(requestParameters, initOverrides) {
196
196
  if (requestParameters['file'] == null) {
197
- throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadsPost().');
197
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadFile().');
198
198
  }
199
199
  const queryParameters = {};
200
200
  const headerParameters = {};
@@ -248,11 +248,11 @@ class UploadsApi extends runtime.BaseAPI {
248
248
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UploadResponseFromJSON)(jsonValue));
249
249
  }
250
250
  /**
251
- * Stores one file for the account and returns its public address. This is how a user\'s own images, video and PDFs reach a widget\'s content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team\'s shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store\'s session, always work in that team\'s shared storage. A personal API key or an SDK token always uses the account\'s own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `uploadsLimitsGet` lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store\'s team\'s, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person\'s own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic\'s id for the user) or `managedUserExternalId` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user\'s files with `uploadsGet`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session\'s own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner\'s business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner\'s own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner\'s public address, and its `storage_key` is the key in the partner\'s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner\'s storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner\'s own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers\' editor sessions are kept in the partner\'s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session\'s browser is only told that the feature is not available right now.
251
+ * Stores one file for the account and returns its public address. This is how a user\'s own images, video and PDFs reach a widget\'s content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team\'s shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store\'s session, always work in that team\'s shared storage. A personal API key or an SDK token always uses the account\'s own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `getUploadLimits` lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store\'s team\'s, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person\'s own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic\'s id for the user) or `managedUserExternalId` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user\'s files with `listUploads`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session\'s own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner\'s business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner\'s own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner\'s public address, and its `storage_key` is the key in the partner\'s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner\'s storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner\'s own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers\' editor sessions are kept in the partner\'s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session\'s browser is only told that the feature is not available right now.
252
252
  * Upload a file
253
253
  */
254
- async uploadsPost(requestParameters, initOverrides) {
255
- const response = await this.uploadsPostRaw(requestParameters, initOverrides);
254
+ async uploadFile(requestParameters, initOverrides) {
255
+ const response = await this.uploadFileRaw(requestParameters, initOverrides);
256
256
  return await response.value();
257
257
  }
258
258
  }
@@ -260,7 +260,7 @@ exports.UploadsApi = UploadsApi;
260
260
  /**
261
261
  * @export
262
262
  */
263
- exports.UploadsPost0ContextTypeEnum = {
263
+ exports.UploadFileContextTypeEnum = {
264
264
  WidgetCodegen: 'widget-codegen',
265
265
  BrowserIc: 'browser-ic',
266
266
  ContentProperty: 'content-property'
@@ -268,7 +268,7 @@ exports.UploadsPost0ContextTypeEnum = {
268
268
  /**
269
269
  * @export
270
270
  */
271
- exports.UploadsPost0SourceEnum = {
271
+ exports.UploadFileSourceEnum = {
272
272
  ChatUpload: 'chat-upload',
273
273
  ChatScreenshot: 'chat-screenshot',
274
274
  BrowserIcScreenshot: 'browser-ic-screenshot',
@@ -278,7 +278,7 @@ exports.UploadsPost0SourceEnum = {
278
278
  /**
279
279
  * @export
280
280
  */
281
- exports.UploadsPost0PurposeEnum = {
281
+ exports.UploadFilePurposeEnum = {
282
282
  Canvas: 'canvas',
283
283
  Chat: 'chat',
284
284
  Field: 'field'
@@ -10,61 +10,45 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AddDomainRequest, ConfirmAdapterConnectionRequest, CreateUserApiKeyRequest, CreatedUserApiKeyResponse, DeletePersonalWorkspaceDomainResponse, DeleteUserApiKeyResponse, GetPersonalWorkspaceDomains200Response, GetUserAdapterConnections200Response, GetUserApiKeyUsageLogsResponse, GetUserApiKeys200Response, PersonalWorkspaceDomainResultResponse, RemoveUserAdapterConnection200Response, SetAdapterConnectionRequest, SetUserAdapterConnection200Response, UpdateDomainRequest, UpdateUserApiKeyRequest, UserApiKeyResponse } from '../models/index';
14
- export interface AddPersonalWorkspaceDomain0Request {
15
- id: string;
16
- addDomainRequest: AddDomainRequest;
17
- }
18
- export interface ConfirmUserAdapterConnection0Request {
13
+ import type { AdapterConnectionListResponse, AdapterConnectionRemovalResponse, AdapterConnectionResponse, ConfirmAdapterConnectionRequest, CreateUserApiKeyRequest, CreatedUserApiKeyResponse, DeleteUserApiKeyResponse, GetUserApiKeyUsageLogsResponse, GetUserApiKeys200Response, SetAdapterConnectionRequest, UpdateUserApiKeyRequest, UserApiKeyResponse } from '../models/index';
14
+ export interface ConfirmUserAdapterConnectionRequest {
19
15
  userId: string;
20
16
  adapterId: string;
21
17
  credentialKey: string;
22
18
  confirmAdapterConnectionRequest: ConfirmAdapterConnectionRequest;
23
19
  }
24
- export interface CreateUserApiKey0Request {
20
+ export interface CreateUserApiKeyOperationRequest {
25
21
  id: string;
26
22
  idempotencyKey: string;
27
23
  createUserApiKeyRequest: CreateUserApiKeyRequest;
28
24
  }
29
- export interface DeletePersonalWorkspaceDomain0Request {
30
- id: string;
31
- domainId: string;
32
- }
33
- export interface DeleteUserApiKey0Request {
25
+ export interface DeleteUserApiKeyRequest {
34
26
  id: string;
35
27
  keyId: string;
36
28
  }
37
- export interface GetPersonalWorkspaceDomains0Request {
38
- id: string;
39
- }
40
- export interface GetUserAdapterConnections0Request {
29
+ export interface GetUserAdapterConnectionsRequest {
41
30
  userId: string;
42
31
  }
43
- export interface GetUserApiKeyUsageLogs0Request {
32
+ export interface GetUserApiKeyUsageLogsRequest {
44
33
  id: string;
45
34
  keyId: string;
46
35
  limit?: number;
47
36
  }
48
- export interface GetUserApiKeys0Request {
37
+ export interface GetUserApiKeysRequest {
49
38
  id: string;
50
39
  }
51
- export interface RemoveUserAdapterConnection0Request {
40
+ export interface RemoveUserAdapterConnectionRequest {
52
41
  userId: string;
53
42
  adapterId: string;
54
43
  credentialKey: string;
55
44
  }
56
- export interface SetUserAdapterConnection0Request {
45
+ export interface SetUserAdapterConnectionRequest {
57
46
  userId: string;
58
47
  adapterId: string;
59
48
  credentialKey: string;
60
49
  setAdapterConnectionRequest: SetAdapterConnectionRequest;
61
50
  }
62
- export interface UpdatePersonalWorkspaceDomain0Request {
63
- id: string;
64
- domainId: string;
65
- updateDomainRequest: UpdateDomainRequest;
66
- }
67
- export interface UpdateUserApiKey0Request {
51
+ export interface UpdateUserApiKeyOperationRequest {
68
52
  id: string;
69
53
  keyId: string;
70
54
  updateUserApiKeyRequest: UpdateUserApiKeyRequest;
@@ -73,134 +57,94 @@ export interface UpdateUserApiKey0Request {
73
57
  *
74
58
  */
75
59
  export declare class UsersApi extends runtime.BaseAPI {
76
- /**
77
- * Adds a website to an account\'s own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic\'s own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. So is the website where a partner your account administers integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), so there is nothing to add for it either and a list can never lock it out. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor\'s browser. It is not access control: anyone who knows a widget\'s id can still fetch its published content with a plain request that names no website. There is no limit on the list of an account that administers a partner, so a partner can add the website of each of its customers as they publish on their own domain, one call each. Any other account can list at most 50 websites, and the 51st is answered with a 409 (`BUSINESS_STATE_CONFLICT`). A wildcard such as `*.example.com` counts as one website, not one per subdomain, so use it instead of listing each subdomain. A page that frames a widget can name only so many websites to the browser (about fifty of ordinary length). Past that, the browser no longer checks the list for that page; the lookup that the Embed SDK makes for the widget still refuses every website that is not on the list.
78
- * Allow a website to show your widgets
79
- */
80
- addPersonalWorkspaceDomainRaw(requestParameters: AddPersonalWorkspaceDomain0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonalWorkspaceDomainResultResponse>>;
81
- /**
82
- * Adds a website to an account\'s own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic\'s own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. So is the website where a partner your account administers integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), so there is nothing to add for it either and a list can never lock it out. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor\'s browser. It is not access control: anyone who knows a widget\'s id can still fetch its published content with a plain request that names no website. There is no limit on the list of an account that administers a partner, so a partner can add the website of each of its customers as they publish on their own domain, one call each. Any other account can list at most 50 websites, and the 51st is answered with a 409 (`BUSINESS_STATE_CONFLICT`). A wildcard such as `*.example.com` counts as one website, not one per subdomain, so use it instead of listing each subdomain. A page that frames a widget can name only so many websites to the browser (about fifty of ordinary length). Past that, the browser no longer checks the list for that page; the lookup that the Embed SDK makes for the widget still refuses every website that is not on the list.
83
- * Allow a website to show your widgets
84
- */
85
- addPersonalWorkspaceDomain(requestParameters: AddPersonalWorkspaceDomain0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonalWorkspaceDomainResultResponse>;
86
60
  /**
87
61
  * Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one with `setUserAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
88
62
  * Confirm an adapter address with the code that was emailed to it
89
63
  */
90
- confirmUserAdapterConnectionRaw(requestParameters: ConfirmUserAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SetUserAdapterConnection200Response>>;
64
+ confirmUserAdapterConnectionRaw(requestParameters: ConfirmUserAdapterConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdapterConnectionResponse>>;
91
65
  /**
92
66
  * Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one with `setUserAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
93
67
  * Confirm an adapter address with the code that was emailed to it
94
68
  */
95
- confirmUserAdapterConnection(requestParameters: ConfirmUserAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SetUserAdapterConnection200Response>;
69
+ confirmUserAdapterConnection(requestParameters: ConfirmUserAdapterConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdapterConnectionResponse>;
96
70
  /**
97
- * Makes a new API key for an account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. Accounts with API access (Solo, Teams and partner accounts) have no limit on how many keys they hold. An account on a plan without API access cannot make one (a partner account is not asked about a plan).
71
+ * Makes a new API key for a partner (or staff) account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. A customer account does not make personal keys: a customer\'s keys are workspace keys, made in Settings, under API keys, for one workspace. They take the same presets and scopes as the ones below. A request for a customer account is refused with 403 and the code `PERSONAL_API_KEY_RETIRED`. A personal key a customer made before workspace keys replaced them keeps working until it is deleted or expires, and can still be listed, renamed, switched off and deleted here. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. A partner or staff account has no limit on how many keys it holds, and its keys name no workspace: they act as the account.
98
72
  * Create an API key
99
73
  */
100
- createUserApiKeyRaw(requestParameters: CreateUserApiKey0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatedUserApiKeyResponse>>;
74
+ createUserApiKeyRaw(requestParameters: CreateUserApiKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatedUserApiKeyResponse>>;
101
75
  /**
102
- * Makes a new API key for an account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. Accounts with API access (Solo, Teams and partner accounts) have no limit on how many keys they hold. An account on a plan without API access cannot make one (a partner account is not asked about a plan).
76
+ * Makes a new API key for a partner (or staff) account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. A customer account does not make personal keys: a customer\'s keys are workspace keys, made in Settings, under API keys, for one workspace. They take the same presets and scopes as the ones below. A request for a customer account is refused with 403 and the code `PERSONAL_API_KEY_RETIRED`. A personal key a customer made before workspace keys replaced them keeps working until it is deleted or expires, and can still be listed, renamed, switched off and deleted here. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. A partner or staff account has no limit on how many keys it holds, and its keys name no workspace: they act as the account.
103
77
  * Create an API key
104
78
  */
105
- createUserApiKey(requestParameters: CreateUserApiKey0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatedUserApiKeyResponse>;
106
- /**
107
- * Removes one entry from an account\'s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
108
- * Stop allowing a website to show your widgets
109
- */
110
- deletePersonalWorkspaceDomainRaw(requestParameters: DeletePersonalWorkspaceDomain0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeletePersonalWorkspaceDomainResponse>>;
111
- /**
112
- * Removes one entry from an account\'s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
113
- * Stop allowing a website to show your widgets
114
- */
115
- deletePersonalWorkspaceDomain(requestParameters: DeletePersonalWorkspaceDomain0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeletePersonalWorkspaceDomainResponse>;
79
+ createUserApiKey(requestParameters: CreateUserApiKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatedUserApiKeyResponse>;
116
80
  /**
117
81
  * Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with `updateUserApiKey`.
118
82
  * Delete an API key
119
83
  */
120
- deleteUserApiKeyRaw(requestParameters: DeleteUserApiKey0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteUserApiKeyResponse>>;
84
+ deleteUserApiKeyRaw(requestParameters: DeleteUserApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteUserApiKeyResponse>>;
121
85
  /**
122
86
  * Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with `updateUserApiKey`.
123
87
  * Delete an API key
124
88
  */
125
- deleteUserApiKey(requestParameters: DeleteUserApiKey0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteUserApiKeyResponse>;
126
- /**
127
- * Lists the websites on an account\'s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization\'s list instead. The answer holds the whole list, however long it is: a partner\'s list has no limit.
128
- * List the websites allowed to show your widgets
129
- */
130
- getPersonalWorkspaceDomainsRaw(requestParameters: GetPersonalWorkspaceDomains0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPersonalWorkspaceDomains200Response>>;
131
- /**
132
- * Lists the websites on an account\'s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization\'s list instead. The answer holds the whole list, however long it is: a partner\'s list has no limit.
133
- * List the websites allowed to show your widgets
134
- */
135
- getPersonalWorkspaceDomains(requestParameters: GetPersonalWorkspaceDomains0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPersonalWorkspaceDomains200Response>;
89
+ deleteUserApiKey(requestParameters: DeleteUserApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteUserApiKeyResponse>;
136
90
  /**
137
91
  * Widget adapters are capabilities a widget can use, and some of them act through a service the owner has an account with: an adapter that sends email needs the owner\'s email provider key, one that sends texts needs the owner\'s SMS provider key. This lists every key an adapter takes from an owner and whether this account has connected it, so a settings page can show what is missing. An empty list means no adapter takes a key from an owner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setUserAdapterConnection`; take it away with `removeUserAdapterConnection`. The widgets of customers a partner manages use the partner\'s keys instead (`getPartnerAdapterConnections`). The caller must be the account itself (an API key of that account works, with the `account:read` scope), or a Widgetic administrator.
138
92
  * See which adapter keys an account has connected
139
93
  */
140
- getUserAdapterConnectionsRaw(requestParameters: GetUserAdapterConnections0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserAdapterConnections200Response>>;
94
+ getUserAdapterConnectionsRaw(requestParameters: GetUserAdapterConnectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdapterConnectionListResponse>>;
141
95
  /**
142
96
  * Widget adapters are capabilities a widget can use, and some of them act through a service the owner has an account with: an adapter that sends email needs the owner\'s email provider key, one that sends texts needs the owner\'s SMS provider key. This lists every key an adapter takes from an owner and whether this account has connected it, so a settings page can show what is missing. An empty list means no adapter takes a key from an owner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setUserAdapterConnection`; take it away with `removeUserAdapterConnection`. The widgets of customers a partner manages use the partner\'s keys instead (`getPartnerAdapterConnections`). The caller must be the account itself (an API key of that account works, with the `account:read` scope), or a Widgetic administrator.
143
97
  * See which adapter keys an account has connected
144
98
  */
145
- getUserAdapterConnections(requestParameters: GetUserAdapterConnections0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserAdapterConnections200Response>;
99
+ getUserAdapterConnections(requestParameters: GetUserAdapterConnectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdapterConnectionListResponse>;
146
100
  /**
147
101
  * Lists the calls made with one key, newest first: when, which path and method, and the status each ended with. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing.
148
102
  * Read what an API key was used for
149
103
  */
150
- getUserApiKeyUsageLogsRaw(requestParameters: GetUserApiKeyUsageLogs0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserApiKeyUsageLogsResponse>>;
104
+ getUserApiKeyUsageLogsRaw(requestParameters: GetUserApiKeyUsageLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserApiKeyUsageLogsResponse>>;
151
105
  /**
152
106
  * Lists the calls made with one key, newest first: when, which path and method, and the status each ended with. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing.
153
107
  * Read what an API key was used for
154
108
  */
155
- getUserApiKeyUsageLogs(requestParameters: GetUserApiKeyUsageLogs0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserApiKeyUsageLogsResponse>;
109
+ getUserApiKeyUsageLogs(requestParameters: GetUserApiKeyUsageLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserApiKeyUsageLogsResponse>;
156
110
  /**
157
111
  * Lists the API keys of an account, in the order they were made: name, the first characters of the key, when it was made, when it expires, when it was last used, whether it is switched on and what it is limited to (`scopes` and `preset`). The secret of a key is never part of the list. A caller can list its own account\'s keys; Widgetic staff can list any account\'s.
158
112
  * List the API keys of an account
159
113
  */
160
- getUserApiKeysRaw(requestParameters: GetUserApiKeys0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserApiKeys200Response>>;
114
+ getUserApiKeysRaw(requestParameters: GetUserApiKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserApiKeys200Response>>;
161
115
  /**
162
116
  * Lists the API keys of an account, in the order they were made: name, the first characters of the key, when it was made, when it expires, when it was last used, whether it is switched on and what it is limited to (`scopes` and `preset`). The secret of a key is never part of the list. A caller can list its own account\'s keys; Widgetic staff can list any account\'s.
163
117
  * List the API keys of an account
164
118
  */
165
- getUserApiKeys(requestParameters: GetUserApiKeys0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserApiKeys200Response>;
119
+ getUserApiKeys(requestParameters: GetUserApiKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserApiKeys200Response>;
166
120
  /**
167
121
  * Removes a key an adapter was given. The adapter stops working for the widgets that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
168
122
  * Remove an adapter key from an account
169
123
  */
170
- removeUserAdapterConnectionRaw(requestParameters: RemoveUserAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RemoveUserAdapterConnection200Response>>;
124
+ removeUserAdapterConnectionRaw(requestParameters: RemoveUserAdapterConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdapterConnectionRemovalResponse>>;
171
125
  /**
172
126
  * Removes a key an adapter was given. The adapter stops working for the widgets that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
173
127
  * Remove an adapter key from an account
174
128
  */
175
- removeUserAdapterConnection(requestParameters: RemoveUserAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RemoveUserAdapterConnection200Response>;
129
+ removeUserAdapterConnection(requestParameters: RemoveUserAdapterConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdapterConnectionRemovalResponse>;
176
130
  /**
177
131
  * Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmUserAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to do. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
178
132
  * Connect an adapter key to an account
179
133
  */
180
- setUserAdapterConnectionRaw(requestParameters: SetUserAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SetUserAdapterConnection200Response>>;
134
+ setUserAdapterConnectionRaw(requestParameters: SetUserAdapterConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdapterConnectionResponse>>;
181
135
  /**
182
136
  * Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmUserAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to do. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
183
137
  * Connect an adapter key to an account
184
138
  */
185
- setUserAdapterConnection(requestParameters: SetUserAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SetUserAdapterConnection200Response>;
186
- /**
187
- * Replaces the website of one entry on an account\'s own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
188
- * Change a website on your list
189
- */
190
- updatePersonalWorkspaceDomainRaw(requestParameters: UpdatePersonalWorkspaceDomain0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonalWorkspaceDomainResultResponse>>;
191
- /**
192
- * Replaces the website of one entry on an account\'s own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
193
- * Change a website on your list
194
- */
195
- updatePersonalWorkspaceDomain(requestParameters: UpdatePersonalWorkspaceDomain0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonalWorkspaceDomainResultResponse>;
139
+ setUserAdapterConnection(requestParameters: SetUserAdapterConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdapterConnectionResponse>;
196
140
  /**
197
141
  * Renames a key, or switches it off (`isActive: false`) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code `API_KEY_SCOPE_MISSING`. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
198
142
  * Rename an API key, or switch it off or on
199
143
  */
200
- updateUserApiKeyRaw(requestParameters: UpdateUserApiKey0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserApiKeyResponse>>;
144
+ updateUserApiKeyRaw(requestParameters: UpdateUserApiKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserApiKeyResponse>>;
201
145
  /**
202
146
  * Renames a key, or switches it off (`isActive: false`) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code `API_KEY_SCOPE_MISSING`. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
203
147
  * Rename an API key, or switch it off or on
204
148
  */
205
- updateUserApiKey(requestParameters: UpdateUserApiKey0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserApiKeyResponse>;
149
+ updateUserApiKey(requestParameters: UpdateUserApiKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserApiKeyResponse>;
206
150
  }