@epilot/entity-client 4.24.0 → 4.25.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/definition.js +1 -1
- package/dist/openapi-runtime.json +10 -0
- package/dist/openapi.d.ts +388 -8
- package/dist/openapi.json +358 -20
- package/package/dist/client.d.ts +3 -0
- package/package/dist/client.js +37 -0
- package/package/dist/definition.d.ts +3 -0
- package/package/dist/definition.js +1 -0
- package/package/dist/index.js +19 -0
- package/{src → package/dist}/openapi.d.ts +71 -0
- package/{src → package/dist}/openapi.json +85 -3
- package/package/dist/schema-model.d.ts +11 -0
- package/package/dist/schema-model.js +13 -0
- package/package.json +1 -1
- package/dist/client.js.map +0 -1
- package/dist/definition.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/schema-model.js.map +0 -1
- package/jest.config.ts +0 -16
- package/package-lock.json +0 -17779
- package/src/client.test.ts +0 -25
- package/src/client.ts +0 -26
- package/src/definition.ts +0 -5
- package/src/schema-model.ts +0 -13
- package/webpack.config.js +0 -31
- /package/{src/index.ts → package/dist/index.d.ts} +0 -0
- /package/{src → package/dist}/openapi-runtime.json +0 -0
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",
|
|
@@ -1679,7 +1717,7 @@
|
|
|
1679
1717
|
"required": false,
|
|
1680
1718
|
"schema": {
|
|
1681
1719
|
"type": "integer",
|
|
1682
|
-
"default":
|
|
1720
|
+
"default": 80,
|
|
1683
1721
|
"minimum": 1,
|
|
1684
1722
|
"maximum": 250
|
|
1685
1723
|
}
|
|
@@ -1780,7 +1818,7 @@
|
|
|
1780
1818
|
"content": {
|
|
1781
1819
|
"application/json": {
|
|
1782
1820
|
"schema": {
|
|
1783
|
-
"$ref": "#/components/schemas/
|
|
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
|
{
|
|
@@ -4867,13 +4986,241 @@
|
|
|
4867
4986
|
]
|
|
4868
4987
|
},
|
|
4869
4988
|
"EntitySearchParams": {
|
|
4870
|
-
"
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
"
|
|
4989
|
+
"allOf": [
|
|
4990
|
+
{
|
|
4991
|
+
"type": "object",
|
|
4992
|
+
"properties": {
|
|
4993
|
+
"q": {
|
|
4994
|
+
"description": "Lucene [queries supported with ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)",
|
|
4995
|
+
"type": "string",
|
|
4996
|
+
"example": "_schema:contact AND status:active"
|
|
4997
|
+
},
|
|
4998
|
+
"include_scores": {
|
|
4999
|
+
"type": "boolean",
|
|
5000
|
+
"default": false,
|
|
5001
|
+
"description": "Adds a `_score` number field to results that can be used to rank by match score"
|
|
5002
|
+
},
|
|
5003
|
+
"sort": {},
|
|
5004
|
+
"from": {},
|
|
5005
|
+
"size": {},
|
|
5006
|
+
"hydrate": {},
|
|
5007
|
+
"fields": {},
|
|
5008
|
+
"aggs": {}
|
|
5009
|
+
},
|
|
5010
|
+
"additionalProperties": false,
|
|
5011
|
+
"required": [
|
|
5012
|
+
"q"
|
|
5013
|
+
]
|
|
5014
|
+
},
|
|
5015
|
+
{
|
|
5016
|
+
"$ref": "#/components/schemas/EntitySearchOptions"
|
|
5017
|
+
}
|
|
5018
|
+
]
|
|
5019
|
+
},
|
|
5020
|
+
"EntityListParams": {
|
|
5021
|
+
"allOf": [
|
|
5022
|
+
{
|
|
5023
|
+
"type": "object",
|
|
5024
|
+
"properties": {
|
|
5025
|
+
"filter": {
|
|
5026
|
+
"$ref": "#/components/schemas/SearchFilter"
|
|
5027
|
+
},
|
|
5028
|
+
"allow_targeting_all_schemas": {
|
|
5029
|
+
"type": "boolean",
|
|
5030
|
+
"default": false,
|
|
5031
|
+
"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."
|
|
5032
|
+
},
|
|
5033
|
+
"sort": {},
|
|
5034
|
+
"from": {},
|
|
5035
|
+
"size": {},
|
|
5036
|
+
"hydrate": {},
|
|
5037
|
+
"fields": {},
|
|
5038
|
+
"aggs": {}
|
|
5039
|
+
},
|
|
5040
|
+
"additionalProperties": false,
|
|
5041
|
+
"required": [
|
|
5042
|
+
"filter"
|
|
5043
|
+
]
|
|
5044
|
+
},
|
|
5045
|
+
{
|
|
5046
|
+
"$ref": "#/components/schemas/EntitySearchOptions"
|
|
5047
|
+
}
|
|
5048
|
+
]
|
|
5049
|
+
},
|
|
5050
|
+
"SearchFilter": {
|
|
5051
|
+
"type": "array",
|
|
5052
|
+
"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.",
|
|
5053
|
+
"items": {
|
|
5054
|
+
"type": "object",
|
|
5055
|
+
"minProperties": 1,
|
|
5056
|
+
"maxProperties": 1,
|
|
5057
|
+
"properties": {
|
|
5058
|
+
"term": {
|
|
5059
|
+
"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",
|
|
5060
|
+
"externalDocs": {
|
|
5061
|
+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html"
|
|
5062
|
+
},
|
|
5063
|
+
"type": "object",
|
|
5064
|
+
"minProperties": 1,
|
|
5065
|
+
"maxProperties": 1,
|
|
5066
|
+
"additionalProperties": {
|
|
5067
|
+
"$ref": "#/components/schemas/SearchFilterValue"
|
|
5068
|
+
},
|
|
5069
|
+
"example": {
|
|
5070
|
+
"_schema": "contact"
|
|
5071
|
+
}
|
|
5072
|
+
},
|
|
5073
|
+
"terms": {
|
|
5074
|
+
"description": "Returns documents that contain one of the exact terms in a provided field. See term filter for more info.",
|
|
5075
|
+
"externalDocs": {
|
|
5076
|
+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html"
|
|
5077
|
+
},
|
|
5078
|
+
"type": "object",
|
|
5079
|
+
"minProperties": 1,
|
|
5080
|
+
"maxProperties": 1,
|
|
5081
|
+
"additionalProperties": {
|
|
5082
|
+
"type": "array",
|
|
5083
|
+
"items": {
|
|
5084
|
+
"$ref": "#/components/schemas/SearchFilterValue"
|
|
5085
|
+
}
|
|
5086
|
+
},
|
|
5087
|
+
"example": {
|
|
5088
|
+
"status": [
|
|
5089
|
+
"active"
|
|
5090
|
+
]
|
|
5091
|
+
}
|
|
5092
|
+
},
|
|
5093
|
+
"ids": {
|
|
5094
|
+
"description": "Returns documents based on their IDs.",
|
|
5095
|
+
"externalDocs": {
|
|
5096
|
+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html"
|
|
5097
|
+
},
|
|
5098
|
+
"type": "object",
|
|
5099
|
+
"properties": {
|
|
5100
|
+
"values": {
|
|
5101
|
+
"type": "array",
|
|
5102
|
+
"items": {
|
|
5103
|
+
"type": "string"
|
|
5104
|
+
}
|
|
5105
|
+
}
|
|
5106
|
+
},
|
|
5107
|
+
"example": {
|
|
5108
|
+
"values": [
|
|
5109
|
+
"550e8400-e29b-41d4-a716-446655440000"
|
|
5110
|
+
]
|
|
5111
|
+
}
|
|
5112
|
+
},
|
|
5113
|
+
"range": {
|
|
5114
|
+
"description": "Returns documents with fields that have terms within a certain range.",
|
|
5115
|
+
"externalDocs": {
|
|
5116
|
+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html"
|
|
5117
|
+
},
|
|
5118
|
+
"type": "object",
|
|
5119
|
+
"minProperties": 1,
|
|
5120
|
+
"maxProperties": 1,
|
|
5121
|
+
"additionalProperties": {
|
|
5122
|
+
"type": "object",
|
|
5123
|
+
"properties": {
|
|
5124
|
+
"gt": {
|
|
5125
|
+
"$ref": "#/components/schemas/SearchFilterValue"
|
|
5126
|
+
},
|
|
5127
|
+
"gte": {
|
|
5128
|
+
"$ref": "#/components/schemas/SearchFilterValue"
|
|
5129
|
+
},
|
|
5130
|
+
"lt": {
|
|
5131
|
+
"$ref": "#/components/schemas/SearchFilterValue"
|
|
5132
|
+
},
|
|
5133
|
+
"lte": {
|
|
5134
|
+
"$ref": "#/components/schemas/SearchFilterValue"
|
|
5135
|
+
},
|
|
5136
|
+
"format": {
|
|
5137
|
+
"type": "string",
|
|
5138
|
+
"description": "The date format used to parse date values."
|
|
5139
|
+
},
|
|
5140
|
+
"relation": {
|
|
5141
|
+
"type": "string",
|
|
5142
|
+
"enum": [
|
|
5143
|
+
"INTERSECTS",
|
|
5144
|
+
"CONTAINS",
|
|
5145
|
+
"WITHIN"
|
|
5146
|
+
],
|
|
5147
|
+
"description": "Indicates how the range query matches values for range fields."
|
|
5148
|
+
},
|
|
5149
|
+
"time_zone": {
|
|
5150
|
+
"type": "string",
|
|
5151
|
+
"description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC."
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5154
|
+
},
|
|
5155
|
+
"example": {
|
|
5156
|
+
"_created_at": {
|
|
5157
|
+
"gte": "2021-01-01T00:00:00.000Z",
|
|
5158
|
+
"lte": "2021-01-31T23:59:59.999Z"
|
|
5159
|
+
}
|
|
5160
|
+
}
|
|
5161
|
+
},
|
|
5162
|
+
"exists": {
|
|
5163
|
+
"description": "Returns documents that have a value in the specified field.",
|
|
5164
|
+
"externalDocs": {
|
|
5165
|
+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html"
|
|
5166
|
+
},
|
|
5167
|
+
"type": "object",
|
|
5168
|
+
"properties": {
|
|
5169
|
+
"field": {
|
|
5170
|
+
"type": "string"
|
|
5171
|
+
}
|
|
5172
|
+
},
|
|
5173
|
+
"required": [
|
|
5174
|
+
"field"
|
|
5175
|
+
],
|
|
5176
|
+
"example": {
|
|
5177
|
+
"field": "_tags"
|
|
5178
|
+
}
|
|
5179
|
+
},
|
|
5180
|
+
"$and": {
|
|
5181
|
+
"$ref": "#/components/schemas/SearchFilter"
|
|
5182
|
+
},
|
|
5183
|
+
"$or": {
|
|
5184
|
+
"$ref": "#/components/schemas/SearchFilter"
|
|
5185
|
+
},
|
|
5186
|
+
"$not": {
|
|
5187
|
+
"$ref": "#/components/schemas/SearchFilter"
|
|
5188
|
+
}
|
|
5189
|
+
}
|
|
5190
|
+
},
|
|
5191
|
+
"example": [
|
|
5192
|
+
{
|
|
5193
|
+
"term": {
|
|
5194
|
+
"_schema": "contact"
|
|
5195
|
+
}
|
|
5196
|
+
},
|
|
5197
|
+
{
|
|
5198
|
+
"terms": {
|
|
5199
|
+
"status": [
|
|
5200
|
+
"active"
|
|
5201
|
+
]
|
|
5202
|
+
}
|
|
5203
|
+
}
|
|
5204
|
+
]
|
|
5205
|
+
},
|
|
5206
|
+
"SearchFilterValue": {
|
|
5207
|
+
"description": "A filter field value.",
|
|
5208
|
+
"oneOf": [
|
|
5209
|
+
{
|
|
4874
5210
|
"type": "string",
|
|
4875
|
-
"
|
|
5211
|
+
"nullable": true
|
|
5212
|
+
},
|
|
5213
|
+
{
|
|
5214
|
+
"type": "number"
|
|
4876
5215
|
},
|
|
5216
|
+
{
|
|
5217
|
+
"type": "boolean"
|
|
5218
|
+
}
|
|
5219
|
+
]
|
|
5220
|
+
},
|
|
5221
|
+
"EntitySearchOptions": {
|
|
5222
|
+
"type": "object",
|
|
5223
|
+
"properties": {
|
|
4877
5224
|
"sort": {
|
|
4878
5225
|
"type": "string",
|
|
4879
5226
|
"example": "_created_at:desc"
|
|
@@ -4897,11 +5244,6 @@
|
|
|
4897
5244
|
"fields": {
|
|
4898
5245
|
"$ref": "#/components/schemas/FieldsParam"
|
|
4899
5246
|
},
|
|
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
5247
|
"aggs": {
|
|
4906
5248
|
"type": "object",
|
|
4907
5249
|
"description": "Aggregation supported by ElasticSearch allows summarizing data as metrics, statistics, or other analytics.",
|
|
@@ -4913,10 +5255,7 @@
|
|
|
4913
5255
|
}
|
|
4914
5256
|
}
|
|
4915
5257
|
}
|
|
4916
|
-
}
|
|
4917
|
-
"required": [
|
|
4918
|
-
"q"
|
|
4919
|
-
]
|
|
5258
|
+
}
|
|
4920
5259
|
},
|
|
4921
5260
|
"FieldsParam": {
|
|
4922
5261
|
"type": "array",
|
|
@@ -4935,6 +5274,7 @@
|
|
|
4935
5274
|
},
|
|
4936
5275
|
"EntityImportParams": {
|
|
4937
5276
|
"type": "object",
|
|
5277
|
+
"additionalProperties": false,
|
|
4938
5278
|
"properties": {
|
|
4939
5279
|
"S3Reference": {
|
|
4940
5280
|
"type": "object",
|
|
@@ -5099,6 +5439,7 @@
|
|
|
5099
5439
|
},
|
|
5100
5440
|
"Activity": {
|
|
5101
5441
|
"type": "object",
|
|
5442
|
+
"additionalProperties": false,
|
|
5102
5443
|
"properties": {
|
|
5103
5444
|
"type": {
|
|
5104
5445
|
"type": "string",
|
|
@@ -6384,9 +6725,6 @@
|
|
|
6384
6725
|
}
|
|
6385
6726
|
},
|
|
6386
6727
|
"servers": [
|
|
6387
|
-
{
|
|
6388
|
-
"url": "https://entity.sls.epilot.io"
|
|
6389
|
-
},
|
|
6390
6728
|
{
|
|
6391
6729
|
"url": "https://entity.sls.epilot.io"
|
|
6392
6730
|
}
|
|
@@ -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 @@
|
|
|
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
|