@epilot/entity-client 1.31.1 → 2.1.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
@@ -3,12 +3,12 @@
3
3
  "info": {
4
4
  "title": "Entity API",
5
5
  "version": "1.0.0",
6
- "description": "Core entity data layer API for [epilot SaaS](https://go.epilot.cloud).\n\nUse this API to configure and access domain entities like Contacts, Accounts, Products and Contracts.\n\nAll mutations to entities produce Entity Activity events to a EventBridge event bus. (to be documented)\n"
6
+ "description": "Flexible data layer for epilot Entities.\n\nUse this API configure and access your business objects like Contacts, Opportunities and Products.\n\n[Feature Documentation](https://docs.epilot.io/docs/entities/flexible-entities)\n"
7
7
  },
8
8
  "tags": [
9
9
  {
10
10
  "name": "Schemas",
11
- "description": "Configure Entities"
11
+ "description": "Model Entities"
12
12
  },
13
13
  {
14
14
  "name": "Entities",
@@ -16,23 +16,16 @@
16
16
  },
17
17
  {
18
18
  "name": "Activity",
19
- "description": "Event System for Entities"
20
- },
21
- {
22
- "name": "Blueprints",
23
- "description": "Blueprints for Schemas"
19
+ "description": "Entity Events"
24
20
  }
25
21
  ],
26
22
  "security": [
27
23
  {
28
24
  "EpilotAuth": []
29
- },
30
- {
31
- "AsOrganization": []
32
25
  }
33
26
  ],
