@epilot/entity-client 4.0.4 → 4.0.6

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
@@ -223,7 +223,7 @@ declare namespace Components {
223
223
  download_url: string;
224
224
  alt_text?: string;
225
225
  }
226
- 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 | /* Status select */ StatusAttribute | /* Sequence of unique identifiers */ SequenceAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Reference to a payment method attribute of another entity */ PaymentMethodRelationAttribute | /* 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 | /* Email address for send invitation */ InvitationEmailAttribute | /* Automation entity */ AutomationAttribute | /* Epilot internal user info */ InternalUserAttribute;
226
+ 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 | /* Multi Choice Selection */ MultiSelectAttribute | /* Status select */ StatusAttribute | /* Sequence of unique identifiers */ SequenceAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Reference to a payment method attribute of another entity */ PaymentMethodRelationAttribute | /* 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 | /* Email address for send invitation */ InvitationEmailAttribute | /* Automation entity */ AutomationAttribute | /* Epilot internal user info */ InternalUserAttribute;
227
227
  /**
228
228
  * Automation entity
229
229
  */
@@ -993,9 +993,23 @@ declare namespace Components {
993
993
  }
994
994
  export interface EntityDefaultCreate {
995
995
  view_type?: "default";
996
+ search_params?: {
997
+ [name: string]: string;
998
+ };
999
+ table_menu_options?: {
1000
+ icon?: string;
1001
+ label?: string;
1002
+ };
996
1003
  }
997
1004
  export interface EntityDefaultEdit {
998
1005
  view_type?: "default";
1006
+ search_params?: {
1007
+ [name: string]: string;
1008
+ };
1009
+ table_menu_options?: {
1010
+ icon?: string;
1011
+ label?: string;
1012
+ };
999
1013
  }
