@voiceflow/base-types 2.36.0 → 2.36.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.
@@ -1,4 +1,4 @@
1
- import { AnyRequestButton } from "../request";
1
+ import { GeneralRequestButton } from "../request";
2
2
  import { SlateTextValue } from "../text";
3
3
  import { Nullable } from '@voiceflow/common';
4
4
  import { NodeType } from './constants';
@@ -11,11 +11,11 @@ export interface CarouselButton extends DataID {
11
11
  name: string;
12
12
  intent?: Nullable<string>;
13
13
  }
14
- export interface CarouselCard extends DataID {
14
+ export interface CarouselCard<B = CarouselButton> extends DataID {
15
15
  imageUrl: string | null;
16
16
  title: string;
17
17
  description: SlateTextValue;
18
- buttons: CarouselButton[];
18
+ buttons: B[];
19
19
  }
20
20
  export interface StepPorts extends NoMatchNoReplyStepPorts {
21
21
  }
@@ -26,19 +26,17 @@ export interface StepData extends BaseNoMatchStepData, BaseNoReplyStepData {
26
26
  export interface Step<Data = StepData> extends BaseStep<Data, StepPorts> {
27
27
  type: NodeType.CAROUSEL;
28
28
  }
29
- export interface NodeCarouseCard {
30
- imageUrl: string | null;
31
- title: string;
32
- description: string;
33
- buttons: AnyRequestButton[];
34
- }
29
+ export declare type NodeCarouselCard = CarouselCard<GeneralRequestButton>;
35
30
  export interface Node extends BaseNode, BaseNoReplyNodeData, BaseNoMatchNodeData {
36
31
  type: NodeType.CAROUSEL;
37
- cards: CarouselCard[];
32
+ cards: NodeCarouselCard[];
38
33
  isBlocking: boolean;
39
34
  }
35
+ export interface TraceCarouselCard extends Omit<NodeCarouselCard, 'description'> {
36
+ description: string;
37
+ }
40
38
  export interface TraceFramePayload {
41
- cards: NodeCarouseCard[];
39
+ cards: TraceCarouselCard[];
42
40
  }
43
41
  export interface TraceFrame extends BaseTraceFrame<TraceFramePayload> {
44
42
  type: TraceType.CAROUSEL;
@@ -1,4 +1,4 @@
1
- import { AnyRequestButton } from "../request";
1
+ import { GeneralRequestButton } from "../request";
2
2
  import { SlateTextValue } from "../text";
3
3
  import { Nullable } from '@voiceflow/common';
4
4
  import { NodeType } from './constants';
@@ -11,11 +11,11 @@ export interface CarouselButton extends DataID {
11
11
  name: string;
12
12
  intent?: Nullable<string>;
13
13
  }
14
- export interface CarouselCard extends DataID {
14
+ export interface CarouselCard<B = CarouselButton> extends DataID {
15
15
  imageUrl: string | null;
16
16
  title: string;
17
17
  description: SlateTextValue;
18
- buttons: CarouselButton[];
18
+ buttons: B[];
19
19
  }
20
20
  export interface StepPorts extends NoMatchNoReplyStepPorts {
21
21
  }
@@ -26,19 +26,17 @@ export interface StepData extends BaseNoMatchStepData, BaseNoReplyStepData {
26
26
  export interface Step<Data = StepData> extends BaseStep<Data, StepPorts> {
27
27
  type: NodeType.CAROUSEL;
28
28
  }
29
- export interface NodeCarouseCard {
30
- imageUrl: string | null;
31
- title: string;
32
- description: string;
33
- buttons: AnyRequestButton[];
34
- }
29
+ export declare type NodeCarouselCard = CarouselCard<GeneralRequestButton>;
35
30
  export interface Node extends BaseNode, BaseNoReplyNodeData, BaseNoMatchNodeData {
36
31
  type: NodeType.CAROUSEL;
37
- cards: CarouselCard[];
32
+ cards: NodeCarouselCard[];
38
33
  isBlocking: boolean;
39
34
  }
35
+ export interface TraceCarouselCard extends Omit<NodeCarouselCard, 'description'> {
36
+ description: string;
37
+ }
40
38
  export interface TraceFramePayload {
41
- cards: NodeCarouseCard[];
39
+ cards: TraceCarouselCard[];
42
40
  }
43
41
  export interface TraceFrame extends BaseTraceFrame<TraceFramePayload> {
44
42
  type: TraceType.CAROUSEL;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@voiceflow/base-types",
3
3
  "description": "Voiceflow base project types",
4
- "version": "2.36.0",
4
+ "version": "2.36.1",
5
5
  "author": "Voiceflow",
6
6
  "bugs": {
7
7
  "url": "https://github.com/voiceflow/libs/issues"
@@ -43,5 +43,5 @@
43
43
  "test:smoke": "exit 0",
44
44
  "test:unit": "exit 0"
45
45
  },
46
- "gitHead": "5022667e5eceb72cfa7483e64ee594b8c5bca54d"
46
+ "gitHead": "4d9e3ca67f050e5a4263f85bac00ddac32e19150"
47
47
  }