@epilot/sdk 2.18.11 → 2.18.12

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 (121) hide show
  1. package/definitions/integration-toolkit.json +54 -42
  2. package/dist/apis/access-token.cjs +6 -6
  3. package/dist/apis/access-token.js +1 -1
  4. package/dist/apis/address-suggestions.cjs +6 -6
  5. package/dist/apis/address-suggestions.js +1 -1
  6. package/dist/apis/address.cjs +6 -6
  7. package/dist/apis/address.js +1 -1
  8. package/dist/apis/ai-agents.cjs +6 -6
  9. package/dist/apis/ai-agents.js +1 -1
  10. package/dist/apis/app.cjs +6 -6
  11. package/dist/apis/app.js +1 -1
  12. package/dist/apis/audit-logs.cjs +6 -6
  13. package/dist/apis/audit-logs.js +1 -1
  14. package/dist/apis/automation.cjs +6 -6
  15. package/dist/apis/automation.js +1 -1
  16. package/dist/apis/billing.cjs +6 -6
  17. package/dist/apis/billing.js +1 -1
  18. package/dist/apis/blueprint-manifest.cjs +6 -6
  19. package/dist/apis/blueprint-manifest.js +1 -1
  20. package/dist/apis/calendar.cjs +6 -6
  21. package/dist/apis/calendar.js +1 -1
  22. package/dist/apis/configuration-hub.cjs +6 -6
  23. package/dist/apis/configuration-hub.js +1 -1
  24. package/dist/apis/consent.cjs +6 -6
  25. package/dist/apis/consent.js +1 -1
  26. package/dist/apis/customer-portal.cjs +6 -6
  27. package/dist/apis/customer-portal.js +1 -1
  28. package/dist/apis/dashboard.cjs +6 -6
  29. package/dist/apis/dashboard.js +1 -1
  30. package/dist/apis/data-governance.cjs +6 -6
  31. package/dist/apis/data-governance.js +1 -1
  32. package/dist/apis/deduplication.cjs +6 -6
  33. package/dist/apis/deduplication.js +1 -1
  34. package/dist/apis/design.cjs +6 -6
  35. package/dist/apis/design.js +1 -1
  36. package/dist/apis/document.cjs +6 -6
  37. package/dist/apis/document.js +1 -1
  38. package/dist/apis/email-settings.cjs +6 -6
  39. package/dist/apis/email-settings.js +1 -1
  40. package/dist/apis/email-template.cjs +6 -6
  41. package/dist/apis/email-template.js +1 -1
  42. package/dist/apis/entity-mapping.cjs +6 -6
  43. package/dist/apis/entity-mapping.js +1 -1
  44. package/dist/apis/entity.cjs +6 -6
  45. package/dist/apis/entity.js +1 -1
  46. package/dist/apis/environments.cjs +6 -6
  47. package/dist/apis/environments.js +1 -1
  48. package/dist/apis/event-catalog.cjs +6 -6
  49. package/dist/apis/event-catalog.js +1 -1
  50. package/dist/apis/file.cjs +6 -6
  51. package/dist/apis/file.js +1 -1
  52. package/dist/apis/iban.cjs +6 -6
  53. package/dist/apis/iban.js +1 -1
  54. package/dist/apis/integration-toolkit.cjs +6 -6
  55. package/dist/apis/integration-toolkit.d.cts +2 -2
  56. package/dist/apis/integration-toolkit.d.ts +2 -2
  57. package/dist/apis/integration-toolkit.js +1 -1
  58. package/dist/apis/journey.cjs +6 -6
  59. package/dist/apis/journey.js +1 -1
  60. package/dist/apis/kanban.cjs +6 -6
  61. package/dist/apis/kanban.js +1 -1
  62. package/dist/apis/message.cjs +6 -6
  63. package/dist/apis/message.js +1 -1
  64. package/dist/apis/metering.cjs +6 -6
  65. package/dist/apis/metering.js +1 -1
  66. package/dist/apis/notes.cjs +6 -6
  67. package/dist/apis/notes.js +1 -1
  68. package/dist/apis/notification.cjs +6 -6
  69. package/dist/apis/notification.js +1 -1
  70. package/dist/apis/organization.cjs +6 -6
  71. package/dist/apis/organization.js +1 -1
  72. package/dist/apis/partner-directory.cjs +6 -6
  73. package/dist/apis/partner-directory.js +1 -1
  74. package/dist/apis/permissions.cjs +6 -6
  75. package/dist/apis/permissions.js +1 -1
  76. package/dist/apis/pricing-tier.cjs +6 -6
  77. package/dist/apis/pricing-tier.js +1 -1
  78. package/dist/apis/pricing.cjs +6 -6
  79. package/dist/apis/pricing.js +1 -1
  80. package/dist/apis/purpose.cjs +6 -6
  81. package/dist/apis/purpose.js +1 -1
  82. package/dist/apis/query.cjs +6 -6
  83. package/dist/apis/query.js +1 -1
  84. package/dist/apis/sandbox.cjs +6 -6
  85. package/dist/apis/sandbox.js +1 -1
  86. package/dist/apis/sharing.cjs +6 -6
  87. package/dist/apis/sharing.js +1 -1
  88. package/dist/apis/snapshot.cjs +6 -6
  89. package/dist/apis/snapshot.js +1 -1
  90. package/dist/apis/submission.cjs +6 -6
  91. package/dist/apis/submission.js +1 -1
  92. package/dist/apis/target.cjs +6 -6
  93. package/dist/apis/target.js +1 -1
  94. package/dist/apis/targeting.cjs +6 -6
  95. package/dist/apis/targeting.js +1 -1
  96. package/dist/apis/template-variables.cjs +6 -6
  97. package/dist/apis/template-variables.js +1 -1
  98. package/dist/apis/user.cjs +6 -6
  99. package/dist/apis/user.js +1 -1
  100. package/dist/apis/validation-rules.cjs +6 -6
  101. package/dist/apis/validation-rules.js +1 -1
  102. package/dist/apis/webhooks.cjs +6 -6
  103. package/dist/apis/webhooks.js +1 -1
  104. package/dist/apis/workflow-definition.cjs +6 -6
  105. package/dist/apis/workflow-definition.js +1 -1
  106. package/dist/apis/workflow.cjs +6 -6
  107. package/dist/apis/workflow.js +1 -1
  108. package/dist/{chunk-MIHMEO7K.js → chunk-4LZNHNK7.js} +1 -1
  109. package/dist/{chunk-324JJ7CA.cjs → chunk-R6N6H5M2.cjs} +1 -1
  110. package/dist/index.cjs +8 -8
  111. package/dist/index.d.cts +1 -1
  112. package/dist/index.d.ts +1 -1
  113. package/dist/index.js +1 -1
  114. package/dist/integration-toolkit-RIBZBI2Y.js +7 -0
  115. package/dist/integration-toolkit-RPWD4MAN.cjs +7 -0
  116. package/dist/{integration-toolkit.d-D5LjhCQB.d.cts → integration-toolkit.d-pP-3dBPT.d.cts} +50 -39
  117. package/dist/{integration-toolkit.d-D5LjhCQB.d.ts → integration-toolkit.d-pP-3dBPT.d.ts} +50 -39
  118. package/docs/integration-toolkit.md +130 -73
  119. package/package.json +1 -1
  120. package/dist/integration-toolkit-OSK5M75F.js +0 -7
  121. package/dist/integration-toolkit-W5IENOJW.cjs +0 -7
