@epilot/entity-client 4.21.0-rc.2 → 4.21.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.
package/dist/openapi.json CHANGED
@@ -32,7 +32,11 @@
32
32
  },
33
33
  {
34
34
  "name": "Taxonomy",
35
- "description": "Entity classification with Taxonomies"
35
+ "description": "Taxonomies and Classifications"
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",
@@ -1746,12 +1822,24 @@
1746
1822
  },
1747
1823
  "/v1/entity/listTaxonomies": {
1748
1824
  "get": {
1825
+ "deprecated": true,
1749
1826
  "operationId": "listTaxonomies",
1750
1827
  "summary": "listTaxonomies",
1751
1828
  "description": "List taxonomies in an organisation",
1752
1829
  "tags": [
1753
1830
  "Taxonomy"
1754
1831
  ],
1832
+ "parameters": [
1833
+ {
1834
+ "in": "query",
1835
+ "name": "include_disabled",
1836
+ "description": "Include disabled taxonomies",
1837
+ "schema": {
1838
+ "type": "boolean",
1839
+ "default": false
1840
+ }
1841
+ }
1842
+ ],
1755
1843
  "responses": {
1756
1844
  "200": {
1757
1845
  "description": "Returns list of taxonomies in an organisation",
@@ -1774,6 +1862,115 @@
1774
1862
  }
1775
1863
  }
1776
1864
  },
1865
+ "/v1/entity/taxonomies": {
1866
+ "get": {
1867
+ "operationId": "listTaxonomies",
1868
+ "summary": "listTaxonomies",
1869
+ "description": "List taxonomies in an organization",
1870
+ "parameters": [
1871
+ {
1872
+ "in": "query",
1873
+ "name": "include_disabled",
1874
+ "description": "Include disabled taxonomies",
1875
+ "schema": {
1876
+ "type": "boolean",
1877
+ "default": false
1878
+ }
1879
+ }
1880
+ ],
1881
+ "tags": [
1882
+ "Taxonomy"
1883
+ ],
1884
+ "responses": {
1885
+ "200": {
1886
+ "description": "Returns list of taxonomies in an organization",
1887
+ "content": {
1888
+ "application/json": {
1889
+ "schema": {
1890
+ "type": "object",
1891
+ "properties": {
1892
+ "results": {
1893
+ "type": "array",
1894
+ "items": {
1895
+ "$ref": "#/components/schemas/Taxonomy"
1896
+ }
1897
+ }
1898
+ }
1899
+ }
1900
+ }
1901
+ }
1902
+ }
1903
+ }
1904
+ },
1905
+ "post": {
1906
+ "operationId": "createTaxonomy",
1907
+ "summary": "createTaxonomy",
1908
+ "description": "Create a new taxonomy",
1909
+ "tags": [
1910
+ "Taxonomy"
1911
+ ],
1912
+ "requestBody": {
1913
+ "content": {
1914
+ "application/json": {
1915
+ "schema": {
1916
+ "type": "object",
1917
+ "properties": {
1918
+ "slug": {
1919
+ "$ref": "#/components/schemas/TaxonomySlug"
1920
+ },
1921
+ "name": {
1922
+ "type": "string",
1923
+ "description": "A human friendly name of a Taxonomy e.g. Purpose, Product Category, Folder, Tag",
1924
+ "example": "Purpose"
1925
+ },
1926
+ "plural": {
1927
+ "type": "string",
1928
+ "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags. Defaults to name is not provided.",
1929
+ "example": "Purposes"
1930
+ },
1931
+ "icon": {
1932
+ "type": "string",
1933
+ "description": "Icon name for the taxonomy (from epilot360/icons icon set)",
1934
+ "example": "purpose"
1935
+ },
1936
+ "color": {
1937
+ "type": "string",
1938
+ "description": "HEX Color code for the taxonomy",
1939
+ "example": "#FF5733"
1940
+ }
1941
+ },
1942
+ "required": [
1943
+ "slug",
1944
+ "name"
1945
+ ],
1946
+ "example": {
1947
+ "slug": "product-category",
1948
+ "name": "Product Category",
1949
+ "plural": "Product Categories",
1950
+ "icon": "product-hub",
1951
+ "color": "#FF5733"
1952
+ }
1953
+ }
1954
+ }
1955
+ }
1956
+ },
1957
+ "responses": {
1958
+ "201": {
1959
+ "description": "Taxonomy created",
1960
+ "content": {
1961
+ "application/json": {
1962
+ "schema": {
1963
+ "$ref": "#/components/schemas/Taxonomy"
1964
+ }
1965
+ }
1966
+ }
1967
+ },
1968
+ "409": {
1969
+ "description": "Taxonomy already exists"
1970
+ }
1971
+ }
1972
+ }
1973
+ },
1777
1974
  "/v1/entity/taxonomies/{taxonomySlug}": {
1778
1975
  "get": {
1779
1976
  "operationId": "getTaxonomy",
@@ -1799,6 +1996,100 @@
1799
1996
  }
1800
1997
  }
1801
1998
  }
