@widgetic/api-sdk-ts 2.0.0 → 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.
Files changed (59) hide show
  1. package/dist/apis/BrandKitApi.d.ts +4 -4
  2. package/dist/apis/BrandKitApi.js +4 -4
  3. package/dist/apis/TokensApi.d.ts +2 -0
  4. package/dist/apis/TokensApi.js +2 -0
  5. package/dist/esm/apis/BrandKitApi.js +4 -4
  6. package/dist/esm/apis/TokensApi.js +2 -0
  7. package/dist/esm/models/BrandKitTokens.js +3 -0
  8. package/dist/esm/models/BrandTextStyle.js +65 -0
  9. package/dist/esm/models/GetOperationResponseData.js +3 -2
  10. package/dist/esm/models/GetOperationResponseDataMetadata.js +58 -0
  11. package/dist/esm/models/PatchBrandKitRequest.js +3 -0
  12. package/dist/esm/models/WidgetClarification.js +52 -0
  13. package/dist/esm/models/WidgetClarificationOption.js +51 -0
  14. package/dist/esm/models/WidgetClarificationQuestion.js +60 -0
  15. package/dist/esm/models/WidgetNextStep.js +67 -0
  16. package/dist/esm/models/WidgetPlan.js +61 -0
  17. package/dist/esm/models/WidgetPlanDecisions.js +72 -0
  18. package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
  19. package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
  20. package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
  21. package/dist/esm/models/WidgetPlanTask.js +80 -0
  22. package/dist/esm/models/index.js +12 -0
  23. package/dist/esm/runtime.js +1 -1
  24. package/dist/models/BrandKitTokens.d.ts +8 -1
  25. package/dist/models/BrandKitTokens.js +3 -0
  26. package/dist/models/BrandKitView.d.ts +1 -1
  27. package/dist/models/BrandTextStyle.d.ts +59 -0
  28. package/dist/models/BrandTextStyle.js +73 -0
  29. package/dist/models/GetOperationResponseData.d.ts +3 -5
  30. package/dist/models/GetOperationResponseData.js +3 -2
  31. package/dist/models/GetOperationResponseDataMetadata.d.ts +65 -0
  32. package/dist/models/GetOperationResponseDataMetadata.js +66 -0
  33. package/dist/models/PatchBrandKitRequest.d.ts +7 -0
  34. package/dist/models/PatchBrandKitRequest.js +3 -0
  35. package/dist/models/WidgetClarification.d.ts +45 -0
  36. package/dist/models/WidgetClarification.js +59 -0
  37. package/dist/models/WidgetClarificationOption.d.ts +44 -0
  38. package/dist/models/WidgetClarificationOption.js +58 -0
  39. package/dist/models/WidgetClarificationQuestion.d.ts +57 -0
  40. package/dist/models/WidgetClarificationQuestion.js +67 -0
  41. package/dist/models/WidgetNextStep.d.ts +63 -0
  42. package/dist/models/WidgetNextStep.js +75 -0
  43. package/dist/models/WidgetPlan.d.ts +58 -0
  44. package/dist/models/WidgetPlan.js +68 -0
  45. package/dist/models/WidgetPlanDecisions.d.ts +77 -0
  46. package/dist/models/WidgetPlanDecisions.js +79 -0
  47. package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
  48. package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
  49. package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
  50. package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
  51. package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
  52. package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
  53. package/dist/models/WidgetPlanTask.d.ts +77 -0
  54. package/dist/models/WidgetPlanTask.js +88 -0
  55. package/dist/models/index.d.ts +12 -0
  56. package/dist/models/index.js +12 -0
  57. package/dist/runtime.d.ts +2 -2
  58. package/dist/runtime.js +1 -1
  59. package/package.json +1 -1
