@epilot/entity-client 4.28.0 → 4.29.1

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",
@@ -177,12 +177,355 @@
177
177
  }
178
178
  ],
179
179
  "responses": {
180
- "204": {
180
+ "200": {
181
181
  "description": "Success"
182
182
  }
183
183
  }
184
184
  }
185
185
  },
186
+ "/v1/entity/schemas/{slug}/json/schema": {
187
+ "get": {
188
+ "operationId": "getJsonSchema",
189
+ "summary": "getJsonSchema",
190
+ "description": "Get formal JSON schema definition draft 2020-12 for the given epilot schema",
191
+ "tags": [
192
+ "Schemas"
193
+ ],
194
+ "parameters": [
195
+ {
196
+ "$ref": "#/components/parameters/EntitySlugPathParam"
197
+ }
198
+ ],
199
+ "responses": {
200
+ "200": {
201
+ "description": "Success",
202
+ "content": {
203
+ "application/json": {
204
+ "schema": {
205
+ "type": "object",
206
+ "example": {
207
+ "$schema": "http://json-schema.org/draft/2020-12/schema",
208
+ "type": "object",
209
+ "properties": {
210
+ "_id": {
211
+ "type": "string",
212
+ "format": "uuid",
213
+ "example": "123e4567-e89b-12d3-a456-426614174000"
214
+ },
215
+ "_org": {
216
+ "type": "string",
217
+ "description": "Organization Id the entity belongs to",
218
+ "readOnly": true
219
+ },
220
+ "_owners": {
221
+ "type": "array",
222
+ "readOnly": true,
223
+ "items": {
224
+ "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
225
+ "type": "object",
226
+ "properties": {
227
+ "org_id": {
228
+ "type": "string",
229
+ "example": "123"
230
+ },
231
+ "user_id": {
232
+ "type": "string",
233
+ "example": "123"
234
+ }
235
+ },
236
+ "required": [
237
+ "org_id"
238
+ ]
239
+ }
240
+ },
241
+ "_schema": {
242
+ "readOnly": true,
243
+ "type": "string"
244
+ },
245
+ "_title": {
246
+ "readOnly": true,
247
+ "type": "string"
248
+ },
249
+ "_tags": {
250
+ "type": "array",
251
+ "nullable": true,
252
+ "items": {
253
+ "type": "string"
254
+ }
255
+ },
256
+ "_created_at": {
257
+ "readOnly": true,
258
+ "type": "string",
259
+ "format": "date-time"
260
+ },
261
+ "_updated_at": {
262
+ "readOnly": true,
263
+ "type": "string",
264
+ "format": "date-time"
265
+ },
266
+ "_acl": {
267
+ "readOnly": true,
268
+ "type": "object",
269
+ "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
270
+ "additionalProperties": true,
271
+ "properties": {
272
+ "view": {
273
+ "type": "array",
274
+ "items": {
275
+ "type": "string",
276
+ "example": "org:456"
277
+ }
278
+ },
279
+ "edit": {
280
+ "type": "array",
281
+ "items": {
282
+ "type": "string",
283
+ "example": "org:456"
284
+ }
285
+ },
286
+ "delete": {
287
+ "type": "array",
288
+ "items": {
289
+ "type": "string",
290
+ "example": "org:456"
291
+ }
292
+ }
293
+ }
294
+ },
295
+ "title": {
296
+ "type": "string",
297
+ "nullable": true,
298
+ "enum": [
299
+ "Dr.",
300
+ "Prof.",
301
+ "Prof. Dr."
302
+ ]
303
+ },
304
+ "salutation": {
305
+ "type": "string",
306
+ "nullable": true,
307
+ "enum": [
308
+ "Mr.",
309
+ "Ms. / Mrs.",
310
+ "Company",
311
+ "Contact Person",
312
+ "Company/Contact Person",
313
+ "Spouse",
314
+ "Family",
315
+ "Ownership",
316
+ "Assembly",
317
+ "Other"
318
+ ]
319
+ },
320
+ "first_name": {
321
+ "type": "string"
322
+ },
323
+ "last_name": {
324
+ "type": "string"
325
+ },
326
+ "customer_number": {
327
+ "type": "string",
328
+ "nullable": true
329
+ },
330
+ "birthdate": {
331
+ "type": "string",
332
+ "format": "date",
333
+ "nullable": true
334
+ },
335
+ "account": {
336
+ "type": "object",
337
+ "nullable": true,
338
+ "properties": {
339
+ "$relation": {
340
+ "type": "array",
341
+ "items": {
342
+ "type": "object",
343
+ "properties": {
344
+ "entity_id": {
345
+ "type": "string",
346
+ "format": "uuid",
347
+ "example": "123e4567-e89b-12d3-a456-426614174000"
348
+ },
349
+ "_tags": {
350
+ "type": "array",
351
+ "nullable": true,
352
+ "items": {
353
+ "type": "string"
354
+ }
355
+ }
356
+ },
357
+ "required": [
358
+ "entity_id"
359
+ ]
360
+ }
361
+ }
362
+ },
363
+ "additionalProperties": true
364
+ },
365
+ "address": {
366
+ "type": "array",
367
+ "nullable": true,
368
+ "description": "Addresses as a list of object, the element with index 0 is treated as the primary one.\n",
369
+ "items": {
370
+ "type": "object",
371
+ "properties": {
372
+ "street": {
373
+ "type": "string",
374
+ "nullable": true
375
+ },
376
+ "street_number": {
377
+ "type": "string",
378
+ "nullable": true
379
+ },
380
+ "postal_code": {
381
+ "type": "string",
382
+ "nullable": true
383
+ },
384
+ "city": {
385
+ "type": "string",
386
+ "nullable": true
387
+ },
388
+ "country": {
389
+ "type": "string",
390
+ "nullable": true,
391
+ "enum": [
392
+ "DE",
393
+ "AT",
394
+ "CH"
395
+ ]
396
+ },
397
+ "additional_info": {
398
+ "type": "string",
399
+ "nullable": true
400
+ },
401
+ "_tags": {
402
+ "type": "array",
403
+ "nullable": true,
404
+ "items": {
405
+ "type": "string"
406
+ }
407
+ },
408
+ "_id": {
409
+ "type": "string",
410
+ "example": "xHcOoJCa07eysJ1GaQeSb"
411
+ }
412
+ },
413
+ "required": [
414
+ "street",
415
+ "street_number",
416
+ "postal_code",
417
+ "city",
418
+ "country"
419
+ ]
420
+ }
421
+ },
422
+ "email": {
423
+ "type": "array",
424
+ "nullable": true,
425
+ "description": "Email addresses as a list of object, the element with index 0 is treated as the primary one.\n",
426
+ "items": {
427
+ "type": "object",
428
+ "properties": {
429
+ "_id": {
430
+ "type": "string",
431
+ "example": "xHcOoJCa07eysJ1GaQeSb"
432
+ },
433
+ "_tags": {
434
+ "type": "array",
435
+ "nullable": true,
436
+ "items": {
437
+ "type": "string"
438
+ }
439
+ },
440
+ "email": {
441
+ "type": "string"
442
+ }
443
+ },
444
+ "required": [
445
+ "email"
446
+ ]
447
+ }
448
+ },
449
+ "phone": {
450
+ "type": "array",
451
+ "description": "Phone numbers as a list of object, the element with index 0 is treated as the primary one.\n",
452
+ "items": {
453
+ "type": "object",
454
+ "properties": {
455
+ "_id": {
456
+ "type": "string",
457
+ "example": "xHcOoJCa07eysJ1GaQeSb"
458
+ },
459
+ "_tags": {
460
+ "type": "array",
461
+ "nullable": true,
462
+ "items": {
463
+ "type": "string"
464
+ }
465
+ },
466
+ "phone": {
467
+ "type": "string"
468
+ }
469
+ },
470
+ "required": [
471
+ "phone"
472
+ ]
473
+ }
474
+ }
475
+ },
476
+ "required": [
477
+ "first_name",
478
+ "last_name",
479
+ "_id",
480
+ "_org",
481
+ "_owners",
482
+ "_schema",
483
+ "_title",
484
+ "_tags",
485
+ "_created_at",
486
+ "_updated_at",
487
+ "_acl"
488
+ ]
489
+ }
490
+ }
491
+ }
492
+ }
493
+ }
494
+ }
495
+ }
496
+ },
497
+ "/v1/entity/schemas/{slug}/json/example": {
498
+ "get": {
499
+ "operationId": "getSchemaExample",
500
+ "summary": "getSchemaExample",
501
+ "description": "Get a full example entity for the given schema",
502
+ "tags": [
503
+ "Schemas"
504
+ ],
505
+ "parameters": [
506
+ {
507
+ "$ref": "#/components/parameters/EntitySlugPathParam"
508
+ }
509
+ ],
510
+ "responses": {
511
+ "200": {
512
+ "description": "Success",
513
+ "content": {
514
+ "application/json": {
515
+ "schema": {
516
+ "type": "object"
517
+ },
518
+ "examples": {
519
+ "contact": {
520
+ "$ref": "#/components/examples/ContactEntity"
521
+ }
522
+ }
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ },
186
529
  "/v1/entity/schemas/{slug}/versions": {
187
530
  "get": {
188
531
  "operationId": "getSchemaVersions",
@@ -300,51 +643,35 @@
300
643
  }
301
644
  }
302
645
  },
303
- "/v1/entity/schemas/{slug}/taxonomy/{taxonomySlug}": {
304
- "get": {
305
- "operationId": "listTaxonomyClassificationsForSchema",
306
- "summary": "listTaxonomyClassificationsForSchema",
307
- "description": "List taxonomy classifications for a given schema",
646
+ "/v1/entity:search": {
647
+ "post": {
648
+ "operationId": "searchEntities",
649
+ "summary": "searchEntities",
650
+ "description": "Search for entities. Supports ordering and pagination. [Lucene query syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax) supported for complex querying.\n\nPassing comma-separated `x-epilot-org-id` is supported for cross-org entity search.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n },\n \"addresses\": {\n \"$relation_ref\": [\n { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ],\n \"addresses\": [\n {\n \"$relation_ref\": { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n \"_id\": \"123\",\n \"address\": \"address 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation_ref\": { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n \"_id\": \"234\",\n \"address\": \"address 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n",
308
651
  "tags": [
309
- "Schemas"
652
+ "Entities"
310
653
  ],
311
- "parameters": [
312
- {
313
- "$ref": "#/components/parameters/EntitySlugPathParam"
314
- },
315
- {
316
- "$ref": "#/components/parameters/TaxonomySlugPathParam"
317
- },
318
- {
319
- "in": "query",
320
- "name": "query",
321
- "schema": {
322
- "type": "string"
323
- }
324
- },
325
- {
326
- "in": "query",
327
- "name": "size",
328
- "schema": {
329
- "type": "number"
654
+ "requestBody": {
655
+ "content": {
656
+ "application/json": {
657
+ "schema": {
658
+ "$ref": "#/components/schemas/EntitySearchParams"
659
+ }
330
660
  }
331
661
  }
332
- ],
662
+ },
333
663
  "responses": {
334
664
  "200": {
335
- "description": "List of taxonomy classifications",
665
+ "description": "Success",
336
666
  "content": {
337
667
  "application/json": {
338
668
  "schema": {
339
- "type": "object",
340
- "properties": {
341
- "results": {
342
- "type": "array",
343
- "items": {
344
- "$ref": "#/components/schemas/TaxonomyClassification"
345
- }
346
- }
347
- }
669
+ "$ref": "#/components/schemas/EntitySearchResults"
670
+ }
671
+ },
672
+ "text/csv": {
673
+ "schema": {
674
+ "type": "string"
348
675
  }
349
676
  }
350
677
  }
@@ -352,11 +679,11 @@
352
679
  }
353
680
  }
354
681
  },
355
- "/v1/entity:search": {
682
+ "/v1/entity:list": {
356
683
  "post": {
357
- "operationId": "searchEntities",
358
- "summary": "searchEntities",
359
- "description": "Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.\n\nPassing comma-separated `x-epilot-org-id` is supported for cross-org entity search.\n\n## Relations\n\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\n\nExample:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": {\n \"$relation\": [\n { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n ]\n },\n \"addresses\": {\n \"$relation_ref\": [\n { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n ]\n }\n}\n```\n\nBecomes:\n```json\n{\n \"_id\": \"123\",\n \"name\": \"parent\",\n \"_tags\": [\"parent\"],\n \"contacts\": [\n {\n \"$relation\": { \"entity_id\": \"456\", \"_tags\": [\"primary\"] },\n \"_id\": \"456\",\n \"name\": \"child 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation\": { \"entity_id\": \"789\", \"_tags\": [\"secondary\"] },\n \"_id\": \"789\",\n \"name\": \"child 2\",\n \"_tags\": [\"child\"]\n }\n ],\n \"addresses\": [\n {\n \"$relation_ref\": { \"entity_id\": \"123\", \"_tags\": [\"primary\"], \"path\": \"address.0\" },\n \"_id\": \"123\",\n \"address\": \"address 1\",\n \"_tags\": [\"child\"]\n },\n {\n \"$relation_ref\": { \"entity_id\": \"234\", \"_tags\": [\"secondary\"], \"path\": \"address.0\" },\n \"_id\": \"234\",\n \"address\": \"address 2\",\n \"_tags\": [\"child\"]\n }\n ]\n}\n```\n",
684
+ "operationId": "listEntities",
685
+ "summary": "listEntities",
686
+ "description": "List entities that meet the specified conditions.\n\nSupports the same options as entity search but utilizes filtering using a subset of [Elastic Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) and does not perform scoring.\n",
360
687
  "tags": [
361
688
  "Entities"
362
689
  ],
@@ -364,7 +691,7 @@
364
691
  "content": {
365
692
  "application/json": {
366
693
  "schema": {
367
- "$ref": "#/components/schemas/EntitySearchParams"
694
+ "$ref": "#/components/schemas/EntityListParams"
368
695
  }
369
696
  }
370
697
  }
@@ -523,7 +850,7 @@
523
850
  "patch": {
524
851
  "operationId": "upsertEntity",
525
852
  "summary": "upsertEntity",
526
- "description": "Create or update an entity using `unique_key`\n\n- If no entities are matched, a new entity is created.\n- If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.\n- If more than one entity is matched a `409` Error is returned\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`\n",
853
+ "description": "Create or update an entity using `unique_key`\n\n- If no entities are matched, a new entity is created.\n- If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.\n\n## Activity\n\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`\n",
527
854
  "tags": [
528
855
  "Entities"
529
856
  ],
@@ -539,6 +866,16 @@
539
866
  },
540
867
  {
541
868
  "$ref": "#/components/parameters/AsyncOperationQueryParam"
869
+ },
870
+ {
871
+ "name": "strict",
872
+ "description": "Strict mode = return 409 if more than one entity is matched",
873
+ "in": "query",
874
+ "required": false,
875
+ "schema": {
876
+ "type": "boolean",
877
+ "default": false
878
+ }
542
879
  }
543
880
  ],
544
881
  "requestBody": {
@@ -546,6 +883,7 @@
546
883
  "application/json": {
547
884
  "schema": {
548
885
  "type": "object",
886
+ "additionalProperties": false,
549
887
  "properties": {
550
888
  "unique_key": {
551
889
  "type": "array",
@@ -927,7 +1265,7 @@
927
1265
  "content": {
928
1266
  "application/json": {
929
1267
  "schema": {
930
- "$ref": "#/components/schemas/ActivityItem"
1268
+ "$ref": "#/components/schemas/BaseActivityItem"
931
1269
  }
932
1270
  }
933
1271
  }
@@ -1015,7 +1353,7 @@
1015
1353
  "content": {
1016
1354
  "application/json": {
1017
1355
  "schema": {
1018
- "$ref": "#/components/schemas/ActivityItem"
1356
+ "$ref": "#/components/schemas/BaseActivityItem"
1019
1357
  }
1020
1358
  }
1021
1359
  }
@@ -1221,9 +1559,6 @@
1221
1559
  },
1222
1560
  {
1223
1561
  "$ref": "#/components/parameters/AsyncOperationQueryParam"
1224
- },
1225
- {
1226
- "$ref": "#/components/parameters/ActivityIdQueryParam"
1227
1562
  }
1228
1563
  ],
1229
1564
  "requestBody": {
@@ -1267,6 +1602,59 @@
1267
1602
  }
1268
1603
  }
1269
1604
  }
1605
+ },
1606
+ "delete": {
1607
+ "operationId": "removeRelations",
1608
+ "summary": "removeRelations",
1609
+ "description": "Disassociate one or more entities to parent entity by removing items to a relation attribute",
1610
+ "tags": [
1611
+ "Relations"
1612
+ ],
1613
+ "parameters": [
1614
+ {
1615
+ "$ref": "#/components/parameters/EntitySlugPathParam"
1616
+ },
1617
+ {
1618
+ "$ref": "#/components/parameters/EntityIdPathParam"
1619
+ },
1620
+ {
1621
+ "$ref": "#/components/parameters/AsyncOperationQueryParam"
1622
+ }
1623
+ ],
1624
+ "requestBody": {
1625
+ "content": {
1626
+ "application/json": {
1627
+ "schema": {
1628
+ "type": "array",
1629
+ "items": {
1630
+ "$ref": "#/components/schemas/RelationItem"
1631
+ }
1632
+ },
1633
+ "example": [
1634
+ {
1635
+ "attribute": "contacts",
1636
+ "entity_id": "e8878f62-2d3d-4c86-bfe7-01a4180ff048",
1637
+ "_tags": [
1638
+ "billing"
1639
+ ]
1640
+ },
1641
+ {
1642
+ "attribute": "contacts",
1643
+ "entity_id": "ee8a2af9-fb36-4981-b848-4e65275851af"
1644
+ },
1645
+ {
1646
+ "attribute": "opportunities",
1647
+ "entity_id": "30990430-a53d-41a2-83db-2de072dc4dd4"
1648
+ }
1649
+ ]
1650
+ }
1651
+ }
1652
+ },
1653
+ "responses": {
1654
+ "204": {
1655
+ "description": "Relations deleted with success."
1656
+ }
1657
+ }
1270
1658
  }
1271
1659
  },
1272
1660
  "/v2/entity/{slug}/{id}/relations": {
@@ -1473,6 +1861,7 @@
1473
1861
  "application/json": {
1474
1862
  "schema": {
1475
1863
  "type": "object",
1864
+ "additionalProperties": false,
1476
1865
  "properties": {
1477
1866
  "_tags": {
1478
1867
  "type": "array",
@@ -1651,6 +2040,46 @@
1651
2040
  "schema": {
1652
2041
  "$ref": "#/components/schemas/EntitySlug"
1653
2042
  }
2043
+ },
2044
+ {
2045
+ "in": "query",
2046
+ "name": "sort",
2047
+ "description": "The sort key to use if present",
2048
+ "required": false,
2049
+ "schema": {
2050
+ "type": "string",
2051
+ "default": "name:asc"
2052
+ }
2053
+ },
2054
+ {
2055
+ "in": "query",
2056
+ "name": "from",
2057
+ "required": false,
2058
+ "schema": {
2059
+ "type": "integer",
2060
+ "minimum": 0,
2061
+ "default": 0
2062
+ }
2063
+ },
2064
+ {
2065
+ "in": "query",
2066
+ "name": "size",
2067
+ "description": "Number of saved views to return",
2068
+ "required": false,
2069
+ "schema": {
2070
+ "type": "integer",
2071
+ "default": 80,
2072
+ "minimum": 1,
2073
+ "maximum": 250
2074
+ }
2075
+ },
2076
+ {
2077
+ "in": "query",
2078
+ "name": "fields",
2079
+ "required": false,
2080
+ "schema": {
2081
+ "$ref": "#/components/schemas/FieldsParam"
2082
+ }
1654
2083
  }
1655
2084
  ],
1656
2085
  "responses": {
@@ -1659,15 +2088,7 @@
1659
2088
  "content": {
1660
2089
  "application/json": {
1661
2090
  "schema": {
1662
- "type": "object",
1663
- "properties": {
1664
- "results": {
1665
- "type": "array",
1666
- "items": {
1667
- "$ref": "#/components/schemas/SavedViewItem"
1668
- }
1669
- }
1670
- }
2091
+ "$ref": "#/components/schemas/ListSavedViewsResults"
1671
2092
  }
1672
2093
  }
1673
2094
  }
@@ -1725,12 +2146,7 @@
1725
2146
  "content": {
1726
2147
  "application/json": {
1727
2148
  "schema": {
1728
- "type": "object",
1729
- "properties": {
1730
- "view": {
1731
- "$ref": "#/components/schemas/SavedViewItem"
1732
- }
1733
- }
2149
+ "$ref": "#/components/schemas/SavedViewItem"
1734
2150
  }
1735
2151
  }
1736
2152
  }
@@ -1753,7 +2169,7 @@
1753
2169
  "content": {
1754
2170
  "application/json": {
1755
2171
  "schema": {
1756
- "$ref": "#/components/schemas/SavedView"
2172
+ "$ref": "#/components/schemas/SavedViewItem"
1757
2173
  }
1758
2174
  }
1759
2175
  }
@@ -1820,17 +2236,28 @@
1820
2236
  }
1821
2237
  }
1822
2238
  },
1823
- "/v1/entity/listTaxonomies": {
2239
+ "/v1/entity/taxonomies": {
1824
2240
  "get": {
1825
2241
  "operationId": "listTaxonomies",
1826
2242
  "summary": "listTaxonomies",
1827
- "description": "List taxonomies in an organisation",
2243
+ "description": "List taxonomies in an organization",
2244
+ "parameters": [
2245
+ {
2246
+ "in": "query",
2247
+ "name": "include_disabled",
2248
+ "description": "Include disabled taxonomies",
2249
+ "schema": {
2250
+ "type": "boolean",
2251
+ "default": false
2252
+ }
2253
+ }
2254
+ ],
1828
2255
  "tags": [
1829
2256
  "Taxonomy"
1830
2257
  ],
1831
2258
  "responses": {
1832
2259
  "200": {
1833
- "description": "Returns list of taxonomies in an organisation",
2260
+ "description": "Returns list of taxonomies in an organization",
1834
2261
  "content": {
1835
2262
  "application/json": {
1836
2263
  "schema": {
@@ -1848,6 +2275,38 @@
1848
2275
  }
1849
2276
  }
1850
2277
  }
2278
+ },
2279
+ "post": {
2280
+ "operationId": "createTaxonomy",
2281
+ "summary": "createTaxonomy",
2282
+ "description": "Create a new taxonomy",
2283
+ "tags": [
2284
+ "Taxonomy"
2285
+ ],
2286
+ "requestBody": {
2287
+ "content": {
2288
+ "application/json": {
2289
+ "schema": {
2290
+ "$ref": "#/components/schemas/Taxonomy"
2291
+ }
2292
+ }
2293
+ }
2294
+ },
2295
+ "responses": {
2296
+ "201": {
2297
+ "description": "Taxonomy created",
2298
+ "content": {
2299
+ "application/json": {
2300
+ "schema": {
2301
+ "$ref": "#/components/schemas/Taxonomy"
2302
+ }
2303
+ }
2304
+ }
2305
+ },
2306
+ "409": {
2307
+ "description": "Taxonomy already exists"
2308
+ }
2309
+ }
1851
2310
  }
1852
2311
  },
1853
2312
  "/v1/entity/taxonomies/{taxonomySlug}": {
@@ -1875,6 +2334,66 @@
1875
2334
  }
1876
2335
  }
1877
2336
  }
2337
+ },
2338
+ "put": {
2339
+ "operationId": "updateTaxonomy",
2340
+ "summary": "updateTaxonomy",
2341
+ "description": "Update a taxonomy",
2342
+ "tags": [
2343
+ "Taxonomy"
2344
+ ],
2345
+ "parameters": [
2346
+ {
2347
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2348
+ }
2349
+ ],
2350
+ "requestBody": {
2351
+ "content": {
2352
+ "application/json": {
2353
+ "schema": {
2354
+ "$ref": "#/components/schemas/Taxonomy"
2355
+ }
2356
+ }
2357
+ }
2358
+ },
2359
+ "responses": {
2360
+ "200": {
2361
+ "description": "Taxonomy updated",
2362
+ "content": {
2363
+ "application/json": {
2364
+ "schema": {
2365
+ "$ref": "#/components/schemas/Taxonomy"
2366
+ }
2367
+ }
2368
+ }
2369
+ }
2370
+ }
2371
+ },
2372
+ "delete": {
2373
+ "operationId": "deleteTaxonomy",
2374
+ "summary": "deleteTaxonomy",
2375
+ "description": "Delete a taxonomy",
2376
+ "tags": [
2377
+ "Taxonomy"
2378
+ ],
2379
+ "parameters": [
2380
+ {
2381
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2382
+ },
2383
+ {
2384
+ "in": "query",
2385
+ "name": "permanent",
2386
+ "description": "If true, the taxonomy will be permanently deleted",
2387
+ "schema": {
2388
+ "type": "boolean"
2389
+ }
2390
+ }
2391
+ ],
2392
+ "responses": {
2393
+ "204": {
2394
+ "description": "Taxonomy deleted"
2395
+ }
2396
+ }
1878
2397
  }
1879
2398
  },
1880
2399
  "/v1/entity/taxonomies/{taxonomySlug}:autocomplete": {
@@ -1898,137 +2417,620 @@
1898
2417
  }
1899
2418
  },
1900
2419
  {
1901
- "in": "query",
1902
- "name": "size",
1903
- "description": "Minimum number of results to return",
2420
+ "in": "query",
2421
+ "name": "size",
2422
+ "description": "Minimum number of results to return",
2423
+ "schema": {
2424
+ "type": "number"
2425
+ }
2426
+ }
2427
+ ],
2428
+ "responses": {
2429
+ "200": {
2430
+ "description": "Taxonomy classifications",
2431
+ "content": {
2432
+ "application/json": {
2433
+ "schema": {
2434
+ "type": "object",
2435
+ "properties": {
2436
+ "results": {
2437
+ "type": "array",
2438
+ "items": {
2439
+ "$ref": "#/components/schemas/TaxonomyClassification"
2440
+ }
2441
+ }
2442
+ }
2443
+ }
2444
+ }
2445
+ }
2446
+ }
2447
+ }
2448
+ }
2449
+ },
2450
+ "/v1/entity/taxonomies/classifications:search": {
2451
+ "post": {
2452
+ "operationId": "taxonomiesClassificationsSearch",
2453
+ "summary": "taxonomiesClassificationsSearch",
2454
+ "description": "List taxonomy classifications in an organization based on taxonomy slug",
2455
+ "tags": [
2456
+ "Taxonomy"
2457
+ ],
2458
+ "parameters": [
2459
+ {
2460
+ "$ref": "#/components/parameters/TaxonomySlugQueryParamOptional"
2461
+ },
2462
+ {
2463
+ "in": "query",
2464
+ "name": "query",
2465
+ "description": "Input to search",
2466
+ "schema": {
2467
+ "type": "string",
2468
+ "example": "sales"
2469
+ }
2470
+ }
2471
+ ],
2472
+ "requestBody": {
2473
+ "content": {
2474
+ "application/json": {
2475
+ "schema": {
2476
+ "type": "object",
2477
+ "properties": {
2478
+ "classificationIds": {
2479
+ "type": "array",
2480
+ "items": {
2481
+ "$ref": "#/components/schemas/ClassificationId"
2482
+ }
2483
+ }
2484
+ }
2485
+ }
2486
+ }
2487
+ }
2488
+ },
2489
+ "responses": {
2490
+ "200": {
2491
+ "description": "Returns the classifications for the taxonomy slug provided",
2492
+ "content": {
2493
+ "application/json": {
2494
+ "schema": {
2495
+ "type": "object",
2496
+ "properties": {
2497
+ "results": {
2498
+ "type": "array",
2499
+ "items": {
2500
+ "$ref": "#/components/schemas/TaxonomyClassification"
2501
+ }
2502
+ }
2503
+ }
2504
+ }
2505
+ }
2506
+ }
2507
+ }
2508
+ }
2509
+ }
2510
+ },
2511
+ "/v1/entity/taxonomies/{taxonomySlug}/classifications": {
2512
+ "post": {
2513
+ "operationId": "updateClassificationsForTaxonomy",
2514
+ "summary": "updateClassificationsForTaxonomy",
2515
+ "description": "Update the classifications for a taxonomy",
2516
+ "tags": [
2517
+ "Taxonomy"
2518
+ ],
2519
+ "parameters": [
2520
+ {
2521
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2522
+ }
2523
+ ],
2524
+ "requestBody": {
2525
+ "content": {
2526
+ "application/json": {
2527
+ "schema": {
2528
+ "$ref": "#/components/schemas/ClassificationsUpdate"
2529
+ }
2530
+ }
2531
+ }
2532
+ },
2533
+ "responses": {
2534
+ "200": {
2535
+ "description": "Taxonomies classifications",
2536
+ "content": {
2537
+ "application/json": {
2538
+ "schema": {
2539
+ "type": "object",
2540
+ "properties": {
2541
+ "created": {
2542
+ "type": "array",
2543
+ "items": {
2544
+ "$ref": "#/components/schemas/TaxonomyClassification"
2545
+ }
2546
+ },
2547
+ "updated": {
2548
+ "type": "array",
2549
+ "items": {
2550
+ "$ref": "#/components/schemas/TaxonomyClassification"
2551
+ }
2552
+ },
2553
+ "deleted": {
2554
+ "type": "object",
2555
+ "items": {
2556
+ "$ref": "#/components/schemas/ClassificationId"
2557
+ }
2558
+ }
2559
+ }
2560
+ }
2561
+ }
2562
+ }
2563
+ }
2564
+ }
2565
+ }
2566
+ },
2567
+ "/v1/entity/schemas/{slug}/taxonomy/{taxonomySlug}": {
2568
+ "get": {
2569
+ "operationId": "listTaxonomyClassificationsForSchema",
2570
+ "summary": "listTaxonomyClassificationsForSchema",
2571
+ "description": "List taxonomy classifications for a given schema",
2572
+ "tags": [
2573
+ "Schemas"
2574
+ ],
2575
+ "parameters": [
2576
+ {
2577
+ "$ref": "#/components/parameters/EntitySlugPathParam"
2578
+ },
2579
+ {
2580
+ "$ref": "#/components/parameters/TaxonomySlugPathParam"
2581
+ },
2582
+ {
2583
+ "in": "query",
2584
+ "name": "query",
2585
+ "schema": {
2586
+ "type": "string"
2587
+ }
2588
+ },
2589
+ {
2590
+ "in": "query",
2591
+ "name": "size",
2592
+ "schema": {
2593
+ "type": "number"
2594
+ }
2595
+ }
2596
+ ],
2597
+ "responses": {
2598
+ "200": {
2599
+ "description": "List of taxonomy classifications",
2600
+ "content": {
2601
+ "application/json": {
2602
+ "schema": {
2603
+ "type": "object",
2604
+ "properties": {
2605
+ "results": {
2606
+ "type": "array",
2607
+ "items": {
2608
+ "$ref": "#/components/schemas/TaxonomyClassification"
2609
+ }
2610
+ }
2611
+ }
2612
+ }
2613
+ }
2614
+ }
2615
+ }
2616
+ }
2617
+ }
2618
+ },
2619
+ "/v2/entity/taxonomies/classifications/{classificationSlug}": {
2620
+ "get": {
2621
+ "operationId": "getTaxonomyClassification",
2622
+ "summary": "getTaxonomyClassification",
2623
+ "description": "Get a classification for a taxonomy",
2624
+ "tags": [
2625
+ "Taxonomy"
2626
+ ],
2627
+ "parameters": [
2628
+ {
2629
+ "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam"
2630
+ }
2631
+ ],
2632
+ "responses": {
2633
+ "200": {
2634
+ "description": "Taxonomy classification",
2635
+ "content": {
2636
+ "application/json": {
2637
+ "schema": {
2638
+ "$ref": "#/components/schemas/TaxonomyClassification"
2639
+ }
2640
+ }
2641
+ }
2642
+ },
2643
+ "404": {
2644
+ "description": "Taxonomy classification not found"
2645
+ }
2646
+ }
2647
+ },
2648
+ "put": {
2649
+ "operationId": "updateTaxonomyClassification",
2650
+ "summary": "updateTaxonomyClassification",
2651
+ "description": "Update a classification for a taxonomy",
2652
+ "tags": [
2653
+ "Taxonomy"
2654
+ ],
2655
+ "parameters": [
2656
+ {
2657
+ "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam"
2658
+ }
2659
+ ],
2660
+ "requestBody": {
2661
+ "content": {
2662
+ "application/json": {
2663
+ "schema": {
2664
+ "$ref": "#/components/schemas/TaxonomyClassification"
2665
+ }
2666
+ }
2667
+ }
2668
+ },
2669
+ "responses": {
2670
+ "200": {
2671
+ "description": "Taxonomy classification updated",
2672
+ "content": {
2673
+ "application/json": {
2674
+ "schema": {
2675
+ "$ref": "#/components/schemas/TaxonomyClassification"
2676
+ }
2677
+ }
2678
+ }
2679
+ },
2680
+ "404": {
2681
+ "description": "Taxonomy classification not found"
2682
+ }
2683
+ }
2684
+ },
2685
+ "delete": {
2686
+ "operationId": "deleteTaxonomyClassification",
2687
+ "summary": "deleteTaxonomyClassification",
2688
+ "description": "Delete a classification for a taxonomy",
2689
+ "tags": [
2690
+ "Taxonomy"
2691
+ ],
2692
+ "parameters": [
2693
+ {
2694
+ "$ref": "#/components/parameters/TaxonomyClassificationSlugPathParam"
2695
+ }
2696
+ ],
2697
+ "responses": {
2698
+ "200": {
2699
+ "description": "Taxonomy classification deleted",
2700
+ "content": {
2701
+ "application/json": {
2702
+ "schema": {
2703
+ "$ref": "#/components/schemas/TaxonomyClassification"
2704
+ }
2705
+ }
2706
+ }
2707
+ }
2708
+ }
2709
+ }
2710
+ },
2711
+ "/v1/entity/schemas/attributes/{composite_id}": {
2712
+ "get": {
2713
+ "operationId": "getSchemaAttribute",
2714
+ "summary": "getSchemaAttribute",
2715
+ "description": "Get a schema attribute from given attribute ID",
2716
+ "tags": [
2717
+ "Schemas"
2718
+ ],
2719
+ "parameters": [
2720
+ {
2721
+ "name": "composite_id",
2722
+ "description": "Schema Slug and the Attribute ID",
2723
+ "in": "path",
2724
+ "required": true,
2725
+ "schema": {
2726
+ "type": "string",
2727
+ "pattern": "^.+:.+$",
2728
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2729
+ }
2730
+ }
2731
+ ],
2732
+ "responses": {
2733
+ "200": {
2734
+ "description": "Success",
2735
+ "content": {
2736
+ "application/json": {
2737
+ "schema": {
2738
+ "$ref": "#/components/schemas/AttributeWithCompositeID"
2739
+ }
2740
+ }
2741
+ }
2742
+ }
2743
+ }
2744
+ },
2745
+ "put": {
2746
+ "operationId": "putSchemaAttribute",
2747
+ "summary": "putSchemaAttribute",
2748
+ "description": "Updates an attribute in the schema",
2749
+ "tags": [
2750
+ "Schemas"
2751
+ ],
2752
+ "parameters": [
2753
+ {
2754
+ "name": "composite_id",
2755
+ "description": "Schema Slug and the Attribute ID",
2756
+ "in": "path",
2757
+ "required": true,
2758
+ "schema": {
2759
+ "type": "string",
2760
+ "pattern": "^.+:.+$",
2761
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2762
+ }
2763
+ }
2764
+ ],
2765
+ "requestBody": {
2766
+ "content": {
2767
+ "application/json": {
2768
+ "schema": {
2769
+ "$ref": "#/components/schemas/AttributeWithCompositeID"
2770
+ }
2771
+ }
2772
+ }
2773
+ },
2774
+ "responses": {
2775
+ "200": {
2776
+ "description": "Success",
2777
+ "content": {
2778
+ "application/json": {
2779
+ "schema": {
2780
+ "$ref": "#/components/schemas/AttributeWithCompositeID"
2781
+ }
2782
+ }
2783
+ }
2784
+ }
2785
+ }
2786
+ },
2787
+ "delete": {
2788
+ "operationId": "deleteSchemaAttribute",
2789
+ "summary": "deleteSchemaAttribute",
2790
+ "description": "Deletes an attribute from a schema",
2791
+ "tags": [
2792
+ "Schemas"
2793
+ ],
2794
+ "parameters": [
2795
+ {
2796
+ "name": "composite_id",
2797
+ "description": "Schema Slug and the Attribute ID",
2798
+ "in": "path",
2799
+ "required": true,
2800
+ "schema": {
2801
+ "type": "string",
2802
+ "pattern": "^.+:.+$",
2803
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2804
+ }
2805
+ }
2806
+ ],
2807
+ "responses": {
2808
+ "200": {
2809
+ "description": "Success",
2810
+ "content": {
2811
+ "application/json": {
2812
+ "schema": {
2813
+ "$ref": "#/components/schemas/AttributeWithCompositeID"
2814
+ }
2815
+ }
2816
+ }
2817
+ }
2818
+ }
2819
+ }
2820
+ },
2821
+ "/v1/entity/schemas/capabilities/{composite_id}": {
2822
+ "get": {
2823
+ "operationId": "getSchemaCapability",
2824
+ "summary": "getSchemaCapability",
2825
+ "description": "Get a schema capability from given capability ID",
2826
+ "tags": [
2827
+ "Schemas"
2828
+ ],
2829
+ "parameters": [
2830
+ {
2831
+ "name": "composite_id",
2832
+ "description": "Schema Slug and the Attribute ID",
2833
+ "in": "path",
2834
+ "required": true,
2835
+ "schema": {
2836
+ "type": "string",
2837
+ "pattern": "^.+:.+$",
2838
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2839
+ }
2840
+ }
2841
+ ],
2842
+ "responses": {
2843
+ "200": {
2844
+ "description": "Success",
2845
+ "content": {
2846
+ "application/json": {
2847
+ "schema": {
2848
+ "$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
2849
+ }
2850
+ }
2851
+ }
2852
+ }
2853
+ }
2854
+ },
2855
+ "put": {
2856
+ "operationId": "putSchemaCapability",
2857
+ "summary": "putSchemaCapability",
2858
+ "description": "Adds or updates an capability in the schema",
2859
+ "tags": [
2860
+ "Schemas"
2861
+ ],
2862
+ "parameters": [
2863
+ {
2864
+ "name": "composite_id",
2865
+ "description": "Schema Slug and the Attribute ID",
2866
+ "in": "path",
2867
+ "required": true,
2868
+ "schema": {
2869
+ "type": "string",
2870
+ "pattern": "^.+:.+$",
2871
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2872
+ }
2873
+ }
2874
+ ],
2875
+ "requestBody": {
2876
+ "content": {
2877
+ "application/json": {
2878
+ "schema": {
2879
+ "$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
2880
+ }
2881
+ }
2882
+ }
2883
+ },
2884
+ "responses": {
2885
+ "200": {
2886
+ "description": "Success",
2887
+ "content": {
2888
+ "application/json": {
2889
+ "schema": {
2890
+ "$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
2891
+ }
2892
+ }
2893
+ }
2894
+ }
2895
+ }
2896
+ },
2897
+ "delete": {
2898
+ "operationId": "deleteSchemaCapability",
2899
+ "summary": "deleteSchemaCapability",
2900
+ "description": "Deletes a Capability from a schema",
2901
+ "tags": [
2902
+ "Schemas"
2903
+ ],
2904
+ "parameters": [
2905
+ {
2906
+ "name": "composite_id",
2907
+ "description": "Schema Slug and the Attribute ID",
2908
+ "in": "path",
2909
+ "required": true,
2910
+ "schema": {
2911
+ "type": "string",
2912
+ "pattern": "^.+:.+$",
2913
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2914
+ }
2915
+ }
2916
+ ],
2917
+ "responses": {
2918
+ "200": {
2919
+ "description": "Success",
2920
+ "content": {
2921
+ "application/json": {
2922
+ "schema": {
2923
+ "$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
2924
+ }
2925
+ }
2926
+ }
2927
+ }
2928
+ }
2929
+ }
2930
+ },
2931
+ "/v1/entity/schemas/group/{composite_id}": {
2932
+ "get": {
2933
+ "operationId": "getSchemaGroup",
2934
+ "summary": "getSchemaGroup",
2935
+ "description": "Get a schema group from given group composite ID",
2936
+ "tags": [
2937
+ "Schemas"
2938
+ ],
2939
+ "parameters": [
2940
+ {
2941
+ "name": "composite_id",
2942
+ "description": "Schema Slug and the Group ID",
2943
+ "in": "path",
2944
+ "required": true,
1904
2945
  "schema": {
1905
- "type": "number"
2946
+ "type": "string",
2947
+ "pattern": "^.+:.+$",
2948
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
1906
2949
  }
1907
2950
  }
1908
2951
  ],
1909
2952
  "responses": {
1910
2953
  "200": {
1911
- "description": "Taxonomy classifications",
2954
+ "description": "Success",
1912
2955
  "content": {
1913
2956
  "application/json": {
1914
2957
  "schema": {
1915
- "type": "object",
1916
- "properties": {
1917
- "results": {
1918
- "type": "array",
1919
- "items": {
1920
- "$ref": "#/components/schemas/TaxonomyClassification"
1921
- }
1922
- }
1923
- }
2958
+ "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID"
1924
2959
  }
1925
2960
  }
1926
2961
  }
1927
2962
  }
1928
2963
  }
1929
- }
1930
- },
1931
- "/v1/entity/taxonomies/classifications:search": {
1932
- "post": {
1933
- "operationId": "taxonomiesClassificationsSearch",
1934
- "summary": "taxonomiesClassificationsSearch",
1935
- "description": "List taxonomy classifications in an organisation based on taxonomy slug",
2964
+ },
2965
+ "put": {
2966
+ "operationId": "putSchemaGroup",
2967
+ "summary": "putSchemaGroup",
2968
+ "description": "Adds or updates an capability in the schema",
1936
2969
  "tags": [
1937
- "Taxonomy"
2970
+ "Schemas"
1938
2971
  ],
1939
2972
  "parameters": [
1940
2973
  {
1941
- "$ref": "#/components/parameters/TaxonomySlugQueryParam"
2974
+ "name": "composite_id",
2975
+ "description": "Schema Slug and the Group ID",
2976
+ "in": "path",
2977
+ "required": true,
2978
+ "schema": {
2979
+ "type": "string",
2980
+ "pattern": "^.+:.+$",
2981
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2982
+ }
1942
2983
  }
1943
2984
  ],
1944
2985
  "requestBody": {
1945
2986
  "content": {
1946
2987
  "application/json": {
1947
2988
  "schema": {
1948
- "type": "object",
1949
- "properties": {
1950
- "classificationIds": {
1951
- "type": "array",
1952
- "items": {
1953
- "$ref": "#/components/schemas/ClassificationId"
1954
- }
1955
- }
1956
- }
2989
+ "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID"
1957
2990
  }
1958
2991
  }
1959
2992
  }
1960
2993
  },
1961
2994
  "responses": {
1962
2995
  "200": {
1963
- "description": "Returns list of taxonomy classifications",
2996
+ "description": "Success",
1964
2997
  "content": {
1965
2998
  "application/json": {
1966
2999
  "schema": {
1967
- "type": "object",
1968
- "properties": {
1969
- "results": {
1970
- "type": "array",
1971
- "items": {
1972
- "$ref": "#/components/schemas/TaxonomyClassification"
1973
- }
1974
- }
1975
- }
3000
+ "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID"
1976
3001
  }
1977
3002
  }
1978
3003
  }
1979
3004
  }
1980
3005
  }
1981
- }
1982
- },
1983
- "/v1/entity/taxonomies/{taxonomySlug}/classifications": {
1984
- "post": {
1985
- "operationId": "updateClassificationsForTaxonomy",
1986
- "summary": "updateClassificationsForTaxonomy",
1987
- "description": "Update taxonomies in an organisation based in taxonomy slug",
3006
+ },
3007
+ "delete": {
3008
+ "operationId": "deleteSchemaGroup",
3009
+ "summary": "deleteSchemaGroup",
3010
+ "description": "Deletes a Capability from a schema",
1988
3011
  "tags": [
1989
- "Taxonomy"
3012
+ "Schemas"
1990
3013
  ],
1991
3014
  "parameters": [
1992
3015
  {
1993
- "$ref": "#/components/parameters/TaxonomySlugPathParam"
1994
- }
1995
- ],
1996
- "requestBody": {
1997
- "content": {
1998
- "application/json": {
1999
- "schema": {
2000
- "$ref": "#/components/schemas/ClassificationsUpdate"
2001
- }
3016
+ "name": "composite_id",
3017
+ "description": "Schema Slug and the Group ID",
3018
+ "in": "path",
3019
+ "required": true,
3020
+ "schema": {
3021
+ "type": "string",
3022
+ "pattern": "^.+:.+$",
3023
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
2002
3024
  }
2003
3025
  }
2004
- },
3026
+ ],
2005
3027
  "responses": {
2006
3028
  "200": {
2007
- "description": "Taxonomies classifications",
3029
+ "description": "Success",
2008
3030
  "content": {
2009
3031
  "application/json": {
2010
3032
  "schema": {
2011
- "type": "object",
2012
- "properties": {
2013
- "created": {
2014
- "type": "array",
2015
- "items": {
2016
- "$ref": "#/components/schemas/TaxonomyClassification"
2017
- }
2018
- },
2019
- "updated": {
2020
- "type": "array",
2021
- "items": {
2022
- "$ref": "#/components/schemas/TaxonomyClassification"
2023
- }
2024
- },
2025
- "deleted": {
2026
- "type": "object",
2027
- "items": {
2028
- "$ref": "#/components/schemas/ClassificationId"
2029
- }
2030
- }
2031
- }
3033
+ "$ref": "#/components/schemas/EntitySchemaGroupWithCompositeID"
2032
3034
  }
2033
3035
  }
2034
3036
  }
@@ -2225,72 +3227,19 @@
2225
3227
  },
2226
3228
  "group_settings": {
2227
3229
  "type": "array",
2228
- "description": "A dictionary of Group Titles and associated settings if present.",
3230
+ "description": "A list of Group Titles and associated settings if present.",
2229
3231
  "items": {
2230
- "type": "object",
2231
- "properties": {
2232
- "label": {
2233
- "type": "string"
2234
- },
2235
- "id": {
2236
- "type": "string"
2237
- },
2238
- "expanded": {
2239
- "type": "boolean"
2240
- },
2241
- "render_condition": {
2242
- "type": "string",
2243
- "example": "_is_composite_price = \"false\""
2244
- },
2245
- "order": {
2246
- "description": "Render order of the group",
2247
- "type": "integer",
2248
- "default": 0
2249
- },
2250
- "feature_flag": {
2251
- "type": "string",
2252
- "example": "FF_MY_FEATURE_FLAG",
2253
- "description": "This group should only be active when the feature flag is enabled"
2254
- },
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
- }
2261
- },
2262
- "info_tooltip_title": {
2263
- "type": "object",
2264
- "properties": {
2265
- "key": {
2266
- "type": "string"
2267
- },
2268
- "default": {
2269
- "type": "string"
2270
- }
2271
- }
2272
- },
2273
- "_purpose": {
2274
- "type": "array",
2275
- "items": {
2276
- "$ref": "#/components/schemas/ClassificationId"
2277
- }
2278
- }
2279
- },
2280
- "required": [
2281
- "label",
2282
- "id"
2283
- ]
3232
+ "$ref": "#/components/schemas/EntitySchemaGroup"
2284
3233
  },
2285
3234
  "example": [
2286
3235
  {
2287
- "id": "Contact Details",
3236
+ "id": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14",
2288
3237
  "label": "Contact Details",
2289
3238
  "expanded": true,
2290
3239
  "order": 1
2291
3240
  },
2292
3241
  {
2293
- "id": "Address Details",
3242
+ "id": "e9a1ae28-27ba-4fa0-a79c-e279cc5c4a6e",
2294
3243
  "label": "Address Details",
2295
3244
  "expanded": false,
2296
3245
  "order": 2,
@@ -2370,6 +3319,12 @@
2370
3319
  }
2371
3320
  ]
2372
3321
  },
3322
+ "_purpose": {
3323
+ "type": "array",
3324
+ "items": {
3325
+ "type": "string"
3326
+ }
3327
+ },
2373
3328
  "explicit_search_mappings": {
2374
3329
  "$ref": "#/components/schemas/SearchMappings"
2375
3330
  }
@@ -2417,6 +3372,156 @@
2417
3372
  }
2418
3373
  ]
2419
3374
  },
3375
+ "EntityTableFilterSearch": {
3376
+ "type": "object",
3377
+ "properties": {
3378
+ "label": {
3379
+ "type": "string",
3380
+ "description": "The label for the search filter"
3381
+ },
3382
+ "type": {
3383
+ "type": "string",
3384
+ "description": "The type for the search filter"
3385
+ },
3386
+ "value": {
3387
+ "type": "string",
3388
+ "description": "The value for the search filter"
3389
+ }
3390
+ },
3391
+ "required": [
3392
+ "label",
3393
+ "type",
3394
+ "value"
3395
+ ]
3396
+ },
3397
+ "EntityTableFilterOption": {
3398
+ "type": "object",
3399
+ "properties": {
3400
+ "type": {
3401
+ "type": "string",
3402
+ "description": "The type of filter option",
3403
+ "enum": [
3404
+ "search",
3405
+ "filter"
3406
+ ]
3407
+ },
3408
+ "label": {
3409
+ "type": "string",
3410
+ "description": "The label for the filter option"
3411
+ },
3412
+ "label_type": {
3413
+ "type": "string",
3414
+ "description": "The label type for the filter option"
3415
+ },
3416
+ "name": {
3417
+ "type": "string",
3418
+ "description": "The name for the filter option"
3419
+ },
3420
+ "group": {
3421
+ "type": "string",
3422
+ "description": "The group for the filter option"
3423
+ },
3424
+ "allowedSchemas": {
3425
+ "type": "array",
3426
+ "items": {
3427
+ "type": "string",
3428
+ "description": "The allowed schemas for the filter option"
3429
+ }
3430
+ },
3431
+ "relatedOptions": {
3432
+ "type": "array",
3433
+ "items": {
3434
+ "$ref": "#/components/schemas/EntityTableFilterOption"
3435
+ },
3436
+ "description": "The related options for the filter option"
3437
+ }
3438
+ },
3439
+ "required": [
3440
+ "label"
3441
+ ]
3442
+ },
3443
+ "EntitySchemaGroup": {
3444
+ "type": "object",
3445
+ "properties": {
3446
+ "label": {
3447
+ "type": "string",
3448
+ "example": "Contact Details"
3449
+ },
3450
+ "id": {
3451
+ "type": "string",
3452
+ "example": "e18a532b-ae79-4d86-a6a5-e5dbfb579d14"
3453
+ },
3454
+ "order": {
3455
+ "description": "Render order of the group",
3456
+ "type": "integer",
3457
+ "default": 0
3458
+ },
3459
+ "expanded": {
3460
+ "description": "Expanded by default",
3461
+ "type": "boolean",
3462
+ "default": false
3463
+ },
3464
+ "render_condition": {
3465
+ "description": "Only render group when render_condition resolves to true",
3466
+ "type": "string",
3467
+ "example": "_is_composite_price = \"false\""
3468
+ },
3469
+ "_purpose": {
3470
+ "description": "Only render group when one of the purposes is enabled",
3471
+ "type": "array",
3472
+ "items": {
3473
+ "$ref": "#/components/schemas/ClassificationId"
3474
+ }
3475
+ },
3476
+ "feature_flag": {
3477
+ "type": "string",
3478
+ "example": "FF_MY_FEATURE_FLAG",
3479
+ "description": "This group should only be active when the feature flag is enabled"
3480
+ },
3481
+ "settings_flag": {
3482
+ "type": "array",
3483
+ "description": "This group should only be active when all the settings have the correct value",
3484
+ "items": {
3485
+ "$ref": "#/components/schemas/SettingFlag"
3486
+ }
3487
+ },
3488
+ "info_tooltip_title": {
3489
+ "type": "object",
3490
+ "properties": {
3491
+ "key": {
3492
+ "description": "Translation key for info tooltip",
3493
+ "type": "string"
3494
+ },
3495
+ "default": {
3496
+ "description": "Default string for info tooltip",
3497
+ "type": "string"
3498
+ }
3499
+ }
3500
+ }
3501
+ },
3502
+ "required": [
3503
+ "label",
3504
+ "id"
3505
+ ]
3506
+ },
3507
+ "EntitySchemaGroupWithCompositeID": {
3508
+ "allOf": [
3509
+ {
3510
+ "$ref": "#/components/schemas/EntitySchemaGroup"
3511
+ },
3512
+ {
3513
+ "type": "object",
3514
+ "description": "a readonly computed ID for the group including schema slug and the group ID",
3515
+ "properties": {
3516
+ "composite_id": {
3517
+ "type": "string",
3518
+ "readOnly": true,
3519
+ "example": "contact:e18a532b-ae79-4d86-a6a5-e5dbfb579d14"
3520
+ }
3521
+ }
3522
+ }
3523
+ ]
3524
+ },
2420
3525
  "Attribute": {
2421
3526
  "anyOf": [
2422
3527
  {
@@ -2505,9 +3610,32 @@
2505
3610
  }
2506
3611
  ]
2507
3612
  },
3613
+ "AttributeWithCompositeID": {
3614
+ "allOf": [
3615
+ {
3616
+ "$ref": "#/components/schemas/Attribute"
3617
+ },
3618
+ {
3619
+ "type": "object",
3620
+ "description": "a readonly computed ID for the attribute including schema slug and the attribute ID",
3621
+ "properties": {
3622
+ "composite_id": {
3623
+ "type": "string",
3624
+ "readOnly": true,
3625
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
3626
+ }
3627
+ }
3628
+ }
3629
+ ]
3630
+ },
2508
3631
  "BaseAttribute": {
2509
3632
  "type": "object",
2510
3633
  "properties": {
3634
+ "id": {
3635
+ "type": "string",
3636
+ "description": "ID for the entity attribute",
3637
+ "example": "d5839b94-ba20-4225-a78e-76951d352bd6"
3638
+ },
2511
3639
  "name": {
2512
3640
  "type": "string"
2513
3641
  },
@@ -2607,8 +3735,7 @@
2607
3735
  },
2608
3736
  "protected": {
2609
3737
  "description": "Setting to `true` prevents the attribute from being modified / deleted",
2610
- "type": "boolean",
2611
- "default": true
3738
+ "type": "boolean"
2612
3739
  },
2613
3740
  "info_helpers": {
2614
3741
  "description": "A set of configurations meant to document and assist the user in filling the attribute.",
@@ -3522,6 +4649,11 @@
3522
4649
  },
3523
4650
  "format": {
3524
4651
  "type": "string"
4652
+ },
4653
+ "show_separator": {
4654
+ "description": "Whether or not to show a thousands separator",
4655
+ "type": "boolean",
4656
+ "default": true
3525
4657
  }
3526
4658
  }
3527
4659
  }
@@ -3666,6 +4798,11 @@
3666
4798
  "description": "Capabilities the Entity has. Turn features on/off for entities.",
3667
4799
  "type": "object",
3668
4800
  "properties": {
4801
+ "id": {
4802
+ "type": "string",
4803
+ "description": "ID for the entity capability",
4804
+ "example": "d5839b94-ba20-4225-a78e-76951d352bd6"
4805
+ },
3669
4806
  "name": {
3670
4807
  "type": "string",
3671
4808
  "description": "Unique name for the capability",
@@ -3784,6 +4921,24 @@
3784
4921
  "name"
3785
4922
  ]
3786
4923
  },
4924
+ "EntityCapabilityWithCompositeID": {
4925
+ "allOf": [
4926
+ {
4927
+ "$ref": "#/components/schemas/EntityCapability"
4928
+ },
4929
+ {
4930
+ "type": "object",
4931
+ "description": "a readonly computed ID for the entity capability including schema slug and the capability ID",
4932
+ "properties": {
4933
+ "composite_id": {
4934
+ "type": "string",
4935
+ "readOnly": true,
4936
+ "example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
4937
+ }
4938
+ }
4939
+ }
4940
+ ]
4941
+ },
3787
4942
  "EntityViewDisabled": {
3788
4943
  "type": "object",
3789
4944
  "properties": {
@@ -3955,14 +5110,17 @@
3955
5110
  "additionalProperties": true,
3956
5111
  "properties": {
3957
5112
  "_id": {
5113
+ "readOnly": true,
3958
5114
  "$ref": "#/components/schemas/EntityId"
3959
5115
  },
3960
5116
  "_org": {
3961
5117
  "type": "string",
5118
+ "readOnly": true,
3962
5119
  "description": "Organization Id the entity belongs to"
3963
5120
  },
3964
5121
  "_owners": {
3965
5122
  "type": "array",
5123
+ "readOnly": true,
3966
5124
  "items": {
3967
5125
  "$ref": "#/components/schemas/EntityOwner"
3968
5126
  }
@@ -3985,15 +5143,25 @@
3985
5143
  "_created_at": {
3986
5144
  "type": "string",
3987
5145
  "format": "date-time",
3988
- "nullable": true
5146
+ "nullable": true,
5147
+ "readOnly": true
3989
5148
  },
3990
5149
  "_updated_at": {
3991
5150
  "type": "string",
3992
5151
  "format": "date-time",
3993
- "nullable": true
5152
+ "nullable": true,
5153
+ "readOnly": true
3994
5154
  },
3995
5155
  "_acl": {
5156
+ "readOnly": true,
3996
5157
  "$ref": "#/components/schemas/EntityAcl"
5158
+ },
5159
+ "_purpose": {
5160
+ "type": "array",
5161
+ "items": {
5162
+ "type": "string"
5163
+ },
5164
+ "nullable": true
3997
5165
  }
3998
5166
  },
3999
5167
  "example": {
@@ -4326,13 +5494,241 @@
4326
5494
  ]
4327
5495
  },
4328
5496
  "EntitySearchParams": {
4329
- "type": "object",
4330
- "properties": {
4331
- "q": {
4332
- "description": "Lucene queries supported with ElasticSearch",
5497
+ "allOf": [
5498
+ {
5499
+ "type": "object",
5500
+ "properties": {
5501
+ "q": {
5502
+ "description": "Lucene [queries supported with ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)",
5503
+ "type": "string",
5504
+ "example": "_schema:contact AND status:active"
5505
+ },
5506
+ "include_scores": {
5507
+ "type": "boolean",
5508
+ "default": false,
5509
+ "description": "Adds a `_score` number field to results that can be used to rank by match score"
5510
+ },
5511
+ "sort": {},
5512
+ "from": {},
5513
+ "size": {},
5514
+ "hydrate": {},
5515
+ "fields": {},
5516
+ "aggs": {}
5517
+ },
5518
+ "additionalProperties": false,
5519
+ "required": [
5520
+ "q"
5521
+ ]
5522
+ },
5523
+ {
5524
+ "$ref": "#/components/schemas/EntitySearchOptions"
5525
+ }
5526
+ ]
5527
+ },
5528
+ "EntityListParams": {
5529
+ "allOf": [
5530
+ {
5531
+ "type": "object",
5532
+ "properties": {
5533
+ "filter": {
5534
+ "$ref": "#/components/schemas/SearchFilter"
5535
+ },
5536
+ "allow_targeting_all_schemas": {
5537
+ "type": "boolean",
5538
+ "default": false,
5539
+ "description": "Allow running the listing without any schema filter. This is disabled by default to prevent security and performance issues if done by an accident."
5540
+ },
5541
+ "sort": {},
5542
+ "from": {},
5543
+ "size": {},
5544
+ "hydrate": {},
5545
+ "fields": {},
5546
+ "aggs": {}
5547
+ },
5548
+ "additionalProperties": false,
5549
+ "required": [
5550
+ "filter"
5551
+ ]
5552
+ },
5553
+ {
5554
+ "$ref": "#/components/schemas/EntitySearchOptions"
5555
+ }
5556
+ ]
5557
+ },
5558
+ "SearchFilter": {
5559
+ "type": "array",
5560
+ "description": "A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.",
5561
+ "items": {
5562
+ "type": "object",
5563
+ "minProperties": 1,
5564
+ "maxProperties": 1,
5565
+ "properties": {
5566
+ "term": {
5567
+ "description": "Returns documents that contain an exact term in a provided field.\n\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.\n\nYou likely DO NOT want to use this filter on text fields and want to target its .keyword instead.\n",
5568
+ "externalDocs": {
5569
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html"
5570
+ },
5571
+ "type": "object",
5572
+ "minProperties": 1,
5573
+ "maxProperties": 1,
5574
+ "additionalProperties": {
5575
+ "$ref": "#/components/schemas/SearchFilterValue"
5576
+ },
5577
+ "example": {
5578
+ "_schema": "contact"
5579
+ }
5580
+ },
5581
+ "terms": {
5582
+ "description": "Returns documents that contain one of the exact terms in a provided field. See term filter for more info.",
5583
+ "externalDocs": {
5584
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html"
5585
+ },
5586
+ "type": "object",
5587
+ "minProperties": 1,
5588
+ "maxProperties": 1,
5589
+ "additionalProperties": {
5590
+ "type": "array",
5591
+ "items": {
5592
+ "$ref": "#/components/schemas/SearchFilterValue"
5593
+ }
5594
+ },
5595
+ "example": {
5596
+ "status": [
5597
+ "active"
5598
+ ]
5599
+ }
5600
+ },
5601
+ "ids": {
5602
+ "description": "Returns documents based on their IDs.",
5603
+ "externalDocs": {
5604
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html"
5605
+ },
5606
+ "type": "object",
5607
+ "properties": {
5608
+ "values": {
5609
+ "type": "array",
5610
+ "items": {
5611
+ "type": "string"
5612
+ }
5613
+ }
5614
+ },
5615
+ "example": {
5616
+ "values": [
5617
+ "550e8400-e29b-41d4-a716-446655440000"
5618
+ ]
5619
+ }
5620
+ },
5621
+ "range": {
5622
+ "description": "Returns documents with fields that have terms within a certain range.",
5623
+ "externalDocs": {
5624
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html"
5625
+ },
5626
+ "type": "object",
5627
+ "minProperties": 1,
5628
+ "maxProperties": 1,
5629
+ "additionalProperties": {
5630
+ "type": "object",
5631
+ "properties": {
5632
+ "gt": {
5633
+ "$ref": "#/components/schemas/SearchFilterValue"
5634
+ },
5635
+ "gte": {
5636
+ "$ref": "#/components/schemas/SearchFilterValue"
5637
+ },
5638
+ "lt": {
5639
+ "$ref": "#/components/schemas/SearchFilterValue"
5640
+ },
5641
+ "lte": {
5642
+ "$ref": "#/components/schemas/SearchFilterValue"
5643
+ },
5644
+ "format": {
5645
+ "type": "string",
5646
+ "description": "The date format used to parse date values."
5647
+ },
5648
+ "relation": {
5649
+ "type": "string",
5650
+ "enum": [
5651
+ "INTERSECTS",
5652
+ "CONTAINS",
5653
+ "WITHIN"
5654
+ ],
5655
+ "description": "Indicates how the range query matches values for range fields."
5656
+ },
5657
+ "time_zone": {
5658
+ "type": "string",
5659
+ "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC."
5660
+ }
5661
+ }
5662
+ },
5663
+ "example": {
5664
+ "_created_at": {
5665
+ "gte": "2021-01-01T00:00:00.000Z",
5666
+ "lte": "2021-01-31T23:59:59.999Z"
5667
+ }
5668
+ }
5669
+ },
5670
+ "exists": {
5671
+ "description": "Returns documents that have a value in the specified field.",
5672
+ "externalDocs": {
5673
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html"
5674
+ },
5675
+ "type": "object",
5676
+ "properties": {
5677
+ "field": {
5678
+ "type": "string"
5679
+ }
5680
+ },
5681
+ "required": [
5682
+ "field"
5683
+ ],
5684
+ "example": {
5685
+ "field": "_tags"
5686
+ }
5687
+ },
5688
+ "$and": {
5689
+ "$ref": "#/components/schemas/SearchFilter"
5690
+ },
5691
+ "$or": {
5692
+ "$ref": "#/components/schemas/SearchFilter"
5693
+ },
5694
+ "$not": {
5695
+ "$ref": "#/components/schemas/SearchFilter"
5696
+ }
5697
+ }
5698
+ },
5699
+ "example": [
5700
+ {
5701
+ "term": {
5702
+ "_schema": "contact"
5703
+ }
5704
+ },
5705
+ {
5706
+ "terms": {
5707
+ "status": [
5708
+ "active"
5709
+ ]
5710
+ }
5711
+ }
5712
+ ]
5713
+ },
5714
+ "SearchFilterValue": {
5715
+ "description": "A filter field value.",
5716
+ "oneOf": [
5717
+ {
4333
5718
  "type": "string",
4334
- "example": "_schema:contact AND status:active"
5719
+ "nullable": true
5720
+ },
5721
+ {
5722
+ "type": "number"
4335
5723
  },
5724
+ {
5725
+ "type": "boolean"
5726
+ }
5727
+ ]
5728
+ },
5729
+ "EntitySearchOptions": {
5730
+ "type": "object",
5731
+ "properties": {
4336
5732
  "sort": {
4337
5733
  "type": "string",
4338
5734
  "example": "_created_at:desc"
@@ -4356,11 +5752,6 @@
4356
5752
  "fields": {
4357
5753
  "$ref": "#/components/schemas/FieldsParam"
4358
5754
  },
4359
- "include_scores": {
4360
- "type": "boolean",
4361
- "default": false,
4362
- "description": "Adds a `_score` number field to results that can be used to rank by match score"
4363
- },
4364
5755
  "aggs": {
4365
5756
  "type": "object",
4366
5757
  "description": "Aggregation supported by ElasticSearch allows summarizing data as metrics, statistics, or other analytics.",
@@ -4372,10 +5763,7 @@
4372
5763
  }
4373
5764
  }
4374
5765
  }
4375
- },
4376
- "required": [
4377
- "q"
4378
- ]
5766
+ }
4379
5767
  },
4380
5768
  "FieldsParam": {
4381
5769
  "type": "array",
@@ -4394,6 +5782,7 @@
4394
5782
  },
4395
5783
  "EntityImportParams": {
4396
5784
  "type": "object",
5785
+ "additionalProperties": false,
4397
5786
  "properties": {
4398
5787
  "S3Reference": {
4399
5788
  "type": "object",
@@ -4558,6 +5947,7 @@
4558
5947
  },
4559
5948
  "Activity": {
4560
5949
  "type": "object",
5950
+ "additionalProperties": false,
4561
5951
  "properties": {
4562
5952
  "type": {
4563
5953
  "type": "string",
@@ -4662,7 +6052,7 @@
4662
6052
  "operation"
4663
6053
  ]
4664
6054
  },
4665
- "ActivityItem": {
6055
+ "BaseActivityItem": {
4666
6056
  "allOf": [
4667
6057
  {
4668
6058
  "type": "object",
@@ -4686,6 +6076,13 @@
4686
6076
  "$ref": "#/components/schemas/ActivityCallerContext"
4687
6077
  }
4688
6078
  }
6079
+ }
6080
+ ]
6081
+ },
6082
+ "ActivityItem": {
6083
+ "allOf": [
6084
+ {
6085
+ "$ref": "#/components/schemas/BaseActivityItem"
4689
6086
  },
4690
6087
  {
4691
6088
  "type": "object",
@@ -4710,6 +6107,21 @@
4710
6107
  "type": "string",
4711
6108
  "format": "uuid"
4712
6109
  },
6110
+ "ListSavedViewsResults": {
6111
+ "type": "object",
6112
+ "properties": {
6113
+ "hits": {
6114
+ "type": "number",
6115
+ "example": 1
6116
+ },
6117
+ "results": {
6118
+ "type": "array",
6119
+ "items": {
6120
+ "$ref": "#/components/schemas/SavedViewItem"
6121
+ }
6122
+ }
6123
+ }
6124
+ },
4713
6125
  "SavedViewId": {
4714
6126
  "description": "Generated uuid for a saved view",
4715
6127
  "type": "string",
@@ -4839,21 +6251,92 @@
4839
6251
  },
4840
6252
  "plural": {
4841
6253
  "type": "string",
4842
- "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags",
6254
+ "description": "Plural name of a Taxonomy e.g. Purposes, Product Categories, Folders, Tags. Defaults to name is not provided.",
4843
6255
  "example": "Purposes"
4844
6256
  },
6257
+ "kind": {
6258
+ "readOnly": true,
6259
+ "type": "string",
6260
+ "enum": [
6261
+ "system",
6262
+ "user_defined"
6263
+ ],
6264
+ "description": "Kind of taxonomy e.g. system or user_defined. By default, it's empty, which means 'user_defined'",
6265
+ "example": "system"
6266
+ },
6267
+ "icon": {
6268
+ "type": "string",
6269
+ "description": "Icon name for the taxonomy (from epilot360/icons icon set)",
6270
+ "example": "purpose"
6271
+ },
6272
+ "color": {
6273
+ "type": "string",
6274
+ "description": "HEX Color code for the taxonomy",
6275
+ "example": "#FF5733"
6276
+ },
4845
6277
  "created_at": {
6278
+ "readOnly": true,
4846
6279
  "type": "string",
4847
6280
  "format": "date-time"
4848
6281
  },
4849
6282
  "updated_at": {
6283
+ "readOnly": true,
4850
6284
  "type": "string",
4851
6285
  "format": "date-time"
6286
+ },
6287
+ "deleted_at": {
6288
+ "readOnly": true,
6289
+ "type": "string",
6290
+ "format": "date-time",
6291
+ "description": "Date when the taxonomy was soft-deleted (enabled: false)"
6292
+ },
6293
+ "created_by": {
6294
+ "readOnly": true,
6295
+ "type": "string",
6296
+ "description": "User ID of the creator",
6297
+ "example": "10598"
6298
+ },
6299
+ "enabled": {
6300
+ "type": "boolean",
6301
+ "description": "Whether the taxonomy is enabled or not",
6302
+ "example": true
6303
+ },
6304
+ "order": {
6305
+ "type": "number",
6306
+ "description": "Position of the taxonomy",
6307
+ "example": 10
6308
+ },
6309
+ "enabled_locations": {
6310
+ "description": "List of locations where the taxonomy is enabled to be used. If empty, it's enabled for all locations.",
6311
+ "type": "array",
6312
+ "items": {
6313
+ "$ref": "#/components/schemas/TaxonomyLocationId"
6314
+ }
4852
6315
  }
4853
- },
4854
- "required": [
4855
- "slug",
4856
- "name"
6316
+ }
6317
+ },
6318
+ "TaxonomyLocationId": {
6319
+ "type": "string",
6320
+ "enum": [
6321
+ "account",
6322
+ "contact",
6323
+ "contract",
6324
+ "email_template",
6325
+ "file",
6326
+ "journey",
6327
+ "meter_counter",
6328
+ "meter",
6329
+ "opportunity",
6330
+ "order",
6331
+ "partner",
6332
+ "price",
6333
+ "product",
6334
+ "submission",
6335
+ "tax",
6336
+ "message",
6337
+ "portal_user",
6338
+ "request",
6339
+ "comment"
4857
6340
  ]
4858
6341
  },
4859
6342
  "TaxonomyClassification": {
@@ -4862,6 +6345,11 @@
4862
6345
  "id": {
4863
6346
  "$ref": "#/components/schemas/ClassificationId"
4864
6347
  },
6348
+ "slug": {
6349
+ "type": "string",
6350
+ "description": "URL-friendly identifier for the classification",
6351
+ "example": "wallbox-pv"
6352
+ },
4865
6353
  "name": {
4866
6354
  "type": "string",
4867
6355
  "example": "Wallbox PV"
@@ -4887,7 +6375,7 @@
4887
6375
  },
4888
6376
  "ClassificationId": {
4889
6377
  "type": "string",
4890
- "format": "uuid"
6378
+ "example": "taxonomy-slug:classification-slug"
4891
6379
  },
4892
6380
  "TaxonomySlug": {
4893
6381
  "type": "string",
@@ -4912,7 +6400,15 @@
4912
6400
  "delete": {
4913
6401
  "type": "array",
4914
6402
  "items": {
4915
- "$ref": "#/components/schemas/ClassificationId"
6403
+ "anyOf": [
6404
+ {
6405
+ "$ref": "#/components/schemas/ClassificationId"
6406
+ },
6407
+ {
6408
+ "type": "string",
6409
+ "example": "taxonomy-slug:classification-slug"
6410
+ }
6411
+ ]
4916
6412
  }
4917
6413
  }
4918
6414
  }
@@ -4964,23 +6460,32 @@
4964
6460
  "example": "price"
4965
6461
  }
4966
6462
  },
4967
- "TaxonomySlugQueryParam": {
6463
+ "TaxonomySlugPathParam": {
4968
6464
  "name": "taxonomySlug",
4969
6465
  "description": "Taxonomy slug",
4970
- "in": "query",
6466
+ "in": "path",
6467
+ "required": true,
4971
6468
  "schema": {
4972
6469
  "type": "string"
4973
- },
4974
- "required": true
6470
+ }
4975
6471
  },
4976
- "TaxonomySlugPathParam": {
6472
+ "TaxonomySlugQueryParamOptional": {
4977
6473
  "name": "taxonomySlug",
4978
6474
  "description": "Taxonomy slug",
6475
+ "in": "query",
6476
+ "schema": {
6477
+ "type": "string"
6478
+ }
6479
+ },
6480
+ "TaxonomyClassificationSlugPathParam": {
6481
+ "name": "classificationSlug",
6482
+ "description": "Taxonomy Classification slug",
4979
6483
  "in": "path",
4980
6484
  "required": true,
4981
6485
  "schema": {
4982
6486
  "type": "string"
4983
- }
6487
+ },
6488
+ "example": "purpose:<name>"
4984
6489
  },
4985
6490
  "SavedViewIdPathParam": {
4986
6491
  "name": "id",