@widgetic/api-sdk-ts 2.0.1 → 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 (66) hide show
  1. package/dist/apis/BrandKitApi.d.ts +4 -4
  2. package/dist/apis/BrandKitApi.js +4 -4
  3. package/dist/apis/CompositionsApi.d.ts +1 -0
  4. package/dist/apis/CompositionsApi.js +3 -0
  5. package/dist/apis/CreditsApi.d.ts +4 -4
  6. package/dist/apis/CreditsApi.js +4 -4
  7. package/dist/apis/PartnersApi.d.ts +4 -4
  8. package/dist/apis/PartnersApi.js +4 -4
  9. package/dist/apis/UploadsApi.d.ts +4 -4
  10. package/dist/apis/UploadsApi.js +4 -4
  11. package/dist/esm/apis/BrandKitApi.js +4 -4
  12. package/dist/esm/apis/CompositionsApi.js +3 -0
  13. package/dist/esm/apis/CreditsApi.js +4 -4
  14. package/dist/esm/apis/PartnersApi.js +4 -4
  15. package/dist/esm/apis/UploadsApi.js +4 -4
  16. package/dist/esm/models/BrandKitTokens.js +3 -0
  17. package/dist/esm/models/BrandTextStyle.js +65 -0
  18. package/dist/esm/models/Canvas.js +3 -0
  19. package/dist/esm/models/CanvasActiveOperation.js +66 -0
  20. package/dist/esm/models/CreateWidget201ResponseData.js +6 -0
  21. package/dist/esm/models/GetOperationResponseDataMetadata.js +11 -0
  22. package/dist/esm/models/PatchBrandKitRequest.js +3 -0
  23. package/dist/esm/models/Upload.js +2 -0
  24. package/dist/esm/models/Widget.js +6 -0
  25. package/dist/esm/models/WidgetClarificationQuestion.js +4 -0
  26. package/dist/esm/models/WidgetCodeChange.js +68 -0
  27. package/dist/esm/models/WidgetCodeChanges.js +48 -0
  28. package/dist/esm/models/WidgetNextStep.js +4 -0
  29. package/dist/esm/models/WidgetPlanDecisions.js +4 -0
  30. package/dist/esm/models/index.js +4 -0
  31. package/dist/esm/runtime.js +1 -1
  32. package/dist/models/AccountCreditBalance.d.ts +2 -2
  33. package/dist/models/BrandKitTokens.d.ts +8 -1
  34. package/dist/models/BrandKitTokens.js +3 -0
  35. package/dist/models/BrandKitView.d.ts +1 -1
  36. package/dist/models/BrandTextStyle.d.ts +59 -0
  37. package/dist/models/BrandTextStyle.js +73 -0
  38. package/dist/models/Canvas.d.ts +7 -0
  39. package/dist/models/Canvas.js +3 -0
  40. package/dist/models/CanvasActiveOperation.d.ts +65 -0
  41. package/dist/models/CanvasActiveOperation.js +74 -0
  42. package/dist/models/CreateWidget201ResponseData.d.ts +18 -0
  43. package/dist/models/CreateWidget201ResponseData.js +6 -0
  44. package/dist/models/GetOperationResponseDataMetadata.d.ts +23 -1
  45. package/dist/models/GetOperationResponseDataMetadata.js +12 -1
  46. package/dist/models/PatchBrandKitRequest.d.ts +7 -0
  47. package/dist/models/PatchBrandKitRequest.js +3 -0
  48. package/dist/models/Upload.d.ts +6 -0
  49. package/dist/models/Upload.js +2 -0
  50. package/dist/models/Widget.d.ts +18 -0
  51. package/dist/models/Widget.js +6 -0
  52. package/dist/models/WidgetClarificationQuestion.d.ts +6 -0
  53. package/dist/models/WidgetClarificationQuestion.js +4 -0
  54. package/dist/models/WidgetCodeChange.d.ts +70 -0
  55. package/dist/models/WidgetCodeChange.js +76 -0
  56. package/dist/models/WidgetCodeChanges.d.ts +39 -0
  57. package/dist/models/WidgetCodeChanges.js +55 -0
  58. package/dist/models/WidgetNextStep.d.ts +7 -1
  59. package/dist/models/WidgetNextStep.js +4 -0
  60. package/dist/models/WidgetPlanDecisions.d.ts +6 -0
  61. package/dist/models/WidgetPlanDecisions.js +4 -0
  62. package/dist/models/index.d.ts +4 -0
  63. package/dist/models/index.js +4 -0
  64. package/dist/runtime.d.ts +2 -2
  65. package/dist/runtime.js +1 -1
  66. package/package.json +1 -1
