@widgetic/api-sdk-ts 2.0.0 → 2.0.1

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 (46) hide show
  1. package/dist/apis/TokensApi.d.ts +2 -0
  2. package/dist/apis/TokensApi.js +2 -0
  3. package/dist/esm/apis/TokensApi.js +2 -0
  4. package/dist/esm/models/GetOperationResponseData.js +3 -2
  5. package/dist/esm/models/GetOperationResponseDataMetadata.js +58 -0
  6. package/dist/esm/models/WidgetClarification.js +52 -0
  7. package/dist/esm/models/WidgetClarificationOption.js +51 -0
  8. package/dist/esm/models/WidgetClarificationQuestion.js +60 -0
  9. package/dist/esm/models/WidgetNextStep.js +67 -0
  10. package/dist/esm/models/WidgetPlan.js +61 -0
  11. package/dist/esm/models/WidgetPlanDecisions.js +68 -0
  12. package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
  13. package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
  14. package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
  15. package/dist/esm/models/WidgetPlanTask.js +80 -0
  16. package/dist/esm/models/index.js +11 -0
  17. package/dist/esm/runtime.js +1 -1
  18. package/dist/models/GetOperationResponseData.d.ts +3 -5
  19. package/dist/models/GetOperationResponseData.js +3 -2
  20. package/dist/models/GetOperationResponseDataMetadata.d.ts +65 -0
  21. package/dist/models/GetOperationResponseDataMetadata.js +66 -0
  22. package/dist/models/WidgetClarification.d.ts +45 -0
  23. package/dist/models/WidgetClarification.js +59 -0
  24. package/dist/models/WidgetClarificationOption.d.ts +44 -0
  25. package/dist/models/WidgetClarificationOption.js +58 -0
  26. package/dist/models/WidgetClarificationQuestion.d.ts +57 -0
  27. package/dist/models/WidgetClarificationQuestion.js +67 -0
  28. package/dist/models/WidgetNextStep.d.ts +63 -0
  29. package/dist/models/WidgetNextStep.js +75 -0
  30. package/dist/models/WidgetPlan.d.ts +58 -0
  31. package/dist/models/WidgetPlan.js +68 -0
  32. package/dist/models/WidgetPlanDecisions.d.ts +71 -0
  33. package/dist/models/WidgetPlanDecisions.js +75 -0
  34. package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
  35. package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
  36. package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
  37. package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
  38. package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
  39. package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
  40. package/dist/models/WidgetPlanTask.d.ts +77 -0
  41. package/dist/models/WidgetPlanTask.js +88 -0
  42. package/dist/models/index.d.ts +11 -0
  43. package/dist/models/index.js +11 -0
  44. package/dist/runtime.d.ts +2 -2
  45. package/dist/runtime.js +1 -1
  46. package/package.json +1 -1
@@ -0,0 +1,80 @@
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 WidgetPlanTaskKindEnum = {
18
+ Read: 'read',
19
+ Layout: 'layout',
20
+ Content: 'content',
21
+ Style: 'style',
22
+ Library: 'library',
23
+ Adapter: 'adapter',
24
+ Motion: 'motion',
25
+ Behavior: 'behavior',
26
+ Polish: 'polish',
27
+ Check: 'check',
28
+ Other: 'other'
29
+ };
30
+ /**
31
+ * @export
32
+ */
33
+ export const WidgetPlanTaskStatusEnum = {
34
+ Pending: 'pending',
35
+ InProgress: 'in_progress',
36
+ Done: 'done',
37
+ Failed: 'failed'
38
+ };
39
+ /**
40
+ * Check if a given object implements the WidgetPlanTask interface.
41
+ */
42
+ export function instanceOfWidgetPlanTask(value) {
43
+ if (!('id' in value) || value['id'] === undefined)
44
+ return false;
45
+ if (!('label' in value) || value['label'] === undefined)
46
+ return false;
47
+ if (!('kind' in value) || value['kind'] === undefined)
48
+ return false;
49
+ if (!('status' in value) || value['status'] === undefined)
50
+ return false;
51
+ return true;
52
+ }
53
+ export function WidgetPlanTaskFromJSON(json) {
54
+ return WidgetPlanTaskFromJSONTyped(json, false);
55
+ }
56
+ export function WidgetPlanTaskFromJSONTyped(json, ignoreDiscriminator) {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+ 'id': json['id'],
62
+ 'label': json['label'],
63
+ 'kind': json['kind'],
64
+ 'status': json['status'],
65
+ };
66
+ }
67
+ export function WidgetPlanTaskToJSON(json) {
68
+ return WidgetPlanTaskToJSONTyped(json, false);
69
+ }
70
+ export function WidgetPlanTaskToJSONTyped(value, ignoreDiscriminator = false) {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+ return {
75
+ 'id': value['id'],
76
+ 'label': value['label'],
77
+ 'kind': value['kind'],
78
+ 'status': value['status'],
79
+ };
80
+ }
@@ -124,6 +124,7 @@ export * from './GetManagedUsersByManagerIdResponse.js';
124
124
  export * from './GetManagedUsersByManagerIdResponseData.js';
