@widgetic/api-sdk 1.0.19 → 1.0.21

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 (41) hide show
  1. package/dist/apis/AgentApi.d.ts +15 -3
  2. package/dist/apis/AgentApi.js +40 -2
  3. package/dist/apis/CanvasesApi.d.ts +14 -1
  4. package/dist/apis/CanvasesApi.js +37 -0
  5. package/dist/esm/apis/AgentApi.d.ts +15 -3
  6. package/dist/esm/apis/AgentApi.js +41 -3
  7. package/dist/esm/apis/CanvasesApi.d.ts +14 -1
  8. package/dist/esm/apis/CanvasesApi.js +38 -1
  9. package/dist/esm/models/AgentWidgetBuilderPublishWidgetIdPostRequest.d.ts +6 -0
  10. package/dist/esm/models/AgentWidgetBuilderPublishWidgetIdPostRequest.js +2 -0
  11. package/dist/esm/models/PreviewDeleteCanvas200Response.d.ts +33 -0
  12. package/dist/esm/models/PreviewDeleteCanvas200Response.js +42 -0
  13. package/dist/esm/models/PreviewDeleteCanvas200ResponseData.d.ts +45 -0
  14. package/dist/esm/models/PreviewDeleteCanvas200ResponseData.js +46 -0
  15. package/dist/esm/models/PreviewDeleteCanvas200ResponseDataGroupsInner.d.ts +44 -0
  16. package/dist/esm/models/PreviewDeleteCanvas200ResponseDataGroupsInner.js +45 -0
  17. package/dist/esm/models/PreviewWidgetVersion200Response.d.ts +39 -0
  18. package/dist/esm/models/PreviewWidgetVersion200Response.js +48 -0
  19. package/dist/esm/models/PreviewWidgetVersion200ResponseData.d.ts +56 -0
  20. package/dist/esm/models/PreviewWidgetVersion200ResponseData.js +57 -0
  21. package/dist/esm/models/UpdateWidgetRequest.d.ts +6 -0
  22. package/dist/esm/models/UpdateWidgetRequest.js +2 -0
  23. package/dist/esm/models/index.d.ts +5 -0
  24. package/dist/esm/models/index.js +5 -0
  25. package/dist/models/AgentWidgetBuilderPublishWidgetIdPostRequest.d.ts +6 -0
  26. package/dist/models/AgentWidgetBuilderPublishWidgetIdPostRequest.js +2 -0
  27. package/dist/models/PreviewDeleteCanvas200Response.d.ts +33 -0
  28. package/dist/models/PreviewDeleteCanvas200Response.js +49 -0
  29. package/dist/models/PreviewDeleteCanvas200ResponseData.d.ts +45 -0
  30. package/dist/models/PreviewDeleteCanvas200ResponseData.js +53 -0
  31. package/dist/models/PreviewDeleteCanvas200ResponseDataGroupsInner.d.ts +44 -0
  32. package/dist/models/PreviewDeleteCanvas200ResponseDataGroupsInner.js +52 -0
  33. package/dist/models/PreviewWidgetVersion200Response.d.ts +39 -0
  34. package/dist/models/PreviewWidgetVersion200Response.js +55 -0
  35. package/dist/models/PreviewWidgetVersion200ResponseData.d.ts +56 -0
  36. package/dist/models/PreviewWidgetVersion200ResponseData.js +64 -0
  37. package/dist/models/UpdateWidgetRequest.d.ts +6 -0
  38. package/dist/models/UpdateWidgetRequest.js +2 -0
  39. package/dist/models/index.d.ts +5 -0
  40. package/dist/models/index.js +5 -0
  41. package/package.json +1 -1
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentCodeGeneratePost202Response, AgentCodeModifyPost202Response, AgentComponentsComponentIdTasksCleanupPost200Response, AgentModelsGet200Response, AgentTasksIdCancelPost200Response, AgentTasksTaskIdStatusPutRequest, AgentWidgetBuilderPublishWidgetIdPost200Response, AgentWidgetBuilderPublishWidgetIdPostRequest, AgentWidgetBuilderRepoHeadWidgetIdGet200Response, CodeGenerationStatusResponse, CreateTaskPlanRequest, DevelopmentPlan, DevelopmentTask, GenerateCodeRequest, InitRepoRequest, ModifyCodeRequest, RepositoryResponse } from '../models/index';
13
+ import type { AgentCodeGeneratePost202Response, AgentCodeModifyPost202Response, AgentComponentsComponentIdTasksCleanupPost200Response, AgentModelsGet200Response, AgentTasksIdCancelPost200Response, AgentTasksTaskIdStatusPutRequest, AgentWidgetBuilderPublishWidgetIdPost200Response, AgentWidgetBuilderPublishWidgetIdPostRequest, AgentWidgetBuilderRepoHeadWidgetIdGet200Response, CodeGenerationStatusResponse, CreateTaskPlanRequest, DevelopmentPlan, DevelopmentTask, GenerateCodeRequest, InitRepoRequest, ModifyCodeRequest, PreviewWidgetVersion200Response, RepositoryResponse } from '../models/index';
14
14
  export interface AgentCodeGeneratePostRequest {
15
15
  generateCodeRequest: GenerateCodeRequest;
16
16
  }
