@widgetic/api-sdk-ts 2.0.2 → 2.0.3

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 (50) hide show
  1. package/dist/apis/CompositionsApi.d.ts +1 -0
  2. package/dist/apis/CompositionsApi.js +3 -0
  3. package/dist/apis/CreditsApi.d.ts +4 -4
  4. package/dist/apis/CreditsApi.js +4 -4
  5. package/dist/apis/PartnersApi.d.ts +4 -4
  6. package/dist/apis/PartnersApi.js +4 -4
  7. package/dist/apis/UploadsApi.d.ts +4 -4
  8. package/dist/apis/UploadsApi.js +4 -4
  9. package/dist/esm/apis/CompositionsApi.js +3 -0
  10. package/dist/esm/apis/CreditsApi.js +4 -4
  11. package/dist/esm/apis/PartnersApi.js +4 -4
  12. package/dist/esm/apis/UploadsApi.js +4 -4
  13. package/dist/esm/models/Canvas.js +3 -0
  14. package/dist/esm/models/CanvasActiveOperation.js +66 -0
  15. package/dist/esm/models/CreateWidget201ResponseData.js +6 -0
  16. package/dist/esm/models/GetOperationResponseDataMetadata.js +11 -0
  17. package/dist/esm/models/Upload.js +2 -0
  18. package/dist/esm/models/Widget.js +6 -0
  19. package/dist/esm/models/WidgetClarificationQuestion.js +4 -0
  20. package/dist/esm/models/WidgetCodeChange.js +68 -0
  21. package/dist/esm/models/WidgetCodeChanges.js +48 -0
  22. package/dist/esm/models/WidgetNextStep.js +4 -0
  23. package/dist/esm/models/index.js +3 -0
  24. package/dist/esm/runtime.js +1 -1
  25. package/dist/models/AccountCreditBalance.d.ts +2 -2
  26. package/dist/models/Canvas.d.ts +7 -0
  27. package/dist/models/Canvas.js +3 -0
  28. package/dist/models/CanvasActiveOperation.d.ts +65 -0
  29. package/dist/models/CanvasActiveOperation.js +74 -0
  30. package/dist/models/CreateWidget201ResponseData.d.ts +18 -0
  31. package/dist/models/CreateWidget201ResponseData.js +6 -0
  32. package/dist/models/GetOperationResponseDataMetadata.d.ts +23 -1
  33. package/dist/models/GetOperationResponseDataMetadata.js +12 -1
  34. package/dist/models/Upload.d.ts +6 -0
  35. package/dist/models/Upload.js +2 -0
  36. package/dist/models/Widget.d.ts +18 -0
  37. package/dist/models/Widget.js +6 -0
  38. package/dist/models/WidgetClarificationQuestion.d.ts +6 -0
  39. package/dist/models/WidgetClarificationQuestion.js +4 -0
  40. package/dist/models/WidgetCodeChange.d.ts +70 -0
  41. package/dist/models/WidgetCodeChange.js +76 -0
  42. package/dist/models/WidgetCodeChanges.d.ts +39 -0
  43. package/dist/models/WidgetCodeChanges.js +55 -0
  44. package/dist/models/WidgetNextStep.d.ts +7 -1
  45. package/dist/models/WidgetNextStep.js +4 -0
  46. package/dist/models/index.d.ts +3 -0
  47. package/dist/models/index.js +3 -0
  48. package/dist/runtime.d.ts +2 -2
  49. package/dist/runtime.js +1 -1
  50. package/package.json +1 -1
@@ -44,11 +44,14 @@ export function WidgetFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
45
45
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
46
46
  'jsPath': json['jsPath'] == null ? undefined : json['jsPath'],
47
+ 'thumbnailSvg': json['thumbnailSvg'] == null ? undefined : json['thumbnailSvg'],
47
48
  'canvasId': json['canvasId'] == null ? undefined : json['canvasId'],
48
49
  'repoId': json['repoId'] == null ? undefined : json['repoId'],
49
50
  'databaseId': json['databaseId'] == null ? undefined : json['databaseId'],
50
51
  'version': json['version'] == null ? undefined : json['version'],
51
52
  'lastCommitSha': json['lastCommitSha'] == null ? undefined : json['lastCommitSha'],