34
27
  "paths": {
35
- "/schemas": {
28
+ "/v1/entity/schemas": {
36
29
  "get": {
37
30
  "operationId": "listSchemas",
38
31
  "summary": "listSchemas",
@@ -61,7 +54,7 @@
61
54
  }
62
55
  }
63
56
  },
64
- "/schemas/{slug}": {
57
+ "/v1/entity/schemas/{slug}": {
65
58
  "get": {
66
59
  "operationId": "getSchema",
67
60
  "summary": "getSchema",
@@ -152,7 +145,7 @@
152
145
  }
153
146
  }
154
147
  },
155
- "/entity:search": {
148
+ "/v1/entity:search": {
156
149
  "post": {
157
150
  "operationId": "searchEntities",
158
151
  "summary": "searchEntities",
@@ -183,94 +176,7 @@
183
176
  }
184
177
  }
185
178
  },
186
- "/entity:autocomplete": {
187
- "get": {
188
- "operationId": "autocomplete",
189
- "summary": "autocomplete",
190
- "description": "Autocomplete entity attributes\n",
191
- "tags": [
192
- "Entities"
193
- ],
194
- "parameters": [
195
- {
196
- "name": "input",
197
- "in": "query",
198
- "description": "Input to autocomplete",
199
- "schema": {
200
- "type": "string"
201
- }
202
- },
203
- {
204
- "name": "attribute",
205
- "in": "query",
206
- "description": "Autocomplete attribute",
207
- "schema": {
208
- "type": "string",
209
- "example": "_tags"
210
- },
211
- "required": true
212
- },
213
- {
214
- "name": "slug",
215
- "in": "query",
216
- "description": "Limit results to entity schema",
217
- "schema": {
218
- "$ref": "#/components/schemas/EntitySlug"
219
- }
220
- },
221
- {
222
- "name": "size",
223
- "in": "query",
224
- "description": "Maximum number of results to return",
225
- "schema": {
226
- "type": "integer",
227
- "default": 10,
228
- "minimum": 1,
229
- "maximum": 250
230
- }
231
- }
232
- ],
233
- "responses": {
234
- "200": {
235
- "description": "Success",
236
- "content": {
237
- "application/json": {
238
- "schema": {
239
- "type": "object",
240
- "properties": {
241
- "hits": {
242
- "type": "number",
243
- "example": 1
244
- },
245
- "results": {
246
- "type": "array",
247
- "items": {
248
- "anyOf": [
249
- {
250
- "type": "string"
251
- },
252
- {
253
- "type": "boolean"
254
- },
255
- {
256
- "type": "object",
257
- "additionalProperties": true
258
- }
259
- ]
260
- },
261
- "example": [
262
- "value"
263
- ]
264
- }
265
- }
266
- }
267
- }
268
- }
269
- }
270
- }
271
- }
272
- },
273
- "/entity/{slug}": {
179
+ "/v1/entity/{slug}": {
274
180
  "post": {
275
181
  "operationId": "createEntity",
276
182
  "summary": "createEntity",
@@ -356,7 +262,7 @@
356
262
  }
357
263
  }
358
264
  },
359
- "/entity/{slug}:upsert": {
265
+ "/v1/entity/{slug}:upsert": {
360
266
  "patch": {
361
267
  "operationId": "upsertEntity",
362
268
  "summary": "upsertEntity",
@@ -439,7 +345,7 @@
439
345
  }
440
346
  }
441
347
  },
442
- "/entity/{slug}/{id}": {
348
+ "/v1/entity/{slug}/{id}": {
443
349
  "get": {
444
350
  "operationId": "getEntity",
445
351
  "summary": "getEntity",
@@ -601,7 +507,94 @@
601
507
  }
602
508
  }
603
509
  },
604
- "/activity": {
510
+ "/v1/entity:autocomplete": {
511
+ "get": {
512
+ "operationId": "autocomplete",
513
+ "summary": "autocomplete",
514
+ "description": "Autocomplete entity attributes\n",
515
+ "tags": [
516
+ "Entities"
517
+ ],
518
+ "parameters": [
519
+ {
520
+ "name": "input",
521
+ "in": "query",
522
+ "description": "Input to autocomplete",
523
+ "schema": {
524
+ "type": "string"
525
+ }
526
+ },
527
+ {
528
+ "name": "attribute",
529
+ "in": "query",
530
+ "description": "Autocomplete attribute",
531
+ "schema": {
532
+ "type": "string",
533
+ "example": "_tags"
534
+ },
535
+ "required": true
536
+ },
537
+ {
538
+ "name": "slug",
539
+ "in": "query",
540
+ "description": "Limit results to entity schema",
541
+ "schema": {
542
+ "$ref": "#/components/schemas/EntitySlug"
543
+ }
544
+ },
545
+ {
546
+ "name": "size",
547
+ "in": "query",
548
+ "description": "Maximum number of results to return",
549
+ "schema": {
550
+ "type": "integer",
551
+ "default": 10,
552
+ "minimum": 1,
553
+ "maximum": 250
554
+ }
555
+ }
556
+ ],
557
+ "responses": {
558
+ "200": {
559
+ "description": "Success",
560
+ "content": {
561
+ "application/json": {
562
+ "schema": {
563
+ "type": "object",
564
+ "properties": {
565
+ "hits": {
566
+ "type": "number",
567
+ "example": 1
568
+ },
569
+ "results": {
570
+ "type": "array",
571
+ "items": {
572
+ "anyOf": [
573
+ {
574
+ "type": "string"
575
+ },
576
+ {
577
+ "type": "boolean"
578
+ },
579
+ {
580
+ "type": "object",
581
+ "additionalProperties": true
582
+ }
583
+ ]
584
+ },
585
+ "example": [
586
+ "value"
587
+ ]
588
+ }
589
+ }
590
+ }
591
+ }
592
+ }
593
+ }
594
+ }
595
+ }
596
+ },
597
+ "/v1/entity/activity": {
605
598
  "post": {
606
599
  "operationId": "createActivity",
607
600
  "summary": "createActivity",
@@ -647,7 +640,7 @@
647
640
  }
648
641
  }
649
642
  },
650
- "/activity/{id}": {
643
+ "/v1/entity/activity/{id}": {
651
644
  "get": {
652
645
  "operationId": "getActivity",
653
646
  "summary": "getActivity",
@@ -680,7 +673,7 @@
680
673
  }
681
674
  }
682
675
  },
683
- "/activity/{id}:attach": {
676
+ "/v1/entity/activity/{id}:attach": {
684
677
  "post": {
685
678
  "operationId": "attachActivity",
686
679
  "summary": "attachActivity",
@@ -726,7 +719,7 @@
726
719
  }
727
720
  }
728
721
  },
729
- "/entity/{slug}/{id}/activity": {
722
+ "/v1/entity/{slug}/{id}/activity": {
730
723
  "get": {
731
724
  "operationId": "getEntityActivityFeed",
732
725
  "summary": "getEntityActivityFeed",
@@ -826,66 +819,6 @@
826
819
  }
827
820
  }
828
821
  }
829
- },
830
- "/blueprints": {
831
- "get": {
832
- "operationId": "searchAvailableBlueprints",
833
- "summary": "searchAvailableBlueprints",
834
- "tags": [
835
- "Blueprints"
836
- ],
837
- "responses": {
838
- "200": {
839
- "description": "Success",
840
- "content": {
841
- "application/json": {
842
- "schema": {
843
- "type": "object",
844
- "properties": {
845
- "results": {
846
- "type": "array",
847
- "items": {
848
- "$ref": "#/components/schemas/Blueprint"
849
- }
850
- }
851
- }
852
- }
853
- }
854
- }
855
- }
856
- }
857
- }
858
- },
859
- "/blueprints/{id}": {
860
- "get": {
861
- "operationId": "getBlueprint",
862
- "summary": "getBlueprint",
863
- "tags": [
864
- "Blueprints"
865
- ],
866
- "parameters": [
867
- {
868
- "in": "path",
869
- "name": "id",
870
- "required": true,
871
- "schema": {
872
- "$ref": "#/components/schemas/BlueprintId"
873
- }
874
- }
875
- ],
876
- "responses": {
877
- "200": {
878
- "description": "Success",
879
- "content": {
880
- "application/json": {
881
- "schema": {
882
- "$ref": "#/components/schemas/Blueprint"
883
- }
884
- }
885
- }
886
- }
887
- }
888
- }
889
822
  }