@@ -50,6 +50,10 @@ export interface AgentWidgetBuilderPublishWidgetIdPostOperationRequest {
50
50
  export interface AgentWidgetBuilderRepoHeadWidgetIdGetRequest {
51
51
  widgetId: string;
52
52
  }
53
+ export interface PreviewWidgetVersionRequest {
54
+ widgetId: string;
55
+ version: number;
56
+ }
53
57
  /**
54
58
  *
55
59
  */
@@ -161,12 +165,12 @@ export declare class AgentApi extends runtime.BaseAPI {
161
165
  */
162
166
  agentTasksTaskIdStatusPut(requestParameters: AgentTasksTaskIdStatusPutOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DevelopmentTask>;
163
167
  /**
164
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
168
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
165
169
  * Publish a built widget to R2 storage
166
170
  */
167
171
  agentWidgetBuilderPublishWidgetIdPostRaw(requestParameters: AgentWidgetBuilderPublishWidgetIdPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentWidgetBuilderPublishWidgetIdPost200Response>>;
168
172
  /**
169
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
173
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
170
174
  * Publish a built widget to R2 storage
171
175
  */
172
176
  agentWidgetBuilderPublishWidgetIdPost(requestParameters: AgentWidgetBuilderPublishWidgetIdPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentWidgetBuilderPublishWidgetIdPost200Response>;
@@ -180,4 +184,12 @@ export declare class AgentApi extends runtime.BaseAPI {
180
184
  * Return the current GitLab repository HEAD commit SHA for a widget.
181
185
  */
182
186
  agentWidgetBuilderRepoHeadWidgetIdGet(requestParameters: AgentWidgetBuilderRepoHeadWidgetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentWidgetBuilderRepoHeadWidgetIdGet200Response>;
187
+ /**
188
+ * Build an isolated preview from a recorded version commit without publishing
189
+ */
190
+ previewWidgetVersionRaw(requestParameters: PreviewWidgetVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PreviewWidgetVersion200Response>>;
191
+ /**
192
+ * Build an isolated preview from a recorded version commit without publishing
193
+ */
194
+ previewWidgetVersion(requestParameters: PreviewWidgetVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewWidgetVersion200Response>;
183
195
  }
@@ -442,7 +442,7 @@ class AgentApi extends runtime.BaseAPI {
442
442
  });
443
443
  }
444
444
  /**
445
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
445
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
446
446
  * Publish a built widget to R2 storage
447
447
  */
448
448
  agentWidgetBuilderPublishWidgetIdPostRaw(requestParameters, initOverrides) {
@@ -474,7 +474,7 @@ class AgentApi extends runtime.BaseAPI {
474
474
  });
475
475
  }
476
476
  /**
477
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
477
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
478
478
  * Publish a built widget to R2 storage
479
479
  */
480
480
  agentWidgetBuilderPublishWidgetIdPost(requestParameters, initOverrides) {
@@ -520,5 +520,43 @@ class AgentApi extends runtime.BaseAPI {
520
520
  return yield response.value();
521
521
  });
522
522
  }
523
+ /**
524
+ * Build an isolated preview from a recorded version commit without publishing
525
+ */
526
+ previewWidgetVersionRaw(requestParameters, initOverrides) {
527
+ return __awaiter(this, void 0, void 0, function* () {
528
+ if (requestParameters['widgetId'] == null) {
529
+ throw new runtime.RequiredError('widgetId', 'Required parameter "widgetId" was null or undefined when calling previewWidgetVersion().');
530
+ }
531
+ if (requestParameters['version'] == null) {
532
+ throw new runtime.RequiredError('version', 'Required parameter "version" was null or undefined when calling previewWidgetVersion().');
533
+ }
534
+ const queryParameters = {};
535
+ const headerParameters = {};
536
+ if (this.configuration && this.configuration.accessToken) {
537
+ const token = this.configuration.accessToken;
538
+ const tokenString = yield token("bearerAuth", []);
539
+ if (tokenString) {
540
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
541
+ }
542
+ }
543
+ const response = yield this.request({
544
+ path: `/agent/widget-builder/version-preview/{widgetId}/{version}`.replace(`{${"widgetId"}}`, encodeURIComponent(String(requestParameters['widgetId']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))),
545
+ method: 'POST',
546
+ headers: headerParameters,
547
+ query: queryParameters,
548
+ }, initOverrides);
549
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PreviewWidgetVersion200ResponseFromJSON)(jsonValue));
550
+ });
551
+ }
552
+ /**
553
+ * Build an isolated preview from a recorded version commit without publishing
554
+ */
555
+ previewWidgetVersion(requestParameters, initOverrides) {
556
+ return __awaiter(this, void 0, void 0, function* () {
557
+ const response = yield this.previewWidgetVersionRaw(requestParameters, initOverrides);
558
+ return yield response.value();
559
+ });
560
+ }
523
561
  }
524
562
  exports.AgentApi = AgentApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { Canvas, CreateCanvasRequest, GetAllCanvases200Response, UpdateCanvasRequest } from '../models/index';
13
+ import type { Canvas, CreateCanvasRequest, GetAllCanvases200Response, PreviewDeleteCanvas200Response, UpdateCanvasRequest } from '../models/index';
14
14
  export interface CreateCanvasOperationRequest {
15
15
  createCanvasRequest: CreateCanvasRequest;
16
16
  }
@@ -31,6 +31,9 @@ export interface GetAllCanvasesRequest {
31
31
  export interface GetCanvasRequest {
32
32
  id: string;
33
33
  }
34
+ export interface PreviewDeleteCanvasRequest {
35
+ id: string;
36
+ }
34
37
  export interface UpdateCanvasOperationRequest {
35
38
  id: string;
36
39
  updateCanvasRequest: UpdateCanvasRequest;
@@ -79,6 +82,16 @@ export declare class CanvasesApi extends runtime.BaseAPI {
79
82
  * Get Canvas
80
83
  */
81
84
  getCanvas(requestParameters: GetCanvasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Canvas>;
85
+ /**
86
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
87
+ * Preview Canvas Deletion
88
+ */
89
+ previewDeleteCanvasRaw(requestParameters: PreviewDeleteCanvasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PreviewDeleteCanvas200Response>>;
90
+ /**
91
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
92
+ * Preview Canvas Deletion
93
+ */
94
+ previewDeleteCanvas(requestParameters: PreviewDeleteCanvasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewDeleteCanvas200Response>;
82
95
  /**
83
96
  * Updates an existing canvas with the specified properties.
84
97
  * Update Canvas
@@ -202,6 +202,43 @@ class CanvasesApi extends runtime.BaseAPI {
202
202
  return yield response.value();
203
203
  });
204
204
  }
205
+ /**
206
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
207
+ * Preview Canvas Deletion
208
+ */
209
+ previewDeleteCanvasRaw(requestParameters, initOverrides) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ if (requestParameters['id'] == null) {
212
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling previewDeleteCanvas().');
213
+ }
214
+ const queryParameters = {};
215
+ const headerParameters = {};
216
+ if (this.configuration && this.configuration.accessToken) {
217
+ const token = this.configuration.accessToken;
218
+ const tokenString = yield token("apiKeyAuth", []);
219
+ if (tokenString) {
220
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
221
+ }
222
+ }
223
+ const response = yield this.request({
224
+ path: `/canvases/{id}/delete-preview`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
225
+ method: 'GET',
226
+ headers: headerParameters,
227
+ query: queryParameters,
228
+ }, initOverrides);
229
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PreviewDeleteCanvas200ResponseFromJSON)(jsonValue));
230
+ });
231
+ }
232
+ /**
233
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
234
+ * Preview Canvas Deletion
235
+ */
236
+ previewDeleteCanvas(requestParameters, initOverrides) {
237
+ return __awaiter(this, void 0, void 0, function* () {
238
+ const response = yield this.previewDeleteCanvasRaw(requestParameters, initOverrides);
239
+ return yield response.value();
240
+ });
241
+ }
205
242
  /**
206
243
  * Updates an existing canvas with the specified properties.
207
244
  * Update Canvas
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentCodeGeneratePost202Response, AgentCodeModifyPost202Response, AgentComponentsComponentIdTasksCleanupPost200Response, AgentModelsGet200Response, AgentTasksIdCancelPost200Response, AgentTasksTaskIdStatusPutRequest, AgentWidgetBuilderPublishWidgetIdPost200Response, AgentWidgetBuilderPublishWidgetIdPostRequest, AgentWidgetBuilderRepoHeadWidgetIdGet200Response, CodeGenerationStatusResponse, CreateTaskPlanRequest, DevelopmentPlan, DevelopmentTask, GenerateCodeRequest, InitRepoRequest, ModifyCodeRequest, RepositoryResponse } from '../models/index';
13
+ import type { AgentCodeGeneratePost202Response, AgentCodeModifyPost202Response, AgentComponentsComponentIdTasksCleanupPost200Response, AgentModelsGet200Response, AgentTasksIdCancelPost200Response, AgentTasksTaskIdStatusPutRequest, AgentWidgetBuilderPublishWidgetIdPost200Response, AgentWidgetBuilderPublishWidgetIdPostRequest, AgentWidgetBuilderRepoHeadWidgetIdGet200Response, CodeGenerationStatusResponse, CreateTaskPlanRequest, DevelopmentPlan, DevelopmentTask, GenerateCodeRequest, InitRepoRequest, ModifyCodeRequest, PreviewWidgetVersion200Response, RepositoryResponse } from '../models/index';
14
14
  export interface AgentCodeGeneratePostRequest {
15
15
  generateCodeRequest: GenerateCodeRequest;
16
16
  }
@@ -50,6 +50,10 @@ export interface AgentWidgetBuilderPublishWidgetIdPostOperationRequest {
50
50
  export interface AgentWidgetBuilderRepoHeadWidgetIdGetRequest {
51
51
  widgetId: string;
52
52
  }
53
+ export interface PreviewWidgetVersionRequest {
54
+ widgetId: string;
55
+ version: number;
56
+ }
53
57
  /**
54
58
  *
55
59
  */
@@ -161,12 +165,12 @@ export declare class AgentApi extends runtime.BaseAPI {
161
165
  */
162
166
  agentTasksTaskIdStatusPut(requestParameters: AgentTasksTaskIdStatusPutOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DevelopmentTask>;
163
167
  /**
164
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
168
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
165
169
  * Publish a built widget to R2 storage
166
170
  */
167
171
  agentWidgetBuilderPublishWidgetIdPostRaw(requestParameters: AgentWidgetBuilderPublishWidgetIdPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentWidgetBuilderPublishWidgetIdPost200Response>>;
168
172
  /**
169
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
173
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
170
174
  * Publish a built widget to R2 storage
171
175
  */
172
176
  agentWidgetBuilderPublishWidgetIdPost(requestParameters: AgentWidgetBuilderPublishWidgetIdPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentWidgetBuilderPublishWidgetIdPost200Response>;
@@ -180,4 +184,12 @@ export declare class AgentApi extends runtime.BaseAPI {
180
184
  * Return the current GitLab repository HEAD commit SHA for a widget.
181
185
  */
182
186
  agentWidgetBuilderRepoHeadWidgetIdGet(requestParameters: AgentWidgetBuilderRepoHeadWidgetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentWidgetBuilderRepoHeadWidgetIdGet200Response>;
187
+ /**
188
+ * Build an isolated preview from a recorded version commit without publishing
189
+ */
190
+ previewWidgetVersionRaw(requestParameters: PreviewWidgetVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PreviewWidgetVersion200Response>>;
191
+ /**
192
+ * Build an isolated preview from a recorded version commit without publishing
193
+ */
194
+ previewWidgetVersion(requestParameters: PreviewWidgetVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewWidgetVersion200Response>;
183
195
  }
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { AgentCodeGeneratePost202ResponseFromJSON, AgentCodeModifyPost202ResponseFromJSON, AgentComponentsComponentIdTasksCleanupPost200ResponseFromJSON, AgentModelsGet200ResponseFromJSON, AgentTasksIdCancelPost200ResponseFromJSON, AgentTasksTaskIdStatusPutRequestToJSON, AgentWidgetBuilderPublishWidgetIdPost200ResponseFromJSON, AgentWidgetBuilderPublishWidgetIdPostRequestToJSON, AgentWidgetBuilderRepoHeadWidgetIdGet200ResponseFromJSON, CodeGenerationStatusResponseFromJSON, CreateTaskPlanRequestToJSON, DevelopmentPlanFromJSON, DevelopmentTaskFromJSON, GenerateCodeRequestToJSON, InitRepoRequestToJSON, ModifyCodeRequestToJSON, RepositoryResponseFromJSON, } from '../models/index.js';
24
+ import { AgentCodeGeneratePost202ResponseFromJSON, AgentCodeModifyPost202ResponseFromJSON, AgentComponentsComponentIdTasksCleanupPost200ResponseFromJSON, AgentModelsGet200ResponseFromJSON, AgentTasksIdCancelPost200ResponseFromJSON, AgentTasksTaskIdStatusPutRequestToJSON, AgentWidgetBuilderPublishWidgetIdPost200ResponseFromJSON, AgentWidgetBuilderPublishWidgetIdPostRequestToJSON, AgentWidgetBuilderRepoHeadWidgetIdGet200ResponseFromJSON, CodeGenerationStatusResponseFromJSON, CreateTaskPlanRequestToJSON, DevelopmentPlanFromJSON, DevelopmentTaskFromJSON, GenerateCodeRequestToJSON, InitRepoRequestToJSON, ModifyCodeRequestToJSON, PreviewWidgetVersion200ResponseFromJSON, RepositoryResponseFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -439,7 +439,7 @@ export class AgentApi extends runtime.BaseAPI {
439
439
  });
440
440
  }
441
441
  /**
442
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
442
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
443
443
  * Publish a built widget to R2 storage
444
444
  */
445
445
  agentWidgetBuilderPublishWidgetIdPostRaw(requestParameters, initOverrides) {
@@ -471,7 +471,7 @@ export class AgentApi extends runtime.BaseAPI {
471
471
  });
472
472
  }
473
473
  /**
474
- * Publishes the Worker preview artifact to R2 and updates widget version / publish history.
474
+ * Publishes the Worker preview artifact to R2 and marks the version Live. Without `version` the newest draft (or the commit being published) is promoted. With `version` that specific version is built from its own commit and made Live — this is how an older generation is published.
475
475
  * Publish a built widget to R2 storage
476
476
  */
477
477
  agentWidgetBuilderPublishWidgetIdPost(requestParameters, initOverrides) {
@@ -517,4 +517,42 @@ export class AgentApi extends runtime.BaseAPI {
517
517
  return yield response.value();
518
518
  });
519
519
  }
520
+ /**
521
+ * Build an isolated preview from a recorded version commit without publishing
522
+ */
523
+ previewWidgetVersionRaw(requestParameters, initOverrides) {
524
+ return __awaiter(this, void 0, void 0, function* () {
525
+ if (requestParameters['widgetId'] == null) {
526
+ throw new runtime.RequiredError('widgetId', 'Required parameter "widgetId" was null or undefined when calling previewWidgetVersion().');
527
+ }
528
+ if (requestParameters['version'] == null) {
529
+ throw new runtime.RequiredError('version', 'Required parameter "version" was null or undefined when calling previewWidgetVersion().');
530
+ }
531
+ const queryParameters = {};
532
+ const headerParameters = {};
533
+ if (this.configuration && this.configuration.accessToken) {
534
+ const token = this.configuration.accessToken;
535
+ const tokenString = yield token("bearerAuth", []);
536
+ if (tokenString) {
537
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
538
+ }
539
+ }
540
+ const response = yield this.request({
541
+ path: `/agent/widget-builder/version-preview/{widgetId}/{version}`.replace(`{${"widgetId"}}`, encodeURIComponent(String(requestParameters['widgetId']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))),
542
+ method: 'POST',
543
+ headers: headerParameters,
544
+ query: queryParameters,
545
+ }, initOverrides);
546
+ return new runtime.JSONApiResponse(response, (jsonValue) => PreviewWidgetVersion200ResponseFromJSON(jsonValue));
547
+ });
548
+ }
549
+ /**
550
+ * Build an isolated preview from a recorded version commit without publishing
551
+ */
552
+ previewWidgetVersion(requestParameters, initOverrides) {
553
+ return __awaiter(this, void 0, void 0, function* () {
554
+ const response = yield this.previewWidgetVersionRaw(requestParameters, initOverrides);
555
+ return yield response.value();
556
+ });
557
+ }
520
558
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { Canvas, CreateCanvasRequest, GetAllCanvases200Response, UpdateCanvasRequest } from '../models/index';
13
+ import type { Canvas, CreateCanvasRequest, GetAllCanvases200Response, PreviewDeleteCanvas200Response, UpdateCanvasRequest } from '../models/index';
14
14
  export interface CreateCanvasOperationRequest {
15
15
  createCanvasRequest: CreateCanvasRequest;
16
16
  }
@@ -31,6 +31,9 @@ export interface GetAllCanvasesRequest {
31
31
  export interface GetCanvasRequest {
32
32
  id: string;
33
33
  }
34
+ export interface PreviewDeleteCanvasRequest {
35
+ id: string;
36
+ }
34
37
  export interface UpdateCanvasOperationRequest {
35
38
  id: string;
36
39
  updateCanvasRequest: UpdateCanvasRequest;
@@ -79,6 +82,16 @@ export declare class CanvasesApi extends runtime.BaseAPI {
79
82
  * Get Canvas
80
83
  */
81
84
  getCanvas(requestParameters: GetCanvasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Canvas>;
85
+ /**
86
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
87
+ * Preview Canvas Deletion
88
+ */
89
+ previewDeleteCanvasRaw(requestParameters: PreviewDeleteCanvasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PreviewDeleteCanvas200Response>>;
90
+ /**
91
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
92
+ * Preview Canvas Deletion
93
+ */
94
+ previewDeleteCanvas(requestParameters: PreviewDeleteCanvasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PreviewDeleteCanvas200Response>;
82
95
  /**
83
96
  * Updates an existing canvas with the specified properties.
84
97
  * Update Canvas
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { CanvasFromJSON, CreateCanvasRequestToJSON, GetAllCanvases200ResponseFromJSON, UpdateCanvasRequestToJSON, } from '../models/index.js';
24
+ import { CanvasFromJSON, CreateCanvasRequestToJSON, GetAllCanvases200ResponseFromJSON, PreviewDeleteCanvas200ResponseFromJSON, UpdateCanvasRequestToJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -199,6 +199,43 @@ export class CanvasesApi extends runtime.BaseAPI {
199
199
  return yield response.value();
200
200
  });
201
201
  }
202
+ /**
203
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
204
+ * Preview Canvas Deletion
205
+ */
206
+ previewDeleteCanvasRaw(requestParameters, initOverrides) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ if (requestParameters['id'] == null) {
209
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling previewDeleteCanvas().');
210
+ }
211
+ const queryParameters = {};
212
+ const headerParameters = {};
213
+ if (this.configuration && this.configuration.accessToken) {
214
+ const token = this.configuration.accessToken;
215
+ const tokenString = yield token("apiKeyAuth", []);
216
+ if (tokenString) {
217
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
218
+ }
219
+ }
220
+ const response = yield this.request({
221
+ path: `/canvases/{id}/delete-preview`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
222
+ method: 'GET',
223
+ headers: headerParameters,
224
+ query: queryParameters,
225
+ }, initOverrides);
226
+ return new runtime.JSONApiResponse(response, (jsonValue) => PreviewDeleteCanvas200ResponseFromJSON(jsonValue));
227
+ });
228
+ }
229
+ /**
230
+ * Lists the widgets that a canvas deletion would remove, grouped by project name. A canvas can hold widgets from more than one project, so the confirmation dialog can state exactly what will be lost.
231
+ * Preview Canvas Deletion
232
+ */
233
+ previewDeleteCanvas(requestParameters, initOverrides) {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ const response = yield this.previewDeleteCanvasRaw(requestParameters, initOverrides);
236
+ return yield response.value();
237
+ });
238
+ }
202
239
  /**
203
240
  * Updates an existing canvas with the specified properties.
204
241
  * Update Canvas
@@ -27,6 +27,12 @@ export interface AgentWidgetBuilderPublishWidgetIdPostRequest {
27
27
  * @memberof AgentWidgetBuilderPublishWidgetIdPostRequest
28
28
  */
29
29
  commitSha?: string;
30
+ /**
31
+ * Optional version to publish. Omit to publish the newest draft. When set, the build uses that version's commit.
32
+ * @type {number}
33
+ * @memberof AgentWidgetBuilderPublishWidgetIdPostRequest
34
+ */
35
+ version?: number;
30
36
  }
31
37
  /**
32
38
  * Check if a given object implements the AgentWidgetBuilderPublishWidgetIdPostRequest interface.
@@ -29,6 +29,7 @@ export function AgentWidgetBuilderPublishWidgetIdPostRequestFromJSONTyped(json,
29
29
  return {
30
30
  'componentId': json['componentId'],
31
31
  'commitSha': json['commitSha'] == null ? undefined : json['commitSha'],
32
+ 'version': json['version'] == null ? undefined : json['version'],
32
33
  };
33
34
  }
34
35
  export function AgentWidgetBuilderPublishWidgetIdPostRequestToJSON(json) {
@@ -41,5 +42,6 @@ export function AgentWidgetBuilderPublishWidgetIdPostRequestToJSONTyped(value, i
41
42
  return {
42
43
  'componentId': value['componentId'],
43
44
  'commitSha': value['commitSha'],
45
+ 'version': value['version'],
44
46
  };
45
47
  }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { PreviewDeleteCanvas200ResponseData } from './PreviewDeleteCanvas200ResponseData';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PreviewDeleteCanvas200Response
17
+ */
18
+ export interface PreviewDeleteCanvas200Response {
19
+ /**
20
+ *
21
+ * @type {PreviewDeleteCanvas200ResponseData}
22
+ * @memberof PreviewDeleteCanvas200Response
23
+ */
24
+ data?: PreviewDeleteCanvas200ResponseData;
25
+ }
26
+ /**
27
+ * Check if a given object implements the PreviewDeleteCanvas200Response interface.
28
+ */
29
+ export declare function instanceOfPreviewDeleteCanvas200Response(value: object): value is PreviewDeleteCanvas200Response;
30
+ export declare function PreviewDeleteCanvas200ResponseFromJSON(json: any): PreviewDeleteCanvas200Response;
31
+ export declare function PreviewDeleteCanvas200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewDeleteCanvas200Response;
32
+ export declare function PreviewDeleteCanvas200ResponseToJSON(json: any): PreviewDeleteCanvas200Response;
33
+ export declare function PreviewDeleteCanvas200ResponseToJSONTyped(value?: PreviewDeleteCanvas200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Widgetic API Gateway
5
+ * API documentation for the Widgetic API Gateway
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { PreviewDeleteCanvas200ResponseDataFromJSON, PreviewDeleteCanvas200ResponseDataToJSON, } from './PreviewDeleteCanvas200ResponseData.js';
15
+ /**
16
+ * Check if a given object implements the PreviewDeleteCanvas200Response interface.
17
+ */
18
+ export function instanceOfPreviewDeleteCanvas200Response(value) {
19
+ return true;
20
+ }
21
+ export function PreviewDeleteCanvas200ResponseFromJSON(json) {
22
+ return PreviewDeleteCanvas200ResponseFromJSONTyped(json, false);
23
+ }
24
+ export function PreviewDeleteCanvas200ResponseFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'data': json['data'] == null ? undefined : PreviewDeleteCanvas200ResponseDataFromJSON(json['data']),
30
+ };
31
+ }
32
+ export function PreviewDeleteCanvas200ResponseToJSON(json) {
33
+ return PreviewDeleteCanvas200ResponseToJSONTyped(json, false);
34
+ }
35
+ export function PreviewDeleteCanvas200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
36
+ if (value == null) {
37
+ return value;
38
+ }
39
+ return {
40
+ 'data': PreviewDeleteCanvas200ResponseDataToJSON(value['data']),
41
+ };
42
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { PreviewDeleteCanvas200ResponseDataGroupsInner } from './PreviewDeleteCanvas200ResponseDataGroupsInner';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PreviewDeleteCanvas200ResponseData
17
+ */
18
+ export interface PreviewDeleteCanvas200ResponseData {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof PreviewDeleteCanvas200ResponseData
23
+ */
24
+ canvasId?: string;
25
+ /**
26
+ * Total widgets that would be deleted with this canvas
27
+ * @type {number}
28
+ * @memberof PreviewDeleteCanvas200ResponseData
29
+ */
30
+ widgetCount?: number;
31
+ /**
32
+ * Widgets grouped by the project they belong to
33
+ * @type {Array<PreviewDeleteCanvas200ResponseDataGroupsInner>}
34
+ * @memberof PreviewDeleteCanvas200ResponseData
35
+ */
36
+ groups?: Array<PreviewDeleteCanvas200ResponseDataGroupsInner>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the PreviewDeleteCanvas200ResponseData interface.
40
+ */
41
+ export declare function instanceOfPreviewDeleteCanvas200ResponseData(value: object): value is PreviewDeleteCanvas200ResponseData;
42
+ export declare function PreviewDeleteCanvas200ResponseDataFromJSON(json: any): PreviewDeleteCanvas200ResponseData;
43
+ export declare function PreviewDeleteCanvas200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewDeleteCanvas200ResponseData;
44
+ export declare function PreviewDeleteCanvas200ResponseDataToJSON(json: any): PreviewDeleteCanvas200ResponseData;
45
+ export declare function PreviewDeleteCanvas200ResponseDataToJSONTyped(value?: PreviewDeleteCanvas200ResponseData | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Widgetic API Gateway
5
+ * API documentation for the Widgetic API Gateway
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { PreviewDeleteCanvas200ResponseDataGroupsInnerFromJSON, PreviewDeleteCanvas200ResponseDataGroupsInnerToJSON, } from './PreviewDeleteCanvas200ResponseDataGroupsInner.js';
15
+ /**
16
+ * Check if a given object implements the PreviewDeleteCanvas200ResponseData interface.
17
+ */
18
+ export function instanceOfPreviewDeleteCanvas200ResponseData(value) {
19
+ return true;
20
+ }
21
+ export function PreviewDeleteCanvas200ResponseDataFromJSON(json) {
22
+ return PreviewDeleteCanvas200ResponseDataFromJSONTyped(json, false);
23
+ }
24
+ export function PreviewDeleteCanvas200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'canvasId': json['canvasId'] == null ? undefined : json['canvasId'],
30
+ 'widgetCount': json['widgetCount'] == null ? undefined : json['widgetCount'],
31
+ 'groups': json['groups'] == null ? undefined : (json['groups'].map(PreviewDeleteCanvas200ResponseDataGroupsInnerFromJSON)),
32
+ };
33
+ }
34
+ export function PreviewDeleteCanvas200ResponseDataToJSON(json) {
35
+ return PreviewDeleteCanvas200ResponseDataToJSONTyped(json, false);
36
+ }
37
+ export function PreviewDeleteCanvas200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'canvasId': value['canvasId'],
43
+ 'widgetCount': value['widgetCount'],
44
+ 'groups': value['groups'] == null ? undefined : (value['groups'].map(PreviewDeleteCanvas200ResponseDataGroupsInnerToJSON)),
45
+ };
46
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface PreviewDeleteCanvas200ResponseDataGroupsInner
16
+ */
17
+ export interface PreviewDeleteCanvas200ResponseDataGroupsInner {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PreviewDeleteCanvas200ResponseDataGroupsInner
22
+ */
23
+ projectId?: string | null;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof PreviewDeleteCanvas200ResponseDataGroupsInner
28
+ */
29
+ projectName?: string;
30
+ /**
31
+ *
32
+ * @type {Array<string>}
33
+ * @memberof PreviewDeleteCanvas200ResponseDataGroupsInner
34
+ */
35
+ widgetNames?: Array<string>;
36
+ }
37
+ /**
38
+ * Check if a given object implements the PreviewDeleteCanvas200ResponseDataGroupsInner interface.
39
+ */
40
+ export declare function instanceOfPreviewDeleteCanvas200ResponseDataGroupsInner(value: object): value is PreviewDeleteCanvas200ResponseDataGroupsInner;
41
+ export declare function PreviewDeleteCanvas200ResponseDataGroupsInnerFromJSON(json: any): PreviewDeleteCanvas200ResponseDataGroupsInner;
42
+ export declare function PreviewDeleteCanvas200ResponseDataGroupsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewDeleteCanvas200ResponseDataGroupsInner;
43
+ export declare function PreviewDeleteCanvas200ResponseDataGroupsInnerToJSON(json: any): PreviewDeleteCanvas200ResponseDataGroupsInner;
44
+ export declare function PreviewDeleteCanvas200ResponseDataGroupsInnerToJSONTyped(value?: PreviewDeleteCanvas200ResponseDataGroupsInner | null, ignoreDiscriminator?: boolean): any;