@epilot/entity-client 3.0.8 → 3.0.11

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.
@@ -0,0 +1,3944 @@
1
+ /* eslint-disable */
2
+ import type {
3
+ OpenAPIClient,
4
+ Parameters,
5
+ UnknownParamsObject,
6
+ OperationResponse,
7
+ AxiosRequestConfig,
8
+ } from 'openapi-client-axios';
9
+
10
+ declare namespace Components {
11
+ namespace Schemas {
12
+ export interface Activity {
13
+ /**
14
+ * example:
15
+ * MyCustomActivity
16
+ */
17
+ type: string;
18
+ /**
19
+ * Title for activity. Supports handlebars syntax.
20
+ * example:
21
+ * My custom activity
22
+ */
23
+ title: string;
24
+ /**
25
+ * Message for activity. Supports handlebars syntax.
26
+ * example:
27
+ * {{caller}} did something with {{entity payload.entity.id}}.
28
+ */
29
+ message: string;
30
+ /**
31
+ * example:
32
+ * {
33
+ * "entity": {
34
+ * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
35
+ * "schema": "contact"
36
+ * }
37
+ * }
38
+ */
39
+ payload?: {
40
+ [name: string]: any;
41
+ };
42
+ }
43
+ export interface ActivityCallerContext {
44
+ [name: string]: any;
45
+ EpilotAuth?: {
46
+ /**
47
+ * example:
48
+ * {
49
+ * "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
50
+ * "cognito:groups": [
51
+ * "Administrator"
52
+ * ],
53
+ * "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
54
+ * "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
55
+ * "custom:ivy_org_id": "739224",
56
+ * "cognito:username": "n.ahmad@epilot.cloud",
57
+ * "custom:ivy_user_id": "10006129",
58
+ * "cognito:roles": [
59
+ * "arn:aws:iam::912468240823:role/base-administrator-role"
60
+ * ],
61
+ * "aud": "6e0jbdnger7nmoktaaflarue1l",
62
+ * "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
63
+ * "token_use": "id",
64
+ * "auth_time": 1614333023,
65
+ * "exp": 1614336623,
66
+ * "iat": 1614333023,
67
+ * "email": "n.ahmad@epilot.cloud"
68
+ * }
69
+ */
70
+ token?: {
71
+ /**
72
+ * example:
73
+ * 476e9b48-42f4-4234-a2b0-4668b34626ce
74
+ */
75
+ sub?: string;
76
+ /**
77
+ * example:
78
+ * example@epilot.cloud
79
+ */
80
+ email?: string;
81
+ /**
82
+ * example:
83
+ * example@epilot.cloud
84
+ */
85
+ "cognito:username"?: string;
86
+ /**
87
+ * example:
88
+ * 10006129
89
+ */
90
+ "custom:ivy_user_id"?: string;
91
+ };
92
+ };
93
+ }
94
+ /**
95
+ * See https://github.com/ulid/spec
96
+ * example:
97
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
98
+ */
99
+ export type ActivityId = string; // ulid
100
+ export interface ActivityItem {
101
+ _id?: /**
102
+ * See https://github.com/ulid/spec
103
+ * example:
104
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
105
+ */
106
+ ActivityId /* ulid */;
107
+ timestamp?: string; // date-time
108
+ /**
109
+ * example:
110
+ * MyCustomActivity
111
+ */
112
+ type: string;
113
+ /**
114
+ * Title for activity. Supports handlebars syntax.
115
+ * example:
116
+ * My custom activity
117
+ */
118
+ title: string;
119
+ /**
120
+ * Message for activity. Supports handlebars syntax.
121
+ * example:
122
+ * {{caller}} did something with {{entity payload.entity.id}}.
123
+ */
124
+ message: string;
125
+ /**
126
+ * example:
127
+ * {
128
+ * "entity": {
129
+ * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
130
+ * "schema": "contact"
131
+ * }
132
+ * }
133
+ */
134
+ payload?: {
135
+ [name: string]: any;
136
+ };
137
+ caller?: ActivityCallerContext;
138
+ operations?: EntityOperation[];
139
+ }
140
+ /**
141
+ * Reference to an address attribute of another entity
142
+ */
143
+ export interface AddressRelationAttribute {
144
+ name: string;
145
+ label: string;
146
+ placeholder?: string;
147
+ /**
148
+ * Do not render attribute in entity views
149
+ */
150
+ hidden?: boolean;
151
+ /**
152
+ * Render as a column in table views. When defined, overrides `hidden`
153
+ */
154
+ show_in_table?: boolean;
155
+ required?: boolean;
156
+ readonly?: boolean;
157
+ deprecated?: boolean;
158
+ default_value?: string | {
159
+ [name: string]: any;
160
+ } | number | number | boolean | any[];
161
+ group?: string;
162
+ layout?: string;
163
+ /**
164
+ * When set to true, will hide the label of the field.
165
+ */
166
+ hide_label?: boolean;
167
+ /**
168
+ * Code name of the icon to used to represent this attribute.
169
+ * The value must be a valid @epilot/base-elements Icon name
170
+ *
171
+ */
172
+ icon?: string;
173
+ /**
174
+ * Defines the conditional rendering expression for showing this field.
175
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
176
+ * Note: Empty or invalid expression have no effect on the field visibility.
177
+ *
178
+ */
179
+ render_condition?: string;
180
+ /**
181
+ * A set of constraints applicable to the attribute.
182
+ * These constraints should and will be enforced by the attribute renderer.
183
+ *
184
+ * example:
185
+ * {
186
+ * "disablePast": true
187
+ * }
188
+ */
189
+ constraints?: {
190
+ [key: string]: any;
191
+ };
192
+ /**
193
+ * This attribute should only be active when the feature flag is enabled
194
+ * example:
195
+ * FF_MY_FEATURE_FLAG
196
+ */
197
+ feature_flag?: string;
198
+ value_formatter?: string;
199
+ preview_value_formatter?: string;
200
+ /**
201
+ * Setting to `true` disables editing the attribute on the entity builder UI
202
+ */
203
+ entity_builder_disable_edit?: boolean;
204
+ /**
205
+ * Setting to `true` prevents the attribute from being modified / deleted
206
+ */
207
+ protected?: boolean;
208
+ type?: "relation_address";
209
+ has_primary?: boolean;
210
+ }
211
+ export interface Attachment {
212
+ key: string;
213
+ mime: string;
214
+ name: string;
215
+ size: number;
216
+ image_url: string;
217
+ download_url: string;
218
+ alt_text?: string;
219
+ }
220
+ export type Attribute = /* Textarea or text input */ TextAttribute | /* Link with title and href */ LinkAttribute | /* Date or Datetime picker */ DateAttribute | /* Country picker */ CountryAttribute | /* Yes / No Toggle */ BooleanAttribute | /* Dropdown select */ SelectAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Currency input */ CurrencyAttribute | /* Repeatable (add N number of fields) */ RepeatableAttribute | /* Tags */ TagsAttribute | /* Numeric input */ NumberAttribute | /* Consent Management */ ConsentAttribute | /* No UI representation */ InternalAttribute | /* Type of attribute to render N number of ordered fields */ OrderedListAttribute | /* File or Image Attachment */ FileAttribute | /* An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes) */ ComputedAttribute | /* Partner Status */ PartnerStatusAttribute;
221
+ export interface BaseAttribute {
222
+ name: string;
223
+ label: string;
224
+ placeholder?: string;
225
+ /**
226
+ * Do not render attribute in entity views
227
+ */
228
+ hidden?: boolean;
229
+ /**
230
+ * Render as a column in table views. When defined, overrides `hidden`
231
+ */
232
+ show_in_table?: boolean;
233
+ required?: boolean;
234
+ readonly?: boolean;
235
+ deprecated?: boolean;
236
+ default_value?: string | {
237
+ [name: string]: any;
238
+ } | number | number | boolean | any[];
239
+ group?: string;
240
+ layout?: string;
241
+ /**
242
+ * When set to true, will hide the label of the field.
243
+ */
244
+ hide_label?: boolean;
245
+ /**
246
+ * Code name of the icon to used to represent this attribute.
247
+ * The value must be a valid @epilot/base-elements Icon name
248
+ *
249
+ */
250
+ icon?: string;
251
+ /**
252
+ * Defines the conditional rendering expression for showing this field.
253
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
254
+ * Note: Empty or invalid expression have no effect on the field visibility.
255
+ *
256
+ */
257
+ render_condition?: string;
258
+ /**
259
+ * A set of constraints applicable to the attribute.
260
+ * These constraints should and will be enforced by the attribute renderer.
261
+ *
262
+ * example:
263
+ * {
264
+ * "disablePast": true
265
+ * }
266
+ */
267
+ constraints?: {
268
+ [key: string]: any;
269
+ };
270
+ /**
271
+ * This attribute should only be active when the feature flag is enabled
272
+ * example:
273
+ * FF_MY_FEATURE_FLAG
274
+ */
275
+ feature_flag?: string;
276
+ value_formatter?: string;
277
+ preview_value_formatter?: string;
278
+ /**
279
+ * Setting to `true` disables editing the attribute on the entity builder UI
280
+ */
281
+ entity_builder_disable_edit?: boolean;
282
+ /**
283
+ * Setting to `true` prevents the attribute from being modified / deleted
284
+ */
285
+ protected?: boolean;
286
+ }
287
+ /**
288
+ * example:
289
+ * {
290
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
291
+ * "_org": "123",
292
+ * "_schema": "contact",
293
+ * "_tags": [
294
+ * "example",
295
+ * "mock"
296
+ * ],
297
+ * "_created_at": "2021-02-09T12:41:43.662Z",
298
+ * "_updated_at": "2021-02-09T12:41:43.662Z"
299
+ * }
300
+ */
301
+ export interface BaseEntity {
302
+ _id: EntityId /* uuid */;
303
+ /**
304
+ * Title of entity
305
+ */
306
+ _title: string;
307
+ /**
308
+ * Organization Id the entity belongs to
309
+ */
310
+ _org: string;
311
+ _schema: /**
312
+ * URL-friendly identifier for the entity schema
313
+ * example:
314
+ * contact
315
+ */
316
+ EntitySlug;
317
+ _tags?: string[];
318
+ _created_at: string; // date-time
319
+ _updated_at: string; // date-time
320
+ }
321
+ /**
322
+ * Reference to blueprint
323
+ */
324
+ export type BlueprintEntityId = string; // uuid
325
+ /**
326
+ * Yes / No Toggle
327
+ */
328
+ export interface BooleanAttribute {
329
+ name: string;
330
+ label: string;
331
+ placeholder?: string;
332
+ /**
333
+ * Do not render attribute in entity views
334
+ */
335
+ hidden?: boolean;
336
+ /**
337
+ * Render as a column in table views. When defined, overrides `hidden`
338
+ */
339
+ show_in_table?: boolean;
340
+ required?: boolean;
341
+ readonly?: boolean;
342
+ deprecated?: boolean;
343
+ default_value?: string | {
344
+ [name: string]: any;
345
+ } | number | number | boolean | any[];
346
+ group?: string;
347
+ layout?: string;
348
+ /**
349
+ * When set to true, will hide the label of the field.
350
+ */
351
+ hide_label?: boolean;
352
+ /**
353
+ * Code name of the icon to used to represent this attribute.
354
+ * The value must be a valid @epilot/base-elements Icon name
355
+ *
356
+ */
357
+ icon?: string;
358
+ /**
359
+ * Defines the conditional rendering expression for showing this field.
360
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
361
+ * Note: Empty or invalid expression have no effect on the field visibility.
362
+ *
363
+ */
364
+ render_condition?: string;
365
+ /**
366
+ * A set of constraints applicable to the attribute.
367
+ * These constraints should and will be enforced by the attribute renderer.
368
+ *
369
+ * example:
370
+ * {
371
+ * "disablePast": true
372
+ * }
373
+ */
374
+ constraints?: {
375
+ [key: string]: any;
376
+ };
377
+ /**
378
+ * This attribute should only be active when the feature flag is enabled
379
+ * example:
380
+ * FF_MY_FEATURE_FLAG
381
+ */
382
+ feature_flag?: string;
383
+ value_formatter?: string;
384
+ preview_value_formatter?: string;
385
+ /**
386
+ * Setting to `true` disables editing the attribute on the entity builder UI
387
+ */
388
+ entity_builder_disable_edit?: boolean;
389
+ /**
390
+ * Setting to `true` prevents the attribute from being modified / deleted
391
+ */
392
+ protected?: boolean;
393
+ type?: "boolean";
394
+ }
395
+ /**
396
+ * An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes)
397
+ */
398
+ export interface ComputedAttribute {
399
+ name: string;
400
+ label: string;
401
+ placeholder?: string;
402
+ /**
403
+ * Do not render attribute in entity views
404
+ */
405
+ hidden?: boolean;
406
+ /**
407
+ * Render as a column in table views. When defined, overrides `hidden`
408
+ */
409
+ show_in_table?: boolean;
410
+ required?: boolean;
411
+ readonly?: boolean;
412
+ deprecated?: boolean;
413
+ default_value?: string | {
414
+ [name: string]: any;
415
+ } | number | number | boolean | any[];
416
+ group?: string;
417
+ layout?: string;
418
+ /**
419
+ * When set to true, will hide the label of the field.
420
+ */
421
+ hide_label?: boolean;
422
+ /**
423
+ * Code name of the icon to used to represent this attribute.
424
+ * The value must be a valid @epilot/base-elements Icon name
425
+ *
426
+ */
427
+ icon?: string;
428
+ /**
429
+ * Defines the conditional rendering expression for showing this field.
430
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
431
+ * Note: Empty or invalid expression have no effect on the field visibility.
432
+ *
433
+ */
434
+ render_condition?: string;
435
+ /**
436
+ * A set of constraints applicable to the attribute.
437
+ * These constraints should and will be enforced by the attribute renderer.
438
+ *
439
+ * example:
440
+ * {
441
+ * "disablePast": true
442
+ * }
443
+ */
444
+ constraints?: {
445
+ [key: string]: any;
446
+ };
447
+ /**
448
+ * This attribute should only be active when the feature flag is enabled
449
+ * example:
450
+ * FF_MY_FEATURE_FLAG
451
+ */
452
+ feature_flag?: string;
453
+ value_formatter?: string;
454
+ preview_value_formatter?: string;
455
+ /**
456
+ * Setting to `true` disables editing the attribute on the entity builder UI
457
+ */
458
+ entity_builder_disable_edit?: boolean;
459
+ /**
460
+ * Setting to `true` prevents the attribute from being modified / deleted
461
+ */
462
+ protected?: boolean;
463
+ type?: "computed";
464
+ }
465
+ /**
466
+ * Consent Management
467
+ */
468
+ export interface ConsentAttribute {
469
+ name: string;
470
+ label: string;
471
+ placeholder?: string;
472
+ /**
473
+ * Do not render attribute in entity views
474
+ */
475
+ hidden?: boolean;
476
+ /**
477
+ * Render as a column in table views. When defined, overrides `hidden`
478
+ */
479
+ show_in_table?: boolean;
480
+ required?: boolean;
481
+ readonly?: boolean;
482
+ deprecated?: boolean;
483
+ default_value?: string | {
484
+ [name: string]: any;
485
+ } | number | number | boolean | any[];
486
+ group?: string;
487
+ layout?: string;
488
+ /**
489
+ * When set to true, will hide the label of the field.
490
+ */
491
+ hide_label?: boolean;
492
+ /**
493
+ * Code name of the icon to used to represent this attribute.
494
+ * The value must be a valid @epilot/base-elements Icon name
495
+ *
496
+ */
497
+ icon?: string;
498
+ /**
499
+ * Defines the conditional rendering expression for showing this field.
500
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
501
+ * Note: Empty or invalid expression have no effect on the field visibility.
502
+ *
503
+ */
504
+ render_condition?: string;
505
+ /**
506
+ * A set of constraints applicable to the attribute.
507
+ * These constraints should and will be enforced by the attribute renderer.
508
+ *
509
+ * example:
510
+ * {
511
+ * "disablePast": true
512
+ * }
513
+ */
514
+ constraints?: {
515
+ [key: string]: any;
516
+ };
517
+ /**
518
+ * This attribute should only be active when the feature flag is enabled
519
+ * example:
520
+ * FF_MY_FEATURE_FLAG
521
+ */
522
+ feature_flag?: string;
523
+ value_formatter?: string;
524
+ preview_value_formatter?: string;
525
+ /**
526
+ * Setting to `true` disables editing the attribute on the entity builder UI
527
+ */
528
+ entity_builder_disable_edit?: boolean;
529
+ /**
530
+ * Setting to `true` prevents the attribute from being modified / deleted
531
+ */
532
+ protected?: boolean;
533
+ type: "consent";
534
+ topic: string;
535
+ identifiers?: string[];
536
+ }
537
+ /**
538
+ * Country picker
539
+ */
540
+ export interface CountryAttribute {
541
+ name: string;
542
+ label: string;
543
+ placeholder?: string;
544
+ /**
545
+ * Do not render attribute in entity views
546
+ */
547
+ hidden?: boolean;
548
+ /**
549
+ * Render as a column in table views. When defined, overrides `hidden`
550
+ */
551
+ show_in_table?: boolean;
552
+ required?: boolean;
553
+ readonly?: boolean;
554
+ deprecated?: boolean;
555
+ default_value?: string | {
556
+ [name: string]: any;
557
+ } | number | number | boolean | any[];
558
+ group?: string;
559
+ layout?: string;
560
+ /**
561
+ * When set to true, will hide the label of the field.
562
+ */
563
+ hide_label?: boolean;
564
+ /**
565
+ * Code name of the icon to used to represent this attribute.
566
+ * The value must be a valid @epilot/base-elements Icon name
567
+ *
568
+ */
569
+ icon?: string;
570
+ /**
571
+ * Defines the conditional rendering expression for showing this field.
572
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
573
+ * Note: Empty or invalid expression have no effect on the field visibility.
574
+ *
575
+ */
576
+ render_condition?: string;
577
+ /**
578
+ * A set of constraints applicable to the attribute.
579
+ * These constraints should and will be enforced by the attribute renderer.
580
+ *
581
+ * example:
582
+ * {
583
+ * "disablePast": true
584
+ * }
585
+ */
586
+ constraints?: {
587
+ [key: string]: any;
588
+ };
589
+ /**
590
+ * This attribute should only be active when the feature flag is enabled
591
+ * example:
592
+ * FF_MY_FEATURE_FLAG
593
+ */
594
+ feature_flag?: string;
595
+ value_formatter?: string;
596
+ preview_value_formatter?: string;
597
+ /**
598
+ * Setting to `true` disables editing the attribute on the entity builder UI
599
+ */
600
+ entity_builder_disable_edit?: boolean;
601
+ /**
602
+ * Setting to `true` prevents the attribute from being modified / deleted
603
+ */
604
+ protected?: boolean;
605
+ type?: "country";
606
+ }
607
+ /**
608
+ * Currency input
609
+ */
610
+ export interface CurrencyAttribute {
611
+ name: string;
612
+ label: string;
613
+ placeholder?: string;
614
+ /**
615
+ * Do not render attribute in entity views
616
+ */
617
+ hidden?: boolean;
618
+ /**
619
+ * Render as a column in table views. When defined, overrides `hidden`
620
+ */
621
+ show_in_table?: boolean;
622
+ required?: boolean;
623
+ readonly?: boolean;
624
+ deprecated?: boolean;
625
+ default_value?: string | {
626
+ [name: string]: any;
627
+ } | number | number | boolean | any[];
628
+ group?: string;
629
+ layout?: string;
630
+ /**
631
+ * When set to true, will hide the label of the field.
632
+ */
633
+ hide_label?: boolean;
634
+ /**
635
+ * Code name of the icon to used to represent this attribute.
636
+ * The value must be a valid @epilot/base-elements Icon name
637
+ *
638
+ */
639
+ icon?: string;
640
+ /**
641
+ * Defines the conditional rendering expression for showing this field.
642
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
643
+ * Note: Empty or invalid expression have no effect on the field visibility.
644
+ *
645
+ */
646
+ render_condition?: string;
647
+ /**
648
+ * A set of constraints applicable to the attribute.
649
+ * These constraints should and will be enforced by the attribute renderer.
650
+ *
651
+ * example:
652
+ * {
653
+ * "disablePast": true
654
+ * }
655
+ */
656
+ constraints?: {
657
+ [key: string]: any;
658
+ };
659
+ /**
660
+ * This attribute should only be active when the feature flag is enabled
661
+ * example:
662
+ * FF_MY_FEATURE_FLAG
663
+ */
664
+ feature_flag?: string;
665
+ value_formatter?: string;
666
+ preview_value_formatter?: string;
667
+ /**
668
+ * Setting to `true` disables editing the attribute on the entity builder UI
669
+ */
670
+ entity_builder_disable_edit?: boolean;
671
+ /**
672
+ * Setting to `true` prevents the attribute from being modified / deleted
673
+ */
674
+ protected?: boolean;
675
+ type: "currency";
676
+ currency_selector_only?: boolean;
677
+ /**
678
+ * An array of currency configurations with a country code (ISO-4217)
679
+ */
680
+ currency: ({
681
+ code: string;
682
+ description: string;
683
+ symbol: string;
684
+ flag?: string;
685
+ })[];
686
+ }
687
+ /**
688
+ * Date or Datetime picker
689
+ */
690
+ export interface DateAttribute {
691
+ name: string;
692
+ label: string;
693
+ placeholder?: string;
694
+ /**
695
+ * Do not render attribute in entity views
696
+ */
697
+ hidden?: boolean;
698
+ /**
699
+ * Render as a column in table views. When defined, overrides `hidden`
700
+ */
701
+ show_in_table?: boolean;
702
+ required?: boolean;
703
+ readonly?: boolean;
704
+ deprecated?: boolean;
705
+ default_value?: string | {
706
+ [name: string]: any;
707
+ } | number | number | boolean | any[];
708
+ group?: string;
709
+ layout?: string;
710
+ /**
711
+ * When set to true, will hide the label of the field.
712
+ */
713
+ hide_label?: boolean;
714
+ /**
715
+ * Code name of the icon to used to represent this attribute.
716
+ * The value must be a valid @epilot/base-elements Icon name
717
+ *
718
+ */
719
+ icon?: string;
720
+ /**
721
+ * Defines the conditional rendering expression for showing this field.
722
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
723
+ * Note: Empty or invalid expression have no effect on the field visibility.
724
+ *
725
+ */
726
+ render_condition?: string;
727
+ /**
728
+ * A set of constraints applicable to the attribute.
729
+ * These constraints should and will be enforced by the attribute renderer.
730
+ *
731
+ * example:
732
+ * {
733
+ * "disablePast": true
734
+ * }
735
+ */
736
+ constraints?: {
737
+ [key: string]: any;
738
+ };
739
+ /**
740
+ * This attribute should only be active when the feature flag is enabled
741
+ * example:
742
+ * FF_MY_FEATURE_FLAG
743
+ */
744
+ feature_flag?: string;
745
+ value_formatter?: string;
746
+ preview_value_formatter?: string;
747
+ /**
748
+ * Setting to `true` disables editing the attribute on the entity builder UI
749
+ */
750
+ entity_builder_disable_edit?: boolean;
751
+ /**
752
+ * Setting to `true` prevents the attribute from being modified / deleted
753
+ */
754
+ protected?: boolean;
755
+ type?: "date" | "datetime";
756
+ }
757
+ export interface Entity {
758
+ [name: string]: any;
759
+ }
760
+ /**
761
+ * Capabilities the Entity has. Turn features on/off for entities.
762
+ */
763
+ export interface EntityCapability {
764
+ /**
765
+ * Unique name for the capability
766
+ * example:
767
+ * customer_messaging
768
+ */
769
+ name: string;
770
+ /**
771
+ * Human readable title of the capability
772
+ * example:
773
+ * Messaging
774
+ */
775
+ title?: string;
776
+ attributes?: Attribute[];
777
+ ui_hooks?: {
778
+ [name: string]: any;
779
+ /**
780
+ * name of the hook to use
781
+ * example:
782
+ * EntityDetailsV2:Tab
783
+ */
784
+ hook: string;
785
+ /**
786
+ * example:
787
+ * composite_price = "false"
788
+ */
789
+ render_condition?: string;
790
+ /**
791
+ * render order (ascending)
792
+ * example:
793
+ * 10
794
+ */
795
+ order?: number;
796
+ /**
797
+ * example:
798
+ * Notes
799
+ */
800
+ title?: string;
801
+ /**
802
+ * Sets the group expand/collapse default state
803
+ */
804
+ group_expanded?: boolean;
805
+ /**
806
+ * package to be imported
807
+ * example:
808
+ * @epilot360/notes
809
+ */
810
+ import?: string;
811
+ /**
812
+ * the component to be dynamically loaded
813
+ * example:
814
+ * PricingItems
815
+ */
816
+ component?: string;
817
+ /**
818
+ * route for specified capability
819
+ * example:
820
+ * notes
821
+ */
822
+ route?: string;
823
+ /**
824
+ * Preview icon name(As in Base elements) for the capability
825
+ * example:
826
+ * email
827
+ */
828
+ icon?: string;
829
+ /**
830
+ * Whether capability should be disabled
831
+ */
832
+ disabled?: boolean;
833
+ /**
834
+ * Specific to Activity pilot
835
+ */
836
+ header?: boolean;
837
+ /**
838
+ * Require a permission to display UI hook
839
+ */
840
+ requiredPermission?: {
841
+ /**
842
+ * example:
843
+ * note:view
844
+ */
845
+ action: string;
846
+ /**
847
+ * example:
848
+ * 123
849
+ */
850
+ resource?: string;
851
+ };
852
+ }[];
853
+ /**
854
+ * This capability should only be active when the feature flag is enabled
855
+ * example:
856
+ * FF_MY_FEATURE_FLAG
857
+ */
858
+ feature_flag?: string;
859
+ /**
860
+ * Only show capability for legacy tenants (ivy)
861
+ */
862
+ legacy?: boolean;
863
+ }
864
+ export interface EntityDefaultCreate {
865
+ view_type?: "default";
866
+ }
867
+ export interface EntityDefaultEdit {
868
+ view_type?: "default";
869
+ }
870
+ export interface EntityDefaultOverview {
871
+ view_type?: "default";
872
+ dropdown_items?: ({
873
+ type?: "entity";
874
+ entity?: /**
875
+ * URL-friendly identifier for the entity schema
876
+ * example:
877
+ * contact
878
+ */
879
+ EntitySlug;
880
+ /**
881
+ * This dropdown item should only be active when the feature flag is enabled
882
+ * example:
883
+ * FF_MY_FEATURE_FLAG
884
+ */
885
+ feature_flag?: string;
886
+ /**
887
+ * Only show item for legacy tenants (ivy)
888
+ */
889
+ legacy?: boolean;
890
+ } | {
891
+ type?: "link";
892
+ /**
893
+ * example:
894
+ * Opportunities
895
+ */
896
+ title?: string;
897
+ uri?: string; // uri
898
+ /**
899
+ * This dropdown item should only be active when the feature flag is enabled
900
+ * example:
901
+ * FF_MY_FEATURE_FLAG
902
+ */
903
+ feature_flag?: string;
904
+ /**
905
+ * Only show item for legacy tenants (ivy)
906
+ */
907
+ legacy?: boolean;
908
+ })[];
909
+ row_actions?: string[];
910
+ classic_view?: string; // uri
911
+ }
912
+ export type EntityId = string; // uuid
913
+ /**
914
+ * example:
915
+ * {
916
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
917
+ * "_org": "123",
918
+ * "_schema": "contact",
919
+ * "_tags": [
920
+ * "example",
921
+ * "mock"
922
+ * ],
923
+ * "_created_at": {},
924
+ * "_updated_at": {}
925
+ * }
926
+ */
927
+ export interface EntityItem {
928
+ [name: string]: any;
929
+ _id: EntityId /* uuid */;
930
+ /**
931
+ * Title of entity
932
+ */
933
+ _title: string;
934
+ /**
935
+ * Organization Id the entity belongs to
936
+ */
937
+ _org: string;
938
+ _schema: /**
939
+ * URL-friendly identifier for the entity schema
940
+ * example:
941
+ * contact
942
+ */
943
+ EntitySlug;
944
+ _tags?: string[];
945
+ _created_at: string; // date-time
946
+ _updated_at: string; // date-time
947
+ }
948
+ export interface EntityOperation {
949
+ entity: EntityId /* uuid */;
950
+ /**
951
+ * example:
952
+ * 123
953
+ */
954
+ org: string;
955
+ operation: "createEntity" | "updateEntity" | "deleteEntity";
956
+ /**
957
+ * example:
958
+ * {
959
+ * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
960
+ * "slug": "contact"
961
+ * }
962
+ */
963
+ params?: {
964
+ id?: EntityId /* uuid */;
965
+ slug?: /**
966
+ * URL-friendly identifier for the entity schema
967
+ * example:
968
+ * contact
969
+ */
970
+ EntitySlug;
971
+ };
972
+ /**
973
+ * example:
974
+ * {
975
+ * "_schema": "contact",
976
+ * "_org": "123",
977
+ * "status": "Inactive"
978
+ * }
979
+ */
980
+ payload?: {
981
+ [name: string]: any;
982
+ };
983
+ diff?: {
984
+ added?: Entity;
985
+ updated?: Entity;
986
+ deleted?: Entity;
987
+ };
988
+ }
989
+ /**
990
+ * example:
991
+ * {
992
+ * "type": "redirect",
993
+ * "route": "/app/pricing-hub/product/:entityId"
994
+ * }
995
+ */
996
+ export interface EntityParcelView {
997
+ view_type?: "parcel";
998
+ /**
999
+ * example:
1000
+ * @epilot360/pricing-hub-app
1001
+ */
1002
+ import?: string;
1003
+ }
1004
+ /**
1005
+ * The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.
1006
+ */
1007
+ export interface EntitySchema {
1008
+ slug: /**
1009
+ * URL-friendly identifier for the entity schema
1010
+ * example:
1011
+ * contact
1012
+ */
1013
+ EntitySlug;
1014
+ version?: number;
1015
+ blueprint?: /* Reference to blueprint */ BlueprintEntityId /* uuid */;
1016
+ /**
1017
+ * This schema should only be active when the feature flag is enabled
1018
+ * example:
1019
+ * FF_MY_FEATURE_FLAG
1020
+ */
1021
+ feature_flag?: string;
1022
+ /**
1023
+ * This schema should only be active when one of the organization settings is enabled
1024
+ */
1025
+ enable_setting?: string[];
1026
+ /**
1027
+ * User-friendly identifier for the entity schema
1028
+ * example:
1029
+ * Contact
1030
+ */
1031
+ name: string;
1032
+ /**
1033
+ * example:
1034
+ * Contacts
1035
+ */
1036
+ plural: string;
1037
+ /**
1038
+ * example:
1039
+ * false
1040
+ */
1041
+ published?: boolean;
1042
+ /**
1043
+ * example:
1044
+ * false
1045
+ */
1046
+ draft?: boolean;
1047
+ /**
1048
+ * example:
1049
+ * person
1050
+ */
1051
+ icon?: string;
1052
+ /**
1053
+ * Template for rendering the title field. Uses handlebars
1054
+ * example:
1055
+ * {{first_name}} {{last_name}}
1056
+ */
1057
+ title_template?: string;
1058
+ ui_config?: {
1059
+ table_view?: EntityViewConfig;
1060
+ create_view?: EntityViewConfig;
1061
+ edit_view?: EntityViewConfig;
1062
+ list_item?: {
1063
+ summary_attributes?: string[];
1064
+ };
1065
+ sharing?: {
1066
+ /**
1067
+ * Show the sharing button in entity detail view
1068
+ * example:
1069
+ * true
1070
+ */
1071
+ show_sharing_button?: boolean;
1072
+ };
1073
+ };
1074
+ capabilities?: /* Capabilities the Entity has. Turn features on/off for entities. */ EntityCapability[];
1075
+ /**
1076
+ * A dictionary of Group Titles and associated settings if present.
1077
+ * example:
1078
+ * {
1079
+ * "Order Info": {
1080
+ * "expanded": true
1081
+ * },
1082
+ * "Contact Details": {
1083
+ * "expanded": false,
1084
+ * "info_tooltip_title": {
1085
+ * "key": "partner.partner_information_group_tooltip",
1086
+ * "default": "These informations are provided by the partner company and cannot be edited."
1087
+ * }
1088
+ * }
1089
+ * }
1090
+ */
1091
+ group_settings?: {
1092
+ label: string;
1093
+ id: string;
1094
+ expanded?: boolean;
1095
+ /**
1096
+ * example:
1097
+ * composite_price = "false"
1098
+ */
1099
+ render_condition?: string;
1100
+ /**
1101
+ * Render order of the group
1102
+ */
1103
+ order?: number;
1104
+ /**
1105
+ * This schema should only be active when the feature flag is enabled
1106
+ * example:
1107
+ * FF_MY_FEATURE_FLAG
1108
+ */
1109
+ feature_flag?: string;
1110
+ info_tooltip_title?: {
1111
+ key?: string;
1112
+ default?: string;
1113
+ };
1114
+ }[];
1115
+ /**
1116
+ * Custom grid definitions for the layout
1117
+ */
1118
+ layout_settings?: {
1119
+ [name: string]: {
1120
+ grid_gap?: string;
1121
+ grid_template_columns?: string;
1122
+ };
1123
+ };
1124
+ dialog_config?: {
1125
+ [name: string]: any;
1126
+ };
1127
+ /**
1128
+ * An ordered list of attributes the entity contains
1129
+ * example:
1130
+ * [
1131
+ * {
1132
+ * "name": "email",
1133
+ * "type": "email",
1134
+ * "label": "Email",
1135
+ * "required": true
1136
+ * },
1137
+ * {
1138
+ * "name": "first_name",
1139
+ * "type": "string",
1140
+ * "label": "First Name"
1141
+ * },
1142
+ * {
1143
+ * "name": "last_name",
1144
+ * "type": "string",
1145
+ * "label": "Last Name"
1146
+ * },
1147
+ * {
1148
+ * "name": "birthdate",
1149
+ * "type": "date",
1150
+ * "label": "Birthdate"
1151
+ * },
1152
+ * {
1153
+ * "name": "salutation",
1154
+ * "type": "select",
1155
+ * "label": "Salutation",
1156
+ * "options": [
1157
+ * "Mr.",
1158
+ * "Ms. / Mrs.",
1159
+ * "Other"
1160
+ * ]
1161
+ * },
1162
+ * {
1163
+ * "name": "marketing_permission",
1164
+ * "type": "boolean",
1165
+ * "label": "Marketing permission"
1166
+ * },
1167
+ * {
1168
+ * "name": "image",
1169
+ * "type": "file",
1170
+ * "label": "Image"
1171
+ * }
1172
+ * ]
1173
+ */
1174
+ attributes?: Attribute[];
1175
+ explicit_search_mappings?: /**
1176
+ * Advanced: explicit Elasticsearch index mapping definitions for entity data
1177
+ *
1178
+ * example:
1179
+ * {
1180
+ * "image": {
1181
+ * "type": "keyword",
1182
+ * "index": false
1183
+ * }
1184
+ * }
1185
+ */
1186
+ SearchMappings;
1187
+ }
1188
+ /**
1189
+ * The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.
1190
+ */
1191
+ export interface EntitySchemaItem {
1192
+ id?: /* Generated uuid for schema */ SchemaId /* uuid */;
1193
+ created_at?: string;
1194
+ updated_at?: string;
1195
+ comment?: string;
1196
+ source?: {
1197
+ id?: string;
1198
+ type?: string;
1199
+ };
1200
+ slug: /**
1201
+ * URL-friendly identifier for the entity schema
1202
+ * example:
1203
+ * contact
1204
+ */
1205
+ EntitySlug;
1206
+ version?: number;
1207
+ blueprint?: /* Reference to blueprint */ BlueprintEntityId /* uuid */;
1208
+ /**
1209
+ * This schema should only be active when the feature flag is enabled
1210
+ * example:
1211
+ * FF_MY_FEATURE_FLAG
1212
+ */
1213
+ feature_flag?: string;
1214
+ /**
1215
+ * This schema should only be active when one of the organization settings is enabled
1216
+ */
1217
+ enable_setting?: string[];
1218
+ /**
1219
+ * User-friendly identifier for the entity schema
1220
+ * example:
1221
+ * Contact
1222
+ */
1223
+ name: string;
1224
+ /**
1225
+ * example:
1226
+ * Contacts
1227
+ */
1228
+ plural: string;
1229
+ /**
1230
+ * example:
1231
+ * false
1232
+ */
1233
+ published?: boolean;
1234
+ /**
1235
+ * example:
1236
+ * false
1237
+ */
1238
+ draft?: boolean;
1239
+ /**
1240
+ * example:
1241
+ * person
1242
+ */
1243
+ icon?: string;
1244
+ /**
1245
+ * Template for rendering the title field. Uses handlebars
1246
+ * example:
1247
+ * {{first_name}} {{last_name}}
1248
+ */
1249
+ title_template?: string;
1250
+ ui_config?: {
1251
+ table_view?: EntityViewConfig;
1252
+ create_view?: EntityViewConfig;
1253
+ edit_view?: EntityViewConfig;
1254
+ list_item?: {
1255
+ summary_attributes?: string[];
1256
+ };
1257
+ sharing?: {
1258
+ /**
1259
+ * Show the sharing button in entity detail view
1260
+ * example:
1261
+ * true
1262
+ */
1263
+ show_sharing_button?: boolean;
1264
+ };
1265
+ };
1266
+ capabilities?: /* Capabilities the Entity has. Turn features on/off for entities. */ EntityCapability[];
1267
+ /**
1268
+ * A dictionary of Group Titles and associated settings if present.
1269
+ * example:
1270
+ * {
1271
+ * "Order Info": {
1272
+ * "expanded": true
1273
+ * },
1274
+ * "Contact Details": {
1275
+ * "expanded": false,
1276
+ * "info_tooltip_title": {
1277
+ * "key": "partner.partner_information_group_tooltip",
1278
+ * "default": "These informations are provided by the partner company and cannot be edited."
1279
+ * }
1280
+ * }
1281
+ * }
1282
+ */
1283
+ group_settings?: {
1284
+ label: string;
1285
+ id: string;
1286
+ expanded?: boolean;
1287
+ /**
1288
+ * example:
1289
+ * composite_price = "false"
1290
+ */
1291
+ render_condition?: string;
1292
+ /**
1293
+ * Render order of the group
1294
+ */
1295
+ order?: number;
1296
+ /**
1297
+ * This schema should only be active when the feature flag is enabled
1298
+ * example:
1299
+ * FF_MY_FEATURE_FLAG
1300
+ */
1301
+ feature_flag?: string;
1302
+ info_tooltip_title?: {
1303
+ key?: string;
1304
+ default?: string;
1305
+ };
1306
+ }[];
1307
+ /**
1308
+ * Custom grid definitions for the layout
1309
+ */
1310
+ layout_settings?: {
1311
+ [name: string]: {
1312
+ grid_gap?: string;
1313
+ grid_template_columns?: string;
1314
+ };
1315
+ };
1316
+ dialog_config?: {
1317
+ [name: string]: any;
1318
+ };
1319
+ /**
1320
+ * An ordered list of attributes the entity contains
1321
+ * example:
1322
+ * [
1323
+ * {
1324
+ * "name": "email",
1325
+ * "type": "email",
1326
+ * "label": "Email",
1327
+ * "required": true
1328
+ * },
1329
+ * {
1330
+ * "name": "first_name",
1331
+ * "type": "string",
1332
+ * "label": "First Name"
1333
+ * },
1334
+ * {
1335
+ * "name": "last_name",
1336
+ * "type": "string",
1337
+ * "label": "Last Name"
1338
+ * },
1339
+ * {
1340
+ * "name": "birthdate",
1341
+ * "type": "date",
1342
+ * "label": "Birthdate"
1343
+ * },
1344
+ * {
1345
+ * "name": "salutation",
1346
+ * "type": "select",
1347
+ * "label": "Salutation",
1348
+ * "options": [
1349
+ * "Mr.",
1350
+ * "Ms. / Mrs.",
1351
+ * "Other"
1352
+ * ]
1353
+ * },
1354
+ * {
1355
+ * "name": "marketing_permission",
1356
+ * "type": "boolean",
1357
+ * "label": "Marketing permission"
1358
+ * },
1359
+ * {
1360
+ * "name": "image",
1361
+ * "type": "file",
1362
+ * "label": "Image"
1363
+ * }
1364
+ * ]
1365
+ */
1366
+ attributes?: Attribute[];
1367
+ explicit_search_mappings?: /**
1368
+ * Advanced: explicit Elasticsearch index mapping definitions for entity data
1369
+ *
1370
+ * example:
1371
+ * {
1372
+ * "image": {
1373
+ * "type": "keyword",
1374
+ * "index": false
1375
+ * }
1376
+ * }
1377
+ */
1378
+ SearchMappings;
1379
+ }
1380
+ export interface EntitySearchParams {
1381
+ /**
1382
+ * Lucene queries supported with ElasticSearch
1383
+ * example:
1384
+ * _schema:contact AND status:active
1385
+ */
1386
+ q: string;
1387
+ /**
1388
+ * example:
1389
+ * _created_at:desc
1390
+ */
1391
+ sort?: string;
1392
+ from?: number;
1393
+ size?: number;
1394
+ /**
1395
+ * When true, enables entity hydration to resolve nested $relation references in-place.
1396
+ */
1397
+ hydrate?: boolean;
1398
+ /**
1399
+ * List of entity fields to include in search results
1400
+ * example:
1401
+ * [
1402
+ * "_id",
1403
+ * "_title",
1404
+ * "first_name"
1405
+ * ]
1406
+ */
1407
+ fields?: string[];
1408
+ /**
1409
+ * When true, returns the results as a CSV file
1410
+ */
1411
+ csv?: boolean;
1412
+ /**
1413
+ * Entity schema
1414
+ * example:
1415
+ * contact
1416
+ */
1417
+ schema?: string;
1418
+ }
1419
+ export interface EntitySearchResults {
1420
+ /**
1421
+ * example:
1422
+ * 1
1423
+ */
1424
+ hits?: number;
1425
+ results?: /**
1426
+ * example:
1427
+ * {
1428
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1429
+ * "_org": "123",
1430
+ * "_schema": "contact",
1431
+ * "_tags": [
1432
+ * "example",
1433
+ * "mock"
1434
+ * ],
1435
+ * "_created_at": {},
1436
+ * "_updated_at": {}
1437
+ * }
1438
+ */
1439
+ EntityItem[];
1440
+ }
1441
+ /**
1442
+ * URL-friendly identifier for the entity schema
1443
+ * example:
1444
+ * contact
1445
+ */
1446
+ export type EntitySlug = string;
1447
+ export type EntityViewConfig = EntityDefaultCreate | EntityDefaultEdit | EntityDefaultOverview | /**
1448
+ * example:
1449
+ * {
1450
+ * "type": "redirect",
1451
+ * "route": "/app/pricing-hub/product/:entityId"
1452
+ * }
1453
+ */
1454
+ RedirectEntityView | /**
1455
+ * example:
1456
+ * {
1457
+ * "type": "redirect",
1458
+ * "route": "/app/pricing-hub/product/:entityId"
1459
+ * }
1460
+ */
1461
+ EntityParcelView | EntityViewDisabled;
1462
+ export interface EntityViewDisabled {
1463
+ view_type?: "disabled";
1464
+ }
1465
+ /**
1466
+ * File or Image Attachment
1467
+ */
1468
+ export interface FileAttribute {
1469
+ name: string;
1470
+ label: string;
1471
+ placeholder?: string;
1472
+ /**
1473
+ * Do not render attribute in entity views
1474
+ */
1475
+ hidden?: boolean;
1476
+ /**
1477
+ * Render as a column in table views. When defined, overrides `hidden`
1478
+ */
1479
+ show_in_table?: boolean;
1480
+ required?: boolean;
1481
+ readonly?: boolean;
1482
+ deprecated?: boolean;
1483
+ default_value?: string | {
1484
+ [name: string]: any;
1485
+ } | number | number | boolean | any[];
1486
+ group?: string;
1487
+ layout?: string;
1488
+ /**
1489
+ * When set to true, will hide the label of the field.
1490
+ */
1491
+ hide_label?: boolean;
1492
+ /**
1493
+ * Code name of the icon to used to represent this attribute.
1494
+ * The value must be a valid @epilot/base-elements Icon name
1495
+ *
1496
+ */
1497
+ icon?: string;
1498
+ /**
1499
+ * Defines the conditional rendering expression for showing this field.
1500
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1501
+ * Note: Empty or invalid expression have no effect on the field visibility.
1502
+ *
1503
+ */
1504
+ render_condition?: string;
1505
+ /**
1506
+ * A set of constraints applicable to the attribute.
1507
+ * These constraints should and will be enforced by the attribute renderer.
1508
+ *
1509
+ * example:
1510
+ * {
1511
+ * "disablePast": true
1512
+ * }
1513
+ */
1514
+ constraints?: {
1515
+ [key: string]: any;
1516
+ };
1517
+ /**
1518
+ * This attribute should only be active when the feature flag is enabled
1519
+ * example:
1520
+ * FF_MY_FEATURE_FLAG
1521
+ */
1522
+ feature_flag?: string;
1523
+ value_formatter?: string;
1524
+ preview_value_formatter?: string;
1525
+ /**
1526
+ * Setting to `true` disables editing the attribute on the entity builder UI
1527
+ */
1528
+ entity_builder_disable_edit?: boolean;
1529
+ /**
1530
+ * Setting to `true` prevents the attribute from being modified / deleted
1531
+ */
1532
+ protected?: boolean;
1533
+ type: "image" | "file";
1534
+ multiple?: boolean;
1535
+ /**
1536
+ * List of unique content type specifiers (mime-types / extension)
1537
+ */
1538
+ allowed_types?: string[];
1539
+ default_access_control?: "public-read" | "private";
1540
+ }
1541
+ export type GetRelationsResp = (RelationItem | /**
1542
+ * example:
1543
+ * {
1544
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1545
+ * "_org": "123",
1546
+ * "_schema": "contact",
1547
+ * "_tags": [
1548
+ * "example",
1549
+ * "mock"
1550
+ * ],
1551
+ * "_created_at": {},
1552
+ * "_updated_at": {}
1553
+ * }
1554
+ */
1555
+ RelationEntity)[];
1556
+ /**
1557
+ * Entity with relation data resolved into the attribute values
1558
+ * example:
1559
+ * {
1560
+ * "status": "active",
1561
+ * "customer_number": "abc123",
1562
+ * "email": [
1563
+ * {
1564
+ * "label": "work",
1565
+ * "email": "user@example.com"
1566
+ * }
1567
+ * ],
1568
+ * "phone": [
1569
+ * {
1570
+ * "label": "work",
1571
+ * "phone": "+49123456789"
1572
+ * }
1573
+ * ],
1574
+ * "first_name": "First Name",
1575
+ * "middle_name": "Middle Name",
1576
+ * "last_name": "Last Name",
1577
+ * "date_of_birth": "2019-08-24",
1578
+ * "title": "Mr.",
1579
+ * "account": [
1580
+ * {
1581
+ * "status": "active",
1582
+ * "name": "Company name",
1583
+ * "company_email": [
1584
+ * {
1585
+ * "label": "Company email",
1586
+ * "email": "company@example.com"
1587
+ * }
1588
+ * ],
1589
+ * "company_phone": [
1590
+ * {
1591
+ * "label": "Support phone",
1592
+ * "phone": "+49123456789"
1593
+ * }
1594
+ * ],
1595
+ * "company_website": "https://example.com",
1596
+ * "tax_id": "DE123456789",
1597
+ * "tax_exemption": "2019-08-24",
1598
+ * "contacts": {
1599
+ * "$relation": [
1600
+ * {
1601
+ * "_tags": [
1602
+ * "CEO"
1603
+ * ],
1604
+ * "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
1605
+ * }
1606
+ * ]
1607
+ * }
1608
+ * }
1609
+ * ]
1610
+ * }
1611
+ */
1612
+ export interface HydratedEntity {
1613
+ [name: string]: any;
1614
+ }
1615
+ /**
1616
+ * Entity with relation data resolved into the attribute values
1617
+ * example:
1618
+ * {
1619
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1620
+ * "_org": "123",
1621
+ * "_schema": "contact",
1622
+ * "_tags": [
1623
+ * "example",
1624
+ * "mock"
1625
+ * ],
1626
+ * "_created_at": {},
1627
+ * "_updated_at": {},
1628
+ * "status": "active",
1629
+ * "customer_number": "abc123",
1630
+ * "email": [
1631
+ * {
1632
+ * "label": "work",
1633
+ * "email": "user@example.com"
1634
+ * }
1635
+ * ],
1636
+ * "phone": [
1637
+ * {
1638
+ * "label": "work",
1639
+ * "phone": "+49123456789"
1640
+ * }
1641
+ * ],
1642
+ * "first_name": "First Name",
1643
+ * "middle_name": "Middle Name",
1644
+ * "last_name": "Last Name",
1645
+ * "date_of_birth": "2019-08-24",
1646
+ * "title": "Mr.",
1647
+ * "account": [
1648
+ * {
1649
+ * "status": "active",
1650
+ * "name": "Company name",
1651
+ * "company_email": [
1652
+ * {
1653
+ * "label": "Company email",
1654
+ * "email": "company@example.com"
1655
+ * }
1656
+ * ],
1657
+ * "company_phone": [
1658
+ * {
1659
+ * "label": "Support phone",
1660
+ * "phone": "+49123456789"
1661
+ * }
1662
+ * ],
1663
+ * "company_website": "https://example.com",
1664
+ * "tax_id": "DE123456789",
1665
+ * "tax_exemption": "2019-08-24",
1666
+ * "contacts": {
1667
+ * "$relation": [
1668
+ * {
1669
+ * "_tags": [
1670
+ * "CEO"
1671
+ * ],
1672
+ * "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
1673
+ * }
1674
+ * ]
1675
+ * }
1676
+ * }
1677
+ * ]
1678
+ * }
1679
+ */
1680
+ export interface HydratedEntityItem {
1681
+ [name: string]: any;
1682
+ _id: EntityId /* uuid */;
1683
+ /**
1684
+ * Title of entity
1685
+ */
1686
+ _title: string;
1687
+ /**
1688
+ * Organization Id the entity belongs to
1689
+ */
1690
+ _org: string;
1691
+ _schema: /**
1692
+ * URL-friendly identifier for the entity schema
1693
+ * example:
1694
+ * contact
1695
+ */
1696
+ EntitySlug;
1697
+ _tags?: string[];
1698
+ _created_at: string; // date-time
1699
+ _updated_at: string; // date-time
1700
+ }
1701
+ /**
1702
+ * No UI representation
1703
+ */
1704
+ export interface InternalAttribute {
1705
+ name: string;
1706
+ label: string;
1707
+ placeholder?: string;
1708
+ /**
1709
+ * Do not render attribute in entity views
1710
+ */
1711
+ hidden?: boolean;
1712
+ /**
1713
+ * Render as a column in table views. When defined, overrides `hidden`
1714
+ */
1715
+ show_in_table?: boolean;
1716
+ required?: boolean;
1717
+ readonly?: boolean;
1718
+ deprecated?: boolean;
1719
+ default_value?: string | {
1720
+ [name: string]: any;
1721
+ } | number | number | boolean | any[];
1722
+ group?: string;
1723
+ layout?: string;
1724
+ /**
1725
+ * When set to true, will hide the label of the field.
1726
+ */
1727
+ hide_label?: boolean;
1728
+ /**
1729
+ * Code name of the icon to used to represent this attribute.
1730
+ * The value must be a valid @epilot/base-elements Icon name
1731
+ *
1732
+ */
1733
+ icon?: string;
1734
+ /**
1735
+ * Defines the conditional rendering expression for showing this field.
1736
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1737
+ * Note: Empty or invalid expression have no effect on the field visibility.
1738
+ *
1739
+ */
1740
+ render_condition?: string;
1741
+ /**
1742
+ * A set of constraints applicable to the attribute.
1743
+ * These constraints should and will be enforced by the attribute renderer.
1744
+ *
1745
+ * example:
1746
+ * {
1747
+ * "disablePast": true
1748
+ * }
1749
+ */
1750
+ constraints?: {
1751
+ [key: string]: any;
1752
+ };
1753
+ /**
1754
+ * This attribute should only be active when the feature flag is enabled
1755
+ * example:
1756
+ * FF_MY_FEATURE_FLAG
1757
+ */
1758
+ feature_flag?: string;
1759
+ value_formatter?: string;
1760
+ preview_value_formatter?: string;
1761
+ /**
1762
+ * Setting to `true` disables editing the attribute on the entity builder UI
1763
+ */
1764
+ entity_builder_disable_edit?: boolean;
1765
+ /**
1766
+ * Setting to `true` prevents the attribute from being modified / deleted
1767
+ */
1768
+ protected?: boolean;
1769
+ type?: "internal";
1770
+ }
1771
+ /**
1772
+ * Link with title and href
1773
+ */
1774
+ export interface LinkAttribute {
1775
+ name: string;
1776
+ label: string;
1777
+ placeholder?: string;
1778
+ /**
1779
+ * Do not render attribute in entity views
1780
+ */
1781
+ hidden?: boolean;
1782
+ /**
1783
+ * Render as a column in table views. When defined, overrides `hidden`
1784
+ */
1785
+ show_in_table?: boolean;
1786
+ required?: boolean;
1787
+ readonly?: boolean;
1788
+ deprecated?: boolean;
1789
+ default_value?: string | {
1790
+ [name: string]: any;
1791
+ } | number | number | boolean | any[];
1792
+ group?: string;
1793
+ layout?: string;
1794
+ /**
1795
+ * When set to true, will hide the label of the field.
1796
+ */
1797
+ hide_label?: boolean;
1798
+ /**
1799
+ * Code name of the icon to used to represent this attribute.
1800
+ * The value must be a valid @epilot/base-elements Icon name
1801
+ *
1802
+ */
1803
+ icon?: string;
1804
+ /**
1805
+ * Defines the conditional rendering expression for showing this field.
1806
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1807
+ * Note: Empty or invalid expression have no effect on the field visibility.
1808
+ *
1809
+ */
1810
+ render_condition?: string;
1811
+ /**
1812
+ * A set of constraints applicable to the attribute.
1813
+ * These constraints should and will be enforced by the attribute renderer.
1814
+ *
1815
+ * example:
1816
+ * {
1817
+ * "disablePast": true
1818
+ * }
1819
+ */
1820
+ constraints?: {
1821
+ [key: string]: any;
1822
+ };
1823
+ /**
1824
+ * This attribute should only be active when the feature flag is enabled
1825
+ * example:
1826
+ * FF_MY_FEATURE_FLAG
1827
+ */
1828
+ feature_flag?: string;
1829
+ value_formatter?: string;
1830
+ preview_value_formatter?: string;
1831
+ /**
1832
+ * Setting to `true` disables editing the attribute on the entity builder UI
1833
+ */
1834
+ entity_builder_disable_edit?: boolean;
1835
+ /**
1836
+ * Setting to `true` prevents the attribute from being modified / deleted
1837
+ */
1838
+ protected?: boolean;
1839
+ type?: "link";
1840
+ }
1841
+ /**
1842
+ * Numeric input
1843
+ */
1844
+ export interface NumberAttribute {
1845
+ name: string;
1846
+ label: string;
1847
+ placeholder?: string;
1848
+ /**
1849
+ * Do not render attribute in entity views
1850
+ */
1851
+ hidden?: boolean;
1852
+ /**
1853
+ * Render as a column in table views. When defined, overrides `hidden`
1854
+ */
1855
+ show_in_table?: boolean;
1856
+ required?: boolean;
1857
+ readonly?: boolean;
1858
+ deprecated?: boolean;
1859
+ default_value?: string | {
1860
+ [name: string]: any;
1861
+ } | number | number | boolean | any[];
1862
+ group?: string;
1863
+ layout?: string;
1864
+ /**
1865
+ * When set to true, will hide the label of the field.
1866
+ */
1867
+ hide_label?: boolean;
1868
+ /**
1869
+ * Code name of the icon to used to represent this attribute.
1870
+ * The value must be a valid @epilot/base-elements Icon name
1871
+ *
1872
+ */
1873
+ icon?: string;
1874
+ /**
1875
+ * Defines the conditional rendering expression for showing this field.
1876
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1877
+ * Note: Empty or invalid expression have no effect on the field visibility.
1878
+ *
1879
+ */
1880
+ render_condition?: string;
1881
+ /**
1882
+ * A set of constraints applicable to the attribute.
1883
+ * These constraints should and will be enforced by the attribute renderer.
1884
+ *
1885
+ * example:
1886
+ * {
1887
+ * "disablePast": true
1888
+ * }
1889
+ */
1890
+ constraints?: {
1891
+ [key: string]: any;
1892
+ };
1893
+ /**
1894
+ * This attribute should only be active when the feature flag is enabled
1895
+ * example:
1896
+ * FF_MY_FEATURE_FLAG
1897
+ */
1898
+ feature_flag?: string;
1899
+ value_formatter?: string;
1900
+ preview_value_formatter?: string;
1901
+ /**
1902
+ * Setting to `true` disables editing the attribute on the entity builder UI
1903
+ */
1904
+ entity_builder_disable_edit?: boolean;
1905
+ /**
1906
+ * Setting to `true` prevents the attribute from being modified / deleted
1907
+ */
1908
+ protected?: boolean;
1909
+ type?: "number";
1910
+ format?: string;
1911
+ }
1912
+ /**
1913
+ * Type of attribute to render N number of ordered fields
1914
+ */
1915
+ export interface OrderedListAttribute {
1916
+ name: string;
1917
+ label: string;
1918
+ placeholder?: string;
1919
+ /**
1920
+ * Do not render attribute in entity views
1921
+ */
1922
+ hidden?: boolean;
1923
+ /**
1924
+ * Render as a column in table views. When defined, overrides `hidden`
1925
+ */
1926
+ show_in_table?: boolean;
1927
+ required?: boolean;
1928
+ readonly?: boolean;
1929
+ deprecated?: boolean;
1930
+ default_value?: string | {
1931
+ [name: string]: any;
1932
+ } | number | number | boolean | any[];
1933
+ group?: string;
1934
+ layout?: string;
1935
+ /**
1936
+ * When set to true, will hide the label of the field.
1937
+ */
1938
+ hide_label?: boolean;
1939
+ /**
1940
+ * Code name of the icon to used to represent this attribute.
1941
+ * The value must be a valid @epilot/base-elements Icon name
1942
+ *
1943
+ */
1944
+ icon?: string;
1945
+ /**
1946
+ * Defines the conditional rendering expression for showing this field.
1947
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1948
+ * Note: Empty or invalid expression have no effect on the field visibility.
1949
+ *
1950
+ */
1951
+ render_condition?: string;
1952
+ /**
1953
+ * A set of constraints applicable to the attribute.
1954
+ * These constraints should and will be enforced by the attribute renderer.
1955
+ *
1956
+ * example:
1957
+ * {
1958
+ * "disablePast": true
1959
+ * }
1960
+ */
1961
+ constraints?: {
1962
+ [key: string]: any;
1963
+ };
1964
+ /**
1965
+ * This attribute should only be active when the feature flag is enabled
1966
+ * example:
1967
+ * FF_MY_FEATURE_FLAG
1968
+ */
1969
+ feature_flag?: string;
1970
+ value_formatter?: string;
1971
+ preview_value_formatter?: string;
1972
+ /**
1973
+ * Setting to `true` disables editing the attribute on the entity builder UI
1974
+ */
1975
+ entity_builder_disable_edit?: boolean;
1976
+ /**
1977
+ * Setting to `true` prevents the attribute from being modified / deleted
1978
+ */
1979
+ protected?: boolean;
1980
+ type?: "ordered_list";
1981
+ }
1982
+ /**
1983
+ * Partner Status
1984
+ */
1985
+ export interface PartnerStatusAttribute {
1986
+ name: string;
1987
+ label: string;
1988
+ placeholder?: string;
1989
+ /**
1990
+ * Do not render attribute in entity views
1991
+ */
1992
+ hidden?: boolean;
1993
+ /**
1994
+ * Render as a column in table views. When defined, overrides `hidden`
1995
+ */
1996
+ show_in_table?: boolean;
1997
+ required?: boolean;
1998
+ readonly?: boolean;
1999
+ deprecated?: boolean;
2000
+ default_value?: string | {
2001
+ [name: string]: any;
2002
+ } | number | number | boolean | any[];
2003
+ group?: string;
2004
+ layout?: string;
2005
+ /**
2006
+ * When set to true, will hide the label of the field.
2007
+ */
2008
+ hide_label?: boolean;
2009
+ /**
2010
+ * Code name of the icon to used to represent this attribute.
2011
+ * The value must be a valid @epilot/base-elements Icon name
2012
+ *
2013
+ */
2014
+ icon?: string;
2015
+ /**
2016
+ * Defines the conditional rendering expression for showing this field.
2017
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2018
+ * Note: Empty or invalid expression have no effect on the field visibility.
2019
+ *
2020
+ */
2021
+ render_condition?: string;
2022
+ /**
2023
+ * A set of constraints applicable to the attribute.
2024
+ * These constraints should and will be enforced by the attribute renderer.
2025
+ *
2026
+ * example:
2027
+ * {
2028
+ * "disablePast": true
2029
+ * }
2030
+ */
2031
+ constraints?: {
2032
+ [key: string]: any;
2033
+ };
2034
+ /**
2035
+ * This attribute should only be active when the feature flag is enabled
2036
+ * example:
2037
+ * FF_MY_FEATURE_FLAG
2038
+ */
2039
+ feature_flag?: string;
2040
+ value_formatter?: string;
2041
+ preview_value_formatter?: string;
2042
+ /**
2043
+ * Setting to `true` disables editing the attribute on the entity builder UI
2044
+ */
2045
+ entity_builder_disable_edit?: boolean;
2046
+ /**
2047
+ * Setting to `true` prevents the attribute from being modified / deleted
2048
+ */
2049
+ protected?: boolean;
2050
+ type?: "partner_status";
2051
+ }
2052
+ /**
2053
+ * example:
2054
+ * {
2055
+ * "type": "redirect",
2056
+ * "route": "/app/pricing-hub/product/:entityId"
2057
+ * }
2058
+ */
2059
+ export interface RedirectEntityView {
2060
+ view_type?: "redirect";
2061
+ /**
2062
+ * example:
2063
+ * /app/pricing-hub/product/:entityId
2064
+ */
2065
+ route?: string;
2066
+ }
2067
+ /**
2068
+ * Entity Relationship
2069
+ */
2070
+ export interface RelationAttribute {
2071
+ name: string;
2072
+ label: string;
2073
+ placeholder?: string;
2074
+ /**
2075
+ * Do not render attribute in entity views
2076
+ */
2077
+ hidden?: boolean;
2078
+ /**
2079
+ * Render as a column in table views. When defined, overrides `hidden`
2080
+ */
2081
+ show_in_table?: boolean;
2082
+ required?: boolean;
2083
+ readonly?: boolean;
2084
+ deprecated?: boolean;
2085
+ default_value?: string | {
2086
+ [name: string]: any;
2087
+ } | number | number | boolean | any[];
2088
+ group?: string;
2089
+ layout?: string;
2090
+ /**
2091
+ * When set to true, will hide the label of the field.
2092
+ */
2093
+ hide_label?: boolean;
2094
+ /**
2095
+ * Code name of the icon to used to represent this attribute.
2096
+ * The value must be a valid @epilot/base-elements Icon name
2097
+ *
2098
+ */
2099
+ icon?: string;
2100
+ /**
2101
+ * Defines the conditional rendering expression for showing this field.
2102
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2103
+ * Note: Empty or invalid expression have no effect on the field visibility.
2104
+ *
2105
+ */
2106
+ render_condition?: string;
2107
+ /**
2108
+ * A set of constraints applicable to the attribute.
2109
+ * These constraints should and will be enforced by the attribute renderer.
2110
+ *
2111
+ * example:
2112
+ * {
2113
+ * "disablePast": true
2114
+ * }
2115
+ */
2116
+ constraints?: {
2117
+ [key: string]: any;
2118
+ };
2119
+ /**
2120
+ * This attribute should only be active when the feature flag is enabled
2121
+ * example:
2122
+ * FF_MY_FEATURE_FLAG
2123
+ */
2124
+ feature_flag?: string;
2125
+ value_formatter?: string;
2126
+ preview_value_formatter?: string;
2127
+ /**
2128
+ * Setting to `true` disables editing the attribute on the entity builder UI
2129
+ */
2130
+ entity_builder_disable_edit?: boolean;
2131
+ /**
2132
+ * Setting to `true` prevents the attribute from being modified / deleted
2133
+ */
2134
+ protected?: boolean;
2135
+ type?: "relation";
2136
+ relation_type?: "has_many" | "has_one";
2137
+ delete_mode?: "cascade";
2138
+ relation_affinity_mode?: "weak" | "strong";
2139
+ /**
2140
+ * when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link.
2141
+ */
2142
+ enable_relation_picker?: boolean;
2143
+ edit_mode?: "list-view";
2144
+ drawer_size?: "small" | "medium" | "large";
2145
+ summary_fields?: (string | /* Summary Fields are displayed inside list view as a resume of the relation entity. */ SummaryField)[];
2146
+ has_primary?: boolean;
2147
+ allowedSchemas?: /**
2148
+ * URL-friendly identifier for the entity schema
2149
+ * example:
2150
+ * contact
2151
+ */
2152
+ EntitySlug[];
2153
+ /**
2154
+ * when enable_relation_tags is set to true the user will be able to set tags(labels) in each relation item
2155
+ */
2156
+ enable_relation_tags?: boolean;
2157
+ }
2158
+ /**
2159
+ * example:
2160
+ * {
2161
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2162
+ * "_org": "123",
2163
+ * "_schema": "contact",
2164
+ * "_tags": [
2165
+ * "example",
2166
+ * "mock"
2167
+ * ],
2168
+ * "_created_at": {},
2169
+ * "_updated_at": {}
2170
+ * }
2171
+ */
2172
+ export interface RelationEntity {
2173
+ _id: EntityId /* uuid */;
2174
+ /**
2175
+ * Title of entity
2176
+ */
2177
+ _title: string;
2178
+ /**
2179
+ * Organization Id the entity belongs to
2180
+ */
2181
+ _org: string;
2182
+ _schema: /**
2183
+ * URL-friendly identifier for the entity schema
2184
+ * example:
2185
+ * contact
2186
+ */
2187
+ EntitySlug;
2188
+ _tags?: string[];
2189
+ _created_at: string; // date-time
2190
+ _updated_at: string; // date-time
2191
+ $relation?: RelationItem;
2192
+ }
2193
+ export interface RelationItem {
2194
+ entity_id: EntityId /* uuid */;
2195
+ attribute: string;
2196
+ _tags?: string[];
2197
+ }
2198
+ /**
2199
+ * Repeatable (add N number of fields)
2200
+ */
2201
+ export interface RepeatableAttribute {
2202
+ name: string;
2203
+ label: string;
2204
+ placeholder?: string;
2205
+ /**
2206
+ * Do not render attribute in entity views
2207
+ */
2208
+ hidden?: boolean;
2209
+ /**
2210
+ * Render as a column in table views. When defined, overrides `hidden`
2211
+ */
2212
+ show_in_table?: boolean;
2213
+ required?: boolean;
2214
+ readonly?: boolean;
2215
+ deprecated?: boolean;
2216
+ default_value?: string | {
2217
+ [name: string]: any;
2218
+ } | number | number | boolean | any[];
2219
+ group?: string;
2220
+ layout?: string;
2221
+ /**
2222
+ * When set to true, will hide the label of the field.
2223
+ */
2224
+ hide_label?: boolean;
2225
+ /**
2226
+ * Code name of the icon to used to represent this attribute.
2227
+ * The value must be a valid @epilot/base-elements Icon name
2228
+ *
2229
+ */
2230
+ icon?: string;
2231
+ /**
2232
+ * Defines the conditional rendering expression for showing this field.
2233
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2234
+ * Note: Empty or invalid expression have no effect on the field visibility.
2235
+ *
2236
+ */
2237
+ render_condition?: string;
2238
+ /**
2239
+ * A set of constraints applicable to the attribute.
2240
+ * These constraints should and will be enforced by the attribute renderer.
2241
+ *
2242
+ * example:
2243
+ * {
2244
+ * "disablePast": true
2245
+ * }
2246
+ */
2247
+ constraints?: {
2248
+ [key: string]: any;
2249
+ };
2250
+ /**
2251
+ * This attribute should only be active when the feature flag is enabled
2252
+ * example:
2253
+ * FF_MY_FEATURE_FLAG
2254
+ */
2255
+ feature_flag?: string;
2256
+ value_formatter?: string;
2257
+ preview_value_formatter?: string;
2258
+ /**
2259
+ * Setting to `true` disables editing the attribute on the entity builder UI
2260
+ */
2261
+ entity_builder_disable_edit?: boolean;
2262
+ /**
2263
+ * Setting to `true` prevents the attribute from being modified / deleted
2264
+ */
2265
+ protected?: boolean;
2266
+ repeatable?: boolean;
2267
+ has_primary?: boolean;
2268
+ relation_affinity_mode?: "weak" | "strong";
2269
+ type?: "string" | "phone" | "email" | "address" | "relation" | "payment" | "price_component";
2270
+ /**
2271
+ * when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link.
2272
+ */
2273
+ enable_relation_picker?: boolean;
2274
+ }
2275
+ /**
2276
+ * Generated uuid for schema
2277
+ */
2278
+ export type SchemaId = string; // uuid
2279
+ /**
2280
+ * Advanced: explicit Elasticsearch index mapping definitions for entity data
2281
+ *
2282
+ * example:
2283
+ * {
2284
+ * "image": {
2285
+ * "type": "keyword",
2286
+ * "index": false
2287
+ * }
2288
+ * }
2289
+ */
2290
+ export interface SearchMappings {
2291
+ [name: string]: {
2292
+ index?: boolean;
2293
+ type?: "keyword" | "text" | "boolean" | "integer" | "long" | "float" | "date" | "flattened" | "nested";
2294
+ fields?: {
2295
+ [name: string]: any;
2296
+ };
2297
+ };
2298
+ }
2299
+ /**
2300
+ * Dropdown select
2301
+ */
2302
+ export interface SelectAttribute {
2303
+ name: string;
2304
+ label: string;
2305
+ placeholder?: string;
2306
+ /**
2307
+ * Do not render attribute in entity views
2308
+ */
2309
+ hidden?: boolean;
2310
+ /**
2311
+ * Render as a column in table views. When defined, overrides `hidden`
2312
+ */
2313
+ show_in_table?: boolean;
2314
+ required?: boolean;
2315
+ readonly?: boolean;
2316
+ deprecated?: boolean;
2317
+ default_value?: string | {
2318
+ [name: string]: any;
2319
+ } | number | number | boolean | any[];
2320
+ group?: string;
2321
+ layout?: string;
2322
+ /**
2323
+ * When set to true, will hide the label of the field.
2324
+ */
2325
+ hide_label?: boolean;
2326
+ /**
2327
+ * Code name of the icon to used to represent this attribute.
2328
+ * The value must be a valid @epilot/base-elements Icon name
2329
+ *
2330
+ */
2331
+ icon?: string;
2332
+ /**
2333
+ * Defines the conditional rendering expression for showing this field.
2334
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2335
+ * Note: Empty or invalid expression have no effect on the field visibility.
2336
+ *
2337
+ */
2338
+ render_condition?: string;
2339
+ /**
2340
+ * A set of constraints applicable to the attribute.
2341
+ * These constraints should and will be enforced by the attribute renderer.
2342
+ *
2343
+ * example:
2344
+ * {
2345
+ * "disablePast": true
2346
+ * }
2347
+ */
2348
+ constraints?: {
2349
+ [key: string]: any;
2350
+ };
2351
+ /**
2352
+ * This attribute should only be active when the feature flag is enabled
2353
+ * example:
2354
+ * FF_MY_FEATURE_FLAG
2355
+ */
2356
+ feature_flag?: string;
2357
+ value_formatter?: string;
2358
+ preview_value_formatter?: string;
2359
+ /**
2360
+ * Setting to `true` disables editing the attribute on the entity builder UI
2361
+ */
2362
+ entity_builder_disable_edit?: boolean;
2363
+ /**
2364
+ * Setting to `true` prevents the attribute from being modified / deleted
2365
+ */
2366
+ protected?: boolean;
2367
+ type?: "select" | "radio";
2368
+ options?: ((string | null) | {
2369
+ value: string;
2370
+ title?: string;
2371
+ })[];
2372
+ /**
2373
+ * Allow arbitrary input values in addition to provided options
2374
+ */
2375
+ allow_any?: boolean;
2376
+ }
2377
+ /**
2378
+ * Summary Fields are displayed inside list view as a resume of the relation entity.
2379
+ */
2380
+ export interface SummaryField {
2381
+ /**
2382
+ * The field from the entity attributes to display
2383
+ */
2384
+ field?: string;
2385
+ /**
2386
+ * An hint on how to display the summary field
2387
+ */
2388
+ display_as?: string;
2389
+ }
2390
+ /**
2391
+ * Tags
2392
+ */
2393
+ export interface TagsAttribute {
2394
+ name: string;
2395
+ label: string;
2396
+ placeholder?: string;
2397
+ /**
2398
+ * Do not render attribute in entity views
2399
+ */
2400
+ hidden?: boolean;
2401
+ /**
2402
+ * Render as a column in table views. When defined, overrides `hidden`
2403
+ */
2404
+ show_in_table?: boolean;
2405
+ required?: boolean;
2406
+ readonly?: boolean;
2407
+ deprecated?: boolean;
2408
+ default_value?: string | {
2409
+ [name: string]: any;
2410
+ } | number | number | boolean | any[];
2411
+ group?: string;
2412
+ layout?: string;
2413
+ /**
2414
+ * When set to true, will hide the label of the field.
2415
+ */
2416
+ hide_label?: boolean;
2417
+ /**
2418
+ * Code name of the icon to used to represent this attribute.
2419
+ * The value must be a valid @epilot/base-elements Icon name
2420
+ *
2421
+ */
2422
+ icon?: string;
2423
+ /**
2424
+ * Defines the conditional rendering expression for showing this field.
2425
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2426
+ * Note: Empty or invalid expression have no effect on the field visibility.
2427
+ *
2428
+ */
2429
+ render_condition?: string;
2430
+ /**
2431
+ * A set of constraints applicable to the attribute.
2432
+ * These constraints should and will be enforced by the attribute renderer.
2433
+ *
2434
+ * example:
2435
+ * {
2436
+ * "disablePast": true
2437
+ * }
2438
+ */
2439
+ constraints?: {
2440
+ [key: string]: any;
2441
+ };
2442
+ /**
2443
+ * This attribute should only be active when the feature flag is enabled
2444
+ * example:
2445
+ * FF_MY_FEATURE_FLAG
2446
+ */
2447
+ feature_flag?: string;
2448
+ value_formatter?: string;
2449
+ preview_value_formatter?: string;
2450
+ /**
2451
+ * Setting to `true` disables editing the attribute on the entity builder UI
2452
+ */
2453
+ entity_builder_disable_edit?: boolean;
2454
+ /**
2455
+ * Setting to `true` prevents the attribute from being modified / deleted
2456
+ */
2457
+ protected?: boolean;
2458
+ type?: "tags";
2459
+ options?: string[];
2460
+ suggestions?: string[];
2461
+ }
2462
+ /**
2463
+ * Textarea or text input
2464
+ */
2465
+ export interface TextAttribute {
2466
+ name: string;
2467
+ label: string;
2468
+ placeholder?: string;
2469
+ /**
2470
+ * Do not render attribute in entity views
2471
+ */
2472
+ hidden?: boolean;
2473
+ /**
2474
+ * Render as a column in table views. When defined, overrides `hidden`
2475
+ */
2476
+ show_in_table?: boolean;
2477
+ required?: boolean;
2478
+ readonly?: boolean;
2479
+ deprecated?: boolean;
2480
+ default_value?: string | {
2481
+ [name: string]: any;
2482
+ } | number | number | boolean | any[];
2483
+ group?: string;
2484
+ layout?: string;
2485
+ /**
2486
+ * When set to true, will hide the label of the field.
2487
+ */
2488
+ hide_label?: boolean;
2489
+ /**
2490
+ * Code name of the icon to used to represent this attribute.
2491
+ * The value must be a valid @epilot/base-elements Icon name
2492
+ *
2493
+ */
2494
+ icon?: string;
2495
+ /**
2496
+ * Defines the conditional rendering expression for showing this field.
2497
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2498
+ * Note: Empty or invalid expression have no effect on the field visibility.
2499
+ *
2500
+ */
2501
+ render_condition?: string;
2502
+ /**
2503
+ * A set of constraints applicable to the attribute.
2504
+ * These constraints should and will be enforced by the attribute renderer.
2505
+ *
2506
+ * example:
2507
+ * {
2508
+ * "disablePast": true
2509
+ * }
2510
+ */
2511
+ constraints?: {
2512
+ [key: string]: any;
2513
+ };
2514
+ /**
2515
+ * This attribute should only be active when the feature flag is enabled
2516
+ * example:
2517
+ * FF_MY_FEATURE_FLAG
2518
+ */
2519
+ feature_flag?: string;
2520
+ value_formatter?: string;
2521
+ preview_value_formatter?: string;
2522
+ /**
2523
+ * Setting to `true` disables editing the attribute on the entity builder UI
2524
+ */
2525
+ entity_builder_disable_edit?: boolean;
2526
+ /**
2527
+ * Setting to `true` prevents the attribute from being modified / deleted
2528
+ */
2529
+ protected?: boolean;
2530
+ type?: "string";
2531
+ multiline?: boolean;
2532
+ }
2533
+ /**
2534
+ * User Relationship
2535
+ */
2536
+ export interface UserRelationAttribute {
2537
+ name: string;
2538
+ label: string;
2539
+ placeholder?: string;
2540
+ /**
2541
+ * Do not render attribute in entity views
2542
+ */
2543
+ hidden?: boolean;
2544
+ /**
2545
+ * Render as a column in table views. When defined, overrides `hidden`
2546
+ */
2547
+ show_in_table?: boolean;
2548
+ required?: boolean;
2549
+ readonly?: boolean;
2550
+ deprecated?: boolean;
2551
+ default_value?: string | {
2552
+ [name: string]: any;
2553
+ } | number | number | boolean | any[];
2554
+ group?: string;
2555
+ layout?: string;
2556
+ /**
2557
+ * When set to true, will hide the label of the field.
2558
+ */
2559
+ hide_label?: boolean;
2560
+ /**
2561
+ * Code name of the icon to used to represent this attribute.
2562
+ * The value must be a valid @epilot/base-elements Icon name
2563
+ *
2564
+ */
2565
+ icon?: string;
2566
+ /**
2567
+ * Defines the conditional rendering expression for showing this field.
2568
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2569
+ * Note: Empty or invalid expression have no effect on the field visibility.
2570
+ *
2571
+ */
2572
+ render_condition?: string;
2573
+ /**
2574
+ * A set of constraints applicable to the attribute.
2575
+ * These constraints should and will be enforced by the attribute renderer.
2576
+ *
2577
+ * example:
2578
+ * {
2579
+ * "disablePast": true
2580
+ * }
2581
+ */
2582
+ constraints?: {
2583
+ [key: string]: any;
2584
+ };
2585
+ /**
2586
+ * This attribute should only be active when the feature flag is enabled
2587
+ * example:
2588
+ * FF_MY_FEATURE_FLAG
2589
+ */
2590
+ feature_flag?: string;
2591
+ value_formatter?: string;
2592
+ preview_value_formatter?: string;
2593
+ /**
2594
+ * Setting to `true` disables editing the attribute on the entity builder UI
2595
+ */
2596
+ entity_builder_disable_edit?: boolean;
2597
+ /**
2598
+ * Setting to `true` prevents the attribute from being modified / deleted
2599
+ */
2600
+ protected?: boolean;
2601
+ type?: "relation_user";
2602
+ multiple?: boolean;
2603
+ }
2604
+ }
2605
+ }
2606
+ declare namespace Paths {
2607
+ namespace AddRelations {
2608
+ namespace Parameters {
2609
+ export type Id = Components.Schemas.EntityId /* uuid */;
2610
+ export type Slug = /**
2611
+ * URL-friendly identifier for the entity schema
2612
+ * example:
2613
+ * contact
2614
+ */
2615
+ Components.Schemas.EntitySlug;
2616
+ }
2617
+ export interface PathParameters {
2618
+ slug: Parameters.Slug;
2619
+ id: Parameters.Id;
2620
+ }
2621
+ export type RequestBody = Components.Schemas.RelationItem[];
2622
+ namespace Responses {
2623
+ export type $200 = Components.Schemas.RelationItem;
2624
+ }
2625
+ }
2626
+ namespace AttachActivity {
2627
+ namespace Parameters {
2628
+ export type Entities = Components.Schemas.EntityId /* uuid */[];
2629
+ export type Id = /**
2630
+ * See https://github.com/ulid/spec
2631
+ * example:
2632
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
2633
+ */
2634
+ Components.Schemas.ActivityId /* ulid */;
2635
+ }
2636
+ export interface PathParameters {
2637
+ id: Parameters.Id;
2638
+ }
2639
+ export interface QueryParameters {
2640
+ entities?: Parameters.Entities;
2641
+ }
2642
+ namespace Responses {
2643
+ export type $200 = Components.Schemas.ActivityItem;
2644
+ }
2645
+ }
2646
+ namespace Autocomplete {
2647
+ namespace Parameters {
2648
+ /**
2649
+ * example:
2650
+ * _tags
2651
+ */
2652
+ export type Attribute = string;
2653
+ export type Input = string;
2654
+ export type Size = number;
2655
+ export type Slug = /**
2656
+ * URL-friendly identifier for the entity schema
2657
+ * example:
2658
+ * contact
2659
+ */
2660
+ Components.Schemas.EntitySlug;
2661
+ }
2662
+ export interface QueryParameters {
2663
+ input?: Parameters.Input;
2664
+ attribute: /**
2665
+ * example:
2666
+ * _tags
2667
+ */
2668
+ Parameters.Attribute;
2669
+ slug?: Parameters.Slug;
2670
+ size?: Parameters.Size;
2671
+ }
2672
+ namespace Responses {
2673
+ export interface $200 {
2674
+ /**
2675
+ * example:
2676
+ * 1
2677
+ */
2678
+ hits?: number;
2679
+ /**
2680
+ * example:
2681
+ * [
2682
+ * "value"
2683
+ * ]
2684
+ */
2685
+ results?: (string | boolean | {
2686
+ [name: string]: any;
2687
+ })[];
2688
+ }
2689
+ }
2690
+ }
2691
+ namespace CreateActivity {
2692
+ namespace Parameters {
2693
+ export type Entities = Components.Schemas.EntityId /* uuid */[];
2694
+ }
2695
+ export interface QueryParameters {
2696
+ entities?: Parameters.Entities;
2697
+ }
2698
+ export type RequestBody = Components.Schemas.Activity;
2699
+ namespace Responses {
2700
+ export type $200 = Components.Schemas.ActivityItem;
2701
+ }
2702
+ }
2703
+ namespace CreateEntity {
2704
+ namespace Parameters {
2705
+ export type ActivityId = /**
2706
+ * See https://github.com/ulid/spec
2707
+ * example:
2708
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
2709
+ */
2710
+ Components.Schemas.ActivityId /* ulid */;
2711
+ export type Slug = /**
2712
+ * URL-friendly identifier for the entity schema
2713
+ * example:
2714
+ * contact
2715
+ */
2716
+ Components.Schemas.EntitySlug;
2717
+ }
2718
+ export interface PathParameters {
2719
+ slug: Parameters.Slug;
2720
+ }
2721
+ export interface QueryParameters {
2722
+ activity_id?: Parameters.ActivityId;
2723
+ }
2724
+ export type RequestBody = Components.Schemas.Entity;
2725
+ namespace Responses {
2726
+ export type $201 = /**
2727
+ * example:
2728
+ * {
2729
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2730
+ * "_org": "123",
2731
+ * "_schema": "contact",
2732
+ * "_tags": [
2733
+ * "example",
2734
+ * "mock"
2735
+ * ],
2736
+ * "_created_at": {},
2737
+ * "_updated_at": {}
2738
+ * }
2739
+ */
2740
+ Components.Schemas.EntityItem;
2741
+ }
2742
+ }
2743
+ namespace CreateNewSchemaVersion {
2744
+ namespace Parameters {
2745
+ export type Draft = boolean;
2746
+ export type Slug = /**
2747
+ * URL-friendly identifier for the entity schema
2748
+ * example:
2749
+ * contact
2750
+ */
2751
+ Components.Schemas.EntitySlug;
2752
+ }
2753
+ export interface PathParameters {
2754
+ slug: Parameters.Slug;
2755
+ }
2756
+ export interface QueryParameters {
2757
+ draft?: Parameters.Draft;
2758
+ }
2759
+ export type RequestBody = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchema;
2760
+ namespace Responses {
2761
+ export type $200 = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem;
2762
+ }
2763
+ }
2764
+ namespace DeleteEntity {
2765
+ namespace Parameters {
2766
+ export type ActivityId = /**
2767
+ * See https://github.com/ulid/spec
2768
+ * example:
2769
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
2770
+ */
2771
+ Components.Schemas.ActivityId /* ulid */;
2772
+ export type Id = Components.Schemas.EntityId /* uuid */;
2773
+ export type Slug = /**
2774
+ * URL-friendly identifier for the entity schema
2775
+ * example:
2776
+ * contact
2777
+ */
2778
+ Components.Schemas.EntitySlug;
2779
+ }
2780
+ export interface PathParameters {
2781
+ slug: Parameters.Slug;
2782
+ id: Parameters.Id;
2783
+ }
2784
+ export interface QueryParameters {
2785
+ activity_id?: Parameters.ActivityId;
2786
+ }
2787
+ namespace Responses {
2788
+ export interface $200 {
2789
+ }
2790
+ }
2791
+ }
2792
+ namespace DeleteRelation {
2793
+ namespace Parameters {
2794
+ export type Attribute = string;
2795
+ export type EntityId = string;
2796
+ export type Id = Components.Schemas.EntityId /* uuid */;
2797
+ export type Slug = /**
2798
+ * URL-friendly identifier for the entity schema
2799
+ * example:
2800
+ * contact
2801
+ */
2802
+ Components.Schemas.EntitySlug;
2803
+ }
2804
+ export interface PathParameters {
2805
+ slug: Parameters.Slug;
2806
+ id: Parameters.Id;
2807
+ attribute: Parameters.Attribute;
2808
+ entity_id: Parameters.EntityId;
2809
+ }
2810
+ namespace Responses {
2811
+ export interface $204 {
2812
+ }
2813
+ }
2814
+ }
2815
+ namespace DeleteSchemaById {
2816
+ namespace Parameters {
2817
+ export type Id = /* Generated uuid for schema */ Components.Schemas.SchemaId /* uuid */;
2818
+ export type Slug = /**
2819
+ * URL-friendly identifier for the entity schema
2820
+ * example:
2821
+ * contact
2822
+ */
2823
+ Components.Schemas.EntitySlug;
2824
+ }
2825
+ export interface PathParameters {
2826
+ slug: Parameters.Slug;
2827
+ }
2828
+ export interface QueryParameters {
2829
+ id: Parameters.Id;
2830
+ }
2831
+ namespace Responses {
2832
+ export interface $204 {
2833
+ }
2834
+ }
2835
+ }
2836
+ namespace GetActivity {
2837
+ namespace Parameters {
2838
+ export type Id = /**
2839
+ * See https://github.com/ulid/spec
2840
+ * example:
2841
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
2842
+ */
2843
+ Components.Schemas.ActivityId /* ulid */;
2844
+ }
2845
+ export interface PathParameters {
2846
+ id: Parameters.Id;
2847
+ }
2848
+ namespace Responses {
2849
+ export type $200 = Components.Schemas.ActivityItem;
2850
+ }
2851
+ }
2852
+ namespace GetEntity {
2853
+ namespace Parameters {
2854
+ export type Hydrate = boolean;
2855
+ export type Id = Components.Schemas.EntityId /* uuid */;
2856
+ export type Slug = /**
2857
+ * URL-friendly identifier for the entity schema
2858
+ * example:
2859
+ * contact
2860
+ */
2861
+ Components.Schemas.EntitySlug;
2862
+ }
2863
+ export interface PathParameters {
2864
+ slug: Parameters.Slug;
2865
+ id: Parameters.Id;
2866
+ }
2867
+ export interface QueryParameters {
2868
+ hydrate?: Parameters.Hydrate;
2869
+ }
2870
+ namespace Responses {
2871
+ export interface $200 {
2872
+ entity?: /**
2873
+ * example:
2874
+ * {
2875
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2876
+ * "_org": "123",
2877
+ * "_schema": "contact",
2878
+ * "_tags": [
2879
+ * "example",
2880
+ * "mock"
2881
+ * ],
2882
+ * "_created_at": {},
2883
+ * "_updated_at": {}
2884
+ * }
2885
+ */
2886
+ Components.Schemas.EntityItem;
2887
+ relations?: /**
2888
+ * example:
2889
+ * {
2890
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2891
+ * "_org": "123",
2892
+ * "_schema": "contact",
2893
+ * "_tags": [
2894
+ * "example",
2895
+ * "mock"
2896
+ * ],
2897
+ * "_created_at": {},
2898
+ * "_updated_at": {}
2899
+ * }
2900
+ */
2901
+ Components.Schemas.EntityItem[];
2902
+ }
2903
+ }
2904
+ }
2905
+ namespace GetEntityActivityFeed {
2906
+ namespace Parameters {
2907
+ export type After = string; // date-time
2908
+ export type Before = string; // date-time
2909
+ export type From = number;
2910
+ export type Id = Components.Schemas.EntityId /* uuid */;
2911
+ export type Size = number;
2912
+ export type Slug = /**
2913
+ * URL-friendly identifier for the entity schema
2914
+ * example:
2915
+ * contact
2916
+ */
2917
+ Components.Schemas.EntitySlug;
2918
+ /**
2919
+ * example:
2920
+ * SyncActivity
2921
+ */
2922
+ export type Type = string;
2923
+ }
2924
+ export interface PathParameters {
2925
+ slug: Parameters.Slug;
2926
+ id: Parameters.Id;
2927
+ }
2928
+ export interface QueryParameters {
2929
+ after?: Parameters.After /* date-time */;
2930
+ before?: Parameters.Before /* date-time */;
2931
+ from?: Parameters.From;
2932
+ size?: Parameters.Size;
2933
+ type?: /**
2934
+ * example:
2935
+ * SyncActivity
2936
+ */
2937
+ Parameters.Type;
2938
+ }
2939
+ namespace Responses {
2940
+ export interface $200 {
2941
+ /**
2942
+ * example:
2943
+ * 1
2944
+ */
2945
+ total?: number;
2946
+ results?: Components.Schemas.ActivityItem[];
2947
+ }
2948
+ }
2949
+ }
2950
+ namespace GetRelations {
2951
+ namespace Parameters {
2952
+ export type Hydrate = boolean;
2953
+ export type Id = Components.Schemas.EntityId /* uuid */;
2954
+ export type Slug = /**
2955
+ * URL-friendly identifier for the entity schema
2956
+ * example:
2957
+ * contact
2958
+ */
2959
+ Components.Schemas.EntitySlug;
2960
+ }
2961
+ export interface PathParameters {
2962
+ slug: Parameters.Slug;
2963
+ id: Parameters.Id;
2964
+ }
2965
+ export interface QueryParameters {
2966
+ hydrate?: Parameters.Hydrate;
2967
+ }
2968
+ namespace Responses {
2969
+ export type $200 = Components.Schemas.GetRelationsResp;
2970
+ }
2971
+ }
2972
+ namespace GetSchema {
2973
+ namespace Parameters {
2974
+ export type Id = /* Generated uuid for schema */ Components.Schemas.SchemaId /* uuid */;
2975
+ export type Slug = /**
2976
+ * URL-friendly identifier for the entity schema
2977
+ * example:
2978
+ * contact
2979
+ */
2980
+ Components.Schemas.EntitySlug;
2981
+ }
2982
+ export interface PathParameters {
2983
+ slug: Parameters.Slug;
2984
+ }
2985
+ export interface QueryParameters {
2986
+ id?: Parameters.Id;
2987
+ }
2988
+ namespace Responses {
2989
+ export type $200 = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem;
2990
+ }
2991
+ }
2992
+ namespace GetSchemaVersions {
2993
+ namespace Parameters {
2994
+ export type Slug = /**
2995
+ * URL-friendly identifier for the entity schema
2996
+ * example:
2997
+ * contact
2998
+ */
2999
+ Components.Schemas.EntitySlug;
3000
+ }
3001
+ export interface PathParameters {
3002
+ slug: Parameters.Slug;
3003
+ }
3004
+ namespace Responses {
3005
+ export interface $200 {
3006
+ versions?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
3007
+ drafts?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
3008
+ }
3009
+ }
3010
+ }
3011
+ namespace ListSchemaBlueprints {
3012
+ namespace Responses {
3013
+ export interface $200 {
3014
+ results?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
3015
+ }
3016
+ }
3017
+ }
3018
+ namespace ListSchemas {
3019
+ namespace Parameters {
3020
+ export type Unpublished = boolean;
3021
+ }
3022
+ export interface QueryParameters {
3023
+ unpublished?: Parameters.Unpublished;
3024
+ }
3025
+ namespace Responses {
3026
+ export interface $200 {
3027
+ results?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
3028
+ }
3029
+ }
3030
+ }
3031
+ namespace SearchEntities {
3032
+ export type RequestBody = Components.Schemas.EntitySearchParams;
3033
+ namespace Responses {
3034
+ export type $200 = Components.Schemas.EntitySearchResults;
3035
+ }
3036
+ }
3037
+ namespace UpdateEntity {
3038
+ namespace Parameters {
3039
+ export type ActivityId = /**
3040
+ * See https://github.com/ulid/spec
3041
+ * example:
3042
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
3043
+ */
3044
+ Components.Schemas.ActivityId /* ulid */;
3045
+ export type Id = Components.Schemas.EntityId /* uuid */;
3046
+ export type Slug = /**
3047
+ * URL-friendly identifier for the entity schema
3048
+ * example:
3049
+ * contact
3050
+ */
3051
+ Components.Schemas.EntitySlug;
3052
+ }
3053
+ export interface PathParameters {
3054
+ slug: Parameters.Slug;
3055
+ id: Parameters.Id;
3056
+ }
3057
+ export interface QueryParameters {
3058
+ activity_id?: Parameters.ActivityId;
3059
+ }
3060
+ export type RequestBody = Components.Schemas.Entity;
3061
+ namespace Responses {
3062
+ export type $200 = /**
3063
+ * example:
3064
+ * {
3065
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3066
+ * "_org": "123",
3067
+ * "_schema": "contact",
3068
+ * "_tags": [
3069
+ * "example",
3070
+ * "mock"
3071
+ * ],
3072
+ * "_created_at": {},
3073
+ * "_updated_at": {}
3074
+ * }
3075
+ */
3076
+ Components.Schemas.EntityItem;
3077
+ }
3078
+ }
3079
+ namespace UpdateRelation {
3080
+ namespace Parameters {
3081
+ export type Attribute = string;
3082
+ export type EntityId = string;
3083
+ export type Id = Components.Schemas.EntityId /* uuid */;
3084
+ export type Slug = /**
3085
+ * URL-friendly identifier for the entity schema
3086
+ * example:
3087
+ * contact
3088
+ */
3089
+ Components.Schemas.EntitySlug;
3090
+ }
3091
+ export interface PathParameters {
3092
+ slug: Parameters.Slug;
3093
+ id: Parameters.Id;
3094
+ attribute: Parameters.Attribute;
3095
+ entity_id: Parameters.EntityId;
3096
+ }
3097
+ export interface RequestBody {
3098
+ _tags?: string[];
3099
+ }
3100
+ namespace Responses {
3101
+ export type $200 = Components.Schemas.RelationItem;
3102
+ }
3103
+ }
3104
+ namespace UpsertEntity {
3105
+ namespace Parameters {
3106
+ export type ActivityId = /**
3107
+ * See https://github.com/ulid/spec
3108
+ * example:
3109
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
3110
+ */
3111
+ Components.Schemas.ActivityId /* ulid */;
3112
+ export type Slug = /**
3113
+ * URL-friendly identifier for the entity schema
3114
+ * example:
3115
+ * contact
3116
+ */
3117
+ Components.Schemas.EntitySlug;
3118
+ }
3119
+ export interface PathParameters {
3120
+ slug: Parameters.Slug;
3121
+ }
3122
+ export interface QueryParameters {
3123
+ activity_id?: Parameters.ActivityId;
3124
+ }
3125
+ export interface RequestBody {
3126
+ /**
3127
+ * example:
3128
+ * [
3129
+ * "_id"
3130
+ * ]
3131
+ */
3132
+ unique_key: string[];
3133
+ entity: Components.Schemas.Entity;
3134
+ }
3135
+ namespace Responses {
3136
+ export type $200 = /**
3137
+ * example:
3138
+ * {
3139
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3140
+ * "_org": "123",
3141
+ * "_schema": "contact",
3142
+ * "_tags": [
3143
+ * "example",
3144
+ * "mock"
3145
+ * ],
3146
+ * "_created_at": {},
3147
+ * "_updated_at": {}
3148
+ * }
3149
+ */
3150
+ Components.Schemas.EntityItem;
3151
+ export type $201 = /**
3152
+ * example:
3153
+ * {
3154
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3155
+ * "_org": "123",
3156
+ * "_schema": "contact",
3157
+ * "_tags": [
3158
+ * "example",
3159
+ * "mock"
3160
+ * ],
3161
+ * "_created_at": {},
3162
+ * "_updated_at": {}
3163
+ * }
3164
+ */
3165
+ Components.Schemas.EntityItem;
3166
+ export interface $409 {
3167
+ }
3168
+ }
3169
+ }
3170
+ }
3171
+
3172
+ export interface OperationMethods {
3173
+ /**
3174
+ * listSchemas - listSchemas
3175
+ *
3176
+ * Get the latest version of local schema
3177
+ */
3178
+ 'listSchemas'(
3179
+ parameters?: Parameters<Paths.ListSchemas.QueryParameters> | null,
3180
+ data?: any,
3181
+ config?: AxiosRequestConfig
3182
+ ): OperationResponse<Paths.ListSchemas.Responses.$200>
3183
+ /**
3184
+ * listSchemaBlueprints - listSchemaBlueprints
3185
+ *
3186
+ * List canonical versions of all available schemas
3187
+ */
3188
+ 'listSchemaBlueprints'(
3189
+ parameters?: Parameters<UnknownParamsObject> | null,
3190
+ data?: any,
3191
+ config?: AxiosRequestConfig
3192
+ ): OperationResponse<Paths.ListSchemaBlueprints.Responses.$200>
3193
+ /**
3194
+ * getSchemaVersions - getSchemaVersions
3195
+ *
3196
+ * Get all versions of this schema ordered by the latest versions including drafts.
3197
+ */
3198
+ 'getSchemaVersions'(
3199
+ parameters?: Parameters<Paths.GetSchemaVersions.PathParameters> | null,
3200
+ data?: any,
3201
+ config?: AxiosRequestConfig
3202
+ ): OperationResponse<Paths.GetSchemaVersions.Responses.$200>
3203
+ /**
3204
+ * getSchema - getSchema
3205
+ *
3206
+ * By default gets the latest version of the Schema and to get the specific version of schema pass the id.
3207
+ */
3208
+ 'getSchema'(
3209
+ parameters?: Parameters<Paths.GetSchema.PathParameters & Paths.GetSchema.QueryParameters> | null,
3210
+ data?: any,
3211
+ config?: AxiosRequestConfig
3212
+ ): OperationResponse<Paths.GetSchema.Responses.$200>
3213
+ /**
3214
+ * createNewSchemaVersion - createNewSchemaVersion
3215
+ *
3216
+ * Create new version of the schema and default draft is false.
3217
+ */
3218
+ 'createNewSchemaVersion'(
3219
+ parameters?: Parameters<Paths.CreateNewSchemaVersion.PathParameters & Paths.CreateNewSchemaVersion.QueryParameters> | null,
3220
+ data?: Paths.CreateNewSchemaVersion.RequestBody,
3221
+ config?: AxiosRequestConfig
3222
+ ): OperationResponse<Paths.CreateNewSchemaVersion.Responses.$200>
3223
+ /**
3224
+ * deleteSchemaById - deleteSchemaById
3225
+ *
3226
+ * Delete schema by Id
3227
+ */
3228
+ 'deleteSchemaById'(
3229
+ parameters?: Parameters<Paths.DeleteSchemaById.PathParameters & Paths.DeleteSchemaById.QueryParameters> | null,
3230
+ data?: any,
3231
+ config?: AxiosRequestConfig
3232
+ ): OperationResponse<Paths.DeleteSchemaById.Responses.$204>
3233
+ /**
3234
+ * searchEntities - searchEntities
3235
+ *
3236
+ * Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.
3237
+ *
3238
+ * Passing comma-separated `x-epilot-org-id` is supported for cross-org entity search.
3239
+ *
3240
+ * ## Relations
3241
+ *
3242
+ * When `hydrate=true`, relation attributes are replaced in-place with nested entity values.
3243
+ *
3244
+ * Example:
3245
+ * ```json
3246
+ * {
3247
+ * "_id": "123",
3248
+ * "name": "parent",
3249
+ * "_tags": ["parent"],
3250
+ * "contacts": {
3251
+ * "$relation": [
3252
+ * { "entity_id": "456", "_tags": ["primary"] },
3253
+ * { "entity_id": "789", "_tags": ["secondary"] },
3254
+ * ]
3255
+ * }
3256
+ * }
3257
+ * ```
3258
+ *
3259
+ * Becomes:
3260
+ * ```json
3261
+ * {
3262
+ * "_id": "123",
3263
+ * "name": "parent",
3264
+ * "_tags": ["parent"],
3265
+ * "contacts": [
3266
+ * {
3267
+ * "$relation": { "entity_id": "456", "_tags": ["primary"] },
3268
+ * "_id": "456",
3269
+ * "name": "child 1",
3270
+ * "_tags": ["child"]
3271
+ * },
3272
+ * {
3273
+ * "$relation": { "entity_id": "789", "_tags": ["secondary"] },
3274
+ * "_id": "789",
3275
+ * "name": "child 2",
3276
+ * "_tags": ["child"]
3277
+ * }
3278
+ * ]
3279
+ * }
3280
+ * ```
3281
+ *
3282
+ */
3283
+ 'searchEntities'(
3284
+ parameters?: Parameters<UnknownParamsObject> | null,
3285
+ data?: Paths.SearchEntities.RequestBody,
3286
+ config?: AxiosRequestConfig
3287
+ ): OperationResponse<Paths.SearchEntities.Responses.$200>
3288
+ /**
3289
+ * createEntity - createEntity
3290
+ *
3291
+ * Creates a new entity using a key.
3292
+ *
3293
+ * ## Activity
3294
+ *
3295
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated`
3296
+ *
3297
+ * ## Relations
3298
+ *
3299
+ * To create a relation, store a property object that defines a `$relation` array.
3300
+ *
3301
+ * Example:
3302
+ *
3303
+ * ```json
3304
+ * {
3305
+ * "contacts": {
3306
+ * "$relation": [
3307
+ * { "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
3308
+ * ]
3309
+ * }
3310
+ * }
3311
+ * ```
3312
+ *
3313
+ * The items in `$relation` support two properties:
3314
+ * - `entity_id` - The ID of the entity to link
3315
+ * - `_tags` - Tags or labels for the relation (optional)
3316
+ *
3317
+ */
3318
+ 'createEntity'(
3319
+ parameters?: Parameters<Paths.CreateEntity.PathParameters & Paths.CreateEntity.QueryParameters> | null,
3320
+ data?: Paths.CreateEntity.RequestBody,
3321
+ config?: AxiosRequestConfig
3322
+ ): OperationResponse<Paths.CreateEntity.Responses.$201>
3323
+ /**
3324
+ * upsertEntity - upsertEntity
3325
+ *
3326
+ * Create or update an entity using `unique_key`
3327
+ *
3328
+ * - If no entities are matched, a new entity is created.
3329
+ * - If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.
3330
+ * - If more than one entity is matched a `409` Error is returned
3331
+ *
3332
+ * ## Activity
3333
+ *
3334
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`
3335
+ *
3336
+ */
3337
+ 'upsertEntity'(
3338
+ parameters?: Parameters<Paths.UpsertEntity.PathParameters & Paths.UpsertEntity.QueryParameters> | null,
3339
+ data?: Paths.UpsertEntity.RequestBody,
3340
+ config?: AxiosRequestConfig
3341
+ ): OperationResponse<Paths.UpsertEntity.Responses.$200 | Paths.UpsertEntity.Responses.$201>
3342
+ /**
3343
+ * getEntity - getEntity
3344
+ *
3345
+ * Gets Entity and relations by id.
3346
+ *
3347
+ * ## Relations
3348
+ *
3349
+ * When `hydrate=true`, relation attributes are replaced in-place with nested entity values.
3350
+ *
3351
+ * Example:
3352
+ * ```json
3353
+ * {
3354
+ * "_id": "123",
3355
+ * "name": "parent",
3356
+ * "_tags": ["parent"],
3357
+ * "contacts": {
3358
+ * "$relation": [
3359
+ * { "entity_id": "456", "_tags": ["primary"] },
3360
+ * { "entity_id": "789", "_tags": ["secondary"] },
3361
+ * ]
3362
+ * }
3363
+ * }
3364
+ * ```
3365
+ *
3366
+ * Becomes:
3367
+ * ```json
3368
+ * {
3369
+ * "_id": "123",
3370
+ * "name": "parent",
3371
+ * "_tags": ["parent"],
3372
+ * "contacts": [
3373
+ * {
3374
+ * "$relation": { "entity_id": "456", "_tags": ["primary"] },
3375
+ * "_id": "456",
3376
+ * "name": "child 1",
3377
+ * "_tags": ["child"]
3378
+ * },
3379
+ * {
3380
+ * "$relation": { "entity_id": "789", "_tags": ["secondary"] },
3381
+ * "_id": "789",
3382
+ * "name": "child 2",
3383
+ * "_tags": ["child"]
3384
+ * }
3385
+ * ]
3386
+ * }
3387
+ * ```
3388
+ *
3389
+ */
3390
+ 'getEntity'(
3391
+ parameters?: Parameters<Paths.GetEntity.PathParameters & Paths.GetEntity.QueryParameters> | null,
3392
+ data?: any,
3393
+ config?: AxiosRequestConfig
3394
+ ): OperationResponse<Paths.GetEntity.Responses.$200>
3395
+ /**
3396
+ * updateEntity - updateEntity
3397
+ *
3398
+ * Updates an Entity
3399
+ *
3400
+ * ## Activity
3401
+ *
3402
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityUpdated`
3403
+ *
3404
+ * ## Relations
3405
+ *
3406
+ * To create a relation, store a property that defines a `$relation` array.
3407
+ *
3408
+ * Example:
3409
+ *
3410
+ * ```json
3411
+ * {
3412
+ * "contacts": {
3413
+ * "$relation": [
3414
+ * { "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
3415
+ * ]
3416
+ * }
3417
+ * }
3418
+ * ```
3419
+ *
3420
+ * The items in `$relation` support two properties:
3421
+ * - `entity_id` - The ID of the entity to link
3422
+ * - `_tags` - Tags or labels for the relation (optional)
3423
+ *
3424
+ */
3425
+ 'updateEntity'(
3426
+ parameters?: Parameters<Paths.UpdateEntity.PathParameters & Paths.UpdateEntity.QueryParameters> | null,
3427
+ data?: Paths.UpdateEntity.RequestBody,
3428
+ config?: AxiosRequestConfig
3429
+ ): OperationResponse<Paths.UpdateEntity.Responses.$200>
3430
+ /**
3431
+ * deleteEntity - deleteEntity
3432
+ *
3433
+ * Deletes an Entity
3434
+ *
3435
+ * ## Activity
3436
+ *
3437
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityDeleted`
3438
+ *
3439
+ */
3440
+ 'deleteEntity'(
3441
+ parameters?: Parameters<Paths.DeleteEntity.PathParameters & Paths.DeleteEntity.QueryParameters> | null,
3442
+ data?: any,
3443
+ config?: AxiosRequestConfig
3444
+ ): OperationResponse<Paths.DeleteEntity.Responses.$200>
3445
+ /**
3446
+ * autocomplete - autocomplete
3447
+ *
3448
+ * Autocomplete entity attributes
3449
+ *
3450
+ */
3451
+ 'autocomplete'(
3452
+ parameters?: Parameters<Paths.Autocomplete.QueryParameters> | null,
3453
+ data?: any,
3454
+ config?: AxiosRequestConfig
3455
+ ): OperationResponse<Paths.Autocomplete.Responses.$200>
3456
+ /**
3457
+ * createActivity - createActivity
3458
+ *
3459
+ * Create an activity that can be displayed in activity feeds.
3460
+ *
3461
+ * - All activites are published as events on the event bus
3462
+ * - Entity mutations are always part of an activity
3463
+ *
3464
+ */
3465
+ 'createActivity'(
3466
+ parameters?: Parameters<Paths.CreateActivity.QueryParameters> | null,
3467
+ data?: Paths.CreateActivity.RequestBody,
3468
+ config?: AxiosRequestConfig
3469
+ ): OperationResponse<Paths.CreateActivity.Responses.$200>
3470
+ /**
3471
+ * getActivity - getActivity
3472
+ *
3473
+ * Get activity by id
3474
+ */
3475
+ 'getActivity'(
3476
+ parameters?: Parameters<Paths.GetActivity.PathParameters> | null,
3477
+ data?: any,
3478
+ config?: AxiosRequestConfig
3479
+ ): OperationResponse<Paths.GetActivity.Responses.$200>
3480
+ /**
3481
+ * attachActivity - attachActivity
3482
+ *
3483
+ * Attach existing activity to entity activity feeds
3484
+ */
3485
+ 'attachActivity'(
3486
+ parameters?: Parameters<Paths.AttachActivity.PathParameters & Paths.AttachActivity.QueryParameters> | null,
3487
+ data?: any,
3488
+ config?: AxiosRequestConfig
3489
+ ): OperationResponse<Paths.AttachActivity.Responses.$200>
3490
+ /**
3491
+ * getEntityActivityFeed - getEntityActivityFeed
3492
+ *
3493
+ * Get activity feed for an entity
3494
+ *
3495
+ */
3496
+ 'getEntityActivityFeed'(
3497
+ parameters?: Parameters<Paths.GetEntityActivityFeed.PathParameters & Paths.GetEntityActivityFeed.QueryParameters> | null,
3498
+ data?: any,
3499
+ config?: AxiosRequestConfig
3500
+ ): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
3501
+ /**
3502
+ * getRelations - getRelations
3503
+ *
3504
+ * It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.
3505
+ */
3506
+ 'getRelations'(
3507
+ parameters?: Parameters<Paths.GetRelations.PathParameters & Paths.GetRelations.QueryParameters> | null,
3508
+ data?: any,
3509
+ config?: AxiosRequestConfig
3510
+ ): OperationResponse<Paths.GetRelations.Responses.$200>
3511
+ /**
3512
+ * addRelations - addRelations
3513
+ *
3514
+ * It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.
3515
+ */
3516
+ 'addRelations'(
3517
+ parameters?: Parameters<Paths.AddRelations.PathParameters> | null,
3518
+ data?: Paths.AddRelations.RequestBody,
3519
+ config?: AxiosRequestConfig
3520
+ ): OperationResponse<Paths.AddRelations.Responses.$200>
3521
+ /**
3522
+ * updateRelation - updateRelation
3523
+ *
3524
+ * It updates a relation between two entities.
3525
+ */
3526
+ 'updateRelation'(
3527
+ parameters?: Parameters<Paths.UpdateRelation.PathParameters> | null,
3528
+ data?: Paths.UpdateRelation.RequestBody,
3529
+ config?: AxiosRequestConfig
3530
+ ): OperationResponse<Paths.UpdateRelation.Responses.$200>
3531
+ /**
3532
+ * deleteRelation - deleteRelation
3533
+ *
3534
+ * It deletes a relation between one entity and the other.
3535
+ */
3536
+ 'deleteRelation'(
3537
+ parameters?: Parameters<Paths.DeleteRelation.PathParameters> | null,
3538
+ data?: any,
3539
+ config?: AxiosRequestConfig
3540
+ ): OperationResponse<Paths.DeleteRelation.Responses.$204>
3541
+ }
3542
+
3543
+ export interface PathsDictionary {
3544
+ ['/v1/entity/schemas']: {
3545
+ /**
3546
+ * listSchemas - listSchemas
3547
+ *
3548
+ * Get the latest version of local schema
3549
+ */
3550
+ 'get'(
3551
+ parameters?: Parameters<Paths.ListSchemas.QueryParameters> | null,
3552
+ data?: any,
3553
+ config?: AxiosRequestConfig
3554
+ ): OperationResponse<Paths.ListSchemas.Responses.$200>
3555
+ }
3556
+ ['/v1/entity/schemas/blueprints']: {
3557
+ /**
3558
+ * listSchemaBlueprints - listSchemaBlueprints
3559
+ *
3560
+ * List canonical versions of all available schemas
3561
+ */
3562
+ 'get'(
3563
+ parameters?: Parameters<UnknownParamsObject> | null,
3564
+ data?: any,
3565
+ config?: AxiosRequestConfig
3566
+ ): OperationResponse<Paths.ListSchemaBlueprints.Responses.$200>
3567
+ }
3568
+ ['/v1/entity/schemas/{slug}/versions']: {
3569
+ /**
3570
+ * getSchemaVersions - getSchemaVersions
3571
+ *
3572
+ * Get all versions of this schema ordered by the latest versions including drafts.
3573
+ */
3574
+ 'get'(
3575
+ parameters?: Parameters<Paths.GetSchemaVersions.PathParameters> | null,
3576
+ data?: any,
3577
+ config?: AxiosRequestConfig
3578
+ ): OperationResponse<Paths.GetSchemaVersions.Responses.$200>
3579
+ }
3580
+ ['/v1/entity/schemas/{slug}']: {
3581
+ /**
3582
+ * getSchema - getSchema
3583
+ *
3584
+ * By default gets the latest version of the Schema and to get the specific version of schema pass the id.
3585
+ */
3586
+ 'get'(
3587
+ parameters?: Parameters<Paths.GetSchema.PathParameters & Paths.GetSchema.QueryParameters> | null,
3588
+ data?: any,
3589
+ config?: AxiosRequestConfig
3590
+ ): OperationResponse<Paths.GetSchema.Responses.$200>
3591
+ /**
3592
+ * createNewSchemaVersion - createNewSchemaVersion
3593
+ *
3594
+ * Create new version of the schema and default draft is false.
3595
+ */
3596
+ 'put'(
3597
+ parameters?: Parameters<Paths.CreateNewSchemaVersion.PathParameters & Paths.CreateNewSchemaVersion.QueryParameters> | null,
3598
+ data?: Paths.CreateNewSchemaVersion.RequestBody,
3599
+ config?: AxiosRequestConfig
3600
+ ): OperationResponse<Paths.CreateNewSchemaVersion.Responses.$200>
3601
+ /**
3602
+ * deleteSchemaById - deleteSchemaById
3603
+ *
3604
+ * Delete schema by Id
3605
+ */
3606
+ 'delete'(
3607
+ parameters?: Parameters<Paths.DeleteSchemaById.PathParameters & Paths.DeleteSchemaById.QueryParameters> | null,
3608
+ data?: any,
3609
+ config?: AxiosRequestConfig
3610
+ ): OperationResponse<Paths.DeleteSchemaById.Responses.$204>
3611
+ }
3612
+ ['/v1/entity:search']: {
3613
+ /**
3614
+ * searchEntities - searchEntities
3615
+ *
3616
+ * Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.
3617
+ *
3618
+ * Passing comma-separated `x-epilot-org-id` is supported for cross-org entity search.
3619
+ *
3620
+ * ## Relations
3621
+ *
3622
+ * When `hydrate=true`, relation attributes are replaced in-place with nested entity values.
3623
+ *
3624
+ * Example:
3625
+ * ```json
3626
+ * {
3627
+ * "_id": "123",
3628
+ * "name": "parent",
3629
+ * "_tags": ["parent"],
3630
+ * "contacts": {
3631
+ * "$relation": [
3632
+ * { "entity_id": "456", "_tags": ["primary"] },
3633
+ * { "entity_id": "789", "_tags": ["secondary"] },
3634
+ * ]
3635
+ * }
3636
+ * }
3637
+ * ```
3638
+ *
3639
+ * Becomes:
3640
+ * ```json
3641
+ * {
3642
+ * "_id": "123",
3643
+ * "name": "parent",
3644
+ * "_tags": ["parent"],
3645
+ * "contacts": [
3646
+ * {
3647
+ * "$relation": { "entity_id": "456", "_tags": ["primary"] },
3648
+ * "_id": "456",
3649
+ * "name": "child 1",
3650
+ * "_tags": ["child"]
3651
+ * },
3652
+ * {
3653
+ * "$relation": { "entity_id": "789", "_tags": ["secondary"] },
3654
+ * "_id": "789",
3655
+ * "name": "child 2",
3656
+ * "_tags": ["child"]
3657
+ * }
3658
+ * ]
3659
+ * }
3660
+ * ```
3661
+ *
3662
+ */
3663
+ 'post'(
3664
+ parameters?: Parameters<UnknownParamsObject> | null,
3665
+ data?: Paths.SearchEntities.RequestBody,
3666
+ config?: AxiosRequestConfig
3667
+ ): OperationResponse<Paths.SearchEntities.Responses.$200>
3668
+ }
3669
+ ['/v1/entity/{slug}']: {
3670
+ /**
3671
+ * createEntity - createEntity
3672
+ *
3673
+ * Creates a new entity using a key.
3674
+ *
3675
+ * ## Activity
3676
+ *
3677
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated`
3678
+ *
3679
+ * ## Relations
3680
+ *
3681
+ * To create a relation, store a property object that defines a `$relation` array.
3682
+ *
3683
+ * Example:
3684
+ *
3685
+ * ```json
3686
+ * {
3687
+ * "contacts": {
3688
+ * "$relation": [
3689
+ * { "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
3690
+ * ]
3691
+ * }
3692
+ * }
3693
+ * ```
3694
+ *
3695
+ * The items in `$relation` support two properties:
3696
+ * - `entity_id` - The ID of the entity to link
3697
+ * - `_tags` - Tags or labels for the relation (optional)
3698
+ *
3699
+ */
3700
+ 'post'(
3701
+ parameters?: Parameters<Paths.CreateEntity.PathParameters & Paths.CreateEntity.QueryParameters> | null,
3702
+ data?: Paths.CreateEntity.RequestBody,
3703
+ config?: AxiosRequestConfig
3704
+ ): OperationResponse<Paths.CreateEntity.Responses.$201>
3705
+ }
3706
+ ['/v1/entity/{slug}:upsert']: {
3707
+ /**
3708
+ * upsertEntity - upsertEntity
3709
+ *
3710
+ * Create or update an entity using `unique_key`
3711
+ *
3712
+ * - If no entities are matched, a new entity is created.
3713
+ * - If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.
3714
+ * - If more than one entity is matched a `409` Error is returned
3715
+ *
3716
+ * ## Activity
3717
+ *
3718
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`
3719
+ *
3720
+ */
3721
+ 'patch'(
3722
+ parameters?: Parameters<Paths.UpsertEntity.PathParameters & Paths.UpsertEntity.QueryParameters> | null,
3723
+ data?: Paths.UpsertEntity.RequestBody,
3724
+ config?: AxiosRequestConfig
3725
+ ): OperationResponse<Paths.UpsertEntity.Responses.$200 | Paths.UpsertEntity.Responses.$201>
3726
+ }
3727
+ ['/v1/entity/{slug}/{id}']: {
3728
+ /**
3729
+ * getEntity - getEntity
3730
+ *
3731
+ * Gets Entity and relations by id.
3732
+ *
3733
+ * ## Relations
3734
+ *
3735
+ * When `hydrate=true`, relation attributes are replaced in-place with nested entity values.
3736
+ *
3737
+ * Example:
3738
+ * ```json
3739
+ * {
3740
+ * "_id": "123",
3741
+ * "name": "parent",
3742
+ * "_tags": ["parent"],
3743
+ * "contacts": {
3744
+ * "$relation": [
3745
+ * { "entity_id": "456", "_tags": ["primary"] },
3746
+ * { "entity_id": "789", "_tags": ["secondary"] },
3747
+ * ]
3748
+ * }
3749
+ * }
3750
+ * ```
3751
+ *
3752
+ * Becomes:
3753
+ * ```json
3754
+ * {
3755
+ * "_id": "123",
3756
+ * "name": "parent",
3757
+ * "_tags": ["parent"],
3758
+ * "contacts": [
3759
+ * {
3760
+ * "$relation": { "entity_id": "456", "_tags": ["primary"] },
3761
+ * "_id": "456",
3762
+ * "name": "child 1",
3763
+ * "_tags": ["child"]
3764
+ * },
3765
+ * {
3766
+ * "$relation": { "entity_id": "789", "_tags": ["secondary"] },
3767
+ * "_id": "789",
3768
+ * "name": "child 2",
3769
+ * "_tags": ["child"]
3770
+ * }
3771
+ * ]
3772
+ * }
3773
+ * ```
3774
+ *
3775
+ */
3776
+ 'get'(
3777
+ parameters?: Parameters<Paths.GetEntity.PathParameters & Paths.GetEntity.QueryParameters> | null,
3778
+ data?: any,
3779
+ config?: AxiosRequestConfig
3780
+ ): OperationResponse<Paths.GetEntity.Responses.$200>
3781
+ /**
3782
+ * updateEntity - updateEntity
3783
+ *
3784
+ * Updates an Entity
3785
+ *
3786
+ * ## Activity
3787
+ *
3788
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityUpdated`
3789
+ *
3790
+ * ## Relations
3791
+ *
3792
+ * To create a relation, store a property that defines a `$relation` array.
3793
+ *
3794
+ * Example:
3795
+ *
3796
+ * ```json
3797
+ * {
3798
+ * "contacts": {
3799
+ * "$relation": [
3800
+ * { "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
3801
+ * ]
3802
+ * }
3803
+ * }
3804
+ * ```
3805
+ *
3806
+ * The items in `$relation` support two properties:
3807
+ * - `entity_id` - The ID of the entity to link
3808
+ * - `_tags` - Tags or labels for the relation (optional)
3809
+ *
3810
+ */
3811
+ 'put'(
3812
+ parameters?: Parameters<Paths.UpdateEntity.PathParameters & Paths.UpdateEntity.QueryParameters> | null,
3813
+ data?: Paths.UpdateEntity.RequestBody,
3814
+ config?: AxiosRequestConfig
3815
+ ): OperationResponse<Paths.UpdateEntity.Responses.$200>
3816
+ /**
3817
+ * deleteEntity - deleteEntity
3818
+ *
3819
+ * Deletes an Entity
3820
+ *
3821
+ * ## Activity
3822
+ *
3823
+ * If no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityDeleted`
3824
+ *
3825
+ */
3826
+ 'delete'(
3827
+ parameters?: Parameters<Paths.DeleteEntity.PathParameters & Paths.DeleteEntity.QueryParameters> | null,
3828
+ data?: any,
3829
+ config?: AxiosRequestConfig
3830
+ ): OperationResponse<Paths.DeleteEntity.Responses.$200>
3831
+ }
3832
+ ['/v1/entity:autocomplete']: {
3833
+ /**
3834
+ * autocomplete - autocomplete
3835
+ *
3836
+ * Autocomplete entity attributes
3837
+ *
3838
+ */
3839
+ 'get'(
3840
+ parameters?: Parameters<Paths.Autocomplete.QueryParameters> | null,
3841
+ data?: any,
3842
+ config?: AxiosRequestConfig
3843
+ ): OperationResponse<Paths.Autocomplete.Responses.$200>
3844
+ }
3845
+ ['/v1/entity/activity']: {
3846
+ /**
3847
+ * createActivity - createActivity
3848
+ *
3849
+ * Create an activity that can be displayed in activity feeds.
3850
+ *
3851
+ * - All activites are published as events on the event bus
3852
+ * - Entity mutations are always part of an activity
3853
+ *
3854
+ */
3855
+ 'post'(
3856
+ parameters?: Parameters<Paths.CreateActivity.QueryParameters> | null,
3857
+ data?: Paths.CreateActivity.RequestBody,
3858
+ config?: AxiosRequestConfig
3859
+ ): OperationResponse<Paths.CreateActivity.Responses.$200>
3860
+ }
3861
+ ['/v1/entity/activity/{id}']: {
3862
+ /**
3863
+ * getActivity - getActivity
3864
+ *
3865
+ * Get activity by id
3866
+ */
3867
+ 'get'(
3868
+ parameters?: Parameters<Paths.GetActivity.PathParameters> | null,
3869
+ data?: any,
3870
+ config?: AxiosRequestConfig
3871
+ ): OperationResponse<Paths.GetActivity.Responses.$200>
3872
+ }
3873
+ ['/v1/entity/activity/{id}:attach']: {
3874
+ /**
3875
+ * attachActivity - attachActivity
3876
+ *
3877
+ * Attach existing activity to entity activity feeds
3878
+ */
3879
+ 'post'(
3880
+ parameters?: Parameters<Paths.AttachActivity.PathParameters & Paths.AttachActivity.QueryParameters> | null,
3881
+ data?: any,
3882
+ config?: AxiosRequestConfig
3883
+ ): OperationResponse<Paths.AttachActivity.Responses.$200>
3884
+ }
3885
+ ['/v1/entity/{slug}/{id}/activity']: {
3886
+ /**
3887
+ * getEntityActivityFeed - getEntityActivityFeed
3888
+ *
3889
+ * Get activity feed for an entity
3890
+ *
3891
+ */
3892
+ 'get'(
3893
+ parameters?: Parameters<Paths.GetEntityActivityFeed.PathParameters & Paths.GetEntityActivityFeed.QueryParameters> | null,
3894
+ data?: any,
3895
+ config?: AxiosRequestConfig
3896
+ ): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
3897
+ }
3898
+ ['/v1/entity/{slug}/{id}/relations']: {
3899
+ /**
3900
+ * getRelations - getRelations
3901
+ *
3902
+ * It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.
3903
+ */
3904
+ 'get'(
3905
+ parameters?: Parameters<Paths.GetRelations.PathParameters & Paths.GetRelations.QueryParameters> | null,
3906
+ data?: any,
3907
+ config?: AxiosRequestConfig
3908
+ ): OperationResponse<Paths.GetRelations.Responses.$200>
3909
+ /**
3910
+ * addRelations - addRelations
3911
+ *
3912
+ * It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.
3913
+ */
3914
+ 'post'(
3915
+ parameters?: Parameters<Paths.AddRelations.PathParameters> | null,
3916
+ data?: Paths.AddRelations.RequestBody,
3917
+ config?: AxiosRequestConfig
3918
+ ): OperationResponse<Paths.AddRelations.Responses.$200>
3919
+ }
3920
+ ['/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}']: {
3921
+ /**
3922
+ * updateRelation - updateRelation
3923
+ *
3924
+ * It updates a relation between two entities.
3925
+ */
3926
+ 'put'(
3927
+ parameters?: Parameters<Paths.UpdateRelation.PathParameters> | null,
3928
+ data?: Paths.UpdateRelation.RequestBody,
3929
+ config?: AxiosRequestConfig
3930
+ ): OperationResponse<Paths.UpdateRelation.Responses.$200>
3931
+ /**
3932
+ * deleteRelation - deleteRelation
3933
+ *
3934
+ * It deletes a relation between one entity and the other.
3935
+ */
3936
+ 'delete'(
3937
+ parameters?: Parameters<Paths.DeleteRelation.PathParameters> | null,
3938
+ data?: any,
3939
+ config?: AxiosRequestConfig
3940
+ ): OperationResponse<Paths.DeleteRelation.Responses.$204>
3941
+ }
3942
+ }
3943
+
3944
+ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>