1999
+ },
2000
+ "put": {
2001
+ "operationId": "updateTaxonomy",
2002
+ "summary": "updateTaxonomy",
2003
+ "description": "Update a taxonomy",
2004
+ "tags": [
2005
+ "Taxonomy"
2006
+ ],
2007
+ "parameters": [
2008
+ {
2009
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2010
+ }
2011
+ ],
2012
+ "requestBody": {
2013
+ "content": {
2014
+ "application/json": {
2015
+ "schema": {
2016
+ "type": "object",
2017
+ "properties": {
2018
+ "name": {
2019
+ "type": "string",
2020
+ "description": "A human friendly name of a Taxonomy e.g. Purpose, Product Category, Folder, Tag",
2021
+ "example": "Purpose"
2022
+ },
2023
+ "plural": {
2024
+ "type": "string",
2025
+ "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags. Defaults to name is not provided.",
2026
+ "example": "Purposes"
2027
+ },
2028
+ "icon": {
2029
+ "type": "string",
2030
+ "description": "Icon name for the taxonomy (from epilot360/icons icon set)",
2031
+ "example": "purpose"
2032
+ },
2033
+ "color": {
2034
+ "type": "string",
2035
+ "description": "HEX Color code for the taxonomy",
2036
+ "example": "#FF5733"
2037
+ },
2038
+ "enabled": {
2039
+ "type": "boolean",
2040
+ "description": "Whether the taxonomy is enabled or not",
2041
+ "example": true
2042
+ }
2043
+ },
2044
+ "example": {
2045
+ "name": "Product Category",
2046
+ "plural": "Product Categories",
2047
+ "icon": "product-hub",
2048
+ "color": "#FF5733",
2049
+ "enabled": true
2050
+ }
2051
+ }
2052
+ }
2053
+ }
2054
+ },
2055
+ "responses": {
2056
+ "200": {
2057
+ "description": "Taxonomy updated",
2058
+ "content": {
2059
+ "application/json": {
2060
+ "schema": {
2061
+ "$ref": "#/components/schemas/Taxonomy"
2062
+ }
2063
+ }
2064
+ }
2065
+ }
2066
+ }
2067
+ },
2068
+ "delete": {
2069
+ "operationId": "deleteTaxonomy",
2070
+ "summary": "deleteTaxonomy",
2071
+ "description": "Delete a taxonomy",
2072
+ "tags": [
2073
+ "Taxonomy"
2074
+ ],
2075
+ "parameters": [
2076
+ {
2077
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2078
+ },
2079
+ {
2080
+ "in": "query",
2081
+ "name": "permanent",
2082
+ "description": "If true, the taxonomy will be permanently deleted",
2083
+ "schema": {
2084
+ "type": "boolean"
2085
+ }
2086
+ }
2087
+ ],
2088
+ "responses": {
2089
+ "204": {
2090
+ "description": "Taxonomy deleted"
2091
+ }
2092
+ }
1802
2093
  }
1803
2094
  },