@@ -1344,16 +1344,13 @@ declare namespace Components {
1344
1344
  export interface CreateErpImportRequest {
1345
1345
  s3_reference: S3Reference;
1346
1346
  /**
1347
- * Return a sample of the file's first rows. Informational only`:validate` is still the authority. `preview` is present iff this is true.
1347
+ * Return a sample of the file's first rows in `preview`. Only controls whether the sample comes BACK the head is read either way, because that read is how an unreadable file gets refused.
1348
1348
  */
1349
1349
  include_preview?: boolean;
1350
1350
  }
1351
1351
  export interface CreateErpImportResponse {
1352
- /**
1353
- * `imp_{ULID}` time-ordered, also used as the job's correlation_id.
1354
- */
1355
- import_id: string;
1356
- preview?: /* Sample of the file's first rows, using the same parser as `:validate`. `status` is the outcome of this read, not a verdict on the file. */ ErpImportFilePreview;
1352
+ job: ErpImportJob;
1353
+ preview?: /* Sample of the file's first rows, using the same parser as `:validate`. Registration refuses a file it cannot read, so a created job always includes this. */ ErpImportFilePreview;
1357
1354
  }
1358
1355
  export interface CreateFileProxyUseCaseRequest {
1359
1356
  /**
@@ -2078,7 +2075,7 @@ declare namespace Components {
2078
2075
  group_id?: string;
2079
2076
  };
2080
2077
  /**
2081
- * Why the import failed — present if and only if status = FAILED.
2078
+ * Why the import failed — present if and only if status = FAILED. `code` is the translation key; for VALIDATION_BLOCKED the specifics are in `validation`.
2082
2079
  */
2083
2080
  export interface ErpImportError {
2084
2081
  /**
@@ -2087,29 +2084,26 @@ declare namespace Components {
2087
2084
  */
2088
2085
  code: "VALIDATION_BLOCKED" | "FILE_FORMAT_UNSUPPORTED" | "FILE_UNAVAILABLE" | "VALIDATE_TIMEOUT" | "IMPORT_TIMEOUT" | "USE_CASE_NOT_USABLE" | "IMPORT_NO_PROGRESS" | "INTERNAL_ERROR";
2089
2086
  /**
2090
- * User-facing explanation of `type`.
2087
+ * One English sentence, derived from `code` so the two always agree. A fallback for a client that has no translation for this code — prefer translating `code`, and never parse this. It deliberately does NOT restate `validation.issues`.
2091
2088
  */
2092
2089
  message: string;
2093
2090
  }
2094
2091
  /**
2095
- * Sample of the file's first rows, using the same parser as `:validate`. `status` is the outcome of this read, not a verdict on the file.
2092
+ * Sample of the file's first rows, using the same parser as `:validate`. Registration refuses a file it cannot read, so a created job always includes this.
2096
2093
  */
2097
2094
  export interface ErpImportFilePreview {
2098
2095
  /**
2099
- * Treat an unrecognized value as "no preview available". Values may be added. UNREADABLE covers empty, header-only, malformed, or gone — there is no breakdown; `:validate` reports the reason.
2100
- */
2101
- status: "AVAILABLE" | "FORMAT_UNSUPPORTED" | "UNREADABLE";
2102
- /**
2103
- * Effective column names (trimmed, duplicates collapsed). Set iff `status` is AVAILABLE.
2096
+ * Effective column names (trimmed, duplicates collapsed).
2104
2097
  */
2105
- columns?: string[];
2098
+ columns: string[];
2106
2099
  /**
2107
- * Up to the first 5 data rows, aligned to `columns`.
2100
+ * Up to the first 3 data rows, aligned to `columns`.
2108
2101
  */
2109
- rows?: string[][];
2102
+ rows: string[][];
2110
2103
  }
2111
2104
  /**
2112
- * A problem found during validation, scoped to the file as a whole rather than to individual rows. See `code` for the kinds reported.
2105
+ * A problem found during validation, scoped to the file as a whole rather than to individual rows.
2106
+ * `code` is the translation key and the other fields are its parameters — there is deliberately no message to display. Each code appears at most once, with everything it has to say aggregated into that one entry.
2113
2107
  */
2114
2108
  export interface ErpImportIssue {
2115
2109
  /**
@@ -2119,13 +2113,23 @@ declare namespace Components {
2119
2113
  code: "UNIQUE_ID_COLUMN_MISSING" | "MAPPED_COLUMN_MISSING" | "MALFORMED_ROW" | "INVALID_ENCODING" | "EMPTY_FILE" | "TOO_MANY_ROWS";
2120
2114
  severity: "warning" | "blocking";
2121
2115
  /**
2122
- * User-facing explanation. Lists at most 10 column names; `columns` has all of them.
2116
+ * The columns this issue is about, at most one entry per column per entity.
2117
+ * On UNIQUE_ID_COLUMN_MISSING the file has NONE of these. Do NOT tell the user that adding one of them is enough: a unique id may read several columns through a JSONata expression, and whether it combines them (`A & B`, both needed) or falls back between them (`A ? A : B`, either will do) is not knowable here.
2123
2118
  */
2124
- message: string;
2119
+ columns?: {
2120
+ /**
2121
+ * The column name, spelled as the mapping reads it.
2122
+ */
2123
+ name: string;
2124
+ /**
2125
+ * Slug of the entity this column helps identify. UNIQUE_ID_COLUMN_MISSING only.
2126
+ */
2127
+ entity?: string;
2128
+ }[];
2125
2129
  /**
2126
- * The columns this issue is about, so clients render names rather than parsing the message.
2130
+ * The offending data row, 1-based as the user counts rows. MALFORMED_ROW only.
2127
2131
  */
2128
- columns?: string[];
2132
+ row?: number;
2129
2133
  }
2130
2134
  export interface ErpImportJob {
2131
2135
  /**
@@ -2157,7 +2161,7 @@ declare namespace Components {
2157
2161
  * `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 unbounded read of the whole file. Render an indeterminate indicator while it is missing: dividing by a missing total yields a determinate bar pinned at 0%, which reads as a hung import.
2158
2162
  */
2159
2163
  ErpImportProgress;
2160
- error?: /* Why the import failed — present if and only if status = FAILED. */ ErpImportError;
2164
+ error?: /* Why the import failed — present if and only if status = FAILED. `code` is the translation key; for VALIDATION_BLOCKED the specifics are in `validation`. */ ErpImportError;
2161
2165
  /**
2162
2166
  * Scopes this run in monitoring. Always equal to `import_id`.
2163
2167
  */
@@ -2200,10 +2204,6 @@ declare namespace Components {
2200
2204
  * How many of the FILE's columns this use case reads, by exact trimmed name.
2201
2205
  */
2202
2206
  matched_columns: number;
2203
- /**
2204
- * Columns in the file. Identical across entries; repeated per entry so each row renders standalone as "matches N of your M columns".
2205
- */
2206
- file_columns: number;
2207
2207
  }
2208
2208
  /**
2209
2209
  * 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.
@@ -2213,6 +2213,9 @@ declare namespace Components {
2213
2213
  * Data rows read from the file.
2214
2214
  */
2215
2215
  total_rows: number;
2216
+ /**
2217
+ * Blocking problems found, counting per-row ones that are not listed in `issues`.
2218
+ */
2216
2219
  blocking: number;
2217
2220
  warnings: number;
2218
2221
  /**
@@ -2222,9 +2225,13 @@ declare namespace Components {
2222
2225
  [name: string]: number;
2223
2226
  };
2224
2227
  /**
2225
- * Whole-file issues. At most 20 are kept; the count of everything found is in blocking and warnings. Warnings here are what `ack_warnings` on `:execute` acknowledges.
2228
+ * Whole-file issues, at most one per `code`. Do not expect the length to match blocking + warnings: those also count per-row problems, which are recorded for support but never listed here. Warnings here are what `ack_warnings` on `:execute` acknowledges.
2229
+ */
2230
+ issues?: /**
2231
+ * A problem found during validation, scoped to the file as a whole rather than to individual rows.
2232
+ * `code` is the translation key and the other fields are its parameters — there is deliberately no message to display. Each code appears at most once, with everything it has to say aggregated into that one entry.
2226
2233
  */
2227
- issues?: /* A problem found during validation, scoped to the file as a whole rather than to individual rows. See `code` for the kinds reported. */ ErpImportIssue[];
2234
+ ErpImportIssue[];
2228
2235
  }
2229
2236
  export interface ErpUpdatesEventsV2Request {
2230
2237
  /**
@@ -6697,6 +6704,10 @@ declare namespace Components {
6697
6704
  overwrite?: boolean;
6698
6705
  }
6699
6706
  export interface SuggestErpImportUseCasesResponse {
6707
+ /**
6708
+ * Columns in the file. Present even when `suggestions` is empty.
6709
+ */
6710
+ file_columns: number;
6700
6711
  suggestions: ErpImportUseCaseSuggestion[];
6701
6712
  }
6702
6713
  export interface TestNotificationRequest {
@@ -7382,7 +7393,7 @@ declare namespace Paths {
7382
7393
  namespace CreateErpImport {
7383
7394
  export type RequestBody = /* Register an already-uploaded file as an import. The use case is chosen later, via `:validate` — upload and interpretation are separate decisions. */ Components.Schemas.CreateErpImportRequest;
7384
7395
  namespace Responses {
7385
- export type $202 = Components.Schemas.CreateErpImportResponse;
7396
+ export type $201 = Components.Schemas.CreateErpImportResponse;
7386
7397
  export type $400 = Components.Responses.BadRequest;
7387
7398
  export type $403 = Components.Responses.Forbidden;
7388
7399
  export type $500 = Components.Responses.InternalServerError;
@@ -7509,7 +7520,7 @@ declare namespace Paths {
7509
7520
  }
7510
7521
  export type RequestBody = /* Confirmation options. Required only when the verdict carries warnings — a clean import needs no body at all. */ Components.Schemas.ExecuteErpImportRequest;
7511
7522
  namespace Responses {
7512
- export type $200 = Components.Schemas.ErpImportJob;
7523
+ export type $202 = Components.Schemas.ErpImportJob;
7513
7524
  export type $403 = Components.Responses.Forbidden;
7514
7525
  export type $404 = Components.Responses.NotFound;
7515
7526
  export type $409 = Components.Responses.Conflict;
@@ -9129,13 +9140,13 @@ interface OperationMethods {
9129
9140
  /**
9130
9141
  * createErpImport - createErpImport
9131
9142
  *
9132
- * Register an already-uploaded file (S3 ref) as a pricing-file import job and return its id. Nothing runs yet: no use case is chosen and no validation starts here. Rank the candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start the validate phase with POST /v2/erp/imports/{importId}:validate.
9143
+ * Register an already-uploaded file (S3 ref) as a pricing-file import job. Returns the job and a file preview. Nothing runs yet: no use case is chosen and no validation starts here. Optionally rank candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start validation with POST /v2/erp/imports/{importId}:validate.
9133
9144
  */
9134
9145
  'createErpImport'(
9135
9146
  parameters?: Parameters<UnknownParamsObject> | null,
9136
9147
  data?: Paths.CreateErpImport.RequestBody,
9137
9148
  config?: AxiosRequestConfig
9138
- ): OperationResponse<Paths.CreateErpImport.Responses.$202>
9149
+ ): OperationResponse<Paths.CreateErpImport.Responses.$201>
9139
9150
  /**
9140
9151
  * getErpImport - getErpImport
9141
9152
  *
@@ -9160,7 +9171,7 @@ interface OperationMethods {
9160
9171
  /**
9161
9172
  * suggestErpImportUseCases - suggestErpImportUseCases
9162
9173
  *
9163
- * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Reads only the file's first row, not its data.
9174
+ * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Optional: skip this and call `:validate` directly when the use case is already known. Reads only the file's first row, not its data.
9164
9175
  * Every eligible use case is returned, including ones matching nothing: the "nothing fits, pick anyway" view needs the full list. Highest match first.
9165
9176
  * CSV only — an xlsx import fails with 400 rather than silently returning zero matches, which would look identical to "we checked and nothing matches".
9166
9177
  */
@@ -9178,7 +9189,7 @@ interface OperationMethods {
9178
9189
  parameters?: Parameters<Paths.ExecuteErpImport.PathParameters> | null,
9179
9190
  data?: Paths.ExecuteErpImport.RequestBody,
9180
9191
  config?: AxiosRequestConfig
9181
- ): OperationResponse<Paths.ExecuteErpImport.Responses.$200>
9192
+ ): OperationResponse<Paths.ExecuteErpImport.Responses.$202>
9182
9193
  /**
9183
9194
  * abortErpImport - abortErpImport
9184
9195
  *
@@ -10015,13 +10026,13 @@ interface PathsDictionary {
10015
10026
  /**
10016
10027
  * createErpImport - createErpImport
10017
10028
  *
10018
- * Register an already-uploaded file (S3 ref) as a pricing-file import job and return its id. Nothing runs yet: no use case is chosen and no validation starts here. Rank the candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start the validate phase with POST /v2/erp/imports/{importId}:validate.
10029
+ * Register an already-uploaded file (S3 ref) as a pricing-file import job. Returns the job and a file preview. Nothing runs yet: no use case is chosen and no validation starts here. Optionally rank candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start validation with POST /v2/erp/imports/{importId}:validate.
10019
10030
  */
10020
10031
  'post'(
10021
10032
  parameters?: Parameters<UnknownParamsObject> | null,
10022
10033
  data?: Paths.CreateErpImport.RequestBody,
10023
10034
  config?: AxiosRequestConfig
10024
- ): OperationResponse<Paths.CreateErpImport.Responses.$202>
10035
+ ): OperationResponse<Paths.CreateErpImport.Responses.$201>
10025
10036
  /**
10026
10037
  * listErpImports - listErpImports
10027
10038
  *
@@ -10067,7 +10078,7 @@ interface PathsDictionary {
10067
10078
  /**
10068
10079
  * suggestErpImportUseCases - suggestErpImportUseCases
10069
10080
  *
10070
- * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Reads only the file's first row, not its data.
10081
+ * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Optional: skip this and call `:validate` directly when the use case is already known. Reads only the file's first row, not its data.
10071
10082
  * Every eligible use case is returned, including ones matching nothing: the "nothing fits, pick anyway" view needs the full list. Highest match first.
10072
10083
  * CSV only — an xlsx import fails with 400 rather than silently returning zero matches, which would look identical to "we checked and nothing matches".
10073
10084
  */
@@ -10087,7 +10098,7 @@ interface PathsDictionary {
10087
10098
  parameters?: Parameters<Paths.ExecuteErpImport.PathParameters> | null,
10088
10099
  data?: Paths.ExecuteErpImport.RequestBody,
10089
10100
  config?: AxiosRequestConfig
10090
- ): OperationResponse<Paths.ExecuteErpImport.Responses.$200>
10101
+ ): OperationResponse<Paths.ExecuteErpImport.Responses.$202>
10091
10102
  }
10092
10103
  ['/v2/erp/imports/{importId}:abort']: {
10093
10104
  /**
@@ -1344,16 +1344,13 @@ declare namespace Components {
1344
1344
  export interface CreateErpImportRequest {
1345
1345
  s3_reference: S3Reference;
1346
1346
  /**
1347
- * Return a sample of the file's first rows. Informational only`:validate` is still the authority. `preview` is present iff this is true.
1347
+ * Return a sample of the file's first rows in `preview`. Only controls whether the sample comes BACK the head is read either way, because that read is how an unreadable file gets refused.
1348
1348
  */
1349
1349
  include_preview?: boolean;
1350
1350
  }
1351
1351
  export interface CreateErpImportResponse {
1352
- /**
1353
- * `imp_{ULID}` time-ordered, also used as the job's correlation_id.
1354
- */
1355
- import_id: string;
1356
- preview?: /* Sample of the file's first rows, using the same parser as `:validate`. `status` is the outcome of this read, not a verdict on the file. */ ErpImportFilePreview;
1352
+ job: ErpImportJob;
1353
+ preview?: /* Sample of the file's first rows, using the same parser as `:validate`. Registration refuses a file it cannot read, so a created job always includes this. */ ErpImportFilePreview;
1357
1354
  }
1358
1355
  export interface CreateFileProxyUseCaseRequest {
1359
1356
  /**
@@ -2078,7 +2075,7 @@ declare namespace Components {
2078
2075
  group_id?: string;
2079
2076
  };
2080
2077
  /**
2081
- * Why the import failed — present if and only if status = FAILED.
2078
+ * Why the import failed — present if and only if status = FAILED. `code` is the translation key; for VALIDATION_BLOCKED the specifics are in `validation`.
2082
2079
  */
2083
2080
  export interface ErpImportError {
2084
2081
  /**
@@ -2087,29 +2084,26 @@ declare namespace Components {
2087
2084
  */
2088
2085
  code: "VALIDATION_BLOCKED" | "FILE_FORMAT_UNSUPPORTED" | "FILE_UNAVAILABLE" | "VALIDATE_TIMEOUT" | "IMPORT_TIMEOUT" | "USE_CASE_NOT_USABLE" | "IMPORT_NO_PROGRESS" | "INTERNAL_ERROR";
2089
2086
  /**
2090
- * User-facing explanation of `type`.
2087
+ * One English sentence, derived from `code` so the two always agree. A fallback for a client that has no translation for this code — prefer translating `code`, and never parse this. It deliberately does NOT restate `validation.issues`.
2091
2088
  */
2092
2089
  message: string;
2093
2090
  }
2094
2091
  /**
2095
- * Sample of the file's first rows, using the same parser as `:validate`. `status` is the outcome of this read, not a verdict on the file.
2092
+ * Sample of the file's first rows, using the same parser as `:validate`. Registration refuses a file it cannot read, so a created job always includes this.
2096
2093
  */
2097
2094
  export interface ErpImportFilePreview {
2098
2095
  /**
2099
- * Treat an unrecognized value as "no preview available". Values may be added. UNREADABLE covers empty, header-only, malformed, or gone — there is no breakdown; `:validate` reports the reason.
2100
- */
2101
- status: "AVAILABLE" | "FORMAT_UNSUPPORTED" | "UNREADABLE";
2102
- /**
2103
- * Effective column names (trimmed, duplicates collapsed). Set iff `status` is AVAILABLE.
2096
+ * Effective column names (trimmed, duplicates collapsed).
2104
2097
  */
2105
- columns?: string[];
2098
+ columns: string[];
2106
2099
  /**
2107
- * Up to the first 5 data rows, aligned to `columns`.
2100
+ * Up to the first 3 data rows, aligned to `columns`.
2108
2101
  */
2109
- rows?: string[][];
2102
+ rows: string[][];
2110
2103
  }
2111
2104
  /**
2112
- * A problem found during validation, scoped to the file as a whole rather than to individual rows. See `code` for the kinds reported.
2105
+ * A problem found during validation, scoped to the file as a whole rather than to individual rows.
2106
+ * `code` is the translation key and the other fields are its parameters — there is deliberately no message to display. Each code appears at most once, with everything it has to say aggregated into that one entry.
2113
2107
  */
2114
2108
  export interface ErpImportIssue {
2115
2109
  /**
@@ -2119,13 +2113,23 @@ declare namespace Components {
2119
2113
  code: "UNIQUE_ID_COLUMN_MISSING" | "MAPPED_COLUMN_MISSING" | "MALFORMED_ROW" | "INVALID_ENCODING" | "EMPTY_FILE" | "TOO_MANY_ROWS";
2120
2114
  severity: "warning" | "blocking";
2121
2115
  /**
2122
- * User-facing explanation. Lists at most 10 column names; `columns` has all of them.
2116
+ * The columns this issue is about, at most one entry per column per entity.
2117
+ * On UNIQUE_ID_COLUMN_MISSING the file has NONE of these. Do NOT tell the user that adding one of them is enough: a unique id may read several columns through a JSONata expression, and whether it combines them (`A & B`, both needed) or falls back between them (`A ? A : B`, either will do) is not knowable here.
2123
2118
  */
2124
- message: string;
2119
+ columns?: {
2120
+ /**
2121
+ * The column name, spelled as the mapping reads it.
2122
+ */
2123
+ name: string;
2124
+ /**
2125
+ * Slug of the entity this column helps identify. UNIQUE_ID_COLUMN_MISSING only.
2126
+ */
2127
+ entity?: string;
2128
+ }[];
2125
2129
  /**
2126
- * The columns this issue is about, so clients render names rather than parsing the message.
2130
+ * The offending data row, 1-based as the user counts rows. MALFORMED_ROW only.
2127
2131
  */
2128
- columns?: string[];
2132
+ row?: number;
2129
2133
  }
2130
2134
  export interface ErpImportJob {
2131
2135
  /**
@@ -2157,7 +2161,7 @@ declare namespace Components {
2157
2161
  * `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 unbounded read of the whole file. Render an indeterminate indicator while it is missing: dividing by a missing total yields a determinate bar pinned at 0%, which reads as a hung import.
2158
2162
  */
2159
2163
  ErpImportProgress;
2160
- error?: /* Why the import failed — present if and only if status = FAILED. */ ErpImportError;
2164
+ error?: /* Why the import failed — present if and only if status = FAILED. `code` is the translation key; for VALIDATION_BLOCKED the specifics are in `validation`. */ ErpImportError;
2161
2165
  /**
2162
2166
  * Scopes this run in monitoring. Always equal to `import_id`.
2163
2167
  */
@@ -2200,10 +2204,6 @@ declare namespace Components {
2200
2204
  * How many of the FILE's columns this use case reads, by exact trimmed name.
2201
2205
  */
2202
2206
  matched_columns: number;
2203
- /**
2204
- * Columns in the file. Identical across entries; repeated per entry so each row renders standalone as "matches N of your M columns".
2205
- */
2206
- file_columns: number;
2207
2207
  }
2208
2208
  /**
2209
2209
  * 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.
@@ -2213,6 +2213,9 @@ declare namespace Components {
2213
2213
  * Data rows read from the file.
2214
2214
  */
2215
2215
  total_rows: number;
2216
+ /**
2217
+ * Blocking problems found, counting per-row ones that are not listed in `issues`.
2218
+ */
2216
2219
  blocking: number;
2217
2220
  warnings: number;
2218
2221
  /**
@@ -2222,9 +2225,13 @@ declare namespace Components {
2222
2225
  [name: string]: number;
2223
2226
  };
2224
2227
  /**
2225
- * Whole-file issues. At most 20 are kept; the count of everything found is in blocking and warnings. Warnings here are what `ack_warnings` on `:execute` acknowledges.
2228
+ * Whole-file issues, at most one per `code`. Do not expect the length to match blocking + warnings: those also count per-row problems, which are recorded for support but never listed here. Warnings here are what `ack_warnings` on `:execute` acknowledges.
2229
+ */
2230
+ issues?: /**
2231
+ * A problem found during validation, scoped to the file as a whole rather than to individual rows.
2232
+ * `code` is the translation key and the other fields are its parameters — there is deliberately no message to display. Each code appears at most once, with everything it has to say aggregated into that one entry.
2226
2233
  */
2227
- issues?: /* A problem found during validation, scoped to the file as a whole rather than to individual rows. See `code` for the kinds reported. */ ErpImportIssue[];
2234
+ ErpImportIssue[];
2228
2235
  }
2229
2236
  export interface ErpUpdatesEventsV2Request {
2230
2237
  /**
@@ -6697,6 +6704,10 @@ declare namespace Components {
6697
6704
  overwrite?: boolean;
6698
6705
  }
6699
6706
  export interface SuggestErpImportUseCasesResponse {
6707
+ /**
6708
+ * Columns in the file. Present even when `suggestions` is empty.
6709
+ */
6710
+ file_columns: number;
6700
6711
  suggestions: ErpImportUseCaseSuggestion[];
6701
6712
  }
6702
6713
  export interface TestNotificationRequest {
@@ -7382,7 +7393,7 @@ declare namespace Paths {
7382
7393
  namespace CreateErpImport {
7383
7394
  export type RequestBody = /* Register an already-uploaded file as an import. The use case is chosen later, via `:validate` — upload and interpretation are separate decisions. */ Components.Schemas.CreateErpImportRequest;
7384
7395
  namespace Responses {
7385
- export type $202 = Components.Schemas.CreateErpImportResponse;
7396
+ export type $201 = Components.Schemas.CreateErpImportResponse;
7386
7397
  export type $400 = Components.Responses.BadRequest;
7387
7398
  export type $403 = Components.Responses.Forbidden;
7388
7399
  export type $500 = Components.Responses.InternalServerError;
@@ -7509,7 +7520,7 @@ declare namespace Paths {
7509
7520
  }
7510
7521
  export type RequestBody = /* Confirmation options. Required only when the verdict carries warnings — a clean import needs no body at all. */ Components.Schemas.ExecuteErpImportRequest;
7511
7522
  namespace Responses {
7512
- export type $200 = Components.Schemas.ErpImportJob;
7523
+ export type $202 = Components.Schemas.ErpImportJob;
7513
7524
  export type $403 = Components.Responses.Forbidden;
7514
7525
  export type $404 = Components.Responses.NotFound;
7515
7526
  export type $409 = Components.Responses.Conflict;
@@ -9129,13 +9140,13 @@ interface OperationMethods {
9129
9140
  /**
9130
9141
  * createErpImport - createErpImport
9131
9142
  *
9132
- * Register an already-uploaded file (S3 ref) as a pricing-file import job and return its id. Nothing runs yet: no use case is chosen and no validation starts here. Rank the candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start the validate phase with POST /v2/erp/imports/{importId}:validate.
9143
+ * Register an already-uploaded file (S3 ref) as a pricing-file import job. Returns the job and a file preview. Nothing runs yet: no use case is chosen and no validation starts here. Optionally rank candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start validation with POST /v2/erp/imports/{importId}:validate.
9133
9144
  */
9134
9145
  'createErpImport'(
9135
9146
  parameters?: Parameters<UnknownParamsObject> | null,
9136
9147
  data?: Paths.CreateErpImport.RequestBody,
9137
9148
  config?: AxiosRequestConfig
9138
- ): OperationResponse<Paths.CreateErpImport.Responses.$202>
9149
+ ): OperationResponse<Paths.CreateErpImport.Responses.$201>
9139
9150
  /**
9140
9151
  * getErpImport - getErpImport
9141
9152
  *
@@ -9160,7 +9171,7 @@ interface OperationMethods {
9160
9171
  /**
9161
9172
  * suggestErpImportUseCases - suggestErpImportUseCases
9162
9173
  *
9163
- * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Reads only the file's first row, not its data.
9174
+ * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Optional: skip this and call `:validate` directly when the use case is already known. Reads only the file's first row, not its data.
9164
9175
  * Every eligible use case is returned, including ones matching nothing: the "nothing fits, pick anyway" view needs the full list. Highest match first.
9165
9176
  * CSV only — an xlsx import fails with 400 rather than silently returning zero matches, which would look identical to "we checked and nothing matches".
9166
9177
  */
@@ -9178,7 +9189,7 @@ interface OperationMethods {
9178
9189
  parameters?: Parameters<Paths.ExecuteErpImport.PathParameters> | null,
9179
9190
  data?: Paths.ExecuteErpImport.RequestBody,
9180
9191
  config?: AxiosRequestConfig
9181
- ): OperationResponse<Paths.ExecuteErpImport.Responses.$200>
9192
+ ): OperationResponse<Paths.ExecuteErpImport.Responses.$202>
9182
9193
  /**
9183
9194
  * abortErpImport - abortErpImport
9184
9195
  *
@@ -10015,13 +10026,13 @@ interface PathsDictionary {
10015
10026
  /**
10016
10027
  * createErpImport - createErpImport
10017
10028
  *
10018
- * Register an already-uploaded file (S3 ref) as a pricing-file import job and return its id. Nothing runs yet: no use case is chosen and no validation starts here. Rank the candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start the validate phase with POST /v2/erp/imports/{importId}:validate.
10029
+ * Register an already-uploaded file (S3 ref) as a pricing-file import job. Returns the job and a file preview. Nothing runs yet: no use case is chosen and no validation starts here. Optionally rank candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start validation with POST /v2/erp/imports/{importId}:validate.
10019
10030
  */
10020
10031
  'post'(
10021
10032
  parameters?: Parameters<UnknownParamsObject> | null,
10022
10033
  data?: Paths.CreateErpImport.RequestBody,
10023
10034
  config?: AxiosRequestConfig
10024
- ): OperationResponse<Paths.CreateErpImport.Responses.$202>
10035
+ ): OperationResponse<Paths.CreateErpImport.Responses.$201>
10025
10036
  /**
10026
10037
  * listErpImports - listErpImports
10027
10038
  *
@@ -10067,7 +10078,7 @@ interface PathsDictionary {
10067
10078
  /**
10068
10079
  * suggestErpImportUseCases - suggestErpImportUseCases
10069
10080
  *
10070
- * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Reads only the file's first row, not its data.
10081
+ * Rank the org's inbound use cases against this file's columns — the input to the ranked picker ("matches 6 of your 7 columns"). Optional: skip this and call `:validate` directly when the use case is already known. Reads only the file's first row, not its data.
10071
10082
  * Every eligible use case is returned, including ones matching nothing: the "nothing fits, pick anyway" view needs the full list. Highest match first.
10072
10083
  * CSV only — an xlsx import fails with 400 rather than silently returning zero matches, which would look identical to "we checked and nothing matches".
10073
10084
  */
@@ -10087,7 +10098,7 @@ interface PathsDictionary {
10087
10098
  parameters?: Parameters<Paths.ExecuteErpImport.PathParameters> | null,
10088
10099
  data?: Paths.ExecuteErpImport.RequestBody,
10089
10100
  config?: AxiosRequestConfig
10090
- ): OperationResponse<Paths.ExecuteErpImport.Responses.$200>
10101
+ ): OperationResponse<Paths.ExecuteErpImport.Responses.$202>
10091
10102
  }
10092
10103
  ['/v2/erp/imports/{importId}:abort']: {
10093
10104
  /**