@epilot/entity-client 1.31.0 → 2.1.0

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.
package/dist/openapi.d.ts CHANGED
@@ -146,7 +146,7 @@ declare namespace Components {
146
146
  download_url: string;
147
147
  alt_text?: string;
148
148
  }
149
- 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 | /* Tax Relationship */ TaxRelationAttribute | /* 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;
149
+ 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 | /* 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 | /* Custom input */ CustomAttribute | /* Payment input */ PaymentAttribute;
150
150
  export interface BaseAttribute {
151
151
  name: string;
152
152
  label: string;
@@ -237,17 +237,10 @@ declare namespace Components {
237
237
  _created_at: string; // date-time
238
238
  _updated_at: string; // date-time
239
239
  }
240
- export interface Blueprint {
241
- id?: BlueprintId /* uuid */;
242
- /**
243
- * example:
244
- * Power & Gas Utilities
245
- */
246
- name?: string;
247
- schemas?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ EntitySchema[];
248
- }
240
+ /**
241
+ * Reference to blueprint
242
+ */
249
243
  export type BlueprintEntityId = string; // uuid
250
- export type BlueprintId = string; // uuid
251
244
  /**
252
245
  * Yes / No Toggle
253
246
  */
@@ -499,6 +492,68 @@ declare namespace Components {
499
492
  flag?: string;
500
493
  })[];
501
494
  }
495
+ /**
496
+ * Custom input
497
+ */
498
+ export interface CustomAttribute {
499
+ name: string;
500
+ label: string;
501
+ placeholder?: string;
502
+ /**
503
+ * Do not render attribute in entity views
504
+ */
505
+ hidden?: boolean;
506
+ /**
507
+ * Render as a column in table views. When defined, overrides `hidden`
508
+ */
509
+ show_in_table?: boolean;
510
+ required?: boolean;
511
+ readonly?: boolean;
512
+ deprecated?: boolean;
513
+ default_value?: string | {
514
+ [name: string]: any;
515
+ } | number | number | boolean | any[];
516
+ group?: string;
517
+ layout?: string;
518
+ /**
519
+ * When set to true, will hide the label of the field.
520
+ */
521
+ hide_label?: boolean;
522
+ /**
523
+ * Code name of the icon to used to represent this attribute.
524
+ * The value must be a valid @epilot/base-elements Icon name
525
+ *
526
+ */
527
+ icon?: string;
528
+ /**
529
+ * Defines the conditional rendering expression for showing this field.
530
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
531
+ * Note: Empty or invalid expression have no effect on the field visibility.
532
+ *
533
+ */
534
+ render_condition?: string;
535
+ /**
536
+ * A set of constraints applicable to the attribute.
537
+ * These constraints should and will be enforced by the attribute renderer.
538
+ *
539
+ * example:
540
+ * {
541
+ * "disablePast": true
542
+ * }
543
+ */
544
+ constraints?: {
545
+ [key: string]: any;
546
+ };
547
+ /**
548
+ * This attribute should only be active when the feature flag is enabled
549
+ * example:
550
+ * FF_MY_FEATURE_FLAG
551
+ */
552
+ feature_flag?: string;
553
+ type?: "custom";
554
+ value_formatter?: string;
555
+ preview_value_formatter?: string;
556
+ }
502
557
  /**
503
558
  * Date or Datetime picker
504
559
  */
@@ -790,13 +845,17 @@ declare namespace Components {
790
845
  * contact
791
846
  */
792
847
  EntitySlug;
793
- blueprint?: BlueprintEntityId /* uuid */;
848
+ blueprint?: /* Reference to blueprint */ BlueprintEntityId /* uuid */;
794
849
  /**
795
850
  * This schema should only be active when the feature flag is enabled
796
851
  * example:
797
852
  * FF_MY_FEATURE_FLAG
798
853
  */
799
854
  feature_flag?: string;
855
+ /**
856
+ * This schema should only be active when one of the organization settings is enabled
857
+ */
858
+ enable_setting?: string[];
800
859
  /**
801
860
  * User-friendly identifier for the entity schema
802
861
  * example:
@@ -843,6 +902,10 @@ declare namespace Components {
843
902
  group_settings?: {
844
903
  [name: string]: {
845
904
  expanded?: boolean;
905
+ /**
906
+ * Render order of the group
907
+ */
908
+ order?: number;
846
909
  };
