@widgetic/api-sdk 1.0.22 → 1.0.24

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.
@@ -105,6 +105,18 @@ export interface GenerateCodeRequest {
105
105
  * @memberof GenerateCodeRequest
106
106
  */
107
107
  chipIntent?: 'refine' | 'generate_anyway' | null;
108
+ /**
109
+ * Widget language. Omitted means Svelte.
110
+ * @type {string}
111
+ * @memberof GenerateCodeRequest
112
+ */
113
+ language?: 'svelte' | 'react' | null;
114
+ /**
115
+ * Optional customer brand kit applied at generation.
116
+ * @type {object}
117
+ * @memberof GenerateCodeRequest
118
+ */
119
+ brandKit?: object | null;
108
120
  }
109
121
  /**
110
122
  * Check if a given object implements the GenerateCodeRequest interface.
@@ -44,6 +44,8 @@ export function GenerateCodeRequestFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'compileFixOnly': json['compileFixOnly'] == null ? undefined : json['compileFixOnly'],
45
45
  'skipIntentGate': json['skipIntentGate'] == null ? undefined : json['skipIntentGate'],
46
46
  'chipIntent': json['chipIntent'] == null ? undefined : json['chipIntent'],
47
+ 'language': json['language'] == null ? undefined : json['language'],
48
+ 'brandKit': json['brandKit'] == null ? undefined : json['brandKit'],
47
49
  };
48
50
  }
49
51
  export function GenerateCodeRequestToJSON(json) {
@@ -69,5 +71,7 @@ export function GenerateCodeRequestToJSONTyped(value, ignoreDiscriminator = fals
69
71
  'compileFixOnly': value['compileFixOnly'],
70
72
  'skipIntentGate': value['skipIntentGate'],
71
73
  'chipIntent': value['chipIntent'],
74
+ 'language': value['language'],
75
+ 'brandKit': value['brandKit'],
72
76
  };
73
77
  }
@@ -45,6 +45,12 @@ export interface SignupUserRequest {
45
45
  * @memberof SignupUserRequest
46
46
  */
47
47
  inviteCode?: string;
48
+ /**
49
+ * Display name collected on email signup.
50
+ * @type {string}
51
+ * @memberof SignupUserRequest
52
+ */
53
+ name?: string;
48
54
  }
49
55
  /**
50
56
  * Check if a given object implements the SignupUserRequest interface.
@@ -34,6 +34,7 @@ export function SignupUserRequestFromJSONTyped(json, ignoreDiscriminator) {
34
34
  'role': json['role'] == null ? undefined : json['role'],
35
35
  'plan': json['plan'] == null ? undefined : json['plan'],
36
36
  'inviteCode': json['inviteCode'] == null ? undefined : json['inviteCode'],
37
+ 'name': json['name'] == null ? undefined : json['name'],
37
38
  };
38
39
  }
39
40
  export function SignupUserRequestToJSON(json) {
@@ -49,5 +50,6 @@ export function SignupUserRequestToJSONTyped(value, ignoreDiscriminator = false)
49
50
  'role': value['role'],
50
51
  'plan': value['plan'],
51
52
  'inviteCode': value['inviteCode'],
53
+ 'name': value['name'],
52
54
  };
53
55
  }
@@ -194,3 +194,5 @@ export declare class TextApiResponse {
194
194
  constructor(raw: Response);
195
195
  value(): Promise<string>;
196
196
  }
197
+ export declare const RETIRED_SURFACE_CODES: readonly ['PLANNER_REMOVED', 'VM_REMOVED', 'VM_METRICS_REMOVED'];
198
+ export declare function isRetiredSurfaceError(error: unknown): error is ResponseError;
@@ -461,3 +461,12 @@ export class TextApiResponse {
461
461
  }
462
462
  ;
463
463
  }
464
+ export const RETIRED_SURFACE_CODES = ['PLANNER_REMOVED', 'VM_REMOVED', 'VM_METRICS_REMOVED'];
465
+ export function isRetiredSurfaceError(error) {
466
+ if (!(error instanceof ResponseError))
467
+ return false;
468
+ if (!error.response || error.response.status !== 410)
469
+ return false;
470
+ const code = error.code;
471
+ return typeof code === 'string' && RETIRED_SURFACE_CODES.indexOf(code) !== -1;
472
+ }
@@ -105,6 +105,18 @@ export interface GenerateCodeRequest {
105
105
  * @memberof GenerateCodeRequest
106
106
  */
107
107
  chipIntent?: 'refine' | 'generate_anyway' | null;
