@widgetic/api-sdk-ts 1.11.111 → 2.0.0

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 (148) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/BrandKitApi.d.ts +40 -40
  3. package/dist/apis/BrandKitApi.js +40 -40
  4. package/dist/apis/CanvasesApi.d.ts +15 -15
  5. package/dist/apis/CompositionsApi.d.ts +255 -155
  6. package/dist/apis/CompositionsApi.js +333 -133
  7. package/dist/apis/CreditsApi.d.ts +7 -7
  8. package/dist/apis/CreditsApi.js +1 -1
  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/PartnersApi.d.ts +125 -125
  17. package/dist/apis/PartnersApi.js +11 -11
  18. package/dist/apis/PublicEmbedApi.d.ts +42 -42
  19. package/dist/apis/PublicEmbedApi.js +29 -29
  20. package/dist/apis/UploadsApi.d.ts +38 -38
  21. package/dist/apis/UploadsApi.js +60 -60
  22. package/dist/apis/UsersApi.d.ts +40 -40
  23. package/dist/apis/UsersApi.js +4 -4
  24. package/dist/apis/WidgetsApi.d.ts +23 -23
  25. package/dist/apis/WidgetsApi.js +36 -36
  26. package/dist/apis/WorkflowsApi.d.ts +85 -127
  27. package/dist/apis/WorkflowsApi.js +82 -192
  28. package/dist/apis/index.d.ts +0 -2
  29. package/dist/apis/index.js +0 -2
  30. package/dist/esm/apis/BrandKitApi.js +39 -39
  31. package/dist/esm/apis/CompositionsApi.js +333 -133
  32. package/dist/esm/apis/CreditsApi.js +2 -2
  33. package/dist/esm/apis/InvoicesApi.js +1 -1
  34. package/dist/esm/apis/ManagedUsersApi.js +106 -39
  35. package/dist/esm/apis/OperationsApi.js +6 -6
  36. package/dist/esm/apis/PartnersApi.js +12 -12
  37. package/dist/esm/apis/PublicEmbedApi.js +30 -30
  38. package/dist/esm/apis/UploadsApi.js +60 -60
  39. package/dist/esm/apis/UsersApi.js +5 -5
  40. package/dist/esm/apis/WidgetsApi.js +37 -37
  41. package/dist/esm/apis/WorkflowsApi.js +82 -192
  42. package/dist/esm/apis/index.js +0 -2
  43. package/dist/esm/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +8 -8
  44. package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +8 -8
  45. package/dist/esm/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +8 -8
  46. package/dist/esm/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +8 -8
  47. package/dist/esm/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +8 -8
  48. package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
  49. package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
  50. package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
  51. package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
  52. package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
  53. package/dist/esm/models/GetOperationResponse.js +51 -0
  54. package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +9 -9
  55. package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
  56. package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
  57. package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
  58. package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
  59. package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
  60. package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
  61. package/dist/esm/models/WorkflowFailureReason.js +49 -0
  62. package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
  63. package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
  64. package/dist/esm/models/WorkflowStats.js +3 -0
  65. package/dist/esm/models/index.js +20 -19
  66. package/dist/esm/runtime.js +1 -1
  67. package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
  68. package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
  69. package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
  70. package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
  71. package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
  72. package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
  73. package/dist/models/AdapterConnectionResponse.d.ts +46 -0
  74. package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
  75. package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
  76. package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
  77. package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
  78. package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
  79. package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
  80. package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
  81. package/dist/models/DeleteUpload200Response.d.ts +46 -0
  82. package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
  83. package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
  84. package/dist/models/DeleteUpload200ResponseData.js +48 -0
  85. package/dist/models/DesignDefaultsResponse.d.ts +46 -0
  86. package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
  87. package/dist/models/GetOperationResponse.d.ts +46 -0
  88. package/dist/models/GetOperationResponse.js +58 -0
  89. package/dist/models/{OperationsIdGetResponseData.d.ts → GetOperationResponseData.d.ts} +19 -19
  90. package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +15 -15
  91. package/dist/models/ListUploads200Response.d.ts +46 -0
  92. package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
  93. package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
  94. package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
  95. package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
  96. package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
  97. package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
  98. package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
  99. package/dist/models/PublicWorkflowResponse.d.ts +46 -0
  100. package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
  101. package/dist/models/Upload.d.ts +1 -1
  102. package/dist/models/UploadLimits.d.ts +3 -3
  103. package/dist/models/WorkflowDetailResponse.d.ts +46 -0
  104. package/dist/models/WorkflowDetailResponse.js +58 -0
  105. package/dist/models/WorkflowFailureReason.d.ts +31 -0
  106. package/dist/models/WorkflowFailureReason.js +57 -0
  107. package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
  108. package/dist/models/WorkflowFailureReasonCounter.js +59 -0
  109. package/dist/models/WorkflowResponse.d.ts +46 -0
  110. package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
  111. package/dist/models/WorkflowStats.d.ts +16 -1
  112. package/dist/models/WorkflowStats.js +3 -0
  113. package/dist/models/index.d.ts +20 -19
  114. package/dist/models/index.js +20 -19
  115. package/dist/runtime.d.ts +2 -2
  116. package/dist/runtime.js +1 -1
  117. package/package.json +1 -1
  118. package/dist/apis/PartnerApi.d.ts +0 -2707
  119. package/dist/apis/PartnerApi.js +0 -7073
  120. package/dist/apis/WorkspacesApi.d.ts +0 -352
  121. package/dist/apis/WorkspacesApi.js +0 -946
  122. package/dist/esm/apis/PartnerApi.js +0 -7036
  123. package/dist/esm/apis/WorkspacesApi.js +0 -909
  124. package/dist/esm/models/CreateCompositionFromWidget201Response.js +0 -51
  125. package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
  126. package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
  127. package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
  128. package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
  129. package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
  130. package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
  131. package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
  132. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
  133. package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
  134. package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
  135. package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
  136. package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
  137. package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
  138. package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
  139. package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
  140. package/dist/models/OperationsIdGetResponse.d.ts +0 -46
  141. package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
  142. package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
  143. package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
  144. package/dist/models/UploadsGet200Response.d.ts +0 -46
  145. package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
  146. package/dist/models/UploadsIdDelete200Response.js +0 -58
  147. package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
  148. package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { AccountCreditBalanceResponseFromJSON, GetPartnerCreditTransactions200ResponseFromJSON, } from '../models/index.js';
