@widgetic/api-sdk-ts 1.11.111 → 2.0.1
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.
- package/README.md +1 -1
- package/dist/apis/BrandKitApi.d.ts +40 -40
- package/dist/apis/BrandKitApi.js +40 -40
- package/dist/apis/CanvasesApi.d.ts +15 -15
- package/dist/apis/CompositionsApi.d.ts +255 -155
- package/dist/apis/CompositionsApi.js +333 -133
- package/dist/apis/CreditsApi.d.ts +7 -7
- package/dist/apis/CreditsApi.js +1 -1
- package/dist/apis/EntitlementsApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.js +2 -2
- package/dist/apis/ManagedUsersApi.d.ts +97 -63
- package/dist/apis/ManagedUsersApi.js +106 -39
- package/dist/apis/OperationsApi.d.ts +4 -4
- package/dist/apis/OperationsApi.js +5 -5
- package/dist/apis/PartnersApi.d.ts +125 -125
- package/dist/apis/PartnersApi.js +11 -11
- package/dist/apis/PublicEmbedApi.d.ts +42 -42
- package/dist/apis/PublicEmbedApi.js +29 -29
- package/dist/apis/TokensApi.d.ts +2 -0
- package/dist/apis/TokensApi.js +2 -0
- package/dist/apis/UploadsApi.d.ts +38 -38
- package/dist/apis/UploadsApi.js +60 -60
- package/dist/apis/UsersApi.d.ts +40 -40
- package/dist/apis/UsersApi.js +4 -4
- package/dist/apis/WidgetsApi.d.ts +23 -23
- package/dist/apis/WidgetsApi.js +36 -36
- package/dist/apis/WorkflowsApi.d.ts +85 -127
- package/dist/apis/WorkflowsApi.js +82 -192
- package/dist/apis/index.d.ts +0 -2
- package/dist/apis/index.js +0 -2
- package/dist/esm/apis/BrandKitApi.js +39 -39
- package/dist/esm/apis/CompositionsApi.js +333 -133
- package/dist/esm/apis/CreditsApi.js +2 -2
- package/dist/esm/apis/InvoicesApi.js +1 -1
- package/dist/esm/apis/ManagedUsersApi.js +106 -39
- package/dist/esm/apis/OperationsApi.js +6 -6
- package/dist/esm/apis/PartnersApi.js +12 -12
- package/dist/esm/apis/PublicEmbedApi.js +30 -30
- package/dist/esm/apis/TokensApi.js +2 -0
- package/dist/esm/apis/UploadsApi.js +60 -60
- package/dist/esm/apis/UsersApi.js +5 -5
- package/dist/esm/apis/WidgetsApi.js +37 -37
- package/dist/esm/apis/WorkflowsApi.js +82 -192
- package/dist/esm/apis/index.js +0 -2
- package/dist/esm/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +8 -8
- package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +8 -8
- package/dist/esm/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +8 -8
- package/dist/esm/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +8 -8
- package/dist/esm/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +8 -8
- package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
- package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
- package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
- package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
- package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
- package/dist/esm/models/GetOperationResponse.js +51 -0
- package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +12 -11
- package/dist/esm/models/GetOperationResponseDataMetadata.js +58 -0
- package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
- package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
- package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
- package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +11 -0
- package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
- package/dist/esm/models/WidgetClarification.js +52 -0
- package/dist/esm/models/WidgetClarificationOption.js +51 -0
- package/dist/esm/models/WidgetClarificationQuestion.js +60 -0
- package/dist/esm/models/WidgetNextStep.js +67 -0
- package/dist/esm/models/WidgetPlan.js +61 -0
- package/dist/esm/models/WidgetPlanDecisions.js +68 -0
- package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
- package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
- package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
- package/dist/esm/models/WidgetPlanTask.js +80 -0
- package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
- package/dist/esm/models/WorkflowFailureReason.js +49 -0
- package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
- package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
- package/dist/esm/models/WorkflowStats.js +3 -0
- package/dist/esm/models/index.js +31 -19
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
- package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
- package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
- package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
- package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
- package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
- package/dist/models/AdapterConnectionResponse.d.ts +46 -0
- package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
- package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
- package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
- package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
- package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
- package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
- package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
- package/dist/models/DeleteUpload200Response.d.ts +46 -0
- package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
- package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
- package/dist/models/DeleteUpload200ResponseData.js +48 -0
- package/dist/models/DesignDefaultsResponse.d.ts +46 -0
- package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
- package/dist/models/GetOperationResponse.d.ts +46 -0
- package/dist/models/GetOperationResponse.js +58 -0
- package/dist/models/GetOperationResponseData.d.ts +86 -0
- package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
- package/dist/models/GetOperationResponseDataMetadata.d.ts +65 -0
- package/dist/models/GetOperationResponseDataMetadata.js +66 -0
- package/dist/models/ListUploads200Response.d.ts +46 -0
- package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
- package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
- package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
- package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
- package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
- package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
- package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
- package/dist/models/PublicWorkflowResponse.d.ts +46 -0
- package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
- package/dist/models/Upload.d.ts +1 -1
- package/dist/models/UploadLimits.d.ts +3 -3
- package/dist/models/WidgetClarification.d.ts +45 -0
- package/dist/models/WidgetClarification.js +59 -0
- package/dist/models/WidgetClarificationOption.d.ts +44 -0
- package/dist/models/WidgetClarificationOption.js +58 -0
- package/dist/models/WidgetClarificationQuestion.d.ts +57 -0
- package/dist/models/WidgetClarificationQuestion.js +67 -0
- package/dist/models/WidgetNextStep.d.ts +63 -0
- package/dist/models/WidgetNextStep.js +75 -0
- package/dist/models/WidgetPlan.d.ts +58 -0
- package/dist/models/WidgetPlan.js +68 -0
- package/dist/models/WidgetPlanDecisions.d.ts +71 -0
- package/dist/models/WidgetPlanDecisions.js +75 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
- package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
- package/dist/models/WidgetPlanTask.d.ts +77 -0
- package/dist/models/WidgetPlanTask.js +88 -0
- package/dist/models/WorkflowDetailResponse.d.ts +46 -0
- package/dist/models/WorkflowDetailResponse.js +58 -0
- package/dist/models/WorkflowFailureReason.d.ts +31 -0
- package/dist/models/WorkflowFailureReason.js +57 -0
- package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
- package/dist/models/WorkflowFailureReasonCounter.js +59 -0
- package/dist/models/WorkflowResponse.d.ts +46 -0
- package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
- package/dist/models/WorkflowStats.d.ts +16 -1
- package/dist/models/WorkflowStats.js +3 -0
- package/dist/models/index.d.ts +31 -19
- package/dist/models/index.js +31 -19
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/apis/PartnerApi.d.ts +0 -2707
- package/dist/apis/PartnerApi.js +0 -7073
- package/dist/apis/WorkspacesApi.d.ts +0 -352
- package/dist/apis/WorkspacesApi.js +0 -946
- package/dist/esm/apis/PartnerApi.js +0 -7036
- package/dist/esm/apis/WorkspacesApi.js +0 -909
- package/dist/esm/models/CreateCompositionFromWidget201Response.js +0 -51
- package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
- package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
- package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
- package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
- package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
- package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
- package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
- package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
- package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
- package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
- package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
- package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
- package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
- package/dist/models/OperationsIdGetResponse.d.ts +0 -46
- package/dist/models/OperationsIdGetResponseData.d.ts +0 -88
- package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
- package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
- package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
- package/dist/models/UploadsGet200Response.d.ts +0 -46
- package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
- package/dist/models/UploadsIdDelete200Response.js +0 -58
- package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
- package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
|
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
};
|
|
47
47
|
})();
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.ManagedUsersApi = void 0;
|
|
49
|
+
exports.ListManagedUserEntriesOrderEnum = exports.ManagedUsersApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
51
|
const index_1 = require("../models/index");
|
|
52
52
|
/**
|
|
@@ -134,7 +134,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
134
134
|
query: queryParameters,
|
|
135
135
|
body: (0, index_1.CreateCompositionFromPresetRequestToJSON)(requestParameters['createCompositionFromPresetRequest']),
|
|
136
136
|
}, initOverrides);
|
|
137
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionResponseFromJSON)(jsonValue));
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* 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.
|
|
@@ -145,19 +145,22 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
145
145
|
return await response.value();
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
149
|
-
* Create
|
|
148
|
+
* 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.
|
|
149
|
+
* Create Managed User
|
|
150
150
|
*/
|
|
151
|
-
async
|
|
152
|
-
if (requestParameters['
|
|
153
|
-
throw new runtime.RequiredError('
|
|
151
|
+
async createManagedUserRaw(requestParameters, initOverrides) {
|
|
152
|
+
if (requestParameters['idempotencyKey'] == null) {
|
|
153
|
+
throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createManagedUser().');
|
|
154
154
|
}
|
|
155
|
-
if (requestParameters['
|
|
156
|
-
throw new runtime.RequiredError('
|
|
155
|
+
if (requestParameters['newManagedUser'] == null) {
|
|
156
|
+
throw new runtime.RequiredError('newManagedUser', 'Required parameter "newManagedUser" was null or undefined when calling createManagedUser().');
|
|
157
157
|
}
|
|
158
158
|
const queryParameters = {};
|
|
159
159
|
const headerParameters = {};
|
|
160
160
|
headerParameters['Content-Type'] = 'application/json';
|
|
161
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
162
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
163
|
+
}
|
|
161
164
|
if (this.configuration && this.configuration.accessToken) {
|
|
162
165
|
const token = this.configuration.accessToken;
|
|
163
166
|
const tokenString = await token("apiKeyAuth", []);
|
|
@@ -166,39 +169,36 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
171
|
const response = await this.request({
|
|
169
|
-
path: `/managed-users
|
|
172
|
+
path: `/managed-users`,
|
|
170
173
|
method: 'POST',
|
|
171
174
|
headers: headerParameters,
|
|
172
175
|
query: queryParameters,
|
|
173
|
-
body: (0, index_1.
|
|
176
|
+
body: (0, index_1.NewManagedUserToJSON)(requestParameters['newManagedUser']),
|
|
174
177
|
}, initOverrides);
|
|
175
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
178
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagedUserResponseFromJSON)(jsonValue));
|
|
176
179
|
}
|
|
177
180
|
/**
|
|
178
|
-
*
|
|
179
|
-
* Create
|
|
181
|
+
* 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.
|
|
182
|
+
* Create Managed User
|
|
180
183
|
*/
|
|
181
|
-
async
|
|
182
|
-
const response = await this.
|
|
184
|
+
async createManagedUser(requestParameters, initOverrides) {
|
|
185
|
+
const response = await this.createManagedUserRaw(requestParameters, initOverrides);
|
|
183
186
|
return await response.value();
|
|
184
187
|
}
|
|
185
188
|
/**
|
|
186
|
-
*
|
|
187
|
-
* Create
|
|
189
|
+
* 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`.
|
|
190
|
+
* Create an editor session for a managed user
|
|
188
191
|
*/
|
|
189
|
-
async
|
|
190
|
-
if (requestParameters['
|
|
191
|
-
throw new runtime.RequiredError('
|
|
192
|
+
async createManagedUserEditorSessionRaw(requestParameters, initOverrides) {
|
|
193
|
+
if (requestParameters['id'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createManagedUserEditorSession().');
|
|
192
195
|
}
|
|
193
|
-
if (requestParameters['
|
|
194
|
-
throw new runtime.RequiredError('
|
|
196
|
+
if (requestParameters['newEditorSession'] == null) {
|
|
197
|
+
throw new runtime.RequiredError('newEditorSession', 'Required parameter "newEditorSession" was null or undefined when calling createManagedUserEditorSession().');
|
|
195
198
|
}
|
|
196
199
|
const queryParameters = {};
|
|
197
200
|
const headerParameters = {};
|
|
198
201
|
headerParameters['Content-Type'] = 'application/json';
|
|
199
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
200
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
201
|
-
}
|
|
202
202
|
if (this.configuration && this.configuration.accessToken) {
|
|
203
203
|
const token = this.configuration.accessToken;
|
|
204
204
|
const tokenString = await token("apiKeyAuth", []);
|
|
@@ -207,20 +207,20 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
const response = await this.request({
|
|
210
|
-
path: `/managed-users`,
|
|
210
|
+
path: `/managed-users/{id}/editor-sessions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
211
211
|
method: 'POST',
|
|
212
212
|
headers: headerParameters,
|
|
213
213
|
query: queryParameters,
|
|
214
|
-
body: (0, index_1.
|
|
214
|
+
body: (0, index_1.NewEditorSessionToJSON)(requestParameters['newEditorSession']),
|
|
215
215
|
}, initOverrides);
|
|
216
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
216
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EditorSessionResponseFromJSON)(jsonValue));
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
220
|
-
* Create
|
|
219
|
+
* 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`.
|
|
220
|
+
* Create an editor session for a managed user
|
|
221
221
|
*/
|
|
222
|
-
async
|
|
223
|
-
const response = await this.
|
|
222
|
+
async createManagedUserEditorSession(requestParameters, initOverrides) {
|
|
223
|
+
const response = await this.createManagedUserEditorSessionRaw(requestParameters, initOverrides);
|
|
224
224
|
return await response.value();
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
@@ -246,7 +246,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
246
246
|
headers: headerParameters,
|
|
247
247
|
query: queryParameters,
|
|
248
248
|
}, initOverrides);
|
|
249
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
249
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagedUserRemovalResponseFromJSON)(jsonValue));
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* 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.
|
|
@@ -350,7 +350,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
350
350
|
headers: headerParameters,
|
|
351
351
|
query: queryParameters,
|
|
352
352
|
}, initOverrides);
|
|
353
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
353
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DesignDefaultsResponseFromJSON)(jsonValue));
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
356
|
* Read design defaults for one managed user
|
|
@@ -381,7 +381,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
381
381
|
headers: headerParameters,
|
|
382
382
|
query: queryParameters,
|
|
383
383
|
}, initOverrides);
|
|
384
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
384
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagedUserLimitsResponseFromJSON)(jsonValue));
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
* Read monthly credit cap and usage for one managed user
|
|
@@ -502,6 +502,66 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
502
502
|
const response = await this.getManagedUsersByManagerIdRaw(requestParameters, initOverrides);
|
|
503
503
|
return await response.value();
|
|
504
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* 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.
|
|
507
|
+
* List entries across a managed user\'s compositions
|
|
508
|
+
*/
|
|
509
|
+
async listManagedUserEntriesRaw(requestParameters, initOverrides) {
|
|
510
|
+
if (requestParameters['id'] == null) {
|
|
511
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listManagedUserEntries().');
|
|
512
|
+
}
|
|
513
|
+
const queryParameters = {};
|
|
514
|
+
if (requestParameters['compositionId'] != null) {
|
|
515
|
+
queryParameters['compositionId'] = requestParameters['compositionId'];
|
|
516
|
+
}
|
|
517
|
+
if (requestParameters['table'] != null) {
|
|
518
|
+
queryParameters['table'] = requestParameters['table'];
|
|
519
|
+
}
|
|
520
|
+
if (requestParameters['limit'] != null) {
|
|
521
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
522
|
+
}
|
|
523
|
+
if (requestParameters['order'] != null) {
|
|
524
|
+
queryParameters['order'] = requestParameters['order'];
|
|
525
|
+
}
|
|
526
|
+
if (requestParameters['since'] != null) {
|
|
527
|
+
queryParameters['since'] = requestParameters['since'].toISOString();
|
|
528
|
+
}
|
|
529
|
+
if (requestParameters['until'] != null) {
|
|
530
|
+
queryParameters['until'] = requestParameters['until'].toISOString();
|
|
531
|
+
}
|
|
532
|
+
if (requestParameters['cursor'] != null) {
|
|
533
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
534
|
+
}
|
|
535
|
+
if (requestParameters['context'] != null) {
|
|
536
|
+
queryParameters['context'] = requestParameters['context'];
|
|
537
|
+
}
|
|
538
|
+
if (requestParameters['filter'] != null) {
|
|
539
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
540
|
+
}
|
|
541
|
+
const headerParameters = {};
|
|
542
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
543
|
+
const token = this.configuration.accessToken;
|
|
544
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
545
|
+
if (tokenString) {
|
|
546
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
const response = await this.request({
|
|
550
|
+
path: `/managed-users/{id}/entries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
551
|
+
method: 'GET',
|
|
552
|
+
headers: headerParameters,
|
|
553
|
+
query: queryParameters,
|
|
554
|
+
}, initOverrides);
|
|
555
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagedUserEntriesPageSuccessFromJSON)(jsonValue));
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* 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.
|
|
559
|
+
* List entries across a managed user\'s compositions
|
|
560
|
+
*/
|
|
561
|
+
async listManagedUserEntries(requestParameters, initOverrides) {
|
|
562
|
+
const response = await this.listManagedUserEntriesRaw(requestParameters, initOverrides);
|
|
563
|
+
return await response.value();
|
|
564
|
+
}
|
|
505
565
|
/**
|
|
506
566
|
* 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.
|
|
507
567
|
* End one editor session of a managed user
|
|
@@ -528,7 +588,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
528
588
|
headers: headerParameters,
|
|
529
589
|
query: queryParameters,
|
|
530
590
|
}, initOverrides);
|
|
531
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
591
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagedUserRemovalResponseFromJSON)(jsonValue));
|
|
532
592
|
}
|
|
533
593
|
/**
|
|
534
594
|
* 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.
|
|
@@ -599,7 +659,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
599
659
|
query: queryParameters,
|
|
600
660
|
body: (0, index_1.SetPartnerDesignDefaultsRequestToJSON)(requestParameters['setPartnerDesignDefaultsRequest']),
|
|
601
661
|
}, initOverrides);
|
|
602
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
662
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DesignDefaultsResponseFromJSON)(jsonValue));
|
|
603
663
|
}
|
|
604
664
|
/**
|
|
605
665
|
* 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.
|
|
@@ -637,7 +697,7 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
637
697
|
query: queryParameters,
|
|
638
698
|
body: (0, index_1.SetManagedUserLimitsRequestToJSON)(requestParameters['setManagedUserLimitsRequest']),
|
|
639
699
|
}, initOverrides);
|
|
640
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
700
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ManagedUserLimitsResponseFromJSON)(jsonValue));
|
|
641
701
|
}
|
|
642
702
|
/**
|
|
643
703
|
* 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.
|
|
@@ -693,3 +753,10 @@ class ManagedUsersApi extends runtime.BaseAPI {
|
|
|
693
753
|
}
|
|
694
754
|
}
|
|
695
755
|
exports.ManagedUsersApi = ManagedUsersApi;
|
|
756
|
+
/**
|
|
757
|
+
* @export
|
|
758
|
+
*/
|
|
759
|
+
exports.ListManagedUserEntriesOrderEnum = {
|
|
760
|
+
Asc: 'asc',
|
|
761
|
+
Desc: 'desc'
|
|
762
|
+
};
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
14
|
-
export interface
|
|
13
|
+
import type { GetOperationResponse } from '../models/index';
|
|
14
|
+
export interface GetOperationRequest {
|
|
15
15
|
id: string;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -22,10 +22,10 @@ export declare class OperationsApi extends runtime.BaseAPI {
|
|
|
22
22
|
* 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.
|
|
23
23
|
* Get operation status
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
getOperationRaw(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetOperationResponse>>;
|
|
26
26
|
/**
|
|
27
27
|
* 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.
|
|
28
28
|
* Get operation status
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
getOperation(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetOperationResponse>;
|
|
31
31
|
}
|
|
@@ -57,9 +57,9 @@ class OperationsApi extends runtime.BaseAPI {
|
|
|
57
57
|
* 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.
|
|
58
58
|
* Get operation status
|
|
59
59
|
*/
|
|
60
|
-
async
|
|
60
|
+
async getOperationRaw(requestParameters, initOverrides) {
|
|
61
61
|
if (requestParameters['id'] == null) {
|
|
62
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
62
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOperation().');
|
|
63
63
|
}
|
|
64
64
|
const queryParameters = {};
|
|
65
65
|
const headerParameters = {};
|
|
@@ -76,14 +76,14 @@ class OperationsApi extends runtime.BaseAPI {
|
|
|
76
76
|
headers: headerParameters,
|
|
77
77
|
query: queryParameters,
|
|
78
78
|
}, initOverrides);
|
|
79
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
79
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetOperationResponseFromJSON)(jsonValue));
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
82
|
* 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.
|
|
83
83
|
* Get operation status
|
|
84
84
|
*/
|
|
85
|
-
async
|
|
86
|
-
const response = await this.
|
|
85
|
+
async getOperation(requestParameters, initOverrides) {
|
|
86
|
+
const response = await this.getOperationRaw(requestParameters, initOverrides);
|
|
87
87
|
return await response.value();
|
|
88
88
|
}
|
|
89
89
|
}
|