@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
@@ -71,9 +71,11 @@ const { data } = await emailSettingsClient.provisionEpilotEmailAddress(...)
71
71
  - [`deleteDomain`](#deletedomain)
72
72
  - [`getDomains`](#getdomains)
73
73
  - [`verifyNameServers`](#verifynameservers)
74
+ - [`verifyDnsRecords`](#verifydnsrecords)
74
75
  - [`verifyDomain`](#verifydomain)
75
76
 
76
77
  **Schemas**
78
+ - [`ConnectOutlookRequest`](#connectoutlookrequest)
77
79
  - [`MailboxSyncStatus`](#mailboxsyncstatus)
78
80
  - [`MailboxSyncStatuses`](#mailboxsyncstatuses)
79
81
  - [`MailboxSyncFolderStatuses`](#mailboxsyncfolderstatuses)
@@ -562,12 +564,18 @@ const { data } = await client.listInboxBuckets()
562
564
 
563
565
  ### `connectOutlook`
564
566
 
565
- Returns Microsoft authorization URL for Outlook OAuth.
567
+ Returns the Microsoft authorization URL for Outlook OAuth.
566
568
 
567
- `GET /v2/outlook/connect`
569
+ `POST /v2/outlook/connect`
568
570
 
569
571
  ```ts
570
- const { data } = await client.connectOutlook()
572
+ const { data } = await client.connectOutlook(
573
+ null,
574
+ {
575
+ mail: true,
576
+ calendar: true
577
+ },
578
+ )
571
579
  ```
572
580
 
573
581
  <details>
@@ -603,6 +611,7 @@ const { data } = await client.getOutlookConnectionStatus()
603
611
  {
604
612
  "status": "connected",
605
613
  "action": "connect",
614
+ "action_reason": "expired",
606
615
  "connected_by_display_name": "string",
607
616
  "connected_by_email": "user@example.com",
608
617
  "connected_by_user_id": "string",
@@ -1240,6 +1249,46 @@ const { data } = await client.verifyNameServers(
1240
1249
 
1241
1250
  ---
1242
1251
 
1252
+ ### `verifyDnsRecords`
1253
+
1254
+ Verifies that the domain's DNS records (MX, TXT, CNAME) are correctly configured
1255
+ in the customer's DNS provider.
1256
+
1257
+ `POST /v1/email-settings/domain/dns-records:verify`
1258
+
1259
+ ```ts
1260
+ const { data } = await client.verifyDnsRecords(
1261
+ null,
1262
+ {
1263
+ domain: 'mail.yourcompany.com'
1264
+ },
1265
+ )
1266
+ ```
1267
+
1268
+ <details>
1269
+ <summary>Response</summary>
1270
+
1271
+ ```json
1272
+ [
1273
+ {
1274
+ "id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
1275
+ "name": "Default Signature",
1276
+ "org_id": "org-123",
1277
+ "type": "signature",
1278
+ "value": "Best regards, The Team",
1279
+ "html": "<p>Best regards,<br/><strong>The Team</strong></p>",
1280
+ "created_at": "2024-01-15T10:30:00Z",
1281
+ "updated_at": "2024-01-20T14:45:00Z",
1282
+ "created_by": "user-123",
1283
+ "updated_by": "user-456"
1284
+ }
1285
+ ]
1286
+ ```
1287
+
1288
+ </details>
1289
+
1290
+ ---
1291
+
1243
1292
  ### `verifyDomain`
1244
1293
 
1245
1294
  Verifies ownership and configuration of a custom email domain.
@@ -1281,6 +1330,20 @@ const { data } = await client.verifyDomain(
1281
1330
 
1282
1331
  ## Schemas
1283
1332
 
1333
+ ### `ConnectOutlookRequest`
1334
+
1335
+ Feature flags selecting which Microsoft Graph scopes to request.
1336
+ At least one flag must be true. Passing a superset of previously
1337
+ granted features triggers incremental consent for the delta only.
1338
+
1339
+
1340
+ ```ts
1341
+ type ConnectOutlookRequest = {
1342
+ mail?: boolean
1343
+ calendar?: boolean
1344
+ }
1345
+ ```
1346
+
1284
1347
  ### `MailboxSyncStatus`
1285
1348
 
1286
1349
  ```ts
@@ -1542,6 +1605,7 @@ type OutlookConnectionError = {
1542
1605
  type OutlookConnectionStatus = {
1543
1606
  status: "connected" | "expired" | "pending_auth" | "not_connected"
1544
1607
  action: "connect" | "authorize" | "reconnect" | "none"
1608
+ action_reason?: "expired" | "permission_update"
1545
1609
  connected_by_display_name?: string
1546
1610
  connected_by_email?: string // email
1547
1611
  connected_by_user_id?: string
@@ -31,6 +31,8 @@ const { data } = await eventCatalogClient.listEvents(...)
31
31
  - [`getEventJSONSchema`](#geteventjsonschema)
32
32
  - [`getEventExample`](#geteventexample)
33
33
  - [`searchEventHistory`](#searcheventhistory)
34
+ - [`searchEventHistoryV2`](#searcheventhistoryv2)
35
+ - [`getHistoricalEvent`](#gethistoricalevent)
34
36
  - [`triggerEvent`](#triggerevent)
35
37
 
36
38
  **Schemas**
@@ -39,18 +41,22 @@ const { data } = await eventCatalogClient.listEvents(...)
39
41
  - [`UpdateEventPayload`](#updateeventpayload)
40
42
  - [`PrimitiveField`](#primitivefield)
41
43
  - [`ContextEntity`](#contextentity)
44
+ - [`AttachmentField`](#attachmentfield)
42
45
  - [`SchemaField`](#schemafield)
43
46
  - [`CommonEventMetadata`](#commoneventmetadata)
44
47
  - [`EventJsonSchema`](#eventjsonschema)
45
48
  - [`Event`](#event)
49
+ - [`EventSummary`](#eventsummary)
46
50
  - [`GraphDefinition`](#graphdefinition)
47
51
  - [`GraphNode`](#graphnode)
48
52
  - [`GraphEdge`](#graphedge)
49
53
  - [`EntityOperationTrigger`](#entityoperationtrigger)
50
54
  - [`SearchOptions`](#searchoptions)
55
+ - [`SearchOptionsV2`](#searchoptionsv2)
51
56
  - [`FieldsParam`](#fieldsparam)
52
57
  - [`TriggerEventPayload`](#triggereventpayload)
53
58
  - [`TriggerEventResponse`](#triggereventresponse)
59
+ - [`EventAttachment`](#eventattachment)
54
60
 
55
61
  ### `listEvents`
56
62
 
@@ -470,6 +476,108 @@ const { data } = await client.searchEventHistory(
470
476
 
471
477
  ---
472
478
 
479
+ ### `searchEventHistoryV2`
480
+
481
+ Paginated history of events with projected/lightweight payload (v2).
482
+
483
+ `POST /v2/events/{event_name}:history`
484
+
485
+ ```ts
486
+ const { data } = await client.searchEventHistoryV2(
487
+ {
488
+ event_name: 'example',
489
+ },
490
+ {
491
+ limit: 10,
492
+ cursor: {
493
+ event_time: '2025-10-31 12:34:56',
494
+ event_id: 'evt_1234567890abcdef'
495
+ },
496
+ timestamp: {
497
+ from: '2025-10-01T00:00:00Z',
498
+ to: '2025-10-31T23:59:59Z'
499
+ },
500
+ event_id: 'evt_1234567890abcdef',
501
+ fields: ['_id', '_title', 'first_name', 'account', '!account.*._files', '**._product']
502
+ },
503
+ )
504
+ ```
505
+
506
+ <details>
507
+ <summary>Response</summary>
508
+
509
+ ```json
510
+ {
511
+ "results": [
512
+ {
513
+ "_org_id": "string",
514
+ "_event_time": "1970-01-01T00:00:00.000Z",
515
+ "_event_id": "string",
516
+ "_event_name": "string",
517
+ "_event_version": "1.0.0",
518
+ "_event_source": "string",
519
+ "_trigger_source_type": "api",
520
+ "_trigger_source": "string",
521
+ "_ack_id": "string"
522
+ }
523
+ ],
524
+ "next_cursor": {
525
+ "event_time": "2025-10-31T12:34:56Z",
526
+ "event_id": "evt_1234567890abcdef"
527
+ }
528
+ }
529
+ ```
530
+
531
+ </details>
532
+
533
+ ---
534
+
535
+ ### `getHistoricalEvent`
536
+
537
+ Fetch a single historical event by id with full hydration
538
+
539
+ `GET /v2/events/{event_name}/history/{event_id}`
540
+
541
+ ```ts
542
+ const { data } = await client.getHistoricalEvent({
543
+ event_name: 'example',
544
+ event_id: 'example',
545
+ })
546
+ ```
547
+
548
+ <details>
549
+ <summary>Response</summary>
550
+
551
+ ```json
552
+ {
553
+ "_org_id": "org_123456",
554
+ "_event_time": "2024-01-01T12:00:00Z",
555
+ "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
556
+ "_event_name": "MeterReading",
557
+ "_event_version": "1.0.0",
558
+ "_event_source": "api",
559
+ "_trigger_source_type": "api",
560
+ "_trigger_source": "user_123456",
561
+ "reading_value": 123.45,
562
+ "reading_date": "2024-01-01T11:59:00Z",
563
+ "read_by": "John Doe",
564
+ "reason": "regular",
565
+ "direction": "feed-out",
566
+ "source": "portal",
567
+ "meter_id": "550e8400-e29b-41d4-a716-446655440000",
568
+ "counter_id": "660e8400-e29b-41d4-a716-446655440000",
569
+ "meter_number": "MT123456789",
570
+ "obis_number": "1-0:1.8.0",
571
+ "unit": "kWh",
572
+ "customer_id": "770e8400-e29b-41d4-a716-446655440000",
573
+ "contract_id": "880e8400-e29b-41d4-a716-446655440000"
574
+ }
575
+ ```
576
+
577
+ </details>
578
+
579
+ ---
580
+
473
581
  ### `triggerEvent`
474
582
 
475
583
  Explicitly trigger an event by providing input field values and an optional entity seed
@@ -531,6 +639,17 @@ type EventConfigBase = {
531
639
  } | {
532
640
  entity_schema: string
533
641
  required?: boolean
642
+ } | {
643
+ items: {
644
+ entity_id: { ... }
645
+ filename?: { ... }
646
+ mime_type?: { ... }
647
+ size_bytes?: { ... }
648
+ s3ref?: { ... }
649
+ version_index: { ... }
650
+ readable_size?: { ... }
651
+ }
652
+ required?: boolean
534
653
  }>
535
654
  entity_graph?: {
536
655
  nodes: Array<{
@@ -575,6 +694,17 @@ type EventConfig = {
575
694
  } | {
576
695
  entity_schema: string
577
696
  required?: boolean
697
+ } | {
698
+ items: {
699
+ entity_id: { ... }
700
+ filename?: { ... }
701
+ mime_type?: { ... }
702
+ size_bytes?: { ... }
703
+ s3ref?: { ... }
704
+ version_index: { ... }
705
+ readable_size?: { ... }
706
+ }
707
+ required?: boolean
578
708
  }>
579
709
  entity_graph?: {
580
710
  nodes: Array<{
@@ -604,7 +734,7 @@ type EventConfig = {
604
734
 
605
735
  Payload for updating an event configuration.
606
736
  Accepts the same fields as EventConfig (all optional for PATCH).
607
- Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
737
+ Currently `enabled` and `auto_trigger` fields are processed.
608
738
 
609
739
 
610
740
  ```ts
@@ -622,6 +752,17 @@ type UpdateEventPayload = {
622
752
  } | {
623
753
  entity_schema: string
624
754
  required?: boolean
755
+ } | {
756
+ items: {
757
+ entity_id: { ... }
758
+ filename?: { ... }
759
+ mime_type?: { ... }
760
+ size_bytes?: { ... }
761
+ s3ref?: { ... }
762
+ version_index: { ... }
763
+ readable_size?: { ... }
764
+ }
765
+ required?: boolean
625
766
  }>
626
767
  entity_graph?: {
627
768
  nodes: Array<{
@@ -668,6 +809,30 @@ type ContextEntity = {
668
809
  }
669
810
  ```
670
811
 
812
+ ### `AttachmentField`
813
+
814
+ A schema field representing file attachments associated with the event.
815
+ Present in schema_fields for events tagged with "attachment".
816
+
817
+
818
+ ```ts
819
+ type AttachmentField = {
820
+ items: {
821
+ entity_id: string // uuid
822
+ filename?: string
823
+ mime_type?: string
824
+ size_bytes?: number
825
+ s3ref?: {
826
+ bucket: { ... }
827
+ key: { ... }
828
+ }
829
+ version_index: number
830
+ readable_size?: string
831
+ }
832
+ required?: boolean
833
+ }
834
+ ```
835
+
671
836
  ### `SchemaField`
672
837
 
673
838
  ```ts
@@ -678,6 +843,20 @@ type SchemaField = {
678
843
  } | {
679
844
  entity_schema: string
680
845
  required?: boolean
846
+ } | {
847
+ items: {
848
+ entity_id: string // uuid
849
+ filename?: string
850
+ mime_type?: string
851
+ size_bytes?: number
852
+ s3ref?: {
853
+ bucket: { ... }
854
+ key: { ... }
855
+ }
856
+ version_index: number
857
+ readable_size?: string
858
+ }
859
+ required?: boolean
681
860
  }
682
861
  ```
683
862
 
@@ -715,6 +894,29 @@ type Event = {
715
894
  }
716
895
  ```
717
896
 
897
+ ### `EventSummary`
898
+
899
+ A lightweight event summary returned by the v2 history endpoint.
900
+
901
+ Includes the standard `_*` metadata fields plus a projected subset of the
902
+ event payload. Hydrated entity objects (values carrying `_schema` or `_id`
903
+ and arrays of such objects) are stripped — fetch via
904
+ `GET /v2/events/{event_name}/his
905
+
906
+ ```ts
907
+ type EventSummary = {
908
+ _org_id: string
909
+ _event_time: string // date-time
910
+ _event_id: string
911
+ _event_name: string
912
+ _event_version: string
913
+ _event_source: string
914
+ _trigger_source_type?: string
915
+ _trigger_source?: string
916
+ _ack_id?: string
917
+ }
918
+ ```
919
+
718
920
  ### `GraphDefinition`
719
921
 
720
922
  Entity graph definition for resolving related entities
@@ -792,6 +994,31 @@ type SearchOptions = {
792
994
  }
793
995
  ```
794
996
 
997
+ ### `SearchOptionsV2`
998
+
999
+ Search options for the v2 history endpoint.
1000
+
1001
+ Extends `SearchOptions` with an optional `fields` projection. When `fields`
1002
+ is omitted, the response includes all `_*` metadata plus all scalar payload
1003
+ fields (and primitive arrays / empty objects/arrays) after entity stripping.
1004
+ When `fields` is provided,
1005
+
1006
+ ```ts
1007
+ type SearchOptionsV2 = {
1008
+ limit?: number
1009
+ cursor?: {
1010
+ event_time?: string
1011
+ event_id?: string
1012
+ }
1013
+ timestamp?: {
1014
+ from?: string // date-time
1015
+ to?: string // date-time
1016
+ }
1017
+ event_id?: string
1018
+ fields?: string[]
1019
+ }
1020
+ ```
1021
+
795
1022
  ### `FieldsParam`
796
1023
 
797
1024
  List of entity fields to include or exclude in the response
@@ -833,3 +1060,22 @@ type TriggerEventResponse = {
833
1060
  event_bridge_event_id?: string
834
1061
  }
835
1062
  ```
1063
+
1064
+ ### `EventAttachment`
1065
+
1066
+ A file attachment associated with an event
1067
+
1068
+ ```ts
1069
+ type EventAttachment = {
1070
+ entity_id: string // uuid
1071
+ filename?: string
1072
+ mime_type?: string
1073
+ size_bytes?: number
1074
+ s3ref?: {
1075
+ bucket: string
1076
+ key: string
1077
+ }
1078
+ version_index: number
1079
+ readable_size?: string
1080
+ }
1081
+ ```
package/docs/file.md CHANGED
@@ -32,6 +32,8 @@ const { data } = await fileClient.uploadFileV2(...)
32
32
  - [`downloadFile`](#downloadfile)
33
33
  - [`downloadS3File`](#downloads3file)
34
34
  - [`downloadFiles`](#downloadfiles)
35
+ - [`createZipJob`](#createzipjob)
36
+ - [`getZipJob`](#getzipjob)
35
37
  - [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)
36
38
  - [`uploadFilePublic`](#uploadfilepublic)
37
39
 
@@ -78,6 +80,8 @@ const { data } = await fileClient.uploadFileV2(...)
78
80
  - [`UploadFilePayload`](#uploadfilepayload)
79
81
  - [`FileUpload`](#fileupload)
80
82
  - [`DownloadFilesPayload`](#downloadfilespayload)
83
+ - [`CreateZipJobPayload`](#createzipjobpayload)
84
+ - [`ZipJob`](#zipjob)
81
85
  - [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)
82
86
  - [`S3Reference`](#s3reference)
83
87
  - [`S3Ref`](#s3ref)
@@ -448,6 +452,63 @@ const { data } = await client.downloadFiles(
448
452
 
449
453
  ---
450
454
 
455
+ ### `createZipJob`
456
+
457
+ Create a background job to ZIP multiple files and send a download link via email.
458
+
459
+ `POST /v1/files:zipJob`
460
+
461
+ ```ts
462
+ const { data } = await client.createZipJob(
463
+ null,
464
+ {},
465
+ )
466
+ ```
467
+
468
+ ---
469
+
470
+ ### `getZipJob`
471
+
472
+ Get the status of a ZIP job
473
+
474
+ `GET /v1/files:zipJob/{job_id}`
475
+
476
+ ```ts
477
+ const { data } = await client.getZipJob({
478
+ job_id: 'example',
479
+ })
480
+ ```
481
+
482
+ <details>
483
+ <summary>Response</summary>
484
+
485
+ ```json
486
+ {
487
+ "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
488
+ "status": "completed",
489
+ "progress": {
490
+ "total_files": 100,
491
+ "downloaded_files": 75,
492
+ "failed_files": 2
493
+ },
494
+ "result": {
495
+ "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
496
+ "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",
497
+ "expires_at": "2024-01-02T12:00:00Z",
498
+ "zip_size_bytes": 104857600
499
+ },
500
+ "error": "Failed to download file: access denied",
501
+ "created_at": "2024-01-01T12:00:00Z",
502
+ "created_by": "10234",
503
+ "org_id": "123",
504
+ "updated_at": "2024-01-01T12:05:00Z"
505
+ }
506
+ ```
507
+
508
+ </details>
509
+
510
+ ---
511
+
451
512
  ### `previewFile`
452
513
 
453
514
  Generate a thumbnail preview for a file entity.
@@ -567,7 +628,7 @@ const { data } = await client.generatePublicLink({
567
628
 
568
629
  ### `listPublicLinksForFile`
569
630
 
570
- **Not yet implemented.**
631
+ Fetches all public links previously generated for a file
571
632
 
572
633
  `GET /v1/files/{id}/public/links`
573
634
 
@@ -614,7 +675,7 @@ const { data } = await client.accessPublicLink({
614
675
 
615
676
  ### `revokePublicLink`
616
677
 
617
- **Not yet implemented.**
678
+ Revokes a given public link by ID
618
679
 
619
680
  `DELETE /v1/files/public/links/{id}`
620
681
 
@@ -1304,6 +1365,44 @@ type DownloadFilesPayload = Array<{
1304
1365
  }>
1305
1366
  ```
1306
1367
 
1368
+ ### `CreateZipJobPayload`
1369
+
1370
+ Request payload to create a ZIP job for bulk file download.
1371
+ Provide either an explicit list of `file_entity_ids` (up to 1000) or an
1372
+ `entity_query` that resolves to file entities (up to 10000).
1373
+
1374
+
1375
+ ```ts
1376
+ type CreateZipJobPayload = unknown | unknown
1377
+ ```
1378
+
1379
+ ### `ZipJob`
1380
+
1381
+ ZIP job status and result
1382
+
1383
+ ```ts
1384
+ type ZipJob = {
1385
+ job_id?: string // uuid
1386
+ status?: "queued" | "downloading" | "zipping" | "uploading" | "sending_notification" | "completed" | "failed"
1387
+ progress?: {
1388
+ total_files?: number
1389
+ downloaded_files?: number
1390
+ failed_files?: number
1391
+ }
1392
+ result?: {
1393
+ file_entity_id?: string // uuid
1394
+ download_url?: string // uri
1395
+ expires_at?: string // date-time
1396
+ zip_size_bytes?: number
1397
+ }
1398
+ error?: string
1399
+ created_at?: string // date-time
1400
+ created_by?: string
1401
+ org_id?: string
1402
+ updated_at?: string // date-time
1403
+ }
1404
+ ```
1405
+
1307
1406
  ### `VerifyCustomDownloadUrlPayload`
1308
1407
 
1309
1408
  ```ts
package/docs/webhooks.md CHANGED
@@ -875,7 +875,9 @@ type WebhookConfig = {
875
875
  deliveryMode?: "json_base64" | "binary_multipart"
876
876
  multipartConfig?: {
877
877
  fileFieldName?: string
878
- metadataFieldName?: string
878
+ fileFieldStrategy?: "single" | "multi"
879
+ fileSource?: string
880
+ extraFields?: Record<string, string>
879
881
  }
880
882
  filterConditions?: {
881
883
  conditions?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,14 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
4
-
5
- // src/definitions/file-runtime.json
6
- var require_file_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
7
- "src/definitions/file-runtime.json"(exports, module) {
8
- module.exports = { s: "https://file.sls.epilot.io", o: [["uploadFileV2", "post", "/v2/files/upload", [["file_entity_id", "q"]], 1], ["saveFileV2", "post", "/v2/files", [["ActivityIdQueryParam"], ["FillActivityQueryParam"], ["StrictQueryParam"], ["AsyncOperationQueryParam"], ["DeleteTempFileQueryParam"], ["VersionOnlyQueryParam"]], 1], ["uploadFile", "post", "/v1/files/upload", [["file_entity_id", "q"]], 1], ["saveFile", "post", "/v1/files", [["ActivityIdQueryParam"], ["AsyncOperationQueryParam"], ["VersionOnlyQueryParam"]], 1], ["getFile", "get", "/v2/files/{id}", [["id", "p", true], ["source_url", "q"], ["StrictQueryParam"], ["AsyncOperationQueryParam"]]], ["deleteFile", "delete", "/v2/files/{id}", [["id", "p", true], ["purge", "q"], ["ActivityIdQueryParam"], ["StrictQueryParam"]]], ["downloadFile", "get", "/v1/files/{id}/download", [["id", "p", true], ["version", "q"], ["attachment", "q"]]], ["downloadS3File", "post", "/v1/files:downloadS3", [["s3_key", "q", true], ["s3_bucket", "q", true], ["attachment", "q"]]], ["downloadFiles", "post", "/v1/files:downloadFiles", null, 1], ["previewFile", "get", "/v1/files/{id}/preview", [["id", "p", true], ["version", "q"], ["w", "q"], ["h", "q"]]], ["previewS3File", "post", "/v1/files:previewS3", [["w", "q"], ["h", "q"]], 1], ["previewS3FileGet", "get", "/v1/files:previewS3", [["key", "q", true], ["bucket", "q", true], ["w", "q"], ["h", "q"]]], ["previewPublicFile", "get", "/v1/files/public/{id}/preview", [["id", "p", true], ["version", "q"], ["w", "q"], ["h", "q"], ["org_id", "q"]]], ["getSession", "get", "/v1/files/session"], ["deleteSession", "delete", "/v1/files/session"], ["generatePublicLink", "post", "/v1/files/{id}/public/links", [["id", "p", true]]], ["listPublicLinksForFile", "get", "/v1/files/{id}/public/links", [["id", "p", true]]], ["accessPublicLink", "get", "/v1/files/public/links/{id}/{filename}", [["id", "p", true], ["filename", "p", true], ["hash", "q"]]], ["revokePublicLink", "delete", "/v1/files/public/links/{id}", [["id", "p", true]]], ["verifyCustomDownloadUrl", "post", "/v1/files/download:verify", null, 1], ["uploadFilePublic", "post", "/v1/files/public/upload", null, 1], ["getUserSchemaFileCollections", "get", "/v1/{slug}/collections", [["slug", "p", true]]], ["createUserSchemaFileCollection", "post", "/v1/{slug}/collections", [["slug", "p", true]], 1], ["updateUserSchemaFileCollection", "put", "/v1/{slug}/collections/{collectionSlug}", [["slug", "p", true], ["collectionSlug", "p", true]], 1], ["deleteUserSchemaFileCollection", "delete", "/v1/{slug}/collections/{collectionSlug}", [["slug", "p", true], ["collectionSlug", "p", true]]], ["getFilesInCollection", "get", "/v1/entity/{id}/collections/{collectionSlug}/files", [["EntityIdPathParam"], ["collectionSlug", "p", true]]], ["getGlobalFileCollections", "get", "/v1/collections/{schemaSlug}", [["schemaSlug", "p", true]]]], v: "3.0.3", cp: { EntityIdPathParam: ["id", "p", true], StrictQueryParam: ["strict", "q"], ActivityIdQueryParam: ["activity_id", "q"], FillActivityQueryParam: ["fill_activity", "q"], AsyncOperationQueryParam: ["async", "q"], DeleteTempFileQueryParam: ["delete_temp_file", "q"], VersionOnlyQueryParam: ["version_only", "q"] } };
9
- }
10
- });
11
-
12
-
13
-
14
- exports.require_file_runtime = require_file_runtime;