@epilot/entity-client 3.0.10 → 3.0.13
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/LICENSE +21 -0
- package/README.md +15 -33
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +114 -23
- package/dist/openapi.json +55 -1
- package/package.json +27 -12
- package/package-lock.json +0 -18779
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 {
|
|
@@ -980,6 +980,11 @@ declare namespace Components {
|
|
|
980
980
|
payload?: {
|
|
981
981
|
[name: string]: any;
|
|
982
982
|
};
|
|
983
|
+
diff?: {
|
|
984
|
+
added?: Entity;
|
|
985
|
+
updated?: Entity;
|
|
986
|
+
deleted?: Entity;
|
|
987
|
+
};
|
|
983
988
|
}
|
|
984
989
|
/**
|
|
985
990
|
* example:
|
|
@@ -1057,6 +1062,14 @@ declare namespace Components {
|
|
|
1057
1062
|
list_item?: {
|
|
1058
1063
|
summary_attributes?: string[];
|
|
1059
1064
|
};
|
|
1065
|
+
sharing?: {
|
|
1066
|
+
/**
|
|
1067
|
+
* Show the sharing button in entity detail view
|
|
1068
|
+
* example:
|
|
1069
|
+
* true
|
|
1070
|
+
*/
|
|
1071
|
+
show_sharing_button?: boolean;
|
|
1072
|
+
};
|
|
1060
1073
|
};
|
|
1061
1074
|
capabilities?: /* Capabilities the Entity has. Turn features on/off for entities. */ EntityCapability[];
|
|
1062
1075
|
/**
|
|
@@ -1241,6 +1254,14 @@ declare namespace Components {
|
|
|
1241
1254
|
list_item?: {
|
|
1242
1255
|
summary_attributes?: string[];
|
|
1243
1256
|
};
|
|
1257
|
+
sharing?: {
|
|
1258
|
+
/**
|
|
1259
|
+
* Show the sharing button in entity detail view
|
|
1260
|
+
* example:
|
|
1261
|
+
* true
|
|
1262
|
+
*/
|
|
1263
|
+
show_sharing_button?: boolean;
|
|
1264
|
+
};
|
|
1244
1265
|
};
|
|
1245
1266
|
capabilities?: /* Capabilities the Entity has. Turn features on/off for entities. */ EntityCapability[];
|
|
1246
1267
|
/**
|
|
@@ -1411,8 +1432,8 @@ declare namespace Components {
|
|
|
1411
1432
|
* "example",
|
|
1412
1433
|
* "mock"
|
|
1413
1434
|
* ],
|
|
1414
|
-
* "_created_at":
|
|
1415
|
-
* "_updated_at":
|
|
1435
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1436
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1416
1437
|
* }
|
|
1417
1438
|
*/
|
|
1418
1439
|
EntityItem[];
|
|
@@ -1527,8 +1548,8 @@ declare namespace Components {
|
|
|
1527
1548
|
* "example",
|
|
1528
1549
|
* "mock"
|
|
1529
1550
|
* ],
|
|
1530
|
-
* "_created_at":
|
|
1531
|
-
* "_updated_at":
|
|
1551
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1552
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1532
1553
|
* }
|
|
1533
1554
|
*/
|
|
1534
1555
|
RelationEntity)[];
|
|
@@ -1602,8 +1623,8 @@ declare namespace Components {
|
|
|
1602
1623
|
* "example",
|
|
1603
1624
|
* "mock"
|
|
1604
1625
|
* ],
|
|
1605
|
-
* "_created_at":
|
|
1606
|
-
* "_updated_at":
|
|
1626
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1627
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z",
|
|
1607
1628
|
* "status": "active",
|
|
1608
1629
|
* "customer_number": "abc123",
|
|
1609
1630
|
* "email": [
|
|
@@ -2028,6 +2049,76 @@ declare namespace Components {
|
|
|
2028
2049
|
protected?: boolean;
|
|
2029
2050
|
type?: "partner_status";
|
|
2030
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
|
+
}
|
|
2031
2122
|
/**
|
|
2032
2123
|
* example:
|
|
2033
2124
|
* {
|
|
@@ -2144,8 +2235,8 @@ declare namespace Components {
|
|
|
2144
2235
|
* "example",
|
|
2145
2236
|
* "mock"
|
|
2146
2237
|
* ],
|
|
2147
|
-
* "_created_at":
|
|
2148
|
-
* "_updated_at":
|
|
2238
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2239
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2149
2240
|
* }
|
|
2150
2241
|
*/
|
|
2151
2242
|
export interface RelationEntity {
|
|
@@ -2712,8 +2803,8 @@ declare namespace Paths {
|
|
|
2712
2803
|
* "example",
|
|
2713
2804
|
* "mock"
|
|
2714
2805
|
* ],
|
|
2715
|
-
* "_created_at":
|
|
2716
|
-
* "_updated_at":
|
|
2806
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2807
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2717
2808
|
* }
|
|
2718
2809
|
*/
|
|
2719
2810
|
Components.Schemas.EntityItem;
|
|
@@ -2858,8 +2949,8 @@ declare namespace Paths {
|
|
|
2858
2949
|
* "example",
|
|
2859
2950
|
* "mock"
|
|
2860
2951
|
* ],
|
|
2861
|
-
* "_created_at":
|
|
2862
|
-
* "_updated_at":
|
|
2952
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2953
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2863
2954
|
* }
|
|
2864
2955
|
*/
|
|
2865
2956
|
Components.Schemas.EntityItem;
|
|
@@ -2873,8 +2964,8 @@ declare namespace Paths {
|
|
|
2873
2964
|
* "example",
|
|
2874
2965
|
* "mock"
|
|
2875
2966
|
* ],
|
|
2876
|
-
* "_created_at":
|
|
2877
|
-
* "_updated_at":
|
|
2967
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
2968
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
2878
2969
|
* }
|
|
2879
2970
|
*/
|
|
2880
2971
|
Components.Schemas.EntityItem[];
|
|
@@ -3048,8 +3139,8 @@ declare namespace Paths {
|
|
|
3048
3139
|
* "example",
|
|
3049
3140
|
* "mock"
|
|
3050
3141
|
* ],
|
|
3051
|
-
* "_created_at":
|
|
3052
|
-
* "_updated_at":
|
|
3142
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
3143
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
3053
3144
|
* }
|
|
3054
3145
|
*/
|
|
3055
3146
|
Components.Schemas.EntityItem;
|
|
@@ -3122,8 +3213,8 @@ declare namespace Paths {
|
|
|
3122
3213
|
* "example",
|
|
3123
3214
|
* "mock"
|
|
3124
3215
|
* ],
|
|
3125
|
-
* "_created_at":
|
|
3126
|
-
* "_updated_at":
|
|
3216
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
3217
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
3127
3218
|
* }
|
|
3128
3219
|
*/
|
|
3129
3220
|
Components.Schemas.EntityItem;
|
|
@@ -3137,8 +3228,8 @@ declare namespace Paths {
|
|
|
3137
3228
|
* "example",
|
|
3138
3229
|
* "mock"
|
|
3139
3230
|
* ],
|
|
3140
|
-
* "_created_at":
|
|
3141
|
-
* "_updated_at":
|
|
3231
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
3232
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
3142
3233
|
* }
|
|
3143
3234
|
*/
|
|
3144
3235
|
Components.Schemas.EntityItem;
|
package/dist/openapi.json
CHANGED
|
@@ -1330,6 +1330,16 @@
|
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
+
},
|
|
1334
|
+
"sharing": {
|
|
1335
|
+
"type": "object",
|
|
1336
|
+
"properties": {
|
|
1337
|
+
"show_sharing_button": {
|
|
1338
|
+
"type": "boolean",
|
|
1339
|
+
"description": "Show the sharing button in entity detail view",
|
|
1340
|
+
"example": true
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1333
1343
|
}
|
|
1334
1344
|
}
|
|
1335
1345
|
},
|
|
@@ -1570,6 +1580,9 @@
|
|
|
1570
1580
|
},
|
|
1571
1581
|
{
|
|
1572
1582
|
"$ref": "#/components/schemas/PartnerStatusAttribute"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"$ref": "#/components/schemas/PriceComponentsAttribute"
|
|
1573
1586
|
}
|
|
1574
1587
|
]
|
|
1575
1588
|
},
|
|
@@ -2267,6 +2280,25 @@
|
|
|
2267
2280
|
}
|
|
2268
2281
|
]
|
|
2269
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
|
+
},
|
|
2270
2302
|
"PartnerStatusAttribute": {
|
|
2271
2303
|
"allOf": [
|
|
2272
2304
|
{
|
|
@@ -3044,6 +3076,20 @@
|
|
|
3044
3076
|
}
|
|
3045
3077
|
}
|
|
3046
3078
|
]
|
|
3079
|
+
},
|
|
3080
|
+
"diff": {
|
|
3081
|
+
"type": "object",
|
|
3082
|
+
"properties": {
|
|
3083
|
+
"added": {
|
|
3084
|
+
"$ref": "#/components/schemas/Entity"
|
|
3085
|
+
},
|
|
3086
|
+
"updated": {
|
|
3087
|
+
"$ref": "#/components/schemas/Entity"
|
|
3088
|
+
},
|
|
3089
|
+
"deleted": {
|
|
3090
|
+
"$ref": "#/components/schemas/Entity"
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3047
3093
|
}
|
|
3048
3094
|
},
|
|
3049
3095
|
"required": [
|
|
@@ -3711,5 +3757,13 @@
|
|
|
3711
3757
|
}
|
|
3712
3758
|
}
|
|
3713
3759
|
}
|
|
3714
|
-
}
|
|
3760
|
+
},
|
|
3761
|
+
"servers": [
|
|
3762
|
+
{
|
|
3763
|
+
"url": "https://entity.sls.epilot.io"
|
|
3764
|
+
},
|
|
3765
|
+
{
|
|
3766
|
+
"url": "https://entity.sls.epilot.io"
|
|
3767
|
+
}
|
|
3768
|
+
]
|
|
3715
3769
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/entity-client",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.13",
|
|
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": "
|
|
12
|
-
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen
|
|
13
|
-
"build": "
|
|
14
|
-
"
|
|
15
|
-
"prepublishOnly": "npm run build",
|
|
16
|
-
"release-alpha": "npm version prerelease --preid alpha"
|
|
27
|
+
"openapi": "../../scripts/update-openapi.sh https://docs.api.epilot.io/entity.yaml",
|
|
28
|
+
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
|
|
29
|
+
"build": "tsc && npm run bundle-definition",
|
|
30
|
+
"build:watch": "npm run build && tsc -w",
|
|
31
|
+
"prepublishOnly": "npm run typegen && npm run build",
|
|
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
|
},
|
|
@@ -57,5 +71,6 @@
|
|
|
57
71
|
"typescript": "^4.1.3",
|
|
58
72
|
"webpack": "^5.18.0",
|
|
59
73
|
"webpack-cli": "^4.4.0"
|
|
60
|
-
}
|
|
61
|
-
|
|
74
|
+
},
|
|
75
|
+
"gitHead": "7b83c1f1eae808b0184858ee471818cf4dca3295"
|
|
76
|
+
}
|