@widgetic/api-sdk 1.0.20 → 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.
@@ -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 { 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
  }
@@ -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,39 @@
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 { PreviewWidgetVersion200ResponseData } from './PreviewWidgetVersion200ResponseData';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PreviewWidgetVersion200Response
17
+ */
18
+ export interface PreviewWidgetVersion200Response {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ * @memberof PreviewWidgetVersion200Response
23
+ */
24
+ success: boolean;
25
+ /**
26
+ *
27
+ * @type {PreviewWidgetVersion200ResponseData}
28
+ * @memberof PreviewWidgetVersion200Response
29
+ */
30
+ data: PreviewWidgetVersion200ResponseData;
31
+ }
32
+ /**
33
+ * Check if a given object implements the PreviewWidgetVersion200Response interface.
34
+ */
35
+ export declare function instanceOfPreviewWidgetVersion200Response(value: object): value is PreviewWidgetVersion200Response;
36
+ export declare function PreviewWidgetVersion200ResponseFromJSON(json: any): PreviewWidgetVersion200Response;
37
+ export declare function PreviewWidgetVersion200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewWidgetVersion200Response;
38
+ export declare function PreviewWidgetVersion200ResponseToJSON(json: any): PreviewWidgetVersion200Response;
39
+ export declare function PreviewWidgetVersion200ResponseToJSONTyped(value?: PreviewWidgetVersion200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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 { PreviewWidgetVersion200ResponseDataFromJSON, PreviewWidgetVersion200ResponseDataToJSON, } from './PreviewWidgetVersion200ResponseData.js';
15
+ /**
16
+ * Check if a given object implements the PreviewWidgetVersion200Response interface.
17
+ */
18
+ export function instanceOfPreviewWidgetVersion200Response(value) {
19
+ if (!('success' in value) || value['success'] === undefined)
20
+ return false;
21
+ if (!('data' in value) || value['data'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function PreviewWidgetVersion200ResponseFromJSON(json) {
26
+ return PreviewWidgetVersion200ResponseFromJSONTyped(json, false);
27
+ }
28
+ export function PreviewWidgetVersion200ResponseFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'success': json['success'],
34
+ 'data': PreviewWidgetVersion200ResponseDataFromJSON(json['data']),
35
+ };
36
+ }
37
+ export function PreviewWidgetVersion200ResponseToJSON(json) {
38
+ return PreviewWidgetVersion200ResponseToJSONTyped(json, false);
39
+ }
40
+ export function PreviewWidgetVersion200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'success': value['success'],
46
+ 'data': PreviewWidgetVersion200ResponseDataToJSON(value['data']),
47
+ };
48
+ }
@@ -0,0 +1,56 @@
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 PreviewWidgetVersion200ResponseData
16
+ */
17
+ export interface PreviewWidgetVersion200ResponseData {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PreviewWidgetVersion200ResponseData
22
+ */
23
+ widgetId: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof PreviewWidgetVersion200ResponseData
28
+ */
29
+ version: number;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PreviewWidgetVersion200ResponseData
34
+ */
35
+ commitSha: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof PreviewWidgetVersion200ResponseData
40
+ */
41
+ previewUrl: string;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof PreviewWidgetVersion200ResponseData
46
+ */
47
+ buildTimeMs?: number;
48
+ }
49
+ /**
50
+ * Check if a given object implements the PreviewWidgetVersion200ResponseData interface.
51
+ */
52
+ export declare function instanceOfPreviewWidgetVersion200ResponseData(value: object): value is PreviewWidgetVersion200ResponseData;
53
+ export declare function PreviewWidgetVersion200ResponseDataFromJSON(json: any): PreviewWidgetVersion200ResponseData;
54
+ export declare function PreviewWidgetVersion200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewWidgetVersion200ResponseData;
55
+ export declare function PreviewWidgetVersion200ResponseDataToJSON(json: any): PreviewWidgetVersion200ResponseData;
56
+ export declare function PreviewWidgetVersion200ResponseDataToJSONTyped(value?: PreviewWidgetVersion200ResponseData | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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
+ /**
15
+ * Check if a given object implements the PreviewWidgetVersion200ResponseData interface.
16
+ */
17
+ export function instanceOfPreviewWidgetVersion200ResponseData(value) {
18
+ if (!('widgetId' in value) || value['widgetId'] === undefined)
19
+ return false;
20
+ if (!('version' in value) || value['version'] === undefined)
21
+ return false;
22
+ if (!('commitSha' in value) || value['commitSha'] === undefined)
23
+ return false;
24
+ if (!('previewUrl' in value) || value['previewUrl'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function PreviewWidgetVersion200ResponseDataFromJSON(json) {
29
+ return PreviewWidgetVersion200ResponseDataFromJSONTyped(json, false);
30
+ }
31
+ export function PreviewWidgetVersion200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'widgetId': json['widgetId'],
37
+ 'version': json['version'],
38
+ 'commitSha': json['commitSha'],
39
+ 'previewUrl': json['previewUrl'],
40
+ 'buildTimeMs': json['buildTimeMs'] == null ? undefined : json['buildTimeMs'],
41
+ };
42
+ }
43
+ export function PreviewWidgetVersion200ResponseDataToJSON(json) {
44
+ return PreviewWidgetVersion200ResponseDataToJSONTyped(json, false);
45
+ }
46
+ export function PreviewWidgetVersion200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'widgetId': value['widgetId'],
52
+ 'version': value['version'],
53
+ 'commitSha': value['commitSha'],
54
+ 'previewUrl': value['previewUrl'],
55
+ 'buildTimeMs': value['buildTimeMs'],
56
+ };
57
+ }
@@ -339,6 +339,8 @@ export * from './ProjectContentsCompositionsInner';
339
339
  export * from './ProjectContentsWidgetsInner';
