@epilot/cli 0.1.107 → 0.1.109
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/app.json +170 -38
- package/definitions/integration-toolkit.json +54 -42
- package/dist/{add-component-UPHG3VNG.js → add-component-TCF7V3KU.js} +1 -11
- package/dist/add-function-VRVBRNY3.js +184 -0
- package/dist/app-NATUF3YX.js +26 -0
- package/dist/bin/epilot.js +4 -4
- package/dist/{chunk-QOD77YLW.js → chunk-UDGF4AVJ.js} +263 -3
- package/dist/{deploy-NRQHZ635.js → deploy-2U5FVEE7.js} +90 -9
- package/dist/dev-JEAHUYQU.js +105 -0
- package/dist/{export-ZRDJCALM.js → export-VLAY2KZP.js} +1 -1
- package/dist/{init-BXAGJAPS.js → init-C66L5GFR.js} +164 -4
- package/dist/{remove-component-LPTHVN4P.js → remove-component-7C7MPSBF.js} +1 -1
- package/dist/{review-OZTM3XBD.js → review-JZTMQNU3.js} +1 -1
- package/dist/{upgrade-BAXQEZ2I.js → upgrade-5RFPLKLG.js} +1 -1
- package/dist/{validate-TLSOTJAY.js → validate-J35DJW3H.js} +9 -1
- package/dist/{versions-VA4H3EPK.js → versions-2TMTHO7W.js} +1 -1
- package/package.json +1 -1
- package/dist/app-RULTIGMJ.js +0 -24
package/README.md
CHANGED
package/definitions/app.json
CHANGED
|
@@ -1501,6 +1501,18 @@
|
|
|
1501
1501
|
"type": "string"
|
|
1502
1502
|
},
|
|
1503
1503
|
"description": "Path to forward to the proxy target"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
"name": "query",
|
|
1507
|
+
"in": "query",
|
|
1508
|
+
"required": false,
|
|
1509
|
+
"style": "form",
|
|
1510
|
+
"explode": true,
|
|
1511
|
+
"schema": {
|
|
1512
|
+
"type": "object",
|
|
1513
|
+
"additionalProperties": true
|
|
1514
|
+
},
|
|
1515
|
+
"description": "Free-form query parameters, forwarded unchanged to the proxy target"
|
|
1504
1516
|
}
|
|
1505
1517
|
],
|
|
1506
1518
|
"get": {
|
|
@@ -1812,6 +1824,13 @@
|
|
|
1812
1824
|
},
|
|
1813
1825
|
"grants": {
|
|
1814
1826
|
"$ref": "#/components/schemas/Grants"
|
|
1827
|
+
},
|
|
1828
|
+
"functions": {
|
|
1829
|
+
"type": "array",
|
|
1830
|
+
"items": {
|
|
1831
|
+
"$ref": "#/components/schemas/FunctionDefinition"
|
|
1832
|
+
},
|
|
1833
|
+
"description": "Replaces the full set of server-side functions for this version"
|
|
1815
1834
|
}
|
|
1816
1835
|
}
|
|
1817
1836
|
}
|
|
@@ -2069,10 +2088,99 @@
|
|
|
2069
2088
|
"CUSTOM_CAPABILITY",
|
|
2070
2089
|
"EXTERNAL_PRODUCT_CATALOG",
|
|
2071
2090
|
"CUSTOM_PAGE",
|
|
2072
|
-
"API_PROXY"
|
|
2091
|
+
"API_PROXY",
|
|
2092
|
+
"APP_FUNCTION"
|
|
2073
2093
|
],
|
|
2074
2094
|
"description": "Type of app component"
|
|
2075
2095
|
},
|
|
2096
|
+
"FunctionDefinition": {
|
|
2097
|
+
"type": "object",
|
|
2098
|
+
"description": "A named server-side function belonging to the app. Runs in the epilot code-execution sandbox with an installation-scoped app token. Functions with a schedule are executed automatically once per installation.\n",
|
|
2099
|
+
"required": [
|
|
2100
|
+
"name",
|
|
2101
|
+
"type",
|
|
2102
|
+
"code"
|
|
2103
|
+
],
|
|
2104
|
+
"properties": {
|
|
2105
|
+
"name": {
|
|
2106
|
+
"type": "string",
|
|
2107
|
+
"description": "Unique function name within the app",
|
|
2108
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
|
|
2109
|
+
},
|
|
2110
|
+
"type": {
|
|
2111
|
+
"type": "string",
|
|
2112
|
+
"enum": [
|
|
2113
|
+
"workflow",
|
|
2114
|
+
"scheduled"
|
|
2115
|
+
],
|
|
2116
|
+
"description": "Where the function can be used. `workflow` functions are selectable as actions in the flow builder and run with entity context. `scheduled` functions run automatically per installation on their cron schedule.\n"
|
|
2117
|
+
},
|
|
2118
|
+
"label": {
|
|
2119
|
+
"allOf": [
|
|
2120
|
+
{
|
|
2121
|
+
"description": "Human-readable display name, e.g. shown in the flow builder action picker"
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2125
|
+
}
|
|
2126
|
+
]
|
|
2127
|
+
},
|
|
2128
|
+
"description": {
|
|
2129
|
+
"allOf": [
|
|
2130
|
+
{
|
|
2131
|
+
"description": "Description of the function"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"$ref": "#/components/schemas/TranslatedString"
|
|
2135
|
+
}
|
|
2136
|
+
]
|
|
2137
|
+
},
|
|
2138
|
+
"code": {
|
|
2139
|
+
"type": "string",
|
|
2140
|
+
"maxLength": 307200,
|
|
2141
|
+
"description": "JavaScript code to execute. Must declare a top-level `async function handler(input, context)`. Maximum size: 300KB (hard limit). Security restrictions: eval() and Function() constructor are not allowed.\n"
|
|
2142
|
+
},
|
|
2143
|
+
"schedule": {
|
|
2144
|
+
"type": "string",
|
|
2145
|
+
"maxLength": 100,
|
|
2146
|
+
"description": "Cron trigger for the function, executed once per installation. Standard 5-field cron expression (e.g. \"0 3 * * *\") or rate expression (e.g. \"rate(30 minutes)\"). Minimum interval: 15 minutes. Scheduled runs are limited to 60 seconds.\n",
|
|
2147
|
+
"example": "rate(30 minutes)"
|
|
2148
|
+
},
|
|
2149
|
+
"schedule_timezone": {
|
|
2150
|
+
"type": "string",
|
|
2151
|
+
"description": "IANA timezone the cron expression is evaluated in",
|
|
2152
|
+
"default": "Europe/Berlin"
|
|
2153
|
+
},
|
|
2154
|
+
"schedule_overlap": {
|
|
2155
|
+
"type": "string",
|
|
2156
|
+
"enum": [
|
|
2157
|
+
"skip"
|
|
2158
|
+
],
|
|
2159
|
+
"default": "skip",
|
|
2160
|
+
"description": "Behavior when the previous scheduled run is still active"
|
|
2161
|
+
},
|
|
2162
|
+
"secrets": {
|
|
2163
|
+
"type": "array",
|
|
2164
|
+
"items": {
|
|
2165
|
+
"type": "string"
|
|
2166
|
+
},
|
|
2167
|
+
"description": "Keys of installation options of type secret made available to the function via input.app_options\n"
|
|
2168
|
+
},
|
|
2169
|
+
"wait_for_callback": {
|
|
2170
|
+
"type": "boolean",
|
|
2171
|
+
"description": "Workflow functions only — wait for the callback_url to be called before completing the flow action\n"
|
|
2172
|
+
},
|
|
2173
|
+
"surfaces": {
|
|
2174
|
+
"type": "object",
|
|
2175
|
+
"description": "Workflow functions only — optional custom config UI shown in the flow builder",
|
|
2176
|
+
"properties": {
|
|
2177
|
+
"flow_action_config": {
|
|
2178
|
+
"$ref": "#/components/schemas/AppBridgeSurfaceConfig"
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2076
2184
|
"Author": {
|
|
2077
2185
|
"type": "object",
|
|
2078
2186
|
"required": [
|
|
@@ -2486,52 +2594,18 @@
|
|
|
2486
2594
|
}
|
|
2487
2595
|
]
|
|
2488
2596
|
},
|
|
2489
|
-
"SandboxCustomActionConfig": {
|
|
2490
|
-
"allOf": [
|
|
2491
|
-
{
|
|
2492
|
-
"$ref": "#/components/schemas/BaseCustomActionConfig"
|
|
2493
|
-
},
|
|
2494
|
-
{
|
|
2495
|
-
"type": "object",
|
|
2496
|
-
"properties": {
|
|
2497
|
-
"type": {
|
|
2498
|
-
"type": "string",
|
|
2499
|
-
"enum": [
|
|
2500
|
-
"sandbox"
|
|
2501
|
-
]
|
|
2502
|
-
},
|
|
2503
|
-
"sandbox_settings": {
|
|
2504
|
-
"type": "object",
|
|
2505
|
-
"properties": {
|
|
2506
|
-
"code": {
|
|
2507
|
-
"type": "string",
|
|
2508
|
-
"description": "JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.\n",
|
|
2509
|
-
"maxLength": 307200
|
|
2510
|
-
}
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
},
|
|
2514
|
-
"required": [
|
|
2515
|
-
"type"
|
|
2516
|
-
]
|
|
2517
|
-
}
|
|
2518
|
-
]
|
|
2519
|
-
},
|
|
2520
2597
|
"CustomFlowConfig": {
|
|
2521
2598
|
"type": "object",
|
|
2599
|
+
"description": "Configuration of an external-integration flow action. Sandboxed code belongs in the app's `functions` (type `workflow`) instead — workflow functions are selectable directly in the flow builder without a component.\n",
|
|
2522
2600
|
"oneOf": [
|
|
2523
2601
|
{
|
|
2524
2602
|
"$ref": "#/components/schemas/ExternalIntegrationCustomActionConfig"
|
|
2525
|
-
},
|
|
2526
|
-
{
|
|
2527
|
-
"$ref": "#/components/schemas/SandboxCustomActionConfig"
|
|
2528
2603
|
}
|
|
2529
2604
|
],
|
|
2530
2605
|
"discriminator": {
|
|
2531
2606
|
"propertyName": "type",
|
|
2532
2607
|
"mapping": {
|
|
2533
|
-
"external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig"
|
|
2534
|
-
"sandbox": "#/components/schemas/SandboxCustomActionConfig"
|
|
2608
|
+
"external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig"
|
|
2535
2609
|
}
|
|
2536
2610
|
}
|
|
2537
2611
|
},
|
|
@@ -4563,6 +4637,39 @@
|
|
|
4563
4637
|
}
|
|
4564
4638
|
}
|
|
4565
4639
|
},
|
|
4640
|
+
"InternalReview": {
|
|
4641
|
+
"description": "Review entry including app ownership info, used by internal admin endpoints",
|
|
4642
|
+
"allOf": [
|
|
4643
|
+
{
|
|
4644
|
+
"$ref": "#/components/schemas/Review"
|
|
4645
|
+
},
|
|
4646
|
+
{
|
|
4647
|
+
"type": "object",
|
|
4648
|
+
"properties": {
|
|
4649
|
+
"app_id": {
|
|
4650
|
+
"type": "string",
|
|
4651
|
+
"description": "ID of the app configuration",
|
|
4652
|
+
"readOnly": true
|
|
4653
|
+
},
|
|
4654
|
+
"org_id": {
|
|
4655
|
+
"type": "string",
|
|
4656
|
+
"description": "Organization ID of the app owner",
|
|
4657
|
+
"readOnly": true
|
|
4658
|
+
},
|
|
4659
|
+
"reviewed_by": {
|
|
4660
|
+
"type": "string",
|
|
4661
|
+
"description": "Identity of the internal reviewer who approved the review",
|
|
4662
|
+
"readOnly": true
|
|
4663
|
+
},
|
|
4664
|
+
"reviewed_at": {
|
|
4665
|
+
"type": "string",
|
|
4666
|
+
"description": "Timestamp of the approval",
|
|
4667
|
+
"readOnly": true
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4670
|
+
}
|
|
4671
|
+
]
|
|
4672
|
+
},
|
|
4566
4673
|
"ConfigurationMetadata": {
|
|
4567
4674
|
"description": "Basic metadata about your app configuration which does not get versioned",
|
|
4568
4675
|
"type": "object",
|
|
@@ -4708,6 +4815,14 @@
|
|
|
4708
4815
|
},
|
|
4709
4816
|
"minItems": 0
|
|
4710
4817
|
},
|
|
4818
|
+
"functions": {
|
|
4819
|
+
"type": "array",
|
|
4820
|
+
"items": {
|
|
4821
|
+
"$ref": "#/components/schemas/FunctionDefinition"
|
|
4822
|
+
},
|
|
4823
|
+
"minItems": 0,
|
|
4824
|
+
"description": "Server-side functions of the app, including scheduled functions"
|
|
4825
|
+
},
|
|
4711
4826
|
"visibility": {
|
|
4712
4827
|
"type": "string",
|
|
4713
4828
|
"enum": [
|
|
@@ -4816,10 +4931,11 @@
|
|
|
4816
4931
|
"enum": [
|
|
4817
4932
|
"header",
|
|
4818
4933
|
"bearer",
|
|
4934
|
+
"basic",
|
|
4819
4935
|
"oauth2",
|
|
4820
4936
|
"none"
|
|
4821
4937
|
],
|
|
4822
|
-
"description": "Authentication strategy"
|
|
4938
|
+
"description": "Authentication strategy. 'basic' sends an HTTP Basic Authorization header built server-side from the 'username' and 'password' component options."
|
|
4823
4939
|
},
|
|
4824
4940
|
"auth_header": {
|
|
4825
4941
|
"type": "string",
|
|
@@ -4936,6 +5052,14 @@
|
|
|
4936
5052
|
"minLength": 0,
|
|
4937
5053
|
"readOnly": true
|
|
4938
5054
|
},
|
|
5055
|
+
"functions": {
|
|
5056
|
+
"description": "Server-side functions of the installed version, including scheduled functions",
|
|
5057
|
+
"type": "array",
|
|
5058
|
+
"items": {
|
|
5059
|
+
"$ref": "#/components/schemas/FunctionDefinition"
|
|
5060
|
+
},
|
|
5061
|
+
"readOnly": true
|
|
5062
|
+
},
|
|
4939
5063
|
"installed_version": {
|
|
4940
5064
|
"type": "string",
|
|
4941
5065
|
"description": "Version of the app that is installed",
|
|
@@ -5043,6 +5167,14 @@
|
|
|
5043
5167
|
},
|
|
5044
5168
|
"minItems": 0
|
|
5045
5169
|
},
|
|
5170
|
+
"functions": {
|
|
5171
|
+
"type": "array",
|
|
5172
|
+
"items": {
|
|
5173
|
+
"$ref": "#/components/schemas/FunctionDefinition"
|
|
5174
|
+
},
|
|
5175
|
+
"minItems": 0,
|
|
5176
|
+
"description": "Server-side functions of the app, including scheduled functions"
|
|
5177
|
+
},
|
|
5046
5178
|
"is_beta": {
|
|
5047
5179
|
"type": "boolean",
|
|
5048
5180
|
"description": "Flag to indicate if the app is in beta.",
|
|
@@ -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.15.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": "Register an already-uploaded file (S3 ref) as a pricing-file import job and
|
|
3747
|
+
"description": "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.",
|
|
3748
3748
|
"tags": [
|
|
3749
3749
|
"erp-imports"
|
|
3750
3750
|
],
|
|
@@ -3759,8 +3759,16 @@
|
|
|
3759
3759
|
}
|
|
3760
3760
|
},
|
|
3761
3761
|
"responses": {
|
|
3762
|
-
"
|
|
3763
|
-
"description": "Import job
|
|
3762
|
+
"201": {
|
|
3763
|
+
"description": "Import job created",
|
|
3764
|
+
"headers": {
|
|
3765
|
+
"Location": {
|
|
3766
|
+
"description": "URL of the created job (`/v2/erp/imports/{importId}`).",
|
|
3767
|
+
"schema": {
|
|
3768
|
+
"type": "string"
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
},
|
|
3764
3772
|
"content": {
|
|
3765
3773
|
"application/json": {
|
|
3766
3774
|
"schema": {
|
|
@@ -3941,7 +3949,7 @@
|
|
|
3941
3949
|
"post": {
|
|
3942
3950
|
"operationId": "suggestErpImportUseCases",
|
|
3943
3951
|
"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\".",
|
|
3952
|
+
"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\"). Optional: skip this and call `:validate` directly when the use case is already known. 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
3953
|
"tags": [
|
|
3946
3954
|
"erp-imports"
|
|
3947
3955
|
],
|
|
@@ -4010,7 +4018,7 @@
|
|
|
4010
4018
|
}
|
|
4011
4019
|
},
|
|
4012
4020
|
"responses": {
|
|
4013
|
-
"
|
|
4021
|
+
"202": {
|
|
4014
4022
|
"description": "Execution started",
|
|
4015
4023
|
"content": {
|
|
4016
4024
|
"application/json": {
|
|
@@ -4129,7 +4137,7 @@
|
|
|
4129
4137
|
"include_preview": {
|
|
4130
4138
|
"type": "boolean",
|
|
4131
4139
|
"default": false,
|
|
4132
|
-
"description": "Return a sample of the file's first rows
|
|
4140
|
+
"description": "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."
|
|
4133
4141
|
}
|
|
4134
4142
|
}
|
|
4135
4143
|
},
|
|
@@ -4158,7 +4166,6 @@
|
|
|
4158
4166
|
"use_case_slug",
|
|
4159
4167
|
"use_case_name",
|
|
4160
4168
|
"matched_columns",
|
|
4161
|
-
"file_columns",
|
|
4162
4169
|
"entity_types"
|
|
4163
4170
|
],
|
|
4164
4171
|
"properties": {
|
|
@@ -4181,19 +4188,20 @@
|
|
|
4181
4188
|
"matched_columns": {
|
|
4182
4189
|
"type": "integer",
|
|
4183
4190
|
"description": "How many of the FILE's columns this use case reads, by exact trimmed name."
|
|
4184
|
-
},
|
|
4185
|
-
"file_columns": {
|
|
4186
|
-
"type": "integer",
|
|
4187
|
-
"description": "Columns in the file. Identical across entries; repeated per entry so each row renders standalone as \"matches N of your M columns\"."
|
|
4188
4191
|
}
|
|
4189
4192
|
}
|
|
4190
4193
|
},
|
|
4191
4194
|
"SuggestErpImportUseCasesResponse": {
|
|
4192
4195
|
"type": "object",
|
|
4193
4196
|
"required": [
|
|
4197
|
+
"file_columns",
|
|
4194
4198
|
"suggestions"
|
|
4195
4199
|
],
|
|
4196
4200
|
"properties": {
|
|
4201
|
+
"file_columns": {
|
|
4202
|
+
"type": "integer",
|
|
4203
|
+
"description": "Columns in the file. Present even when `suggestions` is empty."
|
|
4204
|
+
},
|
|
4197
4205
|
"suggestions": {
|
|
4198
4206
|
"type": "array",
|
|
4199
4207
|
"items": {
|
|
@@ -4215,11 +4223,10 @@
|
|
|
4215
4223
|
},
|
|
4216
4224
|
"ErpImportIssue": {
|
|
4217
4225
|
"type": "object",
|
|
4218
|
-
"description": "A problem found during validation, scoped to the file as a whole rather than to individual rows
|
|
4226
|
+
"description": "A problem found during validation, scoped to the file as a whole rather than to individual rows.\n`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.",
|
|
4219
4227
|
"required": [
|
|
4220
4228
|
"code",
|
|
4221
|
-
"severity"
|
|
4222
|
-
"message"
|
|
4229
|
+
"severity"
|
|
4223
4230
|
],
|
|
4224
4231
|
"properties": {
|
|
4225
4232
|
"code": {
|
|
@@ -4241,16 +4248,29 @@
|
|
|
4241
4248
|
"blocking"
|
|
4242
4249
|
]
|
|
4243
4250
|
},
|
|
4244
|
-
"message": {
|
|
4245
|
-
"type": "string",
|
|
4246
|
-
"description": "User-facing explanation. Lists at most 10 column names; `columns` has all of them."
|
|
4247
|
-
},
|
|
4248
4251
|
"columns": {
|
|
4249
4252
|
"type": "array",
|
|
4250
|
-
"description": "The columns this issue is about,
|
|
4253
|
+
"description": "The columns this issue is about, at most one entry per column per entity.\nOn 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.",
|
|
4251
4254
|
"items": {
|
|
4252
|
-
"type": "
|
|
4255
|
+
"type": "object",
|
|
4256
|
+
"required": [
|
|
4257
|
+
"name"
|
|
4258
|
+
],
|
|
4259
|
+
"properties": {
|
|
4260
|
+
"name": {
|
|
4261
|
+
"type": "string",
|
|
4262
|
+
"description": "The column name, spelled as the mapping reads it."
|
|
4263
|
+
},
|
|
4264
|
+
"entity": {
|
|
4265
|
+
"type": "string",
|
|
4266
|
+
"description": "Slug of the entity this column helps identify. UNIQUE_ID_COLUMN_MISSING only."
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4253
4269
|
}
|
|
4270
|
+
},
|
|
4271
|
+
"row": {
|
|
4272
|
+
"type": "integer",
|
|
4273
|
+
"description": "The offending data row, 1-based as the user counts rows. MALFORMED_ROW only."
|
|
4254
4274
|
}
|
|
4255
4275
|
}
|
|
4256
4276
|
},
|
|
@@ -4269,7 +4289,8 @@
|
|
|
4269
4289
|
"description": "Data rows read from the file."
|
|
4270
4290
|
},
|
|
4271
4291
|
"blocking": {
|
|
4272
|
-
"type": "integer"
|
|
4292
|
+
"type": "integer",
|
|
4293
|
+
"description": "Blocking problems found, counting per-row ones that are not listed in `issues`."
|
|
4273
4294
|
},
|
|
4274
4295
|
"warnings": {
|
|
4275
4296
|
"type": "integer"
|
|
@@ -4283,7 +4304,7 @@
|
|
|
4283
4304
|
},
|
|
4284
4305
|
"issues": {
|
|
4285
4306
|
"type": "array",
|
|
4286
|
-
"description": "Whole-file issues
|
|
4307
|
+
"description": "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.",
|
|
4287
4308
|
"items": {
|
|
4288
4309
|
"$ref": "#/components/schemas/ErpImportIssue"
|
|
4289
4310
|
}
|
|
@@ -4309,7 +4330,7 @@
|
|
|
4309
4330
|
},
|
|
4310
4331
|
"ErpImportError": {
|
|
4311
4332
|
"type": "object",
|
|
4312
|
-
"description": "Why the import failed — present if and only if status = FAILED.",
|
|
4333
|
+
"description": "Why the import failed — present if and only if status = FAILED. `code` is the translation key; for VALIDATION_BLOCKED the specifics are in `validation`.",
|
|
4313
4334
|
"required": [
|
|
4314
4335
|
"code",
|
|
4315
4336
|
"message"
|
|
@@ -4331,36 +4352,28 @@
|
|
|
4331
4352
|
},
|
|
4332
4353
|
"message": {
|
|
4333
4354
|
"type": "string",
|
|
4334
|
-
"description": "
|
|
4355
|
+
"description": "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`."
|
|
4335
4356
|
}
|
|
4336
4357
|
}
|
|
4337
4358
|
},
|
|
4338
4359
|
"ErpImportFilePreview": {
|
|
4339
4360
|
"type": "object",
|
|
4340
|
-
"description": "Sample of the file's first rows, using the same parser as `:validate`.
|
|
4361
|
+
"description": "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.",
|
|
4341
4362
|
"required": [
|
|
4342
|
-
"
|
|
4363
|
+
"columns",
|
|
4364
|
+
"rows"
|
|
4343
4365
|
],
|
|
4344
4366
|
"properties": {
|
|
4345
|
-
"status": {
|
|
4346
|
-
"type": "string",
|
|
4347
|
-
"description": "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.",
|
|
4348
|
-
"enum": [
|
|
4349
|
-
"AVAILABLE",
|
|
4350
|
-
"FORMAT_UNSUPPORTED",
|
|
4351
|
-
"UNREADABLE"
|
|
4352
|
-
]
|
|
4353
|
-
},
|
|
4354
4367
|
"columns": {
|
|
4355
4368
|
"type": "array",
|
|
4356
|
-
"description": "Effective column names (trimmed, duplicates collapsed).
|
|
4369
|
+
"description": "Effective column names (trimmed, duplicates collapsed).",
|
|
4357
4370
|
"items": {
|
|
4358
4371
|
"type": "string"
|
|
4359
4372
|
}
|
|
4360
4373
|
},
|
|
4361
4374
|
"rows": {
|
|
4362
4375
|
"type": "array",
|
|
4363
|
-
"description": "Up to the first
|
|
4376
|
+
"description": "Up to the first 3 data rows, aligned to `columns`.",
|
|
4364
4377
|
"items": {
|
|
4365
4378
|
"type": "array",
|
|
4366
4379
|
"items": {
|
|
@@ -4373,12 +4386,11 @@
|
|
|
4373
4386
|
"CreateErpImportResponse": {
|
|
4374
4387
|
"type": "object",
|
|
4375
4388
|
"required": [
|
|
4376
|
-
"
|
|
4389
|
+
"job"
|
|
4377
4390
|
],
|
|
4378
4391
|
"properties": {
|
|
4379
|
-
"
|
|
4380
|
-
"
|
|
4381
|
-
"description": "`imp_{ULID}` — time-ordered, also used as the job's correlation_id."
|
|
4392
|
+
"job": {
|
|
4393
|
+
"$ref": "#/components/schemas/ErpImportJob"
|
|
4382
4394
|
},
|
|
4383
4395
|
"preview": {
|
|
4384
4396
|
"$ref": "#/components/schemas/ErpImportFilePreview"
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
log,
|
|
4
4
|
readManifest,
|
|
5
5
|
writeManifest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UDGF4AVJ.js";
|
|
7
7
|
import "./chunk-M3M3C5WH.js";
|
|
8
8
|
import "./chunk-YHQA2AVG.js";
|
|
9
9
|
import "./chunk-7ZQ666ZQ.js";
|
|
@@ -15,16 +15,6 @@ import { existsSync, readFileSync, writeFileSync, readdirSync } from "fs";
|
|
|
15
15
|
import { resolve, join } from "path";
|
|
16
16
|
var TEMPLATES_REPO = "epilot-dev/app-templates";
|
|
17
17
|
var TEMPLATE_REGISTRY = {
|
|
18
|
-
CUSTOM_FLOW_ACTION_SANDBOX: {
|
|
19
|
-
configOnly: false,
|
|
20
|
-
manifestType: "CUSTOM_FLOW_ACTION",
|
|
21
|
-
templateDir: "custom-flow-action-sandbox",
|
|
22
|
-
description: "Sandboxed flow action (JS runs in epilot)",
|
|
23
|
-
configuration: () => ({
|
|
24
|
-
type: "sandbox",
|
|
25
|
-
sandbox_settings: { code: "// code is read from dist/ during deploy" }
|
|
26
|
-
})
|
|
27
|
-
},
|
|
28
18
|
CUSTOM_FLOW_ACTION_EXTERNAL: {
|
|
29
19
|
configOnly: true,
|
|
30
20
|
manifestType: "CUSTOM_FLOW_ACTION",
|