@widgetic/api-sdk-ts 1.11.64 → 1.11.111

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 (321) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/BrandKitApi.d.ts +130 -0
  3. package/dist/apis/BrandKitApi.js +381 -0
  4. package/dist/apis/CompositionsApi.d.ts +24 -6
  5. package/dist/apis/CompositionsApi.js +73 -6
  6. package/dist/apis/ManagedUsersApi.d.ts +2 -2
  7. package/dist/apis/ManagedUsersApi.js +2 -2
  8. package/dist/apis/PartnerApi.d.ts +614 -21
  9. package/dist/apis/PartnerApi.js +1767 -169
  10. package/dist/apis/PartnersApi.d.ts +63 -5
  11. package/dist/apis/PartnersApi.js +158 -4
  12. package/dist/apis/PublicEmbedApi.d.ts +62 -7
  13. package/dist/apis/PublicEmbedApi.js +126 -6
  14. package/dist/apis/UsersApi.d.ts +19 -3
  15. package/dist/apis/UsersApi.js +46 -2
  16. package/dist/apis/WorkflowsApi.d.ts +394 -0
  17. package/dist/apis/WorkflowsApi.js +1056 -0
  18. package/dist/apis/WorkspacesApi.d.ts +352 -0
  19. package/dist/apis/WorkspacesApi.js +946 -0
  20. package/dist/apis/index.d.ts +3 -0
  21. package/dist/apis/index.js +3 -0
  22. package/dist/esm/apis/BrandKitApi.js +344 -0
  23. package/dist/esm/apis/CompositionsApi.js +73 -6
  24. package/dist/esm/apis/ManagedUsersApi.js +2 -2
  25. package/dist/esm/apis/PartnerApi.js +1767 -169
  26. package/dist/esm/apis/PartnersApi.js +159 -5
  27. package/dist/esm/apis/PublicEmbedApi.js +127 -7
  28. package/dist/esm/apis/UsersApi.js +47 -3
  29. package/dist/esm/apis/WorkflowsApi.js +1019 -0
  30. package/dist/esm/apis/WorkspacesApi.js +909 -0
  31. package/dist/esm/apis/index.js +3 -0
  32. package/dist/esm/models/AdapterConnection.js +12 -0
  33. package/dist/esm/models/BrandColor.js +64 -0
  34. package/dist/esm/models/BrandFont.js +72 -0
  35. package/dist/esm/models/BrandKitAssetView.js +96 -0
  36. package/dist/esm/models/BrandKitFigmaSource.js +59 -0
  37. package/dist/esm/models/BrandKitTokens.js +56 -0
  38. package/dist/esm/models/BrandKitTokensFonts.js +48 -0
  39. package/dist/esm/models/BrandKitView.js +75 -0
  40. package/dist/esm/models/BrandKitViewOwner.js +54 -0
  41. package/dist/esm/models/BrandKitViewResponse.js +51 -0
  42. package/dist/esm/models/BrandSpacing.js +71 -0
  43. package/dist/esm/models/Composition.js +5 -0
  44. package/dist/esm/models/CompositionLastEditedBy.js +43 -0
  45. package/dist/esm/models/ConfirmAdapterConnectionRequest.js +43 -0
  46. package/dist/esm/models/CreateWidget201ResponseData.js +2 -4
  47. package/dist/esm/models/CreateWorkspaceWorkflowFromPreset201Response.js +51 -0
  48. package/dist/esm/models/CreateWorkspaceWorkflowFromPresetRequest.js +45 -0
  49. package/dist/esm/models/CreateWorkspaceWorkflowRequest.js +47 -0
  50. package/dist/esm/models/DeleteWorkspaceWorkflow200Response.js +51 -0
  51. package/dist/esm/models/EditorSession.js +2 -1
  52. package/dist/esm/models/GetPublicCompositionEmbed200Response.js +9 -0
  53. package/dist/esm/models/GetPublicCompositionEmbed200ResponseAdapters.js +44 -0
  54. package/dist/esm/models/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.js +41 -0
  55. package/dist/esm/models/GetPublicCompositionEmbed200ResponseEntries.js +43 -0
  56. package/dist/esm/models/GetPublicCompositionEmbed200ResponseMedia.js +41 -0
  57. package/dist/esm/models/GetPublicWorkflow200Response.js +51 -0
  58. package/dist/esm/models/GetWorkspaceWorkflowStats200Response.js +51 -0
  59. package/dist/esm/models/GetWorkspaceWorkflowVersion200Response.js +51 -0
  60. package/dist/esm/models/ListPartnerWorkflowPresets200Response.js +51 -0
  61. package/dist/esm/models/ListWorkspaceWorkflowCompositionOptions200Response.js +51 -0
  62. package/dist/esm/models/ListWorkspaceWorkflowPresets200Response.js +51 -0
  63. package/dist/esm/models/ListWorkspaceWorkflowVersions200Response.js +51 -0
  64. package/dist/esm/models/ListWorkspaceWorkflows200Response.js +51 -0
  65. package/dist/esm/models/NewEditorSession.js +2 -1
  66. package/dist/esm/models/OfferWorkflowPresetRequest.js +49 -0
  67. package/dist/esm/models/OfferedWorkflowPreset.js +101 -0
  68. package/dist/esm/models/OfferedWorkflowPresetList.js +44 -0
  69. package/dist/esm/models/OfferedWorkflowPresetWidget.js +51 -0
  70. package/dist/esm/models/PartnerNotificationEventType.js +5 -1
  71. package/dist/esm/models/PatchBrandKitAssetRequest.js +68 -0
  72. package/dist/esm/models/PatchBrandKitRequest.js +54 -0
  73. package/dist/esm/models/PatchBrandKitRequestFonts.js +48 -0
  74. package/dist/esm/models/PatchBrandKitRequestSpacing.js +55 -0
  75. package/dist/esm/models/PostBrandKitIconRequest.js +47 -0
  76. package/dist/esm/models/PublicWorkflow.js +73 -0
  77. package/dist/esm/models/PublicWorkflowEventsAccepted.js +47 -0
  78. package/dist/esm/models/PublicWorkflowEventsRequest.js +53 -0
  79. package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +57 -0
  80. package/dist/esm/models/PublicWorkflowEventsRequestHeightsInner.js +47 -0
  81. package/dist/esm/models/PublicWorkflowTranslation.js +47 -0
  82. package/dist/esm/models/PublishWorkspaceWorkflow200Response.js +51 -0
  83. package/dist/esm/models/PublishWorkspaceWorkflowRequest.js +43 -0
  84. package/dist/esm/models/PutBrandKitRequest.js +49 -0
  85. package/dist/esm/models/RemovePartnerWorkflowPreset200Response.js +51 -0
  86. package/dist/esm/models/ReportPublicWorkflowEvents200Response.js +51 -0
  87. package/dist/esm/models/SaveWorkspaceWorkflow200Response.js +51 -0
  88. package/dist/esm/models/SaveWorkspaceWorkflowRequest.js +50 -0
  89. package/dist/esm/models/SetPartnerWorkflowPreset200Response.js +51 -0
  90. package/dist/esm/models/Widget.js +2 -4
  91. package/dist/esm/models/Workflow.js +96 -0
  92. package/dist/esm/models/WorkflowCompositionAction.js +53 -0
  93. package/dist/esm/models/WorkflowCompositionField.js +63 -0
  94. package/dist/esm/models/WorkflowCompositionOption.js +67 -0
  95. package/dist/esm/models/WorkflowCompositionOptionActions.js +57 -0
  96. package/dist/esm/models/WorkflowCompositionOptionInputs.js +61 -0
  97. package/dist/esm/models/WorkflowCompositionOptions.js +56 -0
  98. package/dist/esm/models/WorkflowConditionCase.js +61 -0
  99. package/dist/esm/models/WorkflowConditionTest.js +67 -0
  100. package/dist/esm/models/WorkflowCounter.js +47 -0
  101. package/dist/esm/models/WorkflowDetail.js +113 -0
  102. package/dist/esm/models/WorkflowDetailAllOfLastEditedBy.js +43 -0
  103. package/dist/esm/models/WorkflowEdge.js +55 -0
  104. package/dist/esm/models/WorkflowFieldReference.js +66 -0
  105. package/dist/esm/models/WorkflowGraph.js +59 -0
  106. package/dist/esm/models/WorkflowIssue.js +62 -0
  107. package/dist/esm/models/WorkflowList.js +56 -0
  108. package/dist/esm/models/WorkflowNode.js +68 -0
  109. package/dist/esm/models/WorkflowNodePosition.js +47 -0
  110. package/dist/esm/models/WorkflowPresetChoice.js +60 -0
  111. package/dist/esm/models/WorkflowPresetChoices.js +44 -0
  112. package/dist/esm/models/WorkflowPresetRemoval.js +43 -0
  113. package/dist/esm/models/WorkflowPresetWidget.js +47 -0
  114. package/dist/esm/models/WorkflowPublishResult.js +54 -0
  115. package/dist/esm/models/WorkflowRemoved.js +43 -0
  116. package/dist/esm/models/WorkflowSchedule.js +66 -0
  117. package/dist/esm/models/WorkflowStats.js +68 -0
  118. package/dist/esm/models/WorkflowStatus.js +48 -0
  119. package/dist/esm/models/WorkflowTrigger.js +64 -0
  120. package/dist/esm/models/WorkflowTriggerValuesInner.js +55 -0
  121. package/dist/esm/models/WorkflowVersion.js +62 -0
  122. package/dist/esm/models/WorkflowVersionDetail.js +71 -0
  123. package/dist/esm/models/WorkflowVersionList.js +44 -0
  124. package/dist/esm/models/WorkflowVersionPublishedBy.js +43 -0
  125. package/dist/esm/models/index.js +85 -0
  126. package/dist/esm/runtime.js +1 -1
  127. package/dist/models/AdapterConnection.d.ts +18 -0
  128. package/dist/models/AdapterConnection.js +12 -0
  129. package/dist/models/BrandColor.d.ts +60 -0
  130. package/dist/models/BrandColor.js +72 -0
  131. package/dist/models/BrandFont.d.ts +73 -0
  132. package/dist/models/BrandFont.js +80 -0
  133. package/dist/models/BrandKitAssetView.d.ts +130 -0
  134. package/dist/models/BrandKitAssetView.js +104 -0
  135. package/dist/models/BrandKitFigmaSource.d.ts +56 -0
  136. package/dist/models/BrandKitFigmaSource.js +66 -0
  137. package/dist/models/BrandKitTokens.d.ts +53 -0
  138. package/dist/models/BrandKitTokens.js +63 -0
  139. package/dist/models/BrandKitTokensFonts.d.ts +51 -0
  140. package/dist/models/BrandKitTokensFonts.js +55 -0
  141. package/dist/models/BrandKitView.d.ts +90 -0
  142. package/dist/models/BrandKitView.js +82 -0
  143. package/dist/models/BrandKitViewOwner.d.ts +46 -0
  144. package/dist/models/BrandKitViewOwner.js +62 -0
  145. package/dist/models/BrandKitViewResponse.d.ts +46 -0
  146. package/dist/models/BrandKitViewResponse.js +58 -0
  147. package/dist/models/BrandSpacing.d.ts +74 -0
  148. package/dist/models/BrandSpacing.js +78 -0
  149. package/dist/models/Composition.d.ts +13 -0
  150. package/dist/models/Composition.js +5 -0
  151. package/dist/models/CompositionLastEditedBy.d.ts +52 -0
  152. package/dist/models/CompositionLastEditedBy.js +50 -0
  153. package/dist/models/ConfirmAdapterConnectionRequest.d.ts +32 -0
  154. package/dist/models/ConfirmAdapterConnectionRequest.js +50 -0
  155. package/dist/models/CreateWidget201ResponseData.d.ts +2 -8
  156. package/dist/models/CreateWidget201ResponseData.js +2 -4
  157. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +46 -0
  158. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +58 -0
  159. package/dist/models/CreateWorkspaceWorkflowFromPresetRequest.d.ts +38 -0
  160. package/dist/models/CreateWorkspaceWorkflowFromPresetRequest.js +52 -0
  161. package/dist/models/CreateWorkspaceWorkflowRequest.d.ts +44 -0
  162. package/dist/models/CreateWorkspaceWorkflowRequest.js +54 -0
  163. package/dist/models/DeleteWorkspaceWorkflow200Response.d.ts +46 -0
  164. package/dist/models/DeleteWorkspaceWorkflow200Response.js +58 -0
  165. package/dist/models/EditorSession.d.ts +1 -0
  166. package/dist/models/EditorSession.js +2 -1
  167. package/dist/models/GetPublicCompositionEmbed200Response.d.ts +22 -1
  168. package/dist/models/GetPublicCompositionEmbed200Response.js +9 -0
  169. package/dist/models/GetPublicCompositionEmbed200ResponseAdapters.d.ts +39 -0
  170. package/dist/models/GetPublicCompositionEmbed200ResponseAdapters.js +51 -0
  171. package/dist/models/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.d.ts +32 -0
  172. package/dist/models/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.js +48 -0
  173. package/dist/models/GetPublicCompositionEmbed200ResponseEntries.d.ts +38 -0
  174. package/dist/models/GetPublicCompositionEmbed200ResponseEntries.js +50 -0
  175. package/dist/models/GetPublicCompositionEmbed200ResponseMedia.d.ts +32 -0
  176. package/dist/models/GetPublicCompositionEmbed200ResponseMedia.js +48 -0
  177. package/dist/models/GetPublicWorkflow200Response.d.ts +46 -0
  178. package/dist/models/GetPublicWorkflow200Response.js +58 -0
  179. package/dist/models/GetWorkspaceWorkflowStats200Response.d.ts +46 -0
  180. package/dist/models/GetWorkspaceWorkflowStats200Response.js +58 -0
  181. package/dist/models/GetWorkspaceWorkflowVersion200Response.d.ts +46 -0
  182. package/dist/models/GetWorkspaceWorkflowVersion200Response.js +58 -0
  183. package/dist/models/ListPartnerWorkflowPresets200Response.d.ts +46 -0
  184. package/dist/models/ListPartnerWorkflowPresets200Response.js +58 -0
  185. package/dist/models/ListWorkspaceWorkflowCompositionOptions200Response.d.ts +46 -0
  186. package/dist/models/ListWorkspaceWorkflowCompositionOptions200Response.js +58 -0
  187. package/dist/models/ListWorkspaceWorkflowPresets200Response.d.ts +46 -0
  188. package/dist/models/ListWorkspaceWorkflowPresets200Response.js +58 -0
  189. package/dist/models/ListWorkspaceWorkflowVersions200Response.d.ts +46 -0
  190. package/dist/models/ListWorkspaceWorkflowVersions200Response.js +58 -0
  191. package/dist/models/ListWorkspaceWorkflows200Response.d.ts +46 -0
  192. package/dist/models/ListWorkspaceWorkflows200Response.js +58 -0
  193. package/dist/models/NewComposition.d.ts +16 -3
  194. package/dist/models/NewEditorSession.d.ts +2 -1
  195. package/dist/models/NewEditorSession.js +2 -1
  196. package/dist/models/OfferWorkflowPresetRequest.d.ts +50 -0
  197. package/dist/models/OfferWorkflowPresetRequest.js +56 -0
  198. package/dist/models/OfferedWorkflowPreset.d.ts +120 -0
  199. package/dist/models/OfferedWorkflowPreset.js +109 -0
  200. package/dist/models/OfferedWorkflowPresetList.d.ts +33 -0
  201. package/dist/models/OfferedWorkflowPresetList.js +51 -0
  202. package/dist/models/OfferedWorkflowPresetWidget.d.ts +44 -0
  203. package/dist/models/OfferedWorkflowPresetWidget.js +58 -0
  204. package/dist/models/PartnerNotification.d.ts +1 -1
  205. package/dist/models/PartnerNotificationEventType.d.ts +4 -0
  206. package/dist/models/PartnerNotificationEventType.js +5 -1
  207. package/dist/models/PatchBrandKitAssetRequest.d.ts +73 -0
  208. package/dist/models/PatchBrandKitAssetRequest.js +76 -0
  209. package/dist/models/PatchBrandKitRequest.d.ts +65 -0
  210. package/dist/models/PatchBrandKitRequest.js +61 -0
  211. package/dist/models/PatchBrandKitRequestFonts.d.ts +51 -0
  212. package/dist/models/PatchBrandKitRequestFonts.js +55 -0
  213. package/dist/models/PatchBrandKitRequestSpacing.d.ts +74 -0
  214. package/dist/models/PatchBrandKitRequestSpacing.js +62 -0
  215. package/dist/models/PostBrandKitIconRequest.d.ts +38 -0
  216. package/dist/models/PostBrandKitIconRequest.js +54 -0
  217. package/dist/models/PublicWorkflow.d.ts +109 -0
  218. package/dist/models/PublicWorkflow.js +81 -0
  219. package/dist/models/PublicWorkflowEventsAccepted.d.ts +44 -0
  220. package/dist/models/PublicWorkflowEventsAccepted.js +54 -0
  221. package/dist/models/PublicWorkflowEventsRequest.d.ts +59 -0
  222. package/dist/models/PublicWorkflowEventsRequest.js +60 -0
  223. package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +53 -0
  224. package/dist/models/PublicWorkflowEventsRequestEventsInner.js +65 -0
  225. package/dist/models/PublicWorkflowEventsRequestHeightsInner.d.ts +38 -0
  226. package/dist/models/PublicWorkflowEventsRequestHeightsInner.js +54 -0
  227. package/dist/models/PublicWorkflowTranslation.d.ts +40 -0
  228. package/dist/models/PublicWorkflowTranslation.js +54 -0
  229. package/dist/models/PublishWorkspaceWorkflow200Response.d.ts +46 -0
  230. package/dist/models/PublishWorkspaceWorkflow200Response.js +58 -0
  231. package/dist/models/PublishWorkspaceWorkflowRequest.d.ts +32 -0
  232. package/dist/models/PublishWorkspaceWorkflowRequest.js +50 -0
  233. package/dist/models/PutBrandKitRequest.d.ts +46 -0
  234. package/dist/models/PutBrandKitRequest.js +56 -0
  235. package/dist/models/RemovePartnerWorkflowPreset200Response.d.ts +46 -0
  236. package/dist/models/RemovePartnerWorkflowPreset200Response.js +58 -0
  237. package/dist/models/ReportPublicWorkflowEvents200Response.d.ts +46 -0
  238. package/dist/models/ReportPublicWorkflowEvents200Response.js +58 -0
  239. package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +46 -0
  240. package/dist/models/SaveWorkspaceWorkflow200Response.js +58 -0
  241. package/dist/models/SaveWorkspaceWorkflowRequest.d.ts +51 -0
  242. package/dist/models/SaveWorkspaceWorkflowRequest.js +57 -0
  243. package/dist/models/SetAdapterConnectionRequest.d.ts +1 -1
  244. package/dist/models/SetPartnerWorkflowPreset200Response.d.ts +46 -0
  245. package/dist/models/SetPartnerWorkflowPreset200Response.js +58 -0
  246. package/dist/models/UpdateComposition.d.ts +3 -1
  247. package/dist/models/Widget.d.ts +2 -8
  248. package/dist/models/Widget.js +2 -4
  249. package/dist/models/Workflow.d.ts +133 -0
  250. package/dist/models/Workflow.js +103 -0
  251. package/dist/models/WorkflowCompositionAction.d.ts +52 -0
  252. package/dist/models/WorkflowCompositionAction.js +60 -0
  253. package/dist/models/WorkflowCompositionField.d.ts +59 -0
  254. package/dist/models/WorkflowCompositionField.js +71 -0
  255. package/dist/models/WorkflowCompositionOption.d.ts +73 -0
  256. package/dist/models/WorkflowCompositionOption.js +74 -0
  257. package/dist/models/WorkflowCompositionOptionActions.d.ts +55 -0
  258. package/dist/models/WorkflowCompositionOptionActions.js +65 -0
  259. package/dist/models/WorkflowCompositionOptionInputs.d.ts +64 -0
  260. package/dist/models/WorkflowCompositionOptionInputs.js +69 -0
  261. package/dist/models/WorkflowCompositionOptions.d.ts +51 -0
  262. package/dist/models/WorkflowCompositionOptions.js +63 -0
  263. package/dist/models/WorkflowConditionCase.d.ts +61 -0
  264. package/dist/models/WorkflowConditionCase.js +69 -0
  265. package/dist/models/WorkflowConditionTest.d.ts +68 -0
  266. package/dist/models/WorkflowConditionTest.js +75 -0
  267. package/dist/models/WorkflowCounter.d.ts +38 -0
  268. package/dist/models/WorkflowCounter.js +54 -0
  269. package/dist/models/WorkflowDetail.d.ts +166 -0
  270. package/dist/models/WorkflowDetail.js +120 -0
  271. package/dist/models/WorkflowDetailAllOfLastEditedBy.d.ts +42 -0
  272. package/dist/models/WorkflowDetailAllOfLastEditedBy.js +50 -0
  273. package/dist/models/WorkflowEdge.d.ts +50 -0
  274. package/dist/models/WorkflowEdge.js +62 -0
  275. package/dist/models/WorkflowFieldReference.d.ts +63 -0
  276. package/dist/models/WorkflowFieldReference.js +74 -0
  277. package/dist/models/WorkflowGraph.d.ts +53 -0
  278. package/dist/models/WorkflowGraph.js +67 -0
  279. package/dist/models/WorkflowIssue.d.ts +72 -0
  280. package/dist/models/WorkflowIssue.js +70 -0
  281. package/dist/models/WorkflowList.d.ts +51 -0
  282. package/dist/models/WorkflowList.js +63 -0
  283. package/dist/models/WorkflowNode.d.ts +83 -0
  284. package/dist/models/WorkflowNode.js +76 -0
  285. package/dist/models/WorkflowNodePosition.d.ts +38 -0
  286. package/dist/models/WorkflowNodePosition.js +54 -0
  287. package/dist/models/WorkflowPresetChoice.d.ts +60 -0
  288. package/dist/models/WorkflowPresetChoice.js +67 -0
  289. package/dist/models/WorkflowPresetChoices.d.ts +33 -0
  290. package/dist/models/WorkflowPresetChoices.js +51 -0
  291. package/dist/models/WorkflowPresetRemoval.d.ts +32 -0
  292. package/dist/models/WorkflowPresetRemoval.js +50 -0
  293. package/dist/models/WorkflowPresetWidget.d.ts +38 -0
  294. package/dist/models/WorkflowPresetWidget.js +54 -0
  295. package/dist/models/WorkflowPublishResult.d.ts +47 -0
  296. package/dist/models/WorkflowPublishResult.js +61 -0
  297. package/dist/models/WorkflowRemoved.d.ts +32 -0
  298. package/dist/models/WorkflowRemoved.js +50 -0
  299. package/dist/models/WorkflowSchedule.d.ts +69 -0
  300. package/dist/models/WorkflowSchedule.js +74 -0
  301. package/dist/models/WorkflowStats.d.ts +77 -0
  302. package/dist/models/WorkflowStats.js +75 -0
  303. package/dist/models/WorkflowStatus.d.ts +30 -0
  304. package/dist/models/WorkflowStatus.js +56 -0
  305. package/dist/models/WorkflowTrigger.d.ts +77 -0
  306. package/dist/models/WorkflowTrigger.js +72 -0
  307. package/dist/models/WorkflowTriggerValuesInner.d.ts +47 -0
  308. package/dist/models/WorkflowTriggerValuesInner.js +63 -0
  309. package/dist/models/WorkflowVersion.d.ts +63 -0
  310. package/dist/models/WorkflowVersion.js +69 -0
  311. package/dist/models/WorkflowVersionDetail.d.ts +76 -0
  312. package/dist/models/WorkflowVersionDetail.js +78 -0
  313. package/dist/models/WorkflowVersionList.d.ts +33 -0
  314. package/dist/models/WorkflowVersionList.js +51 -0
  315. package/dist/models/WorkflowVersionPublishedBy.d.ts +38 -0
  316. package/dist/models/WorkflowVersionPublishedBy.js +50 -0
  317. package/dist/models/index.d.ts +85 -0
  318. package/dist/models/index.js +85 -0
  319. package/dist/runtime.d.ts +2 -2
  320. package/dist/runtime.js +1 -1
  321. package/package.json +2 -2