847
910
  };
848
911
  /**
@@ -914,13 +977,17 @@ declare namespace Components {
914
977
  * contact
915
978
  */
916
979
  EntitySlug;
917
- blueprint?: BlueprintEntityId /* uuid */;
980
+ blueprint?: /* Reference to blueprint */ BlueprintEntityId /* uuid */;
918
981
  /**
919
982
  * This schema should only be active when the feature flag is enabled
920
983
  * example:
921
984
  * FF_MY_FEATURE_FLAG
922
985
  */
923
986
  feature_flag?: string;
987
+ /**
988
+ * This schema should only be active when one of the organization settings is enabled
989
+ */
990
+ enable_setting?: string[];
924
991
  /**
925
992
  * User-friendly identifier for the entity schema
926
993
  * example:
@@ -967,6 +1034,10 @@ declare namespace Components {
967
1034
  group_settings?: {
968
1035
  [name: string]: {
969
1036
  expanded?: boolean;
1037
+ /**
1038
+ * Render order of the group
1039
+ */
1040
+ order?: number;
970
1041
  };
971
1042
  };
972
1043
  /**
@@ -1033,7 +1104,7 @@ declare namespace Components {
1033
1104
  * example:
1034
1105
  * _schema:contact AND status:active
1035
1106
  */
1036
- q?: string;
1107
+ q: string;
1037
1108
  /**
1038
1109
  * example:
1039
1110
  * _created_at:desc
@@ -1558,6 +1629,66 @@ declare namespace Components {
1558
1629
  feature_flag?: string;
1559
1630
  type?: "ordered_list";
1560
1631
  }
1632
+ /**
1633
+ * Payment input
1634
+ */
1635
+ export interface PaymentAttribute {
1636
+ name: string;
1637
+ label: string;
1638
+ placeholder?: string;
1639
+ /**
1640
+ * Do not render attribute in entity views
1641
+ */
1642
+ hidden?: boolean;
1643
+ /**
1644
+ * Render as a column in table views. When defined, overrides `hidden`
1645
+ */
1646
+ show_in_table?: boolean;
1647
+ required?: boolean;
1648
+ readonly?: boolean;
1649
+ deprecated?: boolean;
1650
+ default_value?: string | {
1651
+ [name: string]: any;
1652
+ } | number | number | boolean | any[];
1653
+ group?: string;
1654
+ layout?: string;
1655
+ /**
1656
+ * When set to true, will hide the label of the field.
1657
+ */
1658
+ hide_label?: boolean;
1659
+ /**
1660
+ * Code name of the icon to used to represent this attribute.
1661
+ * The value must be a valid @epilot/base-elements Icon name
1662
+ *
1663
+ */
1664
+ icon?: string;
1665
+ /**
1666
+ * Defines the conditional rendering expression for showing this field.
1667
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1668
+ * Note: Empty or invalid expression have no effect on the field visibility.
1669
+ *
1670
+ */
1671
+ render_condition?: string;
1672
+ /**
1673
+ * A set of constraints applicable to the attribute.
1674
+ * These constraints should and will be enforced by the attribute renderer.
1675
+ *
1676
+ * example:
1677
+ * {
1678
+ * "disablePast": true
1679
+ * }
1680
+ */
1681
+ constraints?: {
1682
+ [key: string]: any;
1683
+ };
1684
+ /**
1685
+ * This attribute should only be active when the feature flag is enabled
1686
+ * example:
1687
+ * FF_MY_FEATURE_FLAG
1688
+ */
1689
+ feature_flag?: string;
1690
+ type?: "payment";
1691
+ }
1561
1692
  /**
1562
1693
  * example:
1563
1694
  * {
@@ -1850,67 +1981,6 @@ declare namespace Components {
1850
1981
  options?: string[];
1851
1982
  suggestions?: string[];
1852
1983
  }
1853
- /**
1854
- * Tax Relationship
1855
- */
1856
- export interface TaxRelationAttribute {
1857
- name: string;
1858
- label: string;
1859
- placeholder?: string;
1860
- /**
1861
- * Do not render attribute in entity views
1862
- */
1863
- hidden?: boolean;
1864
- /**
1865
- * Render as a column in table views. When defined, overrides `hidden`
1866
- */
1867
- show_in_table?: boolean;
1868
- required?: boolean;
1869
- readonly?: boolean;
1870
- deprecated?: boolean;
1871
- default_value?: string | {
1872
- [name: string]: any;
1873
- } | number | number | boolean | any[];
1874
- group?: string;
1875
- layout?: string;
1876
- /**
1877
- * When set to true, will hide the label of the field.
1878
- */
1879
- hide_label?: boolean;
1880
- /**
1881
- * Code name of the icon to used to represent this attribute.
1882
- * The value must be a valid @epilot/base-elements Icon name
1883
- *
1884
- */
1885
- icon?: string;
1886
- /**
1887
- * Defines the conditional rendering expression for showing this field.
1888
- * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
1889
- * Note: Empty or invalid expression have no effect on the field visibility.
1890
- *
1891
- */
1892
- render_condition?: string;
1893
- /**
1894
- * A set of constraints applicable to the attribute.
1895
- * These constraints should and will be enforced by the attribute renderer.
1896
- *
1897
- * example:
1898
- * {
1899
- * "disablePast": true
1900
- * }
1901
- */
1902
- constraints?: {
1903
- [key: string]: any;
1904
- };
1905
- /**
1906
- * This attribute should only be active when the feature flag is enabled
1907
- * example:
1908
- * FF_MY_FEATURE_FLAG
1909
- */
1910
- feature_flag?: string;
1911
- type?: "relation_tax";
1912
- multiple?: boolean;
1913
- }
1914
1984
  /**
1915
1985
  * Textarea or text input
1916
1986
  */
