@epilot/entity-client 4.21.0-rc.1 → 4.21.0-rc.3
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 +27 -0
- package/dist/openapi.d.ts +240 -293
- package/dist/openapi.json +264 -81
- package/package.json +3 -2
package/dist/openapi.json
CHANGED
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
{
|
|
34
34
|
"name": "Taxonomy",
|
|
35
35
|
"description": "Entity classification with Taxonomies"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "Elastic Cluster Assignment",
|
|
39
|
+
"description": "Elastic Cluster assignment for organizations"
|
|
36
40
|
}
|
|
37
41
|
],
|
|
38
42
|
"security": [
|
|
@@ -218,6 +222,24 @@
|
|
|
218
222
|
"schema": {
|
|
219
223
|
"type": "number"
|
|
220
224
|
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"in": "query",
|
|
228
|
+
"name": "fields",
|
|
229
|
+
"required": false,
|
|
230
|
+
"style": "form",
|
|
231
|
+
"explode": false,
|
|
232
|
+
"schema": {
|
|
233
|
+
"type": "array",
|
|
234
|
+
"items": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"example": [
|
|
238
|
+
"id",
|
|
239
|
+
"attributes",
|
|
240
|
+
"capabilites"
|
|
241
|
+
]
|
|
242
|
+
}
|
|
221
243
|
}
|
|
222
244
|
],
|
|
223
245
|
"responses": {
|
|
@@ -443,6 +465,60 @@
|
|
|
443
465
|
}
|
|
444
466
|
}
|
|
445
467
|
},
|
|
468
|
+
"/v1/entity/{slug}:validate": {
|
|
469
|
+
"post": {
|
|
470
|
+
"operationId": "validateEntity",
|
|
471
|
+
"summary": "validateEntity",
|
|
472
|
+
"description": "Validates an entity against the schema.",
|
|
473
|
+
"tags": [
|
|
474
|
+
"Entities"
|
|
475
|
+
],
|
|
476
|
+
"parameters": [
|
|
477
|
+
{
|
|
478
|
+
"$ref": "#/components/parameters/EntitySlugPathPriceParam"
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"requestBody": {
|
|
482
|
+
"content": {
|
|
483
|
+
"application/json": {
|
|
484
|
+
"schema": {
|
|
485
|
+
"$ref": "#/components/schemas/Entity"
|
|
486
|
+
},
|
|
487
|
+
"examples": {
|
|
488
|
+
"Valid Price": {
|
|
489
|
+
"$ref": "#/components/examples/PriceEntity"
|
|
490
|
+
},
|
|
491
|
+
"Invalid Price": {
|
|
492
|
+
"$ref": "#/components/examples/EmptyGenericEntity"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"responses": {
|
|
499
|
+
"200": {
|
|
500
|
+
"description": "Success",
|
|
501
|
+
"content": {
|
|
502
|
+
"application/json": {
|
|
503
|
+
"schema": {
|
|
504
|
+
"$ref": "#/components/schemas/EntityValidationResultSuccess"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"422": {
|
|
510
|
+
"description": "Error",
|
|
511
|
+
"content": {
|
|
512
|
+
"application/json": {
|
|
513
|
+
"schema": {
|
|
514
|
+
"$ref": "#/components/schemas/EntityValidationResultError"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
},
|
|
446
522
|
"/v1/entity/{slug}:upsert": {
|
|
447
523
|
"patch": {
|
|
448
524
|
"operationId": "upsertEntity",
|
|
@@ -2176,10 +2252,12 @@
|
|
|
2176
2252
|
"example": "FF_MY_FEATURE_FLAG",
|
|
2177
2253
|
"description": "This group should only be active when the feature flag is enabled"
|
|
2178
2254
|
},
|
|
2179
|
-
"
|
|
2180
|
-
"type": "
|
|
2181
|
-
"
|
|
2182
|
-
"
|
|
2255
|
+
"settings_flag": {
|
|
2256
|
+
"type": "array",
|
|
2257
|
+
"description": "This group should only be active when all the settings have the correct value",
|
|
2258
|
+
"items": {
|
|
2259
|
+
"$ref": "#/components/schemas/SettingFlag"
|
|
2260
|
+
}
|
|
2183
2261
|
},
|
|
2184
2262
|
"info_tooltip_title": {
|
|
2185
2263
|
"type": "object",
|
|
@@ -2509,10 +2587,12 @@
|
|
|
2509
2587
|
"example": "FF_MY_FEATURE_FLAG",
|
|
2510
2588
|
"description": "This attribute should only be active when the feature flag is enabled"
|
|
2511
2589
|
},
|
|
2512
|
-
"
|
|
2513
|
-
"type": "
|
|
2514
|
-
"
|
|
2515
|
-
"
|
|
2590
|
+
"settings_flag": {
|
|
2591
|
+
"type": "array",
|
|
2592
|
+
"description": "This attribute should only be active when all the settings have the correct value",
|
|
2593
|
+
"items": {
|
|
2594
|
+
"$ref": "#/components/schemas/SettingFlag"
|
|
2595
|
+
}
|
|
2516
2596
|
},
|
|
2517
2597
|
"value_formatter": {
|
|
2518
2598
|
"type": "string"
|
|
@@ -3098,9 +3178,12 @@
|
|
|
3098
3178
|
"type": "string",
|
|
3099
3179
|
"description": "Name of the feature flag that enables this action"
|
|
3100
3180
|
},
|
|
3101
|
-
"
|
|
3102
|
-
"type": "
|
|
3103
|
-
"description": "
|
|
3181
|
+
"settings_flag": {
|
|
3182
|
+
"type": "array",
|
|
3183
|
+
"description": "This action should only be active when all the settings have the correct value",
|
|
3184
|
+
"items": {
|
|
3185
|
+
"$ref": "#/components/schemas/SettingFlag"
|
|
3186
|
+
}
|
|
3104
3187
|
},
|
|
3105
3188
|
"new_entity_item": {
|
|
3106
3189
|
"type": "object",
|
|
@@ -3561,9 +3644,12 @@
|
|
|
3561
3644
|
"type": "string",
|
|
3562
3645
|
"description": "Binds summary field visibility to the feature flag state."
|
|
3563
3646
|
},
|
|
3564
|
-
"
|
|
3565
|
-
"type": "
|
|
3566
|
-
"description": "
|
|
3647
|
+
"settings_flag": {
|
|
3648
|
+
"type": "array",
|
|
3649
|
+
"description": "This summary attribute should only be visible when all the settings have the correct value",
|
|
3650
|
+
"items": {
|
|
3651
|
+
"$ref": "#/components/schemas/SettingFlag"
|
|
3652
|
+
}
|
|
3567
3653
|
}
|
|
3568
3654
|
},
|
|
3569
3655
|
"required": [
|
|
@@ -3686,14 +3772,12 @@
|
|
|
3686
3772
|
"example": "FF_MY_FEATURE_FLAG",
|
|
3687
3773
|
"description": "This capability should only be active when the feature flag is enabled"
|
|
3688
3774
|
},
|
|
3689
|
-
"
|
|
3690
|
-
"type": "
|
|
3691
|
-
"
|
|
3692
|
-
"
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
"type": "boolean",
|
|
3696
|
-
"description": "Only show capability for legacy tenants (ivy)"
|
|
3775
|
+
"settings_flag": {
|
|
3776
|
+
"type": "array",
|
|
3777
|
+
"description": "This capability should only be active when all the settings have the correct value",
|
|
3778
|
+
"items": {
|
|
3779
|
+
"$ref": "#/components/schemas/SettingFlag"
|
|
3780
|
+
}
|
|
3697
3781
|
}
|
|
3698
3782
|
},
|
|
3699
3783
|
"required": [
|
|
@@ -3720,65 +3804,20 @@
|
|
|
3720
3804
|
"default"
|
|
3721
3805
|
]
|
|
3722
3806
|
},
|
|
3723
|
-
"
|
|
3807
|
+
"row_actions": {
|
|
3724
3808
|
"type": "array",
|
|
3725
3809
|
"items": {
|
|
3726
|
-
"
|
|
3810
|
+
"oneOf": [
|
|
3727
3811
|
{
|
|
3728
|
-
"type": "
|
|
3729
|
-
"properties": {
|
|
3730
|
-
"feature_flag": {
|
|
3731
|
-
"type": "string",
|
|
3732
|
-
"example": "FF_MY_FEATURE_FLAG",
|
|
3733
|
-
"description": "This dropdown item should only be active when the feature flag is enabled"
|
|
3734
|
-
},
|
|
3735
|
-
"legacy": {
|
|
3736
|
-
"type": "boolean",
|
|
3737
|
-
"description": "Only show item for legacy tenants (ivy)"
|
|
3738
|
-
}
|
|
3739
|
-
}
|
|
3812
|
+
"type": "string"
|
|
3740
3813
|
},
|
|
3741
3814
|
{
|
|
3742
|
-
"
|
|
3743
|
-
{
|
|
3744
|
-
"type": "object",
|
|
3745
|
-
"properties": {
|
|
3746
|
-
"type": {
|
|
3747
|
-
"type": "string",
|
|
3748
|
-
"enum": [
|
|
3749
|
-
"entity"
|
|
3750
|
-
]
|
|
3751
|
-
},
|
|
3752
|
-
"entity": {
|
|
3753
|
-
"$ref": "#/components/schemas/EntitySlug"
|
|
3754
|
-
}
|
|
3755
|
-
}
|
|
3756
|
-
},
|
|
3757
|
-
{
|
|
3758
|
-
"type": "object",
|
|
3759
|
-
"properties": {
|
|
3760
|
-
"type": {
|
|
3761
|
-
"type": "string",
|
|
3762
|
-
"enum": [
|
|
3763
|
-
"link"
|
|
3764
|
-
]
|
|
3765
|
-
},
|
|
3766
|
-
"title": {
|
|
3767
|
-
"type": "string",
|
|
3768
|
-
"example": "Opportunities"
|
|
3769
|
-
},
|
|
3770
|
-
"uri": {
|
|
3771
|
-
"type": "string",
|
|
3772
|
-
"format": "uri-reference"
|
|
3773
|
-
}
|
|
3774
|
-
}
|
|
3775
|
-
}
|
|
3776
|
-
]
|
|
3815
|
+
"$ref": "#/components/schemas/EntityAction"
|
|
3777
3816
|
}
|
|
3778
3817
|
]
|
|
3779
3818
|
}
|
|
3780
3819
|
},
|
|
3781
|
-
"
|
|
3820
|
+
"bulk_actions": {
|
|
3782
3821
|
"type": "array",
|
|
3783
3822
|
"items": {
|
|
3784
3823
|
"oneOf": [
|
|
@@ -4123,14 +4162,93 @@
|
|
|
4123
4162
|
}
|
|
4124
4163
|
]
|
|
4125
4164
|
},
|
|
4126
|
-
"
|
|
4127
|
-
"
|
|
4128
|
-
|
|
4129
|
-
|
|
4165
|
+
"EntityValidationError": {
|
|
4166
|
+
"type": "object",
|
|
4167
|
+
"description": "Validation error for an entity attribute",
|
|
4168
|
+
"properties": {
|
|
4169
|
+
"code": {
|
|
4170
|
+
"type": "string",
|
|
4171
|
+
"description": "Error code identifier",
|
|
4172
|
+
"example": "custom"
|
|
4130
4173
|
},
|
|
4131
|
-
{
|
|
4132
|
-
"
|
|
4174
|
+
"params": {
|
|
4175
|
+
"type": "object",
|
|
4176
|
+
"description": "Additional parameters for the error",
|
|
4177
|
+
"properties": {
|
|
4178
|
+
"type": {
|
|
4179
|
+
"type": "string",
|
|
4180
|
+
"description": "The type of the error",
|
|
4181
|
+
"example": "missing_field"
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
4184
|
+
},
|
|
4185
|
+
"path": {
|
|
4186
|
+
"type": "array",
|
|
4187
|
+
"description": "The path to the attribute that failed validation",
|
|
4188
|
+
"items": {
|
|
4189
|
+
"type": "string"
|
|
4190
|
+
},
|
|
4191
|
+
"example": [
|
|
4192
|
+
"first_name"
|
|
4193
|
+
]
|
|
4194
|
+
},
|
|
4195
|
+
"message": {
|
|
4196
|
+
"type": "string",
|
|
4197
|
+
"description": "A human-readable message describing the error",
|
|
4198
|
+
"example": "Invalid input"
|
|
4199
|
+
}
|
|
4200
|
+
},
|
|
4201
|
+
"required": [
|
|
4202
|
+
"code",
|
|
4203
|
+
"params",
|
|
4204
|
+
"path",
|
|
4205
|
+
"message"
|
|
4206
|
+
]
|
|
4207
|
+
},
|
|
4208
|
+
"EntityValidationResultSuccess": {
|
|
4209
|
+
"type": "object",
|
|
4210
|
+
"description": "Validation result for a successful validation",
|
|
4211
|
+
"properties": {
|
|
4212
|
+
"status": {
|
|
4213
|
+
"type": "string",
|
|
4214
|
+
"enum": [
|
|
4215
|
+
"success"
|
|
4216
|
+
]
|
|
4217
|
+
},
|
|
4218
|
+
"errors": {
|
|
4219
|
+
"type": "array",
|
|
4220
|
+
"maxItems": 0,
|
|
4221
|
+
"items": {
|
|
4222
|
+
"$ref": "#/components/schemas/EntityValidationError"
|
|
4223
|
+
}
|
|
4133
4224
|
}
|
|
4225
|
+
},
|
|
4226
|
+
"required": [
|
|
4227
|
+
"status",
|
|
4228
|
+
"errors"
|
|
4229
|
+
]
|
|
4230
|
+
},
|
|
4231
|
+
"EntityValidationResultError": {
|
|
4232
|
+
"type": "object",
|
|
4233
|
+
"description": "Validation result for a failed validation",
|
|
4234
|
+
"properties": {
|
|
4235
|
+
"status": {
|
|
4236
|
+
"type": "string",
|
|
4237
|
+
"enum": [
|
|
4238
|
+
"error"
|
|
4239
|
+
]
|
|
4240
|
+
},
|
|
4241
|
+
"errors": {
|
|
4242
|
+
"type": "array",
|
|
4243
|
+
"minItems": 1,
|
|
4244
|
+
"items": {
|
|
4245
|
+
"$ref": "#/components/schemas/EntityValidationError"
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
},
|
|
4249
|
+
"required": [
|
|
4250
|
+
"status",
|
|
4251
|
+
"errors"
|
|
4134
4252
|
]
|
|
4135
4253
|
},
|
|
4136
4254
|
"GetRelationsResp": {
|
|
@@ -4632,7 +4750,9 @@
|
|
|
4632
4750
|
"name": {
|
|
4633
4751
|
"description": "User-friendly identifier for the saved view",
|
|
4634
4752
|
"type": "string",
|
|
4635
|
-
"example": "View listing German"
|
|
4753
|
+
"example": "View listing German",
|
|
4754
|
+
"minLength": 1,
|
|
4755
|
+
"maxLength": 100
|
|
4636
4756
|
},
|
|
4637
4757
|
"org": {
|
|
4638
4758
|
"description": "Organisation ID a view belongs to",
|
|
@@ -4796,6 +4916,19 @@
|
|
|
4796
4916
|
}
|
|
4797
4917
|
}
|
|
4798
4918
|
}
|
|
4919
|
+
},
|
|
4920
|
+
"SettingFlag": {
|
|
4921
|
+
"type": "object",
|
|
4922
|
+
"properties": {
|
|
4923
|
+
"name": {
|
|
4924
|
+
"type": "string",
|
|
4925
|
+
"description": "The name of the organization setting to check"
|
|
4926
|
+
},
|
|
4927
|
+
"enabled": {
|
|
4928
|
+
"type": "boolean",
|
|
4929
|
+
"description": "Whether the setting should be enabled or not"
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4799
4932
|
}
|
|
4800
4933
|
},
|
|
4801
4934
|
"parameters": {
|
|
@@ -4817,6 +4950,20 @@
|
|
|
4817
4950
|
"$ref": "#/components/schemas/EntitySlug"
|
|
4818
4951
|
}
|
|
4819
4952
|
},
|
|
4953
|
+
"EntitySlugPathPriceParam": {
|
|
4954
|
+
"name": "slug",
|
|
4955
|
+
"description": "Entity Type",
|
|
4956
|
+
"in": "path",
|
|
4957
|
+
"required": true,
|
|
4958
|
+
"schema": {
|
|
4959
|
+
"allOf": [
|
|
4960
|
+
{
|
|
4961
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
4962
|
+
}
|
|
4963
|
+
],
|
|
4964
|
+
"example": "price"
|
|
4965
|
+
}
|
|
4966
|
+
},
|
|
4820
4967
|
"TaxonomySlugQueryParam": {
|
|
4821
4968
|
"name": "taxonomySlug",
|
|
4822
4969
|
"description": "Taxonomy slug",
|
|
@@ -4893,7 +5040,7 @@
|
|
|
4893
5040
|
},
|
|
4894
5041
|
"IncludeReverseDeprecatedQueryParam": {
|
|
4895
5042
|
"name": "include_reverse",
|
|
4896
|
-
"description": "When true, includes reverse relations in response (other entities pointing to this entity)
|
|
5043
|
+
"description": "When true, includes reverse relations in response (other entities pointing to this entity)\n*It gets overriden by mode query parameter.*\n",
|
|
4897
5044
|
"in": "query",
|
|
4898
5045
|
"deprecated": true,
|
|
4899
5046
|
"schema": {
|
|
@@ -4942,7 +5089,7 @@
|
|
|
4942
5089
|
},
|
|
4943
5090
|
"EntityRelationsModeQueryParam": {
|
|
4944
5091
|
"name": "mode",
|
|
4945
|
-
"description": "Options to determine how relations will be included in the result
|
|
5092
|
+
"description": "Options to determine how relations will be included in the result.\n*It overrides the include_reverse query param.*\nExplanation of possible options:\n- direct: include relations to which the searched entity refers\n- reverse: include relations that refer to the entity you are looking for\n- both: both direct and reverse relations\n",
|
|
4946
5093
|
"in": "query",
|
|
4947
5094
|
"required": false,
|
|
4948
5095
|
"schema": {
|
|
@@ -4966,6 +5113,10 @@
|
|
|
4966
5113
|
}
|
|
4967
5114
|
},
|
|
4968
5115
|
"examples": {
|
|
5116
|
+
"EmptyGenericEntity": {
|
|
5117
|
+
"description": "Example of an empty, generic entity",
|
|
5118
|
+
"value": {}
|
|
5119
|
+
},
|
|
4969
5120
|
"TaxEntity": {
|
|
4970
5121
|
"description": "Example of a Tax Rate entity",
|
|
4971
5122
|
"value": {
|
|
@@ -5188,6 +5339,7 @@
|
|
|
5188
5339
|
"code": "MODEL_375KW_PREMIUM",
|
|
5189
5340
|
"type": "One Time",
|
|
5190
5341
|
"description": "Solar Panel 375 kWp Premium",
|
|
5342
|
+
"internal_description": "Solar Panel 375 kWp Premium",
|
|
5191
5343
|
"billing_scheme": "per_unit",
|
|
5192
5344
|
"unit_amount": "€ 28500",
|
|
5193
5345
|
"tiers_mode": "Standard"
|
|
@@ -5578,6 +5730,37 @@
|
|
|
5578
5730
|
]
|
|
5579
5731
|
}
|
|
5580
5732
|
}
|
|
5733
|
+
},
|
|
5734
|
+
"EntityValidationError": {
|
|
5735
|
+
"description": "Example of an entity validation error",
|
|
5736
|
+
"value": {
|
|
5737
|
+
"code": "string",
|
|
5738
|
+
"params": {
|
|
5739
|
+
"type": "string"
|
|
5740
|
+
},
|
|
5741
|
+
"path": [
|
|
5742
|
+
"string"
|
|
5743
|
+
],
|
|
5744
|
+
"message": "string"
|
|
5745
|
+
}
|
|
5746
|
+
},
|
|
5747
|
+
"EntityValidationResultSuccess": {
|
|
5748
|
+
"description": "Example of a successful entity validation result",
|
|
5749
|
+
"value": {
|
|
5750
|
+
"status": "success",
|
|
5751
|
+
"errors": []
|
|
5752
|
+
}
|
|
5753
|
+
},
|
|
5754
|
+
"EntityValidationResultError": {
|
|
5755
|
+
"description": "Example of a failed entity validation result",
|
|
5756
|
+
"value": {
|
|
5757
|
+
"status": "error",
|
|
5758
|
+
"errors": [
|
|
5759
|
+
{
|
|
5760
|
+
"$ref": "#/components/examples/EntityValidationError"
|
|
5761
|
+
}
|
|
5762
|
+
]
|
|
5763
|
+
}
|
|
5581
5764
|
}
|
|
5582
5765
|
}
|
|
5583
5766
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/entity-client",
|
|
3
|
-
"version": "4.21.0-rc.
|
|
3
|
+
"version": "4.21.0-rc.3",
|
|
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",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"build": "tsc && npm run bundle-definition",
|
|
30
30
|
"build:watch": "npm run build && tsc -w",
|
|
31
31
|
"release-alpha": "npm version prerelease --preid alpha",
|
|
32
|
-
"lint": "../../node_modules/eslint/bin/eslint.js src"
|
|
32
|
+
"lint": "../../node_modules/eslint/bin/eslint.js src",
|
|
33
|
+
"prepublishOnly": "npm run typegen && npm run build"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"*.js",
|