@epilot/sdk 2.6.0 → 2.7.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.
Files changed (186) hide show
  1. package/definitions/customer-portal-runtime.json +1 -1
  2. package/definitions/customer-portal.json +492 -7
  3. package/definitions/email-settings-runtime.json +1 -1
  4. package/definitions/email-settings.json +86 -4
  5. package/definitions/event-catalog-runtime.json +1 -1
  6. package/definitions/event-catalog.json +256 -1
  7. package/definitions/file-runtime.json +1 -1
  8. package/definitions/file.json +262 -4
  9. package/definitions/webhooks.json +19 -4
  10. package/dist/apis/access-token.cjs +6 -6
  11. package/dist/apis/access-token.js +1 -1
  12. package/dist/apis/address-suggestions.cjs +6 -6
  13. package/dist/apis/address-suggestions.js +1 -1
  14. package/dist/apis/address.cjs +6 -6
  15. package/dist/apis/address.js +1 -1
  16. package/dist/apis/ai-agents.cjs +6 -6
  17. package/dist/apis/ai-agents.js +1 -1
  18. package/dist/apis/app.cjs +6 -6
  19. package/dist/apis/app.js +1 -1
  20. package/dist/apis/audit-logs.cjs +6 -6
  21. package/dist/apis/audit-logs.js +1 -1
  22. package/dist/apis/automation.cjs +6 -6
  23. package/dist/apis/automation.js +1 -1
  24. package/dist/apis/billing.cjs +6 -6
  25. package/dist/apis/billing.js +1 -1
  26. package/dist/apis/blueprint-manifest.cjs +6 -6
  27. package/dist/apis/blueprint-manifest.js +1 -1
  28. package/dist/apis/calendar.cjs +6 -6
  29. package/dist/apis/calendar.js +1 -1
  30. package/dist/apis/configuration-hub.cjs +6 -6
  31. package/dist/apis/configuration-hub.js +1 -1
  32. package/dist/apis/consent.cjs +6 -6
  33. package/dist/apis/consent.js +1 -1
  34. package/dist/apis/customer-portal.cjs +8 -8
  35. package/dist/apis/customer-portal.d.cts +2 -2
  36. package/dist/apis/customer-portal.d.ts +2 -2
  37. package/dist/apis/customer-portal.js +2 -2
  38. package/dist/apis/dashboard.cjs +6 -6
  39. package/dist/apis/dashboard.js +1 -1
  40. package/dist/apis/data-governance.cjs +6 -6
  41. package/dist/apis/data-governance.js +1 -1
  42. package/dist/apis/deduplication.cjs +6 -6
  43. package/dist/apis/deduplication.js +1 -1
  44. package/dist/apis/design.cjs +6 -6
  45. package/dist/apis/design.js +1 -1
  46. package/dist/apis/document.cjs +6 -6
  47. package/dist/apis/document.js +1 -1
  48. package/dist/apis/email-settings.cjs +8 -8
  49. package/dist/apis/email-settings.d.cts +2 -2
  50. package/dist/apis/email-settings.d.ts +2 -2
  51. package/dist/apis/email-settings.js +2 -2
  52. package/dist/apis/email-template.cjs +6 -6
  53. package/dist/apis/email-template.js +1 -1
  54. package/dist/apis/entity-mapping.cjs +6 -6
  55. package/dist/apis/entity-mapping.js +1 -1
  56. package/dist/apis/entity.cjs +6 -6
  57. package/dist/apis/entity.js +1 -1
  58. package/dist/apis/environments.cjs +6 -6
  59. package/dist/apis/environments.js +1 -1
  60. package/dist/apis/event-catalog.cjs +8 -8
  61. package/dist/apis/event-catalog.d.cts +2 -2
  62. package/dist/apis/event-catalog.d.ts +2 -2
  63. package/dist/apis/event-catalog.js +2 -2
  64. package/dist/apis/file.cjs +8 -8
  65. package/dist/apis/file.d.cts +2 -2
  66. package/dist/apis/file.d.ts +2 -2
  67. package/dist/apis/file.js +2 -2
  68. package/dist/apis/iban.cjs +6 -6
  69. package/dist/apis/iban.js +1 -1
  70. package/dist/apis/integration-toolkit.cjs +6 -6
  71. package/dist/apis/integration-toolkit.js +1 -1
  72. package/dist/apis/journey.cjs +6 -6
  73. package/dist/apis/journey.js +1 -1
  74. package/dist/apis/kanban.cjs +6 -6
  75. package/dist/apis/kanban.js +1 -1
  76. package/dist/apis/message.cjs +6 -6
  77. package/dist/apis/message.js +1 -1
  78. package/dist/apis/metering.cjs +6 -6
  79. package/dist/apis/metering.js +1 -1
  80. package/dist/apis/notes.cjs +6 -6
  81. package/dist/apis/notes.js +1 -1
  82. package/dist/apis/notification.cjs +6 -6
  83. package/dist/apis/notification.js +1 -1
  84. package/dist/apis/organization.cjs +6 -6
  85. package/dist/apis/organization.js +1 -1
  86. package/dist/apis/partner-directory.cjs +6 -6
  87. package/dist/apis/partner-directory.js +1 -1
  88. package/dist/apis/permissions.cjs +6 -6
  89. package/dist/apis/permissions.js +1 -1
  90. package/dist/apis/pricing-tier.cjs +6 -6
  91. package/dist/apis/pricing-tier.js +1 -1
  92. package/dist/apis/pricing.cjs +6 -6
  93. package/dist/apis/pricing.js +1 -1
  94. package/dist/apis/purpose.cjs +6 -6
  95. package/dist/apis/purpose.js +1 -1
  96. package/dist/apis/query.cjs +6 -6
  97. package/dist/apis/query.js +1 -1
  98. package/dist/apis/sandbox.cjs +6 -6
  99. package/dist/apis/sandbox.js +1 -1
  100. package/dist/apis/sharing.cjs +6 -6
  101. package/dist/apis/sharing.js +1 -1
  102. package/dist/apis/submission.cjs +6 -6
  103. package/dist/apis/submission.js +1 -1
  104. package/dist/apis/target.cjs +6 -6
  105. package/dist/apis/target.js +1 -1
  106. package/dist/apis/targeting.cjs +6 -6
  107. package/dist/apis/targeting.js +1 -1
  108. package/dist/apis/template-variables.cjs +6 -6
  109. package/dist/apis/template-variables.js +1 -1
  110. package/dist/apis/user.cjs +6 -6
  111. package/dist/apis/user.js +1 -1
  112. package/dist/apis/validation-rules.cjs +6 -6
  113. package/dist/apis/validation-rules.js +1 -1
  114. package/dist/apis/webhooks.cjs +6 -6
  115. package/dist/apis/webhooks.d.cts +2 -2
  116. package/dist/apis/webhooks.d.ts +2 -2
  117. package/dist/apis/webhooks.js +1 -1
  118. package/dist/apis/workflow-definition.cjs +6 -6
  119. package/dist/apis/workflow-definition.js +1 -1
  120. package/dist/apis/workflow.cjs +6 -6
  121. package/dist/apis/workflow.js +1 -1
  122. package/dist/bin/cli.js +1 -1
  123. package/dist/chunk-3APTSPY4.js +14 -0
  124. package/dist/{chunk-BLNXQAMX.cjs → chunk-CBDKPGO5.cjs} +1 -1
  125. package/dist/chunk-KCPVNRDL.js +14 -0
  126. package/dist/chunk-KJPOUJBU.cjs +14 -0
  127. package/dist/{chunk-TME4YJNP.js → chunk-OCMIXJWC.js} +1 -1
  128. package/dist/chunk-OPXGJKZR.cjs +14 -0
  129. package/dist/chunk-PTEJYAYJ.js +14 -0
  130. package/dist/{chunk-SDIGGISZ.cjs → chunk-R7XDTILZ.cjs} +9 -9
  131. package/dist/{chunk-QNUU4TTU.js → chunk-SCMAZ73K.js} +9 -9
  132. package/dist/chunk-YI5YGTAH.cjs +14 -0
  133. package/dist/customer-portal-7HYSBH7H.cjs +7 -0
  134. package/dist/customer-portal-X4LJX6AU.js +7 -0
  135. package/dist/{customer-portal-runtime-OEXTSMSE.cjs → customer-portal-runtime-IYHJ3RME.cjs} +2 -2
  136. package/dist/{customer-portal-runtime-N4NWQ67M.js → customer-portal-runtime-ZYU3WIXY.js} +1 -1
  137. package/dist/{customer-portal.d-ChSEioI5.d.cts → customer-portal.d-C7ZCbjiY.d.cts} +605 -11
  138. package/dist/{customer-portal.d-ChSEioI5.d.ts → customer-portal.d-C7ZCbjiY.d.ts} +605 -11
  139. package/dist/email-settings-YJ4X5VFU.cjs +7 -0
  140. package/dist/email-settings-YUK3DXFJ.js +7 -0
  141. package/dist/{email-settings-runtime-EGIJ2AVQ.js → email-settings-runtime-BXRZV4M5.js} +1 -1
  142. package/dist/{email-settings-runtime-WGVLI7N6.cjs → email-settings-runtime-FWJQBQBK.cjs} +2 -2
  143. package/dist/{email-settings.d-B7Q_xT25.d.cts → email-settings.d-UJ0C3jPI.d.cts} +108 -9
  144. package/dist/{email-settings.d-B7Q_xT25.d.ts → email-settings.d-UJ0C3jPI.d.ts} +108 -9
  145. package/dist/event-catalog-37B6JC7G.js +7 -0
  146. package/dist/event-catalog-5JBHJJ2I.cjs +7 -0
  147. package/dist/{event-catalog-runtime-5HQSAJVX.cjs → event-catalog-runtime-B2BPKQVG.cjs} +2 -2
  148. package/dist/{event-catalog-runtime-6FA3SCRI.js → event-catalog-runtime-N262TQ3Y.js} +1 -1
  149. package/dist/{event-catalog.d-ENw6HO-w.d.cts → event-catalog.d-mQJLSYUo.d.cts} +351 -6
  150. package/dist/{event-catalog.d-ENw6HO-w.d.ts → event-catalog.d-mQJLSYUo.d.ts} +351 -6
  151. package/dist/file-P2FUUER2.js +7 -0
  152. package/dist/file-XTY74SIX.cjs +7 -0
  153. package/dist/file-runtime-24S3QPA7.cjs +5 -0
  154. package/dist/{file-runtime-B6AAGZQF.js → file-runtime-BIRMXYRH.js} +1 -1
  155. package/dist/{file.d-DcTJxjp7.d.cts → file.d-DTlrbI40.d.cts} +2336 -19
  156. package/dist/{file.d-DcTJxjp7.d.ts → file.d-DTlrbI40.d.ts} +2336 -19
  157. package/dist/index.cjs +16 -16
  158. package/dist/index.d.cts +5 -5
  159. package/dist/index.d.ts +5 -5
  160. package/dist/index.js +5 -5
  161. package/dist/{js-yaml-DLCVPJ7G.js → js-yaml-UPZKYVRY.js} +15 -17
  162. package/dist/{webhooks-XLBUXXCS.js → webhooks-NZHJBT64.js} +1 -1
  163. package/dist/{webhooks-NZ3TM3AY.cjs → webhooks-SK2STDKR.cjs} +1 -1
  164. package/dist/{webhooks.d-D79qib9f.d.cts → webhooks.d-ByePoUWs.d.cts} +40 -4
  165. package/dist/{webhooks.d-D79qib9f.d.ts → webhooks.d-ByePoUWs.d.ts} +40 -4
  166. package/docs/customer-portal.md +417 -51
  167. package/docs/email-settings.md +67 -3
  168. package/docs/event-catalog.md +247 -1
  169. package/docs/file.md +101 -2
  170. package/docs/webhooks.md +3 -1
  171. package/package.json +1 -1
  172. package/dist/chunk-4W22EIRF.cjs +0 -14
  173. package/dist/chunk-5OBMZHRL.cjs +0 -14
  174. package/dist/chunk-E2WMGOM5.js +0 -14
  175. package/dist/chunk-EFWPEVXI.js +0 -14
  176. package/dist/chunk-KEI3GHDY.cjs +0 -14
  177. package/dist/chunk-Z6HGUGXK.js +0 -14
  178. package/dist/customer-portal-5I7ZGQDU.cjs +0 -7
  179. package/dist/customer-portal-YL2YMPZL.js +0 -7
  180. package/dist/email-settings-CKFJU4WZ.js +0 -7
  181. package/dist/email-settings-NQJJKS2P.cjs +0 -7
  182. package/dist/event-catalog-C45ISVMP.cjs +0 -7
  183. package/dist/event-catalog-D7VJ7WRS.js +0 -7
  184. package/dist/file-UOWBTDIU.cjs +0 -7
  185. package/dist/file-XSN3NAVZ.js +0 -7
  186. package/dist/file-runtime-SFZIKODF.cjs +0 -5
