@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.ListWorkspaceWorkflows0StatusEnum = exports.WorkflowsApi = void 0;
49
+ exports.ListWorkspaceWorkflowsStatusEnum = exports.WorkflowsApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
51
  const index_1 = require("../models/index");
52
52
  /**
@@ -54,7 +54,7 @@ const index_1 = require("../models/index");
54
54
  */
55
55
  class WorkflowsApi extends runtime.BaseAPI {
56
56
  /**
57
- * Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can archive.
57
+ * Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. The workspace is named by its UUID. Any active member can archive.
58
58
  * Archive a Workflow
59
59
  */
60
60
  async archiveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -85,10 +85,10 @@ class WorkflowsApi extends runtime.BaseAPI {
85
85
  headers: headerParameters,
86
86
  query: queryParameters,
87
87
  }, initOverrides);
88
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SaveWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
88
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
89
89
  }
90
90
  /**
91
- * Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can archive.
91
+ * Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. The workspace is named by its UUID. Any active member can archive.
92
92
  * Archive a Workflow
93
93
  */
94
94
  async archiveWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -96,18 +96,18 @@ class WorkflowsApi extends runtime.BaseAPI {
96
96
  return await response.value();
97
97
  }
98
98
  /**
99
- * Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point\'s published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point\'s live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace\'s limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can start one.
100
- * Start a Workflow from a starting point
99
+ * Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. The workspace is named by its UUID. Any active member can create one.
100
+ * Create a Workflow
101
101
  */
