@epilot/sdk 2.15.13 → 2.15.15

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 (142) hide show
  1. package/definitions/automation-runtime.json +1 -1
  2. package/definitions/automation.json +139 -1
  3. package/definitions/integration-toolkit-runtime.json +1 -1
  4. package/definitions/integration-toolkit.json +492 -2
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +8 -8
  18. package/dist/apis/automation.d.cts +2 -2
  19. package/dist/apis/automation.d.ts +2 -2
  20. package/dist/apis/automation.js +2 -2
  21. package/dist/apis/billing.cjs +6 -6
  22. package/dist/apis/billing.js +1 -1
  23. package/dist/apis/blueprint-manifest.cjs +6 -6
  24. package/dist/apis/blueprint-manifest.js +1 -1
  25. package/dist/apis/calendar.cjs +6 -6
  26. package/dist/apis/calendar.js +1 -1
  27. package/dist/apis/configuration-hub.cjs +6 -6
  28. package/dist/apis/configuration-hub.js +1 -1
  29. package/dist/apis/consent.cjs +6 -6
  30. package/dist/apis/consent.js +1 -1
  31. package/dist/apis/customer-portal.cjs +6 -6
  32. package/dist/apis/customer-portal.js +1 -1
  33. package/dist/apis/dashboard.cjs +6 -6
  34. package/dist/apis/dashboard.js +1 -1
  35. package/dist/apis/data-governance.cjs +6 -6
  36. package/dist/apis/data-governance.js +1 -1
  37. package/dist/apis/deduplication.cjs +6 -6
  38. package/dist/apis/deduplication.js +1 -1
  39. package/dist/apis/design.cjs +6 -6
  40. package/dist/apis/design.js +1 -1
  41. package/dist/apis/document.cjs +6 -6
  42. package/dist/apis/document.js +1 -1
  43. package/dist/apis/email-settings.cjs +6 -6
  44. package/dist/apis/email-settings.js +1 -1
  45. package/dist/apis/email-template.cjs +6 -6
  46. package/dist/apis/email-template.js +1 -1
  47. package/dist/apis/entity-mapping.cjs +6 -6
  48. package/dist/apis/entity-mapping.js +1 -1
  49. package/dist/apis/entity.cjs +6 -6
  50. package/dist/apis/entity.js +1 -1
  51. package/dist/apis/environments.cjs +6 -6
  52. package/dist/apis/environments.js +1 -1
  53. package/dist/apis/event-catalog.cjs +6 -6
  54. package/dist/apis/event-catalog.js +1 -1
  55. package/dist/apis/file.cjs +6 -6
  56. package/dist/apis/file.js +1 -1
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/integration-toolkit.cjs +8 -8
  60. package/dist/apis/integration-toolkit.d.cts +2 -2
  61. package/dist/apis/integration-toolkit.d.ts +2 -2
  62. package/dist/apis/integration-toolkit.js +2 -2
  63. package/dist/apis/journey.cjs +6 -6
  64. package/dist/apis/journey.js +1 -1
  65. package/dist/apis/kanban.cjs +6 -6
  66. package/dist/apis/kanban.js +1 -1
  67. package/dist/apis/message.cjs +6 -6
  68. package/dist/apis/message.js +1 -1
  69. package/dist/apis/metering.cjs +6 -6
  70. package/dist/apis/metering.js +1 -1
  71. package/dist/apis/notes.cjs +6 -6
  72. package/dist/apis/notes.js +1 -1
  73. package/dist/apis/notification.cjs +6 -6
  74. package/dist/apis/notification.js +1 -1
  75. package/dist/apis/organization.cjs +6 -6
  76. package/dist/apis/organization.js +1 -1
  77. package/dist/apis/partner-directory.cjs +6 -6
  78. package/dist/apis/partner-directory.js +1 -1
  79. package/dist/apis/permissions.cjs +6 -6
  80. package/dist/apis/permissions.js +1 -1
  81. package/dist/apis/pricing-tier.cjs +6 -6
  82. package/dist/apis/pricing-tier.js +1 -1
  83. package/dist/apis/pricing.cjs +6 -6
  84. package/dist/apis/pricing.js +1 -1
  85. package/dist/apis/purpose.cjs +6 -6
  86. package/dist/apis/purpose.js +1 -1
  87. package/dist/apis/query.cjs +6 -6
  88. package/dist/apis/query.js +1 -1
  89. package/dist/apis/sandbox.cjs +6 -6
  90. package/dist/apis/sandbox.js +1 -1
  91. package/dist/apis/sharing.cjs +6 -6
  92. package/dist/apis/sharing.js +1 -1
  93. package/dist/apis/snapshot.cjs +6 -6
  94. package/dist/apis/snapshot.js +1 -1
  95. package/dist/apis/submission.cjs +6 -6
  96. package/dist/apis/submission.js +1 -1
  97. package/dist/apis/target.cjs +6 -6
  98. package/dist/apis/target.js +1 -1
  99. package/dist/apis/targeting.cjs +6 -6
  100. package/dist/apis/targeting.js +1 -1
  101. package/dist/apis/template-variables.cjs +6 -6
  102. package/dist/apis/template-variables.js +1 -1
  103. package/dist/apis/user.cjs +6 -6
  104. package/dist/apis/user.js +1 -1
  105. package/dist/apis/validation-rules.cjs +6 -6
  106. package/dist/apis/validation-rules.js +1 -1
  107. package/dist/apis/webhooks.cjs +6 -6
  108. package/dist/apis/webhooks.js +1 -1
  109. package/dist/apis/workflow-definition.cjs +6 -6
  110. package/dist/apis/workflow-definition.js +1 -1
  111. package/dist/apis/workflow.cjs +6 -6
  112. package/dist/apis/workflow.js +1 -1
  113. package/dist/automation-UES4YTBX.js +7 -0
  114. package/dist/automation-ZPPNTUOZ.cjs +7 -0
  115. package/dist/{automation-runtime-VP4M7Z4R.js → automation-runtime-ORW5BVCD.js} +1 -1
  116. package/dist/{automation-runtime-DO5QSGJJ.cjs → automation-runtime-RM5EOZH2.cjs} +2 -2
  117. package/dist/{automation.d-Beojxb43.d.cts → automation.d-DocUQr4m.d.cts} +137 -2
  118. package/dist/{automation.d-Beojxb43.d.ts → automation.d-DocUQr4m.d.ts} +137 -2
  119. package/dist/{chunk-DVM27A7E.cjs → chunk-ADSWGLIV.cjs} +1 -1
  120. package/dist/chunk-LCE7N4ZL.js +14 -0
  121. package/dist/{chunk-7YXY2AFM.cjs → chunk-QXKCYTF3.cjs} +1 -1
  122. package/dist/{chunk-U6KIZOOU.js → chunk-RJHXXGJ3.js} +1 -1
  123. package/dist/{chunk-EPXD4DIT.js → chunk-UCCKYJMU.js} +4 -4
  124. package/dist/{chunk-45UKIH2C.cjs → chunk-X3MPAK4C.cjs} +4 -4
  125. package/dist/index.cjs +12 -12
  126. package/dist/index.d.cts +2 -2
  127. package/dist/index.d.ts +2 -2
  128. package/dist/index.js +3 -3
  129. package/dist/integration-toolkit-DEKRQV2C.js +7 -0
  130. package/dist/integration-toolkit-GPRIODXO.cjs +7 -0
  131. package/dist/{integration-toolkit-runtime-SX6HZTRB.cjs → integration-toolkit-runtime-PI5G3OXL.cjs} +2 -2
  132. package/dist/{integration-toolkit-runtime-O4742UZV.js → integration-toolkit-runtime-VUOXZ6HU.js} +1 -1
  133. package/dist/{integration-toolkit.d-BUCHo8ZQ.d.cts → integration-toolkit.d-DUJR0HBY.d.cts} +332 -1
  134. package/dist/{integration-toolkit.d-BUCHo8ZQ.d.ts → integration-toolkit.d-DUJR0HBY.d.ts} +332 -1
  135. package/docs/automation.md +196 -0
  136. package/docs/integration-toolkit.md +367 -0
  137. package/package.json +1 -1
  138. package/dist/automation-5NBZZJK2.cjs +0 -7
  139. package/dist/automation-HKXKZO4Z.js +0 -7
  140. package/dist/chunk-WT26LFC2.js +0 -14
  141. package/dist/integration-toolkit-MQ6PTYCJ.cjs +0 -7
  142. package/dist/integration-toolkit-Y43WV22G.js +0 -7