1000
1014
  export interface EntityDefaultOverview {
1001
1015
  view_type?: "default";
@@ -1040,6 +1054,25 @@ declare namespace Components {
1040
1054
  classic_view?: string; // uri
1041
1055
  }
1042
1056
  export type EntityId = string; // uuid
1057
+ export interface EntityImportParams {
1058
+ S3Reference: {
1059
+ /**
1060
+ * example:
1061
+ * epilot-files-prod
1062
+ */
1063
+ bucket: string;
1064
+ /**
1065
+ * example:
1066
+ * 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
1067
+ */
1068
+ key: string;
1069
+ };
1070
+ /**
1071
+ * example:
1072
+ * contact
1073
+ */
1074
+ schema: string;
1075
+ }
1043
1076
  /**
1044
1077
  * example:
1045
1078
  * {
@@ -1082,6 +1115,12 @@ declare namespace Components {
1082
1115
  * 123
1083
1116
  */
1084
1117
  org: string;
1118
+ activity_id?: /**
1119
+ * See https://github.com/ulid/spec
1120
+ * example:
1121
+ * 01F130Q52Q6MWSNS8N2AVXV4JN
1122
+ */
1123
+ ActivityId /* ulid */;
1085
1124
  operation: "createEntity" | "updateEntity" | "deleteEntity";
1086
1125
  /**
1087
1126
  * example:
@@ -1199,7 +1238,7 @@ declare namespace Components {
1199
1238
  * "label": "Price components"
1200
1239
  * "value": "{{item.prices.length}} price components"
1201
1240
  * "show_as_tag": true
1202
- * "render_condition": "is_composite_price = \"true\""
1241
+ * "render_condition": "is_composite_price = "true""
1203
1242
  * }
1204
1243
  * ```
1205
1244
  * The value field supports handlebar expressions from which you can pick any field from the entity state.
@@ -1412,7 +1451,7 @@ declare namespace Components {
1412
1451
  * "label": "Price components"
1413
1452
  * "value": "{{item.prices.length}} price components"
1414
1453
  * "show_as_tag": true
1415
- * "render_condition": "is_composite_price = \"true\""
1454
+ * "render_condition": "is_composite_price = "true""
1416
1455
  * }
1417
1456
  * ```
1418
1457
  * The value field supports handlebar expressions from which you can pick any field from the entity state.
@@ -1564,7 +1603,7 @@ declare namespace Components {
1564
1603
  from?: number;
1565
1604
  size?: number;
1566
1605
  /**
1567
- * When true, enables entity hydration to resolve nested $relation references in-place.
1606
+ * When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.
1568
1607
  */
1569
1608
  hydrate?: boolean;
1570
1609
  /**
@@ -1624,6 +1663,10 @@ declare namespace Components {
1624
1663
  export interface EntityViewDisabled {
1625
1664
  view_type?: "disabled";
1626
1665
  }
1666
+ /**
1667
+ * Export Job Id to get the result
1668
+ */
1669
+ export type ExportJobId = string;
1627
1670
  /**
1628
1671
  * File or Image Attachment
1629
1672
  */
@@ -2094,6 +2137,10 @@ declare namespace Components {
2094
2137
  protected?: boolean;
2095
2138
  type?: "invitation_email";
2096
2139
  }
2140
+ /**
2141
+ * Pass 'true' to generate import template
2142
+ */
2143
+ export type IsTemplate = boolean;
2097
2144
  /**
2098
2145
  * Link with title and href
2099
2146
  */
@@ -2170,6 +2217,98 @@ declare namespace Components {
2170
2217
  protected?: boolean;
2171
2218
  type?: "link";
2172
2219
  }
2220
+ /**
2221
+ * Multi Choice Selection
2222
+ */
2223
+ export interface MultiSelectAttribute {
2224
+ name: string;
2225
+ label: string;
2226
+ placeholder?: string;
2227
+ /**
2228
+ * Do not render attribute in entity views
2229
+ */
2230
+ hidden?: boolean;
2231
+ /**
2232
+ * Render as a column in table views. When defined, overrides `hidden`
2233
+ */
2234
+ show_in_table?: boolean;
2235
+ required?: boolean;
2236
+ readonly?: boolean;
2237
+ deprecated?: boolean;
2238
+ default_value?: string | {
2239
+ [name: string]: any;
2240
+ } | number | number | boolean | any[];
2241
+ group?: string;
2242
+ layout?: string;
2243
+ /**
2244
+ * When set to true, will hide the label of the field.
2245
+ */
2246
+ hide_label?: boolean;
2247
+ /**
2248
+ * Code name of the icon to used to represent this attribute.
2249
+ * The value must be a valid @epilot/base-elements Icon name
2250
+ *
2251
+ */
2252
+ icon?: string;
2253
+ /**
2254
+ * Defines the conditional rendering expression for showing this field.
2255
+ * When a valid expression is parsed, their evaluation defines the visibility of this attribute.
2256
+ * Note: Empty or invalid expression have no effect on the field visibility.
2257
+ *
2258
+ */
2259
+ render_condition?: string;
2260
+ /**
2261
+ * A set of constraints applicable to the attribute.
2262
+ * These constraints should and will be enforced by the attribute renderer.
2263
+ *
2264
+ * example:
2265
+ * {
2266
+ * "disablePast": true
2267
+ * }
2268
+ */
2269
+ constraints?: {
2270
+ [key: string]: any;
2271
+ };
2272
+ /**
2273
+ * This attribute should only be active when the feature flag is enabled
2274
+ * example:
2275
+ * FF_MY_FEATURE_FLAG
2276
+ */
2277
+ feature_flag?: string;
2278
+ /**
2279
+ * This attribute should only be active when the setting is enabled
2280
+ * example:
2281
+ * MY_SETTING
2282
+ */
2283
+ setting_flag?: string;
2284
+ value_formatter?: string;
2285
+ preview_value_formatter?: string;
2286
+ /**
2287
+ * Setting to `true` disables editing the attribute on the entity builder UI
2288
+ */
2289
+ entity_builder_disable_edit?: boolean;
2290
+ /**
2291
+ * Setting to `true` prevents the attribute from being modified / deleted
2292
+ */
2293
+ protected?: boolean;
2294
+ type?: "multiselect" | "checkbox";
2295
+ /**
2296
+ * controls if the matching of values against the options is case sensitive or not
2297
+ */
2298
+ disable_case_sensitive?: boolean | null;
2299
+ /**
2300
+ * controls if the 360 ui will allow the user to enter a value which is not defined by the options
2301
+ */
2302
+ allow_extra_options?: boolean | null;
2303
+ options?: ((string | null) | {
2304
+ value: string;
2305
+ title?: string;
2306
+ })[];
2307
+ /**
2308
+ * Allow arbitrary input values in addition to provided options
2309
+ */
2310
+ allow_any?: boolean;
2311
+ }
2173
2312
  /**
2174
2313
  * Numeric input
2175
2314
  */
@@ -3078,7 +3217,7 @@ declare namespace Components {
3078
3217
  * "label": "Price components"
3079
3218
  * "value": "{{item.prices.length}} price components"
3080
3219
  * "show_as_tag": true
3081
- * "render_condition": "is_composite_price = \"true\""
3220
+ * "render_condition": "is_composite_price = "true""
3082
3221
  * }
3083
3222
  * ```
3084
3223
  * The value field supports handlebar expressions from which you can pick any field from the entity state.
@@ -3594,6 +3733,21 @@ declare namespace Paths {
3594
3733
  }
3595
3734
  }
3596
3735
  }
3736
+ namespace ExportEntities {
3737
+ namespace Parameters {
3738
+ export type IsTemplate = /* Pass 'true' to generate import template */ Components.Schemas.IsTemplate;
3739
+ export type JobId = /* Export Job Id to get the result */ Components.Schemas.ExportJobId;
3740
+ }
3741
+ export interface QueryParameters {
3742
+ job_id?: Parameters.JobId;
3743
+ is_template?: Parameters.IsTemplate;
3744
+ }
3745
+ export type RequestBody = Components.Schemas.EntitySearchParams;
3746
+ namespace Responses {
3747
+ export interface $201 {
3748
+ }
3749
+ }
3750
+ }
3597
3751
  namespace GetActivity {
3598
3752
  namespace Parameters {
3599
3753
  export type Id = /**
@@ -3769,6 +3923,19 @@ declare namespace Paths {
3769
3923
  }
3770
3924
  }
3771
3925
  }
3926
+ namespace ImportEntities {
3927
+ namespace Parameters {
3928
+ export type JobId = /* Export Job Id to get the result */ Components.Schemas.ExportJobId;
3929
+ }
3930
+ export interface QueryParameters {
3931
+ job_id?: Parameters.JobId;
3932
+ }
3933
+ export type RequestBody = Components.Schemas.EntityImportParams;
3934
+ namespace Responses {
3935
+ export interface $201 {
3936
+ }
3937
+ }
3938
+ }
3772
3939
  namespace ListSchemaBlueprints {
3773
3940
  namespace Responses {
3774
3941
  export interface $200 {
@@ -4015,6 +4182,12 @@ export interface OperationMethods {
4015
4182
  * { "entity_id": "456", "_tags": ["primary"] },
4016
4183
  * { "entity_id": "789", "_tags": ["secondary"] },
4017
4184
  * ]
4185
+ * },
4186
+ * "addresses": {
4187
+ * "$relation_ref": [
4188
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4189
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4190
+ * ]
4018
4191
  * }
4019
4192
  * }
4020
4193
  * ```
@@ -4038,6 +4211,20 @@ export interface OperationMethods {
4038
4211
  * "name": "child 2",
4039
4212
  * "_tags": ["child"]
4040
4213
  * }
4214
+ * ],
4215
+ * "addresses": [
4216
+ * {
4217
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4218
+ * "_id": "123",
4219
+ * "address": "address 1",
4220
+ * "_tags": ["child"]
4221
+ * },
4222
+ * {
4223
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4224
+ * "_id": "234",
4225
+ * "address": "address 2",
4226
+ * "_tags": ["child"]
4227
+ * }
4041
4228
  * ]