125
125
  export * from './GetOperationResponse.js';
126
126
  export * from './GetOperationResponseData.js';
127
+ export * from './GetOperationResponseDataMetadata.js';
127
128
  export * from './GetPartnerBillingOverview200Response.js';
128
129
  export * from './GetPartnerEntitlementsResponse.js';
129
130
  export * from './GetPartnerEntitlementsResponseData.js';
@@ -314,6 +315,16 @@ export * from './ValidateCompositionContentResponseData.js';
314
315
  export * from './ValidateToken200Response.js';
315
316
  export * from './ValidateToken200ResponseData.js';
316
317
  export * from './Widget.js';
318
+ export * from './WidgetClarification.js';
319
+ export * from './WidgetClarificationOption.js';
320
+ export * from './WidgetClarificationQuestion.js';
321
+ export * from './WidgetNextStep.js';
322
+ export * from './WidgetPlan.js';
323
+ export * from './WidgetPlanDecisions.js';
324
+ export * from './WidgetPlanDecisionsAdaptersInner.js';
325
+ export * from './WidgetPlanDecisionsLibrariesInner.js';
326
+ export * from './WidgetPlanDecisionsResponsive.js';
327
+ export * from './WidgetPlanTask.js';
317
328
  export * from './Workflow.js';
318
329
  export * from './WorkflowCompositionAction.js';
319
330
  export * from './WorkflowCompositionField.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.0";
32
+ export const SDK_VERSION = "2.0.1";
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,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { GetOperationResponseDataMetadata } from './GetOperationResponseDataMetadata';
12
13
  /**
13
14
  * Operation payload including status, metadata, and timestamps.
14
15
  * @export
@@ -40,14 +41,11 @@ export interface GetOperationResponseData {
40
41
  */
41
42
  progress?: number;
42
43
  /**
43
- * 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).
44
44
  *
45
- * @type {{ [key: string]: any; }}
45
+ * @type {GetOperationResponseDataMetadata}
46
46
  * @memberof GetOperationResponseData
47
47
  */
48
- metadata?: {
49
- [key: string]: any;
50
- };
48
+ metadata?: GetOperationResponseDataMetadata;
51
49
  /**
52
50
  * Why a `failed` operation failed (absent otherwise)
53
51
  * @type {string}
@@ -19,6 +19,7 @@ exports.GetOperationResponseDataFromJSON = GetOperationResponseDataFromJSON;
19
19
  exports.GetOperationResponseDataFromJSONTyped = GetOperationResponseDataFromJSONTyped;
20
20
  exports.GetOperationResponseDataToJSON = GetOperationResponseDataToJSON;
21
21
  exports.GetOperationResponseDataToJSONTyped = GetOperationResponseDataToJSONTyped;
22
+ const GetOperationResponseDataMetadata_1 = require("./GetOperationResponseDataMetadata");
22
23
  /**
23
24
  * @export
24
25
  */
