@epilot/entity-client 1.30.3 → 2.0.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
@@ -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": {
@@ -923,6 +851,14 @@
923
851
  "example": "FF_MY_FEATURE_FLAG",
924
852
  "description": "This schema should only be active when the feature flag is enabled"
925
853
  },
854
+ "enable_setting": {
855
+ "description": "This schema should only be active when one of the organization settings is enabled",
856
+ "type": "array",
857
+ "items": {
858
+ "type": "string",
859
+ "example": "ecommerce_preview"
860
+ }
861
+ },
926
862
  "name": {
927
863
  "description": "User-friendly identifier for the entity schema",
928
864
  "type": "string",
@@ -941,17 +877,30 @@
941
877
  "description": "Template for rendering the title field. Uses handlebars",
942
878
  "example": "{{first_name}} {{last_name}}"
943
879
  },
944
- "views": {
880
+ "ui_config": {
945
881
  "type": "object",
946
882
  "properties": {
947
- "overview": {
883
+ "table_view": {
948
884
  "$ref": "#/components/schemas/EntityViewConfig"
949
885
  },
950
- "create": {
886
+ "create_view": {
951
887
  "$ref": "#/components/schemas/EntityViewConfig"
952
888
  },
953
- "edit": {
889
+ "edit_view": {
954
890
  "$ref": "#/components/schemas/EntityViewConfig"
891
+ },
892
+ "list_item": {
893
+ "type": "object",
894
+ "properties": {
895
+ "summary_attributes": {
896
+ "type": "array",
897
+ "items": {
898
+ "type": "string",
899
+ "description": "List of attributes to show in list item",
900
+ "example": "email"
901
+ }
902
+ }
903
+ }
955
904
  }
956
905
  }
957
906
  },
@@ -969,6 +918,11 @@
969
918
  "properties": {
970
919
  "expanded": {
971
920
  "type": "boolean"
921
+ },
922
+ "order": {
923
+ "description": "Render order of the group",
924
+ "type": "integer",
925
+ "default": 0
972
926
  }
973
927
  }
974
928
  },
@@ -983,7 +937,7 @@
983
937
  },
984
938
  "layout_settings": {
985
939
  "type": "object",
986
- "description": "A dictionary of Group Titles and associated settings if present.",
940
+ "description": "Custom grid definitions for the layout",
987
941
  "additionalProperties": {
988
942
  "type": "object",
989
943
  "properties": {
@@ -1097,9 +1051,6 @@
1097
1051
  {
1098
1052
  "$ref": "#/components/schemas/UserRelationAttribute"
1099
1053
  },
1100
- {
1101
- "$ref": "#/components/schemas/TaxRelationAttribute"
1102
- },
1103
1054
  {
1104
1055
  "$ref": "#/components/schemas/CurrencyAttribute"
1105
1056
  },
@@ -1123,6 +1074,9 @@
1123
1074
  },
1124
1075
  {
1125
1076
  "$ref": "#/components/schemas/FileAttribute"
1077
+ },
1078
+ {
1079
+ "$ref": "#/components/schemas/PaymentAttribute"
1126
1080
  }
1127
1081
  ]
1128
1082
  },
@@ -1139,9 +1093,14 @@
1139
1093
  "type": "string"
1140
1094
  },
1141
1095
  "hidden": {
1096
+ "description": "Do not render attribute in entity views",
1142
1097
  "type": "boolean",
1143
1098
  "default": false
1144
1099
  },
1100
+ "show_in_table": {
1101
+ "description": "Render as a column in table views. When defined, overrides `hidden`",
1102
+ "type": "boolean"
1103
+ },
1145
1104
  "required": {
1146
1105
  "type": "boolean",
1147
1106
  "default": false
@@ -1150,10 +1109,6 @@
1150
1109
  "type": "boolean",
1151
1110
  "default": false
1152
1111
  },
1153
- "show_in_table": {
1154
- "type": "boolean",
1155
- "default": true
1156
- },
1157
1112
  "deprecated": {
1158
1113
  "type": "boolean",
1159
1114
  "default": false
@@ -1175,6 +1130,9 @@
1175
1130
  },
1176
1131
  {
1177
1132
  "type": "boolean"
1133
+ },
1134
+ {
1135
+ "type": "array"
1178
1136
  }
1179
1137
  ]
1180
1138
  },
@@ -1478,6 +1436,25 @@
1478
1436
  }
1479
1437
  ]