340
340
  export * from './ProjectMember';
341
341
  export * from './ProjectThemeConfig';
342
+ export * from './PreviewWidgetVersion200Response';
343
+ export * from './PreviewWidgetVersion200ResponseData';
342
344
  export * from './PreviewDeleteCanvas200Response';
343
345
  export * from './PreviewDeleteCanvas200ResponseData';
344
346
  export * from './PreviewDeleteCanvas200ResponseDataGroupsInner';
@@ -341,6 +341,8 @@ export * from './ProjectContentsCompositionsInner.js';
341
341
  export * from './ProjectContentsWidgetsInner.js';
342
342
  export * from './ProjectMember.js';
343
343
  export * from './ProjectThemeConfig.js';
344
+ export * from './PreviewWidgetVersion200Response.js';
345
+ export * from './PreviewWidgetVersion200ResponseData.js';
344
346
  export * from './PreviewDeleteCanvas200Response.js';
345
347
  export * from './PreviewDeleteCanvas200ResponseData.js';
346
348
  export * from './PreviewDeleteCanvas200ResponseDataGroupsInner.js';
@@ -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.
@@ -36,6 +36,7 @@ function AgentWidgetBuilderPublishWidgetIdPostRequestFromJSONTyped(json, ignoreD
36
36
  return {
37
37
  'componentId': json['componentId'],
38
38
  'commitSha': json['commitSha'] == null ? undefined : json['commitSha'],
39
+ 'version': json['version'] == null ? undefined : json['version'],
39
40
  };
40
41
  }
