@widgetic/api-sdk-ts 2.0.1 → 2.0.2

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.
@@ -76,12 +76,12 @@ export declare class BrandKitApi extends runtime.BaseAPI {
76
76
  */
77
77
  getBrandKit(requestParameters?: GetBrandKitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
78
78
  /**
79
- * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
79
+ * Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
80
80
  * Change part of the Brand Kit
81
81
  */
82
82
  patchBrandKitRaw(requestParameters: PatchBrandKitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
83
83
  /**
84
- * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
84
+ * Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
85
85
  * Change part of the Brand Kit
86
86
  */
87
87
  patchBrandKit(requestParameters: PatchBrandKitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
@@ -110,12 +110,12 @@ export declare class BrandKitApi extends runtime.BaseAPI {
110
110
  */
111
111
  postBrandKitIcon(requestParameters: PostBrandKitIconOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
112
112
  /**
113
- * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
113
+ * Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.
114
114
  * Save Brand Kit tokens
115
115
  */
116
116
  putBrandKitRaw(requestParameters: PutBrandKitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BrandKitViewResponse>>;
117
117
  /**
118
- * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
118
+ * Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.
119
119
  * Save Brand Kit tokens
120
120
  */
121
121
  putBrandKit(requestParameters: PutBrandKitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BrandKitViewResponse>;
@@ -152,7 +152,7 @@ class BrandKitApi extends runtime.BaseAPI {
152
152
  return await response.value();
153
153
  }
154
154
  /**
155
- * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
155
+ * Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
156
156
  * Change part of the Brand Kit
157
157
  */
158
158
  async patchBrandKitRaw(requestParameters, initOverrides) {
@@ -182,7 +182,7 @@ class BrandKitApi extends runtime.BaseAPI {
182
182
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
183
183
  }
184
184
  /**
185
- * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
185
+ * Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
186
186
  * Change part of the Brand Kit
187
187
  */
188
188
  async patchBrandKit(requestParameters, initOverrides) {
@@ -333,7 +333,7 @@ class BrandKitApi extends runtime.BaseAPI {
333
333
  return await response.value();
334
334
  }
335
335
  /**
336
- * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
336
+ * Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.
337
337
  * Save Brand Kit tokens
338
338
  */
339
339
  async putBrandKitRaw(requestParameters, initOverrides) {
@@ -363,7 +363,7 @@ class BrandKitApi extends runtime.BaseAPI {
363
363
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrandKitViewResponseFromJSON)(jsonValue));
364
364
  }
365
365
  /**
366
- * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
366
+ * Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.
367
367
  * Save Brand Kit tokens
368
368
  */
369
369
  async putBrandKit(requestParameters, initOverrides) {
@@ -116,7 +116,7 @@ export class BrandKitApi extends runtime.BaseAPI {
116
116
  return await response.value();
117
117
  }
118
118
  /**
119
- * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
119
+ * Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
120
120
  * Change part of the Brand Kit
121
121
  */
122
122
  async patchBrandKitRaw(requestParameters, initOverrides) {
@@ -146,7 +146,7 @@ export class BrandKitApi extends runtime.BaseAPI {
146
146
  return new runtime.JSONApiResponse(response, (jsonValue) => BrandKitViewResponseFromJSON(jsonValue));
147
147
  }
148
148
  /**
149
- * Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
149
+ * Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic\'s default one. The response lists what is worth fixing in `warnings`.
150
150
  * Change part of the Brand Kit
151
151
  */
152
152
  async patchBrandKit(requestParameters, initOverrides) {
@@ -297,7 +297,7 @@ export class BrandKitApi extends runtime.BaseAPI {
297
297
  return await response.value();
298
298
  }
299
299
  /**
300
- * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
300
+ * Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.
301
301
  * Save Brand Kit tokens
302
302
  */
303
303
  async putBrandKitRaw(requestParameters, initOverrides) {
@@ -327,7 +327,7 @@ export class BrandKitApi extends runtime.BaseAPI {
327
327
  return new runtime.JSONApiResponse(response, (jsonValue) => BrandKitViewResponseFromJSON(jsonValue));
328
328
  }
329
329
  /**
330
- * Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
330
+ * Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.
331
331
  * Save Brand Kit tokens
332
332
  */
333
333
  async putBrandKit(requestParameters, initOverrides) {
@@ -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 { BrandSpacingFromJSON, BrandSpacingToJSON, } from './BrandSpacing.js';
15
16
  import { BrandColorFromJSON, BrandColorToJSON, } from './BrandColor.js';
16
17
  import { BrandKitTokensFontsFromJSON, BrandKitTokensFontsToJSON, } from './BrandKitTokensFonts.js';
@@ -36,6 +37,7 @@ export function BrandKitTokensFromJSONTyped(json, ignoreDiscriminator) {
36
37
  return {
37
38
  'colors': (json['colors'].map(BrandColorFromJSON)),
38
39
  'fonts': BrandKitTokensFontsFromJSON(json['fonts']),
40
+ 'textStyles': json['textStyles'] == null ? undefined : (json['textStyles'].map(BrandTextStyleFromJSON)),
39
41
  'spacing': BrandSpacingFromJSON(json['spacing']),
40
42
  'instructions': json['instructions'] == null ? undefined : json['instructions'],
41
43
  };
@@ -50,6 +52,7 @@ export function BrandKitTokensToJSONTyped(value, ignoreDiscriminator = false) {
50
52
  return {
51
53
  'colors': (value['colors'].map(BrandColorToJSON)),
52
54
  'fonts': BrandKitTokensFontsToJSON(value['fonts']),
55
+ 'textStyles': value['textStyles'] == null ? undefined : (value['textStyles'].map(BrandTextStyleToJSON)),
53
56
  'spacing': BrandSpacingToJSON(value['spacing']),
54
57
  'instructions': value['instructions'],
55
58
  };
@@ -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 { 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'],
@@ -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,6 +27,7 @@ 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';
31
32
  export * from './CanvasResponse.js';
32
33
  export * from './CheckCompositionAccessResponse.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.2";
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 {
@@ -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;
@@ -0,0 +1,73 @@
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.BrandTextStyleWeightEnum = void 0;
17
+ exports.instanceOfBrandTextStyle = instanceOfBrandTextStyle;
18
+ exports.BrandTextStyleFromJSON = BrandTextStyleFromJSON;
19
+ exports.BrandTextStyleFromJSONTyped = BrandTextStyleFromJSONTyped;
20
+ exports.BrandTextStyleToJSON = BrandTextStyleToJSON;
21
+ exports.BrandTextStyleToJSONTyped = BrandTextStyleToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.BrandTextStyleWeightEnum = {
26
+ NUMBER_100: 100,
27
+ NUMBER_200: 200,
28
+ NUMBER_300: 300,
29
+ NUMBER_400: 400,
30
+ NUMBER_500: 500,
31
+ NUMBER_600: 600,
32
+ NUMBER_700: 700,
33
+ NUMBER_800: 800,
34
+ NUMBER_900: 900
35
+ };
36
+ /**
37
+ * Check if a given object implements the BrandTextStyle interface.
38
+ */
39
+ function instanceOfBrandTextStyle(value) {
40
+ if (!('family' in value) || value['family'] === undefined)
41
+ return false;
42
+ if (!('weight' in value) || value['weight'] === undefined)
43
+ return false;
44
+ if (!('size' in value) || value['size'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ function BrandTextStyleFromJSON(json) {
49
+ return BrandTextStyleFromJSONTyped(json, false);
50
+ }
51
+ function BrandTextStyleFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ 'family': json['family'],
57
+ 'weight': json['weight'],
58
+ 'size': json['size'],
59
+ };
60
+ }
61
+ function BrandTextStyleToJSON(json) {
62
+ return BrandTextStyleToJSONTyped(json, false);
63
+ }
64
+ function BrandTextStyleToJSONTyped(value, ignoreDiscriminator = false) {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+ return {
69
+ 'family': value['family'],
70
+ 'weight': value['weight'],
71
+ 'size': value['size'],
72
+ };
73
+ }
@@ -13,7 +13,7 @@ import type { WidgetNextStep } from './WidgetNextStep';
13
13
  import type { WidgetClarification } from './WidgetClarification';
14
14
  import type { WidgetPlan } from './WidgetPlan';
15
15
  /**
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.
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
17
  *
18
18
  * @export
19
19
  * @interface GetOperationResponseDataMetadata
@@ -9,6 +9,7 @@
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 { BrandColor } from './BrandColor';
13
14
  import type { PatchBrandKitRequestFonts } from './PatchBrandKitRequestFonts';
14
15
  import type { PatchBrandKitRequestSpacing } from './PatchBrandKitRequestSpacing';
@@ -30,6 +31,12 @@ export interface PatchBrandKitRequest {
30
31
  * @memberof PatchBrandKitRequest
31
32
  */
32
33
  fonts?: PatchBrandKitRequestFonts;
34
+ /**
35
+ * The whole list of text styles (it replaces the saved list). An empty list removes them, and the fonts by role apply again. Left out, the saved text styles stay as they are.
36
+ * @type {Array<BrandTextStyle>}
37
+ * @memberof PatchBrandKitRequest
38
+ */
39
+ textStyles?: Array<BrandTextStyle>;
33
40
  /**
34
41
  *
35
42
  * @type {PatchBrandKitRequestSpacing}
@@ -18,6 +18,7 @@ exports.PatchBrandKitRequestFromJSON = PatchBrandKitRequestFromJSON;
18
18
  exports.PatchBrandKitRequestFromJSONTyped = PatchBrandKitRequestFromJSONTyped;
19
19
  exports.PatchBrandKitRequestToJSON = PatchBrandKitRequestToJSON;
20
20
  exports.PatchBrandKitRequestToJSONTyped = PatchBrandKitRequestToJSONTyped;
21
+ const BrandTextStyle_1 = require("./BrandTextStyle");
21
22
  const BrandColor_1 = require("./BrandColor");
22
23
  const PatchBrandKitRequestFonts_1 = require("./PatchBrandKitRequestFonts");
23
24
  const PatchBrandKitRequestSpacing_1 = require("./PatchBrandKitRequestSpacing");
@@ -37,6 +38,7 @@ function PatchBrandKitRequestFromJSONTyped(json, ignoreDiscriminator) {
37
38
  return {
38
39
  'colors': json['colors'] == null ? undefined : (json['colors'].map(BrandColor_1.BrandColorFromJSON)),
39
40
  'fonts': json['fonts'] == null ? undefined : (0, PatchBrandKitRequestFonts_1.PatchBrandKitRequestFontsFromJSON)(json['fonts']),
41
+ 'textStyles': json['textStyles'] == null ? undefined : (json['textStyles'].map(BrandTextStyle_1.BrandTextStyleFromJSON)),
40
42
  'spacing': json['spacing'] == null ? undefined : (0, PatchBrandKitRequestSpacing_1.PatchBrandKitRequestSpacingFromJSON)(json['spacing']),
41
43
  'cornerRadius': json['cornerRadius'] == null ? undefined : json['cornerRadius'],
42
44
  'instructions': json['instructions'] == null ? undefined : json['instructions'],
@@ -53,6 +55,7 @@ function PatchBrandKitRequestToJSONTyped(value, ignoreDiscriminator = false) {
53
55
  return {
54
56
  'colors': value['colors'] == null ? undefined : (value['colors'].map(BrandColor_1.BrandColorToJSON)),
55
57
  'fonts': (0, PatchBrandKitRequestFonts_1.PatchBrandKitRequestFontsToJSON)(value['fonts']),
58
+ 'textStyles': value['textStyles'] == null ? undefined : (value['textStyles'].map(BrandTextStyle_1.BrandTextStyleToJSON)),
56
59
  'spacing': (0, PatchBrandKitRequestSpacing_1.PatchBrandKitRequestSpacingToJSON)(value['spacing']),
57
60
  'cornerRadius': value['cornerRadius'],
58
61
  'instructions': value['instructions'],
@@ -60,6 +60,12 @@ export interface WidgetPlanDecisions {
60
60
  * @memberof WidgetPlanDecisions
61
61
  */
62
62
  responsive?: WidgetPlanDecisionsResponsive | null;
63
+ /**
64
+ * What a Convert-to-Widget sketch shows: one short phrase per drawn element, in layout order. Empty when the request has no sketch. At most 12.
65
+ * @type {Array<string>}
66
+ * @memberof WidgetPlanDecisions
67
+ */
68
+ elements: Array<string>;
63
69
  }
64
70
  /**
65
71
  * Check if a given object implements the WidgetPlanDecisions interface.
@@ -37,6 +37,8 @@ function instanceOfWidgetPlanDecisions(value) {
37
37
  return false;
38
38
  if (!('notes' in value) || value['notes'] === undefined)
39
39
  return false;
40
+ if (!('elements' in value) || value['elements'] === undefined)
41
+ return false;
40
42
  return true;
41
43
  }
42
44
  function WidgetPlanDecisionsFromJSON(json) {
@@ -54,6 +56,7 @@ function WidgetPlanDecisionsFromJSONTyped(json, ignoreDiscriminator) {
54
56
  'improvements': json['improvements'],
55
57
  'notes': json['notes'],
56
58
  'responsive': json['responsive'] == null ? undefined : (0, WidgetPlanDecisionsResponsive_1.WidgetPlanDecisionsResponsiveFromJSON)(json['responsive']),
59
+ 'elements': json['elements'],
57
60
  };
58
61
  }
59
62
  function WidgetPlanDecisionsToJSON(json) {
@@ -71,5 +74,6 @@ function WidgetPlanDecisionsToJSONTyped(value, ignoreDiscriminator = false) {
71
74
  'improvements': value['improvements'],
72
75
  'notes': value['notes'],
73
76
  'responsive': (0, WidgetPlanDecisionsResponsive_1.WidgetPlanDecisionsResponsiveToJSON)(value['responsive']),
77
+ 'elements': value['elements'],
74
78
  };
75
79
  }
@@ -25,6 +25,7 @@ export * from './BrandKitView';
25
25
  export * from './BrandKitViewOwner';
26
26
  export * from './BrandKitViewResponse';
27
27
  export * from './BrandSpacing';
28
+ export * from './BrandTextStyle';
28
29
  export * from './Canvas';
29
30
  export * from './CanvasResponse';
30
31
  export * from './CheckCompositionAccessResponse';
@@ -43,6 +43,7 @@ __exportStar(require("./BrandKitView"), exports);
43
43
  __exportStar(require("./BrandKitViewOwner"), exports);
44
44
  __exportStar(require("./BrandKitViewResponse"), exports);
45
45
  __exportStar(require("./BrandSpacing"), exports);
46
+ __exportStar(require("./BrandTextStyle"), exports);
46
47
  __exportStar(require("./Canvas"), exports);
47
48
  __exportStar(require("./CanvasResponse"), exports);
48
49
  __exportStar(require("./CheckCompositionAccessResponse"), exports);
package/dist/runtime.d.ts CHANGED
@@ -24,9 +24,9 @@ export declare const DEFAULT_BASE_URL = "";
24
24
  export declare const DEFAULT_API_VERSION = "";
25
25
  export declare const BASE_PATH: string;
26
26
  export declare const SDK_NAME = "@widgetic/api-sdk-ts";
27
- export declare const SDK_VERSION = "2.0.1";
27
+ export declare const SDK_VERSION = "2.0.2";
28
28
  export declare const SDK_VERSION_HEADER = "X-SDK-Version";
29
- export declare const SDK_VERSION_HEADER_VALUE = "@widgetic/api-sdk-ts/2.0.1";
29
+ export declare const SDK_VERSION_HEADER_VALUE = "@widgetic/api-sdk-ts/2.0.2";
30
30
  export interface ConfigurationParameters {
31
31
  basePath?: string;
32
32
  fetchApi?: FetchAPI;
package/dist/runtime.js CHANGED
@@ -38,7 +38,7 @@ exports.BASE_PATH = "https://api.widgetic.com/v1".replace(/\/+$/, "");
38
38
  // runs. The version is the one in this package's package.json: `scripts/deploy-sdk.sh` reads it and hands it to the
39
39
  // generator as `npmVersion`, so the number a call reports is the number on npm.
40
40
  exports.SDK_NAME = "@widgetic/api-sdk-ts";
41
- exports.SDK_VERSION = "2.0.1";
41
+ exports.SDK_VERSION = "2.0.2";
42
42
  exports.SDK_VERSION_HEADER = "X-SDK-Version";
43
43
  exports.SDK_VERSION_HEADER_VALUE = `${exports.SDK_NAME}/${exports.SDK_VERSION}`;
44
44
  class Configuration {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/api-sdk-ts",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "TypeScript and JavaScript client for the public Widgetic API: the calls a Widgetic customer or partner can make with an API key (ESM and CommonJS).",
5
5
  "author": "Widgetic",
6
6
  "license": "MIT",