102
- async createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides) {
102
+ async createWorkspaceWorkflowRaw(requestParameters, initOverrides) {
103
103
  if (requestParameters['workspaceId'] == null) {
104
- throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
104
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflow().');
105
105
  }
106
106
  if (requestParameters['idempotencyKey'] == null) {
107
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
107
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflow().');
108
108
  }
109
- if (requestParameters['createWorkspaceWorkflowFromPresetRequest'] == null) {
110
- throw new runtime.RequiredError('createWorkspaceWorkflowFromPresetRequest', 'Required parameter "createWorkspaceWorkflowFromPresetRequest" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
109
+ if (requestParameters['createWorkspaceWorkflowRequest'] == null) {
110
+ throw new runtime.RequiredError('createWorkspaceWorkflowRequest', 'Required parameter "createWorkspaceWorkflowRequest" was null or undefined when calling createWorkspaceWorkflow().');
111
111
  }
112
112
  const queryParameters = {};
113
113
  const headerParameters = {};
@@ -129,35 +129,35 @@ class WorkflowsApi extends runtime.BaseAPI {
129
129
  }
130
130
  }
131
131
  const response = await this.request({
132
- path: `/workspaces/{workspaceId}/workflows/from-preset`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
132
+ path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
133
133
  method: 'POST',
134
134
  headers: headerParameters,
135
135
  query: queryParameters,
136
- body: (0, index_1.CreateWorkspaceWorkflowFromPresetRequestToJSON)(requestParameters['createWorkspaceWorkflowFromPresetRequest']),
136
+ body: (0, index_1.CreateWorkspaceWorkflowRequestToJSON)(requestParameters['createWorkspaceWorkflowRequest']),
137
137
  }, initOverrides);
138
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
138
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
139
139
  }
140
140
  /**
141
- * Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point\'s published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point\'s live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace\'s limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can start one.
142
- * Start a Workflow from a starting point
141
+ * Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. The workspace is named by its UUID. Any active member can create one.
142
+ * Create a Workflow
143
143
  */
144
- async createWorkspaceWorkflowFromPreset(requestParameters, initOverrides) {
145
- const response = await this.createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides);
144
+ async createWorkspaceWorkflow(requestParameters, initOverrides) {
145
+ const response = await this.createWorkspaceWorkflowRaw(requestParameters, initOverrides);
146
146
  return await response.value();
147
147
  }
148
148
  /**
149
- * Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can create one.
150
- * Create a Workflow
149
+ * Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point\'s published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point\'s live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace\'s limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. The workspace is named by its UUID. Any active member can start one.
150
+ * Start a Workflow from a starting point
151
151
  */
152
- async createWorkspaceWorkflowRaw(requestParameters, initOverrides) {
152
+ async createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides) {
153
153
  if (requestParameters['workspaceId'] == null) {
154
- throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflow().');
154
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
155
155
  }
156
156
  if (requestParameters['idempotencyKey'] == null) {
157
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflow().');
157
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
158
158
  }
159
- if (requestParameters['createWorkspaceWorkflowRequest'] == null) {
160
- throw new runtime.RequiredError('createWorkspaceWorkflowRequest', 'Required parameter "createWorkspaceWorkflowRequest" was null or undefined when calling createWorkspaceWorkflow().');
159
+ if (requestParameters['createWorkspaceWorkflowFromPresetRequest'] == null) {
160
+ throw new runtime.RequiredError('createWorkspaceWorkflowFromPresetRequest', 'Required parameter "createWorkspaceWorkflowFromPresetRequest" was null or undefined when calling createWorkspaceWorkflowFromPreset().');
161
161
  }
162
162
  const queryParameters = {};
163
163
  const headerParameters = {};
@@ -179,24 +179,24 @@ class WorkflowsApi extends runtime.BaseAPI {
179
179
  }
180
180
  }
181
181
  const response = await this.request({
182
- path: `/workspaces/{workspaceId}/workflows`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
182
+ path: `/workspaces/{workspaceId}/workflows/from-preset`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
183
183
  method: 'POST',
184
184
  headers: headerParameters,
185
185
  query: queryParameters,
186
- body: (0, index_1.CreateWorkspaceWorkflowRequestToJSON)(requestParameters['createWorkspaceWorkflowRequest']),
186
+ body: (0, index_1.CreateWorkspaceWorkflowFromPresetRequestToJSON)(requestParameters['createWorkspaceWorkflowFromPresetRequest']),
187
187
  }, initOverrides);
188
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
188
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
189
189
  }
190
190
  /**
191
- * Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can create one.
192
- * Create a Workflow
191
+ * Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point\'s published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point\'s live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace\'s limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. The workspace is named by its UUID. Any active member can start one.
192
+ * Start a Workflow from a starting point
193
193
  */
194
- async createWorkspaceWorkflow(requestParameters, initOverrides) {
195
- const response = await this.createWorkspaceWorkflowRaw(requestParameters, initOverrides);
194
+ async createWorkspaceWorkflowFromPreset(requestParameters, initOverrides) {
195
+ const response = await this.createWorkspaceWorkflowFromPresetRaw(requestParameters, initOverrides);
196
196
  return await response.value();
197
197
  }
198
198
  /**
199
- * Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed\'s first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can delete.
199
+ * Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed\'s first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". The workspace is named by its UUID. Any active member can delete.
200
200
  * Delete a Workflow
201
201
  */
202
202
  async deleteWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -230,7 +230,7 @@ class WorkflowsApi extends runtime.BaseAPI {
230
230
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
231
231
  }
232
232
  /**
233
- * Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed\'s first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can delete.
233
+ * Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed\'s first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". The workspace is named by its UUID. Any active member can delete.
234
234
  * Delete a Workflow
235
235
  */
236
236
  async deleteWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -238,7 +238,7 @@ class WorkflowsApi extends runtime.BaseAPI {
238
238
  return await response.value();
239
239
  }
240
240
  /**
241
- * Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can discard.
241
+ * Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. The workspace is named by its UUID. Any active member can discard.
242
242
  * Discard the Unpublished Changes of a Workflow
243
243
  */
244
244
  async discardWorkspaceWorkflowChangesRaw(requestParameters, initOverrides) {
@@ -274,10 +274,10 @@ class WorkflowsApi extends runtime.BaseAPI {
274
274
  query: queryParameters,
275
275
  body: (0, index_1.PublishWorkspaceWorkflowRequestToJSON)(requestParameters['publishWorkspaceWorkflowRequest']),
276
276
  }, initOverrides);
277
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
277
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
278
278
  }
279
279
  /**
280
- * Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can discard.
280
+ * Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. The workspace is named by its UUID. Any active member can discard.
281
281
  * Discard the Unpublished Changes of a Workflow
282
282
  */
283
283
  async discardWorkspaceWorkflowChanges(requestParameters, initOverrides) {
@@ -285,7 +285,7 @@ class WorkflowsApi extends runtime.BaseAPI {
285
285
  return await response.value();
286
286
  }
287
287
  /**
288
- * Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can duplicate.
288
+ * Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". The workspace is named by its UUID. Any active member can duplicate.
289
289
  * Duplicate a Workflow
290
290
  */
291
291
  async duplicateWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -322,10 +322,10 @@ class WorkflowsApi extends runtime.BaseAPI {
322
322
  headers: headerParameters,
323
323
  query: queryParameters,
324
324
  }, initOverrides);
325
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
325
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
326
326
  }
327
327
  /**
328
- * Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can duplicate.
328
+ * Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". The workspace is named by its UUID. Any active member can duplicate.
329
329
  * Duplicate a Workflow
330
330
  */
331
331
  async duplicateWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -333,26 +333,17 @@ class WorkflowsApi extends runtime.BaseAPI {
333
333
  return await response.value();
334
334
  }
335
335
  /**
336
- * Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on. No visitor and no value a visitor typed is ever stored. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
337
- * Get what Visitors Did in a Workflow
336
+ * Reads a workflow with its draft graph and the version that is live. The workspace is named by its UUID. Any active member can read it.
337
+ * Get a Workflow
338
338
  */
339
- async getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides) {
339
+ async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
340
340
  if (requestParameters['workspaceId'] == null) {
341
- throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowStats().');
341
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
342
342
  }
343
343
  if (requestParameters['workflowId'] == null) {
344
- throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowStats().');
344
+ throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
345
345
  }
346
346
  const queryParameters = {};
347
- if (requestParameters['versionId'] != null) {
348
- queryParameters['versionId'] = requestParameters['versionId'];
349
- }
350
- if (requestParameters['from'] != null) {
351
- queryParameters['from'] = requestParameters['from'];
352
- }
353
- if (requestParameters['to'] != null) {
354
- queryParameters['to'] = requestParameters['to'];
355
- }
356
347
  const headerParameters = {};
357
348
  if (requestParameters['xManagedUserId'] != null) {
358
349
  headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
@@ -368,36 +359,42 @@ class WorkflowsApi extends runtime.BaseAPI {
368
359
  }
369
360
  }
370
361
  const response = await this.request({
371
- path: `/workspaces/{workspaceId}/workflows/{workflowId}/stats`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
362
+ path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
372
363
  method: 'GET',
373
364
  headers: headerParameters,
374
365
  query: queryParameters,
375
366
  }, initOverrides);
376
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWorkspaceWorkflowStats200ResponseFromJSON)(jsonValue));
367
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
377
368
  }
