@epilot/entity-client 4.24.0 → 4.25.0-alpha.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.json CHANGED
@@ -356,7 +356,7 @@
356
356
  "post": {
357
357
  "operationId": "searchEntities",
358
358
  "summary": "searchEntities",
359
- "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",
359
+ "description": "Search for entities. Supports ordering and pagination. [Lucene query syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-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",
360
360
  "tags": [
361
361
  "Entities"
362
362
  ],
@@ -388,6 +388,42 @@
388
388
  }
389
389
  }
390
390
  },
391
+ "/v1/entity:list": {
392
+ "post": {
393
+ "operationId": "listEntities",
394
+ "summary": "listEntities",
395
+ "description": "List entities that meet the specified conditions.\n\nSupports the same options as entity search but utilizes filtering using a subset of [Elastic Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) and does not perform scoring.\n",
396
+ "tags": [
397
+ "Entities"
398
+ ],
399
+ "requestBody": {
400
+ "content": {
401
+ "application/json": {
402
+ "schema": {
403
+ "$ref": "#/components/schemas/EntityListParams"
404
+ }
405
+ }
406
+ }
407
+ },
408
+ "responses": {
409
+ "200": {
410
+ "description": "Success",
411
+ "content": {
412
+ "application/json": {
413
+ "schema": {
414
+ "$ref": "#/components/schemas/EntitySearchResults"
415
+ }
416
+ },
417
+ "text/csv": {
418
+ "schema": {
419
+ "type": "string"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ },
391
427
  "/v1/entity/{slug}": {
392
428
  "post": {
393
429
  "operationId": "createEntity",
@@ -546,6 +582,7 @@
546
582
  "application/json": {
547
583
  "schema": {
548
584
  "type": "object",
585
+ "additionalProperties": false,
549
586
  "properties": {
550
587
  "unique_key": {
551
588
  "type": "array",
@@ -1473,6 +1510,7 @@
1473
1510
  "application/json": {
1474
1511
  "schema": {
1475
1512
  "type": "object",
1513
+ "additionalProperties": false,
1476
1514
  "properties": {
1477
1515
  "_tags": {
1478
1516
  "type": "array",
@@ -1780,7 +1818,7 @@
1780
1818
  "content": {
1781
1819
  "application/json": {
1782
1820
  "schema": {
1783
- "$ref": "#/components/schemas/SavedView"
1821
+ "$ref": "#/components/schemas/SavedViewItem"
1784
1822
  }
1785
1823
  }
1786
1824
  }
@@ -4693,6 +4731,87 @@
4693
4731
  },
4694
4732
  "additionalProperties": true
4695
4733
  },
4734
+ "HydratedEntity": {
4735
+ "type": "object",
4736
+ "description": "Entity with relation data resolved into the attribute values",
4737
+ "properties": {
4738
+ "_relations": {
4739
+ "type": "array",
4740
+ "items": {
4741
+ "type": "object",
4742
+ "properties": {
4743
+ "entity_id": {
4744
+ "$ref": "#/components/schemas/EntityId"
4745
+ }
4746
+ },
4747
+ "required": [
4748
+ "entity_id"
4749
+ ]
4750
+ }
4751
+ }
4752
+ },
4753
+ "additionalProperties": true,
4754
+ "required": [
4755
+ "_relations"
4756
+ ],
4757
+ "example": {
4758
+ "_relations": [
4759
+ {
4760
+ "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
4761
+ }
4762
+ ],
4763
+ "status": "active",
4764
+ "customer_number": "abc123",
4765
+ "email": [
4766
+ {
4767
+ "label": "work",
4768
+ "email": "user@example.com"
4769
+ }
4770
+ ],
4771
+ "phone": [
4772
+ {
4773
+ "label": "work",
4774
+ "phone": "+49123456789"
4775
+ }
4776
+ ],
4777
+ "first_name": "First Name",
4778
+ "middle_name": "Middle Name",
4779
+ "last_name": "Last Name",
4780
+ "date_of_birth": "2019-08-24",
4781
+ "title": "Mr.",
4782
+ "account": [
4783
+ {
4784
+ "status": "active",
4785
+ "name": "Company name",
4786
+ "company_email": [
4787
+ {
4788
+ "label": "Company email",
4789
+ "email": "company@example.com"
4790
+ }
4791
+ ],
4792
+ "company_phone": [
4793
+ {
4794
+ "label": "Support phone",
4795
+ "phone": "+49123456789"
4796
+ }
4797
+ ],
4798
+ "company_website": "https://example.com",
4799
+ "tax_id": "DE123456789",
4800
+ "tax_exemption": "2019-08-24",
4801
+ "contacts": {
4802
+ "$relation": [
4803
+ {
4804
+ "_tags": [
4805
+ "CEO"
4806
+ ],
4807
+ "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
4808
+ }
4809
+ ]
4810
+ }
4811
+ }
4812
+ ]
4813
+ }
4814
+ },
4696
4815
  "EntityItem": {
4697
4816
  "allOf": [
4698
4817
  {
@@ -4843,6 +4962,7 @@
4843
4962
  },
4844
4963
  "RelationItem": {
4845
4964
  "type": "object",
4965
+ "additionalProperties": false,
4846
4966
  "properties": {
4847
4967
  "entity_id": {
4848
4968
  "$ref": "#/components/schemas/EntityId"
@@ -4867,13 +4987,228 @@
4867
4987
  ]
4868
4988
  },
4869
4989
  "EntitySearchParams": {
4870
- "type": "object",
4871
- "properties": {
4872
- "q": {
4873
- "description": "Lucene queries supported with ElasticSearch",
4990
+ "allOf": [
4991
+ {
4992
+ "type": "object",
4993
+ "properties": {
4994
+ "q": {
4995
+ "description": "Lucene [queries supported with ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)",
4996
+ "type": "string",
4997
+ "example": "_schema:contact AND status:active"
4998
+ },
4999
+ "include_scores": {
5000
+ "type": "boolean",
5001
+ "default": false,
5002
+ "description": "Adds a `_score` number field to results that can be used to rank by match score"
5003
+ }
5004
+ },
5005
+ "required": [
5006
+ "q"
5007
+ ]
5008
+ },
5009
+ {
5010
+ "$ref": "#/components/schemas/EntitySearchOptions"
5011
+ }
5012
+ ]
5013
+ },
5014
+ "EntityListParams": {
5015
+ "allOf": [
5016
+ {
5017
+ "type": "object",
5018
+ "properties": {
5019
+ "filter": {
5020
+ "$ref": "#/components/schemas/SearchFilter"
5021
+ },
5022
+ "allow_targeting_all_schemas": {
5023
+ "type": "boolean",
5024
+ "default": false,
5025
+ "description": "Allow running the listing without any schema filter. This is disabled by default to prevent security and performance issues if done by an accident."
5026
+ }
5027
+ },
5028
+ "required": [
5029
+ "filter"
5030
+ ]
5031
+ },
5032
+ {
5033
+ "$ref": "#/components/schemas/EntitySearchOptions"
5034
+ }
5035
+ ]
5036
+ },
5037
+ "SearchFilter": {
5038
+ "type": "array",
5039
+ "description": "A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.",
5040
+ "items": {
5041
+ "type": "object",
5042
+ "minProperties": 1,
5043
+ "maxProperties": 1,
5044
+ "properties": {
5045
+ "term": {
5046
+ "description": "Returns documents that contain an exact term in a provided field.\n\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.\n\nYou likely DO NOT want to use this filter on text fields and want to target its .keyword instead.\n",
5047
+ "externalDocs": {
5048
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html"
5049
+ },
5050
+ "type": "object",
5051
+ "minProperties": 1,
5052
+ "maxProperties": 1,
5053
+ "additionalProperties": {
5054
+ "$ref": "#/components/schemas/SearchFilterValue"
5055
+ },
5056
+ "example": {
5057
+ "_schema": "contact"
5058
+ }
5059
+ },
5060
+ "terms": {
5061
+ "description": "Returns documents that contain one of the exact terms in a provided field. See term filter for more info.",
5062
+ "externalDocs": {
5063
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html"
5064
+ },
5065
+ "type": "object",
5066
+ "minProperties": 1,
5067
+ "maxProperties": 1,
5068
+ "additionalProperties": {
5069
+ "type": "array",
5070
+ "items": {
5071
+ "$ref": "#/components/schemas/SearchFilterValue"
5072
+ }
5073
+ },
5074
+ "example": {
5075
+ "status": [
5076
+ "active"
5077
+ ]
5078
+ }
5079
+ },
5080
+ "ids": {
5081
+ "description": "Returns documents based on their IDs.",
5082
+ "externalDocs": {
5083
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html"
5084
+ },
5085
+ "type": "object",
5086
+ "properties": {
5087
+ "values": {
5088
+ "type": "array",
5089
+ "items": {
5090
+ "type": "string"
5091
+ }
5092
+ }
5093
+ },
5094
+ "example": {
5095
+ "values": [
5096
+ "550e8400-e29b-41d4-a716-446655440000"
5097
+ ]
5098
+ }
5099
+ },
5100
+ "range": {
5101
+ "description": "Returns documents with fields that have terms within a certain range.",
5102
+ "externalDocs": {
5103
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html"
5104
+ },
5105
+ "type": "object",
5106
+ "minProperties": 1,
5107
+ "maxProperties": 1,
5108
+ "additionalProperties": {
5109
+ "type": "object",
5110
+ "properties": {
5111
+ "gt": {
5112
+ "$ref": "#/components/schemas/SearchFilterValue"
5113
+ },
5114
+ "gte": {
5115
+ "$ref": "#/components/schemas/SearchFilterValue"
5116
+ },
5117
+ "lt": {
5118
+ "$ref": "#/components/schemas/SearchFilterValue"
5119
+ },
5120
+ "lte": {
5121
+ "$ref": "#/components/schemas/SearchFilterValue"
5122
+ },
5123
+ "format": {
5124
+ "type": "string",
5125
+ "description": "The date format used to parse date values."
5126
+ },
5127
+ "relation": {
5128
+ "type": "string",
5129
+ "enum": [
5130
+ "INTERSECTS",
5131
+ "CONTAINS",
5132
+ "WITHIN"
5133
+ ],
5134
+ "description": "Indicates how the range query matches values for range fields."
5135
+ },
5136
+ "time_zone": {
5137
+ "type": "string",
5138
+ "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC."
5139
+ }
5140
+ }
5141
+ },
5142
+ "example": {
5143
+ "_created_at": {
5144
+ "gte": "2021-01-01T00:00:00.000Z",
5145
+ "lte": "2021-01-31T23:59:59.999Z"
5146
+ }
5147
+ }
5148
+ },
5149
+ "exists": {
5150
+ "description": "Returns documents that have a value in the specified field.",
5151
+ "externalDocs": {
5152
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html"
5153
+ },
5154
+ "type": "object",
5155
+ "properties": {
5156
+ "field": {
5157
+ "type": "string"
5158
+ }
5159
+ },
5160
+ "required": [
5161
+ "field"
5162
+ ],
5163
+ "example": {
5164
+ "field": "_tags"
5165
+ }
5166
+ },
5167
+ "$and": {
5168
+ "$ref": "#/components/schemas/SearchFilter"
5169
+ },
5170
+ "$or": {
5171
+ "$ref": "#/components/schemas/SearchFilter"
5172
+ },
5173
+ "$not": {
5174
+ "$ref": "#/components/schemas/SearchFilter"
5175
+ }
5176
+ }
5177
+ },
5178
+ "example": [
5179
+ {
5180
+ "term": {
5181
+ "_schema": "contact"
5182
+ }
5183
+ },
5184
+ {
5185
+ "terms": {
5186
+ "status": [
5187
+ "active"
5188
+ ]
5189
+ }
5190
+ }
5191
+ ]
5192
+ },
5193
+ "SearchFilterValue": {
5194
+ "description": "A filter field value.",
5195
+ "oneOf": [
5196
+ {
4874
5197
  "type": "string",
4875
- "example": "_schema:contact AND status:active"
5198
+ "nullable": true
5199
+ },
5200
+ {
5201
+ "type": "number"
4876
5202
  },
5203
+ {
5204
+ "type": "boolean"
5205
+ }
5206
+ ]
5207
+ },
5208
+ "EntitySearchOptions": {
5209
+ "type": "object",
5210
+ "additionalProperties": false,
5211
+ "properties": {
4877
5212
  "sort": {
4878
5213
  "type": "string",
4879
5214
  "example": "_created_at:desc"
@@ -4897,11 +5232,6 @@
4897
5232
  "fields": {
4898
5233
  "$ref": "#/components/schemas/FieldsParam"
4899
5234
  },
4900
- "include_scores": {
4901
- "type": "boolean",
4902
- "default": false,
4903
- "description": "Adds a `_score` number field to results that can be used to rank by match score"
4904
- },
4905
5235
  "aggs": {
4906
5236
  "type": "object",
4907
5237
  "description": "Aggregation supported by ElasticSearch allows summarizing data as metrics, statistics, or other analytics.",
@@ -4913,10 +5243,7 @@
4913
5243
  }
4914
5244
  }
4915
5245
  }
4916
- },
4917
- "required": [
4918
- "q"
4919
- ]
5246
+ }
4920
5247
  },
4921
5248
  "FieldsParam": {
4922
5249
  "type": "array",
@@ -4935,6 +5262,7 @@
4935
5262
  },
4936
5263
  "EntityImportParams": {
4937
5264
  "type": "object",
5265
+ "additionalProperties": false,
4938
5266
  "properties": {
4939
5267
  "S3Reference": {
4940
5268
  "type": "object",
@@ -5099,6 +5427,7 @@
5099
5427
  },
5100
5428
  "Activity": {
5101
5429
  "type": "object",
5430
+ "additionalProperties": false,
5102
5431
  "properties": {
5103
5432
  "type": {
5104
5433
  "type": "string",
@@ -6384,9 +6713,6 @@
6384
6713
  }
6385
6714
  },
6386
6715
  "servers": [
6387
- {
6388
- "url": "https://entity.sls.epilot.io"
6389
- },
6390
6716
  {
6391
6717
  "url": "https://entity.sls.epilot.io"
6392
6718
  }
@@ -0,0 +1,3 @@
1
+ import { Client } from './openapi';
2
+ export declare const getClient: () => Client;
3
+ export declare const createClient: () => Client;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.createClient = exports.getClient = void 0;
18
+ var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
19
+ var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
20
+ var definition_1 = __importDefault(require("./definition"));
21
+ var client;
22
+ var getClient = function () {
23
+ if (!client) {
24
+ client = (0, exports.createClient)();
25
+ }
26
+ return client;
27
+ };
28
+ exports.getClient = getClient;
29
+ var createClient = function () {
30
+ var _a;
31
+ var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
32
+ var apiClient = api.initSync();
33
+ apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
34
+ return apiClient;
35
+ };
36
+ exports.createClient = createClient;
37
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1,3 @@
1
+ import type { Document } from 'openapi-client-axios';
2
+ declare const _default: Document;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={914:function(e,t,a){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(a(240));t.default=n.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/entity/schemas":{"get":{"operationId":"listSchemas","parameters":[{"in":"query","name":"unpublished"}]}},"/v1/entity/schemas/{slug}":{"get":{"operationId":"getSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"in":"query","name":"id"}]},"put":{"operationId":"putSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"in":"query","name":"draft"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"}]}},"/v1/entity/schemas/{slug}/versions":{"get":{"operationId":"getSchemaVersions","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"in":"query","name":"versions_from"},{"in":"query","name":"versions_size"},{"in":"query","name":"drafts_from"},{"in":"query","name":"drafts_size"},{"in":"query","name":"fields","required":false,"style":"form","explode":false}]}},"/v1/entity/schemas/blueprints":{"get":{"operationId":"listSchemaBlueprints"}},"/v1/entity/schemas/{slug}/taxonomy/{taxonomySlug}":{"get":{"operationId":"listTaxonomyClassificationsForSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"in":"query","name":"query"},{"in":"query","name":"size"}]}},"/v1/entity:search":{"post":{"operationId":"searchEntities","requestBody":{"content":{"application/json":{}}}}},"/v1/entity/{slug}":{"post":{"operationId":"createEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/{slug}:validate":{"post":{"operationId":"validateEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathPriceParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/{slug}:upsert":{"patch":{"operationId":"upsertEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/DryRunQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/{slug}/{id}":{"get":{"operationId":"getEntityV2","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"in":"query","name":"fields","style":"form","explode":false}]}},"/v1/entity/{slug}/{id}":{"get":{"operationId":"getEntity","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"}]},"put":{"operationId":"updateEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}}},"patch":{"operationId":"patchEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/DryRunQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}},"required":true}},"delete":{"operationId":"deleteEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}]}},"/v1/entity:autocomplete":{"get":{"operationId":"autocomplete","parameters":[{"name":"input","in":"query"},{"name":"attribute","in":"query","required":true},{"name":"slug","in":"query"},{"name":"size","in":"query"}]}},"/v1/entity/activity":{"post":{"operationId":"createActivity","parameters":[{"in":"query","name":"entities","style":"form","explode":false}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/activity/{id}":{"get":{"operationId":"getActivity","parameters":[{"$ref":"#/components/parameters/ActivityIdPathParam"},{"in":"query","name":"operations_size"},{"in":"query","name":"operations_from"}]}},"/v1/entity/activity/{id}:attach":{"post":{"operationId":"attachActivity","parameters":[{"$ref":"#/components/parameters/ActivityIdPathParam"},{"in":"query","name":"entities","style":"form","explode":false}]}},"/v1/entity/{slug}/{id}/activity":{"get":{"operationId":"getEntityActivityFeed","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"in":"query","name":"after"},{"in":"query","name":"before"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size"},{"in":"query","name":"type"},{"in":"query","name":"include_relations"}]}},"/v1/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelations","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"$ref":"#/components/parameters/IncludeReverseQueryParam"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size","required":false},{"$ref":"#/components/parameters/IncludeSchemasQueryParam"},{"$ref":"#/components/parameters/ExcludeSchemasQueryParam"}]},"post":{"operationId":"addRelations","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelationsV2","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"in":"query","name":"query"},{"$ref":"#/components/parameters/IncludeReverseQueryParam"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size"},{"in":"query","name":"fields"}]}},"/v3/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelationsV3","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"$ref":"#/components/parameters/IncludeReverseDeprecatedQueryParam"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size","required":false},{"$ref":"#/components/parameters/IncludeSchemasQueryParam"},{"$ref":"#/components/parameters/ExcludeSchemasQueryParam"},{"$ref":"#/components/parameters/EntityRelationsModeQueryParam"}]}},"/v2/entity/{slug}/{id}/relations/count":{"get":{"operationId":"getRelatedEntitiesCount","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ExcludeSchemasQueryParam"}]}},"/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}":{"put":{"operationId":"updateRelation","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"in":"path","name":"attribute","required":true},{"in":"path","name":"entity_id","required":true},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteRelation","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"in":"path","name":"attribute","required":true},{"in":"path","name":"entity_id","required":true},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}]}},"/v1/entity:export":{"post":{"operationId":"exportEntities","parameters":[{"in":"query","name":"job_id"},{"in":"query","name":"is_template"},{"in":"query","name":"language"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity:import":{"post":{"operationId":"importEntities","parameters":[{"in":"query","name":"job_id"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/views":{"get":{"operationId":"listSavedViews","parameters":[{"in":"query","name":"slug","required":false},{"in":"query","name":"sort","required":false},{"in":"query","name":"from","required":false},{"in":"query","name":"size","required":false},{"in":"query","name":"fields","required":false}]}},"/v1/entity/view":{"post":{"operationId":"createSavedView","requestBody":{"content":{"application/json":{}}}}},"/v1/entity/view/{id}":{"get":{"operationId":"getSavedView","parameters":[{"$ref":"#/components/parameters/SavedViewIdPathParam"}]},"put":{"operationId":"updateSavedView","parameters":[{"$ref":"#/components/parameters/SavedViewIdPathParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSavedView","parameters":[{"$ref":"#/components/parameters/SavedViewIdPathParam"}]}},"/v1/entity/views/favorites":{"get":{"operationId":"listFavoriteViewsForUser"}},"/v1/entity/listTaxonomies":{"get":{"deprecated":true,"operationId":"listTaxonomies","parameters":[{"in":"query","name":"include_disabled"}]}},"/v1/entity/taxonomies":{"get":{"operationId":"listTaxonomies","parameters":[{"in":"query","name":"include_disabled"}]},"post":{"operationId":"createTaxonomy","requestBody":{"content":{"application/json":{}}}}},"/v1/entity/taxonomies/{taxonomySlug}":{"get":{"operationId":"getTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}]},"put":{"operationId":"updateTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"in":"query","name":"permanent"}]}},"/v1/entity/taxonomies/{taxonomySlug}:autocomplete":{"get":{"operationId":"taxonomyAutocomplete","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"in":"query","name":"query"},{"in":"query","name":"size"}]}},"/v1/entity/taxonomies/classifications:search":{"post":{"operationId":"taxonomiesClassificationsSearch","parameters":[{"$ref":"#/components/parameters/TaxonomySlugQueryParamOptional"},{"in":"query","name":"query"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/taxonomies/{taxonomySlug}/classifications":{"post":{"operationId":"updateClassificationsForTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/taxonomies/{taxonomySlug}/classifications":{"post":{"operationId":"createTaxonomyClassification","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/taxonomies/{taxonomySlug}/classifications/{classificationSlug}":{"put":{"operationId":"updateTaxonomyClassification","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"$ref":"#/components/parameters/TaxonomyClassificationSlugPathParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteTaxonomyClassification","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"$ref":"#/components/parameters/TaxonomyClassificationSlugPathParam"},{"in":"query","name":"permanent"}]}},"/v1/entity/schemas/attributes/{composite_id}":{"get":{"operationId":"getSchemaAttribute","parameters":[{"name":"composite_id","in":"path","required":true}]},"put":{"operationId":"putSchemaAttribute","parameters":[{"name":"composite_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSchemaAttribute","parameters":[{"name":"composite_id","in":"path","required":true}]}},"/v1/entity/schemas/capabilities/{composite_id}":{"get":{"operationId":"getSchemaCapability","parameters":[{"name":"composite_id","in":"path","required":true}]},"put":{"operationId":"putSchemaCapability","parameters":[{"name":"composite_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSchemaCapability","parameters":[{"name":"composite_id","in":"path","required":true}]}}},"components":{"parameters":{"EntityIdPathParam":{"name":"id","in":"path","required":true},"EntitySlugPathParam":{"name":"slug","in":"path","required":true},"EntitySlugPathPriceParam":{"name":"slug","in":"path","required":true},"TaxonomySlugPathParam":{"name":"taxonomySlug","in":"path","required":true},"TaxonomySlugQueryParamOptional":{"name":"taxonomySlug","in":"query"},"TaxonomyClassificationSlugPathParam":{"name":"classificationSlug","in":"path","required":true},"SavedViewIdPathParam":{"name":"id","in":"path","required":true},"AsyncOperationQueryParam":{"name":"async","in":"query","required":false},"HydrateEntitiesQueryParam":{"name":"hydrate","in":"query"},"ActivityIdQueryParam":{"name":"activity_id","in":"query","required":false},"ActivityIdPathParam":{"name":"id","in":"path","required":true},"FromPageQueryParam":{"name":"from","in":"query"},"IncludeReverseDeprecatedQueryParam":{"name":"include_reverse","in":"query","deprecated":true},"IncludeReverseQueryParam":{"name":"include_reverse","in":"query"},"IncludeSchemasQueryParam":{"name":"include_schemas","in":"query","required":false,"style":"form","explode":false},"ExcludeSchemasQueryParam":{"name":"exclude_schemas","in":"query","required":false,"style":"form","explode":false},"EntityRelationsModeQueryParam":{"name":"mode","in":"query","required":false},"DryRunQueryParam":{"name":"dry_run","in":"query","required":false}}},"servers":[{"url":"https://entity.sls.epilot.io"}]}')}},t={},a=function a(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,a),o.exports}(914),r=exports;for(var n in a)r[n]=a[n];a.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
18
+ __exportStar(require("./schema-model"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -2677,6 +2677,10 @@ declare namespace Components {
2677
2677
  * _schema:contact AND status:active
2678
2678
  */
2679
2679
  q: string;
2680
+ /**
2681
+ * Filter queries supported with ElasticSearch
2682
+ */
2683
+ filter?: any[];
2680
2684
  /**
2681
2685
  * example:
2682
2686
  * _created_at:desc
@@ -3077,6 +3081,73 @@ declare namespace Components {
3077
3081
  hits?: number;
3078
3082
  relations?: GetRelationsResp;
3079
3083
  }
3084
+ /**
3085
+ * Entity with relation data resolved into the attribute values
3086
+ * example:
3087
+ * {
3088
+ * "_relations": [
3089
+ * {
3090
+ * "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
3091
+ * }
3092
+ * ],
3093
+ * "status": "active",
3094
+ * "customer_number": "abc123",
3095
+ * "email": [
3096
+ * {
3097
+ * "label": "work",
3098
+ * "email": "user@example.com"
3099
+ * }
3100
+ * ],
3101
+ * "phone": [
3102
+ * {
3103
+ * "label": "work",
3104
+ * "phone": "+49123456789"
3105
+ * }
3106
+ * ],
3107
+ * "first_name": "First Name",
3108
+ * "middle_name": "Middle Name",
3109
+ * "last_name": "Last Name",
3110
+ * "date_of_birth": "2019-08-24",
3111
+ * "title": "Mr.",
3112
+ * "account": [
3113
+ * {
3114
+ * "status": "active",
3115
+ * "name": "Company name",
3116
+ * "company_email": [
3117
+ * {
3118
+ * "label": "Company email",
3119
+ * "email": "company@example.com"
3120
+ * }
3121
+ * ],
3122
+ * "company_phone": [
3123
+ * {
3124
+ * "label": "Support phone",
3125
+ * "phone": "+49123456789"
3126
+ * }
3127
+ * ],
3128
+ * "company_website": "https://example.com",
3129
+ * "tax_id": "DE123456789",
3130
+ * "tax_exemption": "2019-08-24",
3131
+ * "contacts": {
3132
+ * "$relation": [
3133
+ * {
3134
+ * "_tags": [
3135
+ * "CEO"
3136
+ * ],
3137
+ * "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
3138
+ * }
3139
+ * ]
3140
+ * }
3141
+ * }
3142
+ * ]
3143
+ * }
3144
+ */
3145
+ export interface HydratedEntity {
3146
+ [name: string]: any;
3147
+ _relations: {
3148
+ entity_id: EntityId /* uuid */;
3149
+ }[];
3150
+ }
3080
3151
  /**
3081
3152
  * No UI representation
3082
3153
  */