@epilot/entity-client 4.23.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.
@@ -0,0 +1,11 @@
1
+ import { Components } from './openapi';
2
+ export declare enum RelationAffinityMode {
3
+ /**
4
+ * For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
5
+ * For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
6
+ */
7
+ WEAK = "weak",
8
+ STRONG = "strong"
9
+ }
10
+ export type Attribute = Components.Schemas.Attribute;
11
+ export type AttributeType = Attribute['type'];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RelationAffinityMode = void 0;
4
+ var RelationAffinityMode;
5
+ (function (RelationAffinityMode) {
6
+ /**
7
+ * For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
8
+ * For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
9
+ */
10
+ RelationAffinityMode["WEAK"] = "weak";
11
+ RelationAffinityMode["STRONG"] = "strong";
12
+ })(RelationAffinityMode = exports.RelationAffinityMode || (exports.RelationAffinityMode = {}));
13
+ //# sourceMappingURL=schema-model.js.map
@@ -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,4 @@
1
+ export * from './client';
2
+ export * from './schema-model';
3
+ export type { Client, Components, Paths, PathsDictionary, OperationMethods } from './openapi';
4
+ export type { OpenAPIClient, OpenAPIClientAxios, Document } from 'openapi-client-axios';
@@ -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
  */
@@ -4693,6 +4693,87 @@
4693
4693
  },
4694
4694
  "additionalProperties": true
4695
4695
  },
4696
+ "HydratedEntity": {
4697
+ "type": "object",
4698
+ "description": "Entity with relation data resolved into the attribute values",
4699
+ "properties": {
4700
+ "_relations": {
4701
+ "type": "array",
4702
+ "items": {
4703
+ "type": "object",
4704
+ "properties": {
4705
+ "entity_id": {
4706
+ "$ref": "#/components/schemas/EntityId"
4707
+ }
4708
+ },
4709
+ "required": [
4710
+ "entity_id"
4711
+ ]
4712
+ }
4713
+ }
4714
+ },
4715
+ "additionalProperties": true,
4716
+ "required": [
4717
+ "_relations"
4718
+ ],
4719
+ "example": {
4720
+ "_relations": [
4721
+ {
4722
+ "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
4723
+ }
4724
+ ],
4725
+ "status": "active",
4726
+ "customer_number": "abc123",
4727
+ "email": [
4728
+ {
4729
+ "label": "work",
4730
+ "email": "user@example.com"
4731
+ }
4732
+ ],
4733
+ "phone": [
4734
+ {
4735
+ "label": "work",
4736
+ "phone": "+49123456789"
4737
+ }
4738
+ ],
4739
+ "first_name": "First Name",
4740
+ "middle_name": "Middle Name",
4741
+ "last_name": "Last Name",
4742
+ "date_of_birth": "2019-08-24",
4743
+ "title": "Mr.",
4744
+ "account": [
4745
+ {
4746
+ "status": "active",
4747
+ "name": "Company name",
4748
+ "company_email": [
4749
+ {
4750
+ "label": "Company email",
4751
+ "email": "company@example.com"
4752
+ }
4753
+ ],
4754
+ "company_phone": [
4755
+ {
4756
+ "label": "Support phone",
4757
+ "phone": "+49123456789"
4758
+ }
4759
+ ],
4760
+ "company_website": "https://example.com",
4761
+ "tax_id": "DE123456789",
4762
+ "tax_exemption": "2019-08-24",
4763
+ "contacts": {
4764
+ "$relation": [
4765
+ {
4766
+ "_tags": [
4767
+ "CEO"
4768
+ ],
4769
+ "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
4770
+ }
4771
+ ]
4772
+ }
4773
+ }
4774
+ ]
4775
+ }
4776
+ },
4696
4777
  "EntityItem": {
4697
4778
  "allOf": [
4698
4779
  {
@@ -4874,6 +4955,10 @@
4874
4955
  "type": "string",
4875
4956
  "example": "_schema:contact AND status:active"
4876
4957
  },
4958
+ "filter": {
4959
+ "description": "Filter queries supported with ElasticSearch",
4960
+ "type": "array"
4961
+ },
4877
4962
  "sort": {
4878
4963
  "type": "string",
4879
4964
  "example": "_created_at:desc"
@@ -6384,9 +6469,6 @@
6384
6469
  }
6385
6470
  },
6386
6471
  "servers": [
6387
- {
6388
- "url": "https://entity.sls.epilot.io"
6389
- },
6390
6472
  {
6391
6473
  "url": "https://entity.sls.epilot.io"
6392
6474
  }
@@ -0,0 +1,11 @@
1
+ import { Components } from './openapi';
2
+ export declare enum RelationAffinityMode {
3
+ /**
4
+ * For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
5
+ * For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
6
+ */
7
+ WEAK = "weak",
8
+ STRONG = "strong"
9
+ }
10
+ export type Attribute = Components.Schemas.Attribute;
11
+ export type AttributeType = Attribute['type'];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RelationAffinityMode = void 0;
4
+ var RelationAffinityMode;
5
+ (function (RelationAffinityMode) {
6
+ /**
7
+ * For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
8
+ * For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
9
+ */
10
+ RelationAffinityMode["WEAK"] = "weak";
11
+ RelationAffinityMode["STRONG"] = "strong";
12
+ })(RelationAffinityMode = exports.RelationAffinityMode || (exports.RelationAffinityMode = {}));
13
+ //# sourceMappingURL=schema-model.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-client",
3
- "version": "4.23.0",
3
+ "version": "4.25.0-alpha.0",
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",
package/jest.config.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { Config } from '@jest/types';
2
-
3
- const config: Config.InitialOptions = {
4
- preset: 'ts-jest',
5
- testEnvironment: 'node',
6
- testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
7
- testPathIgnorePatterns: ['node_modules'],
8
- coveragePathIgnorePatterns: ['__tests__', 'node_modules'],
9
- verbose: true,
10
- silent: true,
11
- moduleNameMapper: {
12
- '^axios$': require.resolve('axios'),
13
- },
14
- };
15
-
16
- export default config;