15
+ import { AccountCreditBalanceResponseFromJSON, AccountCreditTransactionListResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -82,7 +82,7 @@ export class CreditsApi extends runtime.BaseAPI {
82
82
  headers: headerParameters,
83
83
  query: queryParameters,
84
84
  }, initOverrides);
85
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerCreditTransactions200ResponseFromJSON(jsonValue));
85
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreditTransactionListResponseFromJSON(jsonValue));
86
86
  }
87
87
  /**
88
88
  * Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
@@ -63,7 +63,7 @@ export class InvoicesApi extends runtime.BaseAPI {
63
63
  /**
64
64
  * @export
65
65
  */
66
- export const GetInvoicesByPartnerId0StatusEnum = {
66
+ export const GetInvoicesByPartnerIdStatusEnum = {
67
67
  Draft: 'draft',
68
68
  Open: 'open',
69
69
  Pending: 'pending',
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { CopyPartnerPresetRequestToJSON, CreateCompositionFromPresetRequestToJSON, CreateCompositionFromWidget201ResponseFromJSON, DeleteManagedUser200ResponseFromJSON, EditorSessionResponseFromJSON, GetAllManagedUsers200ResponseFromJSON, GetManagedUserLimits200ResponseFromJSON, GetManagedUserStorageUsage200ResponseFromJSON, GetManagedUsersByManagerIdResponseFromJSON, GetPartnerDesignDefaults200ResponseFromJSON, ManagedUserResponseFromJSON, ManagedUserUsageResponseFromJSON, NewEditorSessionToJSON, NewManagedUserToJSON, PartnerPresetCopyResponseFromJSON, RevokeManagedUserEditorSessionsResponseFromJSON, SetManagedUserLimitsRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, UpdateManagedUserToJSON, } from '../models/index.js';
15
+ import { CompositionResponseFromJSON, CopyPartnerPresetRequestToJSON, CreateCompositionFromPresetRequestToJSON, DesignDefaultsResponseFromJSON, EditorSessionResponseFromJSON, GetAllManagedUsers200ResponseFromJSON, GetManagedUserStorageUsage200ResponseFromJSON, GetManagedUsersByManagerIdResponseFromJSON, ManagedUserEntriesPageSuccessFromJSON, ManagedUserLimitsResponseFromJSON, ManagedUserRemovalResponseFromJSON, ManagedUserResponseFromJSON, ManagedUserUsageResponseFromJSON, NewEditorSessionToJSON, NewManagedUserToJSON, PartnerPresetCopyResponseFromJSON, RevokeManagedUserEditorSessionsResponseFromJSON, SetManagedUserLimitsRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, UpdateManagedUserToJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -98,7 +98,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
98
98
  query: queryParameters,
99
99
  body: CreateCompositionFromPresetRequestToJSON(requestParameters['createCompositionFromPresetRequest']),
100
100
  }, initOverrides);
101
- return new runtime.JSONApiResponse(response, (jsonValue) => CreateCompositionFromWidget201ResponseFromJSON(jsonValue));
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompositionResponseFromJSON(jsonValue));
102
102
  }