@@ -0,0 +1,65 @@
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 BrandTextStyleWeightEnum = {
18
+ NUMBER_100: 100,
19
+ NUMBER_200: 200,
20
+ NUMBER_300: 300,
21
+ NUMBER_400: 400,
22
+ NUMBER_500: 500,
23
+ NUMBER_600: 600,
24
+ NUMBER_700: 700,
25
+ NUMBER_800: 800,
26
+ NUMBER_900: 900
27
+ };
28
+ /**
29
+ * Check if a given object implements the BrandTextStyle interface.
30
+ */
31
+ export function instanceOfBrandTextStyle(value) {
32
+ if (!('family' in value) || value['family'] === undefined)
33
+ return false;
34
+ if (!('weight' in value) || value['weight'] === undefined)
35
+ return false;
36
+ if (!('size' in value) || value['size'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ export function BrandTextStyleFromJSON(json) {
41
+ return BrandTextStyleFromJSONTyped(json, false);
42
+ }
43
+ export function BrandTextStyleFromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'family': json['family'],
49
+ 'weight': json['weight'],
50
+ 'size': json['size'],
51
+ };
52
+ }
53
+ export function BrandTextStyleToJSON(json) {
54
+ return BrandTextStyleToJSONTyped(json, false);
55
+ }
56
+ export function BrandTextStyleToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'family': value['family'],
62
+ 'weight': value['weight'],
63
+ 'size': value['size'],
64
+ };
65
+ }
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { CanvasActiveOperationFromJSON, CanvasActiveOperationToJSON, } from './CanvasActiveOperation.js';
14
15
  /**
15
16
  * Check if a given object implements the Canvas interface.
16
17
  */
@@ -41,6 +42,7 @@ export function CanvasFromJSONTyped(json, ignoreDiscriminator) {
41
42
  'managedUserId': json['managedUserId'] == null ? undefined : json['managedUserId'],
42
43
  'createdAt': (new Date(json['createdAt'])),
43
44
  'updatedAt': (new Date(json['updatedAt'])),
45
+ 'activeOperation': json['activeOperation'] == null ? undefined : CanvasActiveOperationFromJSON(json['activeOperation']),
44
46
  };
45
47
  }
46
48
  export function CanvasToJSON(json) {
@@ -59,5 +61,6 @@ export function CanvasToJSONTyped(value, ignoreDiscriminator = false) {
59
61
  'managedUserId': value['managedUserId'],
60
62
  'createdAt': ((value['createdAt']).toISOString()),
61
63
  'updatedAt': ((value['updatedAt']).toISOString()),
64
+ 'activeOperation': CanvasActiveOperationToJSON(value['activeOperation']),
62
65
  };
63
66
  }