@@ -35,6 +35,7 @@ const { data } = await automationClient.searchFlows(...)
35
35
  **executions**
36
36
  - [`getExecutions`](#getexecutions)
37
37
  - [`startExecution`](#startexecution)
38
+ - [`searchExecutions`](#searchexecutions)
38
39
  - [`getExecution`](#getexecution)
39
40
  - [`cancelExecution`](#cancelexecution)
40
41
  - [`retriggerAction`](#retriggeraction)
@@ -137,6 +138,8 @@ const { data } = await automationClient.searchFlows(...)
137
138
  - [`ApiCallerContext`](#apicallercontext)
138
139
  - [`ExecutionStatus`](#executionstatus)
139
140
  - [`GetExecutionsResp`](#getexecutionsresp)
141
+ - [`SearchExecutionsReq`](#searchexecutionsreq)
142
+ - [`SearchExecutionsResp`](#searchexecutionsresp)
140
143
  - [`StartExecutionRequest`](#startexecutionrequest)
141
144
  - [`PatchBulkJobRequest`](#patchbulkjobrequest)
142
145
  - [`BulkTriggerRequest`](#bulktriggerrequest)
@@ -494,6 +497,67 @@ const { data } = await client.startExecution(
494
497
 
495
498
  ---
496
499
 
500
+ ### `searchExecutions`
501
+
502
+ Search automation executions of an entity with cursor-based pagination.
503
+ Returns pages of up to 100 executions, newest first.
504
+ Prefer this over GET /v1/automation/executions, which returns the full
505
+ exec
506
+
507
+ `POST /v1/automation/executions:search`
508
+
509
+ ```ts
510
+ const { data } = await client.searchExecutions(
511
+ null,
512
+ {
513
+ entity_id: 'e3d3ebac-baab-4395-abf4-50b5bf1f8b74',
514
+ include_flows: false,
515
+ size: 25,
516
+ cursor: 'string'
517
+ },
518
+ )
519
+ ```
520
+
521
+ <details>
522
+ <summary>Response</summary>
523
+
524
+ ```json
525
+ {
526
+ "total": 0,
527
+ "results": [
528
+ {
529
+ "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
530
+ "execution_status": "pending",
531
+ "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
532
+ "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
533
+ "entity_snapshot": {},
534
+ "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
535
+ "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
536
+ "flow_name": "Handle contact form",
537
+ "created_at": "1970-01-01T00:00:00.000Z",
538
+ "updated_at": "1970-01-01T00:00:00.000Z",
539
+ "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
540
+ "conditions": [],
541
+ "schedules": [],
542
+ "actions": [],
543
+ "resume_token": "eyJraWQiOiJrZXkifQ==",
544
+ "trigger_context": {},
545
+ "version": 2,
546
+ "trigger_event": {},
547
+ "workflow_context": {},
548
+ "loops": [],
549
+ "loop_state": {},
550
+ "chain": ["string"]
551
+ }
552
+ ],
553
+ "next_cursor": "string"
554
+ }
555
+ ```
556
+
557
+ </details>
558
+
559
+ ---
560
+
497
561
  ### `bulkTriggerExecutions`
498
562
 
499
563
  Create a bulk job that triggers multiple automation executions
@@ -2284,6 +2348,13 @@ type AssignThreadAction = {
2284
2348
  config?: {
2285
2349
  remove?: string[]
2286
2350
  add?: string[]
2351
+ assignment_type?: "direct" | "even_distribution" | "sequential"
2352
+ only_available_users?: boolean
2353
+ match_user_skills?: boolean
2354
+ required_skill_categories?: string[]
2355
+ skill_match_mode?: "require_all" | "prefer"
2356
+ fallback?: "leave_unassigned" | "assign_to_fallback"
2357
+ fallback_assignees?: string[]
2287
2358
  }
2288
2359
  }
2289
2360
  ```
@@ -2302,6 +2373,13 @@ type MoveThreadConfig = {
2302
2373
  type AssignThreadConfig = {
2303
2374
  remove?: string[]
2304
2375
  add?: string[]
2376
+ assignment_type?: "direct" | "even_distribution" | "sequential"
2377
+ only_available_users?: boolean
2378
+ match_user_skills?: boolean
2379
+ required_skill_categories?: string[]
2380
+ skill_match_mode?: "require_all" | "prefer"
2381
+ fallback?: "leave_unassigned" | "assign_to_fallback"
2382
+ fallback_assignees?: string[]
2305
2383
  }
2306
2384
  ```
2307
2385
 
@@ -3402,6 +3480,124 @@ type GetExecutionsResp = {
3402
3480
  }
3403
3481
  ```
3404
3482
 
3483
+ ### `SearchExecutionsReq`
3484
+
3485
+ ```ts
3486
+ type SearchExecutionsReq = {
3487
+ entity_id: string
3488
+ include_flows?: boolean
3489
+ size?: number
3490
+ cursor?: string
3491
+ }
3492
+ ```
3493
+
3494
+ ### `SearchExecutionsResp`
3495
+
3496
+ ```ts
3497
+ type SearchExecutionsResp = {
3498
+ total: number
3499
+ results: Array<{
3500
+ id: string
3501
+ execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
3502
+ entity_id: string
3503
+ activity_id?: string
3504
+ entity_snapshot?: {
3505
+ _id: { ... }
3506
+ _title: { ... }
3507
+ _org: { ... }
3508
+ _schema: { ... }
3509
+ _tags?: { ... }
3510
+ _created_at: { ... }
3511
+ _updated_at: { ... }
3512
+ }
3513
+ org_id: string
3514
+ flow_id: string
3515
+ flow_name?: string
3516
+ created_at?: string // date-time
3517
+ updated_at?: string // date-time
3518
+ current_action_id?: string
3519
+ conditions?: Array<{
3520
+ id?: { ... }
3521
+ schedule_id?: { ... }
3522
+ evaluation_order?: { ... }
3523
+ evaluationResult?: { ... }
3524
+ error_output?: { ... }
3525
+ allow_failure?: { ... }
3526
+ statements?: { ... }
3527
+ }>
3528
+ schedules?: Array<{
3529
+ id: { ... }
3530
+ scheduleApiId?: { ... }
3531
+ numberOfUnits?: { ... }
3532
+ timePeriod?: { ... }
3533
+ timeRelation?: { ... }
3534
+ source: { ... }
3535
+ }>
3536
+ actions: Array<{
3537
+ type?: { ... }
3538
+ config?: { ... }
3539
+ } | {
3540
+ type?: { ... }
3541
+ config?: { ... }
3542
+ } | {
3543
+ type?: { ... }
3544
+ config?: { ... }
3545
+ } | {
3546
+ type?: { ... }
3547
+ config?: { ... }
3548
+ } | {
3549
+ type?: { ... }
3550
+ config?: { ... }
3551
+ } | {
3552
+ type?: { ... }
3553
+ config?: { ... }
3554
+ } | {
3555
+ type?: { ... }
3556
+ config?: { ... }
3557
+ } | {
3558
+ type?: { ... }
3559
+ config?: { ... }
3560
+ } | {
3561
+ type?: { ... }
3562
+ config?: { ... }
3563
+ } | {
3564
+ type?: { ... }
3565
+ config?: { ... }
3566
+ } | {
3567
+ id?: { ... }
3568
+ flow_action_id?: { ... }
3569
+ name?: { ... }
3570
+ type?: { ... }
3571
+ config?: { ... }
3572
+ allow_failure?: { ... }
3573
+ created_automatically?: { ... }
3574
+ is_bulk_action?: { ... }
3575
+ reason?: { ... }
3576
+ condition_id?: { ... }
3577
+ schedule_id?: { ... }
3578
+ loop_id?: { ... }
3579
+ execution_status?: { ... }
3580
+ started_at?: { ... }
3581
+ updated_at?: { ... }
3582
+ outputs?: { ... }
3583
+ error_output?: { ... }
3584
+ retry_strategy?: { ... }
3585
+ iterations?: { ... }
3586
+ } | {
3587
+ type?: { ... }
3588
+ config?: { ... }
3589
+ } | {
3590
+ type?: { ... }
3591
+ config?: { ... }
3592
+ } | {
3593
+ type?: { ... }
3594
+ config?: { ... }
3595
+ }>
3596
+ resume_token?: string
3597
+ // ...
3598
+ }
3599
+ ```
3600
+
3405
3601
  ### `StartExecutionRequest`
3406
3602
 
3407
3603
  ```ts
@@ -88,7 +88,22 @@ const { data } = await integrationToolkitClient.acknowledgeTracking(...)
88
88
  **managed-call**
89
89
  - [`managedCallExecute`](#managedcallexecute)
90
90
 
91
+ **erp-imports**
92
+ - [`createErpImport`](#createerpimport)
93
+ - [`listErpImports`](#listerpimports)
94
+ - [`getErpImport`](#geterpimport)
95
+ - [`executeErpImport`](#executeerpimport)
96
+ - [`abortErpImport`](#aborterpimport)
97
+
91
98
  **Schemas**
99
+ - [`S3Reference`](#s3reference)
100
+ - [`CreateErpImportRequest`](#createerpimportrequest)
101
+ - [`ErpImportValidation`](#erpimportvalidation)
102
+ - [`ErpImportProgress`](#erpimportprogress)
103
+ - [`ErpImportError`](#erpimporterror)
104
+ - [`CreateErpImportResponse`](#createerpimportresponse)
105
+ - [`ErpImportJob`](#erpimportjob)
106
+ - [`ErpImportList`](#erpimportlist)
92
107
  - [`NotificationHistoryItem`](#notificationhistoryitem)
93
108
  - [`NotificationHistoryResponse`](#notificationhistoryresponse)
94
109
  - [`TestNotificationRequest`](#testnotificationrequest)
@@ -953,6 +968,15 @@ const { data } = await client.replayEvents(
953
968
 
954
969
  ```json
955
970
  {
971
+ "replayed": 2,
972
+ "results": [
973
+ {
974
+ "event_id": "string",
975
+ "status": "success",
976
+ "replay_event_id": "string",
977
+ "message": "string"
978
+ }
979
+ ],
956
980
  "event_ids": ["string"]
957
981
  }
958
982
  ```
@@ -3075,8 +3099,351 @@ const { data } = await client.commitTypes(
3075
3099
 
3076
3100
  ---
3077
3101
 
3102
+ ### `createErpImport`
3103
+
3104
+ Create a pricing-file import job from an already-uploaded file (S3 ref). Returns a job id and starts the validate phase asynchronously — poll GET /v2/erp/imports/{importId}.
3105
+
3106
+ `POST /v2/erp/imports`
3107
+
3108
+ ```ts
3109
+ const { data } = await client.createErpImport(
3110
+ null,
3111
+ {
3112
+ s3_reference: {
3113
+ bucket: 'string',
3114
+ key: 'string'
3115
+ },
3116
+ integration_id: 'string',
3117
+ use_case_slug: 'string'
3118
+ },
3119
+ )
3120
+ ```
3121
+
3122
+ ---
3123
+
3124
+ ### `listErpImports`
3125
+
3126
+ List recent pricing-file import jobs for the org, newest first.
3127
+
3128
+ `GET /v2/erp/imports`
3129
+
3130
+ ```ts
3131
+ const { data } = await client.listErpImports({
3132
+ limit: 1,
3133
+ cursor: 'example',
3134
+ })
3135
+ ```
3136
+
3137
+ <details>
3138
+ <summary>Response</summary>
3139
+
3140
+ ```json
3141
+ {
3142
+ "results": [
3143
+ {
3144
+ "import_id": "string",
3145
+ "org_id": "string",
3146
+ "created_by": "string",
3147
+ "integration_id": "string",
3148
+ "use_case_slug": "string",
3149
+ "format": "csv",
3150
+ "status": "PENDING",
3151
+ "s3_input_ref": {
3152
+ "bucket": "string",
3153
+ "key": "string"
3154
+ },
3155
+ "validation": {
3156
+ "total_rows": 0,
3157
+ "blocking": 0,
3158
+ "warnings": 0,
3159
+ "entities": {}
3160
+ },
3161
+ "progress": {
3162
+ "processed_rows": 0,
3163
+ "total_rows": 0
3164
+ },
3165
+ "error": {
3166
+ "type": "VALIDATION_BLOCKED",
3167
+ "message": "string"
3168
+ },
3169
+ "correlation_id": "string",
3170
+ "activity_id": "string",
3171
+ "created_at": "1970-01-01T00:00:00.000Z",
3172
+ "updated_at": "1970-01-01T00:00:00.000Z"
3173
+ }
3174
+ ],
3175
+ "next_cursor": "string"
3176
+ }
3177
+ ```
3178
+
3179
+ </details>
3180
+
3181
+ ---
3182
+
3183
+ ### `getErpImport`
3184
+
3185
+ Get a pricing-file import job (status, counts, result links).
3186
+
3187
+ `GET /v2/erp/imports/{importId}`
3188
+
3189
+ ```ts
3190
+ const { data } = await client.getErpImport({
3191
+ importId: 'example',
3192
+ })
3193
+ ```
3194
+
3195
+ <details>
3196
+ <summary>Response</summary>
3197
+
3198
+ ```json
3199
+ {
3200
+ "import_id": "string",
3201
+ "org_id": "string",
3202
+ "created_by": "string",
3203
+ "integration_id": "string",
3204
+ "use_case_slug": "string",
3205
+ "format": "csv",
3206
+ "status": "PENDING",
3207
+ "s3_input_ref": {
3208
+ "bucket": "string",
3209
+ "key": "string"
3210
+ },
3211
+ "validation": {
3212
+ "total_rows": 0,
3213
+ "blocking": 0,
3214
+ "warnings": 0,
3215
+ "entities": {}
3216
+ },
3217
+ "progress": {
3218
+ "processed_rows": 0,
3219
+ "total_rows": 0
3220
+ },
3221
+ "error": {
3222
+ "type": "VALIDATION_BLOCKED",
3223
+ "message": "string"
3224
+ },
3225
+ "correlation_id": "string",
3226
+ "activity_id": "string",
3227
+ "created_at": "1970-01-01T00:00:00.000Z",
3228
+ "updated_at": "1970-01-01T00:00:00.000Z"
3229
+ }
3230
+ ```
3231
+
3232
+ </details>
3233
+
3234
+ ---
3235
+
3236
+ ### `executeErpImport`
3237
+
3238
+ Confirm and run the write phase of a validated import. Only a READY job may be executed; any other status returns 409.
3239
+
3240
+ `POST /v2/erp/imports/{importId}:execute`
3241
+
3242
+ ```ts
3243
+ const { data } = await client.executeErpImport({
3244
+ importId: 'example',
3245
+ })
3246
+ ```
3247
+
3248
+ <details>
3249
+ <summary>Response</summary>
3250
+
3251
+ ```json
3252
+ {
3253
+ "import_id": "string",
3254
+ "org_id": "string",
3255
+ "created_by": "string",
3256
+ "integration_id": "string",
3257
+ "use_case_slug": "string",
3258
+ "format": "csv",
3259
+ "status": "PENDING",
3260
+ "s3_input_ref": {
3261
+ "bucket": "string",
3262
+ "key": "string"
3263
+ },
3264
+ "validation": {
3265
+ "total_rows": 0,
3266
+ "blocking": 0,
3267
+ "warnings": 0,
3268
+ "entities": {}
3269
+ },
3270
+ "progress": {
3271
+ "processed_rows": 0,
3272
+ "total_rows": 0
3273
+ },
3274
+ "error": {
3275
+ "type": "VALIDATION_BLOCKED",
3276
+ "message": "string"
3277
+ },
3278
+ "correlation_id": "string",
3279
+ "activity_id": "string",
3280
+ "created_at": "1970-01-01T00:00:00.000Z",
3281
+ "updated_at": "1970-01-01T00:00:00.000Z"
3282
+ }
3283
+ ```
3284
+
3285
+ </details>
3286
+
3287
+ ---
3288
+
3289
+ ### `abortErpImport`
3290
+
3291
+ Ask a running import to stop. Valid while the job is VALIDATING or PROCESSING; any other status returns 409.
3292
+ The stop is cooperative: the job passes through CANCELLING and typically reaches CANCELLED
3293
+
3294
+ `POST /v2/erp/imports/{importId}:abort`
3295
+
3296
+ ```ts
3297
+ const { data } = await client.abortErpImport({
3298
+ importId: 'example',
3299
+ })
3300
+ ```
3301
+
3302
+ ---
3303
+
3078
3304
  ## Schemas
3079
3305
 
3306
+ ### `S3Reference`
3307
+
3308
+ ```ts
3309
+ type S3Reference = {
3310
+ bucket: string
3311
+ key: string
3312
+ }
3313
+ ```
3314
+
3315
+ ### `CreateErpImportRequest`
3316
+
3317
+ ```ts
3318
+ type CreateErpImportRequest = {
3319
+ s3_reference: {
3320
+ bucket: string
3321
+ key: string
3322
+ }
3323
+ integration_id: string
3324
+ use_case_slug?: string
3325
+ }
3326
+ ```
3327
+
3328
+ ### `ErpImportValidation`
3329
+
3330
+ Validate-phase summary: what the file will create, and whether it may be confirmed. Absent until the validate phase completes. No per-row detail is kept — a rejected file is corrected and imported again.
3331
+
3332
+ ```ts
3333
+ type ErpImportValidation = {
3334
+ total_rows: number
3335
+ blocking: number
3336
+ warnings: number
3337
+ entities: Record<string, number>
3338
+ }
3339
+ ```
3340
+
3341
+ ### `ErpImportProgress`
3342
+
3343
+ How far the currently running phase has got. Written at every batch boundary, so it advances during long runs rather than only at the end.
3344
+ `total_rows` is ABSENT during the validate phase until the file has been read to the end — there is deliberately no counting pass, since that would be a second u
3345
+
3346
+ ```ts
3347
+ type ErpImportProgress = {
3348
+ processed_rows: number
3349
+ total_rows?: number
3350
+ }
3351
+ ```
3352
+
3353
+ ### `ErpImportError`
3354
+
3355
+ Why the import failed — present if and only if status = FAILED.
3356
+
3357
+ ```ts
3358
+ type ErpImportError = {
3359
+ type: "VALIDATION_BLOCKED" | "PROCESSING_ERROR" | "INTERNAL_ERROR"
3360
+ message: string
3361
+ }
3362
+ ```
3363
+
3364
+ ### `CreateErpImportResponse`
3365
+
3366
+ ```ts
3367
+ type CreateErpImportResponse = {
3368
+ import_id: string
3369
+ }
3370
+ ```
3371
+
3372
+ ### `ErpImportJob`
3373
+
3374
+ ```ts
3375
+ type ErpImportJob = {
3376
+ import_id: string
3377
+ org_id: string
3378
+ created_by?: string
3379
+ integration_id: string
3380
+ use_case_slug?: string
3381
+ format: "csv" | "xlsx"
3382
+ status: "PENDING" | "VALIDATING" | "READY" | "PROCESSING" | "IMPORTED" | "FAILED" | "CANCELLING" | "CANCELLED"
3383
+ s3_input_ref: {
3384
+ bucket: string
3385
+ key: string
3386
+ }
3387
+ validation?: {
3388
+ total_rows: number
3389
+ blocking: number
3390
+ warnings: number
3391
+ entities: Record<string, number>
3392
+ }
3393
+ progress?: {
3394
+ processed_rows: number
3395
+ total_rows?: number
3396
+ }
3397
+ error?: {
3398
+ type: "VALIDATION_BLOCKED" | "PROCESSING_ERROR" | "INTERNAL_ERROR"
3399
+ message: string
3400
+ }
3401
+ correlation_id?: string
3402
+ activity_id?: string
3403
+ created_at: string // date-time
3404
+ updated_at: string // date-time
3405
+ }
3406
+ ```
3407
+
3408
+ ### `ErpImportList`
3409
+
3410
+ ```ts
3411
+ type ErpImportList = {
3412
+ results: Array<{
3413
+ import_id: string
3414
+ org_id: string
3415
+ created_by?: string
3416
+ integration_id: string
3417
+ use_case_slug?: string
3418
+ format: "csv" | "xlsx"
3419
+ status: "PENDING" | "VALIDATING" | "READY" | "PROCESSING" | "IMPORTED" | "FAILED" | "CANCELLING" | "CANCELLED"
3420
+ s3_input_ref: {
3421
+ bucket: { ... }
3422
+ key: { ... }
3423
+ }
3424
+ validation?: {
3425
+ total_rows: { ... }
3426
+ blocking: { ... }
3427
+ warnings: { ... }
3428
+ entities: { ... }
3429
+ }
3430
+ progress?: {
3431
+ processed_rows: { ... }
3432
+ total_rows?: { ... }
3433
+ }
3434
+ error?: {
3435
+ type: { ... }
3436
+ message: { ... }
3437
+ }
3438
+ correlation_id?: string
3439
+ activity_id?: string
3440
+ created_at: string // date-time
3441
+ updated_at: string // date-time
3442
+ }>
3443
+ next_cursor?: string
3444
+ }
3445
+ ```
3446
+
3080
3447
  ### `NotificationHistoryItem`
3081
3448
 
3082
3449
  A single notification-history row (one real notification decision).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.15.13",
3
+ "version": "2.15.15",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",