1804
2095
  "/v1/entity/taxonomies/{taxonomySlug}:autocomplete": {
@@ -1856,7 +2147,7 @@
1856
2147
  "post": {
1857
2148
  "operationId": "taxonomiesClassificationsSearch",
1858
2149
  "summary": "taxonomiesClassificationsSearch",
1859
- "description": "List taxonomy classifications in an organisation based on taxonomy slug",
2150
+ "description": "List taxonomy classifications in an organization based on taxonomy slug",
1860
2151
  "tags": [
1861
2152
  "Taxonomy"
1862
2153
  ],
@@ -1884,7 +2175,7 @@
1884
2175
  },
1885
2176
  "responses": {
1886
2177
  "200": {
1887
- "description": "Returns list of taxonomy classifications",
2178
+ "description": "Returns the classifications for the taxonomy slug provided",
1888
2179
  "content": {
1889
2180
  "application/json": {
1890
2181
  "schema": {
@@ -1908,7 +2199,7 @@
1908
2199
  "post": {
1909
2200
  "operationId": "updateClassificationsForTaxonomy",
1910
2201
  "summary": "updateClassificationsForTaxonomy",
1911
- "description": "Update taxonomies in an organisation based in taxonomy slug",
2202
+ "description": "Update the classifications for a taxonomy",
1912
2203
  "tags": [
1913
2204
  "Taxonomy"
1914
2205
  ],
@@ -1959,6 +2250,148 @@
1959
2250
  }
1960
2251
  }
1961
2252
  }
2253
+ },
2254
+ "/v2/entity/taxonomies/{taxonomySlug}/classifications/{classificationSlug}": {
2255
+ "get": {
2256
+ "operationId": "getTaxonomyClassification",
2257
+ "summary": "getTaxonomyClassification",
2258
+ "description": "Gets the classification of a taxonomy",
2259
+ "tags": [
2260
+ "Taxonomy"
2261
+ ],
2262
+ "parameters": [
2263
+ {
2264
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2265
+ },
2266
+ {
2267
+ "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam"
2268
+ }
2269
+ ],
2270
+ "responses": {
2271
+ "200": {
2272
+ "description": "Taxonomy classification",
2273
+ "content": {
2274
+ "application/json": {
2275
+ "schema": {
2276
+ "$ref": "#/components/schemas/TaxonomyClassification"
2277
+ }
2278
+ }
2279
+ }
2280
+ },
2281
+ "404": {
2282
+ "description": "Taxonomy classification not found"
2283
+ }
2284
+ }
2285
+ },
2286
+ "post": {
2287
+ "operationId": "createTaxonomyClassification",
2288
+ "summary": "createTaxonomyClassification",
2289
+ "description": "Create a new classification for a taxonomy",
2290
+ "tags": [
2291
+ "Taxonomy"
2292
+ ],
2293
+ "parameters": [
2294
+ {
2295
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2296
+ }
2297
+ ],
2298
+ "requestBody": {
2299
+ "content": {
2300
+ "application/json": {
2301
+ "schema": {
2302
+ "$ref": "#/components/schemas/TaxonomyClassification"
2303
+ }
2304
+ }
2305
+ }
2306
+ },
2307
+ "response": {
2308
+ "201": {
2309
+ "description": "Taxonomy classification created",
2310
+ "content": {
2311
+ "application/json": {
2312
+ "schema": {
2313
+ "$ref": "#/components/schemas/TaxonomyClassification"
2314
+ }
2315
+ }
2316
+ }
2317
+ },
2318
+ "409": {
2319
+ "description": "Taxonomy classification already exists\""
2320
+ }
2321
+ }
2322
+ },
2323
+ "put": {
2324
+ "operationId": "updateTaxonomyClassification",
2325
+ "summary": "updateTaxonomyClassification",
2326
+ "description": "Update a classification for a taxonomy",
2327
+ "tags": [
2328
+ "Taxonomy"
2329
+ ],
2330
+ "parameters": [
2331
+ {
2332
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2333
+ }
2334
+ ],
2335
+ "requestBody": {
2336
+ "content": {
2337
+ "application/json": {
2338
+ "schema": {
2339
+ "$ref": "#/components/schemas/TaxonomyClassification"
2340
+ }
2341
+ }
2342
+ }
2343
+ },
2344
+ "response": {
2345
+ "200": {
2346
+ "description": "Taxonomy classification updated",
2347
+ "content": {
2348
+ "application/json": {
2349
+ "schema": {
2350
+ "$ref": "#/components/schemas/TaxonomyClassification"
2351
+ }
2352
+ }
2353
+ }
2354
+ },
2355
+ "404": {
2356
+ "description": "Taxonomy classification not found"
2357
+ }
2358
+ }
2359
+ },
2360
+ "delete": {
2361
+ "operationId": "deleteTaxonomyClassification",
2362
+ "summary": "deleteTaxonomyClassification",
2363
+ "description": "Delete a classification for a taxonomy",
2364
+ "tags": [
2365
+ "Taxonomy"
2366
+ ],
2367
+ "parameters": [
2368
+ {
2369
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2370
+ },
2371
+ {
2372
+ "in": "path",
2373
+ "name": "classificationId",
2374
+ "description": "The classification id",
2375
+ "required": true,
2376
+ "schema": {
2377
+ "$ref": "#/components/schemas/ClassificationId"
2378
+ }
2379
+ },
2380
+ {
2381
+ "in": "query",
2382
+ "name": "permanent",
2383
+ "description": "If true, the classification will be permanently deleted",
2384
+ "schema": {
2385
+ "type": "boolean"
2386
+ }
2387
+ }
2388
+ ],
2389
+ "response": {
2390
+ "204": {
2391
+ "description": "Taxonomy classification deleted"
2392
+ }
2393
+ }
2394
+ }
1962
2395
  }
1963
2396
  },
1964
2397
  "components": {
@@ -2176,10 +2609,12 @@
2176
2609
  "example": "FF_MY_FEATURE_FLAG",
2177
2610
  "description": "This group should only be active when the feature flag is enabled"
2178
2611
  },
2179
- "setting_flag": {
2180
- "type": "string",
2181
- "example": "MY_SETTING",
2182
- "description": "This group should only be active when the setting is enabled"
2612
+ "settings_flag": {
2613
+ "type": "array",
2614
+ "description": "This group should only be active when all the settings have the correct value",
2615
+ "items": {
2616
+ "$ref": "#/components/schemas/SettingFlag"
2617
+ }
2183
2618
  },
2184
2619
  "info_tooltip_title": {
2185
2620
  "type": "object",
@@ -2509,10 +2944,12 @@
2509
2944
  "example": "FF_MY_FEATURE_FLAG",
2510
2945
  "description": "This attribute should only be active when the feature flag is enabled"
2511
2946
  },
2512
- "setting_flag": {
2513
- "type": "string",
2514
- "example": "MY_SETTING",
2515
- "description": "This attribute should only be active when the setting is enabled"
2947
+ "settings_flag": {
2948
+ "type": "array",
2949
+ "description": "This attribute should only be active when all the settings have the correct value",
2950
+ "items": {
2951
+ "$ref": "#/components/schemas/SettingFlag"
2952
+ }
2516
2953
  },
2517
2954
  "value_formatter": {
2518
2955
  "type": "string"
@@ -3098,9 +3535,12 @@
3098
3535
  "type": "string",
3099
3536
  "description": "Name of the feature flag that enables this action"
3100
3537
  },
3101
- "setting_flag": {
3102
- "type": "string",
3103
- "description": "Name of the setting flag that enables this action"
3538
+ "settings_flag": {
3539
+ "type": "array",
3540
+ "description": "This action should only be active when all the settings have the correct value",
3541
+ "items": {
3542
+ "$ref": "#/components/schemas/SettingFlag"
3543
+ }
3104
3544
  },
3105
3545
  "new_entity_item": {
3106
3546
  "type": "object",
@@ -3561,9 +4001,12 @@
3561
4001
  "type": "string",
3562
4002
  "description": "Binds summary field visibility to the feature flag state."
3563
4003
  },
3564
- "setting_flag": {
3565
- "type": "string",
3566
- "description": "Binds summary field visibility to the setting flag state."
4004
+ "settings_flag": {
4005
+ "type": "array",
4006
+ "description": "This summary attribute should only be visible when all the settings have the correct value",
4007
+ "items": {
4008
+ "$ref": "#/components/schemas/SettingFlag"
4009
+ }
3567
4010
  }
3568
4011
  },
3569
4012
  "required": [
@@ -3686,14 +4129,12 @@
3686
4129
  "example": "FF_MY_FEATURE_FLAG",
3687
4130
  "description": "This capability should only be active when the feature flag is enabled"
3688
4131
  },
3689
- "setting_flag": {
3690
- "type": "string",
3691
- "example": "MY_SETTING",
3692
- "description": "This capability should only be active when the setting is enabled"
3693
- },
3694
- "legacy": {
3695
- "type": "boolean",
3696
- "description": "Only show capability for legacy tenants (ivy)"
4132
+ "settings_flag": {
4133
+ "type": "array",
4134
+ "description": "This capability should only be active when all the settings have the correct value",
4135
+ "items": {
4136
+ "$ref": "#/components/schemas/SettingFlag"
4137
+ }
3697
4138
  }
3698
4139
  },
3699
4140
  "required": [
@@ -3720,65 +4161,20 @@
3720
4161
  "default"
3721
4162
  ]
3722
4163
  },
3723
- "dropdown_items": {
4164
+ "row_actions": {
3724
4165
  "type": "array",
3725
4166
  "items": {
3726
- "allOf": [
4167
+ "oneOf": [
3727
4168
  {
3728
- "type": "object",
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
- }
4169
+ "type": "string"
3740
4170
  },
3741
4171
  {
3742
- "oneOf": [
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
- ]
4172
+ "$ref": "#/components/schemas/EntityAction"
3777
4173
  }
3778
4174
  ]
3779
4175
  }
3780
4176
  },
3781
- "row_actions": {
4177
+ "bulk_actions": {
3782
4178
  "type": "array",
3783
4179
  "items": {
3784
4180
  "oneOf": [
@@ -4123,14 +4519,93 @@
4123
4519
  }
4124
4520
  ]
4125
4521
  },
4126
- "HydratedEntityItem": {
4127
- "allOf": [
4128
- {
4129
- "$ref": "#/components/schemas/BaseEntity"
4522
+ "EntityValidationError": {
4523
+ "type": "object",
4524
+ "description": "Validation error for an entity attribute",
4525
+ "properties": {
4526
+ "code": {
4527
+ "type": "string",
4528
+ "description": "Error code identifier",
4529
+ "example": "custom"
4130
4530
  },
4131
- {
4132
- "$ref": "#/components/schemas/HydratedEntity"
4531
+ "params": {
4532
+ "type": "object",
4533
+ "description": "Additional parameters for the error",
4534
+ "properties": {
4535
+ "type": {
4536
+ "type": "string",
4537
+ "description": "The type of the error",
4538
+ "example": "missing_field"
4539
+ }
4540
+ }
4541
+ },
4542
+ "path": {
4543
+ "type": "array",
4544
+ "description": "The path to the attribute that failed validation",
4545
+ "items": {
4546
+ "type": "string"
4547
+ },
4548
+ "example": [
4549
+ "first_name"
4550
+ ]
4551
+ },
4552
+ "message": {
4553
+ "type": "string",
4554
+ "description": "A human-readable message describing the error",
4555
+ "example": "Invalid input"
4133
4556
  }
4557
+ },
4558
+ "required": [
4559
+ "code",
4560
+ "params",
4561
+ "path",
4562
+ "message"
4563
+ ]
4564
+ },
4565
+ "EntityValidationResultSuccess": {
4566
+ "type": "object",
4567
+ "description": "Validation result for a successful validation",
4568
+ "properties": {
4569
+ "status": {
4570
+ "type": "string",
4571
+ "enum": [
4572
+ "success"
4573
+ ]
4574
+ },
4575
+ "errors": {
4576
+ "type": "array",
4577
+ "maxItems": 0,
4578
+ "items": {
4579
+ "$ref": "#/components/schemas/EntityValidationError"
4580
+ }
4581
+ }
4582
+ },
4583
+ "required": [
4584
+ "status",
4585
+ "errors"
4586
+ ]
4587
+ },
4588
+ "EntityValidationResultError": {
4589
+ "type": "object",
4590
+ "description": "Validation result for a failed validation",
4591
+ "properties": {
4592
+ "status": {
4593
+ "type": "string",
4594
+ "enum": [
4595
+ "error"
4596
+ ]
4597
+ },
4598
+ "errors": {
4599
+ "type": "array",
4600
+ "minItems": 1,
4601
+ "items": {
4602
+ "$ref": "#/components/schemas/EntityValidationError"
4603
+ }
4604
+ }
4605
+ },
4606
+ "required": [
4607
+ "status",
4608
+ "errors"
4134
4609
  ]
4135
4610
  },
4136
4611
  "GetRelationsResp": {
@@ -4632,7 +5107,9 @@
4632
5107
  "name": {
4633
5108
  "description": "User-friendly identifier for the saved view",
4634
5109
  "type": "string",
4635
- "example": "View listing German"
5110
+ "example": "View listing German",
5111
+ "minLength": 1,
5112
+ "maxLength": 100
4636
5113
  },
4637
5114
  "org": {
4638
5115
  "description": "Organisation ID a view belongs to",
@@ -4719,22 +5196,57 @@
4719
5196
  },
4720
5197
  "plural": {
4721
5198
  "type": "string",
4722
- "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags",
5199
+ "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags. Defaults to name is not provided.",
4723
5200
  "example": "Purposes"
4724
5201
  },
5202
+ "kind": {
5203
+ "readonly": true,
5204
+ "type": "string",
5205
+ "enum": [
5206
+ "system",
5207
+ "user_defined"
5208
+ ],
5209
+ "description": "Kind of taxonomy e.g. system or user_defined. By default, it's empty, which means 'user_defined'",
5210
+ "example": "system"
5211
+ },
5212
+ "icon": {
5213
+ "type": "string",
5214
+ "description": "Icon name for the taxonomy (from epilot360/icons icon set)",
5215
+ "example": "purpose"
5216
+ },
5217
+ "color": {
5218
+ "type": "string",
5219
+ "description": "HEX Color code for the taxonomy",
5220
+ "example": "#FF5733"
5221
+ },
4725
5222
  "created_at": {
5223
+ "readonly": true,
4726
5224
  "type": "string",
4727
5225
  "format": "date-time"
4728
5226
  },
4729
5227
  "updated_at": {
5228
+ "readonly": true,
4730
5229
  "type": "string",
4731
5230
  "format": "date-time"
5231
+ },
5232
+ "deleted_at": {
5233
+ "readonly": true,
5234
+ "type": "string",
5235
+ "format": "date-time",
5236
+ "description": "Date when the taxonomy was soft-deleted (enabled: false)"
5237
+ },
5238
+ "created_by": {
5239
+ "readonly": true,
5240
+ "type": "string",
5241
+ "description": "User ID of the creator",
5242
+ "example": "10598"
5243
+ },
5244
+ "enabled": {
5245
+ "type": "boolean",
5246
+ "description": "Whether the taxonomy is enabled or not",
5247
+ "example": true
4732
5248
  }
4733
- },
4734
- "required": [
4735
- "slug",
4736
- "name"
4737
- ]
5249
+ }
4738
5250
  },
4739
5251
  "TaxonomyClassification": {
4740
5252
  "type": "object",
@@ -4742,6 +5254,11 @@
4742
5254
  "id": {
4743
5255
  "$ref": "#/components/schemas/ClassificationId"
4744
5256
  },
5257
+ "slug": {
5258
+ "type": "string",
5259
+ "description": "URL-friendly identifier for the classification",
5260
+ "example": "wallbox-pv"
5261
+ },
4745
5262
  "name": {
4746
5263
  "type": "string",
4747
5264
  "example": "Wallbox PV"
@@ -4796,6 +5313,19 @@
4796
5313
  }
4797
5314
  }
4798
5315
  }
5316
+ },
5317
+ "SettingFlag": {
5318
+ "type": "object",
5319
+ "properties": {
5320
+ "name": {
5321
+ "type": "string",
5322
+ "description": "The name of the organization setting to check"
5323
+ },
5324
+ "enabled": {
5325
+ "type": "boolean",
5326
+ "description": "Whether the setting should be enabled or not"
5327
+ }
5328
+ }
4799
5329
  }
4800
5330
  },
4801
5331
  "parameters": {
@@ -4817,6 +5347,20 @@
4817
5347
  "$ref": "#/components/schemas/EntitySlug"
4818
5348
  }
4819
5349
  },
5350
+ "EntitySlugPathPriceParam": {
5351
+ "name": "slug",
5352
+ "description": "Entity Type",
5353
+ "in": "path",
5354
+ "required": true,
5355
+ "schema": {
5356
+ "allOf": [
5357
+ {
5358
+ "$ref": "#/components/schemas/EntitySlug"
5359
+ }
5360
+ ],
5361
+ "example": "price"
5362
+ }
5363
+ },
4820
5364
  "TaxonomySlugQueryParam": {
4821
5365
  "name": "taxonomySlug",
4822
5366
  "description": "Taxonomy slug",
@@ -4835,6 +5379,15 @@
4835
5379
  "type": "string"
4836
5380
  }
4837
5381
  },
5382
+ "TaxonomyClassificationSlugPathParam": {
5383
+ "name": "taxonomyClassificationSlug",
5384
+ "description": "Taxonomy Classification slug",
5385
+ "in": "path",
5386
+ "required": true,
5387
+ "schema": {
5388
+ "type": "string"
5389
+ }
5390
+ },
4838
5391
  "SavedViewIdPathParam": {
4839
5392
  "name": "id",
4840
5393
  "description": "View id",
@@ -4893,7 +5446,7 @@
4893
5446
  },
4894
5447
  "IncludeReverseDeprecatedQueryParam": {
4895
5448
  "name": "include_reverse",
4896
- "description": "When true, includes reverse relations in response (other entities pointing to this entity) \n*It gets overriden by mode query parameter.*\n",
5449
+ "description": "When true, includes reverse relations in response (other entities pointing to this entity)\n*It gets overriden by mode query parameter.*\n",
4897
5450
  "in": "query",
4898
5451
  "deprecated": true,
4899
5452
  "schema": {
@@ -4942,7 +5495,7 @@
4942
5495
  },
4943
5496
  "EntityRelationsModeQueryParam": {
4944
5497
  "name": "mode",
4945
- "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",
5498
+ "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
5499
  "in": "query",
4947
5500
  "required": false,
4948
5501
  "schema": {
@@ -4966,6 +5519,10 @@
4966
5519
  }
4967
5520
  },
4968
5521
  "examples": {
5522
+ "EmptyGenericEntity": {
5523
+ "description": "Example of an empty, generic entity",
5524
+ "value": {}
5525
+ },
4969
5526
  "TaxEntity": {
4970
5527
  "description": "Example of a Tax Rate entity",
4971
5528
  "value": {
@@ -5188,6 +5745,7 @@
5188
5745
  "code": "MODEL_375KW_PREMIUM",
5189
5746
  "type": "One Time",
5190
5747
  "description": "Solar Panel 375 kWp Premium",
5748
+ "internal_description": "Solar Panel 375 kWp Premium",
5191
5749
  "billing_scheme": "per_unit",
5192
5750
  "unit_amount": "€ 28500",
5193
5751
  "tiers_mode": "Standard"
@@ -5578,6 +6136,37 @@
5578
6136
  ]
5579
6137
  }
5580
6138
  }
6139
+ },
6140
+ "EntityValidationError": {
6141
+ "description": "Example of an entity validation error",
6142
+ "value": {
6143
+ "code": "string",
6144
+ "params": {
6145
+ "type": "string"
6146
+ },
6147
+ "path": [
6148
+ "string"
6149
+ ],
6150
+ "message": "string"
6151
+ }
6152
+ },
6153
+ "EntityValidationResultSuccess": {
6154
+ "description": "Example of a successful entity validation result",
6155
+ "value": {
6156
+ "status": "success",
6157
+ "errors": []
6158
+ }
6159
+ },
6160
+ "EntityValidationResultError": {
6161
+ "description": "Example of a failed entity validation result",
6162
+ "value": {
6163
+ "status": "error",
6164
+ "errors": [
6165
+ {
6166
+ "$ref": "#/components/examples/EntityValidationError"
6167
+ }
6168
+ ]
6169
+ }
5581
6170
  }
5582
6171
  }
5583
6172
  },