378
369
  /**
379
- * Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on. No visitor and no value a visitor typed is ever stored. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
380
- * Get what Visitors Did in a Workflow
370
+ * Reads a workflow with its draft graph and the version that is live. The workspace is named by its UUID. Any active member can read it.
371
+ * Get a Workflow
381
372
  */
382
- async getWorkspaceWorkflowStats(requestParameters, initOverrides) {
383
- const response = await this.getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides);
373
+ async getWorkspaceWorkflow(requestParameters, initOverrides) {
374
+ const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
384
375
  return await response.value();
385
376
  }
386
377
  /**
387
- * One published version with its graph, for the read-only preview and for the Runs view. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
388
- * Get a Published Version of a Workflow
378
+ * Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on, and, where the visitor\'s browser said why a block could not be shown, how many of those failures had each reason (`failedReasons`: a timeout, an error of the widget, a build that failed, or another reason). No visitor and no value a visitor typed is ever stored. The workspace is named by its UUID. Any active member can read.
379
+ * Get what Visitors Did in a Workflow
389
380
  */
390
- async getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
381
+ async getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides) {
391
382
  if (requestParameters['workspaceId'] == null) {
392
- throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowVersion().');
383
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowStats().');
393
384
  }
394
385
  if (requestParameters['workflowId'] == null) {
395
- throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowVersion().');
396
- }
397
- if (requestParameters['versionId'] == null) {
398
- throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getWorkspaceWorkflowVersion().');
386
+ throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowStats().');
399
387
  }
400
388
  const queryParameters = {};
389
+ if (requestParameters['versionId'] != null) {
390
+ queryParameters['versionId'] = requestParameters['versionId'];
391
+ }
392
+ if (requestParameters['from'] != null) {
393
+ queryParameters['from'] = requestParameters['from'];
394
+ }
395
+ if (requestParameters['to'] != null) {
396
+ queryParameters['to'] = requestParameters['to'];
397
+ }
401
398
  const headerParameters = {};
402
399
  if (requestParameters['xManagedUserId'] != null) {
403
400
  headerParameters['X-Managed-User-Id'] = String(requestParameters['xManagedUserId']);
@@ -413,31 +410,34 @@ class WorkflowsApi extends runtime.BaseAPI {
413
410
  }
414
411
  }
415
412
  const response = await this.request({
416
- path: `/workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
413
+ path: `/workspaces/{workspaceId}/workflows/{workflowId}/stats`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
417
414
  method: 'GET',
418
415
  headers: headerParameters,
419
416
  query: queryParameters,
420
417
  }, initOverrides);
421
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWorkspaceWorkflowVersion200ResponseFromJSON)(jsonValue));
418
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWorkspaceWorkflowStats200ResponseFromJSON)(jsonValue));
422
419
  }
423
420
  /**
424
- * One published version with its graph, for the read-only preview and for the Runs view. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
425
- * Get a Published Version of a Workflow
421
+ * Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on, and, where the visitor\'s browser said why a block could not be shown, how many of those failures had each reason (`failedReasons`: a timeout, an error of the widget, a build that failed, or another reason). No visitor and no value a visitor typed is ever stored. The workspace is named by its UUID. Any active member can read.
422
+ * Get what Visitors Did in a Workflow
426
423
  */
427
- async getWorkspaceWorkflowVersion(requestParameters, initOverrides) {
428
- const response = await this.getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
424
+ async getWorkspaceWorkflowStats(requestParameters, initOverrides) {
425
+ const response = await this.getWorkspaceWorkflowStatsRaw(requestParameters, initOverrides);
429
426
  return await response.value();
430
427
  }
431
428
  /**
432
- * Reads a workflow with its draft graph and the version that is live. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
433
- * Get a Workflow
429
+ * One published version with its graph, for the read-only preview and for the Runs view. The workspace is named by its UUID. Any active member can read.
430
+ * Get a Published Version of a Workflow
434
431
  */
435
- async getWorkspaceWorkflowRaw(requestParameters, initOverrides) {
432
+ async getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
436
433
  if (requestParameters['workspaceId'] == null) {
437
- throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflow().');
434
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getWorkspaceWorkflowVersion().');
438
435
  }
439
436
  if (requestParameters['workflowId'] == null) {
440
- throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflow().');
437
+ throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getWorkspaceWorkflowVersion().');
438
+ }
439
+ if (requestParameters['versionId'] == null) {
440
+ throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getWorkspaceWorkflowVersion().');
441
441
  }
442
442
  const queryParameters = {};
443
443
  const headerParameters = {};
@@ -455,56 +455,23 @@ class WorkflowsApi extends runtime.BaseAPI {
455
455
  }
456
456
  }
457
457
  const response = await this.request({
458
- path: `/workspaces/{workspaceId}/workflows/{workflowId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))),
459
- method: 'GET',
460
- headers: headerParameters,
461
- query: queryParameters,
462
- }, initOverrides);
463
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
464
- }
465
- /**
466
- * Reads a workflow with its draft graph and the version that is live. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
467
- * Get a Workflow
468
- */
469
- async getWorkspaceWorkflow(requestParameters, initOverrides) {
470
- const response = await this.getWorkspaceWorkflowRaw(requestParameters, initOverrides);
471
- return await response.value();
472
- }
473
- /**
474
- * The partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
475
- * List the workflows a partner offers as places to start
476
- */
477
- async listPartnerWorkflowPresetsRaw(requestParameters, initOverrides) {
478
- if (requestParameters['partnerId'] == null) {
479
- throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerWorkflowPresets().');
480
- }
481
- const queryParameters = {};
482
- const headerParameters = {};
483
- if (this.configuration && this.configuration.accessToken) {
484
- const token = this.configuration.accessToken;
485
- const tokenString = await token("apiKeyAuth", []);
486
- if (tokenString) {
487
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
488
- }
489
- }
490
- const response = await this.request({
491
- path: `/partners/{partnerId}/workflow-presets`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
458
+ path: `/workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"workflowId"}}`, encodeURIComponent(String(requestParameters['workflowId']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
492
459
  method: 'GET',
493
460
  headers: headerParameters,
494
461
  query: queryParameters,
495
462
  }, initOverrides);
496
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListPartnerWorkflowPresets200ResponseFromJSON)(jsonValue));
463
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWorkspaceWorkflowVersion200ResponseFromJSON)(jsonValue));
497
464
  }