@@ -47,7 +48,7 @@ function GetOperationResponseDataFromJSONTyped(json, ignoreDiscriminator) {
47
48
  'type': json['type'] == null ? undefined : json['type'],
48
49
  'status': json['status'] == null ? undefined : json['status'],
49
50
  'progress': json['progress'] == null ? undefined : json['progress'],
50
- 'metadata': json['metadata'] == null ? undefined : json['metadata'],
51
+ 'metadata': json['metadata'] == null ? undefined : (0, GetOperationResponseDataMetadata_1.GetOperationResponseDataMetadataFromJSON)(json['metadata']),
51
52
  'error': json['error'] == null ? undefined : json['error'],
52
53
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
53
54
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
@@ -65,7 +66,7 @@ function GetOperationResponseDataToJSONTyped(value, ignoreDiscriminator = false)
65
66
  'type': value['type'],
66
67
  'status': value['status'],
67
68
  'progress': value['progress'],
68
- 'metadata': value['metadata'],
69
+ 'metadata': (0, GetOperationResponseDataMetadata_1.GetOperationResponseDataMetadataToJSON)(value['metadata']),
69
70
  'error': value['error'],
70
71
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
71
72
  'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
@@ -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
+ import type { WidgetNextStep } from './WidgetNextStep';
13
+ import type { WidgetClarification } from './WidgetClarification';
14
+ import type { WidgetPlan } from './WidgetPlan';
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.
17
+ *
18
+ * @export
19
+ * @interface GetOperationResponseDataMetadata
20
+ */
21
+ export interface GetOperationResponseDataMetadata {
22
+ [key: string]: any | any;
23
+ /**
24
+ * The plan of a code generation, published when it is made and again each time a step changes (`pending`, `in_progress`, `done`, `failed`). `null` when the build was called off, so the client hides the plan it showed.
25
+ *
26
+ * @type {WidgetPlan}
27
+ * @memberof GetOperationResponseDataMetadata
28
+ */
29
+ plan?: WidgetPlan | null;
30
+ /**
31
+ * `needs_answers` on a code generation that completed by asking questions: nothing was built, the credit was returned, and the card is in `clarification`. Absent on every other outcome.
32
+ *
33
+ * @type {string}
34
+ * @memberof GetOperationResponseDataMetadata
35
+ */
36
+ outcome?: GetOperationResponseDataMetadataOutcomeEnum;
37
+ /**
38
+ * The card of questions, present with `outcome` `needs_answers`.
39
+ * @type {WidgetClarification}
40
+ * @memberof GetOperationResponseDataMetadata
41
+ */
42
+ clarification?: WidgetClarification;
43
+ /**
44
+ * Suggested next improvements of a completed code generation, the recommended one first. Absent when none were made in time or the build was not kept.
45
+ *
46
+ * @type {Array<WidgetNextStep>}
47
+ * @memberof GetOperationResponseDataMetadata
48
+ */
49
+ nextSteps?: Array<WidgetNextStep>;
50
+ }
51
+ /**
52
+ * @export
53
+ */
54
+ export declare const GetOperationResponseDataMetadataOutcomeEnum: {
55
+ readonly NeedsAnswers: 'needs_answers';
56
+ };
57
+ export type GetOperationResponseDataMetadataOutcomeEnum = typeof GetOperationResponseDataMetadataOutcomeEnum[keyof typeof GetOperationResponseDataMetadataOutcomeEnum];
58
+ /**
59
+ * Check if a given object implements the GetOperationResponseDataMetadata interface.
60
+ */
61
+ export declare function instanceOfGetOperationResponseDataMetadata(value: object): value is GetOperationResponseDataMetadata;
62
+ export declare function GetOperationResponseDataMetadataFromJSON(json: any): GetOperationResponseDataMetadata;
63
+ export declare function GetOperationResponseDataMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetOperationResponseDataMetadata;
64
+ export declare function GetOperationResponseDataMetadataToJSON(json: any): GetOperationResponseDataMetadata;
65
+ export declare function GetOperationResponseDataMetadataToJSONTyped(value?: GetOperationResponseDataMetadata | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
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.GetOperationResponseDataMetadataOutcomeEnum = void 0;
17
+ exports.instanceOfGetOperationResponseDataMetadata = instanceOfGetOperationResponseDataMetadata;
18
+ exports.GetOperationResponseDataMetadataFromJSON = GetOperationResponseDataMetadataFromJSON;
19
+ exports.GetOperationResponseDataMetadataFromJSONTyped = GetOperationResponseDataMetadataFromJSONTyped;
20
+ exports.GetOperationResponseDataMetadataToJSON = GetOperationResponseDataMetadataToJSON;
21
+ exports.GetOperationResponseDataMetadataToJSONTyped = GetOperationResponseDataMetadataToJSONTyped;
22
+ const WidgetNextStep_1 = require("./WidgetNextStep");
23
+ const WidgetClarification_1 = require("./WidgetClarification");
24
+ const WidgetPlan_1 = require("./WidgetPlan");
25
+ /**
26
+ * @export
27
+ */
28
+ exports.GetOperationResponseDataMetadataOutcomeEnum = {
29
+ NeedsAnswers: 'needs_answers'
30
+ };
31
+ /**
32
+ * Check if a given object implements the GetOperationResponseDataMetadata interface.
33
+ */
34
+ function instanceOfGetOperationResponseDataMetadata(value) {
35
+ return true;
36
+ }
37
+ function GetOperationResponseDataMetadataFromJSON(json) {
38
+ return GetOperationResponseDataMetadataFromJSONTyped(json, false);
39
+ }
40
+ function GetOperationResponseDataMetadataFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ ...json,
46
+ 'plan': json['plan'] == null ? undefined : (0, WidgetPlan_1.WidgetPlanFromJSON)(json['plan']),
47
+ 'outcome': json['outcome'] == null ? undefined : json['outcome'],
48
+ 'clarification': json['clarification'] == null ? undefined : (0, WidgetClarification_1.WidgetClarificationFromJSON)(json['clarification']),
49
+ 'nextSteps': json['nextSteps'] == null ? undefined : (json['nextSteps'].map(WidgetNextStep_1.WidgetNextStepFromJSON)),
50
+ };
51
+ }
52
+ function GetOperationResponseDataMetadataToJSON(json) {
53
+ return GetOperationResponseDataMetadataToJSONTyped(json, false);
54
+ }
55
+ function GetOperationResponseDataMetadataToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ ...value,
61
+ 'plan': (0, WidgetPlan_1.WidgetPlanToJSON)(value['plan']),
62
+ 'outcome': value['outcome'],
63
+ 'clarification': (0, WidgetClarification_1.WidgetClarificationToJSON)(value['clarification']),
64
+ 'nextSteps': value['nextSteps'] == null ? undefined : (value['nextSteps'].map(WidgetNextStep_1.WidgetNextStepToJSON)),
65
+ };
66
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { WidgetClarificationQuestion } from './WidgetClarificationQuestion';
13
+ /**
14
+ * The card of questions the assistant puts to the person before building, in `metadata.clarification` of an operation that completed with `metadata.outcome` `needs_answers`. Nothing was built and the credit was returned. The same words are saved in the chat as a plain-text assistant message.
15
+ * @export
16
+ * @interface WidgetClarification
17
+ */
18
+ export interface WidgetClarification {
19
+ /**
20
+ * The sentence that introduces the card.
21
+ * @type {string}
22
+ * @memberof WidgetClarification
23
+ */
24
+ message: string;
25
+ /**
26
+ *
27
+ * @type {Array<WidgetClarificationQuestion>}
28
+ * @memberof WidgetClarification
29
+ */
30
+ questions: Array<WidgetClarificationQuestion>;
31
+ /**
32
+ * The paths of the widget's files the questions were judged against, for a "Read N files" row.
33
+ * @type {Array<string>}
34
+ * @memberof WidgetClarification
35
+ */
36
+ filesRead: Array<string>;
37
+ }
38
+ /**
39
+ * Check if a given object implements the WidgetClarification interface.
40
+ */
41
+ export declare function instanceOfWidgetClarification(value: object): value is WidgetClarification;
42
+ export declare function WidgetClarificationFromJSON(json: any): WidgetClarification;
43
+ export declare function WidgetClarificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetClarification;
44
+ export declare function WidgetClarificationToJSON(json: any): WidgetClarification;
45
+ export declare function WidgetClarificationToJSONTyped(value?: WidgetClarification | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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.instanceOfWidgetClarification = instanceOfWidgetClarification;
17
+ exports.WidgetClarificationFromJSON = WidgetClarificationFromJSON;
18
+ exports.WidgetClarificationFromJSONTyped = WidgetClarificationFromJSONTyped;
19
+ exports.WidgetClarificationToJSON = WidgetClarificationToJSON;
20
+ exports.WidgetClarificationToJSONTyped = WidgetClarificationToJSONTyped;
21
+ const WidgetClarificationQuestion_1 = require("./WidgetClarificationQuestion");
22
+ /**
23
+ * Check if a given object implements the WidgetClarification interface.
24
+ */
25
+ function instanceOfWidgetClarification(value) {
26
+ if (!('message' in value) || value['message'] === undefined)
27
+ return false;
28
+ if (!('questions' in value) || value['questions'] === undefined)
29
+ return false;
30
+ if (!('filesRead' in value) || value['filesRead'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function WidgetClarificationFromJSON(json) {
35
+ return WidgetClarificationFromJSONTyped(json, false);
36
+ }
37
+ function WidgetClarificationFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'message': json['message'],
43
+ 'questions': (json['questions'].map(WidgetClarificationQuestion_1.WidgetClarificationQuestionFromJSON)),
44
+ 'filesRead': json['filesRead'],
45
+ };
46
+ }
47
+ function WidgetClarificationToJSON(json) {
48
+ return WidgetClarificationToJSONTyped(json, false);
49
+ }
50
+ function WidgetClarificationToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'message': value['message'],
56
+ 'questions': (value['questions'].map(WidgetClarificationQuestion_1.WidgetClarificationQuestionToJSON)),
57
+ 'filesRead': value['filesRead'],
58
+ };
59
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface WidgetClarificationOption
16
+ */
17
+ export interface WidgetClarificationOption {
18
+ /**
19
+ * `q1o1`, `q1o2`, ... Stable within the card.
20
+ * @type {string}
21
+ * @memberof WidgetClarificationOption
22
+ */
23
+ id: string;
24
+ /**
25
+ * The option text, at most 60 characters, including the parenthesised recommendation word on the recommended option (for example `Three plans (Recommended)`).
26
+ * @type {string}
27
+ * @memberof WidgetClarificationOption
28
+ */
29
+ label: string;
30
+ /**
31
+ * True for the one option the assistant recommends. It is always the first option when set. The server composes the recommendation word into `label`; clients may still draw a badge.
32
+ * @type {boolean}
33
+ * @memberof WidgetClarificationOption
34
+ */
35
+ recommended: boolean;
36
+ }
37
+ /**
38
+ * Check if a given object implements the WidgetClarificationOption interface.
39
+ */
40
+ export declare function instanceOfWidgetClarificationOption(value: object): value is WidgetClarificationOption;
41
+ export declare function WidgetClarificationOptionFromJSON(json: any): WidgetClarificationOption;
42
+ export declare function WidgetClarificationOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetClarificationOption;
43
+ export declare function WidgetClarificationOptionToJSON(json: any): WidgetClarificationOption;
44
+ export declare function WidgetClarificationOptionToJSONTyped(value?: WidgetClarificationOption | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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.instanceOfWidgetClarificationOption = instanceOfWidgetClarificationOption;
17
+ exports.WidgetClarificationOptionFromJSON = WidgetClarificationOptionFromJSON;
18
+ exports.WidgetClarificationOptionFromJSONTyped = WidgetClarificationOptionFromJSONTyped;
19
+ exports.WidgetClarificationOptionToJSON = WidgetClarificationOptionToJSON;
20
+ exports.WidgetClarificationOptionToJSONTyped = WidgetClarificationOptionToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the WidgetClarificationOption interface.
23
+ */
24
+ function instanceOfWidgetClarificationOption(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('label' in value) || value['label'] === undefined)
28
+ return false;
29
+ if (!('recommended' in value) || value['recommended'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function WidgetClarificationOptionFromJSON(json) {
34
+ return WidgetClarificationOptionFromJSONTyped(json, false);
35
+ }
36
+ function WidgetClarificationOptionFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'id': json['id'],
42
+ 'label': json['label'],
43
+ 'recommended': json['recommended'],
44
+ };
45
+ }
46
+ function WidgetClarificationOptionToJSON(json) {
47
+ return WidgetClarificationOptionToJSONTyped(json, false);
48
+ }
49
+ function WidgetClarificationOptionToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'id': value['id'],
55
+ 'label': value['label'],
56
+ 'recommended': value['recommended'],
57
+ };
58
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Widgetic API Gateway
3
+ * API documentation for the Widgetic API Gateway
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { WidgetClarificationOption } from './WidgetClarificationOption';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface WidgetClarificationQuestion
17
+ */
18
+ export interface WidgetClarificationQuestion {
19
+ /**
20
+ * `q1`, `q2`, ...
21
+ * @type {string}
22
+ * @memberof WidgetClarificationQuestion
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof WidgetClarificationQuestion
29
+ */
30
+ question: string;
31
+ /**
32
+ * The localized word placed in parentheses on the recommended option's label (default `Recommended`).
33
+ * @type {string}
34
+ * @memberof WidgetClarificationQuestion
35
+ */
36
+ recommendedWord: string;
37
+ /**
38
+ * Two to five options with the recommended one first; empty for a question answered in words only.
39
+ * @type {Array<WidgetClarificationOption>}
40
+ * @memberof WidgetClarificationQuestion
41
+ */
42
+ options: Array<WidgetClarificationOption>;
43
+ /**
44
+ * Whether the person may answer in their own words (the "Other..." row). Always true when there are no options.
45
+ * @type {boolean}
46
+ * @memberof WidgetClarificationQuestion
47
+ */
48
+ allowOther: boolean;
49
+ }
50
+ /**
51
+ * Check if a given object implements the WidgetClarificationQuestion interface.
52
+ */
53
+ export declare function instanceOfWidgetClarificationQuestion(value: object): value is WidgetClarificationQuestion;
54
+ export declare function WidgetClarificationQuestionFromJSON(json: any): WidgetClarificationQuestion;
55
+ export declare function WidgetClarificationQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetClarificationQuestion;
56
+ export declare function WidgetClarificationQuestionToJSON(json: any): WidgetClarificationQuestion;
57
+ export declare function WidgetClarificationQuestionToJSONTyped(value?: WidgetClarificationQuestion | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
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.instanceOfWidgetClarificationQuestion = instanceOfWidgetClarificationQuestion;
17
+ exports.WidgetClarificationQuestionFromJSON = WidgetClarificationQuestionFromJSON;
18
+ exports.WidgetClarificationQuestionFromJSONTyped = WidgetClarificationQuestionFromJSONTyped;
19
+ exports.WidgetClarificationQuestionToJSON = WidgetClarificationQuestionToJSON;
20
+ exports.WidgetClarificationQuestionToJSONTyped = WidgetClarificationQuestionToJSONTyped;
21
+ const WidgetClarificationOption_1 = require("./WidgetClarificationOption");
22
+ /**
23
+ * Check if a given object implements the WidgetClarificationQuestion interface.
24
+ */
25
+ function instanceOfWidgetClarificationQuestion(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('question' in value) || value['question'] === undefined)
29
+ return false;
30
+ if (!('recommendedWord' in value) || value['recommendedWord'] === undefined)
31
+ return false;
32
+ if (!('options' in value) || value['options'] === undefined)
33
+ return false;
34
+ if (!('allowOther' in value) || value['allowOther'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function WidgetClarificationQuestionFromJSON(json) {
39
+ return WidgetClarificationQuestionFromJSONTyped(json, false);
40
+ }
41
+ function WidgetClarificationQuestionFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'id': json['id'],
47
+ 'question': json['question'],
48
+ 'recommendedWord': json['recommendedWord'],
49
+ 'options': (json['options'].map(WidgetClarificationOption_1.WidgetClarificationOptionFromJSON)),
50
+ 'allowOther': json['allowOther'],
51
+ };
52
+ }
53
+ function WidgetClarificationQuestionToJSON(json) {
54
+ return WidgetClarificationQuestionToJSONTyped(json, false);
55
+ }
56
+ function WidgetClarificationQuestionToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'id': value['id'],
62
+ 'question': value['question'],
63
+ 'recommendedWord': value['recommendedWord'],
64
+ 'options': (value['options'].map(WidgetClarificationOption_1.WidgetClarificationOptionToJSON)),
65
+ 'allowOther': value['allowOther'],
66
+ };
67
+ }