@inploi/plugin-chatbot 11.0.0 → 12.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.
@@ -1,6 +1,7 @@
1
1
  import { FlowNode } from '@inploi/core/flows';
2
- import { GenericSchema, InferOutput } from 'valibot';
3
2
 
3
+ export { FlowByIdPayloadSchema, FlowByJobPayloadSchema, FlowSchema } from '@inploi/flows/endpoints';
4
+ export type { Flow } from '@inploi/flows/endpoints';
4
5
  export type FlowPayload = {
5
6
  flow: {
6
7
  id: string;
@@ -8,723 +9,6 @@ export type FlowPayload = {
8
9
  nodes: FlowNode[];
9
10
  };
10
11
  };
11
- export declare const FlowSchema: import('valibot').ObjectSchema<{
12
- readonly id: import('valibot').SchemaWithPipe<readonly [import('valibot').UnionSchema<[import('valibot').StringSchema<undefined>, import('valibot').NumberSchema<undefined>], undefined>, import('valibot').TransformAction<any, string>]>;
13
- readonly version: import('valibot').NumberSchema<undefined>;
14
- readonly build: import('valibot').NumberSchema<undefined>;
15
- readonly nodes: import('valibot').ArraySchema<GenericSchema<{
16
- type: "text";
17
- id: string;
18
- data: {
19
- text: string;
20
- };
21
- isHead?: boolean | undefined;
22
- nextId?: string | undefined;
23
- } | {
24
- type: "end-flow";
25
- id: string;
26
- data: {
27
- systemMessage: string;
28
- };
29
- isHead?: boolean | undefined;
30
- nextId?: string | undefined;
31
- } | {
32
- type: "integration-application-submit";
33
- id: string;
34
- data: {
35
- integrationId: string;
36
- skipConfirmation: boolean;
37
- submitLabel: string;
38
- submitKeys: "all" | string[];
39
- key?: string | undefined;
40
- };
41
- isHead?: boolean | undefined;
42
- nextId?: string | undefined;
43
- } | {
44
- type: "integration-workflow-get";
45
- id: string;
46
- data: {
47
- integrationId: string;
48
- };
49
- isHead?: boolean | undefined;
50
- nextId?: string | undefined;
51
- } | {
52
- type: "link";
53
- id: string;
54
- data: {
55
- href: string;
56
- cta: string;
57
- };
58
- isHead?: boolean | undefined;
59
- nextId?: string | undefined;
60
- } | {
61
- type: "image";
62
- id: string;
63
- data: {
64
- url: string;
65
- width: number;
66
- height: number;
67
- };
68
- isHead?: boolean | undefined;
69
- nextId?: string | undefined;
70
- } | {
71
- type: "question-boolean";
72
- id: string;
73
- data: {
74
- key: string;
75
- question: string;
76
- trueLabel: string;
77
- falseLabel: string;
78
- optional: boolean;
79
- };
80
- isHead?: boolean | undefined;
81
- nextId?: string | undefined;
82
- } | {
83
- type: "question-text";
84
- id: string;
85
- data: {
86
- key: string;
87
- question: string;
88
- optional: boolean;
89
- format: "date" | "text" | "url" | "email" | "phone";
90
- placeholder?: string | undefined;
91
- maxChars?: number | undefined;
92
- minChars?: number | undefined;
93
- };
94
- isHead?: boolean | undefined;
95
- nextId?: string | undefined;
96
- } | {
97
- type: "question-number";
98
- id: string;
99
- data: {
100
- key: string;
101
- question: string;
102
- optional: boolean;
103
- placeholder?: string | undefined;
104
- decimalCases?: number | undefined;
105
- min?: number | undefined;
106
- max?: number | undefined;
107
- };
108
- isHead?: boolean | undefined;
109
- nextId?: string | undefined;
110
- } | {
111
- type: "question-phone";
112
- id: string;
113
- data: {
114
- key: string;
115
- question: string;
116
- optional: boolean;
117
- placeholder: string;
118
- minChars: number;
119
- defaultCountryCode: string;
120
- };
121
- isHead?: boolean | undefined;
122
- nextId?: string | undefined;
123
- } | {
124
- type: "question-enum";
125
- id: string;
126
- data: {
127
- options: {
128
- value: string;
129
- label: string;
130
- }[];
131
- key: string;
132
- question: string;
133
- maxSelected: number;
134
- minSelected: number;
135
- };
136
- isHead?: boolean | undefined;
137
- nextId?: string | undefined;
138
- } | {
139
- type: "question-file";
140
- id: string;
141
- data: {
142
- key: string;
143
- question: string;
144
- optional: boolean;
145
- extensions: string[];
146
- multiple?: boolean | undefined;
147
- maxSizeKb?: number | undefined;
148
- };
149
- isHead?: boolean | undefined;
150
- nextId?: string | undefined;
151
- } | {
152
- type: "question-address";
153
- id: string;
154
- data: {
155
- keys: {
156
- line1: string | null;
157
- line2: string | null;
158
- line3: string | null;
159
- city: string | null;
160
- state: string | null;
161
- postcode: string | null;
162
- country: string | null;
163
- };
164
- key: string;
165
- question: string;
166
- optional: boolean;
167
- placeholder?: string | undefined;
168
- };
169
- isHead?: boolean | undefined;
170
- nextId?: string | undefined;
171
- } | {
172
- type: "if-block";
173
- id: string;
174
- data: {
175
- compareKey: string;
176
- compareValue: string;
177
- compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
178
- } | {
179
- combinator: "and" | "or";
180
- conditions: {
181
- compareKey: string;
182
- compareValue: string;
183
- compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
184
- }[];
185
- };
186
- isHead?: boolean | undefined;
187
- nextId?: string | undefined;
188
- branchId?: string | undefined;
189
- } | {
190
- type: "jump";
191
- id: string;
192
- data: {
193
- targetId: string;
194
- };
195
- isHead?: boolean | undefined;
196
- nextId?: string | undefined;
197
- } | {
198
- type: "add-submission";
199
- id: string;
200
- data: {
201
- value: string;
202
- key: string;
203
- };
204
- isHead?: boolean | undefined;
205
- nextId?: string | undefined;
206
- } | {
207
- type: "identify";
208
- id: string;
209
- data: {
210
- key: string;
211
- email?: string | undefined;
212
- firstName?: string | undefined;
213
- lastName?: string | undefined;
214
- phoneNumber?: string | undefined;
215
- customTraits?: {
216
- value: string;
217
- key: string;
218
- }[] | undefined;
219
- };
220
- isHead?: boolean | undefined;
221
- nextId?: string | undefined;
222
- } | {
223
- type: "check-duplicate";
224
- id: string;
225
- data: {
226
- key: string;
227
- email: string;
228
- scope: "job" | "company";
229
- };
230
- isHead?: boolean | undefined;
231
- nextId?: string | undefined;
232
- } | {
233
- type: "feedback";
234
- id: string;
235
- data: {};
236
- isHead?: boolean | undefined;
237
- nextId?: string | undefined;
238
- }>, undefined>;
239
- readonly context_schema: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').ObjectSchema<{
240
- readonly required: import('valibot').BooleanSchema<undefined>;
241
- readonly type: import('valibot').UnionSchema<[import('valibot').LiteralSchema<"string", undefined>, import('valibot').LiteralSchema<"number", undefined>], undefined>;
242
- }, undefined>, undefined>, undefined>, undefined>;
243
- }, undefined>;
244
- export type Flow = InferOutput<typeof FlowSchema>;
245
- export declare const FlowByIdPayloadSchema: import('valibot').ObjectSchema<{
246
- readonly flow: import('valibot').ObjectSchema<{
247
- readonly id: import('valibot').SchemaWithPipe<readonly [import('valibot').UnionSchema<[import('valibot').StringSchema<undefined>, import('valibot').NumberSchema<undefined>], undefined>, import('valibot').TransformAction<any, string>]>;
248
- readonly version: import('valibot').NumberSchema<undefined>;
249
- readonly build: import('valibot').NumberSchema<undefined>;
250
- readonly nodes: import('valibot').ArraySchema<GenericSchema<{
251
- type: "text";
252
- id: string;
253
- data: {
254
- text: string;
255
- };
256
- isHead?: boolean | undefined;
257
- nextId?: string | undefined;
258
- } | {
259
- type: "end-flow";
260
- id: string;
261
- data: {
262
- systemMessage: string;
263
- };
264
- isHead?: boolean | undefined;
265
- nextId?: string | undefined;
266
- } | {
267
- type: "integration-application-submit";
268
- id: string;
269
- data: {
270
- integrationId: string;
271
- skipConfirmation: boolean;
272
- submitLabel: string;
273
- submitKeys: "all" | string[];
274
- key?: string | undefined;
275
- };
276
- isHead?: boolean | undefined;
277
- nextId?: string | undefined;
278
- } | {
279
- type: "integration-workflow-get";
280
- id: string;
281
- data: {
282
- integrationId: string;
283
- };
284
- isHead?: boolean | undefined;
285
- nextId?: string | undefined;
286
- } | {
287
- type: "link";
288
- id: string;
289
- data: {
290
- href: string;
291
- cta: string;
292
- };
293
- isHead?: boolean | undefined;
294
- nextId?: string | undefined;
295
- } | {
296
- type: "image";
297
- id: string;
298
- data: {
299
- url: string;
300
- width: number;
301
- height: number;
302
- };
303
- isHead?: boolean | undefined;
304
- nextId?: string | undefined;
305
- } | {
306
- type: "question-boolean";
307
- id: string;
308
- data: {
309
- key: string;
310
- question: string;
311
- trueLabel: string;
312
- falseLabel: string;
313
- optional: boolean;
314
- };
315
- isHead?: boolean | undefined;
316
- nextId?: string | undefined;
317
- } | {
318
- type: "question-text";
319
- id: string;
320
- data: {
321
- key: string;
322
- question: string;
323
- optional: boolean;
324
- format: "date" | "text" | "url" | "email" | "phone";
325
- placeholder?: string | undefined;
326
- maxChars?: number | undefined;
327
- minChars?: number | undefined;
328
- };
329
- isHead?: boolean | undefined;
330
- nextId?: string | undefined;
331
- } | {
332
- type: "question-number";
333
- id: string;
334
- data: {
335
- key: string;
336
- question: string;
337
- optional: boolean;
338
- placeholder?: string | undefined;
339
- decimalCases?: number | undefined;
340
- min?: number | undefined;
341
- max?: number | undefined;
342
- };
343
- isHead?: boolean | undefined;
344
- nextId?: string | undefined;
345
- } | {
346
- type: "question-phone";
347
- id: string;
348
- data: {
349
- key: string;
350
- question: string;
351
- optional: boolean;
352
- placeholder: string;
353
- minChars: number;
354
- defaultCountryCode: string;
355
- };
356
- isHead?: boolean | undefined;
357
- nextId?: string | undefined;
358
- } | {
359
- type: "question-enum";
360
- id: string;
361
- data: {
362
- options: {
363
- value: string;
364
- label: string;
365
- }[];
366
- key: string;
367
- question: string;
368
- maxSelected: number;
369
- minSelected: number;
370
- };
371
- isHead?: boolean | undefined;
372
- nextId?: string | undefined;
373
- } | {
374
- type: "question-file";
375
- id: string;
376
- data: {
377
- key: string;
378
- question: string;
379
- optional: boolean;
380
- extensions: string[];
381
- multiple?: boolean | undefined;
382
- maxSizeKb?: number | undefined;
383
- };
384
- isHead?: boolean | undefined;
385
- nextId?: string | undefined;
386
- } | {
387
- type: "question-address";
388
- id: string;
389
- data: {
390
- keys: {
391
- line1: string | null;
392
- line2: string | null;
393
- line3: string | null;
394
- city: string | null;
395
- state: string | null;
396
- postcode: string | null;
397
- country: string | null;
398
- };
399
- key: string;
400
- question: string;
401
- optional: boolean;
402
- placeholder?: string | undefined;
403
- };
404
- isHead?: boolean | undefined;
405
- nextId?: string | undefined;
406
- } | {
407
- type: "if-block";
408
- id: string;
409
- data: {
410
- compareKey: string;
411
- compareValue: string;
412
- compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
413
- } | {
414
- combinator: "and" | "or";
415
- conditions: {
416
- compareKey: string;
417
- compareValue: string;
418
- compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
419
- }[];
420
- };
421
- isHead?: boolean | undefined;
422
- nextId?: string | undefined;
423
- branchId?: string | undefined;
424
- } | {
425
- type: "jump";
426
- id: string;
427
- data: {
428
- targetId: string;
429
- };
430
- isHead?: boolean | undefined;
431
- nextId?: string | undefined;
432
- } | {
433
- type: "add-submission";
434
- id: string;
435
- data: {
436
- value: string;
437
- key: string;
438
- };
439
- isHead?: boolean | undefined;
440
- nextId?: string | undefined;
441
- } | {
442
- type: "identify";
443
- id: string;
444
- data: {
445
- key: string;
446
- email?: string | undefined;
447
- firstName?: string | undefined;
448
- lastName?: string | undefined;
449
- phoneNumber?: string | undefined;
450
- customTraits?: {
451
- value: string;
452
- key: string;
453
- }[] | undefined;
454
- };
455
- isHead?: boolean | undefined;
456
- nextId?: string | undefined;
457
- } | {
458
- type: "check-duplicate";
459
- id: string;
460
- data: {
461
- key: string;
462
- email: string;
463
- scope: "job" | "company";
464
- };
465
- isHead?: boolean | undefined;
466
- nextId?: string | undefined;
467
- } | {
468
- type: "feedback";
469
- id: string;
470
- data: {};
471
- isHead?: boolean | undefined;
472
- nextId?: string | undefined;
473
- }>, undefined>;
474
- readonly context_schema: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').ObjectSchema<{
475
- readonly required: import('valibot').BooleanSchema<undefined>;
476
- readonly type: import('valibot').UnionSchema<[import('valibot').LiteralSchema<"string", undefined>, import('valibot').LiteralSchema<"number", undefined>], undefined>;
477
- }, undefined>, undefined>, undefined>, undefined>;
478
- }, undefined>;
479
- }, undefined>;
480
- export declare const FlowByJobPayloadSchema: import('valibot').ObjectSchema<{
481
- readonly company: import('valibot').ObjectSchema<{
482
- readonly name: import('valibot').StringSchema<undefined>;
483
- }, undefined>;
484
- readonly flow: import('valibot').ObjectSchema<{
485
- readonly id: import('valibot').SchemaWithPipe<readonly [import('valibot').UnionSchema<[import('valibot').StringSchema<undefined>, import('valibot').NumberSchema<undefined>], undefined>, import('valibot').TransformAction<any, string>]>;
486
- readonly version: import('valibot').NumberSchema<undefined>;
487
- readonly build: import('valibot').NumberSchema<undefined>;
488
- readonly nodes: import('valibot').ArraySchema<GenericSchema<{
489
- type: "text";
490
- id: string;
491
- data: {
492
- text: string;
493
- };
494
- isHead?: boolean | undefined;
495
- nextId?: string | undefined;
496
- } | {
497
- type: "end-flow";
498
- id: string;
499
- data: {
500
- systemMessage: string;
501
- };
502
- isHead?: boolean | undefined;
503
- nextId?: string | undefined;
504
- } | {
505
- type: "integration-application-submit";
506
- id: string;
507
- data: {
508
- integrationId: string;
509
- skipConfirmation: boolean;
510
- submitLabel: string;
511
- submitKeys: "all" | string[];
512
- key?: string | undefined;
513
- };
514
- isHead?: boolean | undefined;
515
- nextId?: string | undefined;
516
- } | {
517
- type: "integration-workflow-get";
518
- id: string;
519
- data: {
520
- integrationId: string;
521
- };
522
- isHead?: boolean | undefined;
523
- nextId?: string | undefined;
524
- } | {
525
- type: "link";
526
- id: string;
527
- data: {
528
- href: string;
529
- cta: string;
530
- };
531
- isHead?: boolean | undefined;
532
- nextId?: string | undefined;
533
- } | {
534
- type: "image";
535
- id: string;
536
- data: {
537
- url: string;
538
- width: number;
539
- height: number;
540
- };
541
- isHead?: boolean | undefined;
542
- nextId?: string | undefined;
543
- } | {
544
- type: "question-boolean";
545
- id: string;
546
- data: {
547
- key: string;
548
- question: string;
549
- trueLabel: string;
550
- falseLabel: string;
551
- optional: boolean;
552
- };
553
- isHead?: boolean | undefined;
554
- nextId?: string | undefined;
555
- } | {
556
- type: "question-text";
557
- id: string;
558
- data: {
559
- key: string;
560
- question: string;
561
- optional: boolean;
562
- format: "date" | "text" | "url" | "email" | "phone";
563
- placeholder?: string | undefined;
564
- maxChars?: number | undefined;
565
- minChars?: number | undefined;
566
- };
567
- isHead?: boolean | undefined;
568
- nextId?: string | undefined;
569
- } | {
570
- type: "question-number";
571
- id: string;
572
- data: {
573
- key: string;
574
- question: string;
575
- optional: boolean;
576
- placeholder?: string | undefined;
577
- decimalCases?: number | undefined;
578
- min?: number | undefined;
579
- max?: number | undefined;
580
- };
581
- isHead?: boolean | undefined;
582
- nextId?: string | undefined;
583
- } | {
584
- type: "question-phone";
585
- id: string;
586
- data: {
587
- key: string;
588
- question: string;
589
- optional: boolean;
590
- placeholder: string;
591
- minChars: number;
592
- defaultCountryCode: string;
593
- };
594
- isHead?: boolean | undefined;
595
- nextId?: string | undefined;
596
- } | {
597
- type: "question-enum";
598
- id: string;
599
- data: {
600
- options: {
601
- value: string;
602
- label: string;
603
- }[];
604
- key: string;
605
- question: string;
606
- maxSelected: number;
607
- minSelected: number;
608
- };
609
- isHead?: boolean | undefined;
610
- nextId?: string | undefined;
611
- } | {
612
- type: "question-file";
613
- id: string;
614
- data: {
615
- key: string;
616
- question: string;
617
- optional: boolean;
618
- extensions: string[];
619
- multiple?: boolean | undefined;
620
- maxSizeKb?: number | undefined;
621
- };
622
- isHead?: boolean | undefined;
623
- nextId?: string | undefined;
624
- } | {
625
- type: "question-address";
626
- id: string;
627
- data: {
628
- keys: {
629
- line1: string | null;
630
- line2: string | null;
631
- line3: string | null;
632
- city: string | null;
633
- state: string | null;
634
- postcode: string | null;
635
- country: string | null;
636
- };
637
- key: string;
638
- question: string;
639
- optional: boolean;
640
- placeholder?: string | undefined;
641
- };
642
- isHead?: boolean | undefined;
643
- nextId?: string | undefined;
644
- } | {
645
- type: "if-block";
646
- id: string;
647
- data: {
648
- compareKey: string;
649
- compareValue: string;
650
- compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
651
- } | {
652
- combinator: "and" | "or";
653
- conditions: {
654
- compareKey: string;
655
- compareValue: string;
656
- compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
657
- }[];
658
- };
659
- isHead?: boolean | undefined;
660
- nextId?: string | undefined;
661
- branchId?: string | undefined;
662
- } | {
663
- type: "jump";
664
- id: string;
665
- data: {
666
- targetId: string;
667
- };
668
- isHead?: boolean | undefined;
669
- nextId?: string | undefined;
670
- } | {
671
- type: "add-submission";
672
- id: string;
673
- data: {
674
- value: string;
675
- key: string;
676
- };
677
- isHead?: boolean | undefined;
678
- nextId?: string | undefined;
679
- } | {
680
- type: "identify";
681
- id: string;
682
- data: {
683
- key: string;
684
- email?: string | undefined;
685
- firstName?: string | undefined;
686
- lastName?: string | undefined;
687
- phoneNumber?: string | undefined;
688
- customTraits?: {
689
- value: string;
690
- key: string;
691
- }[] | undefined;
692
- };
693
- isHead?: boolean | undefined;
694
- nextId?: string | undefined;
695
- } | {
696
- type: "check-duplicate";
697
- id: string;
698
- data: {
699
- key: string;
700
- email: string;
701
- scope: "job" | "company";
702
- };
703
- isHead?: boolean | undefined;
704
- nextId?: string | undefined;
705
- } | {
706
- type: "feedback";
707
- id: string;
708
- data: {};
709
- isHead?: boolean | undefined;
710
- nextId?: string | undefined;
711
- }>, undefined>;
712
- readonly context_schema: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').ObjectSchema<{
713
- readonly required: import('valibot').BooleanSchema<undefined>;
714
- readonly type: import('valibot').UnionSchema<[import('valibot').LiteralSchema<"string", undefined>, import('valibot').LiteralSchema<"number", undefined>], undefined>;
715
- }, undefined>, undefined>, undefined>, undefined>;
716
- }, undefined>;
717
- readonly job: import('valibot').ObjectSchema<{
718
- readonly id: import('valibot').SchemaWithPipe<readonly [import('valibot').UnionSchema<[import('valibot').StringSchema<undefined>, import('valibot').NumberSchema<undefined>], undefined>, import('valibot').TransformAction<any, string>]>;
719
- readonly title: import('valibot').StringSchema<undefined>;
720
- }, undefined>;
721
- readonly user: import('valibot').OptionalSchema<import('valibot').ObjectSchema<{
722
- readonly city: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
723
- readonly country: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
724
- readonly isEU: import('valibot').OptionalSchema<import('valibot').BooleanSchema<undefined>, undefined>;
725
- readonly continent: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
726
- }, undefined>, undefined>;
727
- }, undefined>;
728
12
  export type JobApplication = {
729
13
  job: {
730
14
  id: string;