1480
1438
  },
1439
+ "PaymentAttribute": {
1440
+ "allOf": [
1441
+ {
1442
+ "$ref": "#/components/schemas/BaseAttribute"
1443
+ },
1444
+ {
1445
+ "type": "object",
1446
+ "description": "Payment input",
1447
+ "properties": {
1448
+ "type": {
1449
+ "type": "string",
1450
+ "enum": [
1451
+ "payment"
1452
+ ]
1453
+ }
1454
+ }
1455
+ }
1456
+ ]
1457
+ },
1481
1458
  "SummaryField": {
1482
1459
  "type": "object",
1483
1460
  "description": "Summary Fields are displayed inside list view as a resume of the relation entity.",
@@ -1591,29 +1568,6 @@
1591
1568
  }
1592
1569
  ]
1593
1570
  },
1594
- "TaxRelationAttribute": {
1595
- "allOf": [
1596
- {
1597
- "$ref": "#/components/schemas/BaseAttribute"
1598
- },
1599
- {
1600
- "type": "object",
1601
- "description": "Tax Relationship",
1602
- "properties": {
1603
- "type": {
1604
- "type": "string",
1605
- "enum": [
1606
- "relation_tax"
1607
- ]
1608
- },
1609
- "multiple": {
1610
- "type": "boolean",
1611
- "default": true
1612
- }
1613
- }
1614
- }
1615
- ]
1616
- },
1617
1571
  "RepeatableAttribute": {
1618
1572
  "allOf": [
1619
1573
  {
@@ -1908,7 +1862,7 @@
1908
1862
  "EntityViewDisabled": {
1909
1863
  "type": "object",
1910
1864
  "properties": {
1911
- "type": {
1865
+ "view_type": {
1912
1866
  "type": "string",
1913
1867
  "enum": [
1914
1868
  "disabled"
@@ -1919,7 +1873,7 @@
1919
1873
  "EntityDefaultOverview": {
1920
1874
  "type": "object",
1921
1875
  "properties": {
1922
- "type": {
1876
+ "view_type": {
1923
1877
  "type": "string",
1924
1878
  "enum": [
1925
1879
  "default"
@@ -1998,7 +1952,7 @@
1998
1952
  "EntityDefaultCreate": {
1999
1953
  "type": "object",
2000
1954
  "properties": {
2001
- "type": {
1955
+ "view_type": {
2002
1956
  "type": "string",
2003
1957
  "enum": [
2004
1958
  "default"
@@ -2009,7 +1963,7 @@
2009
1963
  "EntityDefaultEdit": {
2010
1964
  "type": "object",
2011
1965
  "properties": {
2012
- "type": {
1966
+ "view_type": {
2013
1967
  "type": "string",
2014
1968
  "enum": [
2015
1969
  "default"
@@ -2020,7 +1974,7 @@
2020
1974
  "RedirectEntityView": {
2021
1975
  "type": "object",
2022
1976
  "properties": {
2023
- "type": {
1977
+ "view_type": {
2024
1978
  "type": "string",
2025
1979
  "enum": [
2026
1980
  "redirect"
@@ -2039,7 +1993,7 @@
2039
1993
  "EntityParcelView": {
2040
1994
  "type": "object",
2041
1995
  "properties": {
2042
- "type": {
1996
+ "view_type": {
2043
1997
  "type": "string",
2044
1998
  "enum": [
2045
1999
  "parcel"
@@ -2435,29 +2389,8 @@
2435
2389
  }
2436
2390
  ]
2437
2391
  },
2438
- "BlueprintId": {
2439
- "type": "string",
2440
- "format": "uuid"
2441
- },
2442
- "Blueprint": {
2443
- "type": "object",
2444
- "properties": {
2445
- "id": {
2446
- "$ref": "#/components/schemas/BlueprintId"
2447
- },
2448
- "name": {
2449
- "type": "string",
2450
- "example": "Power & Gas Utilities"
2451
- },
2452
- "schemas": {
2453
- "type": "array",
2454
- "items": {
2455
- "$ref": "#/components/schemas/EntitySchema"
2456
- }
2457
- }
2458
- }
2459
- },
2460
2392
  "BlueprintEntityId": {
2393
+ "description": "Reference to blueprint",
2461
2394
  "type": "string",
2462
2395
  "format": "uuid"
2463
2396
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-client",
3
- "version": "1.30.3",
3
+ "version": "2.0.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",