498
465
  /**
499
- * The partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
500
- * List the workflows a partner offers as places to start
466
+ * One published version with its graph, for the read-only preview and for the Runs view. The workspace is named by its UUID. Any active member can read.
467
+ * Get a Published Version of a Workflow
501
468
  */
502
- async listPartnerWorkflowPresets(requestParameters, initOverrides) {
503
- const response = await this.listPartnerWorkflowPresetsRaw(requestParameters, initOverrides);
469
+ async getWorkspaceWorkflowVersion(requestParameters, initOverrides) {
470
+ const response = await this.getWorkspaceWorkflowVersionRaw(requestParameters, initOverrides);
504
471
  return await response.value();
505
472
  }
506
473
  /**
507
- * The workspace\'s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor\'s entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person\'s private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
474
+ * The workspace\'s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor\'s entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person\'s private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. The workspace is named by its UUID. Any active member can read it.
508
475
  * List the compositions a workflow can show, and what each can do
509
476
  */
510
477
  async listWorkspaceWorkflowCompositionOptionsRaw(requestParameters, initOverrides) {
@@ -547,7 +514,7 @@ class WorkflowsApi extends runtime.BaseAPI {
547
514
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListWorkspaceWorkflowCompositionOptions200ResponseFromJSON)(jsonValue));
548
515
  }
