@epilot/entity-client 4.0.5 → 4.1.2

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
@@ -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";
@@ -1570,7 +1584,7 @@ declare namespace Components {
1570
1584
  from?: number;
1571
1585
  size?: number;
1572
1586
  /**
1573
- * When true, enables entity hydration to resolve nested $relation references in-place.
1587
+ * When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.
1574
1588
  */
1575
1589
  hydrate?: boolean;
1576
1590
  /**
@@ -4038,6 +4052,12 @@ export interface OperationMethods {
4038
4052
  * { "entity_id": "456", "_tags": ["primary"] },
4039
4053
  * { "entity_id": "789", "_tags": ["secondary"] },
4040
4054
  * ]
4055
+ * },
4056
+ * "addresses": {
4057
+ * "$relation_ref": [
4058
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4059
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4060
+ * ]
4041
4061
  * }
4042
4062
  * }
4043
4063
  * ```
@@ -4061,6 +4081,20 @@ export interface OperationMethods {
4061
4081
  * "name": "child 2",
4062
4082
  * "_tags": ["child"]
4063
4083
  * }
4084
+ * ],
4085
+ * "addresses": [
4086
+ * {
4087
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4088
+ * "_id": "123",
4089
+ * "address": "address 1",
4090
+ * "_tags": ["child"]
4091
+ * },
4092
+ * {
4093
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4094
+ * "_id": "234",
4095
+ * "address": "address 2",
4096
+ * "_tags": ["child"]
4097
+ * }
4064
4098
  * ]
4065
4099
  * }
4066
4100
  * ```
@@ -4145,6 +4179,12 @@ export interface OperationMethods {
4145
4179
  * { "entity_id": "456", "_tags": ["primary"] },
4146
4180
  * { "entity_id": "789", "_tags": ["secondary"] },
4147
4181
  * ]
4182
+ * },
4183
+ * "addresses": {
4184
+ * "$relation_ref": [
4185
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4186
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4187
+ * ]
4148
4188
  * }
4149
4189
  * }
4150
4190
  * ```
@@ -4168,6 +4208,20 @@ export interface OperationMethods {
4168
4208
  * "name": "child 2",
4169
4209
  * "_tags": ["child"]
4170
4210
  * }
4211
+ * ],
4212
+ * "addresses": [
4213
+ * {
4214
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4215
+ * "_id": "123",
4216
+ * "address": "address 1",
4217
+ * "_tags": ["child"]
4218
+ * },
4219
+ * {
4220
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4221
+ * "_id": "234",
4222
+ * "address": "address 2",
4223
+ * "_tags": ["child"]
4224
+ * }
4171
4225
  * ]
4172
4226
  * }
4173
4227
  * ```
@@ -4428,6 +4482,12 @@ export interface PathsDictionary {
4428
4482
  * { "entity_id": "456", "_tags": ["primary"] },
4429
4483
  * { "entity_id": "789", "_tags": ["secondary"] },
4430
4484
  * ]
4485
+ * },
4486
+ * "addresses": {
4487
+ * "$relation_ref": [
4488
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4489
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4490
+ * ]
4431
4491
  * }
4432
4492
  * }
4433
4493
  * ```
@@ -4451,6 +4511,20 @@ export interface PathsDictionary {
4451
4511
  * "name": "child 2",
4452
4512
  * "_tags": ["child"]
4453
4513
  * }
4514
+ * ],
4515
+ * "addresses": [
4516
+ * {
4517
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4518
+ * "_id": "123",
4519
+ * "address": "address 1",
4520
+ * "_tags": ["child"]
4521
+ * },
4522
+ * {
4523
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4524
+ * "_id": "234",
4525
+ * "address": "address 2",
4526
+ * "_tags": ["child"]
4527
+ * }
4454
4528
  * ]
4455
4529
  * }
4456
4530
  * ```
@@ -4541,6 +4615,12 @@ export interface PathsDictionary {
4541
4615
  * { "entity_id": "456", "_tags": ["primary"] },
4542
4616
  * { "entity_id": "789", "_tags": ["secondary"] },
4543
4617
  * ]
4618
+ * },
4619
+ * "addresses": {
4620
+ * "$relation_ref": [
4621
+ * { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4622
+ * { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4623
+ * ]
4544
4624
  * }
4545
4625
  * }
4546
4626
  * ```
@@ -4564,6 +4644,20 @@ export interface PathsDictionary {
4564
4644
  * "name": "child 2",
4565
4645
  * "_tags": ["child"]
4566
4646
  * }
4647
+ * ],
4648
+ * "addresses": [
4649
+ * {
4650
+ * "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
4651
+ * "_id": "123",
4652
+ * "address": "address 1",
4653
+ * "_tags": ["child"]
4654
+ * },
4655
+ * {
4656
+ * "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
4657
+ * "_id": "234",
4658
+ * "address": "address 2",
4659
+ * "_tags": ["child"]
4660
+ * }
4567
4661
  * ]
4568
4662
  * }
4569
4663
  * ```
package/dist/openapi.json CHANGED
@@ -274,7 +274,7 @@
274
274
  "post": {
275
275
  "operationId": "searchEntities",
276
276
  "summary": "searchEntities",
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}\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",
278
278
  "tags": [
279
279
  "Entities"
280
280
  ],
@@ -489,7 +489,7 @@
489
489
  "get": {
490
490
  "operationId": "getEntity",
491
491
  "summary": "getEntity",
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}\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",
493
493
  "tags": [
494
494
  "Entities"
495
495
  ],
@@ -515,7 +515,7 @@
515
515
  {
516
516
  "in": "query",
517
517
  "name": "hydrate",
518
- "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.",
519
519
  "schema": {
520
520
  "default": false,
521
521
  "type": "boolean"
@@ -2921,6 +2921,23 @@
2921
2921
  "enum": [
2922
2922
  "default"
2923
2923
  ]
2924
+ },
2925
+ "search_params": {
2926
+ "type": "object",
2927
+ "additionalProperties": {
2928
+ "type": "string"
2929
+ }
2930
+ },
2931
+ "table_menu_options": {
2932
+ "type": "object",
2933
+ "properties": {
2934
+ "icon": {
2935
+ "type": "string"
2936
+ },
2937
+ "label": {
2938
+ "type": "string"
2939
+ }
2940
+ }
2924
2941
  }
2925
2942
  }
2926
2943
  },
@@ -2932,6 +2949,23 @@
2932
2949
  "enum": [
2933
2950
  "default"
2934
2951
  ]
2952
+ },
2953
+ "search_params": {
2954
+ "type": "object",
2955
+ "additionalProperties": {
2956
+ "type": "string"
2957
+ }
2958
+ },
2959
+ "table_menu_options": {
2960
+ "type": "object",
2961
+ "properties": {
2962
+ "icon": {
2963
+ "type": "string"
2964
+ },
2965
+ "label": {
2966
+ "type": "string"
2967
+ }
2968
+ }
2935
2969
  }
2936
2970
  }
2937
2971
  },
@@ -3185,7 +3219,7 @@
3185
3219
  },
3186
3220
  "hydrate": {
3187
3221
  "type": "boolean",
3188
- "description": "When true, enables entity hydration to resolve nested $relation references in-place.",
3222
+ "description": "When true, enables entity hydration to resolve nested $relation & $relation_ref references in-place.",
3189
3223
  "default": false
3190
3224
  },
3191
3225
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-client",
3
- "version": "4.0.5",
3
+ "version": "4.1.2",
4
4
  "description": "JavaScript client library for the epilot Core Entity API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -72,4 +72,4 @@
72
72
  "webpack": "^5.18.0",
73
73
  "webpack-cli": "^4.4.0"
74
74
  }
75
- }
75
+ }