@epilot/entity-client 4.3.0 → 4.3.2

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
@@ -29,6 +29,14 @@
29
29
  {
30
30
  "name": "Saved Views",
31
31
  "description": "Saved Views for Entities"
32
+ },
33
+ {
34
+ "name": "Taxonomy",
35
+ "description": "Entities taxonomies"
36
+ },
37
+ {
38
+ "name": "Taxonomy Classification",
39
+ "description": "Entities taxonomies classifications"
32
40
  }
33
41
  ],
34
42
  "security": [
@@ -1286,6 +1294,14 @@
1286
1294
  "schema": {
1287
1295
  "$ref": "#/components/schemas/IsTemplate"
1288
1296
  }
1297
+ },
1298
+ {
1299
+ "in": "query",
1300
+ "name": "language",
1301
+ "description": "Export headers translation language",
1302
+ "schema": {
1303
+ "$ref": "#/components/schemas/Language"
1304
+ }
1289
1305
  }
1290
1306
  ],
1291
1307
  "requestBody": {
@@ -1500,6 +1516,207 @@
1500
1516
  }
1501
1517
  }
1502
1518
  }
1519
+ },
1520
+ "/v1/entity/listTaxonomies": {
1521
+ "get": {
1522
+ "operationId": "listTaxonomies",
1523
+ "summary": "listTaxonomies",
1524
+ "description": "List taxonomies in an organisation",
1525
+ "tags": [
1526
+ "Taxonomy"
1527
+ ],
1528
+ "responses": {
1529
+ "200": {
1530
+ "description": "created purpose",
1531
+ "content": {
1532
+ "application/json": {
1533
+ "schema": {
1534
+ "type": "object",
1535
+ "properties": {
1536
+ "results": {
1537
+ "type": "array",
1538
+ "items": {
1539
+ "$ref": "#/components/schemas/Taxonomy"
1540
+ }
1541
+ }
1542
+ }
1543
+ }
1544
+ }
1545
+ }
1546
+ }
1547
+ }
1548
+ }
1549
+ },
1550
+ "/v1/entity/taxonomies/{taxonomySlug}": {
1551
+ "get": {
1552
+ "operationId": "getTaxonomy",
1553
+ "summary": "getTaxonomy",
1554
+ "description": "Get taxonomy by slug",
1555
+ "tags": [
1556
+ "Taxonomy"
1557
+ ],
1558
+ "parameters": [
1559
+ {
1560
+ "in": "path",
1561
+ "name": "taxonomySlug",
1562
+ "description": "Taxonomy slug to return taxonomy for",
1563
+ "schema": {
1564
+ "$ref": "#/components/schemas/TaxonomySlug"
1565
+ },
1566
+ "required": true
1567
+ }
1568
+ ],
1569
+ "responses": {
1570
+ "200": {
1571
+ "description": "Taxonomy",
1572
+ "content": {
1573
+ "application/json": {
1574
+ "schema": {
1575
+ "$ref": "#/components/schemas/Taxonomy"
1576
+ }
1577
+ }
1578
+ }
1579
+ }
1580
+ }
1581
+ }
1582
+ },
1583
+ "/v1/entity/taxonomies:autocomplete": {
1584
+ "get": {
1585
+ "operationId": "taxonomiesAutocomplete",
1586
+ "summary": "taxonomiesAutocomplete",
1587
+ "description": "Taxonomies auocomplete",
1588
+ "tags": [
1589
+ "Taxonomy Classification"
1590
+ ],
1591
+ "parameters": [
1592
+ {
1593
+ "in": "query",
1594
+ "name": "query",
1595
+ "description": "Input to autocomplete",
1596
+ "schema": {
1597
+ "type": "string"
1598
+ }
1599
+ },
1600
+ {
1601
+ "in": "query",
1602
+ "name": "taxonomySlug",
1603
+ "description": "Limit results to slug",
1604
+ "schema": {
1605
+ "type": "string"
1606
+ },
1607
+ "required": true
1608
+ },
1609
+ {
1610
+ "in": "query",
1611
+ "name": "size",
1612
+ "description": "Minimum number of results to return",
1613
+ "schema": {
1614
+ "type": "number"
1615
+ }
1616
+ }
1617
+ ],
1618
+ "responses": {
1619
+ "200": {
1620
+ "description": "Taxonomies classifications",
1621
+ "content": {
1622
+ "application/json": {
1623
+ "schema": {
1624
+ "type": "object",
1625
+ "properties": {
1626
+ "results": {
1627
+ "type": "array",
1628
+ "items": {
1629
+ "$ref": "#/components/schemas/Taxonomy"
1630
+ }
1631
+ }
1632
+ }
1633
+ }
1634
+ }
1635
+ }
1636
+ }
1637
+ }
1638
+ }
1639
+ },
1640
+ "/v1/entity/taxonomies/{taxonomySlug}/classifications": {
1641
+ "get": {
1642
+ "operationId": "getTaxonomyClassifications",
1643
+ "summary": "getTaxonomyClassifications",
1644
+ "description": "List taxomies in an organisation based on taxonomy slug",
1645
+ "tags": [
1646
+ "Taxonomy Classification"
1647
+ ],
1648
+ "parameters": [
1649
+ {
1650
+ "in": "path",
1651
+ "name": "taxonomySlug",
1652
+ "description": "Taxonomy slug",
1653
+ "schema": {
1654
+ "type": "string"
1655
+ },
1656
+ "required": true
1657
+ }
1658
+ ],
1659
+ "responses": {
1660
+ "200": {
1661
+ "description": "created purpose",
1662
+ "content": {
1663
+ "application/json": {
1664
+ "schema": {
1665
+ "$ref": "#/components/schemas/Taxonomy"
1666
+ }
1667
+ }
1668
+ }
1669
+ }
1670
+ }
1671
+ },
1672
+ "post": {
1673
+ "operationId": "updateClassificationsForTaxonomy",
1674
+ "summary": "updateClassificationsForTaxonomy",
1675
+ "description": "Update taxonomies in an organisation based in taxonomy slug",
1676
+ "tags": [
1677
+ "Taxonomy Classification"
1678
+ ],
1679
+ "parameters": [
1680
+ {
1681
+ "in": "path",
1682
+ "name": "taxonomySlug",
1683
+ "description": "Taxonomy slug",
1684
+ "schema": {
1685
+ "type": "string"
1686
+ },
1687
+ "required": true
1688
+ }
1689
+ ],
1690
+ "requestBody": {
1691
+ "content": {
1692
+ "application/json": {
1693
+ "schema": {
1694
+ "$ref": "#/components/schemas/ClassificationsUpdate"
1695
+ }
1696
+ }
1697
+ }
1698
+ },
1699
+ "responses": {
1700
+ "200": {
1701
+ "description": "Taxonomies classifications",
1702
+ "content": {
1703
+ "application/json": {
1704
+ "schema": {
1705
+ "type": "object",
1706
+ "properties": {
1707
+ "results": {
1708
+ "type": "array",
1709
+ "items": {
1710
+ "$ref": "#/components/schemas/Taxonomy"
1711
+ }
1712
+ }
1713
+ }
1714
+ }
1715
+ }
1716
+ }
1717
+ }
1718
+ }
1719
+ }
1503
1720
  }