@@ -2214,17 +2284,6 @@ declare namespace Paths {
2214
2284
  export type $200 = Components.Schemas.ActivityItem;
2215
2285
  }
2216
2286
  }
2217
- namespace GetBlueprint {
2218
- namespace Parameters {
2219
- export type Id = Components.Schemas.BlueprintId /* uuid */;
2220
- }
2221
- export interface PathParameters {
2222
- id: Parameters.Id;
2223
- }
2224
- namespace Responses {
2225
- export type $200 = Components.Schemas.Blueprint;
2226
- }
2227
- }
2228
2287
  namespace GetEntity {
2229
2288
  namespace Parameters {
2230
2289
  export type Hydrate = boolean;
@@ -2363,13 +2422,6 @@ declare namespace Paths {
2363
2422
  export type $200 = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem;
2364
2423
  }
2365
2424
  }
2366
- namespace SearchAvailableBlueprints {
2367
- namespace Responses {
2368
- export interface $200 {
2369
- results?: Components.Schemas.Blueprint[];
2370
- }
2371
- }
2372
- }
2373
2425
  namespace SearchEntities {
2374
2426
  export type RequestBody = Components.Schemas.EntitySearchParams;
2375
2427
  namespace Responses {
@@ -2572,17 +2624,6 @@ export interface OperationMethods {
2572
2624
  data?: Paths.SearchEntities.RequestBody,
2573
2625
  config?: AxiosRequestConfig
2574
2626
  ): OperationResponse<Paths.SearchEntities.Responses.$200>
2575
- /**
2576
- * autocomplete - autocomplete
2577
- *
2578
- * Autocomplete entity attributes
2579
- *
2580
- */
2581
- 'autocomplete'(
2582
- parameters?: Parameters<Paths.Autocomplete.QueryParameters> | null,
2583
- data?: any,
2584
- config?: AxiosRequestConfig
2585
- ): OperationResponse<Paths.Autocomplete.Responses.$200>
2586
2627
  /**
2587
2628
  * createEntity - createEntity
2588
2629
  *
@@ -2740,6 +2781,17 @@ export interface OperationMethods {
2740
2781
  data?: any,
2741
2782
  config?: AxiosRequestConfig
2742
2783
  ): OperationResponse<Paths.DeleteEntity.Responses.$200>
2784
+ /**
2785
+ * autocomplete - autocomplete
2786
+ *
2787
+ * Autocomplete entity attributes
2788
+ *
2789
+ */
2790
+ 'autocomplete'(
2791
+ parameters?: Parameters<Paths.Autocomplete.QueryParameters> | null,
2792
+ data?: any,
2793
+ config?: AxiosRequestConfig
2794
+ ): OperationResponse<Paths.Autocomplete.Responses.$200>
2743
2795
  /**
2744
2796
  * createActivity - createActivity
2745
2797
  *
@@ -2785,26 +2837,10 @@ export interface OperationMethods {
2785
2837
  data?: any,
2786
2838
  config?: AxiosRequestConfig
2787
2839
  ): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
2788
- /**
2789
- * searchAvailableBlueprints - searchAvailableBlueprints
2790
- */
2791
- 'searchAvailableBlueprints'(
2792
- parameters?: Parameters<UnknownParamsObject> | null,
2793
- data?: any,
2794
- config?: AxiosRequestConfig
2795
- ): OperationResponse<Paths.SearchAvailableBlueprints.Responses.$200>
2796
- /**
2797
- * getBlueprint - getBlueprint
2798
- */
2799
- 'getBlueprint'(
2800
- parameters?: Parameters<Paths.GetBlueprint.PathParameters> | null,
2801
- data?: any,
2802
- config?: AxiosRequestConfig
2803
- ): OperationResponse<Paths.GetBlueprint.Responses.$200>
2804
2840
  }
2805
2841
 
2806
2842
  export interface PathsDictionary {
2807
- ['/schemas']: {
2843
+ ['/v1/entity/schemas']: {
2808
2844
  /**
2809
2845
  * listSchemas - listSchemas
2810
2846
  */
@@ -2814,7 +2850,7 @@ export interface PathsDictionary {
2814
2850
  config?: AxiosRequestConfig
2815
2851
  ): OperationResponse<Paths.ListSchemas.Responses.$200>
2816
2852
  }
2817
- ['/schemas/{slug}']: {
2853
+ ['/v1/entity/schemas/{slug}']: {
2818
2854
  /**
2819
2855
  * getSchema - getSchema
2820
2856
  */
@@ -2840,7 +2876,7 @@ export interface PathsDictionary {
2840
2876
  config?: AxiosRequestConfig
2841
2877
  ): OperationResponse<Paths.DeleteSchema.Responses.$204>
2842
2878
  }
2843
- ['/entity:search']: {
2879
+ ['/v1/entity:search']: {
2844
2880
  /**
2845
2881
  * searchEntities - searchEntities
2846
2882
  *
@@ -2895,20 +2931,7 @@ export interface PathsDictionary {
2895
2931
  config?: AxiosRequestConfig
2896
2932
  ): OperationResponse<Paths.SearchEntities.Responses.$200>
2897
2933
  }
2898
- ['/entity:autocomplete']: {
2899
- /**
2900
- * autocomplete - autocomplete
2901
- *
2902
- * Autocomplete entity attributes
2903
- *
2904
- */
2905
- 'get'(
2906
- parameters?: Parameters<Paths.Autocomplete.QueryParameters> | null,
2907
- data?: any,
2908
- config?: AxiosRequestConfig
2909
- ): OperationResponse<Paths.Autocomplete.Responses.$200>
2910
- }
2911
- ['/entity/{slug}']: {
2934
+ ['/v1/entity/{slug}']: {
2912
2935
  /**
2913
2936
  * createEntity - createEntity
2914
2937
  *
@@ -2945,7 +2968,7 @@ export interface PathsDictionary {
2945
2968
  config?: AxiosRequestConfig
2946
2969
  ): OperationResponse<Paths.CreateEntity.Responses.$201>
2947
2970
  }
2948
- ['/entity/{slug}:upsert']: {
2971
+ ['/v1/entity/{slug}:upsert']: {
2949
2972
  /**
2950
2973
  * upsertEntity - upsertEntity
2951
2974
  *
@@ -2966,7 +2989,7 @@ export interface PathsDictionary {
2966
2989
  config?: AxiosRequestConfig
2967
2990
  ): OperationResponse<Paths.UpsertEntity.Responses.$200 | Paths.UpsertEntity.Responses.$201>
2968
2991
  }
2969
- ['/entity/{slug}/{id}']: {
2992
+ ['/v1/entity/{slug}/{id}']: {
2970
2993
  /**
2971
2994
  * getEntity - getEntity
2972
2995
  *
@@ -3071,7 +3094,20 @@ export interface PathsDictionary {
3071
3094
  config?: AxiosRequestConfig
3072
3095
  ): OperationResponse<Paths.DeleteEntity.Responses.$200>
3073
3096
  }
3074
- ['/activity']: {
3097
+ ['/v1/entity:autocomplete']: {
3098
+ /**
3099
+ * autocomplete - autocomplete
3100
+ *
3101
+ * Autocomplete entity attributes
3102
+ *
3103
+ */
3104
+ 'get'(
3105
+ parameters?: Parameters<Paths.Autocomplete.QueryParameters> | null,
3106
+ data?: any,
3107
+ config?: AxiosRequestConfig
3108
+ ): OperationResponse<Paths.Autocomplete.Responses.$200>
3109
+ }
3110
+ ['/v1/entity/activity']: {
3075
3111
  /**
3076
3112
  * createActivity - createActivity
3077
3113
  *
@@ -3087,7 +3123,7 @@ export interface PathsDictionary {
3087
3123
  config?: AxiosRequestConfig
3088
3124
  ): OperationResponse<Paths.CreateActivity.Responses.$200>
3089
3125
  }
3090
- ['/activity/{id}']: {
3126
+ ['/v1/entity/activity/{id}']: {
3091
3127
  /**
3092
3128
  * getActivity - getActivity
3093
3129
  *
@@ -3099,7 +3135,7 @@ export interface PathsDictionary {
3099
3135
  config?: AxiosRequestConfig
3100
3136
  ): OperationResponse<Paths.GetActivity.Responses.$200>
3101
3137
  }
3102
- ['/activity/{id}:attach']: {
3138
+ ['/v1/entity/activity/{id}:attach']: {
3103
3139
  /**
3104
3140
  * attachActivity - attachActivity
3105
3141
  *
@@ -3111,7 +3147,7 @@ export interface PathsDictionary {
3111
3147
  config?: AxiosRequestConfig
3112
3148
  ): OperationResponse<Paths.AttachActivity.Responses.$200>
3113
3149
  }
3114
- ['/entity/{slug}/{id}/activity']: {
3150
+ ['/v1/entity/{slug}/{id}/activity']: {
3115
3151
  /**
3116
3152
  * getEntityActivityFeed - getEntityActivityFeed
3117
3153
  *
@@ -3124,26 +3160,6 @@ export interface PathsDictionary {
3124
3160
  config?: AxiosRequestConfig
3125
3161
  ): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
3126
3162
  }
3127
- ['/blueprints']: {
3128
- /**
3129
- * searchAvailableBlueprints - searchAvailableBlueprints
3130
- */
3131
- 'get'(
3132
- parameters?: Parameters<UnknownParamsObject> | null,
3133
- data?: any,
3134
- config?: AxiosRequestConfig
3135
- ): OperationResponse<Paths.SearchAvailableBlueprints.Responses.$200>
3136
- }
3137
- ['/blueprints/{id}']: {
3138
- /**
3139
- * getBlueprint - getBlueprint
3140
- */
3141
- 'get'(
3142
- parameters?: Parameters<Paths.GetBlueprint.PathParameters> | null,
3143
- data?: any,
3144
- config?: AxiosRequestConfig
3145
- ): OperationResponse<Paths.GetBlueprint.Responses.$200>
3146
- }
3147
3163
  }
3148
3164
 
3149
3165
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>