@beabee/beabee-common 1.19.13 → 1.19.14

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.
@@ -40,20 +40,28 @@ export interface RadioCalloutComponentSchema extends BaseCalloutComponentSchema
40
40
  }[];
41
41
  }
42
42
  export type CalloutComponentSchema = ContentCalloutComponentSchema | SelectCalloutComponentSchema | RadioCalloutComponentSchema | InputCalloutComponentSchema | NestableCalloutComponentSchema;
43
- export interface CalloutNavigationSchema {
44
- prevText: string;
45
- nextText: string;
43
+ export interface SetCalloutNavigationSchema {
46
44
  nextSlideId: string;
47
- submitText: string;
48
45
  }
49
- export interface CalloutSlideSchema {
46
+ export interface SetCalloutSlideSchema {
50
47
  id: string;
51
48
  title: string;
52
49
  components: CalloutComponentSchema[];
53
- navigation: CalloutNavigationSchema;
50
+ navigation: SetCalloutNavigationSchema;
51
+ }
52
+ export interface SetCalloutFormSchema {
53
+ slides: SetCalloutSlideSchema[];
54
+ }
55
+ export interface GetCalloutNavigationSchema extends SetCalloutNavigationSchema {
56
+ prevText: string;
57
+ nextText: string;
58
+ submitText: string;
59
+ }
60
+ export interface GetCalloutSlideSchema extends SetCalloutSlideSchema {
61
+ navigation: GetCalloutNavigationSchema;
54
62
  }
55
- export interface CalloutFormSchema {
56
- slides: CalloutSlideSchema[];
63
+ export interface GetCalloutFormSchema extends SetCalloutFormSchema {
64
+ slides: GetCalloutSlideSchema[];
57
65
  }
58
66
  export interface CalloutResponseAnswerAddress {
59
67
  formatted_address: string;
@@ -1,22 +1,15 @@
1
- import { CalloutComponentSchema, CalloutResponseAnswer } from "../data/callouts";
1
+ import { CalloutComponentSchema, CalloutResponseAnswer, SetCalloutFormSchema } from "../data/callouts";
2
2
  import { FilterArgs } from "../search";
3
3
  import { CalloutResponseAnswerAddress, CalloutResponseAnswerFileUpload } from "../data/callouts";
4
4
  export declare function flattenComponents(components: CalloutComponentSchema[]): CalloutComponentSchema[];
5
5
  export declare function filterComponents(components: CalloutComponentSchema[], filterFn: (component: CalloutComponentSchema) => boolean): CalloutComponentSchema[];
6
- interface SimpleCalloutFormSchema {
7
- slides: {
8
- id: string;
9
- components: CalloutComponentSchema[];
10
- }[];
11
- }
12
- export declare function getCalloutComponents(formSchema: SimpleCalloutFormSchema): (CalloutComponentSchema & {
6
+ export declare function getCalloutComponents(formSchema: SetCalloutFormSchema): (CalloutComponentSchema & {
13
7
  slideId: string;
14
8
  fullKey: string;
15
9
  })[];
16
- export declare function getCalloutFilters(formSchema: SimpleCalloutFormSchema): Record<string, FilterArgs & {
10
+ export declare function getCalloutFilters(formSchema: SetCalloutFormSchema): Record<string, FilterArgs & {
17
11
  label: string;
18
12
  }>;
19
13
  export declare function isAddressAnswer(answer: CalloutResponseAnswer): answer is CalloutResponseAnswerAddress;
20
14
  export declare function isFileUploadAnswer(answer: CalloutResponseAnswer): answer is CalloutResponseAnswerFileUpload;
21
15
  export declare function stringifyAnswer(component: CalloutComponentSchema, answer: CalloutResponseAnswer | CalloutResponseAnswer[]): string;
22
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beabee/beabee-common",
3
- "version": "1.19.13",
3
+ "version": "1.19.14",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",