@@ -1,12 +1,22 @@
1
1
  import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
2
2
 
3
3
  /* Auto-copied from event-catalog-client */
4
- /* eslint-disable */
5
-
6
4
 
7
5
 
8
6
  declare namespace Components {
9
7
  namespace Schemas {
8
+ /**
9
+ * A schema field representing file attachments associated with the event.
10
+ * Present in schema_fields for events tagged with "attachment".
11
+ *
12
+ */
13
+ export interface AttachmentField {
14
+ items: /* A file attachment associated with an event */ EventAttachment;
15
+ /**
16
+ * Whether this field is required in the event payload
17
+ */
18
+ required?: boolean;
19
+ }
10
20
  /**
11
21
  * Common metadata fields present in all event payloads
12
22
  * example:
@@ -193,6 +203,48 @@ declare namespace Components {
193
203
  */
194
204
  _ack_id?: string;
195
205
  }
206
+ /**
207
+ * A file attachment associated with an event
208
+ */
209
+ export interface EventAttachment {
210
+ /**
211
+ * Entity ID of the file
212
+ */
213
+ entity_id: string; // uuid
214
+ /**
215
+ * Name of the file
216
+ */
217
+ filename?: string;
218
+ /**
219
+ * MIME type of the file (e.g., application/pdf)
220
+ */
221
+ mime_type?: string;
222
+ /**
223
+ * File size in bytes
224
+ */
225
+ size_bytes?: number;
226
+ /**
227
+ * S3 reference for the file content
228
+ */
229
+ s3ref?: {
230
+ /**
231
+ * S3 bucket name
232
+ */
233
+ bucket: string;
234
+ /**
235
+ * S3 object key
236
+ */
237
+ key: string;
238
+ };
239
+ /**
240
+ * File version index (always 0 for newly created files)
241
+ */
242
+ version_index: number;
243
+ /**
244
+ * Human-readable file size (e.g., "200 KB")
245
+ */
246
+ readable_size?: string;
247
+ }
196
248
  /**
197
249
  * Event configuration with required fields
198
250
  */
@@ -634,6 +686,64 @@ declare namespace Components {
634
686
  */
635
687
  export interface EventJsonSchema {
636
688
  }
689
+ /**
690
+ * A lightweight event summary returned by the v2 history endpoint.
691
+ *
692
+ * Includes the standard `_*` metadata fields plus a projected subset of the
693
+ * event payload. Hydrated entity objects (values carrying `_schema` or `_id`
694
+ * and arrays of such objects) are stripped — fetch via
695
+ * `GET /v2/events/{event_name}/history/{event_id}` for full hydration.
696
+ *
697
+ * Projected scalar payload fields appear as additional top-level properties.
698
+ *
699
+ */
700
+ export interface EventSummary {
701
+ [name: string]: any;
702
+ /**
703
+ * epilot tenant/organization ID
704
+ */
705
+ _org_id: string;
706
+ /**
707
+ * ISO 8601 timestamp when event occurred
708
+ */
709
+ _event_time: string; // date-time
710
+ /**
711
+ * Unique event identifier (ULID)
712
+ */
713
+ _event_id: string;
714
+ /**
715
+ * Event name from catalog
716
+ */
717
+ _event_name: string;
718
+ /**
719
+ * Event version (semver)
720
+ * example:
721
+ * 1.0.0
722
+ */
723
+ _event_version: string;
724
+ /**
725
+ * Source that triggered the event
726
+ */
727
+ _event_source: string;
728
+ /**
729
+ * The type of system that triggered the event.
730
+ * Common values: api, automation, operation, portal_user
731
+ *
732
+ * example:
733
+ * api
734
+ */
735
+ _trigger_source_type?: string;
736
+ /**
737
+ * Identifier of the specific trigger source.
738
+ *
739
+ */
740
+ _trigger_source?: string;
741
+ /**
742
+ * Unique acknowledgment tracking ID for the event.
743
+ *
744
+ */
745
+ _ack_id?: string;
746
+ }
637
747
  /**
638
748
  * List of entity fields to include or exclude in the response
639
749
  *
@@ -762,7 +872,12 @@ declare namespace Components {
762
872
  */
763
873
  graph_source?: string;
764
874
  }
765
- export type SchemaField = /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity;
875
+ export type SchemaField = /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity | /**
876
+ * A schema field representing file attachments associated with the event.
877
+ * Present in schema_fields for events tagged with "attachment".
878
+ *
879
+ */
880
+ AttachmentField;
766
881
  export interface SearchOptions {
767
882
  /**
768
883
  * Maximum number of results to return
@@ -809,6 +924,81 @@ declare namespace Components {
809
924
  */
810
925
  event_id?: string;
811
926
  }
927
+ /**
928
+ * Search options for the v2 history endpoint.
929
+ *
930
+ * Extends `SearchOptions` with an optional `fields` projection. When `fields`
931
+ * is omitted, the response includes all `_*` metadata plus all scalar payload
932
+ * fields (and primitive arrays / empty objects/arrays) after entity stripping.
933
+ * When `fields` is provided, glob/exclusion semantics from `FieldsParam` apply
934
+ * against `payload.*` paths; `_*` metadata is always included. Entity stripping
935
+ * runs AFTER selection.
936
+ *
937
+ */
938
+ export interface SearchOptionsV2 {
939
+ /**
940
+ * Maximum number of results to return
941
+ */
942
+ limit?: number;
943
+ /**
944
+ * Cursor for pagination. Use the next_cursor from the previous response to get the next page.
945
+ */
946
+ cursor?: {
947
+ /**
948
+ * Timestamp from the last event in the previous page
949
+ * example:
950
+ * 2025-10-31 12:34:56
951
+ */
952
+ event_time?: string;
953
+ /**
954
+ * Event ID from the last event in the previous page
955
+ * example:
956
+ * evt_1234567890abcdef
957
+ */
958
+ event_id?: string;
959
+ };
960
+ /**
961
+ * Filter events by timestamp range
962
+ */
963
+ timestamp?: {
964
+ /**
965
+ * Start timestamp in ISO 8601 format
966
+ * example:
967
+ * 2025-10-01T00:00:00Z
968
+ */
969
+ from?: string; // date-time
970
+ /**
971
+ * End timestamp in ISO 8601 format
972
+ * example:
973
+ * 2025-10-31T23:59:59Z
974
+ */
975
+ to?: string; // date-time
976
+ };
977
+ /**
978
+ * Filter by specific event ID
979
+ * example:
980
+ * evt_1234567890abcdef
981
+ */
982
+ event_id?: string;
983
+ fields?: /**
984
+ * List of entity fields to include or exclude in the response
985
+ *
986
+ * Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
987
+ *
988
+ * Globbing and globstart (**) is supported for nested fields.
989
+ *
990
+ * example:
991
+ * [
992
+ * "_id",
993
+ * "_title",
994
+ * "first_name",
995
+ * "account",
996
+ * "!account.*._files",
997
+ * "**._product"
998
+ * ]
999
+ */
1000
+ FieldsParam;
1001
+ }
812
1002
  /**
813
1003
  * Payload for explicitly triggering an event via API
814
1004
  */
@@ -880,7 +1070,7 @@ declare namespace Components {
880
1070
  /**
881
1071
  * Payload for updating an event configuration.
882
1072
  * Accepts the same fields as EventConfig (all optional for PATCH).
883
- * Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
1073
+ * Currently `enabled` and `auto_trigger` fields are processed.
884
1074
  *
885
1075
  */
886
1076
  export interface UpdateEventPayload {
@@ -1209,6 +1399,48 @@ declare namespace Paths {
1209
1399
  Components.Schemas.EventJsonSchema;
1210
1400
  }
1211
1401
  }
1402
+ namespace GetHistoricalEvent {
1403
+ namespace Parameters {
1404
+ export type EventId = string;
1405
+ export type EventName = string;
1406
+ }
1407
+ export interface PathParameters {
1408
+ event_name: Parameters.EventName;
1409
+ event_id: Parameters.EventId;
1410
+ }
1411
+ namespace Responses {
1412
+ export type $200 = /**
1413
+ * An event instance in the event history
1414
+ * example:
1415
+ * {
1416
+ * "_org_id": "org_123456",
1417
+ * "_event_time": "2024-01-01T12:00:00Z",
1418
+ * "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
1419
+ * "_event_name": "MeterReading",
1420
+ * "_event_version": "1.0.0",
1421
+ * "_event_source": "api",
1422
+ * "_trigger_source_type": "api",
1423
+ * "_trigger_source": "user_123456",
1424
+ * "reading_value": 123.45,
1425
+ * "reading_date": "2024-01-01T11:59:00Z",
1426
+ * "read_by": "John Doe",
1427
+ * "reason": "regular",
1428
+ * "direction": "feed-out",
1429
+ * "source": "portal",
1430
+ * "meter_id": "550e8400-e29b-41d4-a716-446655440000",
1431
+ * "counter_id": "660e8400-e29b-41d4-a716-446655440000",
1432
+ * "meter_number": "MT123456789",
1433
+ * "obis_number": "1-0:1.8.0",
1434
+ * "unit": "kWh",
1435
+ * "customer_id": "770e8400-e29b-41d4-a716-446655440000",
1436
+ * "contract_id": "880e8400-e29b-41d4-a716-446655440000"
1437
+ * }
1438
+ */
1439
+ Components.Schemas.Event;
1440
+ export interface $404 {
1441
+ }
1442
+ }
1443
+ }
1212
1444
  namespace ListEvents {
1213
1445
  namespace Responses {
1214
1446
  export interface $200 {
@@ -1226,7 +1458,7 @@ declare namespace Paths {
1226
1458
  export type RequestBody = /**
1227
1459
  * Payload for updating an event configuration.
1228
1460
  * Accepts the same fields as EventConfig (all optional for PATCH).
1229
- * Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
1461
+ * Currently `enabled` and `auto_trigger` fields are processed.
1230
1462
  *
1231
1463
  */
1232
1464
  Components.Schemas.UpdateEventPayload;
@@ -1294,6 +1526,59 @@ declare namespace Paths {
1294
1526
  }
1295
1527
  }
1296
1528
  }
1529
+ namespace SearchEventHistoryV2 {
1530
+ namespace Parameters {
1531
+ export type EventName = string;
1532
+ }
1533
+ export interface PathParameters {
1534
+ event_name: Parameters.EventName;
1535
+ }
1536
+ export type RequestBody = /**
1537
+ * Search options for the v2 history endpoint.
1538
+ *
1539
+ * Extends `SearchOptions` with an optional `fields` projection. When `fields`
1540
+ * is omitted, the response includes all `_*` metadata plus all scalar payload
1541
+ * fields (and primitive arrays / empty objects/arrays) after entity stripping.
1542
+ * When `fields` is provided, glob/exclusion semantics from `FieldsParam` apply
1543
+ * against `payload.*` paths; `_*` metadata is always included. Entity stripping
1544
+ * runs AFTER selection.
1545
+ *
1546
+ */
1547
+ Components.Schemas.SearchOptionsV2;
1548
+ namespace Responses {
1549
+ export interface $200 {
1550
+ results?: /**
1551
+ * A lightweight event summary returned by the v2 history endpoint.
1552
+ *
1553
+ * Includes the standard `_*` metadata fields plus a projected subset of the
1554
+ * event payload. Hydrated entity objects (values carrying `_schema` or `_id`
1555
+ * and arrays of such objects) are stripped — fetch via
1556
+ * `GET /v2/events/{event_name}/history/{event_id}` for full hydration.
1557
+ *
1558
+ * Projected scalar payload fields appear as additional top-level properties.
1559
+ *
1560
+ */
1561
+ Components.Schemas.EventSummary[];
1562
+ /**
1563
+ * Cursor for pagination. Use this to get the next page of results.
1564
+ */
1565
+ next_cursor?: {
1566
+ /**
1567
+ * Timestamp from the last event in the current page
1568
+ * example:
1569
+ * 2025-10-31T12:34:56Z
1570
+ */
1571
+ event_time?: string;
1572
+ /**
1573
+ * Event ID from the last event in the current page
1574
+ * example:
1575
+ * evt_1234567890abcdef
1576
+ */
1577
+ event_id?: string;
1578
+ } | null;
1579
+ }
1580
+ }
1581
+ }
1297
1582
  namespace TriggerEvent {
1298
1583
  namespace Parameters {
1299
1584
  export type EventName = string;
@@ -1376,6 +1661,32 @@ interface OperationMethods {
1376
1661
  data?: Paths.SearchEventHistory.RequestBody,
1377
1662
  config?: AxiosRequestConfig
1378
1663
  ): OperationResponse<Paths.SearchEventHistory.Responses.$200>
1664
+ /**
1665
+ * searchEventHistoryV2 - searchEventHistoryV2
1666
+ *
1667
+ * Paginated history of events with projected/lightweight payload (v2).
1668
+ *
1669
+ * Returns `EventSummary` objects instead of fully hydrated `Event` objects:
1670
+ * nested entity graphs (objects/arrays-of-objects carrying `_schema`/`_id`)
1671
+ * are stripped. Use GET /v2/events/{event_name}/history/{event_id} to fetch
1672
+ * the full hydrated event for a single result.
1673
+ *
1674
+ */
1675
+ 'searchEventHistoryV2'(
1676
+ parameters?: Parameters<Paths.SearchEventHistoryV2.PathParameters> | null,
1677
+ data?: Paths.SearchEventHistoryV2.RequestBody,
1678
+ config?: AxiosRequestConfig
1679
+ ): OperationResponse<Paths.SearchEventHistoryV2.Responses.$200>
1680
+ /**
1681
+ * getHistoricalEvent - getHistoricalEvent
1682
+ *
1683
+ * Fetch a single historical event by id with full hydration
1684
+ */
1685
+ 'getHistoricalEvent'(
1686
+ parameters?: Parameters<Paths.GetHistoricalEvent.PathParameters> | null,
1687
+ data?: any,
1688
+ config?: AxiosRequestConfig
1689
+ ): OperationResponse<Paths.GetHistoricalEvent.Responses.$200>
1379
1690
  /**
1380
1691
  * triggerEvent - triggerEvent
1381
1692
  *
@@ -1466,6 +1777,36 @@ interface PathsDictionary {
1466
1777
  config?: AxiosRequestConfig
1467
1778
  ): OperationResponse<Paths.SearchEventHistory.Responses.$200>
1468
1779
  }
1780
+ ['/v2/events/{event_name}:history']: {
1781
+ /**
1782
+ * searchEventHistoryV2 - searchEventHistoryV2
1783
+ *
1784
+ * Paginated history of events with projected/lightweight payload (v2).
1785
+ *
1786
+ * Returns `EventSummary` objects instead of fully hydrated `Event` objects:
1787
+ * nested entity graphs (objects/arrays-of-objects carrying `_schema`/`_id`)
1788
+ * are stripped. Use GET /v2/events/{event_name}/history/{event_id} to fetch
1789
+ * the full hydrated event for a single result.
1790
+ *
1791
+ */
1792
+ 'post'(
1793
+ parameters?: Parameters<Paths.SearchEventHistoryV2.PathParameters> | null,
1794
+ data?: Paths.SearchEventHistoryV2.RequestBody,
1795
+ config?: AxiosRequestConfig
1796
+ ): OperationResponse<Paths.SearchEventHistoryV2.Responses.$200>
1797
+ }
1798
+ ['/v2/events/{event_name}/history/{event_id}']: {
1799
+ /**
1800
+ * getHistoricalEvent - getHistoricalEvent
1801
+ *
1802
+ * Fetch a single historical event by id with full hydration
1803
+ */
1804
+ 'get'(
1805
+ parameters?: Parameters<Paths.GetHistoricalEvent.PathParameters> | null,
1806
+ data?: any,
1807
+ config?: AxiosRequestConfig
1808
+ ): OperationResponse<Paths.GetHistoricalEvent.Responses.$200>
1809
+ }
1469
1810
  ['/v1/events/{event_name}:trigger']: {
1470
1811
  /**
1471
1812
  * triggerEvent - triggerEvent
@@ -1490,13 +1831,16 @@ interface PathsDictionary {
1490
1831
  type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1491
1832
 
1492
1833
 
1834
+ type AttachmentField = Components.Schemas.AttachmentField;
1493
1835
  type CommonEventMetadata = Components.Schemas.CommonEventMetadata;
1494
1836
  type ContextEntity = Components.Schemas.ContextEntity;
1495
1837
  type EntityOperationTrigger = Components.Schemas.EntityOperationTrigger;
1496
1838
  type Event = Components.Schemas.Event;
1839
+ type EventAttachment = Components.Schemas.EventAttachment;
1497
1840
  type EventConfig = Components.Schemas.EventConfig;
1498
1841
  type EventConfigBase = Components.Schemas.EventConfigBase;
1499
1842
  type EventJsonSchema = Components.Schemas.EventJsonSchema;
1843
+ type EventSummary = Components.Schemas.EventSummary;
1500
1844
  type FieldsParam = Components.Schemas.FieldsParam;
1501
1845
  type GraphDefinition = Components.Schemas.GraphDefinition;
1502
1846
  type GraphEdge = Components.Schemas.GraphEdge;
@@ -1504,8 +1848,9 @@ type GraphNode = Components.Schemas.GraphNode;
1504
1848
  type PrimitiveField = Components.Schemas.PrimitiveField;
1505
1849
  type SchemaField = Components.Schemas.SchemaField;
1506
1850
  type SearchOptions = Components.Schemas.SearchOptions;
1851
+ type SearchOptionsV2 = Components.Schemas.SearchOptionsV2;
1507
1852
  type TriggerEventPayload = Components.Schemas.TriggerEventPayload;
1508
1853
  type TriggerEventResponse = Components.Schemas.TriggerEventResponse;
1509
1854
  type UpdateEventPayload = Components.Schemas.UpdateEventPayload;
1510
1855
 
1511
- export { type Client as C, type EntityOperationTrigger as E, type FieldsParam as F, type GraphDefinition as G, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventConfig as f, type EventConfigBase as g, type EventJsonSchema as h, type GraphEdge as i, type GraphNode as j, type PrimitiveField as k, type SearchOptions as l, type TriggerEventResponse as m };
1856
+ export { type AttachmentField as A, type Client as C, type EntityOperationTrigger as E, type FieldsParam as F, type GraphDefinition as G, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventAttachment as f, type EventConfig as g, type EventConfigBase as h, type EventJsonSchema as i, type EventSummary as j, type GraphEdge as k, type GraphNode as l, type PrimitiveField as m, type SearchOptions as n, type SearchOptionsV2 as o, type TriggerEventResponse as p };
@@ -0,0 +1,7 @@
1
+ import "./chunk-YPSWSI3M.js";
2
+
3
+ // src/docs/file.json
4
+ var file_default = '# File API\n\n- **Base URL:** `https://file.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.file.uploadFileV2(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/file\'\n\nconst fileClient = getClient()\nauthorize(fileClient, () => \'<token>\')\nconst { data } = await fileClient.uploadFileV2(...)\n```\n\n## Operations\n\n**File**\n- [`uploadFileV2`](#uploadfilev2)\n- [`saveFileV2`](#savefilev2)\n- [`getFile`](#getfile)\n- [`deleteFile`](#deletefile)\n- [`downloadFile`](#downloadfile)\n- [`downloadS3File`](#downloads3file)\n- [`downloadFiles`](#downloadfiles)\n- [`createZipJob`](#createzipjob)\n- [`getZipJob`](#getzipjob)\n- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)\n- [`uploadFilePublic`](#uploadfilepublic)\n\n**Preview**\n- [`previewFile`](#previewfile)\n- [`previewS3File`](#previews3file)\n- [`previewS3FileGet`](#previews3fileget)\n- [`previewPublicFile`](#previewpublicfile)\n\n**Session**\n- [`getSession`](#getsession)\n- [`deleteSession`](#deletesession)\n\n**Public Links**\n- [`generatePublicLink`](#generatepubliclink)\n- [`listPublicLinksForFile`](#listpubliclinksforfile)\n- [`accessPublicLink`](#accesspubliclink)\n- [`revokePublicLink`](#revokepubliclink)\n\n**File Collections**\n- [`getUserSchemaFileCollections`](#getuserschemafilecollections)\n- [`createUserSchemaFileCollection`](#createuserschemafilecollection)\n- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection)\n- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection)\n- [`getFilesInCollection`](#getfilesincollection)\n- [`getGlobalFileCollections`](#getglobalfilecollections)\n\n**Schemas**\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`ActivityId`](#activityid)\n- [`FileEntityId`](#fileentityid)\n- [`FileAttributes`](#fileattributes)\n- [`FileType`](#filetype)\n- [`CustomDownloadUrl`](#customdownloadurl)\n- [`FileEntity`](#fileentity)\n- [`CommonSaveFilePayload`](#commonsavefilepayload)\n- [`SaveS3FilePayload`](#saves3filepayload)\n- [`SaveFileFromSourceURLPayload`](#savefilefromsourceurlpayload)\n- [`SaveCustomFilePayload`](#savecustomfilepayload)\n- [`SaveFilePayload`](#savefilepayload)\n- [`SaveFilePayloadV2`](#savefilepayloadv2)\n- [`BatchSaveFileVersionPayload`](#batchsavefileversionpayload)\n- [`UploadFilePayload`](#uploadfilepayload)\n- [`FileUpload`](#fileupload)\n- [`DownloadFilesPayload`](#downloadfilespayload)\n- [`CreateZipJobPayload`](#createzipjobpayload)\n- [`ZipJob`](#zipjob)\n- [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)\n- [`S3Reference`](#s3reference)\n- [`S3Ref`](#s3ref)\n- [`FileItem`](#fileitem)\n- [`FileRelationItem`](#filerelationitem)\n- [`PublicLink`](#publiclink)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`ErrorObject`](#errorobject)\n- [`FileCollectionId`](#filecollectionid)\n- [`FileCollectionItem`](#filecollectionitem)\n- [`FileCollectionAttributes`](#filecollectionattributes)\n- [`FileCollectionCreateRequest`](#filecollectioncreaterequest)\n\n### `uploadFileV2`\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\n`POST /v2/files/upload`\n\n```ts\nconst { data } = await client.uploadFileV2(\n {\n file_entity_id: \'example\',\n },\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n}\n```\n\n</details>\n\n---\n\n### `saveFileV2`\n\nSaves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\n`POST /v2/files`\n\n```ts\nconst { data } = await client.saveFileV2(\n {\n activity_id: \'example\',\n fill_activity: true,\n strict: true,\n async: true,\n delete_temp_file: true,\n version_only: true,\n },\n {\n _id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n file_entity_id: \'string\',\n relations: [\n {\n entity_id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n _schema: \'contact\',\n _tags: [\'string\']\n }\n ],\n _tags: [\'tag1\', \'tag2\'],\n _purpose: [\'8d396871-95a0-4c9d-bb4d-9eda9c35776c\', \'da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8\'],\n _manifest: [\'123e4567-e89b-12d3-a456-426614174000\'],\n filename: \'document.pdf\',\n type: \'document\',\n mime_type: \'application/pdf\',\n size_bytes: 1234,\n readable_size: \'1.2 MB\',\n access_control: \'private\',\n public_url: \'https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf\',\n custom_download_url: \'https://some-api-url.com/download?file_id=123\',\n s3ref: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `getFile`\n\nGet a file entity by id\n\n`GET /v2/files/{id}`\n\n```ts\nconst { data } = await client.getFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n source_url: true,\n strict: true,\n async: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `deleteFile`\n\nDelete a file entity by id\n\n`DELETE /v2/files/{id}`\n\n```ts\nconst { data } = await client.deleteFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n purge: true,\n activity_id: \'example\',\n strict: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `downloadFile`\n\nGenerate a pre-signed download URL for a file.\n\n`GET /v1/files/{id}/download`\n\n```ts\nconst { data } = await client.downloadFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadS3File`\n\nGenerate a pre-signed download URL for a file using its S3 reference.\n\n`POST /v1/files:downloadS3`\n\n```ts\nconst { data } = await client.downloadS3File({\n s3_key: \'example\',\n s3_bucket: \'example\',\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadFiles`\n\nBulk generate pre-signed download URLs for multiple files in a single request.\n\n`POST /v1/files:downloadFiles`\n\n```ts\nconst { data } = await client.downloadFiles(\n null,\n [\n {\n id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n version: 0\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n]\n```\n\n</details>\n\n---\n\n### `createZipJob`\n\nCreate a background job to ZIP multiple files and send a download link via email.\n\n`POST /v1/files:zipJob`\n\n```ts\nconst { data } = await client.createZipJob(\n null,\n {},\n)\n```\n\n---\n\n### `getZipJob`\n\nGet the status of a ZIP job\n\n`GET /v1/files:zipJob/{job_id}`\n\n```ts\nconst { data } = await client.getZipJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "completed",\n "progress": {\n "total_files": 100,\n "downloaded_files": 75,\n "failed_files": 2\n },\n "result": {\n "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",\n "expires_at": "2024-01-02T12:00:00Z",\n "zip_size_bytes": 104857600\n },\n "error": "Failed to download file: access denied",\n "created_at": "2024-01-01T12:00:00Z",\n "created_by": "10234",\n "org_id": "123",\n "updated_at": "2024-01-01T12:05:00Z"\n}\n```\n\n</details>\n\n---\n\n### `previewFile`\n\nGenerate a thumbnail preview for a file entity.\n\n`GET /v1/files/{id}/preview`\n\n```ts\nconst { data } = await client.previewFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewS3File`\n\nGenerate a thumbnail preview from an S3 reference.\n\n`POST /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3File(\n {\n w: 1,\n h: 1,\n },\n {},\n)\n```\n\n---\n\n### `previewS3FileGet`\n\nGet a thumbnail preview from an S3 reference using query parameters.\n\n`GET /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3FileGet({\n key: \'example\',\n bucket: \'example\',\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewPublicFile`\n\nGenerate a thumbnail preview for a public file entity.\n\n`GET /v1/files/public/{id}/preview`\n\n```ts\nconst { data } = await client.previewPublicFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n org_id: \'example\',\n})\n```\n\n---\n\n### `getSession`\n\nStart a browser session by converting a Bearer token into a server-side cookie.\n\n`GET /v1/files/session`\n\n```ts\nconst { data } = await client.getSession()\n```\n\n---\n\n### `deleteSession`\n\nEnd a browser session by deleting the token cookie.\n\n`DELETE /v1/files/session`\n\n```ts\nconst { data } = await client.deleteSession()\n```\n\n---\n\n### `generatePublicLink`\n\nGenerate a public link to share a private file externally.\n\n`POST /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.generatePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n"string"\n```\n\n</details>\n\n---\n\n### `listPublicLinksForFile`\n\nFetches all public links previously generated for a file\n\n`GET /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.listPublicLinksForFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "last_accessed_at": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `accessPublicLink`\n\nAccess a file via its public link.\n\n`GET /v1/files/public/links/{id}/{filename}`\n\n```ts\nconst { data } = await client.accessPublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n filename: \'example\',\n hash: \'example\',\n})\n```\n\n---\n\n### `revokePublicLink`\n\nRevokes a given public link by ID\n\n`DELETE /v1/files/public/links/{id}`\n\n```ts\nconst { data } = await client.revokePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `verifyCustomDownloadUrl`\n\nVerify that a custom download URL is valid and has not expired.\n\n`POST /v1/files/download:verify`\n\n```ts\nconst { data } = await client.verifyCustomDownloadUrl(\n null,\n {\n custom_download_url: \'https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": true\n}\n```\n\n</details>\n\n---\n\n### `uploadFilePublic`\n\nCreate a pre-signed S3 URL for uploading a file without authentication.\n\n`POST /v1/files/public/upload`\n\n```ts\nconst { data } = await client.uploadFilePublic(\n null,\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "error": "File entity not found"\n}\n```\n\n</details>\n\n---\n\n### `getUserSchemaFileCollections`\n\nGet all file collections for the current user within a specific schema.\n\n`GET /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.getUserSchemaFileCollections({\n slug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n### `createUserSchemaFileCollection`\n\nCreate a new file collection for the current user within a specific schema.\n\n`POST /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.createUserSchemaFileCollection(\n {\n slug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUserSchemaFileCollection`\n\nUpdate an existing file collection.\n\n`PUT /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.updateUserSchemaFileCollection(\n {\n slug: \'example\',\n collectionSlug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUserSchemaFileCollection`\n\nDelete a file collection.\n\n`DELETE /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.deleteUserSchemaFileCollection({\n slug: \'example\',\n collectionSlug: \'example\',\n})\n```\n\n---\n\n### `getFilesInCollection`\n\nGet all files within a specific collection for an entity.\n\n`GET /v1/entity/{id}/collections/{collectionSlug}/files`\n\n```ts\nconst { data } = await client.getFilesInCollection({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n collectionSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n }\n]\n```\n\n</details>\n\n---\n\n### `getGlobalFileCollections`\n\nGet all global file collections for a specific schema.\n\n`GET /v1/collections/{schemaSlug}`\n\n```ts\nconst { data } = await client.getGlobalFileCollections({\n schemaSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema\n\n```ts\ntype EntitySlug = string\n```\n\n### `ActivityId`\n\nSee https://github.com/ulid/spec\n\n```ts\ntype ActivityId = string // ulid\n```\n\n### `FileEntityId`\n\n```ts\ntype FileEntityId = string | string // uuid\n```\n\n### `FileAttributes`\n\n```ts\ntype FileAttributes = {\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `FileType`\n\n```ts\ntype FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n```\n\n### `CustomDownloadUrl`\n\nCustom external download url used for the file\n\n```ts\ntype CustomDownloadUrl = string // uri\n```\n\n### `FileEntity`\n\n```ts\ntype FileEntity = {\n _title: string\n _schema: "file"\n _org: string\n _id: string | string // uuid\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename: string\n type: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string\n s3ref?: object\n versions: Array<{\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n }>\n _updated_at?: string // date-time\n _created_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n __additional?: Record<string, unknown>\n}\n```\n\n### `CommonSaveFilePayload`\n\n```ts\ntype CommonSaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n}\n```\n\n### `SaveS3FilePayload`\n\n```ts\ntype SaveS3FilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n}\n```\n\n### `SaveFileFromSourceURLPayload`\n\n```ts\ntype SaveFileFromSourceURLPayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n}\n```\n\n### `SaveCustomFilePayload`\n\n```ts\ntype SaveCustomFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `SaveFilePayload`\n\n```ts\ntype SaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `SaveFilePayloadV2`\n\n```ts\ntype SaveFilePayloadV2 = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `BatchSaveFileVersionPayload`\n\nPayload for batch version save. Only s3ref payloads are supported.\n\n```ts\ntype BatchSaveFileVersionPayload = {\n _id?: object\n file_entity_id?: string\n filename?: string\n mime_type?: string\n access_control?: "private" | "public-read"\n s3ref: unknown\n}\n```\n\n### `UploadFilePayload`\n\n```ts\ntype UploadFilePayload = {\n filename: string\n mime_type?: string\n index_tag?: string\n metadata?: Record<string, string>\n}\n```\n\n### `FileUpload`\n\n```ts\ntype FileUpload = {\n s3ref?: object\n upload_url?: string // url\n public_url?: string // url\n}\n```\n\n### `DownloadFilesPayload`\n\n```ts\ntype DownloadFilesPayload = Array<{\n id: string | string // uuid\n version?: number\n}>\n```\n\n### `CreateZipJobPayload`\n\nRequest payload to create a ZIP job for bulk file download.\nProvide either an explicit list of `file_entity_ids` (up to 1000) or an\n`entity_query` that resolves to file entities (up to 10000).\n\n\n```ts\ntype CreateZipJobPayload = unknown | unknown\n```\n\n### `ZipJob`\n\nZIP job status and result\n\n```ts\ntype ZipJob = {\n job_id?: string // uuid\n status?: "queued" | "downloading" | "zipping" | "uploading" | "sending_notification" | "completed" | "failed"\n progress?: {\n total_files?: number\n downloaded_files?: number\n failed_files?: number\n }\n result?: {\n file_entity_id?: string // uuid\n download_url?: string // uri\n expires_at?: string // date-time\n zip_size_bytes?: number\n }\n error?: string\n created_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_at?: string // date-time\n}\n```\n\n### `VerifyCustomDownloadUrlPayload`\n\n```ts\ntype VerifyCustomDownloadUrlPayload = {\n custom_download_url: string\n}\n```\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `S3Ref`\n\n```ts\ntype S3Ref = {\n bucket: string\n key: string\n}\n```\n\n### `FileItem`\n\n```ts\ntype FileItem = {\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n}\n```\n\n### `FileRelationItem`\n\n```ts\ntype FileRelationItem = {\n entity_id: string\n _schema?: string\n _tags?: string[]\n}\n```\n\n### `PublicLink`\n\n```ts\ntype PublicLink = {\n id?: string\n link?: string\n last_accessed_at?: string\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `ErrorObject`\n\nA generic error returned by the API\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n\n### `FileCollectionId`\n\nGenerated uuid for a file collection\n\n```ts\ntype FileCollectionId = string // uuid\n```\n\n### `FileCollectionItem`\n\nA file collection with identifiers and timestamps\n\n```ts\ntype FileCollectionItem = {\n slug?: string\n name: string\n id?: string // uuid\n parents?: string[]\n starred?: boolean\n order?: number\n enabled_locations?: string[]\n enabled_purposes?: string[]\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `FileCollectionAttributes`\n\n```ts\ntype FileCollectionAttributes = {\n name?: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n\n### `FileCollectionCreateRequest`\n\nRequest body for creating a file collection\n\n```ts\ntype FileCollectionCreateRequest = {\n name: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n';
5
+ export {
6
+ file_default as default
7
+ };