108
+ /**
109
+ * Widget language. Omitted means Svelte.
110
+ * @type {string}
111
+ * @memberof GenerateCodeRequest
112
+ */
113
+ language?: 'svelte' | 'react' | null;
114
+ /**
115
+ * Optional customer brand kit applied at generation.
116
+ * @type {object}
117
+ * @memberof GenerateCodeRequest
118
+ */
119
+ brandKit?: object | null;
108
120
  }
109
121
  /**
110
122
  * Check if a given object implements the GenerateCodeRequest interface.
@@ -51,6 +51,8 @@ function GenerateCodeRequestFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'compileFixOnly': json['compileFixOnly'] == null ? undefined : json['compileFixOnly'],
52
52
  'skipIntentGate': json['skipIntentGate'] == null ? undefined : json['skipIntentGate'],
53
53
  'chipIntent': json['chipIntent'] == null ? undefined : json['chipIntent'],
54
+ 'language': json['language'] == null ? undefined : json['language'],
55
+ 'brandKit': json['brandKit'] == null ? undefined : json['brandKit'],
54
56
  };
55
57
  }
56
58
  function GenerateCodeRequestToJSON(json) {
@@ -76,5 +78,7 @@ function GenerateCodeRequestToJSONTyped(value, ignoreDiscriminator = false) {
76
78
  'compileFixOnly': value['compileFixOnly'],
77
79
  'skipIntentGate': value['skipIntentGate'],
78
80
  'chipIntent': value['chipIntent'],
81
+ 'language': value['language'],
82
+ 'brandKit': value['brandKit'],
79
83
  };
80
84
  }
@@ -45,6 +45,12 @@ export interface SignupUserRequest {
45
45
  * @memberof SignupUserRequest
46
46
  */
47
47
  inviteCode?: string;
48
+ /**
49
+ * Display name collected on email signup.
50
+ * @type {string}
51
+ * @memberof SignupUserRequest
52
+ */
53
+ name?: string;
48
54
  }
49
55
  /**
50
56
  * Check if a given object implements the SignupUserRequest interface.
@@ -41,6 +41,7 @@ function SignupUserRequestFromJSONTyped(json, ignoreDiscriminator) {
41
41
  'role': json['role'] == null ? undefined : json['role'],
42
42
  'plan': json['plan'] == null ? undefined : json['plan'],
43
43
  'inviteCode': json['inviteCode'] == null ? undefined : json['inviteCode'],
44
+ 'name': json['name'] == null ? undefined : json['name'],
44
45
  };
45
46
  }
46
47
  function SignupUserRequestToJSON(json) {
@@ -56,5 +57,6 @@ function SignupUserRequestToJSONTyped(value, ignoreDiscriminator = false) {
56
57
  'role': value['role'],
57
58
  'plan': value['plan'],
58
59
  'inviteCode': value['inviteCode'],
60
+ 'name': value['name'],
59
61
  };
60
62
  }
package/dist/runtime.d.ts CHANGED
@@ -194,3 +194,5 @@ export declare class TextApiResponse {
194
194
  constructor(raw: Response);
195
195
  value(): Promise<string>;
196
196
  }
197
+ export declare const RETIRED_SURFACE_CODES: readonly ['PLANNER_REMOVED', 'VM_REMOVED', 'VM_METRICS_REMOVED'];
198
+ export declare function isRetiredSurfaceError(error: unknown): error is ResponseError;
package/dist/runtime.js CHANGED
@@ -477,3 +477,14 @@ class TextApiResponse {
477
477
  ;
478
478
  }
479
479
  exports.TextApiResponse = TextApiResponse;
480
+ const RETIRED_SURFACE_CODES = ['PLANNER_REMOVED', 'VM_REMOVED', 'VM_METRICS_REMOVED'];
481
+ function isRetiredSurfaceError(error) {
482
+ if (!(error instanceof ResponseError))
483
+ return false;
484
+ if (!error.response || error.response.status !== 410)
485
+ return false;
486
+ const code = error.code;
487
+ return typeof code === 'string' && RETIRED_SURFACE_CODES.indexOf(code) !== -1;
488
+ }
489
+ exports.RETIRED_SURFACE_CODES = RETIRED_SURFACE_CODES;
490
+ exports.isRetiredSurfaceError = isRetiredSurfaceError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/api-sdk",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "Official JavaScript/TypeScript client for the Widgetic API (ESM & CJS)",
5
5
  "author": "Widgetic",
6
6
  "repository": {