1504
1721
  },
1505
1722
  "components": {
@@ -1522,6 +1739,10 @@
1522
1739
  "description": "Export Job Id to get the result",
1523
1740
  "type": "string"
1524
1741
  },
1742
+ "Language": {
1743
+ "description": "Export headers translation Language",
1744
+ "type": "string"
1745
+ },
1525
1746
  "IsTemplate": {
1526
1747
  "description": "Pass 'true' to generate import template",
1527
1748
  "type": "boolean"
@@ -2457,13 +2678,8 @@
2457
2678
  "has_one"
2458
2679
  ]
2459
2680
  },
2460
- "delete_mode": {
2461
- "type": "string",
2462
- "enum": [
2463
- "cascade"
2464
- ]
2465
- },
2466
2681
  "relation_affinity_mode": {
2682
+ "description": "Weak relation attributes are kept when duplicating an entity. Strong relation attributes are discarded when duplicating an entity.",
2467
2683
  "type": "string",
2468
2684
  "enum": [
2469
2685
  "weak",
@@ -2735,6 +2951,7 @@
2735
2951
  "type": "boolean"
2736
2952
  },
2737
2953
  "relation_affinity_mode": {
2954
+ "description": "Weak repeatable attributes are kept when duplicating an entity. Strong repeatable attributes are discarded when duplicating an entity.",
2738
2955
  "type": "string",
2739
2956
  "enum": [
2740
2957
  "weak",
@@ -3110,7 +3327,7 @@
3110
3327
  "$ref": "#/components/schemas/EntityDefaultEdit"
3111
3328
  },
3112
3329
  {
3113
- "$ref": "#/components/schemas/EntityDefaultOverview"
3330
+ "$ref": "#/components/schemas/EntityDefaultTable"
3114
3331
  },
3115
3332
  {
3116
3333
  "$ref": "#/components/schemas/RedirectEntityView"
@@ -3134,7 +3351,7 @@
3134
3351
  }
3135
3352
  }
3136
3353
  },