890
823
  },
891
824
  "components": {
@@ -893,13 +826,8 @@
893
826
  "EpilotAuth": {
894
827
  "type": "http",
895
828
  "scheme": "bearer",
896
- "description": "Epilot OAuth2 Token"
897
- },
898
- "AsOrganization": {
899
- "type": "apiKey",
900
- "in": "header",
901
- "name": "x-ivy-org-id",
902
- "description": "Set organization id when using internal auth"
829
+ "description": "Authorization header with epilot OAuth2 bearer token",
830
+ "bearerFormat": "JWT"
903
831
  }
904
832
  },
905
833
  "schemas": {
@@ -990,6 +918,11 @@
990
918
  "properties": {
991
919
  "expanded": {
992
920
  "type": "boolean"
921
+ },
922
+ "order": {
923
+ "description": "Render order of the group",
924
+ "type": "integer",
925
+ "default": 0
993
926
  }
994
927
  }
995
928
  },
@@ -1118,9 +1051,6 @@
1118
1051
  {
1119
1052
  "$ref": "#/components/schemas/UserRelationAttribute"
1120
1053
  },
1121
- {
1122
- "$ref": "#/components/schemas/TaxRelationAttribute"
1123
- },
1124
1054
  {
1125
1055
  "$ref": "#/components/schemas/CurrencyAttribute"
1126
1056
  },
@@ -1144,6 +1074,12 @@
1144
1074
  },
1145
1075
  {
1146
1076
  "$ref": "#/components/schemas/FileAttribute"
1077
+ },
1078
+ {
1079
+ "$ref": "#/components/schemas/CustomAttribute"
1080
+ },
1081
+ {
1082
+ "$ref": "#/components/schemas/PaymentAttribute"
1147
1083
  }
1148
1084
  ]
1149
1085
  },
@@ -1232,6 +1168,12 @@
1232
1168
  "type": "string",
1233
1169
  "example": "FF_MY_FEATURE_FLAG",