549
516
  /**
550
- * The workspace\'s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor\'s entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person\'s private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
517
+ * The workspace\'s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor\'s entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person\'s private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. The workspace is named by its UUID. Any active member can read it.
551
518
  * List the compositions a workflow can show, and what each can do
552
519
  */
553
520
  async listWorkspaceWorkflowCompositionOptions(requestParameters, initOverrides) {
@@ -555,7 +522,7 @@ class WorkflowsApi extends runtime.BaseAPI {
555
522
  return await response.value();
556
523
  }
557
524
  /**
558
- * The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner\'s managed users, that the partner offers (a managed user is never shown Widgetic\'s, and a person is never shown a partner\'s). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
525
+ * The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner\'s managed users, that the partner offers (a managed user is never shown Widgetic\'s, and a person is never shown a partner\'s). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. The workspace is named by its UUID. Any active member can read the list.
559
526
  * List the starting points for a new Workflow
560
527
  */
561
528
  async listWorkspaceWorkflowPresetsRaw(requestParameters, initOverrides) {
@@ -586,7 +553,7 @@ class WorkflowsApi extends runtime.BaseAPI {
586
553
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListWorkspaceWorkflowPresets200ResponseFromJSON)(jsonValue));
587
554
  }
588
555
  /**
589
- * The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner\'s managed users, that the partner offers (a managed user is never shown Widgetic\'s, and a person is never shown a partner\'s). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
556
+ * The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner\'s managed users, that the partner offers (a managed user is never shown Widgetic\'s, and a person is never shown a partner\'s). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. The workspace is named by its UUID. Any active member can read the list.
590
557
  * List the starting points for a new Workflow
591
558
  */
