@epilot/entity-client 4.21.0-rc.3 → 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,7 @@
32
32
  },
33
33
  {
34
34
  "name": "Taxonomy",
35
- "description": "Entity classification with Taxonomies"
35
+ "description": "Taxonomies and Classifications"
36
36
  },
37
37
  {
38
38
  "name": "Elastic Cluster Assignment",
@@ -1822,12 +1822,24 @@
1822
1822
  },
1823
1823
  "/v1/entity/listTaxonomies": {
1824
1824
  "get": {
1825
+ "deprecated": true,
1825
1826
  "operationId": "listTaxonomies",
1826
1827
  "summary": "listTaxonomies",
1827
1828
  "description": "List taxonomies in an organisation",
1828
1829
  "tags": [
1829
1830
  "Taxonomy"
1830
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
+ ],
1831
1843
  "responses": {
1832
1844
  "200": {
1833
1845
  "description": "Returns list of taxonomies in an organisation",
@@ -1850,6 +1862,115 @@
1850
1862
  }
1851
1863
  }
1852
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
+ },
1853
1974
  "/v1/entity/taxonomies/{taxonomySlug}": {
1854
1975
  "get": {
1855
1976
  "operationId": "getTaxonomy",
@@ -1875,6 +1996,100 @@
1875
1996
  }
1876
1997
  }
1877
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
+ }
1878
2093
  }
1879
2094
  },
1880
2095
  "/v1/entity/taxonomies/{taxonomySlug}:autocomplete": {
@@ -1932,7 +2147,7 @@
1932
2147
  "post": {
1933
2148
  "operationId": "taxonomiesClassificationsSearch",
1934
2149
  "summary": "taxonomiesClassificationsSearch",
1935
- "description": "List taxonomy classifications in an organisation based on taxonomy slug",
2150
+ "description": "List taxonomy classifications in an organization based on taxonomy slug",
1936
2151
  "tags": [
1937
2152
  "Taxonomy"
1938
2153
  ],
@@ -1960,7 +2175,7 @@
1960
2175
  },
1961
2176
  "responses": {
1962
2177
  "200": {
1963
- "description": "Returns list of taxonomy classifications",
2178
+ "description": "Returns the classifications for the taxonomy slug provided",
1964
2179
  "content": {
1965
2180
  "application/json": {
1966
2181
  "schema": {
@@ -1984,7 +2199,7 @@
1984
2199
  "post": {
1985
2200
  "operationId": "updateClassificationsForTaxonomy",
1986
2201
  "summary": "updateClassificationsForTaxonomy",
1987
- "description": "Update taxonomies in an organisation based in taxonomy slug",
2202
+ "description": "Update the classifications for a taxonomy",
1988
2203
  "tags": [
1989
2204
  "Taxonomy"
1990
2205
  ],
@@ -2035,6 +2250,148 @@
2035
2250
  }
2036
2251
  }
2037
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
+ }
2038
2395
  }
2039
2396
  },
2040
2397
  "components": {
@@ -4839,22 +5196,57 @@
4839
5196
  },
4840
5197
  "plural": {
4841
5198
  "type": "string",
4842
- "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.",
4843
5200
  "example": "Purposes"
4844
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
+ },
4845
5222
  "created_at": {
5223
+ "readonly": true,
4846
5224
  "type": "string",
4847
5225
  "format": "date-time"
4848
5226
  },
4849
5227
  "updated_at": {
5228
+ "readonly": true,
4850
5229
  "type": "string",
4851
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
4852
5248
  }
4853
- },
4854
- "required": [
4855
- "slug",
4856
- "name"
4857
- ]
5249
+ }
4858
5250
  },
4859
5251
  "TaxonomyClassification": {
4860
5252
  "type": "object",
@@ -4862,6 +5254,11 @@
4862
5254
  "id": {
4863
5255
  "$ref": "#/components/schemas/ClassificationId"
4864
5256
  },
5257
+ "slug": {
5258
+ "type": "string",
5259
+ "description": "URL-friendly identifier for the classification",
5260
+ "example": "wallbox-pv"
5261
+ },
4865
5262
  "name": {
4866
5263
  "type": "string",
4867
5264
  "example": "Wallbox PV"
@@ -4982,6 +5379,15 @@
4982
5379
  "type": "string"
4983
5380
  }
4984
5381
  },
5382
+ "TaxonomyClassificationSlugPathParam": {
5383
+ "name": "taxonomyClassificationSlug",
5384
+ "description": "Taxonomy Classification slug",
5385
+ "in": "path",
5386
+ "required": true,
5387
+ "schema": {
5388
+ "type": "string"
5389
+ }
5390
+ },
4985
5391
  "SavedViewIdPathParam": {
4986
5392
  "name": "id",
4987
5393
  "description": "View id",
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-client",
3
- "version": "4.21.0-rc.3",
3
+ "version": "4.21.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",
@@ -29,8 +29,7 @@
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",
33
- "prepublishOnly": "npm run typegen && npm run build"
32
+ "lint": "../../node_modules/eslint/bin/eslint.js src"
34
33
  },
35
34
  "files": [
36
35
  "*.js",