53
+ 'hasUnpublishedChanges': json['hasUnpublishedChanges'] == null ? undefined : json['hasUnpublishedChanges'],
54
+ 'publishedAt': json['publishedAt'] == null ? undefined : (new Date(json['publishedAt'])),
52
55
  'organizationId': json['organizationId'] == null ? undefined : json['organizationId'],
53
56
  'projectFolder': json['projectFolder'] == null ? undefined : json['projectFolder'],
54
57
  'workspaceType': json['workspaceType'] == null ? undefined : json['workspaceType'],
@@ -75,11 +78,14 @@ export function WidgetToJSONTyped(value, ignoreDiscriminator = false) {
75
78
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
76
79
  'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
77
80
  'jsPath': value['jsPath'],
81
+ 'thumbnailSvg': value['thumbnailSvg'],
78
82
  'canvasId': value['canvasId'],
79
83
  'repoId': value['repoId'],
80
84
  'databaseId': value['databaseId'],
81
85
  'version': value['version'],
82
86
  'lastCommitSha': value['lastCommitSha'],
87
+ 'hasUnpublishedChanges': value['hasUnpublishedChanges'],
88
+ 'publishedAt': value['publishedAt'] == null ? undefined : (value['publishedAt'].toISOString()),
83
89
  'organizationId': value['organizationId'],
84
90
  'projectFolder': value['projectFolder'],
85
91
  'workspaceType': value['workspaceType'],
@@ -26,6 +26,8 @@ export function instanceOfWidgetClarificationQuestion(value) {
26
26
  return false;
27
27
  if (!('allowOther' in value) || value['allowOther'] === undefined)
28
28
  return false;
29
+ if (!('allowMultiple' in value) || value['allowMultiple'] === undefined)
30
+ return false;
29
31
  return true;
30
32
  }
31
33
  export function WidgetClarificationQuestionFromJSON(json) {
@@ -41,6 +43,7 @@ export function WidgetClarificationQuestionFromJSONTyped(json, ignoreDiscriminat
41
43
  'recommendedWord': json['recommendedWord'],
42
44
  'options': (json['options'].map(WidgetClarificationOptionFromJSON)),
43
45
  'allowOther': json['allowOther'],
46
+ 'allowMultiple': json['allowMultiple'],
44
47
  };
45
48
  }
46
49
  export function WidgetClarificationQuestionToJSON(json) {
@@ -56,5 +59,6 @@ export function WidgetClarificationQuestionToJSONTyped(value, ignoreDiscriminato
56
59
  'recommendedWord': value['recommendedWord'],
57
60
  'options': (value['options'].map(WidgetClarificationOptionToJSON)),
58
61
  'allowOther': value['allowOther'],
62
+ 'allowMultiple': value['allowMultiple'],
59
63
  };
60
64
  }
@@ -0,0 +1,68 @@
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
+ * @export
16
+ */
17
+ export const WidgetCodeChangeStatusEnum = {
18
+ Added: 'added',
19
+ Modified: 'modified'
20
+ };
21
+ /**
22
+ * Check if a given object implements the WidgetCodeChange interface.
23
+ */
24
+ export function instanceOfWidgetCodeChange(value) {
25
+ if (!('path' in value) || value['path'] === undefined)
26
+ return false;
27
+ if (!('status' in value) || value['status'] === undefined)
28
+ return false;
29
+ if (!('additions' in value) || value['additions'] === undefined)
30
+ return false;
31
+ if (!('deletions' in value) || value['deletions'] === undefined)
32
+ return false;
33
+ if (!('patch' in value) || value['patch'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ export function WidgetCodeChangeFromJSON(json) {
38
+ return WidgetCodeChangeFromJSONTyped(json, false);
39
+ }
40
+ export function WidgetCodeChangeFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'path': json['path'],
46
+ 'status': json['status'],
47
+ 'additions': json['additions'],
48
+ 'deletions': json['deletions'],
49
+ 'patch': json['patch'],
50
+ 'truncated': json['truncated'] == null ? undefined : json['truncated'],
51
+ };
52
+ }
53
+ export function WidgetCodeChangeToJSON(json) {
54
+ return WidgetCodeChangeToJSONTyped(json, false);
55
+ }
56
+ export function WidgetCodeChangeToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'path': value['path'],
62
+ 'status': value['status'],
63
+ 'additions': value['additions'],
64
+ 'deletions': value['deletions'],
65
+ 'patch': value['patch'],
66
+ 'truncated': value['truncated'],
67
+ };
68
+ }
@@ -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 { WidgetCodeChangeFromJSON, WidgetCodeChangeToJSON, } from './WidgetCodeChange.js';
15
+ /**
16
+ * Check if a given object implements the WidgetCodeChanges interface.
17
+ */
18
+ export function instanceOfWidgetCodeChanges(value) {
19
+ if (!('files' in value) || value['files'] === undefined)
20
+ return false;
21
+ if (!('omittedFiles' in value) || value['omittedFiles'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function WidgetCodeChangesFromJSON(json) {
26
+ return WidgetCodeChangesFromJSONTyped(json, false);
27
+ }
28
+ export function WidgetCodeChangesFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'files': (json['files'].map(WidgetCodeChangeFromJSON)),
34
+ 'omittedFiles': json['omittedFiles'],
35
+ };
36
+ }
37
+ export function WidgetCodeChangesToJSON(json) {
38
+ return WidgetCodeChangesToJSONTyped(json, false);
39
+ }
40
+ export function WidgetCodeChangesToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'files': (value['files'].map(WidgetCodeChangeToJSON)),
46
+ 'omittedFiles': value['omittedFiles'],
47
+ };
48
+ }
@@ -31,6 +31,8 @@ export function instanceOfWidgetNextStep(value) {
31
31
  return false;
32
32
  if (!('label' in value) || value['label'] === undefined)
33
33
  return false;
34
+ if (!('title' in value) || value['title'] === undefined)
35
+ return false;
34
36
  if (!('kind' in value) || value['kind'] === undefined)
35
37
  return false;
36
38
  if (!('recommended' in value) || value['recommended'] === undefined)
@@ -47,6 +49,7 @@ export function WidgetNextStepFromJSONTyped(json, ignoreDiscriminator) {
47
49
  return {
48
50
  'id': json['id'],
49
51
  'label': json['label'],
52
+ 'title': json['title'],
50
53
  'kind': json['kind'],
51
54
  'recommended': json['recommended'],
52
55
  };
@@ -61,6 +64,7 @@ export function WidgetNextStepToJSONTyped(value, ignoreDiscriminator = false) {
61
64
  return {
62
65
  'id': value['id'],
63
66
  'label': value['label'],
67
+ 'title': value['title'],
64
68
  'kind': value['kind'],
65
69
  'recommended': value['recommended'],
66
70
  };
@@ -29,6 +29,7 @@ export * from './BrandKitViewResponse.js';
29
29
  export * from './BrandSpacing.js';
30
30
  export * from './BrandTextStyle.js';
31
31
  export * from './Canvas.js';
32
+ export * from './CanvasActiveOperation.js';
32
33
  export * from './CanvasResponse.js';
33
34
  export * from './CheckCompositionAccessResponse.js';
34
35
  export * from './CheckCompositionAccessResponseData.js';
@@ -319,6 +320,8 @@ export * from './Widget.js';
319
320
  export * from './WidgetClarification.js';
320
321
  export * from './WidgetClarificationOption.js';
321
322
  export * from './WidgetClarificationQuestion.js';
323
+ export * from './WidgetCodeChange.js';
324
+ export * from './WidgetCodeChanges.js';
322
325
  export * from './WidgetNextStep.js';
323
326
  export * from './WidgetPlan.js';
324
327
  export * from './WidgetPlanDecisions.js';
@@ -29,7 +29,7 @@ export const BASE_PATH = "https://api.widgetic.com/v1".replace(/\/+$/, "");
29
29
  // runs. The version is the one in this package's package.json: `scripts/deploy-sdk.sh` reads it and hands it to the
30
30
  // generator as `npmVersion`, so the number a call reports is the number on npm.
31
31
  export const SDK_NAME = "@widgetic/api-sdk-ts";
32
- export const SDK_VERSION = "2.0.2";
32
+ export const SDK_VERSION = "2.0.3";
33
33
  export const SDK_VERSION_HEADER = "X-SDK-Version";
34
34
  export const SDK_VERSION_HEADER_VALUE = `${SDK_NAME}/${SDK_VERSION}`;
35
35
  export class Configuration {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * The credits an account holds. Credits are held per user, so the same balance applies in a personal workspace and in an organization the user belongs to.
13
+ * The credits an account holds in one workspace. A workspace's credits are its own: a team's allowance can be spent in that team only, and a person's own credits in their personal workspace only, so the same person reads a different balance in each workspace they belong to, and a team nobody subscribed holds none.
14
14
  *
15
15
  * @export
16
16
  * @interface AccountCreditBalance
@@ -29,7 +29,7 @@ export interface AccountCreditBalance {
29
29
  */
30
30
  userId?: string;
31
31
  /**
32
- * Credits the account holds
32
+ * Credits the account holds in the workspace the request acts in
33
33
  * @type {number}
34
34
  * @memberof AccountCreditBalance
35
35
  */
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { CanvasActiveOperation } from './CanvasActiveOperation';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -63,6 +64,12 @@ export interface Canvas {
63
64
  * @memberof Canvas
64
65
  */
65
66
  updatedAt: Date;
67
+ /**
68
+ *
69
+ * @type {CanvasActiveOperation}
70
+ * @memberof Canvas
71
+ */
72
+ activeOperation?: CanvasActiveOperation;
66
73
  }
67
74
  /**
68
75
  * Check if a given object implements the Canvas interface.
@@ -18,6 +18,7 @@ exports.CanvasFromJSON = CanvasFromJSON;
18
18
  exports.CanvasFromJSONTyped = CanvasFromJSONTyped;
19
19
  exports.CanvasToJSON = CanvasToJSON;
20
20
  exports.CanvasToJSONTyped = CanvasToJSONTyped;
21
+ const CanvasActiveOperation_1 = require("./CanvasActiveOperation");
21
22
  /**
22
23
  * Check if a given object implements the Canvas interface.
23
24
  */
@@ -48,6 +49,7 @@ function CanvasFromJSONTyped(json, ignoreDiscriminator) {
48
49
  'managedUserId': json['managedUserId'] == null ? undefined : json['managedUserId'],
49
50
  'createdAt': (new Date(json['createdAt'])),
50
51
  'updatedAt': (new Date(json['updatedAt'])),
52
+ 'activeOperation': json['activeOperation'] == null ? undefined : (0, CanvasActiveOperation_1.CanvasActiveOperationFromJSON)(json['activeOperation']),
51
53
  };
52
54
  }
53
55
  function CanvasToJSON(json) {
@@ -66,5 +68,6 @@ function CanvasToJSONTyped(value, ignoreDiscriminator = false) {
66
68
  'managedUserId': value['managedUserId'],
67
69
  'createdAt': ((value['createdAt']).toISOString()),
68
70
  'updatedAt': ((value['updatedAt']).toISOString()),
71
+ 'activeOperation': (0, CanvasActiveOperation_1.CanvasActiveOperationToJSON)(value['activeOperation']),
69
72
  };
70
73
  }
@@ -0,0 +1,65 @@
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
+ * The build that is running on the canvas's primary widget right now, so an editor that opens the canvas while it runs (an agent started it) can follow it. Present only on `getCanvas`, only while the build has not ended, and only for a caller who may see that operation (the account that started it; an editor session only for its own managed user). Absent otherwise. Read the operation itself with `getOperation`.
14
+ *
15
+ * @export
16
+ * @interface CanvasActiveOperation
17
+ */
18
+ export interface CanvasActiveOperation {
19
+ /**
20
+ * The operation to follow (`getOperation`, or the operations stream).
21
+ * @type {string}
22
+ * @memberof CanvasActiveOperation
23
+ */
24
+ id: string;
25
+ /**
26
+ * What the operation does; `code-generate` for the build of a widget.
27
+ * @type {string}
28
+ * @memberof CanvasActiveOperation
29
+ */
30
+ type: string;
31
+ /**
32
+ * Where the build stands. A build that has ended is never listed.
33
+ * @type {string}
34
+ * @memberof CanvasActiveOperation
35
+ */
36
+ status: CanvasActiveOperationStatusEnum;
37
+ /**
38
+ * How far the build has got, in percent.
39
+ * @type {number}
40
+ * @memberof CanvasActiveOperation
41
+ */
42
+ progress: number;
43
+ /**
44
+ * The widget the build works on, the canvas's primary widget.
45
+ * @type {string}
46
+ * @memberof CanvasActiveOperation
47
+ */
48
+ widgetId: string;
49
+ }
50
+ /**
51
+ * @export
52
+ */
53
+ export declare const CanvasActiveOperationStatusEnum: {
54
+ readonly Pending: 'pending';
55
+ readonly Running: 'running';
56
+ };
57
+ export type CanvasActiveOperationStatusEnum = typeof CanvasActiveOperationStatusEnum[keyof typeof CanvasActiveOperationStatusEnum];
58
+ /**
59
+ * Check if a given object implements the CanvasActiveOperation interface.
60
+ */
61
+ export declare function instanceOfCanvasActiveOperation(value: object): value is CanvasActiveOperation;
62
+ export declare function CanvasActiveOperationFromJSON(json: any): CanvasActiveOperation;
63
+ export declare function CanvasActiveOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CanvasActiveOperation;
64
+ export declare function CanvasActiveOperationToJSON(json: any): CanvasActiveOperation;
65
+ export declare function CanvasActiveOperationToJSONTyped(value?: CanvasActiveOperation | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,74 @@
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.CanvasActiveOperationStatusEnum = void 0;
17
+ exports.instanceOfCanvasActiveOperation = instanceOfCanvasActiveOperation;
18
+ exports.CanvasActiveOperationFromJSON = CanvasActiveOperationFromJSON;
19
+ exports.CanvasActiveOperationFromJSONTyped = CanvasActiveOperationFromJSONTyped;
20
+ exports.CanvasActiveOperationToJSON = CanvasActiveOperationToJSON;
21
+ exports.CanvasActiveOperationToJSONTyped = CanvasActiveOperationToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.CanvasActiveOperationStatusEnum = {
26
+ Pending: 'pending',
27
+ Running: 'running'
28
+ };
29
+ /**
30
+ * Check if a given object implements the CanvasActiveOperation interface.
31
+ */
32
+ function instanceOfCanvasActiveOperation(value) {
33
+ if (!('id' in value) || value['id'] === undefined)
34
+ return false;
35
+ if (!('type' in value) || value['type'] === undefined)
36
+ return false;
37
+ if (!('status' in value) || value['status'] === undefined)
38
+ return false;
39
+ if (!('progress' in value) || value['progress'] === undefined)
40
+ return false;
41
+ if (!('widgetId' in value) || value['widgetId'] === undefined)
42
+ return false;
43
+ return true;
44
+ }
45
+ function CanvasActiveOperationFromJSON(json) {
46
+ return CanvasActiveOperationFromJSONTyped(json, false);
47
+ }
48
+ function CanvasActiveOperationFromJSONTyped(json, ignoreDiscriminator) {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+ 'id': json['id'],
54
+ 'type': json['type'],
55
+ 'status': json['status'],
56
+ 'progress': json['progress'],
57
+ 'widgetId': json['widgetId'],
58
+ };
59
+ }
60
+ function CanvasActiveOperationToJSON(json) {
61
+ return CanvasActiveOperationToJSONTyped(json, false);
62
+ }
63
+ function CanvasActiveOperationToJSONTyped(value, ignoreDiscriminator = false) {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+ return {
68
+ 'id': value['id'],
69
+ 'type': value['type'],
70
+ 'status': value['status'],
71
+ 'progress': value['progress'],
72
+ 'widgetId': value['widgetId'],
73
+ };
74
+ }
@@ -89,6 +89,12 @@ export interface CreateWidget201ResponseData {
89
89
  * @memberof CreateWidget201ResponseData
90
90
  */
91
91
  jsPath?: string | null;
92
+ /**
93
+ * A small line drawing of the widget, as an SVG on a 32 x 32 canvas (a few flat shapes only, drawn in currentColor, no script, style, text, link or image). Show it as a mask, 32 pixels wide, in the middle of the standard grey tile, in the darker grey. Null until one is drawn.
94
+ * @type {string}
95
+ * @memberof CreateWidget201ResponseData
96
+ */
97
+ thumbnailSvg?: string | null;
92
98
  /**
93
99
  * ID of the canvas associated with this widget.
94
100
  * @type {string}
@@ -119,6 +125,18 @@ export interface CreateWidget201ResponseData {
119
125
  * @memberof CreateWidget201ResponseData
120
126
  */
121
127
  lastCommitSha?: string | null;
128
+ /**
129
+ * True when the widget was published at least once and the latest saved commit differs from the published commit. Never-published drafts are false.
130
+ * @type {boolean}
131
+ * @memberof CreateWidget201ResponseData
132
+ */
133
+ hasUnpublishedChanges?: boolean;
134
+ /**
135
+ * ISO timestamp of the last publish, or null when the widget was never published.
136
+ * @type {Date}
137
+ * @memberof CreateWidget201ResponseData
138
+ */
139
+ publishedAt?: Date | null;
122
140
  /**
123
141
  * Organization ID if created in an organization workspace.
124
142
  * @type {string}
@@ -52,11 +52,14 @@ function CreateWidget201ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
52
52
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
53
53
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
54
54
  'jsPath': json['jsPath'] == null ? undefined : json['jsPath'],
55
+ 'thumbnailSvg': json['thumbnailSvg'] == null ? undefined : json['thumbnailSvg'],
55
56
  'canvasId': json['canvasId'] == null ? undefined : json['canvasId'],
56
57
  'repoId': json['repoId'] == null ? undefined : json['repoId'],
57
58
  'databaseId': json['databaseId'] == null ? undefined : json['databaseId'],
58
59
  'version': json['version'] == null ? undefined : json['version'],
59
60
  'lastCommitSha': json['lastCommitSha'] == null ? undefined : json['lastCommitSha'],
61
+ 'hasUnpublishedChanges': json['hasUnpublishedChanges'] == null ? undefined : json['hasUnpublishedChanges'],
62
+ 'publishedAt': json['publishedAt'] == null ? undefined : (new Date(json['publishedAt'])),
60
63
  'organizationId': json['organizationId'] == null ? undefined : json['organizationId'],
61
64
  'projectFolder': json['projectFolder'] == null ? undefined : json['projectFolder'],
62
65
  'workspaceType': json['workspaceType'] == null ? undefined : json['workspaceType'],
@@ -84,11 +87,14 @@ function CreateWidget201ResponseDataToJSONTyped(value, ignoreDiscriminator = fal
84
87
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
85
88
  'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
86
89
  'jsPath': value['jsPath'],
90
+ 'thumbnailSvg': value['thumbnailSvg'],
87
91
  'canvasId': value['canvasId'],
88
92
  'repoId': value['repoId'],
89
93
  'databaseId': value['databaseId'],
90
94
  'version': value['version'],
91
95
  'lastCommitSha': value['lastCommitSha'],
96
+ 'hasUnpublishedChanges': value['hasUnpublishedChanges'],
97
+ 'publishedAt': value['publishedAt'] == null ? undefined : (value['publishedAt'].toISOString()),
92
98
  'organizationId': value['organizationId'],
93
99
  'projectFolder': value['projectFolder'],
94
100
  'workspaceType': value['workspaceType'],
@@ -11,9 +11,10 @@
11
11
  */
12
12
  import type { WidgetNextStep } from './WidgetNextStep';
13
13
  import type { WidgetClarification } from './WidgetClarification';
14
+ import type { WidgetCodeChanges } from './WidgetCodeChanges';
14
15
  import type { WidgetPlan } from './WidgetPlan';
15
16
  /**
16
- * What the operation tells about its work. A finished composition duplication names the new composition in `newCompositionId`, and lists any problem with its database in `warnings` (absent when there is none). A code generation whose request declared `clientCapabilities` also tells what that client asked to show: `plan` while it builds, `outcome` `needs_answers` with the card in `clarification` when it asked before building, and `nextSteps` once it is done. A key whose part the client did not declare is never present. During code generation, `stage` is a short status line. While the model streams code, `streamTail` holds the last portion of generated source (replaced periodically, cleared when streaming ends). While the model streams reasoning before code, `thinkingTail` holds the last portion of reasoning text (same cadence; cleared when code streaming starts or the run ends). Clients may read `thinkingTail` or `thinking_tail`.
17
+ * What the operation tells about its work. A finished composition duplication names the new composition in `newCompositionId`, and lists any problem with its database in `warnings` (absent when there is none). A code generation whose request declared `clientCapabilities` also tells what that client asked to show: `plan` while it builds, `outcome` `needs_answers` with the card in `clarification` when it asked before building, `nextSteps` once it is done, and `codeChanges` (what the build changed in the files) with it. A key whose part the client did not declare is never present. During code generation, `stage` is a short status line. While the model streams code, `streamTail` holds the last portion of generated source (replaced periodically, cleared when streaming ends). While the model streams reasoning before code, `thinkingTail` holds the last portion of reasoning text (same cadence; cleared when code streaming starts or the run ends). Clients may read `thinkingTail` or `thinking_tail`.
17
18
  *
18
19
  * @export
19
20
  * @interface GetOperationResponseDataMetadata
@@ -47,6 +48,20 @@ export interface GetOperationResponseDataMetadata {
47
48
  * @memberof GetOperationResponseDataMetadata
48
49
  */
49
50
  nextSteps?: Array<WidgetNextStep>;
51
+ /**
52
+ * What a completed code generation changed in the widget's files, per file as unified hunks, for a client that declared `clientCapabilities.codeChanges`. Absent when the build was not kept, when it was the first message of a conversation (it replaces what the repository held, so there is nothing to compare), or when nothing a person could see changed.
53
+ *
54
+ * @type {WidgetCodeChanges}
55
+ * @memberof GetOperationResponseDataMetadata
56
+ */
57
+ codeChanges?: WidgetCodeChanges;
58
+ /**
59
+ * `agent` on a code generation that an agent began (the Widgetic assistant, or an MCP client through `create_widget`, `replicate_widget` or `revise_widget`): nobody pressed a button for it, so an editor that shows the widget can say who is building and offer to take over. Absent on a generation the person began in the editor.
60
+ *
61
+ * @type {string}
62
+ * @memberof GetOperationResponseDataMetadata
63
+ */
64
+ startedBy?: GetOperationResponseDataMetadataStartedByEnum;
50
65
  }
51
66
  /**
52
67
  * @export
@@ -55,6 +70,13 @@ export declare const GetOperationResponseDataMetadataOutcomeEnum: {
55
70
  readonly NeedsAnswers: 'needs_answers';
56
71
  };
57
72
  export type GetOperationResponseDataMetadataOutcomeEnum = typeof GetOperationResponseDataMetadataOutcomeEnum[keyof typeof GetOperationResponseDataMetadataOutcomeEnum];
73
+ /**
74
+ * @export
75
+ */
76
+ export declare const GetOperationResponseDataMetadataStartedByEnum: {
77
+ readonly Agent: 'agent';
78
+ };
79
+ export type GetOperationResponseDataMetadataStartedByEnum = typeof GetOperationResponseDataMetadataStartedByEnum[keyof typeof GetOperationResponseDataMetadataStartedByEnum];
58
80
  /**
59
81
  * Check if a given object implements the GetOperationResponseDataMetadata interface.
60
82
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.GetOperationResponseDataMetadataOutcomeEnum = void 0;
16
+ exports.GetOperationResponseDataMetadataStartedByEnum = exports.GetOperationResponseDataMetadataOutcomeEnum = void 0;
17
17
  exports.instanceOfGetOperationResponseDataMetadata = instanceOfGetOperationResponseDataMetadata;
18
18
  exports.GetOperationResponseDataMetadataFromJSON = GetOperationResponseDataMetadataFromJSON;
19
19
  exports.GetOperationResponseDataMetadataFromJSONTyped = GetOperationResponseDataMetadataFromJSONTyped;
@@ -21,6 +21,7 @@ exports.GetOperationResponseDataMetadataToJSON = GetOperationResponseDataMetadat
21
21
  exports.GetOperationResponseDataMetadataToJSONTyped = GetOperationResponseDataMetadataToJSONTyped;
22
22
  const WidgetNextStep_1 = require("./WidgetNextStep");
23
23
  const WidgetClarification_1 = require("./WidgetClarification");
24
+ const WidgetCodeChanges_1 = require("./WidgetCodeChanges");
24
25
  const WidgetPlan_1 = require("./WidgetPlan");
25
26
  /**
26
27
  * @export
@@ -28,6 +29,12 @@ const WidgetPlan_1 = require("./WidgetPlan");
28
29
  exports.GetOperationResponseDataMetadataOutcomeEnum = {
29
30
  NeedsAnswers: 'needs_answers'
30
31
  };
32
+ /**
33
+ * @export
34
+ */
35
+ exports.GetOperationResponseDataMetadataStartedByEnum = {
36
+ Agent: 'agent'
37
+ };
31
38
  /**
32
39
  * Check if a given object implements the GetOperationResponseDataMetadata interface.
33
40
  */
@@ -47,6 +54,8 @@ function GetOperationResponseDataMetadataFromJSONTyped(json, ignoreDiscriminator
47
54
  'outcome': json['outcome'] == null ? undefined : json['outcome'],
48
55
  'clarification': json['clarification'] == null ? undefined : (0, WidgetClarification_1.WidgetClarificationFromJSON)(json['clarification']),
49
56
  'nextSteps': json['nextSteps'] == null ? undefined : (json['nextSteps'].map(WidgetNextStep_1.WidgetNextStepFromJSON)),
57
+ 'codeChanges': json['codeChanges'] == null ? undefined : (0, WidgetCodeChanges_1.WidgetCodeChangesFromJSON)(json['codeChanges']),
58
+ 'startedBy': json['startedBy'] == null ? undefined : json['startedBy'],
50
59
  };
51
60
  }
52
61
  function GetOperationResponseDataMetadataToJSON(json) {
@@ -62,5 +71,7 @@ function GetOperationResponseDataMetadataToJSONTyped(value, ignoreDiscriminator
62
71
  'outcome': value['outcome'],
63
72
  'clarification': (0, WidgetClarification_1.WidgetClarificationToJSON)(value['clarification']),
64
73
  'nextSteps': value['nextSteps'] == null ? undefined : (value['nextSteps'].map(WidgetNextStep_1.WidgetNextStepToJSON)),
74
+ 'codeChanges': (0, WidgetCodeChanges_1.WidgetCodeChangesToJSON)(value['codeChanges']),
75
+ 'startedBy': value['startedBy'],
65
76
  };
66
77
  }
@@ -99,6 +99,12 @@ export interface Upload {
99
99
  * @memberof Upload
100
100
  */
101
101
  purpose?: UploadPurposeEnum | null;
102
+ /**
103
+ * The Media Library folder the file belongs to when it is part of the brand kit (for example `Brand kit/Fonts/Inter` or `Brand kit/Logos`), or null for every other file
104
+ * @type {string}
105
+ * @memberof Upload
106
+ */
107
+ library_folder_path?: string | null;
102
108
  }
103
109
  /**
104
110
  * @export
@@ -90,6 +90,7 @@ function UploadFromJSONTyped(json, ignoreDiscriminator) {
90
90
  'conversation_id': json['conversation_id'] == null ? undefined : json['conversation_id'],
91
91
  'managed_user_id': json['managed_user_id'] == null ? undefined : json['managed_user_id'],
92
92
  'purpose': json['purpose'] == null ? undefined : json['purpose'],
93
+ 'library_folder_path': json['library_folder_path'] == null ? undefined : json['library_folder_path'],
93
94
  };
94
95
  }
95
96
  function UploadToJSON(json) {
@@ -114,5 +115,6 @@ function UploadToJSONTyped(value, ignoreDiscriminator = false) {
114
115
  'conversation_id': value['conversation_id'],
115
116
  'managed_user_id': value['managed_user_id'],
116
117
  'purpose': value['purpose'],
118
+ 'library_folder_path': value['library_folder_path'],
117
119
  };
118
120
  }
@@ -89,6 +89,12 @@ export interface Widget {
89
89
  * @memberof Widget
90
90
  */
91
91
  jsPath?: string | null;
92
+ /**
93
+ * A small line drawing of the widget, as an SVG on a 32 x 32 canvas (a few flat shapes only, drawn in currentColor, no script, style, text, link or image). Show it as a mask, 32 pixels wide, in the middle of the standard grey tile, in the darker grey. Null until one is drawn.
94
+ * @type {string}
95
+ * @memberof Widget
96
+ */
97
+ thumbnailSvg?: string | null;
92
98
  /**
93
99
  * ID of the canvas associated with this widget.
94
100
  * @type {string}
@@ -119,6 +125,18 @@ export interface Widget {
119
125
  * @memberof Widget
120
126
  */
121
127
  lastCommitSha?: string | null;
128
+ /**
129
+ * True when the widget was published at least once and the latest saved commit differs from the published commit. Never-published drafts are false.
130
+ * @type {boolean}
131
+ * @memberof Widget
132
+ */
133
+ hasUnpublishedChanges?: boolean;
134
+ /**
135
+ * ISO timestamp of the last publish, or null when the widget was never published.
136
+ * @type {Date}
137
+ * @memberof Widget
138
+ */
139
+ publishedAt?: Date | null;
122
140
  /**
123
141
  * Organization ID if created in an organization workspace.
124
142
  * @type {string}