592
559
  async listWorkspaceWorkflowPresets(requestParameters, initOverrides) {
@@ -594,7 +561,7 @@ class WorkflowsApi extends runtime.BaseAPI {
594
561
  return await response.value();
595
562
  }
596
563
  /**
597
- * Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
564
+ * Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. The workspace is named by its UUID. Any active member can read.
598
565
  * List the Published Versions of a Workflow
599
566
  */
600
567
  async listWorkspaceWorkflowVersionsRaw(requestParameters, initOverrides) {
@@ -628,7 +595,7 @@ class WorkflowsApi extends runtime.BaseAPI {
628
595
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListWorkspaceWorkflowVersions200ResponseFromJSON)(jsonValue));
629
596
  }
630
597
  /**
631
- * Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
598
+ * Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. The workspace is named by its UUID. Any active member can read.
632
599
  * List the Published Versions of a Workflow
633
600
  */
634
601
  async listWorkspaceWorkflowVersions(requestParameters, initOverrides) {
@@ -636,7 +603,7 @@ class WorkflowsApi extends runtime.BaseAPI {
636
603
  return await response.value();
637
604
  }
638
605
  /**
639
- * Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
606
+ * Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). The workspace is named by its UUID. Any active member can read the list.
640
607
  * List the Workflows of a Workspace
641
608
  */
642
609
  async listWorkspaceWorkflowsRaw(requestParameters, initOverrides) {
@@ -682,7 +649,7 @@ class WorkflowsApi extends runtime.BaseAPI {
682
649
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListWorkspaceWorkflows200ResponseFromJSON)(jsonValue));
683
650
  }
684
651
  /**
685
- * Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
652
+ * Lists the workspace\'s workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). The workspace is named by its UUID. Any active member can read the list.
686
653
  * List the Workflows of a Workspace
687
654
  */
688
655
  async listWorkspaceWorkflows(requestParameters, initOverrides) {
@@ -690,7 +657,7 @@ class WorkflowsApi extends runtime.BaseAPI {
690
657
  return await response.value();
691
658
  }
692
659
  /**
693
- * While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can pause.
660
+ * While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. The workspace is named by its UUID. Any active member can pause.
694
661
  * Pause a Workflow
695
662
  */
696
663
  async pauseWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -721,10 +688,10 @@ class WorkflowsApi extends runtime.BaseAPI {
721
688
  headers: headerParameters,
722
689
  query: queryParameters,
723
690
  }, initOverrides);
724
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SaveWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
691
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
725
692
  }
726
693
  /**
727
- * While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can pause.
694
+ * While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. The workspace is named by its UUID. Any active member can pause.
728
695
  * Pause a Workflow
729
696
  */
730
697
  async pauseWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -732,7 +699,7 @@ class WorkflowsApi extends runtime.BaseAPI {
732
699
  return await response.value();
733
700
  }
734
701
  /**
735
- * Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error\'s `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can publish.
702
+ * Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error\'s `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. The workspace is named by its UUID. Any active member can publish.
736
703
  * Publish the Draft of a Workflow
737
704
  */
738
705
  async publishWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -777,7 +744,7 @@ class WorkflowsApi extends runtime.BaseAPI {
777
744
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PublishWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
778
745
  }
779
746
  /**
780
- * Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error\'s `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can publish.
747
+ * Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error\'s `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. The workspace is named by its UUID. Any active member can publish.
781
748
  * Publish the Draft of a Workflow
782
749
  */
