@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.
@@ -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.24.0",
3
+ "version": "4.25.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",
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8GAAqE;AACrE,8EAAsD;AAEtD,4DAAsC;AAGtC,IAAI,MAAc,CAAC;AACZ,IAAM,SAAS,GAAG;IACvB,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,GAAG,IAAA,oBAAY,GAAE,CAAC;KACzB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AANW,QAAA,SAAS,aAMpB;AAEK,IAAM,YAAY,GAAG;;IAC1B,IAAM,GAAG,GAAG,IAAI,8BAAkB,CAAC,EAAE,UAAU,sBAAA,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,IAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,EAAU,CAAC;IAEzC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,yBAC5B,CAAC,MAAA,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,mCAAI,EAAE,CAAC,GACzC,CAAC,2CAAc,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAChC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAVW,QAAA,YAAY,gBAUvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../src/definition.ts"],"names":[],"mappings":";;;;;AAEA,gFAAgD;AAEhD,kBAAgB,8BAAkC,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,iDAA+B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-model.js","sourceRoot":"","sources":["../src/schema-model.ts"],"names":[],"mappings":";;;AAEA,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B;;;OAGG;IACH,qCAAa,CAAA;IACb,yCAAiB,CAAA;AACnB,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B"}
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;