package/README.md CHANGED
@@ -14,7 +14,7 @@ Each group of calls is a class: `PartnerApi` (every call a partner integration u
14
14
  npm install @widgetic/api-sdk-ts
15
15
  ```
16
16
 
17
- It works in Node.js 18 or later (CommonJS and ESM), in bundlers, and in browsers (ESM), because it uses `fetch`.
17
+ It works in Node.js 26.12.1 or later (CommonJS and ESM), in bundlers, and in browsers (ESM), because it uses `fetch`.
18
18
 
19
19
  An API key is a password. Use it from your server, never from code that runs in a browser.
20
20
 
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { BrandKitViewResponse, PatchBrandKitAssetRequest, PatchBrandKitRequest, PostBrandKitIconRequest, PutBrandKitRequest } from '../models/index';
14
+ export interface DeleteBrandKitAsset0Request {
15
+ assetId: string;
16
+ organizationId?: string;
17
+ }
18
+ export interface DeleteBrandKit0Request {
19
+ organizationId?: string;
20
+ }
21
+ export interface GetBrandKit0Request {
22
+ organizationId?: string;
23
+ }
24
+ export interface PatchBrandKitAsset0Request {
25
+ assetId: string;
26
+ patchBrandKitAssetRequest: PatchBrandKitAssetRequest;
27
+ organizationId?: string;
28
+ }
29
+ export interface PatchBrandKit0Request {
30
+ patchBrandKitRequest: PatchBrandKitRequest;
31
+ organizationId?: string;
32
+ }
33
+ export interface PostBrandKitFont0Request {
34
+ file: Blob;
35
+ family: string;
36
+ weight: number;
37
+ organizationId?: string;
38
+ style?: PostBrandKitFont0StyleEnum;
39
+ }
40
+ export interface PostBrandKitIcon0Request {
41
+ postBrandKitIconRequest: PostBrandKitIconRequest;
42
+ organizationId?: string;
43
+ }
44
+ export interface PutBrandKit0Request {
45
+ putBrandKitRequest: PutBrandKitRequest;
46
+ organizationId?: string;
47
+ }
48
+ /**
49
+ *
50
+ */
51
+ export declare class BrandKitApi extends runtime.BaseAPI {
52
+ /**
53
+ * Remove a font or icon from the Brand Kit
54
+ */
55
+ deleteBrandKitAssetRaw(requestParameters: DeleteBrandKitAsset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
56
+ /**
57
+ * Remove a font or icon from the Brand Kit
58
+ */
59
+ deleteBrandKitAsset(requestParameters: DeleteBrandKitAsset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
60
+ /**
61
+ * Reset the Brand Kit to the default
62
+ */
63
+ deleteBrandKitRaw(requestParameters: DeleteBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
64
+ /**
65
+ * Reset the Brand Kit to the default
66
+ */
67
+ deleteBrandKit(requestParameters?: DeleteBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
68
+ /**
69
+ * The colors, fonts, icons, corner radius and style notes every widget made by this account is generated with. An account that never saved a kit gets Widgetic\'s default one (`isDefault` is true). A partner account\'s kit is the default for everything its keys create, and a key reads and changes the kit of the account it belongs to; there is no kit per managed user.
70
+ * The Brand Kit of the current workspace
71
+ */
72
+ getBrandKitRaw(requestParameters: GetBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
73
+ /**
74
+ * The colors, fonts, icons, corner radius and style notes every widget made by this account is generated with. An account that never saved a kit gets Widgetic\'s default one (`isDefault` is true). A partner account\'s kit is the default for everything its keys create, and a key reads and changes the kit of the account it belongs to; there is no kit per managed user.
75
+ * The Brand Kit of the current workspace
76
+ */
77
+ getBrandKit(requestParameters?: GetBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
78
+ /**
79
+ * Rename an icon or relabel a font variant
80
+ */
81
+ patchBrandKitAssetRaw(requestParameters: PatchBrandKitAsset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
82
+ /**
83
+ * Rename an icon or relabel a font variant
84
+ */
85
+ patchBrandKitAsset(requestParameters: PatchBrandKitAsset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
86
+ /**
87
+ * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
88
+ * Change part of the Brand Kit
89
+ */
90
+ patchBrandKitRaw(requestParameters: PatchBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
91
+ /**
92
+ * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
93
+ * Change part of the Brand Kit
94
+ */
95
+ patchBrandKit(requestParameters: PatchBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
96
+ /**
97
+ * Upload a font file to the Brand Kit
98
+ */
99
+ postBrandKitFontRaw(requestParameters: PostBrandKitFont0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
100
+ /**
101
+ * Upload a font file to the Brand Kit
102
+ */
103
+ postBrandKitFont(requestParameters: PostBrandKitFont0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
104
+ /**
105
+ * Add a named SVG icon to the Brand Kit
106
+ */
107
+ postBrandKitIconRaw(requestParameters: PostBrandKitIcon0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
108
+ /**
109
+ * Add a named SVG icon to the Brand Kit
110
+ */
111
+ postBrandKitIcon(requestParameters: PostBrandKitIcon0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
112
+ /**
113
+ * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
114
+ * Save Brand Kit tokens
115
+ */
116
+ putBrandKitRaw(requestParameters: PutBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
117
+ /**
118
+ * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
119
+ * Save Brand Kit tokens
120
+ */
121
+ putBrandKit(requestParameters: PutBrandKit0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
122
+ }
123
+ /**
124
+ * @export
125
+ */
126
+ export declare const PostBrandKitFont0StyleEnum: {
127
+ readonly Normal: 'normal';
128
+ readonly Italic: 'italic';
129
+ };
130
+ export type PostBrandKitFont0StyleEnum = typeof PostBrandKitFont0StyleEnum[keyof typeof PostBrandKitFont0StyleEnum];
@@ -0,0 +1,381 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Widgetic API Gateway
6
+ * API documentation for the Widgetic API Gateway
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.PostBrandKitFont0StyleEnum = exports.BrandKitApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class BrandKitApi extends runtime.BaseAPI {
56
+ /**
57
+ * Remove a font or icon from the Brand Kit
58
+ */
59
+ async deleteBrandKitAssetRaw(requestParameters, initOverrides) {
60
+ if (requestParameters['assetId'] == null) {
61
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling deleteBrandKitAsset().');
62
+ }
63
+ const queryParameters = {};
64
+ if (requestParameters['organizationId'] != null) {
65
+ queryParameters['organizationId'] = requestParameters['organizationId'];
66
+ }
67
+ const headerParameters = {};
68
+ if (this.configuration && this.configuration.accessToken) {
69
+ const token = this.configuration.accessToken;
70
+ const tokenString = await token("apiKeyAuth", []);
71
+ if (tokenString) {
72
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
73
+ }
74
+ }
75
+ const response = await this.request({
76
+ path: `/brand-kit/assets/{assetId}`.replace(`{${"assetId"}}`, encodeURIComponent(String(requestParameters['assetId']))),
77
+ method: 'DELETE',
78
+ headers: headerParameters,
79
+ query: queryParameters,
80
+ }, initOverrides);
81
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
82
+ }
83
+ /**
84
+ * Remove a font or icon from the Brand Kit
85
+ */
86
+ async deleteBrandKitAsset(requestParameters, initOverrides) {
87
+ const response = await this.deleteBrandKitAssetRaw(requestParameters, initOverrides);
88
+ return await response.value();
89
+ }
90
+ /**
91
+ * Reset the Brand Kit to the default
92
+ */
93
+ async deleteBrandKitRaw(requestParameters, initOverrides) {
94
+ const queryParameters = {};
95
+ if (requestParameters['organizationId'] != null) {
96
+ queryParameters['organizationId'] = requestParameters['organizationId'];
97
+ }
98
+ const headerParameters = {};
99
+ if (this.configuration && this.configuration.accessToken) {
100
+ const token = this.configuration.accessToken;
101
+ const tokenString = await token("apiKeyAuth", []);
102
+ if (tokenString) {
103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
104
+ }
105
+ }
106
+ const response = await this.request({
107
+ path: `/brand-kit`,
108
+ method: 'DELETE',
109
+ headers: headerParameters,
110
+ query: queryParameters,
111
+ }, initOverrides);
112
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
113
+ }
114
+ /**
115
+ * Reset the Brand Kit to the default
116
+ */
117
+ async deleteBrandKit(requestParameters = {}, initOverrides) {
118
+ const response = await this.deleteBrandKitRaw(requestParameters, initOverrides);
119
+ return await response.value();
120
+ }
121
+ /**
122
+ * The colors, fonts, icons, corner radius and style notes every widget made by this account is generated with. An account that never saved a kit gets Widgetic\'s default one (`isDefault` is true). A partner account\'s kit is the default for everything its keys create, and a key reads and changes the kit of the account it belongs to; there is no kit per managed user.
123
+ * The Brand Kit of the current workspace
124
+ */
125
+ async getBrandKitRaw(requestParameters, initOverrides) {
126
+ const queryParameters = {};
127
+ if (requestParameters['organizationId'] != null) {
128
+ queryParameters['organizationId'] = requestParameters['organizationId'];
129
+ }
130
+ const headerParameters = {};
131
+ if (this.configuration && this.configuration.accessToken) {
132
+ const token = this.configuration.accessToken;
133
+ const tokenString = await token("apiKeyAuth", []);
134
+ if (tokenString) {
135
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
136
+ }
137
+ }
138
+ const response = await this.request({
139
+ path: `/brand-kit`,
140
+ method: 'GET',
141
+ headers: headerParameters,
142
+ query: queryParameters,
143
+ }, initOverrides);
144
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
145
+ }
146
+ /**
147
+ * The colors, fonts, icons, corner radius and style notes every widget made by this account is generated with. An account that never saved a kit gets Widgetic\'s default one (`isDefault` is true). A partner account\'s kit is the default for everything its keys create, and a key reads and changes the kit of the account it belongs to; there is no kit per managed user.
148
+ * The Brand Kit of the current workspace
149
+ */
150
+ async getBrandKit(requestParameters = {}, initOverrides) {
151
+ const response = await this.getBrandKitRaw(requestParameters, initOverrides);
152
+ return await response.value();
153
+ }
154
+ /**
155
+ * Rename an icon or relabel a font variant
156
+ */
157
+ async patchBrandKitAssetRaw(requestParameters, initOverrides) {
158
+ if (requestParameters['assetId'] == null) {
159
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling patchBrandKitAsset().');
160
+ }
161
+ if (requestParameters['patchBrandKitAssetRequest'] == null) {
162
+ throw new runtime.RequiredError('patchBrandKitAssetRequest', 'Required parameter "patchBrandKitAssetRequest" was null or undefined when calling patchBrandKitAsset().');
163
+ }
164
+ const queryParameters = {};
165
+ if (requestParameters['organizationId'] != null) {
166
+ queryParameters['organizationId'] = requestParameters['organizationId'];
167
+ }
168
+ const headerParameters = {};
169
+ headerParameters['Content-Type'] = 'application/json';
170
+ if (this.configuration && this.configuration.accessToken) {
171
+ const token = this.configuration.accessToken;
172
+ const tokenString = await token("apiKeyAuth", []);
173
+ if (tokenString) {
174
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
175
+ }
176
+ }
177
+ const response = await this.request({
178
+ path: `/brand-kit/assets/{assetId}`.replace(`{${"assetId"}}`, encodeURIComponent(String(requestParameters['assetId']))),
179
+ method: 'PATCH',
180
+ headers: headerParameters,
181
+ query: queryParameters,
182
+ body: (0, index_1.PatchBrandKitAssetRequestToJSON)(requestParameters['patchBrandKitAssetRequest']),
183
+ }, initOverrides);
184
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
185
+ }
186
+ /**
187
+ * Rename an icon or relabel a font variant
188
+ */
189
+ async patchBrandKitAsset(requestParameters, initOverrides) {
190
+ const response = await this.patchBrandKitAssetRaw(requestParameters, initOverrides);
191
+ return await response.value();
192
+ }
193
+ /**
194
+ * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
195
+ * Change part of the Brand Kit
196
+ */
197
+ async patchBrandKitRaw(requestParameters, initOverrides) {
198
+ if (requestParameters['patchBrandKitRequest'] == null) {
199
+ throw new runtime.RequiredError('patchBrandKitRequest', 'Required parameter "patchBrandKitRequest" was null or undefined when calling patchBrandKit().');
200
+ }
201
+ const queryParameters = {};
202
+ if (requestParameters['organizationId'] != null) {
203
+ queryParameters['organizationId'] = requestParameters['organizationId'];
204
+ }
205
+ const headerParameters = {};
206
+ headerParameters['Content-Type'] = 'application/json';
207
+ if (this.configuration && this.configuration.accessToken) {
208
+ const token = this.configuration.accessToken;
209
+ const tokenString = await token("apiKeyAuth", []);
210
+ if (tokenString) {
211
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
212
+ }
213
+ }
214
+ const response = await this.request({
215
+ path: `/brand-kit`,
216
+ method: 'PATCH',
217
+ headers: headerParameters,
218
+ query: queryParameters,
219
+ body: (0, index_1.PatchBrandKitRequestToJSON)(requestParameters['patchBrandKitRequest']),
220
+ }, initOverrides);
221
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
222
+ }
223
+ /**
224
+ * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
225
+ * Change part of the Brand Kit
226
+ */
227
+ async patchBrandKit(requestParameters, initOverrides) {
228
+ const response = await this.patchBrandKitRaw(requestParameters, initOverrides);
229
+ return await response.value();
230
+ }
231
+ /**
232
+ * Upload a font file to the Brand Kit
233
+ */
234
+ async postBrandKitFontRaw(requestParameters, initOverrides) {
235
+ if (requestParameters['file'] == null) {
236
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postBrandKitFont().');
237
+ }
238
+ if (requestParameters['family'] == null) {
239
+ throw new runtime.RequiredError('family', 'Required parameter "family" was null or undefined when calling postBrandKitFont().');
240
+ }
241
+ if (requestParameters['weight'] == null) {
242
+ throw new runtime.RequiredError('weight', 'Required parameter "weight" was null or undefined when calling postBrandKitFont().');
243
+ }
244
+ const queryParameters = {};
245
+ if (requestParameters['organizationId'] != null) {
246
+ queryParameters['organizationId'] = requestParameters['organizationId'];
247
+ }
248
+ const headerParameters = {};
249
+ if (this.configuration && this.configuration.accessToken) {
250
+ const token = this.configuration.accessToken;
251
+ const tokenString = await token("apiKeyAuth", []);
252
+ if (tokenString) {
253
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
254
+ }
255
+ }
256
+ const consumes = [
257
+ { contentType: 'multipart/form-data' },
258
+ ];
259
+ // @ts-ignore: canConsumeForm may be unused
260
+ const canConsumeForm = runtime.canConsumeForm(consumes);
261
+ let formParams;
262
+ let useForm = false;
263
+ // use FormData to transmit files using content-type "multipart/form-data"
264
+ useForm = canConsumeForm;
265
+ if (useForm) {
266
+ formParams = new FormData();
267
+ }
268
+ else {
269
+ formParams = new URLSearchParams();
270
+ }
271
+ if (requestParameters['file'] != null) {
272
+ formParams.append('file', requestParameters['file']);
273
+ }
274
+ if (requestParameters['family'] != null) {
275
+ formParams.append('family', requestParameters['family']);
276
+ }
277
+ if (requestParameters['weight'] != null) {
278
+ formParams.append('weight', requestParameters['weight']);
279
+ }
280
+ if (requestParameters['style'] != null) {
281
+ formParams.append('style', requestParameters['style']);
282
+ }
283
+ const response = await this.request({
284
+ path: `/brand-kit/fonts`,
285
+ method: 'POST',
286
+ headers: headerParameters,
287
+ query: queryParameters,
288
+ body: formParams,
289
+ }, initOverrides);
290
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
291
+ }
292
+ /**
293
+ * Upload a font file to the Brand Kit
294
+ */
295
+ async postBrandKitFont(requestParameters, initOverrides) {
296
+ const response = await this.postBrandKitFontRaw(requestParameters, initOverrides);
297
+ return await response.value();
298
+ }
299
+ /**
300
+ * Add a named SVG icon to the Brand Kit
301
+ */
302
+ async postBrandKitIconRaw(requestParameters, initOverrides) {
303
+ if (requestParameters['postBrandKitIconRequest'] == null) {
304
+ throw new runtime.RequiredError('postBrandKitIconRequest', 'Required parameter "postBrandKitIconRequest" was null or undefined when calling postBrandKitIcon().');
305
+ }
306
+ const queryParameters = {};
307
+ if (requestParameters['organizationId'] != null) {
308
+ queryParameters['organizationId'] = requestParameters['organizationId'];
309
+ }
310
+ const headerParameters = {};
311
+ headerParameters['Content-Type'] = 'application/json';
312
+ if (this.configuration && this.configuration.accessToken) {
313
+ const token = this.configuration.accessToken;
314
+ const tokenString = await token("apiKeyAuth", []);
315
+ if (tokenString) {
316
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
317
+ }
318
+ }
319
+ const response = await this.request({
320
+ path: `/brand-kit/icons`,
321
+ method: 'POST',
322
+ headers: headerParameters,
323
+ query: queryParameters,
324
+ body: (0, index_1.PostBrandKitIconRequestToJSON)(requestParameters['postBrandKitIconRequest']),
325
+ }, initOverrides);
326
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
327
+ }
328
+ /**
329
+ * Add a named SVG icon to the Brand Kit
330
+ */
331
+ async postBrandKitIcon(requestParameters, initOverrides) {
332
+ const response = await this.postBrandKitIconRaw(requestParameters, initOverrides);
333
+ return await response.value();
334
+ }
335
+ /**
336
+ * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
337
+ * Save Brand Kit tokens
338
+ */
339
+ async putBrandKitRaw(requestParameters, initOverrides) {
340
+ if (requestParameters['putBrandKitRequest'] == null) {
341
+ throw new runtime.RequiredError('putBrandKitRequest', 'Required parameter "putBrandKitRequest" was null or undefined when calling putBrandKit().');
342
+ }
343
+ const queryParameters = {};
344
+ if (requestParameters['organizationId'] != null) {
345
+ queryParameters['organizationId'] = requestParameters['organizationId'];
346
+ }
347
+ const headerParameters = {};
348
+ headerParameters['Content-Type'] = 'application/json';
349
+ if (this.configuration && this.configuration.accessToken) {
350
+ const token = this.configuration.accessToken;
351
+ const tokenString = await token("apiKeyAuth", []);
352
+ if (tokenString) {
353
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
354
+ }
355
+ }
356
+ const response = await this.request({
357
+ path: `/brand-kit`,
358
+ method: 'PUT',
359
+ headers: headerParameters,
360
+ query: queryParameters,
361
+ body: (0, index_1.PutBrandKitRequestToJSON)(requestParameters['putBrandKitRequest']),
362
+ }, initOverrides);
363
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
364
+ }
365
+ /**
366
+ * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
367
+ * Save Brand Kit tokens
368
+ */
369
+ async putBrandKit(requestParameters, initOverrides) {
370
+ const response = await this.putBrandKitRaw(requestParameters, initOverrides);
371
+ return await response.value();
372
+ }
373
+ }
374
+ exports.BrandKitApi = BrandKitApi;
375
+ /**
376
+ * @export
377
+ */
378
+ exports.PostBrandKitFont0StyleEnum = {
379
+ Normal: 'normal',
380
+ Italic: 'italic'
381
+ };
@@ -17,6 +17,13 @@ export interface AddAiAnswersKnowledgeDocument0Request {
17
17
  xManagedUserId?: string;
18
18
  xManagedUserExternalId?: string;
19
19
  }
20
+ export interface AddAiAnswersKnowledgeFile0Request {
21
+ id: string;
22
+ file: Blob;
23
+ xManagedUserId?: string;
24
+ xManagedUserExternalId?: string;
25
+ title?: string;
26
+ }
20
27
  export interface CheckCompositionAccess0Request {
21
28
  id: string;
22
29
  }
@@ -237,6 +244,7 @@ export interface UpdateComposition0Request {
237
244
  id: string;
238
245
  idempotencyKey: string;
239
246
  updateComposition: UpdateComposition;
247
+ ifMatch?: string;
240
248
  xManagedUserId?: string;
241
249
  xManagedUserExternalId?: string;
242
250
  }
@@ -254,15 +262,25 @@ export interface ValidateCompositionContent0Request {
254
262
  */
255
263
  export declare class CompositionsApi extends runtime.BaseAPI {
256
264
  /**
257
- * Gives the widget\'s AI a document to answer visitors\' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). Text only: convert PDF or Word files to text first. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person.
265
+ * Gives the widget\'s AI a document to answer visitors\' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). This call takes text. To add a text file or a picture of a document (a PDF too, once PDFs are read) without turning it into text yourself, use `addAiAnswersKnowledgeFile`. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person. A partner\'s customer in an editor session is one person of its own: its adds are not counted with the partner\'s other customers\'.
258
266
  * Add a document for a widget\'s AI to answer from
259
267
  */
260
268
  addAiAnswersKnowledgeDocumentRaw(requestParameters: AddAiAnswersKnowledgeDocument0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddAiAnswersKnowledgeDocument201Response>>;
261
269
  /**
262
- * Gives the widget\'s AI a document to answer visitors\' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). Text only: convert PDF or Word files to text first. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person.
270
+ * Gives the widget\'s AI a document to answer visitors\' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). This call takes text. To add a text file or a picture of a document (a PDF too, once PDFs are read) without turning it into text yourself, use `addAiAnswersKnowledgeFile`. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person. A partner\'s customer in an editor session is one person of its own: its adds are not counted with the partner\'s other customers\'.
263
271
  * Add a document for a widget\'s AI to answer from
264
272
  */
265
273
  addAiAnswersKnowledgeDocument(requestParameters: AddAiAnswersKnowledgeDocument0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddAiAnswersKnowledgeDocument201Response>;
274
+ /**
275
+ * Gives the widget\'s AI a document made from a file. Send a `multipart/form-data` request with the file in the field named `file` and, if you like, a `title`. The file is turned into text and then added exactly as `addAiAnswersKnowledgeDocument` adds text: the same cleaning, the same limits, the same refusal of a copy of a document the widget already has. The call returns once the document is ready to be used, which takes a few seconds (a PDF is read first, so it takes longer). **PDFs are not read yet.** For now a PDF is refused with 415, in a sentence that says what to do instead: paste the text, upload it as a text file, or upload its pages as pictures. What this description says about a PDF is what will hold from the day PDFs are read. **Which files.** - A **PDF** (not read yet, see above), up to 10 MB and 300 pages. Its text is read and its paragraphs are put back together. A PDF that is only pictures of pages (a scan) has no text to read: upload the pages as pictures instead. A PDF locked with a password is refused. - A **text file**: `.txt`, `.text`, `.md`, `.markdown` or `.csv`, in UTF-8, UTF-16 or Windows-1252. - A **picture of a document**: PNG, JPEG or WebP, up to 4 MB. The text in it is read with the same text recognition as the `ocr` adapter. - Word and other office files are not read yet: save the file as a PDF and upload that. What a file is comes from what is in it, not from its name or the type it is sent as. A file that is none of these is refused with 415. **The title.** Left out, the name of the file (without its extension) is the title. Visitors see the title as the source of an answer, so send one that means something to them. **The file is not kept.** Only its text, cut into passages, is kept, and `getAiAnswersKnowledge` never returns it. **What leaves Widgetic.** As for text, the words of the document are sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. A picture is also sent to the text recognition service. A PDF is read on Widgetic\'s own servers and is not sent anywhere to be read. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** The widget\'s limits are those of `addAiAnswersKnowledgeDocument` (up to 20 documents, each up to 100000 characters of text, and up to 400000 characters in all; `getAiAnswersKnowledge` reports the current numbers), and the file is at most 10 MB. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds, from text or from a file, share one limit of ten in ten minutes per person. A partner\'s customer in an editor session is one person of its own: its adds are not counted with the partner\'s other customers\'.
276
+ * Add a text file or a picture of a document (a PDF once PDFs are read) for a widget\'s AI to answer from
277
+ */
278
+ addAiAnswersKnowledgeFileRaw(requestParameters: AddAiAnswersKnowledgeFile0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddAiAnswersKnowledgeDocument201Response>>;
279
+ /**
280
+ * Gives the widget\'s AI a document made from a file. Send a `multipart/form-data` request with the file in the field named `file` and, if you like, a `title`. The file is turned into text and then added exactly as `addAiAnswersKnowledgeDocument` adds text: the same cleaning, the same limits, the same refusal of a copy of a document the widget already has. The call returns once the document is ready to be used, which takes a few seconds (a PDF is read first, so it takes longer). **PDFs are not read yet.** For now a PDF is refused with 415, in a sentence that says what to do instead: paste the text, upload it as a text file, or upload its pages as pictures. What this description says about a PDF is what will hold from the day PDFs are read. **Which files.** - A **PDF** (not read yet, see above), up to 10 MB and 300 pages. Its text is read and its paragraphs are put back together. A PDF that is only pictures of pages (a scan) has no text to read: upload the pages as pictures instead. A PDF locked with a password is refused. - A **text file**: `.txt`, `.text`, `.md`, `.markdown` or `.csv`, in UTF-8, UTF-16 or Windows-1252. - A **picture of a document**: PNG, JPEG or WebP, up to 4 MB. The text in it is read with the same text recognition as the `ocr` adapter. - Word and other office files are not read yet: save the file as a PDF and upload that. What a file is comes from what is in it, not from its name or the type it is sent as. A file that is none of these is refused with 415. **The title.** Left out, the name of the file (without its extension) is the title. Visitors see the title as the source of an answer, so send one that means something to them. **The file is not kept.** Only its text, cut into passages, is kept, and `getAiAnswersKnowledge` never returns it. **What leaves Widgetic.** As for text, the words of the document are sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. A picture is also sent to the text recognition service. A PDF is read on Widgetic\'s own servers and is not sent anywhere to be read. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** The widget\'s limits are those of `addAiAnswersKnowledgeDocument` (up to 20 documents, each up to 100000 characters of text, and up to 400000 characters in all; `getAiAnswersKnowledge` reports the current numbers), and the file is at most 10 MB. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds, from text or from a file, share one limit of ten in ten minutes per person. A partner\'s customer in an editor session is one person of its own: its adds are not counted with the partner\'s other customers\'.
281
+ * Add a text file or a picture of a document (a PDF once PDFs are read) for a widget\'s AI to answer from
282
+ */
283
+ addAiAnswersKnowledgeFile(requestParameters: AddAiAnswersKnowledgeFile0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddAiAnswersKnowledgeDocument201Response>;
266
284
  /**
267
285
  * Checks if the authenticated user can access a specific composition based on workspace context and permissions.
268
286
  * Check Composition Access
@@ -382,12 +400,12 @@ export declare class CompositionsApi extends runtime.BaseAPI {
382
400
  */
383
401
  getAllCompositions(requestParameters?: GetAllCompositions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllCompositions200Response>;
384
402
  /**
385
- * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
403
+ * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route looks at the website that page is on. While the composition\'s allowed list is empty (you have not restricted the allowed websites), every website may write; once you list websites, only those may, besides Widgetic\'s own sites, the visitor\'s own machine and your own platform. A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says. The public JSON of the composition stays open to every website. For a composition a team shares (one filed under a project of an organization, or made in a Shopify store\'s workspace) the answer also carries `lastEditedBy` and `lastEditedAt`: who made the latest change and when, so that a teammate who opens it can be told \"Anna changed this at 14:32\". A composition in a personal project leaves both out, and so does an answer given to an editor session or to a call made for one managed user: only a person is told who a teammate is.
386
404
  * Get Composition
387
405
  */
388
406
  getCompositionByIdRaw(requestParameters: GetCompositionById0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateCompositionFromWidget201Response>>;
389
407
  /**
390
- * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
408
+ * Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route looks at the website that page is on. While the composition\'s allowed list is empty (you have not restricted the allowed websites), every website may write; once you list websites, only those may, besides Widgetic\'s own sites, the visitor\'s own machine and your own platform. A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says. The public JSON of the composition stays open to every website. For a composition a team shares (one filed under a project of an organization, or made in a Shopify store\'s workspace) the answer also carries `lastEditedBy` and `lastEditedAt`: who made the latest change and when, so that a teammate who opens it can be told \"Anna changed this at 14:32\". A composition in a personal project leaves both out, and so does an answer given to an editor session or to a call made for one managed user: only a person is told who a teammate is.
391
409
  * Get Composition
392
410
  */
393
411
  getCompositionById(requestParameters: GetCompositionById0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateCompositionFromWidget201Response>;
@@ -580,12 +598,12 @@ export declare class CompositionsApi extends runtime.BaseAPI {
580
598
  */
581
599
  updateCompositionStatus(requestParameters: UpdateCompositionStatus0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionResponse>;
582
600
  /**
583
- * Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so.
601
+ * Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so. **When several people edit the same composition.** A save that carries `content` can name the content version it started from in the `If-Match` header (the `contentVersion` of the composition you read, or the `ETag` of an earlier answer). If somebody saved the content since, nothing is overwritten: the save is refused with `412` and `CONTENT_VERSION_MISMATCH`, and `error.details.currentVersion` is the version to start again from. For a composition a team shares, `error.details` also says who got there first: `lastEditedBy` (`{ id, name }`, or `null` when nobody can be named) and `lastEditedAt`. An editor session, or a call made for one managed user, is told the version only. A save without `If-Match` still goes through, and the other person\'s change is replaced, as it always was.
584
602
  * Update Composition
585
603
  */
586
604
  updateCompositionRaw(requestParameters: UpdateComposition0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateCompositionFromWidget201Response>>;
587
605
  /**
588
- * Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so.
606
+ * Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so. **When several people edit the same composition.** A save that carries `content` can name the content version it started from in the `If-Match` header (the `contentVersion` of the composition you read, or the `ETag` of an earlier answer). If somebody saved the content since, nothing is overwritten: the save is refused with `412` and `CONTENT_VERSION_MISMATCH`, and `error.details.currentVersion` is the version to start again from. For a composition a team shares, `error.details` also says who got there first: `lastEditedBy` (`{ id, name }`, or `null` when nobody can be named) and `lastEditedAt`. An editor session, or a call made for one managed user, is told the version only. A save without `If-Match` still goes through, and the other person\'s change is replaced, as it always was.
589
607
  * Update Composition
590
608
  */
591
609
  updateComposition(requestParameters: UpdateComposition0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateCompositionFromWidget201Response>;