@epilot/entity-client 3.0.11 → 3.0.12
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/README.md +15 -34
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -5
- package/dist/openapi.d.ts +93 -23
- package/dist/openapi.json +28 -1
- package/package.json +23 -9
- package/.gitignore +0 -3
- 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 -13
- package/package-lock.json +0 -18779
- package/src/client.test.ts +0 -19
- package/src/client.ts +0 -21
- package/src/definition.ts +0 -5
- package/src/index.ts +0 -4
- package/src/openapi.d.ts +0 -3944
- package/src/openapi.json +0 -3739
- package/src/schema-model.ts +0 -30
- package/webpack.config.js +0 -28
package/dist/openapi.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ declare namespace Components {
|
|
|
217
217
|
download_url: string;
|
|
218
218
|
alt_text?: string;
|
|
219
219
|
}
|
|
220
|
-
export type Attribute = /* Textarea or text input */ TextAttribute | /* Link with title and href */ LinkAttribute | /* Date or Datetime picker */ DateAttribute | /* Country picker */ CountryAttribute | /* Yes / No Toggle */ BooleanAttribute | /* Dropdown select */ SelectAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Currency input */ CurrencyAttribute | /* Repeatable (add N number of fields) */ RepeatableAttribute | /* Tags */ TagsAttribute | /* Numeric input */ NumberAttribute | /* Consent Management */ ConsentAttribute | /* No UI representation */ InternalAttribute | /* Type of attribute to render N number of ordered fields */ OrderedListAttribute | /* File or Image Attachment */ FileAttribute | /* An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes) */ ComputedAttribute | /* Partner Status */ PartnerStatusAttribute;
|
|
220
|
+
export type Attribute = /* Textarea or text input */ TextAttribute | /* Link with title and href */ LinkAttribute | /* Date or Datetime picker */ DateAttribute | /* Country picker */ CountryAttribute | /* Yes / No Toggle */ BooleanAttribute | /* Dropdown select */ SelectAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Currency input */ CurrencyAttribute | /* Repeatable (add N number of fields) */ RepeatableAttribute | /* Tags */ TagsAttribute | /* Numeric input */ NumberAttribute | /* Consent Management */ ConsentAttribute | /* No UI representation */ InternalAttribute | /* Type of attribute to render N number of ordered fields */ OrderedListAttribute | /* File or Image Attachment */ FileAttribute | /* An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes) */ ComputedAttribute | /* Partner Status */ PartnerStatusAttribute | /* An attribute that holds a set of price components, used for dynamic pricing */ PriceComponentsAttribute;
|
|
221
221
|
export interface BaseAttribute {
|
|
222
222
|
name: string;
|
|
223
223
|
label: string;
|
|
@@ -920,8 +920,8 @@ declare namespace Components {
|
|
|
920
920
|
* "example",
|
|
921
921
|
* "mock"
|
|
922
922
|
* ],
|
|
923
|
-
* "_created_at":
|
|
924
|
-
* "_updated_at":
|
|
923
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
924
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
925
925
|
* }
|
|
926
926
|
*/
|
|
927
927
|
export interface EntityItem {
|
|
@@ -1432,8 +1432,8 @@ declare namespace Components {
|
|
|
1432
1432
|
* "example",
|
|
1433
1433
|
* "mock"
|
|
1434
1434
|
* ],
|
|
1435
|
-
* "_created_at":
|
|
1436
|
-
* "_updated_at":
|
|
1435
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1436
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1437
1437
|
* }
|
|
1438
1438
|
*/
|
|
1439
1439
|
EntityItem[];
|
|
@@ -1548,8 +1548,8 @@ declare namespace Components {
|
|
|
1548
1548
|
* "example",
|
|
1549
1549
|
* "mock"
|
|
1550
1550
|
* ],
|
|
1551
|
-
* "_created_at":
|
|
1552
|
-
* "_updated_at":
|
|
1551
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1552
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1553
1553
|
* }
|
|
1554
1554
|
*/
|
|
1555
1555
|
RelationEntity)[];
|
|
@@ -1623,8 +1623,8 @@ declare namespace Components {
|
|
|
1623
1623
|
* "example",
|
|
1624
1624
|
* "mock"
|
|
1625
1625
|
* ],
|
|
1626
|
-
* "_created_at":
|
|
1627
|
-
* "_updated_at":
|
|
1626
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1627
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z",
|
|
1628
1628
|
* "status": "active",
|
|
1629
1629
|
* "customer_number": "abc123",
|
|
1630
1630
|
* "email": [
|
|
@@ -2049,6 +2049,76 @@ declare namespace Components {
|
|
|
2049
2049
|
protected?: boolean;
|
|
2050
2050
|
type?: "partner_status";
|
|
2051
2051
|
}
|
|
2052
|
+
/**
|
|
2053
|
+
* An attribute that holds a set of price components, used for dynamic pricing
|
|
2054
|
+
*/
|
|
2055
|
+
export interface PriceComponentsAttribute {
|
|
2056
|
+
name: string;
|
|
2057
|
+
label: string;
|
|
2058
|
+
placeholder?: string;
|
|
2059
|
+
/**
|
|
2060
|
+
* Do not render attribute in entity views
|
|
2061
|
+
*/
|
|
2062
|
+
hidden?: boolean;
|
|
2063
|
+
/**
|
|
2064
|
+
* Render as a column in table views. When defined, overrides `hidden`
|
|
2065
|
+
*/
|
|
2066
|
+
show_in_table?: boolean;
|
|
2067
|
+
required?: boolean;
|
|
2068
|
+
readonly?: boolean;
|
|
2069
|
+
deprecated?: boolean;
|
|
2070
|
+
default_value?: string | {
|
|
2071
|
+
[name: string]: any;
|
|
2072
|
+
} | number | number | boolean | any[];
|
|
2073
|
+
group?: string;
|
|
2074
|
+
layout?: string;
|
|
2075
|
+
/**
|
|
2076
|
+
* When set to true, will hide the label of the field.
|
|
2077
|
+
*/
|
|
2078
|
+
hide_label?: boolean;
|
|
2079
|
+
/**
|
|
2080
|
+
* Code name of the icon to used to represent this attribute.
|
|
2081
|
+
* The value must be a valid @epilot/base-elements Icon name
|
|
2082
|
+
*
|
|
2083
|
+
*/
|
|
2084
|
+
icon?: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* Defines the conditional rendering expression for showing this field.
|
|
2087
|
+
* When a valid expression is parsed, their evaluation defines the visibility of this attribute.
|
|
2088
|
+
* Note: Empty or invalid expression have no effect on the field visibility.
|
|
2089
|
+
*
|
|
2090
|
+
*/
|
|
2091
|
+
render_condition?: string;
|
|
2092
|
+
/**
|
|
2093
|
+
* A set of constraints applicable to the attribute.
|
|
2094
|
+
* These constraints should and will be enforced by the attribute renderer.
|
|
2095
|
+
*
|
|
2096
|
+
* example:
|
|
2097
|
+
* {
|
|
2098
|
+
* "disablePast": true
|
|
2099
|
+
* }
|
|
2100
|
+
*/
|
|
2101
|
+
constraints?: {
|
|
2102
|
+
[key: string]: any;
|
|
2103
|
+
};
|
|
2104
|
+
/**
|
|
2105
|
+
* This attribute should only be active when the feature flag is enabled
|
|
2106
|
+
* example:
|
|
2107
|
+
* FF_MY_FEATURE_FLAG
|
|
2108
|
+
*/
|
|
2109
|
+
feature_flag?: string;
|
|
2110
|
+
value_formatter?: string;
|
|
2111
|
+
preview_value_formatter?: string;
|
|
2112
|
+
/**
|
|
2113
|
+
* Setting to `true` disables editing the attribute on the entity builder UI
|
|
2114
|
+
*/
|
|
2115
|
+
entity_builder_disable_edit?: boolean;
|
|
2116
|
+
/**
|
|
2117
|
+
* Setting to `true` prevents the attribute from being modified / deleted
|
|
2118
|
+
*/
|
|
2119
|
+
protected?: boolean;
|
|
2120
|
+
type?: "price_components";
|
|
2121
|
+
}
|
|
2052
2122
|
/**
|
|
2053
2123
|
* example:
|
|
2054
2124
|
* {
|
|
@@ -2165,8 +2235,8 @@ declare namespace Components {
|
|
|
2165
2235
|
* "example",
|
|
2166
2236
|
* "mock"
|
|
2167
2237
|
* ],
|
|
2168
|
-
* "_created_at":
|
|
2169
|
-
* "_updated_at":
|
|
2238
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2239
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2170
2240
|
* }
|
|
2171
2241
|
*/
|
|
2172
2242
|
export interface RelationEntity {
|
|
@@ -2733,8 +2803,8 @@ declare namespace Paths {
|
|
|
2733
2803
|
* "example",
|
|
2734
2804
|
* "mock"
|
|
2735
2805
|
* ],
|
|
2736
|
-
* "_created_at":
|
|
2737
|
-
* "_updated_at":
|
|
2806
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2807
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2738
2808
|
* }
|
|
2739
2809
|
*/
|
|
2740
2810
|
Components.Schemas.EntityItem;
|
|
@@ -2879,8 +2949,8 @@ declare namespace Paths {
|
|
|
2879
2949
|
* "example",
|
|
2880
2950
|
* "mock"
|
|
2881
2951
|
* ],
|
|
2882
|
-
* "_created_at":
|
|
2883
|
-
* "_updated_at":
|
|
2952
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2953
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2884
2954
|
* }
|
|
2885
2955
|
*/
|
|
2886
2956
|
Components.Schemas.EntityItem;
|
|
@@ -2894,8 +2964,8 @@ declare namespace Paths {
|
|
|
2894
2964
|
* "example",
|
|
2895
2965
|
* "mock"
|
|
2896
2966
|
* ],
|
|
2897
|
-
* "_created_at":
|
|
2898
|
-
* "_updated_at":
|
|
2967
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2968
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2899
2969
|
* }
|
|
2900
2970
|
*/
|
|
2901
2971
|
Components.Schemas.EntityItem[];
|
|
@@ -3069,8 +3139,8 @@ declare namespace Paths {
|
|
|
3069
3139
|
* "example",
|
|
3070
3140
|
* "mock"
|
|
3071
3141
|
* ],
|
|
3072
|
-
* "_created_at":
|
|
3073
|
-
* "_updated_at":
|
|
3142
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
3143
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
3074
3144
|
* }
|
|
3075
3145
|
*/
|
|
3076
3146
|
Components.Schemas.EntityItem;
|
|
@@ -3143,8 +3213,8 @@ declare namespace Paths {
|
|
|
3143
3213
|
* "example",
|
|
3144
3214
|
* "mock"
|
|
3145
3215
|
* ],
|
|
3146
|
-
* "_created_at":
|
|
3147
|
-
* "_updated_at":
|
|
3216
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
3217
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
3148
3218
|
* }
|
|
3149
3219
|
*/
|
|
3150
3220
|
Components.Schemas.EntityItem;
|
|
@@ -3158,8 +3228,8 @@ declare namespace Paths {
|
|
|
3158
3228
|
* "example",
|
|
3159
3229
|
* "mock"
|
|
3160
3230
|
* ],
|
|
3161
|
-
* "_created_at":
|
|
3162
|
-
* "_updated_at":
|
|
3231
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
3232
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
3163
3233
|
* }
|
|
3164
3234
|
*/
|
|
3165
3235
|
Components.Schemas.EntityItem;
|
package/dist/openapi.json
CHANGED
|
@@ -1580,6 +1580,9 @@
|
|
|
1580
1580
|
},
|
|
1581
1581
|
{
|
|
1582
1582
|
"$ref": "#/components/schemas/PartnerStatusAttribute"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"$ref": "#/components/schemas/PriceComponentsAttribute"
|
|
1583
1586
|
}
|
|
1584
1587
|
]
|
|
1585
1588
|
},
|
|
@@ -2277,6 +2280,25 @@
|
|
|
2277
2280
|
}
|
|
2278
2281
|
]
|
|
2279
2282
|
},
|
|
2283
|
+
"PriceComponentsAttribute": {
|
|
2284
|
+
"allOf": [
|
|
2285
|
+
{
|
|
2286
|
+
"$ref": "#/components/schemas/BaseAttribute"
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
"type": "object",
|
|
2290
|
+
"description": "An attribute that holds a set of price components, used for dynamic pricing",
|
|
2291
|
+
"properties": {
|
|
2292
|
+
"type": {
|
|
2293
|
+
"type": "string",
|
|
2294
|
+
"enum": [
|
|
2295
|
+
"price_components"
|
|
2296
|
+
]
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
]
|
|
2301
|
+
},
|
|
2280
2302
|
"PartnerStatusAttribute": {
|
|
2281
2303
|
"allOf": [
|
|
2282
2304
|
{
|
|
@@ -3735,5 +3757,10 @@
|
|
|
3735
3757
|
}
|
|
3736
3758
|
}
|
|
3737
3759
|
}
|
|
3738
|
-
}
|
|
3760
|
+
},
|
|
3761
|
+
"servers": [
|
|
3762
|
+
{
|
|
3763
|
+
"url": "https://entity.sls.epilot.io"
|
|
3764
|
+
}
|
|
3765
|
+
]
|
|
3739
3766
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/entity-client",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
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",
|
|
7
|
+
"author": "epilot GmbH",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repsitory": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/epilot-dev/sdk-js.git",
|
|
12
|
+
"directory": "clients/entity-client"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/epilot-dev/sdk-js/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/epilot-dev/sdk-js/tree/main/clients/entity-client#readme",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"epilot",
|
|
20
|
+
"sdk",
|
|
21
|
+
"entity"
|
|
22
|
+
],
|
|
7
23
|
"scripts": {
|
|
8
24
|
"test": "jest",
|
|
9
25
|
"typescript": "tsc",
|
|
10
26
|
"bundle-definition": "webpack",
|
|
11
|
-
"openapi": "openapi read --json
|
|
12
|
-
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen
|
|
13
|
-
"build": "npm run
|
|
14
|
-
"
|
|
27
|
+
"openapi": "openapi read --json https://docs.api.epilot.io/entity.yaml > src/openapi.json",
|
|
28
|
+
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
|
|
29
|
+
"build": "npm run typegen && tsc && npm run bundle-definition",
|
|
30
|
+
"build:watch": "npm run build && tsc -w",
|
|
15
31
|
"prepublishOnly": "npm run build",
|
|
16
|
-
"release-alpha": "npm version prerelease --preid alpha"
|
|
32
|
+
"release-alpha": "npm version prerelease --preid alpha",
|
|
33
|
+
"lint": "../../node_modules/eslint/bin/eslint.js src"
|
|
17
34
|
},
|
|
18
35
|
"files": [
|
|
19
36
|
"*.js",
|
|
@@ -28,9 +45,6 @@
|
|
|
28
45
|
"!src/**",
|
|
29
46
|
"!*.config.js"
|
|
30
47
|
],
|
|
31
|
-
"keywords": [],
|
|
32
|
-
"author": "epilot GmbH",
|
|
33
|
-
"license": "UNLICENSED",
|
|
34
48
|
"peerDependencies": {
|
|
35
49
|
"axios": "^0.25.0"
|
|
36
50
|
},
|
package/.gitignore
DELETED
package/dist/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8GAAqE;AACrE,8EAAsD;AAEtD,4DAAsC;AAG/B,IAAM,SAAS,GAAG;IACvB,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;IACzC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM;QACxC,IAAM,kBAAkB,GAAG,2CAAc,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QACtD,MAAM,CAAC,OAAO,yBACT,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,GACtB,kBAAkB,CACtB,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,SAAS,aAcpB"}
|
package/dist/definition.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../src/definition.ts"],"names":[],"mappings":";;;;;AAEA,gEAAwC;AAExC,kBAAe,sBAAsB,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"}
|
package/dist/schema-model.js.map
DELETED
|
@@ -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,13 +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
|
-
};
|
|
12
|
-
|
|
13
|
-
export default config;
|