4042
4229
  * }
4043
4230
  * ```
@@ -4122,6 +4309,12 @@ export interface OperationMethods {
4122
4309
  * { "entity_id": "456", "_tags": ["primary"] },
4123
4310
  * { "entity_id": "789", "_tags": ["secondary"] },
4124
4311
  * ]
4312
+ * },
4313
+ * "addresses": {
4314
+ * "$relation_ref": [
4315
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4316
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4317
+ * ]
4125
4318
  * }
4126
4319
  * }
4127
4320
  * ```
@@ -4145,6 +4338,20 @@ export interface OperationMethods {
4145
4338
  * "name": "child 2",
4146
4339
  * "_tags": ["child"]
4147
4340
  * }
4341
+ * ],
4342
+ * "addresses": [
4343
+ * {
4344
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4345
+ * "_id": "123",
4346
+ * "address": "address 1",
4347
+ * "_tags": ["child"]
4348
+ * },
4349
+ * {
4350
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4351
+ * "_id": "234",
4352
+ * "address": "address 2",
4353
+ * "_tags": ["child"]
4354
+ * }
4148
4355
  * ]
4149
4356
  * }
4150
4357
  * ```
@@ -4301,6 +4508,26 @@ export interface OperationMethods {
4301
4508
  data?: any,
4302
4509
  config?: AxiosRequestConfig
4303
4510
  ): OperationResponse<Paths.DeleteRelation.Responses.$204>
4511
+ /**
4512
+ * exportEntities - exportEntities
4513
+ *
4514
+ * create export file of entities
4515
+ */
4516
+ 'exportEntities'(
4517
+ parameters?: Parameters<Paths.ExportEntities.QueryParameters> | null,
4518
+ data?: Paths.ExportEntities.RequestBody,
4519
+ config?: AxiosRequestConfig
4520
+ ): OperationResponse<Paths.ExportEntities.Responses.$201>
4521
+ /**
4522
+ * importEntities - importEntities
4523
+ *
4524
+ * import entity data from
4525
+ */
4526
+ 'importEntities'(
4527
+ parameters?: Parameters<Paths.ImportEntities.QueryParameters> | null,
4528
+ data?: Paths.ImportEntities.RequestBody,
4529
+ config?: AxiosRequestConfig
4530
+ ): OperationResponse<Paths.ImportEntities.Responses.$201>
4304
4531
  }
4305
4532
 
4306
4533
  export interface PathsDictionary {
@@ -4395,6 +4622,12 @@ export interface PathsDictionary {
4395
4622
  * { "entity_id": "456", "_tags": ["primary"] },
4396
4623
  * { "entity_id": "789", "_tags": ["secondary"] },
4397
4624
  * ]
4625
+ * },
4626
+ * "addresses": {
4627
+ * "$relation_ref": [
4628
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4629
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4630
+ * ]
4398
4631
  * }
4399
4632
  * }
4400
4633
  * ```