3137
- "EntityDefaultOverview": {
3354
+ "EntityDefaultTable": {
3138
3355
  "type": "object",
3139
3356
  "properties": {
3140
3357
  "view_type": {
@@ -3207,6 +3424,42 @@
3207
3424
  "type": "string"
3208
3425
  }
3209
3426
  },
3427
+ "navbar_actions": {
3428
+ "type": "array",
3429
+ "items": {
3430
+ "type": "object",
3431
+ "properties": {
3432
+ "type": {
3433
+ "type": "string"
3434
+ },
3435
+ "options": {
3436
+ "type": "array",
3437
+ "items": {
3438
+ "type": "object",
3439
+ "properties": {
3440
+ "label": {
3441
+ "type": "string"
3442
+ },
3443
+ "params": {
3444
+ "type": "object"
3445
+ }
3446
+ },
3447
+ "required": [
3448
+ "label"
3449
+ ]
3450
+ }
3451
+ }
3452
+ },
3453
+ "required": [
3454
+ "type"
3455
+ ]
3456
+ }
3457
+ },
3458
+ "enable_thumbnails": {
3459
+ "description": "Enable the thumbnail column",
3460
+ "type": "boolean",
3461
+ "default": false
3462
+ },
3210
3463
  "classic_view": {
3211
3464
  "type": "string",
3212
3465
  "format": "uri"
@@ -3932,6 +4185,100 @@
3932
4185
  "created_by",
3933
4186
  "ui_config"
3934
4187
  ]
4188
+ },
4189
+ "Taxonomy": {
4190
+ "type": "object",
4191
+ "properties": {
4192
+ "slug": {
4193
+ "$ref": "#/components/schemas/TaxonomySlug"
4194
+ },
4195
+ "name": {
4196
+ "type": "string",
4197
+ "description": "A simple name of a taxonomy could be any string e.g. Purpos, Folder, Product Category",
4198
+ "example": "Purpose"
4199
+ },
4200
+ "plural": {
4201
+ "type": "string",
4202
+ "description": "An optional parameter to add a plural name e.g. Purposes, Folders, Product Categories",
4203
+ "example": "Purposes"
4204
+ },
4205
+ "values": {
4206
+ "type": "array",
4207
+ "items": {
4208
+ "$ref": "#/components/schemas/TaxonomyClassification"
4209
+ }
4210
+ },
4211
+ "created_at": {
4212
+ "type": "string",
4213
+ "format": "date-time"
4214
+ },
4215
+ "updated_at": {
4216
+ "type": "string",
4217
+ "format": "date-time"
4218
+ }
4219
+ },
4220
+ "required": [
4221
+ "slug",
4222
+ "name"
4223
+ ]
4224
+ },
4225
+ "TaxonomyClassification": {
4226
+ "type": "object",
4227
+ "properties": {
4228
+ "id": {
4229
+ "$ref": "#/components/schemas/ClassificationId"
4230
+ },
4231
+ "name": {
4232
+ "type": "string",
4233
+ "example": "Wallbox PV"
4234
+ },
4235
+ "parents": {
4236
+ "type": "array",
4237
+ "items": {
4238
+ "$ref": "#/components/schemas/ClassificationId"
4239
+ }
4240
+ },
4241
+ "created_at": {
4242
+ "type": "string",
4243
+ "format": "date-time"
4244
+ },
4245
+ "updated_at": {
4246
+ "type": "string",
4247
+ "format": "date-time"
4248
+ }
4249
+ }
4250
+ },
4251
+ "ClassificationId": {
4252
+ "type": "string",
4253
+ "format": "uuid"
4254
+ },
4255
+ "TaxonomySlug": {
4256
+ "type": "string",
4257
+ "description": "Taxonomy slug e.g. purpose, folder etc",
4258
+ "example": "purpose"
4259
+ },
4260
+ "ClassificationsUpdate": {
4261
+ "type": "object",
4262
+ "properties": {
4263
+ "create": {
4264
+ "type": "array",
4265
+ "items": {
4266
+ "$ref": "#/components/schemas/TaxonomyClassification"
4267
+ }
4268
+ },
4269
+ "update": {
4270
+ "type": "array",
4271
+ "items": {
4272
+ "$ref": "#/components/schemas/TaxonomyClassification"
4273
+ }
4274
+ },
4275
+ "delete": {
4276
+ "type": "array",
4277
+ "items": {
4278
+ "$ref": "#/components/schemas/TaxonomyClassification"
4279
+ }
4280
+ }
4281
+ }
3935
4282
  }
3936
4283
  },
3937
4284
  "examples": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-client",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
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",
@@ -24,7 +24,7 @@
24
24
  "test": "jest",
25
25
  "typescript": "tsc",
26
26
  "bundle-definition": "webpack",
27
- "openapi": "../../scripts/update-openapi.sh https://docs.api.epilot.io/entity.yaml",
27
+ "openapi": "../../scripts/update-openapi.sh ./openapi.yml",
28
28
  "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
29
29
  "build": "tsc && npm run bundle-definition",
30
30
  "build:watch": "npm run build && tsc -w",