@epilot/cli 0.1.102 → 0.1.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/definitions/integration-toolkit.json +176 -8
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-CR6NZAXB.js → chunk-EDJKUCRC.js} +3 -1
- package/dist/{completion-JKVTLZX7.js → completion-RUUFYBPO.js} +1 -1
- package/dist/{upgrade-MIWXKJAW.js → upgrade-DYMWBKUC.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Integration Toolkit API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.12.0",
|
|
6
6
|
"description": "API for integrating with external systems in a standardised way."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -3744,7 +3744,7 @@
|
|
|
3744
3744
|
"post": {
|
|
3745
3745
|
"operationId": "createErpImport",
|
|
3746
3746
|
"summary": "createErpImport",
|
|
3747
|
-
"description": "
|
|
3747
|
+
"description": "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.",
|
|
3748
3748
|
"tags": [
|
|
3749
3749
|
"erp-imports"
|
|
3750
3750
|
],
|
|
@@ -3873,6 +3873,114 @@
|
|
|
3873
3873
|
}
|
|
3874
3874
|
}
|
|
3875
3875
|
},
|
|
3876
|
+
"/v2/erp/imports/{importId}:validate": {
|
|
3877
|
+
"post": {
|
|
3878
|
+
"operationId": "validateErpImport",
|
|
3879
|
+
"summary": "validateErpImport",
|
|
3880
|
+
"description": "Choose the use case to read this file with, and start the validate phase.\nCallable from PENDING, READY and FAILED — so a wrong choice is corrected by calling this again with a different use case, rather than re-uploading. Each call replaces any previous verdict. Any other status returns 409.",
|
|
3881
|
+
"tags": [
|
|
3882
|
+
"erp-imports"
|
|
3883
|
+
],
|
|
3884
|
+
"parameters": [
|
|
3885
|
+
{
|
|
3886
|
+
"name": "importId",
|
|
3887
|
+
"in": "path",
|
|
3888
|
+
"required": true,
|
|
3889
|
+
"schema": {
|
|
3890
|
+
"type": "string"
|
|
3891
|
+
}
|
|
3892
|
+
}
|
|
3893
|
+
],
|
|
3894
|
+
"requestBody": {
|
|
3895
|
+
"required": true,
|
|
3896
|
+
"content": {
|
|
3897
|
+
"application/json": {
|
|
3898
|
+
"schema": {
|
|
3899
|
+
"$ref": "#/components/schemas/ValidateErpImportRequest"
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
},
|
|
3904
|
+
"responses": {
|
|
3905
|
+
"202": {
|
|
3906
|
+
"description": "Validation started",
|
|
3907
|
+
"content": {
|
|
3908
|
+
"application/json": {
|
|
3909
|
+
"schema": {
|
|
3910
|
+
"$ref": "#/components/schemas/ErpImportJob"
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3915
|
+
"403": {
|
|
3916
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3917
|
+
},
|
|
3918
|
+
"404": {
|
|
3919
|
+
"$ref": "#/components/responses/NotFound"
|
|
3920
|
+
},
|
|
3921
|
+
"409": {
|
|
3922
|
+
"$ref": "#/components/responses/Conflict"
|
|
3923
|
+
},
|
|
3924
|
+
"422": {
|
|
3925
|
+
"description": "The use case cannot drive an import",
|
|
3926
|
+
"content": {
|
|
3927
|
+
"application/json": {
|
|
3928
|
+
"schema": {
|
|
3929
|
+
"$ref": "#/components/schemas/ErrorResponseBase"
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
},
|
|
3934
|
+
"500": {
|
|
3935
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
3936
|
+
}
|
|
3937
|
+
}
|
|
3938
|
+
}
|
|
3939
|
+
},
|
|
3940
|
+
"/v2/erp/imports/{importId}:suggest-use-cases": {
|
|
3941
|
+
"post": {
|
|
3942
|
+
"operationId": "suggestErpImportUseCases",
|
|
3943
|
+
"summary": "suggestErpImportUseCases",
|
|
3944
|
+
"description": "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.\nEvery eligible use case is returned, including ones matching nothing: the \"nothing fits, pick anyway\" view needs the full list. Highest match first.\nCSV only — an xlsx import fails with 400 rather than silently returning zero matches, which would look identical to \"we checked and nothing matches\".",
|
|
3945
|
+
"tags": [
|
|
3946
|
+
"erp-imports"
|
|
3947
|
+
],
|
|
3948
|
+
"parameters": [
|
|
3949
|
+
{
|
|
3950
|
+
"name": "importId",
|
|
3951
|
+
"in": "path",
|
|
3952
|
+
"required": true,
|
|
3953
|
+
"schema": {
|
|
3954
|
+
"type": "string"
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
],
|
|
3958
|
+
"responses": {
|
|
3959
|
+
"200": {
|
|
3960
|
+
"description": "Ranked use-case suggestions",
|
|
3961
|
+
"content": {
|
|
3962
|
+
"application/json": {
|
|
3963
|
+
"schema": {
|
|
3964
|
+
"$ref": "#/components/schemas/SuggestErpImportUseCasesResponse"
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
},
|
|
3969
|
+
"400": {
|
|
3970
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3971
|
+
},
|
|
3972
|
+
"403": {
|
|
3973
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3974
|
+
},
|
|
3975
|
+
"404": {
|
|
3976
|
+
"$ref": "#/components/responses/NotFound"
|
|
3977
|
+
},
|
|
3978
|
+
"500": {
|
|
3979
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
},
|
|
3876
3984
|
"/v2/erp/imports/{importId}:execute": {
|
|
3877
3985
|
"post": {
|
|
3878
3986
|
"operationId": "executeErpImport",
|
|
@@ -4009,25 +4117,85 @@
|
|
|
4009
4117
|
},
|
|
4010
4118
|
"CreateErpImportRequest": {
|
|
4011
4119
|
"type": "object",
|
|
4120
|
+
"description": "Register an already-uploaded file as an import. The use case is chosen later, via `:validate` — upload and interpretation are separate decisions.",
|
|
4012
4121
|
"required": [
|
|
4013
|
-
"s3_reference"
|
|
4014
|
-
"integration_id"
|
|
4122
|
+
"s3_reference"
|
|
4015
4123
|
],
|
|
4124
|
+
"additionalProperties": false,
|
|
4016
4125
|
"properties": {
|
|
4017
4126
|
"s3_reference": {
|
|
4018
4127
|
"$ref": "#/components/schemas/S3Reference"
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
},
|
|
4131
|
+
"ValidateErpImportRequest": {
|
|
4132
|
+
"type": "object",
|
|
4133
|
+
"required": [
|
|
4134
|
+
"integration_id",
|
|
4135
|
+
"use_case_slug"
|
|
4136
|
+
],
|
|
4137
|
+
"additionalProperties": false,
|
|
4138
|
+
"properties": {
|
|
4139
|
+
"integration_id": {
|
|
4140
|
+
"type": "string"
|
|
4019
4141
|
},
|
|
4142
|
+
"use_case_slug": {
|
|
4143
|
+
"type": "string",
|
|
4144
|
+
"description": "An inbound use case's slug, unique within its integration."
|
|
4145
|
+
}
|
|
4146
|
+
}
|
|
4147
|
+
},
|
|
4148
|
+
"ErpImportUseCaseSuggestion": {
|
|
4149
|
+
"type": "object",
|
|
4150
|
+
"required": [
|
|
4151
|
+
"integration_id",
|
|
4152
|
+
"integration_name",
|
|
4153
|
+
"use_case_slug",
|
|
4154
|
+
"use_case_name",
|
|
4155
|
+
"matched_columns",
|
|
4156
|
+
"file_columns"
|
|
4157
|
+
],
|
|
4158
|
+
"properties": {
|
|
4020
4159
|
"integration_id": {
|
|
4021
4160
|
"type": "string"
|
|
4022
4161
|
},
|
|
4162
|
+
"integration_name": {
|
|
4163
|
+
"type": "string"
|
|
4164
|
+
},
|
|
4023
4165
|
"use_case_slug": {
|
|
4024
4166
|
"type": "string"
|
|
4167
|
+
},
|
|
4168
|
+
"use_case_name": {
|
|
4169
|
+
"type": "string"
|
|
4170
|
+
},
|
|
4171
|
+
"matched_columns": {
|
|
4172
|
+
"type": "integer",
|
|
4173
|
+
"description": "How many of the FILE's columns this use case reads, by exact trimmed name."
|
|
4174
|
+
},
|
|
4175
|
+
"file_columns": {
|
|
4176
|
+
"type": "integer",
|
|
4177
|
+
"description": "Columns in the file. Identical across entries; repeated per entry so each row renders standalone as \"matches N of your M columns\"."
|
|
4178
|
+
}
|
|
4179
|
+
}
|
|
4180
|
+
},
|
|
4181
|
+
"SuggestErpImportUseCasesResponse": {
|
|
4182
|
+
"type": "object",
|
|
4183
|
+
"required": [
|
|
4184
|
+
"suggestions"
|
|
4185
|
+
],
|
|
4186
|
+
"properties": {
|
|
4187
|
+
"suggestions": {
|
|
4188
|
+
"type": "array",
|
|
4189
|
+
"items": {
|
|
4190
|
+
"$ref": "#/components/schemas/ErpImportUseCaseSuggestion"
|
|
4191
|
+
}
|
|
4025
4192
|
}
|
|
4026
4193
|
}
|
|
4027
4194
|
},
|
|
4028
4195
|
"ExecuteErpImportRequest": {
|
|
4029
4196
|
"type": "object",
|
|
4030
4197
|
"description": "Confirmation options. Required only when the verdict carries warnings — a clean import needs no body at all.",
|
|
4198
|
+
"additionalProperties": false,
|
|
4031
4199
|
"properties": {
|
|
4032
4200
|
"ack_warnings": {
|
|
4033
4201
|
"type": "boolean",
|
|
@@ -4174,7 +4342,6 @@
|
|
|
4174
4342
|
"required": [
|
|
4175
4343
|
"import_id",
|
|
4176
4344
|
"org_id",
|
|
4177
|
-
"integration_id",
|
|
4178
4345
|
"format",
|
|
4179
4346
|
"status",
|
|
4180
4347
|
"s3_input_ref",
|
|
@@ -4193,11 +4360,12 @@
|
|
|
4193
4360
|
"type": "string"
|
|
4194
4361
|
},
|
|
4195
4362
|
"integration_id": {
|
|
4196
|
-
"type": "string"
|
|
4363
|
+
"type": "string",
|
|
4364
|
+
"description": "The integration owning the chosen use case. Absent until the first `:validate`."
|
|
4197
4365
|
},
|
|
4198
4366
|
"use_case_slug": {
|
|
4199
4367
|
"type": "string",
|
|
4200
|
-
"description": "The inbound use case whose mapping drives both phases."
|
|
4368
|
+
"description": "The inbound use case whose mapping drives both phases. Absent until the first `:validate`, and MUTABLE — re-validating with a different use case replaces it."
|
|
4201
4369
|
},
|
|
4202
4370
|
"format": {
|
|
4203
4371
|
"type": "string",
|
|
@@ -4208,7 +4376,7 @@
|
|
|
4208
4376
|
},
|
|
4209
4377
|
"status": {
|
|
4210
4378
|
"type": "string",
|
|
4211
|
-
"description": "PENDING → VALIDATING → READY → PROCESSING → IMPORTED, with FAILED reachable from any working status, and CANCELLING → CANCELLED reachable from VALIDATING or PROCESSING via :abort. IMPORTED
|
|
4379
|
+
"description": "PENDING → VALIDATING → READY → PROCESSING → IMPORTED, with FAILED reachable from any working status, and CANCELLING → CANCELLED reachable from VALIDATING or PROCESSING via :abort. Only IMPORTED and CANCELLED are terminal. READY and FAILED both accept a further `:validate`, which is how a wrong use case is corrected without re-uploading the file.\nIMPORTED means every row was handed to the platform, not that the platform finished — per-row outcomes live in monitoring, filtered by correlation_id. A file that fails validation is FAILED with error.code = VALIDATION_BLOCKED.\nREADY is legitimately idle for as long as the user takes to confirm, so it carries no running work and never goes stale.\nCANCELLING is transient and cooperative: the abort has been recorded but the worker only notices at its next batch boundary. Rows already published stay published — a stop is not a rollback.",
|
|
4212
4380
|
"enum": [
|
|
4213
4381
|
"PENDING",
|
|
4214
4382
|
"VALIDATING",
|
package/dist/bin/epilot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
API_LIST
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EDJKUCRC.js";
|
|
5
5
|
|
|
6
6
|
// bin/epilot.ts
|
|
7
7
|
import { runMain } from "citty";
|
|
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
|
|
|
11
11
|
var main = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
name: "epilot",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.103",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -30,8 +30,8 @@ var main = defineCommand({
|
|
|
30
30
|
auth: () => import("../auth-WMXFMPWE.js").then((m) => m.default),
|
|
31
31
|
profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
|
|
32
32
|
config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
|
|
33
|
-
completion: () => import("../completion-
|
|
34
|
-
upgrade: () => import("../upgrade-
|
|
33
|
+
completion: () => import("../completion-RUUFYBPO.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-DYMWBKUC.js").then((m) => m.default),
|
|
35
35
|
"access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
|
|
36
36
|
address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
|
|
37
37
|
"address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
|
|
@@ -134,13 +134,13 @@ process.stderr.on("error", (err) => {
|
|
|
134
134
|
if (err.code === "EPIPE") process.exit(0);
|
|
135
135
|
throw err;
|
|
136
136
|
});
|
|
137
|
-
var VERSION = true ? "0.1.
|
|
137
|
+
var VERSION = true ? "0.1.103" : (await null).default.version;
|
|
138
138
|
var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
|
|
139
139
|
process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
|
|
140
140
|
var args = process.argv.slice(2);
|
|
141
141
|
var completionsIdx = args.indexOf("--_completions");
|
|
142
142
|
if (completionsIdx >= 0) {
|
|
143
|
-
const { handleCompletions } = await import("../completion-
|
|
143
|
+
const { handleCompletions } = await import("../completion-RUUFYBPO.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -860,7 +860,7 @@ var API_LIST = [
|
|
|
860
860
|
kebabName: "integration-toolkit",
|
|
861
861
|
title: "Integration Toolkit API",
|
|
862
862
|
serverUrl: "https://integration-toolkit.sls.epilot.io",
|
|
863
|
-
operationCount:
|
|
863
|
+
operationCount: 63,
|
|
864
864
|
operationIds: [
|
|
865
865
|
"acknowledgeTracking",
|
|
866
866
|
"triggerErp",
|
|
@@ -921,6 +921,8 @@ var API_LIST = [
|
|
|
921
921
|
"listErpImports",
|
|
922
922
|
"createErpImport",
|
|
923
923
|
"getErpImport",
|
|
924
|
+
"validateErpImport",
|
|
925
|
+
"suggestErpImportUseCases",
|
|
924
926
|
"executeErpImport",
|
|
925
927
|
"abortErpImport"
|
|
926
928
|
]
|
|
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
var getCurrentVersion = () => {
|
|
75
|
-
if (true) return "0.1.
|
|
75
|
+
if (true) return "0.1.103";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|