41
42
  function AgentWidgetBuilderPublishWidgetIdPostRequestToJSON(json) {
@@ -48,5 +49,6 @@ function AgentWidgetBuilderPublishWidgetIdPostRequestToJSONTyped(value, ignoreDi
48
49
  return {
49
50
  'componentId': value['componentId'],
50
51
  'commitSha': value['commitSha'],
52
+ 'version': value['version'],
51
53
  };
52
54
  }
@@ -0,0 +1,39 @@
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 { PreviewWidgetVersion200ResponseData } from './PreviewWidgetVersion200ResponseData';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PreviewWidgetVersion200Response
17
+ */
18
+ export interface PreviewWidgetVersion200Response {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ * @memberof PreviewWidgetVersion200Response
23
+ */
24
+ success: boolean;
25
+ /**
26
+ *
27
+ * @type {PreviewWidgetVersion200ResponseData}
28
+ * @memberof PreviewWidgetVersion200Response
29
+ */
30
+ data: PreviewWidgetVersion200ResponseData;
31
+ }
32
+ /**
33
+ * Check if a given object implements the PreviewWidgetVersion200Response interface.
34
+ */
35
+ export declare function instanceOfPreviewWidgetVersion200Response(value: object): value is PreviewWidgetVersion200Response;
36
+ export declare function PreviewWidgetVersion200ResponseFromJSON(json: any): PreviewWidgetVersion200Response;
37
+ export declare function PreviewWidgetVersion200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewWidgetVersion200Response;
38
+ export declare function PreviewWidgetVersion200ResponseToJSON(json: any): PreviewWidgetVersion200Response;
39
+ export declare function PreviewWidgetVersion200ResponseToJSONTyped(value?: PreviewWidgetVersion200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Widgetic API Gateway
6
+ * API documentation for the Widgetic API Gateway
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfPreviewWidgetVersion200Response = instanceOfPreviewWidgetVersion200Response;
17
+ exports.PreviewWidgetVersion200ResponseFromJSON = PreviewWidgetVersion200ResponseFromJSON;
18
+ exports.PreviewWidgetVersion200ResponseFromJSONTyped = PreviewWidgetVersion200ResponseFromJSONTyped;
19
+ exports.PreviewWidgetVersion200ResponseToJSON = PreviewWidgetVersion200ResponseToJSON;
20
+ exports.PreviewWidgetVersion200ResponseToJSONTyped = PreviewWidgetVersion200ResponseToJSONTyped;
21
+ const PreviewWidgetVersion200ResponseData_1 = require("./PreviewWidgetVersion200ResponseData");
22
+ /**
23
+ * Check if a given object implements the PreviewWidgetVersion200Response interface.
24
+ */
25
+ function instanceOfPreviewWidgetVersion200Response(value) {
26
+ if (!('success' in value) || value['success'] === undefined)
27
+ return false;
28
+ if (!('data' in value) || value['data'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function PreviewWidgetVersion200ResponseFromJSON(json) {
33
+ return PreviewWidgetVersion200ResponseFromJSONTyped(json, false);
34
+ }
35
+ function PreviewWidgetVersion200ResponseFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'success': json['success'],
41
+ 'data': (0, PreviewWidgetVersion200ResponseData_1.PreviewWidgetVersion200ResponseDataFromJSON)(json['data']),
42
+ };
43
+ }
44
+ function PreviewWidgetVersion200ResponseToJSON(json) {
45
+ return PreviewWidgetVersion200ResponseToJSONTyped(json, false);
46
+ }
47
+ function PreviewWidgetVersion200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'success': value['success'],
53
+ 'data': (0, PreviewWidgetVersion200ResponseData_1.PreviewWidgetVersion200ResponseDataToJSON)(value['data']),
54
+ };
55
+ }
@@ -0,0 +1,56 @@
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 PreviewWidgetVersion200ResponseData
16
+ */
17
+ export interface PreviewWidgetVersion200ResponseData {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PreviewWidgetVersion200ResponseData
22
+ */
23
+ widgetId: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof PreviewWidgetVersion200ResponseData
28
+ */
29
+ version: number;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PreviewWidgetVersion200ResponseData
34
+ */
35
+ commitSha: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof PreviewWidgetVersion200ResponseData
40
+ */
41
+ previewUrl: string;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof PreviewWidgetVersion200ResponseData
46
+ */
47
+ buildTimeMs?: number;
48
+ }
49
+ /**
50
+ * Check if a given object implements the PreviewWidgetVersion200ResponseData interface.
51
+ */
52
+ export declare function instanceOfPreviewWidgetVersion200ResponseData(value: object): value is PreviewWidgetVersion200ResponseData;
53
+ export declare function PreviewWidgetVersion200ResponseDataFromJSON(json: any): PreviewWidgetVersion200ResponseData;
54
+ export declare function PreviewWidgetVersion200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreviewWidgetVersion200ResponseData;
55
+ export declare function PreviewWidgetVersion200ResponseDataToJSON(json: any): PreviewWidgetVersion200ResponseData;
56
+ export declare function PreviewWidgetVersion200ResponseDataToJSONTyped(value?: PreviewWidgetVersion200ResponseData | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Widgetic API Gateway
6
+ * API documentation for the Widgetic API Gateway
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfPreviewWidgetVersion200ResponseData = instanceOfPreviewWidgetVersion200ResponseData;
17
+ exports.PreviewWidgetVersion200ResponseDataFromJSON = PreviewWidgetVersion200ResponseDataFromJSON;
18
+ exports.PreviewWidgetVersion200ResponseDataFromJSONTyped = PreviewWidgetVersion200ResponseDataFromJSONTyped;
19
+ exports.PreviewWidgetVersion200ResponseDataToJSON = PreviewWidgetVersion200ResponseDataToJSON;
20
+ exports.PreviewWidgetVersion200ResponseDataToJSONTyped = PreviewWidgetVersion200ResponseDataToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PreviewWidgetVersion200ResponseData interface.
23
+ */
24
+ function instanceOfPreviewWidgetVersion200ResponseData(value) {
25
+ if (!('widgetId' in value) || value['widgetId'] === undefined)
26
+ return false;
27
+ if (!('version' in value) || value['version'] === undefined)
28
+ return false;
29
+ if (!('commitSha' in value) || value['commitSha'] === undefined)
30
+ return false;
31
+ if (!('previewUrl' in value) || value['previewUrl'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function PreviewWidgetVersion200ResponseDataFromJSON(json) {
36
+ return PreviewWidgetVersion200ResponseDataFromJSONTyped(json, false);
37
+ }
38
+ function PreviewWidgetVersion200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'widgetId': json['widgetId'],
44
+ 'version': json['version'],
45
+ 'commitSha': json['commitSha'],
46
+ 'previewUrl': json['previewUrl'],
47
+ 'buildTimeMs': json['buildTimeMs'] == null ? undefined : json['buildTimeMs'],
48
+ };
49
+ }
50
+ function PreviewWidgetVersion200ResponseDataToJSON(json) {
51
+ return PreviewWidgetVersion200ResponseDataToJSONTyped(json, false);
52
+ }
53
+ function PreviewWidgetVersion200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'widgetId': value['widgetId'],
59
+ 'version': value['version'],
60
+ 'commitSha': value['commitSha'],
61
+ 'previewUrl': value['previewUrl'],
62
+ 'buildTimeMs': value['buildTimeMs'],
63
+ };
64
+ }
@@ -339,6 +339,8 @@ export * from './ProjectContentsCompositionsInner';
339
339
  export * from './ProjectContentsWidgetsInner';
340
340
  export * from './ProjectMember';
341
341
  export * from './ProjectThemeConfig';
342
+ export * from './PreviewWidgetVersion200Response';
343
+ export * from './PreviewWidgetVersion200ResponseData';
342
344
  export * from './PreviewDeleteCanvas200Response';
343
345
  export * from './PreviewDeleteCanvas200ResponseData';
344
346
  export * from './PreviewDeleteCanvas200ResponseDataGroupsInner';
@@ -357,6 +357,8 @@ __exportStar(require("./ProjectContentsCompositionsInner"), exports);
357
357
  __exportStar(require("./ProjectContentsWidgetsInner"), exports);
358
358
  __exportStar(require("./ProjectMember"), exports);
359
359
  __exportStar(require("./ProjectThemeConfig"), exports);
360
+ __exportStar(require("./PreviewWidgetVersion200Response"), exports);
361
+ __exportStar(require("./PreviewWidgetVersion200ResponseData"), exports);
360
362
  __exportStar(require("./PreviewDeleteCanvas200Response"), exports);
361
363
  __exportStar(require("./PreviewDeleteCanvas200ResponseData"), exports);
362
364
  __exportStar(require("./PreviewDeleteCanvas200ResponseDataGroupsInner"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/api-sdk",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Official JavaScript/TypeScript client for the Widgetic API (ESM & CJS)",
5
5
  "author": "Widgetic",
6
6
  "repository": {