@@ -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
+ }
@@ -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'],
@@ -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
+ }
@@ -0,0 +1,63 @@
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 suggested next improvement, in `metadata.nextSteps` of a completed generation. The label is a complete request: sending it as the next message is the whole action. The first suggestion is always the recommended one; the chips saved under the reply carry no flag, so a client applies the same rule after a reload.
14
+ * @export
15
+ * @interface WidgetNextStep
16
+ */
17
+ export interface WidgetNextStep {
18
+ /**
19
+ * `n1`, `n2`, ...
20
+ * @type {string}
21
+ * @memberof WidgetNextStep
22
+ */
23
+ id: string;
24
+ /**
25
+ * The request, at most 80 characters.
26
+ * @type {string}
27
+ * @memberof WidgetNextStep
28
+ */
29
+ label: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof WidgetNextStep
34
+ */
35
+ kind: WidgetNextStepKindEnum;
36
+ /**
37
+ * True for the first suggestion and false for the others.
38
+ * @type {boolean}
39
+ * @memberof WidgetNextStep
40
+ */
41
+ recommended: boolean;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const WidgetNextStepKindEnum: {
47
+ readonly Content: 'content';
48
+ readonly Style: 'style';
49
+ readonly Layout: 'layout';
50
+ readonly Behavior: 'behavior';
51
+ readonly Animation: 'animation';
52
+ readonly Data: 'data';
53
+ readonly Other: 'other';
54
+ };
55
+ export type WidgetNextStepKindEnum = typeof WidgetNextStepKindEnum[keyof typeof WidgetNextStepKindEnum];
56
+ /**
57
+ * Check if a given object implements the WidgetNextStep interface.
58
+ */
59
+ export declare function instanceOfWidgetNextStep(value: object): value is WidgetNextStep;
60
+ export declare function WidgetNextStepFromJSON(json: any): WidgetNextStep;
61
+ export declare function WidgetNextStepFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetNextStep;
62
+ export declare function WidgetNextStepToJSON(json: any): WidgetNextStep;
63
+ export declare function WidgetNextStepToJSONTyped(value?: WidgetNextStep | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,75 @@
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.WidgetNextStepKindEnum = void 0;
17
+ exports.instanceOfWidgetNextStep = instanceOfWidgetNextStep;
18
+ exports.WidgetNextStepFromJSON = WidgetNextStepFromJSON;
19
+ exports.WidgetNextStepFromJSONTyped = WidgetNextStepFromJSONTyped;
20
+ exports.WidgetNextStepToJSON = WidgetNextStepToJSON;
21
+ exports.WidgetNextStepToJSONTyped = WidgetNextStepToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.WidgetNextStepKindEnum = {
26
+ Content: 'content',
27
+ Style: 'style',
28
+ Layout: 'layout',
29
+ Behavior: 'behavior',
30
+ Animation: 'animation',
31
+ Data: 'data',
32
+ Other: 'other'
33
+ };
34
+ /**
35
+ * Check if a given object implements the WidgetNextStep interface.
36
+ */
37
+ function instanceOfWidgetNextStep(value) {
38
+ if (!('id' in value) || value['id'] === undefined)
39
+ return false;
40
+ if (!('label' in value) || value['label'] === undefined)
41
+ return false;
42
+ if (!('kind' in value) || value['kind'] === undefined)
43
+ return false;
44
+ if (!('recommended' in value) || value['recommended'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ function WidgetNextStepFromJSON(json) {
49
+ return WidgetNextStepFromJSONTyped(json, false);
50
+ }
51
+ function WidgetNextStepFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ 'id': json['id'],
57
+ 'label': json['label'],
58
+ 'kind': json['kind'],
59
+ 'recommended': json['recommended'],
60
+ };
61
+ }
62
+ function WidgetNextStepToJSON(json) {
63
+ return WidgetNextStepToJSONTyped(json, false);
64
+ }
65
+ function WidgetNextStepToJSONTyped(value, ignoreDiscriminator = false) {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+ 'id': value['id'],
71
+ 'label': value['label'],
72
+ 'kind': value['kind'],
73
+ 'recommended': value['recommended'],
74
+ };
75
+ }
@@ -0,0 +1,58 @@
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 { WidgetPlanDecisions } from './WidgetPlanDecisions';
13
+ import type { WidgetPlanTask } from './WidgetPlanTask';
14
+ /**
15
+ * The plan shown before and during a build, in `metadata.plan` of the generation's operation. It is published when it is made and again each time what a client would draw changes (a handful of updates per build). `metadata.plan` becomes `null` when the build is called off (the request was declined), and a client then hides the plan it showed.
16
+ * @export
17
+ * @interface WidgetPlan
18
+ */
19
+ export interface WidgetPlan {
20
+ /**
21
+ * One line for the whole plan ("Building a countdown with confetti").
22
+ * @type {string}
23
+ * @memberof WidgetPlan
24
+ */
25
+ title: string;
26
+ /**
27
+ *
28
+ * @type {Array<WidgetPlanTask>}
29
+ * @memberof WidgetPlan
30
+ */
31
+ tasks: Array<WidgetPlanTask>;
32
+ /**
33
+ *
34
+ * @type {WidgetPlanDecisions}
35
+ * @memberof WidgetPlan
36
+ */
37
+ decisions: WidgetPlanDecisions;
38
+ /**
39
+ * How many steps are `done`.
40
+ * @type {number}
41
+ * @memberof WidgetPlan
42
+ */
43
+ completed: number;
44
+ /**
45
+ * The index in `tasks` of the step in progress, or null when none is.
46
+ * @type {number}
47
+ * @memberof WidgetPlan
48
+ */
49
+ activeIndex: number | null;
50
+ }
51
+ /**
52
+ * Check if a given object implements the WidgetPlan interface.
53
+ */
54
+ export declare function instanceOfWidgetPlan(value: object): value is WidgetPlan;
55
+ export declare function WidgetPlanFromJSON(json: any): WidgetPlan;
56
+ export declare function WidgetPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetPlan;
57
+ export declare function WidgetPlanToJSON(json: any): WidgetPlan;
58
+ export declare function WidgetPlanToJSONTyped(value?: WidgetPlan | null, ignoreDiscriminator?: boolean): any;