@@ -0,0 +1,66 @@
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 CanvasActiveOperationStatusEnum = {
18
+ Pending: 'pending',
19
+ Running: 'running'
20
+ };
21
+ /**
22
+ * Check if a given object implements the CanvasActiveOperation interface.
23
+ */
24
+ export function instanceOfCanvasActiveOperation(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('type' in value) || value['type'] === undefined)
28
+ return false;
29
+ if (!('status' in value) || value['status'] === undefined)
30
+ return false;
31
+ if (!('progress' in value) || value['progress'] === undefined)
32
+ return false;
33
+ if (!('widgetId' in value) || value['widgetId'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ export function CanvasActiveOperationFromJSON(json) {
38
+ return CanvasActiveOperationFromJSONTyped(json, false);
39
+ }
40
+ export function CanvasActiveOperationFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'id': json['id'],
46
+ 'type': json['type'],
47
+ 'status': json['status'],
48
+ 'progress': json['progress'],
49
+ 'widgetId': json['widgetId'],
50
+ };
51
+ }
52
+ export function CanvasActiveOperationToJSON(json) {
53
+ return CanvasActiveOperationToJSONTyped(json, false);
54
+ }
55
+ export function CanvasActiveOperationToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'id': value['id'],
61
+ 'type': value['type'],
62
+ 'status': value['status'],
63
+ 'progress': value['progress'],
64
+ 'widgetId': value['widgetId'],
65
+ };
66
+ }
@@ -44,11 +44,14 @@ export function CreateWidget201ResponseDataFromJSONTyped(json, ignoreDiscriminat
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'],
@@ -76,11 +79,14 @@ export function CreateWidget201ResponseDataToJSONTyped(value, ignoreDiscriminato
76
79
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
77
80
  'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
78
81
  'jsPath': value['jsPath'],
82
+ 'thumbnailSvg': value['thumbnailSvg'],
79
83
  'canvasId': value['canvasId'],
80
84
  'repoId': value['repoId'],
81
85
  'databaseId': value['databaseId'],
82
86
  'version': value['version'],
83
87
  'lastCommitSha': value['lastCommitSha'],
88
+ 'hasUnpublishedChanges': value['hasUnpublishedChanges'],
89
+ 'publishedAt': value['publishedAt'] == null ? undefined : (value['publishedAt'].toISOString()),
84
90
  'organizationId': value['organizationId'],
85
91
  'projectFolder': value['projectFolder'],
86
92
  'workspaceType': value['workspaceType'],
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { WidgetNextStepFromJSON, WidgetNextStepToJSON, } from './WidgetNextStep.js';
15
15
  import { WidgetClarificationFromJSON, WidgetClarificationToJSON, } from './WidgetClarification.js';
16
+ import { WidgetCodeChangesFromJSON, WidgetCodeChangesToJSON, } from './WidgetCodeChanges.js';
16
17
  import { WidgetPlanFromJSON, WidgetPlanToJSON, } from './WidgetPlan.js';
17
18
  /**
18
19
  * @export
@@ -20,6 +21,12 @@ import { WidgetPlanFromJSON, WidgetPlanToJSON, } from './WidgetPlan.js';
20
21
  export const GetOperationResponseDataMetadataOutcomeEnum = {
21
22
  NeedsAnswers: 'needs_answers'
22
23
  };
24
+ /**
25
+ * @export
26
+ */
27
+ export const GetOperationResponseDataMetadataStartedByEnum = {
28
+ Agent: 'agent'
29
+ };
23
30
  /**
24
31
  * Check if a given object implements the GetOperationResponseDataMetadata interface.
25
32
  */
@@ -39,6 +46,8 @@ export function GetOperationResponseDataMetadataFromJSONTyped(json, ignoreDiscri
39
46
  'outcome': json['outcome'] == null ? undefined : json['outcome'],
40
47
  'clarification': json['clarification'] == null ? undefined : WidgetClarificationFromJSON(json['clarification']),
41
48
  'nextSteps': json['nextSteps'] == null ? undefined : (json['nextSteps'].map(WidgetNextStepFromJSON)),
49
+ 'codeChanges': json['codeChanges'] == null ? undefined : WidgetCodeChangesFromJSON(json['codeChanges']),
50
+ 'startedBy': json['startedBy'] == null ? undefined : json['startedBy'],
42
51
  };
43
52
  }
44
53
  export function GetOperationResponseDataMetadataToJSON(json) {
@@ -54,5 +63,7 @@ export function GetOperationResponseDataMetadataToJSONTyped(value, ignoreDiscrim
54
63
  'outcome': value['outcome'],
55
64
  'clarification': WidgetClarificationToJSON(value['clarification']),
56
65
  'nextSteps': value['nextSteps'] == null ? undefined : (value['nextSteps'].map(WidgetNextStepToJSON)),
66
+ 'codeChanges': WidgetCodeChangesToJSON(value['codeChanges']),
67
+ 'startedBy': value['startedBy'],
57
68
  };
58
69
  }
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { BrandTextStyleFromJSON, BrandTextStyleToJSON, } from './BrandTextStyle.js';
14
15
  import { BrandColorFromJSON, BrandColorToJSON, } from './BrandColor.js';
15
16
  import { PatchBrandKitRequestFontsFromJSON, PatchBrandKitRequestFontsToJSON, } from './PatchBrandKitRequestFonts.js';
16
17
  import { PatchBrandKitRequestSpacingFromJSON, PatchBrandKitRequestSpacingToJSON, } from './PatchBrandKitRequestSpacing.js';
@@ -30,6 +31,7 @@ export function PatchBrandKitRequestFromJSONTyped(json, ignoreDiscriminator) {
30
31
  return {
31
32
  'colors': json['colors'] == null ? undefined : (json['colors'].map(BrandColorFromJSON)),
32
33
  'fonts': json['fonts'] == null ? undefined : PatchBrandKitRequestFontsFromJSON(json['fonts']),
34
+ 'textStyles': json['textStyles'] == null ? undefined : (json['textStyles'].map(BrandTextStyleFromJSON)),
33
35
  'spacing': json['spacing'] == null ? undefined : PatchBrandKitRequestSpacingFromJSON(json['spacing']),
34
36
  'cornerRadius': json['cornerRadius'] == null ? undefined : json['cornerRadius'],
35
37
  'instructions': json['instructions'] == null ? undefined : json['instructions'],
@@ -46,6 +48,7 @@ export function PatchBrandKitRequestToJSONTyped(value, ignoreDiscriminator = fal
46
48
  return {
47
49
  'colors': value['colors'] == null ? undefined : (value['colors'].map(BrandColorToJSON)),
48
50
  'fonts': PatchBrandKitRequestFontsToJSON(value['fonts']),
51
+ 'textStyles': value['textStyles'] == null ? undefined : (value['textStyles'].map(BrandTextStyleToJSON)),
49
52
  'spacing': PatchBrandKitRequestSpacingToJSON(value['spacing']),
50
53
  'cornerRadius': value['cornerRadius'],
51
54
  'instructions': value['instructions'],
@@ -82,6 +82,7 @@ export function UploadFromJSONTyped(json, ignoreDiscriminator) {
82
82
  'conversation_id': json['conversation_id'] == null ? undefined : json['conversation_id'],
83
83
  'managed_user_id': json['managed_user_id'] == null ? undefined : json['managed_user_id'],
84
84
  'purpose': json['purpose'] == null ? undefined : json['purpose'],
85
+ 'library_folder_path': json['library_folder_path'] == null ? undefined : json['library_folder_path'],
85
86
  };
86
87
  }
87
88
  export function UploadToJSON(json) {
@@ -106,5 +107,6 @@ export function UploadToJSONTyped(value, ignoreDiscriminator = false) {
106
107
  'conversation_id': value['conversation_id'],
107
108
  'managed_user_id': value['managed_user_id'],
108
109
  'purpose': value['purpose'],
110
+ 'library_folder_path': value['library_folder_path'],
109
111
  };
110
112
  }
@@ -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
  };
@@ -30,6 +30,8 @@ export function instanceOfWidgetPlanDecisions(value) {
30
30
  return false;
31
31
  if (!('notes' in value) || value['notes'] === undefined)
32
32
  return false;
33
+ if (!('elements' in value) || value['elements'] === undefined)
34
+ return false;
33
35
  return true;
34
36
  }
35
37
  export function WidgetPlanDecisionsFromJSON(json) {
@@ -47,6 +49,7 @@ export function WidgetPlanDecisionsFromJSONTyped(json, ignoreDiscriminator) {
47
49
  'improvements': json['improvements'],
48
50
  'notes': json['notes'],
49
51
  'responsive': json['responsive'] == null ? undefined : WidgetPlanDecisionsResponsiveFromJSON(json['responsive']),
52
+ 'elements': json['elements'],
50
53
  };
51
54
  }
52
55
  export function WidgetPlanDecisionsToJSON(json) {
@@ -64,5 +67,6 @@ export function WidgetPlanDecisionsToJSONTyped(value, ignoreDiscriminator = fals
64
67
  'improvements': value['improvements'],
65
68
  'notes': value['notes'],
66
69
  'responsive': WidgetPlanDecisionsResponsiveToJSON(value['responsive']),
70
+ 'elements': value['elements'],
67
71
  };
68
72
  }
@@ -27,7 +27,9 @@ export * from './BrandKitView.js';
27
27
  export * from './BrandKitViewOwner.js';
28
28
  export * from './BrandKitViewResponse.js';
29
29
  export * from './BrandSpacing.js';
30
+ export * from './BrandTextStyle.js';
30
31
  export * from './Canvas.js';
32
+ export * from './CanvasActiveOperation.js';
31
33
  export * from './CanvasResponse.js';
32
34
  export * from './CheckCompositionAccessResponse.js';
33
35
  export * from './CheckCompositionAccessResponseData.js';
@@ -318,6 +320,8 @@ export * from './Widget.js';
318
320
  export * from './WidgetClarification.js';
319
321
  export * from './WidgetClarificationOption.js';
320
322
  export * from './WidgetClarificationQuestion.js';
323
+ export * from './WidgetCodeChange.js';
324
+ export * from './WidgetCodeChanges.js';
321
325
  export * from './WidgetNextStep.js';
322
326
  export * from './WidgetPlan.js';
323
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.1";
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,11 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { BrandTextStyle } from './BrandTextStyle';
12
13
  import type { BrandSpacing } from './BrandSpacing';
13
14
  import type { BrandColor } from './BrandColor';
14
15
  import type { BrandKitTokensFonts } from './BrandKitTokensFonts';
15
16
  /**
16
- * Colors, fonts by role, spacing and corner radii of a Brand Kit.
17
+ * Colors, fonts by role, text styles, spacing and corner radii of a Brand Kit.
17
18
  * @export
18
19
  * @interface BrandKitTokens
19
20
  */
@@ -30,6 +31,12 @@ export interface BrandKitTokens {
30
31
  * @memberof BrandKitTokens
31
32
  */
32
33
  fonts: BrandKitTokensFonts;
34
+ /**
35
+ * The owner's text styles (family, weight and size). When there are some, they are what every widget made with the kit is told about type and the fonts by role are not used; with none, the fonts by role apply. A font file that is deleted takes the text styles made from it with it. Left out when the kit has none.
36
+ * @type {Array<BrandTextStyle>}
37
+ * @memberof BrandKitTokens
38
+ */
39
+ textStyles?: Array<BrandTextStyle>;
33
40
  /**
34
41
  *
35
42
  * @type {BrandSpacing}
@@ -18,6 +18,7 @@ exports.BrandKitTokensFromJSON = BrandKitTokensFromJSON;
18
18
  exports.BrandKitTokensFromJSONTyped = BrandKitTokensFromJSONTyped;
19
19
  exports.BrandKitTokensToJSON = BrandKitTokensToJSON;
20
20
  exports.BrandKitTokensToJSONTyped = BrandKitTokensToJSONTyped;
21
+ const BrandTextStyle_1 = require("./BrandTextStyle");
21
22
  const BrandSpacing_1 = require("./BrandSpacing");
22
23
  const BrandColor_1 = require("./BrandColor");
23
24
  const BrandKitTokensFonts_1 = require("./BrandKitTokensFonts");
@@ -43,6 +44,7 @@ function BrandKitTokensFromJSONTyped(json, ignoreDiscriminator) {
43
44
  return {
44
45
  'colors': (json['colors'].map(BrandColor_1.BrandColorFromJSON)),
45
46
  'fonts': (0, BrandKitTokensFonts_1.BrandKitTokensFontsFromJSON)(json['fonts']),
47
+ 'textStyles': json['textStyles'] == null ? undefined : (json['textStyles'].map(BrandTextStyle_1.BrandTextStyleFromJSON)),
46
48
  'spacing': (0, BrandSpacing_1.BrandSpacingFromJSON)(json['spacing']),
47
49
  'instructions': json['instructions'] == null ? undefined : json['instructions'],
48
50
  };
@@ -57,6 +59,7 @@ function BrandKitTokensToJSONTyped(value, ignoreDiscriminator = false) {
57
59
  return {
58
60
  'colors': (value['colors'].map(BrandColor_1.BrandColorToJSON)),
59
61
  'fonts': (0, BrandKitTokensFonts_1.BrandKitTokensFontsToJSON)(value['fonts']),
62
+ 'textStyles': value['textStyles'] == null ? undefined : (value['textStyles'].map(BrandTextStyle_1.BrandTextStyleToJSON)),
60
63
  'spacing': (0, BrandSpacing_1.BrandSpacingToJSON)(value['spacing']),
61
64
  'instructions': value['instructions'],
62
65
  };
@@ -74,7 +74,7 @@ export interface BrandKitView {
74
74
  */
75
75
  updatedBy?: string | null;
76
76
  /**
77
- * Things worth fixing in the saved colors, such as a text color that is hard to read on the background. The kit is saved either way.
77
+ * Things worth fixing in the saved kit, such as a text color that is hard to read on the background, or fonts by role that are not used because the kit has text styles. The kit is saved either way.
78
78
  * @type {Array<string>}
79
79
  * @memberof BrandKitView
80
80
  */
@@ -0,0 +1,59 @@
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
+ * One text style of the kit: a font family, a weight and a size in pixels, for example Inter 400 at 12px or Inter 500 at 18px. A family with a font file in the kit is an uploaded font; any other family is loaded from Google Fonts. The size is the size of the widget at full size.
14
+ * @export
15
+ * @interface BrandTextStyle
16
+ */
17
+ export interface BrandTextStyle {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof BrandTextStyle
22
+ */
23
+ family: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof BrandTextStyle
28
+ */
29
+ weight: BrandTextStyleWeightEnum;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof BrandTextStyle
34
+ */
35
+ size: number;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const BrandTextStyleWeightEnum: {
41
+ readonly NUMBER_100: 100;
42
+ readonly NUMBER_200: 200;
43
+ readonly NUMBER_300: 300;
44
+ readonly NUMBER_400: 400;
45
+ readonly NUMBER_500: 500;
46
+ readonly NUMBER_600: 600;
47
+ readonly NUMBER_700: 700;
48
+ readonly NUMBER_800: 800;
49
+ readonly NUMBER_900: 900;
50
+ };
51
+ export type BrandTextStyleWeightEnum = typeof BrandTextStyleWeightEnum[keyof typeof BrandTextStyleWeightEnum];
52
+ /**
53
+ * Check if a given object implements the BrandTextStyle interface.
54
+ */
55
+ export declare function instanceOfBrandTextStyle(value: object): value is BrandTextStyle;
56
+ export declare function BrandTextStyleFromJSON(json: any): BrandTextStyle;
57
+ export declare function BrandTextStyleFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrandTextStyle;
58
+ export declare function BrandTextStyleToJSON(json: any): BrandTextStyle;
59
+ export declare function BrandTextStyleToJSONTyped(value?: BrandTextStyle | null, ignoreDiscriminator?: boolean): any;