103
103
  /**
104
104
  * Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset\'s widget, in a single insert. A failure never leaves a half-made composition. The preset\'s widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget\'s file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
@@ -109,19 +109,22 @@ export class ManagedUsersApi extends runtime.BaseAPI {
109
109
  return await response.value();
110
110
  }
111
111
  /**
112
- * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget\'s repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
113
- * Create an editor session for a managed user
112
+ * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
113
+ * Create Managed User
114
114
  */
115
- async createManagedUserEditorSessionRaw(requestParameters, initOverrides) {
116
- if (requestParameters['id'] == null) {
117
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createManagedUserEditorSession().');
115
+ async createManagedUserRaw(requestParameters, initOverrides) {
116
+ if (requestParameters['idempotencyKey'] == null) {
117
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createManagedUser().');
118
118
  }
119
- if (requestParameters['newEditorSession'] == null) {
120
- throw new runtime.RequiredError('newEditorSession', 'Required parameter "newEditorSession" was null or undefined when calling createManagedUserEditorSession().');
119
+ if (requestParameters['newManagedUser'] == null) {
120
+ throw new runtime.RequiredError('newManagedUser', 'Required parameter "newManagedUser" was null or undefined when calling createManagedUser().');
121
121
  }
122
122
  const queryParameters = {};
123
123
  const headerParameters = {};
124
124
  headerParameters['Content-Type'] = 'application/json';
125
+ if (requestParameters['idempotencyKey'] != null) {
126
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
127
+ }
125
128
  if (this.configuration && this.configuration.accessToken) {
126
129
  const token = this.configuration.accessToken;
127
130
  const tokenString = await token("apiKeyAuth", []);
@@ -130,39 +133,36 @@ export class ManagedUsersApi extends runtime.BaseAPI {
130
133
  }
131
134
  }
132
135
  const response = await this.request({
133
- path: `/managed-users/{id}/editor-sessions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
136
+ path: `/managed-users`,
134
137
  method: 'POST',
135
138
  headers: headerParameters,
136
139
  query: queryParameters,
137
- body: NewEditorSessionToJSON(requestParameters['newEditorSession']),
140
+ body: NewManagedUserToJSON(requestParameters['newManagedUser']),
138
141
  }, initOverrides);
139
- return new runtime.JSONApiResponse(response, (jsonValue) => EditorSessionResponseFromJSON(jsonValue));
142
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserResponseFromJSON(jsonValue));
140
143
  }
141
144
  /**
142
- * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget\'s repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
143
- * Create an editor session for a managed user
145
+ * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
146
+ * Create Managed User
144
147
  */
145
- async createManagedUserEditorSession(requestParameters, initOverrides) {
146
- const response = await this.createManagedUserEditorSessionRaw(requestParameters, initOverrides);
148
+ async createManagedUser(requestParameters, initOverrides) {
149
+ const response = await this.createManagedUserRaw(requestParameters, initOverrides);
147
150
  return await response.value();
148
151
  }
149
152
  /**
150
- * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
151
- * Create Managed User
153
+ * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`listLlmModels`), open the widget\'s repository (`createRepository`, `getRepository`), start a generation and follow or cancel it (`generateCode`, `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`publishBuiltWidget`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
154
+ * Create an editor session for a managed user
152
155
  */
153
- async createManagedUserRaw(requestParameters, initOverrides) {
154
- if (requestParameters['idempotencyKey'] == null) {
155
- throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createManagedUser().');
156
+ async createManagedUserEditorSessionRaw(requestParameters, initOverrides) {
157
+ if (requestParameters['id'] == null) {
158
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createManagedUserEditorSession().');
156
159
  }
157
- if (requestParameters['newManagedUser'] == null) {
158
- throw new runtime.RequiredError('newManagedUser', 'Required parameter "newManagedUser" was null or undefined when calling createManagedUser().');
160
+ if (requestParameters['newEditorSession'] == null) {
161
+ throw new runtime.RequiredError('newEditorSession', 'Required parameter "newEditorSession" was null or undefined when calling createManagedUserEditorSession().');
159
162
  }
160
163
  const queryParameters = {};
161
164
  const headerParameters = {};
162
165
  headerParameters['Content-Type'] = 'application/json';
163
- if (requestParameters['idempotencyKey'] != null) {
164
- headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
165
- }
166
166
  if (this.configuration && this.configuration.accessToken) {
167
167
  const token = this.configuration.accessToken;
168
168
  const tokenString = await token("apiKeyAuth", []);
@@ -171,20 +171,20 @@ export class ManagedUsersApi extends runtime.BaseAPI {
171
171
  }
172
172
  }
173
173
  const response = await this.request({
174
- path: `/managed-users`,
174
+ path: `/managed-users/{id}/editor-sessions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
175
175
  method: 'POST',
176
176
  headers: headerParameters,
177
177
  query: queryParameters,
178
- body: NewManagedUserToJSON(requestParameters['newManagedUser']),
178
+ body: NewEditorSessionToJSON(requestParameters['newEditorSession']),
179
179
  }, initOverrides);
180
- return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserResponseFromJSON(jsonValue));
180
+ return new runtime.JSONApiResponse(response, (jsonValue) => EditorSessionResponseFromJSON(jsonValue));
181
181
  }
182
182
  /**
183
- * Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
184
- * Create Managed User
183
+ * Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\'s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every file is filed for this user and stored in your own storage destination, never in Widgetic\'s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user\'s compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors\' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users\', answers 404. - `creator`: use Widgetic\'s widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget\'s schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`listLlmModels`), open the widget\'s repository (`createRepository`, `getRepository`), start a generation and follow or cancel it (`generateCode`, `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`publishBuiltWidget`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user\'s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic\'s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user\'s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\'s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
184
+ * Create an editor session for a managed user
185
185
  */
186
- async createManagedUser(requestParameters, initOverrides) {
187
- const response = await this.createManagedUserRaw(requestParameters, initOverrides);
186
+ async createManagedUserEditorSession(requestParameters, initOverrides) {
187
+ const response = await this.createManagedUserEditorSessionRaw(requestParameters, initOverrides);
188
188
  return await response.value();
189
189
  }
190
190
  /**
@@ -210,7 +210,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
210
210
  headers: headerParameters,
211
211
  query: queryParameters,
212
212
  }, initOverrides);
213
- return new runtime.JSONApiResponse(response, (jsonValue) => DeleteManagedUser200ResponseFromJSON(jsonValue));
213
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserRemovalResponseFromJSON(jsonValue));
214
214
  }
215
215
  /**
216
216
  * Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
@@ -314,7 +314,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
314
314
  headers: headerParameters,
315
315
  query: queryParameters,
316
316
  }, initOverrides);
317
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
317
+ return new runtime.JSONApiResponse(response, (jsonValue) => DesignDefaultsResponseFromJSON(jsonValue));
318
318
  }
319
319
  /**
320
320
  * Read design defaults for one managed user
@@ -345,7 +345,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
345
345
  headers: headerParameters,
346
346
  query: queryParameters,
347
347
  }, initOverrides);
348
- return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUserLimits200ResponseFromJSON(jsonValue));
348
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserLimitsResponseFromJSON(jsonValue));
349
349
  }
350
350
  /**
351
351
  * Read monthly credit cap and usage for one managed user
@@ -466,6 +466,66 @@ export class ManagedUsersApi extends runtime.BaseAPI {
466
466
  const response = await this.getManagedUsersByManagerIdRaw(requestParameters, initOverrides);
467
467
  return await response.value();
468
468
  }
469
+ /**
470
+ * Merges eligible tables (time and id columns) across the managed user\'s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
471
+ * List entries across a managed user\'s compositions
472
+ */
473
+ async listManagedUserEntriesRaw(requestParameters, initOverrides) {
474
+ if (requestParameters['id'] == null) {
475
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listManagedUserEntries().');
476
+ }
477
+ const queryParameters = {};
478
+ if (requestParameters['compositionId'] != null) {
479
+ queryParameters['compositionId'] = requestParameters['compositionId'];
480
+ }
481
+ if (requestParameters['table'] != null) {
482
+ queryParameters['table'] = requestParameters['table'];
483
+ }
484
+ if (requestParameters['limit'] != null) {
485
+ queryParameters['limit'] = requestParameters['limit'];
486
+ }
487
+ if (requestParameters['order'] != null) {
488
+ queryParameters['order'] = requestParameters['order'];
489
+ }
490
+ if (requestParameters['since'] != null) {
491
+ queryParameters['since'] = requestParameters['since'].toISOString();
492
+ }
493
+ if (requestParameters['until'] != null) {
494
+ queryParameters['until'] = requestParameters['until'].toISOString();
495
+ }
496
+ if (requestParameters['cursor'] != null) {
497
+ queryParameters['cursor'] = requestParameters['cursor'];
498
+ }
499
+ if (requestParameters['context'] != null) {
500
+ queryParameters['context'] = requestParameters['context'];
501
+ }
502
+ if (requestParameters['filter'] != null) {
503
+ queryParameters['filter'] = requestParameters['filter'];
504
+ }
505
+ const headerParameters = {};
506
+ if (this.configuration && this.configuration.accessToken) {
507
+ const token = this.configuration.accessToken;
508
+ const tokenString = await token("apiKeyAuth", []);
509
+ if (tokenString) {
510
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
511
+ }
512
+ }
513
+ const response = await this.request({
514
+ path: `/managed-users/{id}/entries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
515
+ method: 'GET',
516
+ headers: headerParameters,
517
+ query: queryParameters,
518
+ }, initOverrides);
519
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserEntriesPageSuccessFromJSON(jsonValue));
520
+ }
521
+ /**
522
+ * Merges eligible tables (time and id columns) across the managed user\'s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
523
+ * List entries across a managed user\'s compositions
524
+ */
525
+ async listManagedUserEntries(requestParameters, initOverrides) {
526
+ const response = await this.listManagedUserEntriesRaw(requestParameters, initOverrides);
527
+ return await response.value();
528
+ }
469
529
  /**
470
530
  * Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
471
531
  * End one editor session of a managed user
@@ -492,7 +552,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
492
552
  headers: headerParameters,
493
553
  query: queryParameters,
494
554
  }, initOverrides);
495
- return new runtime.JSONApiResponse(response, (jsonValue) => DeleteManagedUser200ResponseFromJSON(jsonValue));
555
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserRemovalResponseFromJSON(jsonValue));
496
556
  }
497
557
  /**
498
558
  * Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
@@ -563,7 +623,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
563
623
  query: queryParameters,
564
624
  body: SetPartnerDesignDefaultsRequestToJSON(requestParameters['setPartnerDesignDefaultsRequest']),
565
625
  }, initOverrides);
566
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
626
+ return new runtime.JSONApiResponse(response, (jsonValue) => DesignDefaultsResponseFromJSON(jsonValue));
567
627
  }
568
628
  /**
569
629
  * Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
@@ -601,7 +661,7 @@ export class ManagedUsersApi extends runtime.BaseAPI {
601
661
  query: queryParameters,
602
662
  body: SetManagedUserLimitsRequestToJSON(requestParameters['setManagedUserLimitsRequest']),
603
663
  }, initOverrides);
604
- return new runtime.JSONApiResponse(response, (jsonValue) => GetManagedUserLimits200ResponseFromJSON(jsonValue));
664
+ return new runtime.JSONApiResponse(response, (jsonValue) => ManagedUserLimitsResponseFromJSON(jsonValue));
605
665
  }
606
666
  /**
607
667
  * Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer\'s editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer\'s sessions spent that month (refunded credits do not count) and applies to all of the customer\'s sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
@@ -656,3 +716,10 @@ export class ManagedUsersApi extends runtime.BaseAPI {
656
716
  return await response.value();
657
717
  }
658
718
  }
719
+ /**
720
+ * @export
721
+ */
722
+ export const ListManagedUserEntriesOrderEnum = {
723
+ Asc: 'asc',
724
+ Desc: 'desc'
725
+ };
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { OperationsIdGetResponseFromJSON, } from '../models/index.js';
15
+ import { GetOperationResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -21,9 +21,9 @@ export class OperationsApi extends runtime.BaseAPI {
21
21
  * Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else\'s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
22
22
  * Get operation status
23
23
  */
24
- async operationsIdGetRaw(requestParameters, initOverrides) {
24
+ async getOperationRaw(requestParameters, initOverrides) {
25
25
  if (requestParameters['id'] == null) {
26
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling operationsIdGet().');
26
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOperation().');
27
27
  }
28
28
  const queryParameters = {};
29
29
  const headerParameters = {};
@@ -40,14 +40,14 @@ export class OperationsApi extends runtime.BaseAPI {
40
40
  headers: headerParameters,
41
41
  query: queryParameters,
42
42
  }, initOverrides);
43
- return new runtime.JSONApiResponse(response, (jsonValue) => OperationsIdGetResponseFromJSON(jsonValue));
43
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetOperationResponseFromJSON(jsonValue));
44
44
  }
45
45
  /**
46
46
  * Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else\'s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
47
47
  * Get operation status
48
48
  */
49
- async operationsIdGet(requestParameters, initOverrides) {
50
- const response = await this.operationsIdGetRaw(requestParameters, initOverrides);
49
+ async getOperation(requestParameters, initOverrides) {
50
+ const response = await this.getOperationRaw(requestParameters, initOverrides);
51
51
  return await response.value();
52
52
  }
53
53
  }
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { AccountCreditBalanceResponseFromJSON, ConfirmAdapterConnectionRequestToJSON, GetPartnerBillingOverview200ResponseFromJSON, GetPartnerCreditTransactions200ResponseFromJSON, GetPartnerDesignDefaults200ResponseFromJSON, GetUserAdapterConnections200ResponseFromJSON, ListPartnerPresets200ResponseFromJSON, ListPartnerWorkflowPresets200ResponseFromJSON, MyPartnersResponseFromJSON, OfferWorkflowPresetRequestToJSON, PartnerAnalyticsByManagedUserResponseFromJSON, PartnerAnalyticsSummaryResponseFromJSON, PartnerAnalyticsTimelineResponseFromJSON, PartnerAnalyticsTopWidgetsResponseFromJSON, PartnerContractResponseFromJSON, PartnerDataDatabaseRemovalResponseFromJSON, PartnerDataDatabaseResponseFromJSON, PartnerEntryContextSecretResponseFromJSON, PartnerEntryContextSigningResponseFromJSON, PartnerExtraCreditsInvoiceResponseFromJSON, PartnerNotificationDeliveryLogResponseFromJSON, PartnerNotificationDeliveryResponseFromJSON, PartnerNotificationPageResponseFromJSON, PartnerNotificationSettingsChangeResponseFromJSON, PartnerNotificationSettingsResponseFromJSON, PartnerNotificationTestEventRequestToJSON, PartnerNotificationTestEventResultResponseFromJSON, PartnerPresetRemovalResponseFromJSON, PartnerPresetResponseFromJSON, PartnerStorageDestinationResponseFromJSON, PartnerStorageRemovalResponseFromJSON, PartnerStorageUsageResponseFromJSON, RemovePartnerWorkflowPreset200ResponseFromJSON, RemoveUserAdapterConnection200ResponseFromJSON, RequestExtraCreditsToJSON, SetAdapterConnectionRequestToJSON, SetPartnerDataDatabaseRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, SetPartnerPresetRequestToJSON, SetPartnerStorageDestinationRequestToJSON, SetPartnerWorkflowPreset200ResponseFromJSON, SetUserAdapterConnection200ResponseFromJSON, UpdatePartnerEntryContextSigningRequestToJSON, UpdatePartnerNotificationSettingsRequestToJSON, } from '../models/index.js';
15
+ import { AccountCreditBalanceResponseFromJSON, AccountCreditTransactionListResponseFromJSON, AdapterConnectionListResponseFromJSON, AdapterConnectionRemovalResponseFromJSON, AdapterConnectionResponseFromJSON, ConfirmAdapterConnectionRequestToJSON, DesignDefaultsResponseFromJSON, GetPartnerBillingOverview200ResponseFromJSON, ListPartnerPresets200ResponseFromJSON, ListPartnerWorkflowPresets200ResponseFromJSON, MyPartnersResponseFromJSON, OfferWorkflowPresetRequestToJSON, PartnerAnalyticsByManagedUserResponseFromJSON, PartnerAnalyticsSummaryResponseFromJSON, PartnerAnalyticsTimelineResponseFromJSON, PartnerAnalyticsTopWidgetsResponseFromJSON, PartnerContractResponseFromJSON, PartnerDataDatabaseRemovalResponseFromJSON, PartnerDataDatabaseResponseFromJSON, PartnerEntryContextSecretResponseFromJSON, PartnerEntryContextSigningResponseFromJSON, PartnerExtraCreditsInvoiceResponseFromJSON, PartnerNotificationDeliveryLogResponseFromJSON, PartnerNotificationDeliveryResponseFromJSON, PartnerNotificationPageResponseFromJSON, PartnerNotificationSettingsChangeResponseFromJSON, PartnerNotificationSettingsResponseFromJSON, PartnerNotificationTestEventRequestToJSON, PartnerNotificationTestEventResultResponseFromJSON, PartnerPresetRemovalResponseFromJSON, PartnerPresetResponseFromJSON, PartnerStorageDestinationResponseFromJSON, PartnerStorageRemovalResponseFromJSON, PartnerStorageUsageResponseFromJSON, RemovePartnerWorkflowPreset200ResponseFromJSON, RequestExtraCreditsToJSON, SetAdapterConnectionRequestToJSON, SetPartnerDataDatabaseRequestToJSON, SetPartnerDesignDefaultsRequestToJSON, SetPartnerPresetRequestToJSON, SetPartnerStorageDestinationRequestToJSON, SetPartnerWorkflowPreset200ResponseFromJSON, UpdatePartnerEntryContextSigningRequestToJSON, UpdatePartnerNotificationSettingsRequestToJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -51,7 +51,7 @@ export class PartnersApi extends runtime.BaseAPI {
51
51
  query: queryParameters,
52
52
  body: ConfirmAdapterConnectionRequestToJSON(requestParameters['confirmAdapterConnectionRequest']),
53
53
  }, initOverrides);
54
- return new runtime.JSONApiResponse(response, (jsonValue) => SetUserAdapterConnection200ResponseFromJSON(jsonValue));
54
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdapterConnectionResponseFromJSON(jsonValue));
55
55
  }
56
56
  /**
57
57
  * Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner\'s customers that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
@@ -158,7 +158,7 @@ export class PartnersApi extends runtime.BaseAPI {
158
158
  headers: headerParameters,
159
159
  query: queryParameters,
160
160
  }, initOverrides);
161
- return new runtime.JSONApiResponse(response, (jsonValue) => GetUserAdapterConnections200ResponseFromJSON(jsonValue));
161
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdapterConnectionListResponseFromJSON(jsonValue));
162
162
  }
163
163
  /**
164
164
  * Widget adapters are capabilities a widget can use, and some of them act through a service the account that made the widget has with a provider: an adapter that sends email needs an email provider key, one that sends texts needs an SMS provider key. For the widgets of the customers a partner manages, those keys are the partner\'s. This lists every key an adapter takes from a partner and whether the partner has connected it. An empty list means no adapter takes a key from a partner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setPartnerAdapterConnection`; take it away with `removePartnerAdapterConnection`. A managed customer never holds a key: the widgets of a managed customer use the partner\'s, and never the personal key of the person who administers the partner. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
@@ -482,7 +482,7 @@ export class PartnersApi extends runtime.BaseAPI {
482
482
  headers: headerParameters,
483
483
  query: queryParameters,
484
484
  }, initOverrides);
485
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerCreditTransactions200ResponseFromJSON(jsonValue));
485
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreditTransactionListResponseFromJSON(jsonValue));
486
486
  }
487
487
  /**
488
488
  * Lists what happened to the partner\'s credits, newest first: the entries of the credit ledger of the account of the person who administers it, the one account a partner has for its credits. Every operation that spends credits is a `debit` entry, and the credits an invoice carried arrive as `credit` entries when the invoice is paid, so this is also how the partner\'s usage is read. It is the same ledger `getUserCreditTransactions` reads for that person. A partner with no administrator has no account, and an empty ledger. The page is always bounded: `limit` defaults to 20 and is capped at 100, `offset` defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
@@ -547,7 +547,7 @@ export class PartnersApi extends runtime.BaseAPI {
547
547
  headers: headerParameters,
548
548
  query: queryParameters,
549
549
  }, initOverrides);
550
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
550
+ return new runtime.JSONApiResponse(response, (jsonValue) => DesignDefaultsResponseFromJSON(jsonValue));
551
551
  }
552
552
  /**
553
553
  * Read partner-wide design defaults
@@ -656,7 +656,7 @@ export class PartnersApi extends runtime.BaseAPI {
656
656
  return await response.value();
657
657
  }
658
658
  /**
659
- * Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic\'s storage and how much in your own storage destination (`setPartnerStorageDestination`). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming `managed_user_id` or `managed_user_external_id` when you upload it (`uploadsPost`, or the metadata of a resumable upload), or because it was uploaded through that user\'s editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose `managedUserId` is null. Deleted files are not counted. To list the files of one managed user, use the `managed_user_id` filter of `uploadsGet`. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and `page.hasMore` says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
659
+ * Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic\'s storage and how much in your own storage destination (`setPartnerStorageDestination`). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming `managed_user_id` or `managed_user_external_id` when you upload it (`uploadFile`, or the metadata of a resumable upload), or because it was uploaded through that user\'s editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose `managedUserId` is null. Deleted files are not counted. To list the files of one managed user, use the `managed_user_id` filter of `listUploads`. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and `page.hasMore` says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
660
660
  * What a partner\'s customers store
661
661
  */
662
662
  async getPartnerStorageUsageRaw(requestParameters, initOverrides) {
@@ -687,7 +687,7 @@ export class PartnersApi extends runtime.BaseAPI {
687
687
  return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStorageUsageResponseFromJSON(jsonValue));
688
688
  }
689
689
  /**
690
- * Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic\'s storage and how much in your own storage destination (`setPartnerStorageDestination`). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming `managed_user_id` or `managed_user_external_id` when you upload it (`uploadsPost`, or the metadata of a resumable upload), or because it was uploaded through that user\'s editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose `managedUserId` is null. Deleted files are not counted. To list the files of one managed user, use the `managed_user_id` filter of `uploadsGet`. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and `page.hasMore` says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
690
+ * Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic\'s storage and how much in your own storage destination (`setPartnerStorageDestination`). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming `managed_user_id` or `managed_user_external_id` when you upload it (`uploadFile`, or the metadata of a resumable upload), or because it was uploaded through that user\'s editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose `managedUserId` is null. Deleted files are not counted. To list the files of one managed user, use the `managed_user_id` filter of `listUploads`. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and `page.hasMore` says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
691
691
  * What a partner\'s customers store
692
692
  */
693
693
  async getPartnerStorageUsage(requestParameters, initOverrides) {
@@ -864,7 +864,7 @@ export class PartnersApi extends runtime.BaseAPI {
864
864
  headers: headerParameters,
865
865
  query: queryParameters,
866
866
  }, initOverrides);
867
- return new runtime.JSONApiResponse(response, (jsonValue) => RemoveUserAdapterConnection200ResponseFromJSON(jsonValue));
867
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdapterConnectionRemovalResponseFromJSON(jsonValue));
868
868
  }
869
869
  /**
870
870
  * Removes a key an adapter was given. The adapter stops working for the widgets of the partner\'s customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
@@ -1210,7 +1210,7 @@ export class PartnersApi extends runtime.BaseAPI {
1210
1210
  query: queryParameters,
1211
1211
  body: SetAdapterConnectionRequestToJSON(requestParameters['setAdapterConnectionRequest']),
1212
1212
  }, initOverrides);
1213
- return new runtime.JSONApiResponse(response, (jsonValue) => SetUserAdapterConnection200ResponseFromJSON(jsonValue));
1213
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdapterConnectionResponseFromJSON(jsonValue));
1214
1214
  }
1215
1215
  /**
1216
1216
  * Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmPartnerAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to do. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
@@ -1286,7 +1286,7 @@ export class PartnersApi extends runtime.BaseAPI {
1286
1286
  query: queryParameters,
1287
1287
  body: SetPartnerDesignDefaultsRequestToJSON(requestParameters['setPartnerDesignDefaultsRequest']),
1288
1288
  }, initOverrides);
1289
- return new runtime.JSONApiResponse(response, (jsonValue) => GetPartnerDesignDefaults200ResponseFromJSON(jsonValue));
1289
+ return new runtime.JSONApiResponse(response, (jsonValue) => DesignDefaultsResponseFromJSON(jsonValue));
1290
1290
  }
1291
1291
  /**
1292
1292
  * Send `{ \"design\": { ... } }` or `{ \"design\": null }` to remove. New compositions merge this layer over the widget base and under each managed user\'s default and the request body.
@@ -1338,7 +1338,7 @@ export class PartnersApi extends runtime.BaseAPI {
1338
1338
  return await response.value();
1339
1339
  }
1340
1340
  /**
1341
- * Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadsPost` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account\'s storage allowance, and its `url` is served from `publicBaseUrl`. The chunks of a resumable upload wait in Widgetic\'s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers\' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<keyPrefix>widgetic-check/`, reads it back from `<publicBaseUrl>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `publicBaseUrl`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1341
+ * Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadFile` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account\'s storage allowance, and its `url` is served from `publicBaseUrl`. The chunks of a resumable upload wait in Widgetic\'s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers\' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<keyPrefix>widgetic-check/`, reads it back from `<publicBaseUrl>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `publicBaseUrl`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1342
1342
  * Set where a partner\'s uploaded files are stored
1343
1343
  */
1344
1344
  async setPartnerStorageDestinationRaw(requestParameters, initOverrides) {
@@ -1368,7 +1368,7 @@ export class PartnersApi extends runtime.BaseAPI {
1368
1368
  return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStorageDestinationResponseFromJSON(jsonValue));
1369
1369
  }
1370
1370
  /**
1371
- * Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadsPost` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account\'s storage allowance, and its `url` is served from `publicBaseUrl`. The chunks of a resumable upload wait in Widgetic\'s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers\' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<keyPrefix>widgetic-check/`, reads it back from `<publicBaseUrl>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `publicBaseUrl`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1371
+ * Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadFile` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account\'s storage allowance, and its `url` is served from `publicBaseUrl`. The chunks of a resumable upload wait in Widgetic\'s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers\' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<keyPrefix>widgetic-check/`, reads it back from `<publicBaseUrl>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `publicBaseUrl`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner\'s.
1372
1372
  * Set where a partner\'s uploaded files are stored
1373
1373
  */
1374
1374
  async setPartnerStorageDestination(requestParameters, initOverrides) {