783
750
  async publishWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -785,43 +752,7 @@ class WorkflowsApi extends runtime.BaseAPI {
785
752
  return await response.value();
786
753
  }
787
754
  /**
788
- * Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
789
- * Stop offering a workflow as a place to start
790
- */
791
- async removePartnerWorkflowPresetRaw(requestParameters, initOverrides) {
792
- if (requestParameters['partnerId'] == null) {
793
- throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling removePartnerWorkflowPreset().');
794
- }
795
- if (requestParameters['key'] == null) {
796
- throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling removePartnerWorkflowPreset().');
797
- }
798
- const queryParameters = {};
799
- const headerParameters = {};
800
- if (this.configuration && this.configuration.accessToken) {
801
- const token = this.configuration.accessToken;
802
- const tokenString = await token("apiKeyAuth", []);
803
- if (tokenString) {
804
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
805
- }
806
- }
807
- const response = await this.request({
808
- path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
809
- method: 'DELETE',
810
- headers: headerParameters,
811
- query: queryParameters,
812
- }, initOverrides);
813
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RemovePartnerWorkflowPreset200ResponseFromJSON)(jsonValue));
814
- }
815
- /**
816
- * Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
817
- * Stop offering a workflow as a place to start
818
- */
819
- async removePartnerWorkflowPreset(requestParameters, initOverrides) {
820
- const response = await this.removePartnerWorkflowPresetRaw(requestParameters, initOverrides);
821
- return await response.value();
822
- }
823
- /**
824
- * Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can restore.
755
+ * Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. The workspace is named by its UUID. Any active member can restore.
825
756
  * Restore a Version of a Workflow into the Draft
826
757
  */
827
758
  async restoreWorkspaceWorkflowVersionRaw(requestParameters, initOverrides) {
@@ -860,10 +791,10 @@ class WorkflowsApi extends runtime.BaseAPI {
860
791
  query: queryParameters,
861
792
  body: (0, index_1.PublishWorkspaceWorkflowRequestToJSON)(requestParameters['publishWorkspaceWorkflowRequest']),
862
793
  }, initOverrides);
863
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWorkspaceWorkflowFromPreset201ResponseFromJSON)(jsonValue));
794
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
864
795
  }
865
796
  /**
866
- * Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can restore.
797
+ * Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. The workspace is named by its UUID. Any active member can restore.
867
798
  * Restore a Version of a Workflow into the Draft
868
799
  */
869
800
  async restoreWorkspaceWorkflowVersion(requestParameters, initOverrides) {
@@ -871,7 +802,7 @@ class WorkflowsApi extends runtime.BaseAPI {
871
802
  return await response.value();
872
803
  }
873
804
  /**
874
- * Makes a paused workflow live again, on the version that was live when it was paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can resume.
805
+ * Makes a paused workflow live again, on the version that was live when it was paused. The workspace is named by its UUID. Any active member can resume.
875
806
  * Resume a Paused Workflow
876
807
  */
877
808
  async resumeWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -902,10 +833,10 @@ class WorkflowsApi extends runtime.BaseAPI {
902
833
  headers: headerParameters,
903
834
  query: queryParameters,
904
835
  }, initOverrides);
905
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SaveWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
836
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
906
837
  }
907
838
  /**
908
- * Makes a paused workflow live again, on the version that was live when it was paused. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can resume.
839
+ * Makes a paused workflow live again, on the version that was live when it was paused. The workspace is named by its UUID. Any active member can resume.
909
840
  * Resume a Paused Workflow
910
841
  */
911
842
  async resumeWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -913,7 +844,7 @@ class WorkflowsApi extends runtime.BaseAPI {
913
844
  return await response.value();
914
845
  }
915
846
  /**
916
- * Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can save.
847
+ * Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. The workspace is named by its UUID. Any active member can save.
917
848
  * Save the Draft of a Workflow
918
849
  */