1234
1170
  "description": "This attribute should only be active when the feature flag is enabled"
1171
+ },
1172
+ "value_formatter": {
1173
+ "type": "string"
1174
+ },
1175
+ "preview_value_formatter": {
1176
+ "type": "string"
1235
1177
  }
1236
1178
  },
1237
1179
  "required": [
@@ -1503,6 +1445,25 @@
1503
1445
  }
1504
1446
  ]
1505
1447
  },
1448
+ "PaymentAttribute": {
1449
+ "allOf": [
1450
+ {
1451
+ "$ref": "#/components/schemas/BaseAttribute"
1452
+ },
1453
+ {
1454
+ "type": "object",
1455
+ "description": "Payment input",
1456
+ "properties": {
1457
+ "type": {
1458
+ "type": "string",
1459
+ "enum": [
1460
+ "payment"
1461
+ ]
1462
+ }
1463
+ }
1464
+ }
1465
+ ]
1466
+ },
1506
1467
  "SummaryField": {
1507
1468
  "type": "object",
1508
1469
  "description": "Summary Fields are displayed inside list view as a resume of the relation entity.",
@@ -1616,29 +1577,6 @@
1616
1577
  }
1617
1578
  ]
1618
1579
  },
1619
- "TaxRelationAttribute": {
1620
- "allOf": [
1621
- {
1622
- "$ref": "#/components/schemas/BaseAttribute"
1623
- },
1624
- {
1625
- "type": "object",
1626
- "description": "Tax Relationship",
1627
- "properties": {
1628
- "type": {
1629
- "type": "string",
1630
- "enum": [
1631
- "relation_tax"
1632
- ]
1633
- },
1634
- "multiple": {
1635
- "type": "boolean",
1636
- "default": true
1637
- }
1638
- }
1639
- }
1640
- ]
1641
- },
1642
1580
  "RepeatableAttribute": {
1643
1581
  "allOf": [
1644
1582
  {
@@ -1776,6 +1714,25 @@
1776
1714
  }
1777
1715
  ]
1778
1716
  },
1717
+ "CustomAttribute": {
1718
+ "allOf": [
1719
+ {
1720
+ "$ref": "#/components/schemas/BaseAttribute"
1721
+ },
1722
+ {
1723
+ "type": "object",
1724
+ "description": "Custom input",
1725
+ "properties": {
1726
+ "type": {
1727
+ "type": "string",
1728
+ "enum": [
1729
+ "custom"
1730
+ ]
1731
+ }
1732
+ }
1733
+ }
1734
+ ]
1735
+ },
1779
1736
  "Attachment": {
1780
1737
  "type": "object",
1781
1738
  "deprecated": true,
@@ -2266,7 +2223,10 @@
2266
2223
  "type": "string"
2267
2224
  }
2268
2225
  }
2269
- }
2226
+ },
2227
+ "required": [
2228
+ "q"
2229
+ ]
2270
2230
  },
2271
2231
  "EntitySearchResults": {
2272
2232
  "type": "object",
@@ -2460,29 +2420,8 @@
2460
2420
  }
2461
2421
  ]
2462
2422
  },
2463
- "BlueprintId": {
2464
- "type": "string",
2465
- "format": "uuid"
2466
- },
2467
- "Blueprint": {
2468
- "type": "object",
2469
- "properties": {
2470
- "id": {
2471
- "$ref": "#/components/schemas/BlueprintId"
2472
- },
2473
- "name": {
2474
- "type": "string",
2475
- "example": "Power & Gas Utilities"
2476
- },
2477
- "schemas": {
2478
- "type": "array",
2479
- "items": {
2480
- "$ref": "#/components/schemas/EntitySchema"
2481
- }
2482
- }
2483
- }
2484
- },
2485
2423
  "BlueprintEntityId": {
2424
+ "description": "Reference to blueprint",
2486
2425
  "type": "string",
2487
2426
  "format": "uuid"
2488
2427
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-client",
3
- "version": "1.31.1",
3
+ "version": "2.1.1",
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",