@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/definition.js +1 -1
- package/dist/openapi.d.ts +296 -5
- package/dist/openapi.json +227 -9
- package/package-lock.json +18839 -0
- package/package.json +4 -5
- package/LICENSE +0 -21
package/dist/openapi.json
CHANGED
|
@@ -14,9 +14,17 @@
|
|
|
14
14
|
"name": "Entities",
|
|
15
15
|
"description": "CRUD Access for Entities"
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Relations",
|
|
19
|
+
"description": "Entity Relationships"
|
|
20
|
+
},
|
|
17
21
|
{
|
|
18
22
|
"name": "Activity",
|
|
19
23
|
"description": "Entity Events"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Export",
|
|
27
|
+
"description": "Export and Import entities via files"
|
|
20
28
|
}
|
|
21
29
|
],
|
|
22
30
|
"security": [
|
|
@@ -266,7 +274,7 @@
|
|
|
266
274
|
"post": {
|
|
267
275
|
"operationId": "searchEntities",
|
|
268
276
|
"summary": "searchEntities",
|
|
269
|
-
"description": "Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.\n\nPassing comma-separated `x-epilot-org-id` is supported for cross-org entity search.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n",
|
|
277
|
+
"description": "Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.\n\nPassing comma-separated `x-epilot-org-id` is supported for cross-org entity search.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n },\n \"addresses\": {\n \"$relation_ref\": [\n { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ],\n \"addresses\": [\n {\n \"$relation_ref\": { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n \"_id\": \"123\",\n \"address\": \"address 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation_ref\": { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n \"_id\": \"234\",\n \"address\": \"address 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n",
|
|
270
278
|
"tags": [
|
|
271
279
|
"Entities"
|
|
272
280
|
],
|
|
@@ -481,7 +489,7 @@
|
|
|
481
489
|
"get": {
|
|
482
490
|
"operationId": "getEntity",
|
|
483
491
|
"summary": "getEntity",
|
|
484
|
-
"description": "Gets Entity and relations by id.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n",
|
|
492
|
+
"description": "Gets Entity and relations by id.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n },\n \"addresses\": {\n \"$relation_ref\": [\n { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ],\n \"addresses\": [\n {\n \"$relation_ref\": { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n \"_id\": \"123\",\n \"address\": \"address 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation_ref\": { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n \"_id\": \"234\",\n \"address\": \"address 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n",
|
|
485
493
|
"tags": [
|
|
486
494
|
"Entities"
|
|
487
495
|
],
|
|
@@ -507,7 +515,7 @@
|
|
|
507
515
|
{
|
|
508
516
|
"in": "query",
|
|
509
517
|
"name": "hydrate",
|
|
510
|
-
"description": "When true, enables entity hydration to resolve nested $relation references in-place.",
|
|
518
|
+
"description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.",
|
|
511
519
|
"schema": {
|
|
512
520
|
"default": false,
|
|
513
521
|
"type": "boolean"
|
|
@@ -1240,6 +1248,82 @@
|
|
|
1240
1248
|
}
|
|
1241
1249
|
}
|
|
1242
1250
|
}
|
|
1251
|
+
},
|
|
1252
|
+
"/v1/entity:export": {
|
|
1253
|
+
"post": {
|
|
1254
|
+
"operationId": "exportEntities",
|
|
1255
|
+
"summary": "exportEntities",
|
|
1256
|
+
"description": "create export file of entities",
|
|
1257
|
+
"tags": [
|
|
1258
|
+
"Export"
|
|
1259
|
+
],
|
|
1260
|
+
"parameters": [
|
|
1261
|
+
{
|
|
1262
|
+
"in": "query",
|
|
1263
|
+
"name": "job_id",
|
|
1264
|
+
"description": "Export Job Id to get the result",
|
|
1265
|
+
"schema": {
|
|
1266
|
+
"$ref": "#/components/schemas/ExportJobId"
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"in": "query",
|
|
1271
|
+
"name": "is_template",
|
|
1272
|
+
"description": "Pass 'true' to generate import template",
|
|
1273
|
+
"schema": {
|
|
1274
|
+
"$ref": "#/components/schemas/IsTemplate"
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
],
|
|
1278
|
+
"requestBody": {
|
|
1279
|
+
"content": {
|
|
1280
|
+
"application/json": {
|
|
1281
|
+
"schema": {
|
|
1282
|
+
"$ref": "#/components/schemas/EntitySearchParams"
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
},
|
|
1287
|
+
"responses": {
|
|
1288
|
+
"201": {
|
|
1289
|
+
"description": "created export url and download url"
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
"/v1/entity:import": {
|
|
1295
|
+
"post": {
|
|
1296
|
+
"operationId": "importEntities",
|
|
1297
|
+
"summary": "importEntities",
|
|
1298
|
+
"description": "import entity data from",
|
|
1299
|
+
"tags": [
|
|
1300
|
+
"Export"
|
|
1301
|
+
],
|
|
1302
|
+
"parameters": [
|
|
1303
|
+
{
|
|
1304
|
+
"in": "query",
|
|
1305
|
+
"name": "job_id",
|
|
1306
|
+
"description": "Import Job Id to get the result",
|
|
1307
|
+
"schema": {
|
|
1308
|
+
"$ref": "#/components/schemas/ExportJobId"
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
],
|
|
1312
|
+
"requestBody": {
|
|
1313
|
+
"content": {
|
|
1314
|
+
"application/json": {
|
|
1315
|
+
"schema": {
|
|
1316
|
+
"$ref": "#/components/schemas/EntityImportParams"
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
"responses": {
|
|
1322
|
+
"201": {
|
|
1323
|
+
"description": "created import url and download url"
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1243
1327
|
}
|
|
1244
1328
|
},
|
|
1245
1329
|
"components": {
|
|
@@ -1258,6 +1342,14 @@
|
|
|
1258
1342
|
}
|
|
1259
1343
|
},
|
|
1260
1344
|
"schemas": {
|
|
1345
|
+
"ExportJobId": {
|
|
1346
|
+
"description": "Export Job Id to get the result",
|
|
1347
|
+
"type": "string"
|
|
1348
|
+
},
|
|
1349
|
+
"IsTemplate": {
|
|
1350
|
+
"description": "Pass 'true' to generate import template",
|
|
1351
|
+
"type": "boolean"
|
|
1352
|
+
},
|
|
1261
1353
|
"SchemaId": {
|
|
1262
1354
|
"description": "Generated uuid for schema",
|
|
1263
1355
|
"type": "string",
|
|
@@ -1567,6 +1659,9 @@
|
|
|
1567
1659
|
{
|
|
1568
1660
|
"$ref": "#/components/schemas/SelectAttribute"
|
|
1569
1661
|
},
|
|
1662
|
+
{
|
|
1663
|
+
"$ref": "#/components/schemas/MultiSelectAttribute"
|
|
1664
|
+
},
|
|
1570
1665
|
{
|
|
1571
1666
|
"$ref": "#/components/schemas/StatusAttribute"
|
|
1572
1667
|
},
|
|
@@ -1906,6 +2001,65 @@
|
|
|
1906
2001
|
}
|
|
1907
2002
|
]
|
|
1908
2003
|
},
|
|
2004
|
+
"MultiSelectAttribute": {
|
|
2005
|
+
"allOf": [
|
|
2006
|
+
{
|
|
2007
|
+
"$ref": "#/components/schemas/BaseAttribute"
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
"type": "object",
|
|
2011
|
+
"description": "Multi Choice Selection",
|
|
2012
|
+
"properties": {
|
|
2013
|
+
"type": {
|
|
2014
|
+
"type": "string",
|
|
2015
|
+
"enum": [
|
|
2016
|
+
"multiselect",
|
|
2017
|
+
"checkbox"
|
|
2018
|
+
]
|
|
2019
|
+
},
|
|
2020
|
+
"disable_case_sensitive": {
|
|
2021
|
+
"type": "boolean",
|
|
2022
|
+
"nullable": true,
|
|
2023
|
+
"description": "controls if the matching of values against the options is case sensitive or not"
|
|
2024
|
+
},
|
|
2025
|
+
"allow_extra_options": {
|
|
2026
|
+
"type": "boolean",
|
|
2027
|
+
"nullable": true,
|
|
2028
|
+
"description": "controls if the 360 ui will allow the user to enter a value which is not defined by the options"
|
|
2029
|
+
},
|
|
2030
|
+
"options": {
|
|
2031
|
+
"type": "array",
|
|
2032
|
+
"items": {
|
|
2033
|
+
"anyOf": [
|
|
2034
|
+
{
|
|
2035
|
+
"type": "string",
|
|
2036
|
+
"nullable": true
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
"type": "object",
|
|
2040
|
+
"properties": {
|
|
2041
|
+
"value": {
|
|
2042
|
+
"type": "string"
|
|
2043
|
+
},
|
|
2044
|
+
"title": {
|
|
2045
|
+
"type": "string"
|
|
2046
|
+
}
|
|
2047
|
+
},
|
|
2048
|
+
"required": [
|
|
2049
|
+
"value"
|
|
2050
|
+
]
|
|
2051
|
+
}
|
|
2052
|
+
]
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2055
|
+
"allow_any": {
|
|
2056
|
+
"type": "boolean",
|
|
2057
|
+
"description": "Allow arbitrary input values in addition to provided options"
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
]
|
|
2062
|
+
},
|
|
1909
2063
|
"StatusAttribute": {
|
|
1910
2064
|
"allOf": [
|
|
1911
2065
|
{
|
|
@@ -2595,7 +2749,7 @@
|
|
|
2595
2749
|
]
|
|
2596
2750
|
},
|
|
2597
2751
|
"SummaryAttribute": {
|
|
2598
|
-
"description": "Represents an expanded version of an attribute to be displayed in the list item summary.\nThis configuration can be used in the following way:\n```js\n{\n \"label\": \"Price components\"\n \"value\": \"{{item.prices.length}} price components\"\n \"show_as_tag\": true\n \"render_condition\": \"is_composite_price =
|
|
2752
|
+
"description": "Represents an expanded version of an attribute to be displayed in the list item summary.\nThis configuration can be used in the following way:\n```js\n{\n \"label\": \"Price components\"\n \"value\": \"{{item.prices.length}} price components\"\n \"show_as_tag\": true\n \"render_condition\": \"is_composite_price = \"true\"\"\n}\n```\nThe value field supports handlebar expressions from which you can pick any field from the entity state.\n",
|
|
2599
2753
|
"type": "object",
|
|
2600
2754
|
"properties": {
|
|
2601
2755
|
"label": {
|
|
@@ -2875,6 +3029,23 @@
|
|
|
2875
3029
|
"enum": [
|
|
2876
3030
|
"default"
|
|
2877
3031
|
]
|
|
3032
|
+
},
|
|
3033
|
+
"search_params": {
|
|
3034
|
+
"type": "object",
|
|
3035
|
+
"additionalProperties": {
|
|
3036
|
+
"type": "string"
|
|
3037
|
+
}
|
|
3038
|
+
},
|
|
3039
|
+
"table_menu_options": {
|
|
3040
|
+
"type": "object",
|
|
3041
|
+
"properties": {
|
|
3042
|
+
"icon": {
|
|
3043
|
+
"type": "string"
|
|
3044
|
+
},
|
|
3045
|
+
"label": {
|
|
3046
|
+
"type": "string"
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
2878
3049
|
}
|
|
2879
3050
|
}
|
|
2880
3051
|
},
|
|
@@ -2886,6 +3057,23 @@
|
|
|
2886
3057
|
"enum": [
|
|
2887
3058
|
"default"
|
|
2888
3059
|
]
|
|
3060
|
+
},
|
|
3061
|
+
"search_params": {
|
|
3062
|
+
"type": "object",
|
|
3063
|
+
"additionalProperties": {
|
|
3064
|
+
"type": "string"
|
|
3065
|
+
}
|
|
3066
|
+
},
|
|
3067
|
+
"table_menu_options": {
|
|
3068
|
+
"type": "object",
|
|
3069
|
+
"properties": {
|
|
3070
|
+
"icon": {
|
|
3071
|
+
"type": "string"
|
|
3072
|
+
},
|
|
3073
|
+
"label": {
|
|
3074
|
+
"type": "string"
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
2889
3077
|
}
|
|
2890
3078
|
}
|
|
2891
3079
|
},
|
|
@@ -3139,7 +3327,7 @@
|
|
|
3139
3327
|
},
|
|
3140
3328
|
"hydrate": {
|
|
3141
3329
|
"type": "boolean",
|
|
3142
|
-
"description": "When true, enables entity hydration to resolve nested $relation references in-place.",
|
|
3330
|
+
"description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.",
|
|
3143
3331
|
"default": false
|
|
3144
3332
|
},
|
|
3145
3333
|
"fields": {
|
|
@@ -3159,6 +3347,36 @@
|
|
|
3159
3347
|
"q"
|
|
3160
3348
|
]
|
|
3161
3349
|
},
|
|
3350
|
+
"EntityImportParams": {
|
|
3351
|
+
"type": "object",
|
|
3352
|
+
"properties": {
|
|
3353
|
+
"S3Reference": {
|
|
3354
|
+
"type": "object",
|
|
3355
|
+
"properties": {
|
|
3356
|
+
"bucket": {
|
|
3357
|
+
"type": "string",
|
|
3358
|
+
"example": "epilot-files-prod"
|
|
3359
|
+
},
|
|
3360
|
+
"key": {
|
|
3361
|
+
"type": "string",
|
|
3362
|
+
"example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
3363
|
+
}
|
|
3364
|
+
},
|
|
3365
|
+
"required": [
|
|
3366
|
+
"bucket",
|
|
3367
|
+
"key"
|
|
3368
|
+
]
|
|
3369
|
+
},
|
|
3370
|
+
"schema": {
|
|
3371
|
+
"type": "string",
|
|
3372
|
+
"example": "contact"
|
|
3373
|
+
}
|
|
3374
|
+
},
|
|
3375
|
+
"required": [
|
|
3376
|
+
"S3Reference",
|
|
3377
|
+
"schema"
|
|
3378
|
+
]
|
|
3379
|
+
},
|
|
3162
3380
|
"EntitySearchResults": {
|
|
3163
3381
|
"type": "object",
|
|
3164
3382
|
"properties": {
|
|
@@ -3314,6 +3532,9 @@
|
|
|
3314
3532
|
"type": "string",
|
|
3315
3533
|
"example": "123"
|
|
3316
3534
|
},
|
|
3535
|
+
"activity_id": {
|
|
3536
|
+
"$ref": "#/components/schemas/ActivityId"
|
|
3537
|
+
},
|
|
3317
3538
|
"operation": {
|
|
3318
3539
|
"type": "string",
|
|
3319
3540
|
"enum": [
|
|
@@ -4034,10 +4255,7 @@
|
|
|
4034
4255
|
},
|
|
4035
4256
|
"servers": [
|
|
4036
4257
|
{
|
|
4037
|
-
"url": "
|
|
4038
|
-
},
|
|
4039
|
-
{
|
|
4040
|
-
"url": "https://entity.sls.epilot.io"
|
|
4258
|
+
"url": "null"
|
|
4041
4259
|
}
|
|
4042
4260
|
]
|
|
4043
4261
|
}
|