@@ -4418,6 +4651,20 @@ export interface PathsDictionary {
4418
4651
  * "name": "child 2",
4419
4652
  * "_tags": ["child"]
4420
4653
  * }
4654
+ * ],
4655
+ * "addresses": [
4656
+ * {
4657
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4658
+ * "_id": "123",
4659
+ * "address": "address 1",
4660
+ * "_tags": ["child"]
4661
+ * },
4662
+ * {
4663
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4664
+ * "_id": "234",
4665
+ * "address": "address 2",
4666
+ * "_tags": ["child"]
4667
+ * }
4421
4668
  * ]
4422
4669
  * }
4423
4670
  * ```
@@ -4508,6 +4755,12 @@ export interface PathsDictionary {
4508
4755
  * { "entity_id": "456", "_tags": ["primary"] },
4509
4756
  * { "entity_id": "789", "_tags": ["secondary"] },
4510
4757
  * ]
4758
+ * },
4759
+ * "addresses": {
4760
+ * "$relation_ref": [
4761
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4762
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4763
+ * ]
4511
4764
  * }
4512
4765
  * }
4513
4766
  * ```
@@ -4531,6 +4784,20 @@ export interface PathsDictionary {
4531
4784
  * "name": "child 2",
4532
4785
  * "_tags": ["child"]
4533
4786
  * }
4787
+ * ],
4788
+ * "addresses": [
4789
+ * {
4790
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4791
+ * "_id": "123",
4792
+ * "address": "address 1",
4793
+ * "_tags": ["child"]
4794
+ * },
4795
+ * {
4796
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4797
+ * "_id": "234",
4798
+ * "address": "address 2",
4799
+ * "_tags": ["child"]
4800
+ * }
4534
4801
  * ]
4535
4802
  * }
4536
4803
  * ```
@@ -4702,6 +4969,30 @@ export interface PathsDictionary {
4702
4969
  config?: AxiosRequestConfig
4703
4970
  ): OperationResponse<Paths.DeleteRelation.Responses.$204>
4704
4971
  }
4972
+ ['/v1/entity:export']: {
4973
+ /**
4974
+ * exportEntities - exportEntities
4975
+ *
4976
+ * create export file of entities
4977
+ */
4978
+ 'post'(
4979
+ parameters?: Parameters<Paths.ExportEntities.QueryParameters> | null,
4980
+ data?: Paths.ExportEntities.RequestBody,
4981
+ config?: AxiosRequestConfig
4982
+ ): OperationResponse<Paths.ExportEntities.Responses.$201>
4983
+ }
4984
+ ['/v1/entity:import']: {
4985
+ /**
4986
+ * importEntities - importEntities
4987
+ *
4988
+ * import entity data from
4989
+ */
4990
+ 'post'(
4991
+ parameters?: Parameters<Paths.ImportEntities.QueryParameters> | null,
4992
+ data?: Paths.ImportEntities.RequestBody,
4993
+ config?: AxiosRequestConfig
4994
+ ): OperationResponse<Paths.ImportEntities.Responses.$201>
4995
+ }
4705
4996
  }
4706
4997
 
4707
4998
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>