919
850
  async saveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -949,10 +880,10 @@ class WorkflowsApi extends runtime.BaseAPI {
949
880
  query: queryParameters,
950
881
  body: (0, index_1.SaveWorkspaceWorkflowRequestToJSON)(requestParameters['saveWorkspaceWorkflowRequest']),
951
882
  }, initOverrides);
952
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SaveWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
883
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
953
884
  }
954
885
  /**
955
- * Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can save.
886
+ * Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. The workspace is named by its UUID. Any active member can save.
956
887
  * Save the Draft of a Workflow
957
888
  */
958
889
  async saveWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -960,48 +891,7 @@ class WorkflowsApi extends runtime.BaseAPI {
960
891
  return await response.value();
961
892
  }
962
893
  /**
963
- * Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
964
- * Offer a workflow as a place to start, or replace what a key offers
965
- */
966
- async setPartnerWorkflowPresetRaw(requestParameters, initOverrides) {
967
- if (requestParameters['partnerId'] == null) {
968
- throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerWorkflowPreset().');
969
- }
970
- if (requestParameters['key'] == null) {
971
- throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling setPartnerWorkflowPreset().');
972
- }
973
- if (requestParameters['offerWorkflowPresetRequest'] == null) {
974
- throw new runtime.RequiredError('offerWorkflowPresetRequest', 'Required parameter "offerWorkflowPresetRequest" was null or undefined when calling setPartnerWorkflowPreset().');
975
- }
976
- const queryParameters = {};
977
- const headerParameters = {};
978
- headerParameters['Content-Type'] = 'application/json';
979
- if (this.configuration && this.configuration.accessToken) {
980
- const token = this.configuration.accessToken;
981
- const tokenString = await token("apiKeyAuth", []);
982
- if (tokenString) {
983
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
984
- }
985
- }
986
- const response = await this.request({
987
- path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
988
- method: 'PUT',
989
- headers: headerParameters,
990
- query: queryParameters,
991
- body: (0, index_1.OfferWorkflowPresetRequestToJSON)(requestParameters['offerWorkflowPresetRequest']),
992
- }, initOverrides);
993
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SetPartnerWorkflowPreset200ResponseFromJSON)(jsonValue));
994
- }
995
- /**
996
- * Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
997
- * Offer a workflow as a place to start, or replace what a key offers
998
- */
999
- async setPartnerWorkflowPreset(requestParameters, initOverrides) {
1000
- const response = await this.setPartnerWorkflowPresetRaw(requestParameters, initOverrides);
1001
- return await response.value();
1002
- }
1003
- /**
1004
- * Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can unarchive.
894
+ * Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. The workspace is named by its UUID. Any active member can unarchive.
1005
895
  * Unarchive a Workflow
1006
896
  */
1007
897
  async unarchiveWorkspaceWorkflowRaw(requestParameters, initOverrides) {
@@ -1032,10 +922,10 @@ class WorkflowsApi extends runtime.BaseAPI {
1032
922
  headers: headerParameters,
1033
923
  query: queryParameters,
1034
924
  }, initOverrides);
1035
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SaveWorkspaceWorkflow200ResponseFromJSON)(jsonValue));
925
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowResponseFromJSON)(jsonValue));
1036
926
  }
1037
927
  /**
1038
- * Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. For personal workspace, use \'personal\' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can unarchive.
928
+ * Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. The workspace is named by its UUID. Any active member can unarchive.
1039
929
  * Unarchive a Workflow
1040
930
  */
1041
931
  async unarchiveWorkspaceWorkflow(requestParameters, initOverrides) {
@@ -1047,7 +937,7 @@ exports.WorkflowsApi = WorkflowsApi;
1047
937
  /**
1048
938
  * @export
1049
939
  */
1050
- exports.ListWorkspaceWorkflows0StatusEnum = {
940
+ exports.ListWorkspaceWorkflowsStatusEnum = {
1051
941
  Draft: 'draft',
1052
942
  Live: 'live',
1053
943
  Paused: 'paused',