@epilot/sdk 2.4.3 → 2.4.4
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/README.md +1 -0
- package/definitions/app-runtime.json +1 -1
- package/definitions/app.json +346 -10
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +675 -0
- package/definitions/customer-portal.json +29 -0
- package/definitions/notes.json +175 -130
- package/definitions/pricing.json +5 -1
- package/dist/README-46VYEGGW.js +7 -0
- package/dist/README-IVBISSWB.cjs +7 -0
- package/dist/{_index-HE4B6FOA.js → _index-5FB6F5YY.js} +3 -0
- package/dist/{_index-55HAH24D.cjs → _index-DB2VV4PQ.cjs} +4 -1
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +38 -0
- package/dist/apis/calendar.d.cts +18 -0
- package/dist/apis/calendar.d.ts +18 -0
- package/dist/apis/calendar.js +38 -0
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/calendar-2YDAYG7S.cjs +7 -0
- package/dist/calendar-ACFIHQ2N.js +7 -0
- package/dist/calendar-runtime-6CMMEQMG.js +5 -0
- package/dist/calendar-runtime-G4SN5PDY.cjs +5 -0
- package/dist/calendar.d-BEjLDagH.d.cts +353 -0
- package/dist/calendar.d-BEjLDagH.d.ts +353 -0
- package/dist/{chunk-AM5TSEMU.cjs → chunk-CD4OX2U6.cjs} +4 -2
- package/dist/chunk-CKLEBO4K.cjs +14 -0
- package/dist/chunk-JNH37UUH.js +14 -0
- package/dist/{chunk-M25MI6ZX.js → chunk-TSV242UN.js} +4 -2
- package/dist/index.cjs +25 -17
- package/dist/index.d.cts +82 -80
- package/dist/index.d.ts +82 -80
- package/dist/index.js +21 -13
- package/dist/{js-yaml-DLCVPJ7G.js → js-yaml-UPZKYVRY.js} +15 -17
- package/docs/calendar.md +441 -0
- package/package.json +10 -1
- package/dist/README-6MG272KM.cjs +0 -7
- package/dist/README-7N542PBL.js +0 -7
|
@@ -828,6 +828,11 @@
|
|
|
828
828
|
"min"
|
|
829
829
|
],
|
|
830
830
|
"example": "sum"
|
|
831
|
+
},
|
|
832
|
+
"unit": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"description": "Optional unit of the consumption value. Defaults to unit present on the relevant Meter Counter.",
|
|
835
|
+
"example": "kWh"
|
|
831
836
|
}
|
|
832
837
|
},
|
|
833
838
|
"required": [
|
|
@@ -10804,6 +10809,14 @@
|
|
|
10804
10809
|
"widgets"
|
|
10805
10810
|
],
|
|
10806
10811
|
"properties": {
|
|
10812
|
+
"portal_sk_v3": {
|
|
10813
|
+
"type": "string",
|
|
10814
|
+
"description": "V3 portal-scoped storage key for the widget configuration"
|
|
10815
|
+
},
|
|
10816
|
+
"is_v3_item": {
|
|
10817
|
+
"type": "boolean",
|
|
10818
|
+
"description": "Indicates whether the widget configuration is stored as a V3 portal-scoped item"
|
|
10819
|
+
},
|
|
10807
10820
|
"widgets": {
|
|
10808
10821
|
"type": "array",
|
|
10809
10822
|
"items": {
|
|
@@ -14672,6 +14685,11 @@
|
|
|
14672
14685
|
"example": [
|
|
14673
14686
|
"00123456"
|
|
14674
14687
|
]
|
|
14688
|
+
},
|
|
14689
|
+
"file_id": {
|
|
14690
|
+
"type": "string",
|
|
14691
|
+
"description": "ID of the created file entity for the uploaded photo.",
|
|
14692
|
+
"example": "abc123def456"
|
|
14675
14693
|
}
|
|
14676
14694
|
}
|
|
14677
14695
|
},
|
|
@@ -15397,6 +15415,17 @@
|
|
|
15397
15415
|
"type": "string",
|
|
15398
15416
|
"description": "The id of the portal",
|
|
15399
15417
|
"example": "453ad7bf-86d5-46c8-8252-bcc868df5e3c"
|
|
15418
|
+
},
|
|
15419
|
+
"past_routes": {
|
|
15420
|
+
"type": "array",
|
|
15421
|
+
"description": "Slugs that previously belonged to this page. The portal redirects requests for these slugs to the current slug. Managed by the server: when a page's slug changes, the old slug is appended here, and when another page claims one of these slugs it is removed from this list.\n",
|
|
15422
|
+
"items": {
|
|
15423
|
+
"type": "string"
|
|
15424
|
+
},
|
|
15425
|
+
"example": [
|
|
15426
|
+
"old-dashboard",
|
|
15427
|
+
"home"
|
|
15428
|
+
]
|
|
15400
15429
|
}
|
|
15401
15430
|
}
|
|
15402
15431
|
}
|
package/definitions/notes.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openapi": "3.0.2",
|
|
3
3
|
"info": {
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"title": "Notes API",
|
|
6
|
-
"description": "Facade API Backend for Epilot Notes feature"
|
|
6
|
+
"description": "Facade API Backend for Epilot Notes feature",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "epilot",
|
|
9
|
+
"url": "https://docs.epilot.io"
|
|
10
|
+
}
|
|
7
11
|
},
|
|
8
12
|
"servers": [
|
|
9
13
|
{
|
|
@@ -16,6 +20,9 @@
|
|
|
16
20
|
},
|
|
17
21
|
{
|
|
18
22
|
"name": "Pinning"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "Reactions"
|
|
19
26
|
}
|
|
20
27
|
],
|
|
21
28
|
"security": [
|
|
@@ -675,30 +682,33 @@
|
|
|
675
682
|
"format": "date-time"
|
|
676
683
|
},
|
|
677
684
|
"created_by": {
|
|
678
|
-
"type": "
|
|
679
|
-
"
|
|
680
|
-
"type":
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
685
|
+
"type": "array",
|
|
686
|
+
"items": {
|
|
687
|
+
"type": "object",
|
|
688
|
+
"properties": {
|
|
689
|
+
"type": {
|
|
690
|
+
"$ref": "#/components/schemas/CreatedByType"
|
|
691
|
+
},
|
|
692
|
+
"user_id": {
|
|
693
|
+
"type": "string"
|
|
694
|
+
},
|
|
695
|
+
"display_name": {
|
|
696
|
+
"type": "string"
|
|
697
|
+
},
|
|
698
|
+
"org_id": {
|
|
699
|
+
"type": "string"
|
|
700
|
+
},
|
|
701
|
+
"email": {
|
|
702
|
+
"type": "string"
|
|
703
|
+
},
|
|
704
|
+
"phone": {
|
|
705
|
+
"type": "string"
|
|
706
|
+
}
|
|
694
707
|
},
|
|
695
|
-
"
|
|
696
|
-
"type"
|
|
697
|
-
|
|
698
|
-
}
|
|
699
|
-
"required": [
|
|
700
|
-
"type"
|
|
701
|
-
]
|
|
708
|
+
"required": [
|
|
709
|
+
"type"
|
|
710
|
+
]
|
|
711
|
+
}
|
|
702
712
|
},
|
|
703
713
|
"read_by": {
|
|
704
714
|
"type": "array",
|
|
@@ -873,30 +883,33 @@
|
|
|
873
883
|
"format": "date-time"
|
|
874
884
|
},
|
|
875
885
|
"created_by": {
|
|
876
|
-
"type": "
|
|
877
|
-
"
|
|
878
|
-
"type":
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
886
|
+
"type": "array",
|
|
887
|
+
"items": {
|
|
888
|
+
"type": "object",
|
|
889
|
+
"properties": {
|
|
890
|
+
"type": {
|
|
891
|
+
"$ref": "#/components/schemas/CreatedByType"
|
|
892
|
+
},
|
|
893
|
+
"user_id": {
|
|
894
|
+
"type": "string"
|
|
895
|
+
},
|
|
896
|
+
"display_name": {
|
|
897
|
+
"type": "string"
|
|
898
|
+
},
|
|
899
|
+
"org_id": {
|
|
900
|
+
"type": "string"
|
|
901
|
+
},
|
|
902
|
+
"email": {
|
|
903
|
+
"type": "string"
|
|
904
|
+
},
|
|
905
|
+
"phone": {
|
|
906
|
+
"type": "string"
|
|
907
|
+
}
|
|
892
908
|
},
|
|
893
|
-
"
|
|
894
|
-
"type"
|
|
895
|
-
|
|
896
|
-
}
|
|
897
|
-
"required": [
|
|
898
|
-
"type"
|
|
899
|
-
]
|
|
909
|
+
"required": [
|
|
910
|
+
"type"
|
|
911
|
+
]
|
|
912
|
+
}
|
|
900
913
|
},
|
|
901
914
|
"read_by": {
|
|
902
915
|
"type": "array",
|
|
@@ -984,35 +997,43 @@
|
|
|
984
997
|
"description": "The timestamp of when this Note was pinned",
|
|
985
998
|
"format": "date-time"
|
|
986
999
|
},
|
|
1000
|
+
"edited_at": {
|
|
1001
|
+
"type": "string",
|
|
1002
|
+
"description": "The timestamp of when this Note was last updated",
|
|
1003
|
+
"format": "date-time"
|
|
1004
|
+
},
|
|
987
1005
|
"created_by": {
|
|
988
|
-
"type": "
|
|
989
|
-
"
|
|
990
|
-
"type":
|
|
991
|
-
|
|
992
|
-
"
|
|
993
|
-
"
|
|
994
|
-
"
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1006
|
+
"type": "array",
|
|
1007
|
+
"items": {
|
|
1008
|
+
"type": "object",
|
|
1009
|
+
"properties": {
|
|
1010
|
+
"type": {
|
|
1011
|
+
"type": "string",
|
|
1012
|
+
"enum": [
|
|
1013
|
+
"user",
|
|
1014
|
+
"group"
|
|
1015
|
+
]
|
|
1016
|
+
},
|
|
1017
|
+
"user_id": {
|
|
1018
|
+
"type": "string"
|
|
1019
|
+
},
|
|
1020
|
+
"display_name": {
|
|
1021
|
+
"type": "string"
|
|
1022
|
+
},
|
|
1023
|
+
"org_id": {
|
|
1024
|
+
"type": "string"
|
|
1025
|
+
},
|
|
1026
|
+
"email": {
|
|
1027
|
+
"type": "string"
|
|
1028
|
+
},
|
|
1029
|
+
"phone": {
|
|
1030
|
+
"type": "string"
|
|
1031
|
+
}
|
|
1008
1032
|
},
|
|
1009
|
-
"
|
|
1010
|
-
"type"
|
|
1011
|
-
|
|
1012
|
-
}
|
|
1013
|
-
"required": [
|
|
1014
|
-
"type"
|
|
1015
|
-
]
|
|
1033
|
+
"required": [
|
|
1034
|
+
"type"
|
|
1035
|
+
]
|
|
1036
|
+
}
|
|
1016
1037
|
},
|
|
1017
1038
|
"read_by": {
|
|
1018
1039
|
"type": "array",
|
|
@@ -1119,35 +1140,43 @@
|
|
|
1119
1140
|
"description": "The timestamp of when this Note was pinned",
|
|
1120
1141
|
"format": "date-time"
|
|
1121
1142
|
},
|
|
1143
|
+
"edited_at": {
|
|
1144
|
+
"type": "string",
|
|
1145
|
+
"description": "The timestamp of when this Note was last updated",
|
|
1146
|
+
"format": "date-time"
|
|
1147
|
+
},
|
|
1122
1148
|
"created_by": {
|
|
1123
|
-
"type": "
|
|
1124
|
-
"
|
|
1125
|
-
"type":
|
|
1126
|
-
|
|
1127
|
-
"
|
|
1128
|
-
"
|
|
1129
|
-
"
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1149
|
+
"type": "array",
|
|
1150
|
+
"items": {
|
|
1151
|
+
"type": "object",
|
|
1152
|
+
"properties": {
|
|
1153
|
+
"type": {
|
|
1154
|
+
"type": "string",
|
|
1155
|
+
"enum": [
|
|
1156
|
+
"user",
|
|
1157
|
+
"group"
|
|
1158
|
+
]
|
|
1159
|
+
},
|
|
1160
|
+
"user_id": {
|
|
1161
|
+
"type": "string"
|
|
1162
|
+
},
|
|
1163
|
+
"display_name": {
|
|
1164
|
+
"type": "string"
|
|
1165
|
+
},
|
|
1166
|
+
"org_id": {
|
|
1167
|
+
"type": "string"
|
|
1168
|
+
},
|
|
1169
|
+
"email": {
|
|
1170
|
+
"type": "string"
|
|
1171
|
+
},
|
|
1172
|
+
"phone": {
|
|
1173
|
+
"type": "string"
|
|
1174
|
+
}
|
|
1143
1175
|
},
|
|
1144
|
-
"
|
|
1145
|
-
"type"
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1148
|
-
"required": [
|
|
1149
|
-
"type"
|
|
1150
|
-
]
|
|
1176
|
+
"required": [
|
|
1177
|
+
"type"
|
|
1178
|
+
]
|
|
1179
|
+
}
|
|
1151
1180
|
},
|
|
1152
1181
|
"read_by": {
|
|
1153
1182
|
"type": "array",
|
|
@@ -1339,35 +1368,43 @@
|
|
|
1339
1368
|
"description": "The timestamp of when this Note was pinned",
|
|
1340
1369
|
"format": "date-time"
|
|
1341
1370
|
},
|
|
1371
|
+
"edited_at": {
|
|
1372
|
+
"type": "string",
|
|
1373
|
+
"description": "The timestamp of when this Note was last updated",
|
|
1374
|
+
"format": "date-time"
|
|
1375
|
+
},
|
|
1342
1376
|
"created_by": {
|
|
1343
|
-
"type": "
|
|
1344
|
-
"
|
|
1345
|
-
"type":
|
|
1346
|
-
|
|
1347
|
-
"
|
|
1348
|
-
"
|
|
1349
|
-
"
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1377
|
+
"type": "array",
|
|
1378
|
+
"items": {
|
|
1379
|
+
"type": "object",
|
|
1380
|
+
"properties": {
|
|
1381
|
+
"type": {
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"enum": [
|
|
1384
|
+
"user",
|
|
1385
|
+
"group"
|
|
1386
|
+
]
|
|
1387
|
+
},
|
|
1388
|
+
"user_id": {
|
|
1389
|
+
"type": "string"
|
|
1390
|
+
},
|
|
1391
|
+
"display_name": {
|
|
1392
|
+
"type": "string"
|
|
1393
|
+
},
|
|
1394
|
+
"org_id": {
|
|
1395
|
+
"type": "string"
|
|
1396
|
+
},
|
|
1397
|
+
"email": {
|
|
1398
|
+
"type": "string"
|
|
1399
|
+
},
|
|
1400
|
+
"phone": {
|
|
1401
|
+
"type": "string"
|
|
1402
|
+
}
|
|
1363
1403
|
},
|
|
1364
|
-
"
|
|
1365
|
-
"type"
|
|
1366
|
-
|
|
1367
|
-
}
|
|
1368
|
-
"required": [
|
|
1369
|
-
"type"
|
|
1370
|
-
]
|
|
1404
|
+
"required": [
|
|
1405
|
+
"type"
|
|
1406
|
+
]
|
|
1407
|
+
}
|
|
1371
1408
|
},
|
|
1372
1409
|
"read_by": {
|
|
1373
1410
|
"type": "array",
|
|
@@ -1407,7 +1444,15 @@
|
|
|
1407
1444
|
"type",
|
|
1408
1445
|
"id"
|
|
1409
1446
|
]
|
|
1410
|
-
}
|
|
1447
|
+
},
|
|
1448
|
+
"minItems": 1
|
|
1449
|
+
},
|
|
1450
|
+
"include_related_schemas": {
|
|
1451
|
+
"type": "array",
|
|
1452
|
+
"items": {
|
|
1453
|
+
"type": "string"
|
|
1454
|
+
},
|
|
1455
|
+
"description": "When set, the API resolves related entities of these schemas for the primary entity context and includes their notes in the results."
|
|
1411
1456
|
},
|
|
1412
1457
|
"from": {
|
|
1413
1458
|
"type": "number",
|
package/definitions/pricing.json
CHANGED
|
@@ -7582,8 +7582,12 @@
|
|
|
7582
7582
|
},
|
|
7583
7583
|
"CashbackAmount": {
|
|
7584
7584
|
"type": "object",
|
|
7585
|
-
"description": "
|
|
7585
|
+
"description": "A detail associated with a specific cashback.",
|
|
7586
7586
|
"properties": {
|
|
7587
|
+
"cashback_name": {
|
|
7588
|
+
"type": "string",
|
|
7589
|
+
"description": "The name of the cashback."
|
|
7590
|
+
},
|
|
7587
7591
|
"cashback_period": {
|
|
7588
7592
|
"$ref": "#/components/schemas/CashbackPeriod"
|
|
7589
7593
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/README.json
|
|
4
|
+
var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
|
|
5
|
+
export {
|
|
6
|
+
README_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/README.json
|
|
4
|
+
var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = README_default;
|
|
@@ -10,6 +10,7 @@ var auditLogs = "audit-logs";
|
|
|
10
10
|
var automation = "automation";
|
|
11
11
|
var billing = "billing";
|
|
12
12
|
var blueprintManifest = "blueprint-manifest";
|
|
13
|
+
var calendar = "calendar";
|
|
13
14
|
var configurationHub = "configuration-hub";
|
|
14
15
|
var consent = "consent";
|
|
15
16
|
var customerPortal = "customer-portal";
|
|
@@ -60,6 +61,7 @@ var index_default = {
|
|
|
60
61
|
automation,
|
|
61
62
|
billing,
|
|
62
63
|
blueprintManifest,
|
|
64
|
+
calendar,
|
|
63
65
|
configurationHub,
|
|
64
66
|
consent,
|
|
65
67
|
customerPortal,
|
|
@@ -111,6 +113,7 @@ export {
|
|
|
111
113
|
automation,
|
|
112
114
|
billing,
|
|
113
115
|
blueprintManifest,
|
|
116
|
+
calendar,
|
|
114
117
|
configurationHub,
|
|
115
118
|
consent,
|
|
116
119
|
customerPortal,
|
|
@@ -10,6 +10,7 @@ var auditLogs = "audit-logs";
|
|
|
10
10
|
var automation = "automation";
|
|
11
11
|
var billing = "billing";
|
|
12
12
|
var blueprintManifest = "blueprint-manifest";
|
|
13
|
+
var calendar = "calendar";
|
|
13
14
|
var configurationHub = "configuration-hub";
|
|
14
15
|
var consent = "consent";
|
|
15
16
|
var customerPortal = "customer-portal";
|
|
@@ -60,6 +61,7 @@ var index_default = {
|
|
|
60
61
|
automation,
|
|
61
62
|
billing,
|
|
62
63
|
blueprintManifest,
|
|
64
|
+
calendar,
|
|
63
65
|
configurationHub,
|
|
64
66
|
consent,
|
|
65
67
|
customerPortal,
|
|
@@ -152,4 +154,5 @@ var index_default = {
|
|
|
152
154
|
|
|
153
155
|
|
|
154
156
|
|
|
155
|
-
|
|
157
|
+
|
|
158
|
+
exports.accessToken = accessToken; exports.address = address; exports.addressSuggestions = addressSuggestions; exports.aiAgents = aiAgents; exports.app = app; exports.auditLogs = auditLogs; exports.automation = automation; exports.billing = billing; exports.blueprintManifest = blueprintManifest; exports.calendar = calendar; exports.configurationHub = configurationHub; exports.consent = consent; exports.customerPortal = customerPortal; exports.dashboard = dashboard; exports.dataGovernance = dataGovernance; exports.deduplication = deduplication; exports.default = index_default; exports.design = design; exports.document = document; exports.emailSettings = emailSettings; exports.emailTemplate = emailTemplate; exports.entity = entity; exports.entityMapping = entityMapping; exports.environments = environments; exports.eventCatalog = eventCatalog; exports.file = file; exports.iban = iban; exports.integrationToolkit = integrationToolkit; exports.journey = journey; exports.kanban = kanban; exports.message = message; exports.metering = metering; exports.notes = notes; exports.notification = notification; exports.organization = organization; exports.partnerDirectory = partnerDirectory; exports.permissions = permissions; exports.pricing = pricing; exports.pricingTier = pricingTier; exports.purpose = purpose; exports.query = query; exports.sandbox = sandbox; exports.sharing = sharing; exports.submission = submission; exports.targeting = targeting; exports.templateVariables = templateVariables; exports.user = user; exports.validationRules = validationRules; exports.webhooks = webhooks; exports.workflow = workflow; exports.workflowDefinition = workflowDefinition;
|
|
@@ -6,25 +6,25 @@ var _chunkOXJOO2YFcjs = require('../chunk-OXJOO2YF.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkCD4OX2U6cjs = require('../chunk-CD4OX2U6.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/access-token.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkOXJOO2YFcjs.require_access_token_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkCD4OX2U6cjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkCD4OX2U6cjs.createApiClient.call(void 0, { definition: def, apiName: "accessToken" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkCD4OX2U6cjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkCD4OX2U6cjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "accessToken" }),
|
|
28
28
|
apiName: "accessToken"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var accessToken = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.accessToken = accessToken; exports.authorize =
|
|
38
|
+
exports.accessToken = accessToken; exports.authorize = _chunkCD4OX2U6cjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
|