@antcde/connect-ts 0.4.31 → 0.4.32-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +3 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/service-runtime.d.ts +0 -1
- package/build/service-runtime.d.ts.map +1 -1
- package/build/service-runtime.js +0 -1
- package/build/service-types-app.d.ts +1 -1
- package/build/service-types-app.d.ts.map +1 -1
- package/build/service-types.d.ts +3 -3
- package/build/service-types.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceCommerce.d.ts +3 -1
- package/build/services/AppService/factory/resourceCommerce.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceCommerce.js +1 -0
- package/build/services/AppService/factory/resourceEntitlementActions.d.ts +1 -12
- package/build/services/AppService/factory/resourceEntitlementActions.d.ts.map +1 -1
- package/build/services/AppService/factory/resources.d.ts +12 -75
- package/build/services/AppService/factory/resources.d.ts.map +1 -1
- package/build/services/AppService/factory/resources.js +15 -10
- package/build/services/AppService/types/resourceReleases.d.ts +12 -107
- package/build/services/AppService/types/resourceReleases.d.ts.map +1 -1
- package/build/services/AppService/types/resourceReleases.js +7 -0
- package/build/services/AppService/types/resourceRequests.d.ts +30 -43
- package/build/services/AppService/types/resourceRequests.d.ts.map +1 -1
- package/build/services/AppService/types/resourceSubscriptions.d.ts +22 -0
- package/build/services/AppService/types/resourceSubscriptions.d.ts.map +1 -0
- package/build/services/AppService/types/resourceSubscriptions.js +1 -0
- package/build/services/AppService/types/sellableResources.d.ts +19 -50
- package/build/services/AppService/types/sellableResources.d.ts.map +1 -1
- package/build/services/AppService/types/taxonomy.d.ts +10 -34
- package/build/services/AppService/types/taxonomy.d.ts.map +1 -1
- package/build/services/AppService/types.d.ts +1 -4
- package/build/services/AppService/types.d.ts.map +1 -1
- package/build/services/AppService/types.js +1 -4
- package/build/services/ColumnService.d.ts +7 -1
- package/build/services/ColumnService.d.ts.map +1 -1
- package/build/services/DmsService.d.ts +2 -2
- package/build/services/DmsService.d.ts.map +1 -1
- package/build/services/DmsService.types.d.ts +14 -0
- package/build/services/DmsService.types.d.ts.map +1 -1
- package/build/services/PropagationService.d.ts +15 -2
- package/build/services/PropagationService.d.ts.map +1 -1
- package/build/services/PropagationService.js +2 -0
- package/build/services/RBAC/PermissionService.d.ts +2 -2
- package/build/services/RBAC/PermissionService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerDataset.types.d.ts +9 -1
- package/build/services/Webhook/TriggerDataset.types.d.ts.map +1 -1
- package/build/services/Webhook/TriggerDataset.types.js +0 -23
- package/build/services/Webhook/TriggerDatasetColumns.d.ts +2 -0
- package/build/services/Webhook/TriggerDatasetColumns.d.ts.map +1 -1
- package/build/services/Webhook/TriggerDatasetColumns.js +2 -0
- package/build/services/Webhook/TriggerDatasetCsv.types.d.ts +7 -0
- package/build/services/Webhook/TriggerDatasetCsv.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDatasetCsv.types.js +1 -0
- package/build/services/Webhook/TriggerDatasetResponses.types.d.ts +20 -2
- package/build/services/Webhook/TriggerDatasetResponses.types.d.ts.map +1 -1
- package/build/services/Webhook/TriggerDatasetResponses.types.js +1 -0
- package/build/services/Webhook/TriggerDatasetSourceService.d.ts +4 -2
- package/build/services/Webhook/TriggerDatasetSourceService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerDatasetSourceService.js +2 -2
- package/build/services/Webhook/TriggerHistoryService.d.ts +2 -1
- package/build/services/Webhook/TriggerHistoryService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerVersion.types.d.ts +10 -3
- package/build/services/Webhook/TriggerVersion.types.d.ts.map +1 -1
- package/build/services/Webhook/TriggerVersionService.d.ts +6 -8
- package/build/services/Webhook/TriggerVersionService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerVersionService.js +1 -1
- package/package.json +2 -2
- package/build/services/AppService/factory/resourceSnapshot.d.ts +0 -75
- package/build/services/AppService/factory/resourceSnapshot.d.ts.map +0 -1
- package/build/services/AppService/factory/resourceSnapshot.js +0 -55
- package/build/services/AppService/factory/resourceUploads.d.ts +0 -37
- package/build/services/AppService/factory/resourceUploads.d.ts.map +0 -1
- package/build/services/AppService/factory/resourceUploads.js +0 -8
- package/build/services/AppService/types/snapshotFileSource.d.ts +0 -110
- package/build/services/AppService/types/snapshotFileSource.d.ts.map +0 -1
- package/build/services/AppService/types/snapshotFileSource.js +0 -8
- package/build/services/AppService/types/snapshotPayload.d.ts +0 -166
- package/build/services/AppService/types/snapshotPayload.d.ts.map +0 -1
- package/build/services/AppService/types/snapshotPayload.js +0 -19
- package/build/services/AppService/types/snapshotSources.d.ts +0 -116
- package/build/services/AppService/types/snapshotSources.d.ts.map +0 -1
- package/build/services/AppService/types/snapshotSources.js +0 -7
- package/build/services/AppService/types/snapshotUploads.d.ts +0 -109
- package/build/services/AppService/types/snapshotUploads.d.ts.map +0 -1
- package/build/services/AppService/types/snapshotUploads.js +0 -20
|
@@ -20,6 +20,8 @@ export function newPropagationService(client) {
|
|
|
20
20
|
updateTemplateItem: (templateId, itemId, data) => client.put(`/propagation/templates/${templateId}/items/${itemId}`, data),
|
|
21
21
|
removeTemplateItem: (templateId, itemId) => client.delete(`/propagation/templates/${templateId}/items/${itemId}`),
|
|
22
22
|
reorderTemplateItems: (templateId, data) => client.put(`/propagation/templates/${templateId}/items/reorder`, data),
|
|
23
|
+
// --- DMS template folders ---
|
|
24
|
+
getDmsFolderTemplateUsages: (licenseId, tokens) => client.post(`/licenses/${licenseId}/files/template-usages`, { tokens }),
|
|
23
25
|
// --- Apply ---
|
|
24
26
|
applyTemplateToProject: data => client.post(`/propagation/apply`, data),
|
|
25
27
|
// --- Runs ---
|
|
@@ -36,8 +36,8 @@ export interface UserRoleAndPermission {
|
|
|
36
36
|
}
|
|
37
37
|
export type PermissionResourceType = 'licenses' | 'projects' | 'tables' | 'workflows' | 'sbs' | 'tasks' | 'labels' | 'apps' | 'dms' | 'rbac' | 'users' | 'triggers' | 'types';
|
|
38
38
|
export type UserResourcePermissionType = 'licenses' | 'projects';
|
|
39
|
-
export type PermissionAction = 'sub' | 'create' | 'read' | 'update' | 'delete' | 'configure' | 'upload' | 'import' | 'session' | 'manage_license' | 'manage_project' | 'manage_templates' | 'templates.view_license' | 'templates.publish_license' | 'license.view' | 'license.manage' | 'license.read' | 'license.upload' | 'license.delete' | 'license.configure';
|
|
40
|
-
export type PermissionName = 'projects.create' | 'projects.read' | 'projects.update' | 'projects.delete' | 'projects.configure' | 'licenses.create' | 'licenses.read' | 'licenses.update' | 'licenses.delete' | 'licenses.configure' | 'rbac.configure' | 'users.configure' | 'sbs.configure' | 'dms.read' | 'dms.upload' | 'dms.delete' | 'dms.configure' | 'dms.license.read' | 'dms.license.upload' | 'dms.license.delete' | 'dms.license.configure' | 'types.read' | 'types.configure';
|
|
39
|
+
export type PermissionAction = 'sub' | 'create' | 'read' | 'update' | 'delete' | 'configure' | 'upload' | 'import' | 'session' | 'manage_license' | 'manage_project' | 'manage_templates' | 'templates.view_license' | 'templates.publish_license' | 'license.view' | 'license.manage' | 'license.read' | 'license.upload' | 'license.delete' | 'license.configure' | 'template.read' | 'template.upload' | 'template.delete' | 'template.configure';
|
|
40
|
+
export type PermissionName = 'projects.create' | 'projects.read' | 'projects.update' | 'projects.delete' | 'projects.configure' | 'licenses.create' | 'licenses.read' | 'licenses.update' | 'licenses.delete' | 'licenses.configure' | 'rbac.configure' | 'users.configure' | 'sbs.configure' | 'dms.read' | 'dms.upload' | 'dms.delete' | 'dms.configure' | 'dms.license.read' | 'dms.license.upload' | 'dms.license.delete' | 'dms.license.configure' | 'dms.template.read' | 'dms.template.upload' | 'dms.template.delete' | 'dms.template.configure' | 'types.read' | 'types.configure';
|
|
41
41
|
export interface PermissionGroupItem {
|
|
42
42
|
title: string;
|
|
43
43
|
resource: PermissionResourceType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionService.d.ts","sourceRoot":"","sources":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AC5B,UAAU,GACV,UAAU,GACV,QAAQ,GACR,WAAW,GACX,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,UAAU,GACV,OAAO,CAAA;AAEb,MAAM,MAAM,0BAA0B,GAAG,UAAU,GAAG,UAAU,CAAA;AAEhE,MAAM,MAAM,gBAAgB,GACtB,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,wBAAwB,GACxB,2BAA2B,GAC3B,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"PermissionService.d.ts","sourceRoot":"","sources":["../../../src/services/RBAC/PermissionService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AACpD,OAAO,KAAK,EAAE,GAAG,EAAE,sBAA6B;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAe;AAE1C,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,kBAAkB,EAAE,UAAU,EAAE,CAAA;IAChC,iBAAiB,EAAE,UAAU,E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C,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,cAAc,KACjB,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IAErC,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IAEtG,4BAA4B,EAAE,CAAC,QAAQ,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAA;CACpI;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,aAAa,GAAG,qBAAqB,CAarF"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DatasetCsvOptions } from './TriggerDatasetCsv.types';
|
|
2
|
+
export type { DatasetCsvOptions };
|
|
1
3
|
/**
|
|
2
4
|
* The three trigger actions that RETURN data (AAD-967).
|
|
3
5
|
*
|
|
@@ -46,10 +48,10 @@ export interface DatasetTableColumn {
|
|
|
46
48
|
*/
|
|
47
49
|
export interface DatasetFileColumn {
|
|
48
50
|
source_key: string;
|
|
51
|
+
/** Always send it: omitted, the RAW header is returned. `^[\w-]+$`, not `id`, unique. */
|
|
49
52
|
key?: string | null;
|
|
50
53
|
type: DatasetColumnType;
|
|
51
54
|
label?: string | null;
|
|
52
|
-
required?: boolean;
|
|
53
55
|
}
|
|
54
56
|
/** Either kind of declared column, for a source that could be either. */
|
|
55
57
|
export type DatasetColumn = DatasetTableColumn | DatasetFileColumn;
|
|
@@ -88,6 +90,8 @@ export interface ReturnFileDataPayload {
|
|
|
88
90
|
* backend answers `invalid_payload_config`.
|
|
89
91
|
*/
|
|
90
92
|
columns?: DatasetFileColumn[];
|
|
93
|
+
/** CSV only. Omit for detection — see {@link DatasetCsvOptions}. */
|
|
94
|
+
csv?: DatasetCsvOptions;
|
|
91
95
|
limit?: number;
|
|
92
96
|
}
|
|
93
97
|
/** Whether the script's own value is returned, or the full run envelope. */
|
|
@@ -122,6 +126,8 @@ export interface TransformWithScriptPayload {
|
|
|
122
126
|
* union of two arrays, so it can be pushed into and bound to a row editor.
|
|
123
127
|
*/
|
|
124
128
|
columns?: DatasetColumn[];
|
|
129
|
+
/** For a CSV `dms_file_id` source. */
|
|
130
|
+
csv?: DatasetCsvOptions;
|
|
125
131
|
limit?: number;
|
|
126
132
|
/** Clamped by the engine to its configured maximum. */
|
|
127
133
|
timeout_s?: number;
|
|
@@ -140,6 +146,8 @@ export type DatasetPayloadFor<C extends DatasetActionCode> = C extends 'ReturnTa
|
|
|
140
146
|
*/
|
|
141
147
|
export interface DatasetCallerParams {
|
|
142
148
|
limit?: number;
|
|
149
|
+
/** Page start (records only): follow `DatasetRows.next_offset`, up to the row ceiling. */
|
|
150
|
+
offset?: number;
|
|
143
151
|
[param: string]: unknown;
|
|
144
152
|
}
|
|
145
153
|
/** Narrow an event code to one of the three dataset actions. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerDataset.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDataset.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,0BAA0B,CAAA;AAEhC,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GACvB,SAAS,GACT,SAAS,GACT,OAAO,GACP,WAAW,GACX,MAAM,GACN,OAAO,GACP,MAAM,GACN,UAAU,GACV,SAAS,GACT,MAAM,CAAA;AAEZ;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,iBAAiB,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"TriggerDataset.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDataset.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAElE,YAAY,EAAE,iBAAiB,EAAE,CAAA;AAEjC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,0BAA0B,CAAA;AAEhC,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GACvB,SAAS,GACT,SAAS,GACT,OAAO,GACP,WAAW,GACX,MAAM,GACN,OAAO,GACP,MAAM,GACN,UAAU,GACV,SAAS,GACT,MAAM,CAAA;AAEZ;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,yFAAyF;IACzF,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,iBAAiB,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,CAAA;AAElE,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,kFAAkF;IAClF,KAAK,CAAC,EAAE,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vD,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,GACrD,CAAC,SAAS,0BAA0B,GAAG,0BAA0B,GAC/D,KAAK,CAAA;AAEf;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,iBAAiB,CAI1F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAErE;AAmBD,wEAAwE;AACxE,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,0BAA0B,CAGpG;AAED,oEAAoE;AACpE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,sBAAsB,CAM5F;AAED,mEAAmE;AACnE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAK1F"}
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The three trigger actions that RETURN data (AAD-967).
|
|
3
|
-
*
|
|
4
|
-
* These are not new endpoints. They are `payload` shapes for an ordinary trigger,
|
|
5
|
-
* dispatched through the ordinary dispatch URL. What is new is the split below.
|
|
6
|
-
*
|
|
7
|
-
* Response and refusal shapes live in `TriggerDatasetResponses.types.ts`.
|
|
8
|
-
*
|
|
9
|
-
* ## Frozen publisher config vs caller parameters — the load-bearing distinction
|
|
10
|
-
*
|
|
11
|
-
* Everything in a `*Payload` type is **frozen publisher configuration**, stored on
|
|
12
|
-
* the trigger and read from there at dispatch. The dispatcher merges a caller's
|
|
13
|
-
* request body ABOVE the stored config, so an action reading its source from the
|
|
14
|
-
* request body would let a caller repoint it — these actions deliberately do not.
|
|
15
|
-
*
|
|
16
|
-
* A caller can therefore change **nothing structural**: not the table, not the
|
|
17
|
-
* file, not the script, not the column selection. The only dataset field a caller
|
|
18
|
-
* controls is `limit`, and only downward — see {@link DatasetCallerParams}.
|
|
19
|
-
*
|
|
20
|
-
* A UI that blurs this will mislead a publisher about what they are selling. Show
|
|
21
|
-
* the payload fields as "fixed for every caller" and `limit` as "the caller may
|
|
22
|
-
* ask for fewer".
|
|
23
|
-
*/
|
|
24
1
|
/** Narrow an event code to one of the three dataset actions. */
|
|
25
2
|
export function isDatasetAction(code) {
|
|
26
3
|
return code === 'ReturnTableDataEvent'
|
|
@@ -17,6 +17,8 @@ import type { DatasetColumnType } from './TriggerDataset.types';
|
|
|
17
17
|
* it here fails to build.
|
|
18
18
|
*/
|
|
19
19
|
export declare const DATASET_COLUMN_TYPES: Record<DatasetColumnType, true>;
|
|
20
|
+
/** What a FILE column may declare: the platform-table types (textfield, dropdown, sbscode) mean nothing in a file. */
|
|
21
|
+
export declare const DATASET_FILE_COLUMN_TYPES: readonly DatasetColumnType[];
|
|
20
22
|
/**
|
|
21
23
|
* Is this a column type a dataset may publish?
|
|
22
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerDatasetColumns.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetColumns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAWhE,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,iBAAiB,CAG3E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAW,CAA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BAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAA;AAE/E;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,eAAe,GAAG,IAAI,CAWpG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAazE"}
|
|
@@ -27,6 +27,8 @@ export const DATASET_COLUMN_TYPES = {
|
|
|
27
27
|
sbscode: true,
|
|
28
28
|
date: true,
|
|
29
29
|
};
|
|
30
|
+
/** What a FILE column may declare: the platform-table types (textfield, dropdown, sbscode) mean nothing in a file. */
|
|
31
|
+
export const DATASET_FILE_COLUMN_TYPES = ['text', 'integer', 'float', 'boolean', 'date', 'email', 'link'];
|
|
30
32
|
/**
|
|
31
33
|
* Is this a column type a dataset may publish?
|
|
32
34
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerDatasetCsv.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetCsv.types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,CAAA;IAC5C,iBAAiB,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,CAAA;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export interface DatasetRows {
|
|
10
10
|
/** Buyer-facing keys, in the publisher's declared order. */
|
|
11
11
|
keys: string[];
|
|
12
|
-
/**
|
|
12
|
+
/** Led by `id` (record id, or 1-based file line); values in their declared JSON type. */
|
|
13
13
|
rows: Array<Record<string, unknown>>;
|
|
14
14
|
/** How many rows are in THIS response, not how many exist. */
|
|
15
15
|
row_count: number;
|
|
@@ -23,6 +23,10 @@ export interface DatasetRows {
|
|
|
23
23
|
truncated: boolean;
|
|
24
24
|
/** The limit actually applied, after clamping. */
|
|
25
25
|
limit: number;
|
|
26
|
+
/** Where this page started. */
|
|
27
|
+
offset: number;
|
|
28
|
+
/** Send as `offset` for the next page; null when there is none or the row ceiling is reached. */
|
|
29
|
+
next_offset: number | null;
|
|
26
30
|
}
|
|
27
31
|
/** `ReturnFileDataEvent` in `raw` mode. */
|
|
28
32
|
export interface DatasetRawFile {
|
|
@@ -62,7 +66,9 @@ export interface DatasetDispatchEnvelope<T> {
|
|
|
62
66
|
error: string | null;
|
|
63
67
|
}
|
|
64
68
|
/** Why a dataset action refused to serve. */
|
|
65
|
-
export type DatasetRefusalReason = 'invalid_payload_config' | 'byte_limit_exceeded' | 'source_table_missing' | 'upload_source_missing' | 'unsupported_upload_format' | 'malformed_upload' | 'row_shape_mismatch' | 'value_type_mismatch'
|
|
69
|
+
export type DatasetRefusalReason = 'invalid_payload_config' | 'byte_limit_exceeded' | 'source_table_missing' | 'upload_source_missing' | 'unsupported_upload_format' | 'malformed_upload' | 'row_shape_mismatch' | 'value_type_mismatch'
|
|
70
|
+
/** A declared column names a header the file does not have. */
|
|
71
|
+
| 'unknown_source_column' | 'unpublishable_column_type'
|
|
66
72
|
/**
|
|
67
73
|
* An OPERATOR fault: the deployment's ceilings are unusable. Must NOT be shown
|
|
68
74
|
* to a publisher as "your dataset is too big" — that sends them hunting through
|
|
@@ -81,6 +87,18 @@ export type DatasetRefusalReason = 'invalid_payload_config' | 'byte_limit_exceed
|
|
|
81
87
|
* point — a reason nobody mapped must not fail silently.
|
|
82
88
|
*/
|
|
83
89
|
export declare const DATASET_REFUSAL_REASONS: Record<DatasetRefusalReason, true>;
|
|
90
|
+
/**
|
|
91
|
+
* A release refused because the file does not serve as declared (422 from
|
|
92
|
+
* `releaseTriggerVersion`). Unlike a dispatch refusal, `message` is the DETAILED
|
|
93
|
+
* one — only the publisher releases — and names the row and column to fix.
|
|
94
|
+
*/
|
|
95
|
+
export interface DatasetReleaseRefusal {
|
|
96
|
+
dataset_refused: true;
|
|
97
|
+
reason: DatasetRefusalReason;
|
|
98
|
+
message: string;
|
|
99
|
+
context: Record<string, unknown>;
|
|
100
|
+
status_code: 422;
|
|
101
|
+
}
|
|
84
102
|
/**
|
|
85
103
|
* A dataset action refused to serve.
|
|
86
104
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerDatasetResponses.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetResponses.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,
|
|
1
|
+
{"version":3,"file":"TriggerDatasetResponses.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetResponses.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,yFAAyF;IACzF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACpC,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;IACb,+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Ae,EAAE,IAAI,CAAA;IACrB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,WAAW,EAAE,GAAG,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,IAAI,CAAA;IACrB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,oBAAoB,CAQhF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAKxE;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,oBAAoB,CAOnF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAErE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataWrapper } from '../../types';
|
|
2
|
-
import type { DatasetColumnType, DatasetFileColumn, DatasetFileFormat } from './TriggerDataset.types';
|
|
2
|
+
import type { DatasetColumnType, DatasetCsvOptions, DatasetFileColumn, DatasetFileFormat } from './TriggerDataset.types';
|
|
3
3
|
import type { AntHttpClient } from "../../AntHttpClient";
|
|
4
4
|
/**
|
|
5
5
|
* Reading a candidate dataset source before anything is declared.
|
|
@@ -150,7 +150,9 @@ export interface TriggerDatasetSourceService {
|
|
|
150
150
|
*
|
|
151
151
|
* `format` overrides the file's extension; omit it to let the backend infer.
|
|
152
152
|
*/
|
|
153
|
-
proposeFileColumns: (dmsFileId: string, format?: DatasetFileFormat
|
|
153
|
+
proposeFileColumns: (dmsFileId: string, format?: DatasetFileFormat,
|
|
154
|
+
/** Read the file as a dispatch declaring these options would — header, delimiter, encoding, decimals. */
|
|
155
|
+
csv?: DatasetCsvOptions) => Promise<DataWrapper<DatasetFileProposal>>;
|
|
154
156
|
/**
|
|
155
157
|
* Name and locate a DMS file WITHOUT reading it.
|
|
156
158
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerDatasetSourceService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetSourceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"TriggerDatasetSourceService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetSourceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD;;;;;;;;;;GAUG;AAEH,yEAAyE;AACzE,MAAM,WAAW,yBAAyB;IACxC,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAA;IAClB,uFAAuF;IACvF,GAAG,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;;OAQG;IACH,aAAa,EAAE,iBAAiB,CAAA;IAChC;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,iBAAiB;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AAU,EAAE,aAAa,GAAG,2BAA2B,CAUxG"}
|
|
@@ -15,8 +15,8 @@ export function toFileColumn(proposal) {
|
|
|
15
15
|
}
|
|
16
16
|
export function createTriggerDatasetSourceService(httpClient) {
|
|
17
17
|
return {
|
|
18
|
-
proposeFileColumns: (dmsFileId, format) => httpClient.get(`/webhook/dataset-sources/${dmsFileId}/columns`, {
|
|
19
|
-
params: format === undefined ? undefined : { format },
|
|
18
|
+
proposeFileColumns: (dmsFileId, format, csv) => httpClient.get(`/webhook/dataset-sources/${dmsFileId}/columns`, {
|
|
19
|
+
params: format === undefined && csv === undefined ? undefined : { format, csv },
|
|
20
20
|
}),
|
|
21
21
|
describeFile: (dmsFileId) => httpClient.get(`/webhook/dataset-sources/${dmsFileId}`),
|
|
22
22
|
};
|
|
@@ -147,7 +147,8 @@ export interface TriggerExecutionHistoryDetail {
|
|
|
147
147
|
export interface ExecutionHistoryFilters {
|
|
148
148
|
search?: string;
|
|
149
149
|
trigger_id?: string;
|
|
150
|
-
status
|
|
150
|
+
/** The run's OVERALL status — the backend accepts `success`, `error`, `partial_success`. */
|
|
151
|
+
status?: OverallExecutionStatus;
|
|
151
152
|
from_date?: string;
|
|
152
153
|
to_date?: string;
|
|
153
154
|
per_page?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerHistoryService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerHistoryService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE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A2B,CAAC,UAAU,EAAE,aAAa,GAAG,qBAAqB,CAiB5F"}
|
|
@@ -25,13 +25,14 @@ export type TriggerVersionState = 'draft' | 'released' | 'retired';
|
|
|
25
25
|
/**
|
|
26
26
|
* The fields a version freezes, and therefore the fields an edit to the draft can
|
|
27
27
|
* diverge on. Anything absent from this list — `name`, labels, `is_active`,
|
|
28
|
-
* `
|
|
29
|
-
*
|
|
28
|
+
* `custom_path` — stays editable on the trigger at all times and deliberately does
|
|
29
|
+
* NOT count as an unreleased change. `debug_mode` IS locked: it switches
|
|
30
|
+
* RunScriptEvent's response shape (backend `TriggerLockPolicy`, AAD-975).
|
|
30
31
|
*
|
|
31
32
|
* Use it to label a diff, not to build a form: the trigger editor already edits
|
|
32
33
|
* these fields under their own names.
|
|
33
34
|
*/
|
|
34
|
-
export type TriggerVersionLockedField = 'event_id' | 'payload' | 'http_method' | 'when' | 'close_task_after_execution' | 'auth_type' | 'secret_token' | 'authorization_enforced' | 'read_only' | 'rate_limit_per_second' | 'rate_limit_per_minute';
|
|
35
|
+
export type TriggerVersionLockedField = 'event_id' | 'payload' | 'http_method' | 'when' | 'close_task_after_execution' | 'debug_mode' | 'auth_type' | 'secret_token' | 'authorization_enforced' | 'read_only' | 'rate_limit_per_second' | 'rate_limit_per_minute';
|
|
35
36
|
export interface TriggerVersion {
|
|
36
37
|
id: string;
|
|
37
38
|
trigger_id: string;
|
|
@@ -56,6 +57,12 @@ export interface TriggerVersion {
|
|
|
56
57
|
dispatch_url: string;
|
|
57
58
|
is_default: boolean;
|
|
58
59
|
event_id: string;
|
|
60
|
+
/**
|
|
61
|
+
* The FROZEN event's category — what a store listing selling this version is.
|
|
62
|
+
* `returns_data` needs the data-publishing grant to link; null for an event the
|
|
63
|
+
* server has not synced a category for (treated as data).
|
|
64
|
+
*/
|
|
65
|
+
action_kind: 'returns_data' | 'performs_action' | null;
|
|
59
66
|
payload: unknown;
|
|
60
67
|
http_method: HTTPMethod | null;
|
|
61
68
|
when: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerVersion.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerVersion.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAElE
|
|
1
|
+
{"version":3,"file":"TriggerVersion.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerVersion.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAC/B,UAAU,GACV,SAAS,GACT,aAAa,GACb,MAAM,GACN,4BAA4B,GAC5B,YAAY,GACZ,WAAW,GACX,cAAc,GACd,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,CAAA;AAE7B,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAE5B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAA;IAEpB;;;;;;;;;;;OAWG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IAKnB,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,WAAW,EAAE,cAAc,GAAG,iBAAiB,GAAG,IAAI,CAAA;IACtD,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,UAAU,GAAG,IAAI,CAAA;IAC9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC1B,sBAAsB,EAAE,OAAO,CAAA;IAC/B,SAAS,EAAE,OAAO,CAAA;IAClB,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,0BAA0B,EAAE,OAAO,CAAA;IAEnC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,2EAA2E;AAC3E,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,mDAAmD;AACnD,MAAM,MAAM,qBAAqB,GAC3B,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,SAAS,GACT,UAAU,CAAA"}
|
|
@@ -7,15 +7,13 @@ export interface TriggerVersionService {
|
|
|
7
7
|
/** All versions of a trigger, newest release first. */
|
|
8
8
|
fetchVersions: (triggerableType: TriggerableType, triggerableId: string, triggerId: string) => Promise<DataWrapper<TriggerVersion[]>>;
|
|
9
9
|
/**
|
|
10
|
-
* Freeze the
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* - **
|
|
14
|
-
*
|
|
15
|
-
* - **422** a before/after chain dependency has no released version of its own,
|
|
16
|
-
* so the chain cannot be pinned. The message names it.
|
|
10
|
+
* Freeze the draft as a new released version. Refusals:
|
|
11
|
+
* - **409** the label exists, or the draft is identical to a release.
|
|
12
|
+
* - **422** a chain dependency has no released version; the message names it.
|
|
13
|
+
* - **422** `DatasetReleaseRefusal`: the file does not serve as declared; the message
|
|
14
|
+
* names the row and column. Pass `{ _silent: true }` to show it inline.
|
|
17
15
|
*/
|
|
18
|
-
releaseVersion: (triggerableType: TriggerableType, triggerableId: string, triggerId: string, data: ReleaseTriggerVersionBody) => Promise<DataWrapper<TriggerVersion>>;
|
|
16
|
+
releaseVersion: (triggerableType: TriggerableType, triggerableId: string, triggerId: string, data: ReleaseTriggerVersionBody, requestConfig?: Record<string, any>) => Promise<DataWrapper<TriggerVersion>>;
|
|
19
17
|
/** Addressed by the version STRING, not by id. 404 for unknown or retired. */
|
|
20
18
|
fetchVersion: (triggerableType: TriggerableType, triggerableId: string, triggerId: string, version: string) => Promise<DataWrapper<TriggerVersion>>;
|
|
21
19
|
/** Renames / re-notes a version. Cannot change what it froze. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerVersionService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerVersionService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,wBAAwB,EACzB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAoB;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,aAAa,EAAE,CACb,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAE3C
|
|
1
|
+
{"version":3,"file":"TriggerVersionService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerVersionService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,wBAAwB,EACzB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAoB;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,aAAa,EAAE,CACb,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAE3C;;;;;;OAMG;IACH,cAAc,EAAE,CACd,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,yBAAyB,EAC/B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAEzC,8EAA8E;IAC9E,YAAY,EAAE,CACZ,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAEzC,iEAAiE;IACjE,aAAa,EAAE,CACb,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,wBAAwB,KAC3B,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAEzC;;;;;OAKG;IACH,iBAAiB,EAAE,CACjB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAEzC;;;;;OAKG;IACH,aAAa,EAAE,CACb,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAEzC;;;;;;OAMG;IACH,aAAa,EAAE,CACb,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,eAAe,CAAC,CAAA;IAE7B;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,OAAO,CAAC,OAAO,CAAC,CAAA;CACtB;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,aAAa,GAAG,qBAAqB,CAqC5F"}
|
|
@@ -9,7 +9,7 @@ export function createTriggerVersionService(httpClient) {
|
|
|
9
9
|
const label = (version) => encodeURIComponent(version);
|
|
10
10
|
return {
|
|
11
11
|
fetchVersions: (triggerableType, triggerableId, triggerId) => httpClient.get(base(triggerableType, triggerableId, triggerId)),
|
|
12
|
-
releaseVersion: (triggerableType, triggerableId, triggerId, data) => httpClient.post(base(triggerableType, triggerableId, triggerId), data),
|
|
12
|
+
releaseVersion: (triggerableType, triggerableId, triggerId, data, requestConfig) => httpClient.post(base(triggerableType, triggerableId, triggerId), data, requestConfig),
|
|
13
13
|
fetchVersion: (triggerableType, triggerableId, triggerId, version) => httpClient.get(`${base(triggerableType, triggerableId, triggerId)}/${label(version)}`),
|
|
14
14
|
updateVersion: (triggerableType, triggerableId, triggerId, version, data) => httpClient.put(`${base(triggerableType, triggerableId, triggerId)}/${label(version)}`, data),
|
|
15
15
|
setDefaultVersion: (triggerableType, triggerableId, triggerId, version) => httpClient.post(`${base(triggerableType, triggerableId, triggerId)}/${label(version)}/default`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/connect-ts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32-rc.1",
|
|
4
4
|
"description": "Helper to connect to the ANT api",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@faker-js/faker": "^10.6.0",
|
|
48
|
-
"@types/node": "^22.20.
|
|
48
|
+
"@types/node": "^22.20.4",
|
|
49
49
|
"@types/qs": "^6.15.1",
|
|
50
50
|
"happy-dom": "^20.14.5",
|
|
51
51
|
"ts-json-schema-generator": "^2.9.0",
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { SnapshotPayloadConfig, SnapshotPayloadSchema, SnapshotPreview } from '../types/snapshotPayload';
|
|
2
|
-
import type { SnapshotSource } from '../types/snapshotSources';
|
|
3
|
-
import type { AntHttpClient } from "../../../AntHttpClient";
|
|
4
|
-
import type { DataWrapper } from "../../../types";
|
|
5
|
-
/**
|
|
6
|
-
* Snapshot payloads (AAD-939) — publishing a dataset from a linked table.
|
|
7
|
-
*
|
|
8
|
-
* Split out of `resources.ts` for file size; folded into `SellableResourceFactory`
|
|
9
|
-
* so callers still reach everything as `c.apps.*` and the public surface is
|
|
10
|
-
* unchanged.
|
|
11
|
-
*
|
|
12
|
-
* **The publish flow is: preview → create → POLL → publish.** Skipping the poll is
|
|
13
|
-
* the mistake this whole contract is shaped to prevent — see
|
|
14
|
-
* `createResourceVersion` in `resources.ts`.
|
|
15
|
-
*/
|
|
16
|
-
export interface ResourceSnapshotFactory {
|
|
17
|
-
/**
|
|
18
|
-
* The tables this publisher can build a dataset from.
|
|
19
|
-
*
|
|
20
|
-
* Use this for the source picker rather than the generic table listing: that one
|
|
21
|
-
* carries no project attribution (so same-named tables in different projects are
|
|
22
|
-
* indistinguishable), no row count, and no publishable-column count — filling
|
|
23
|
-
* those in from it meant one request per table.
|
|
24
|
-
*
|
|
25
|
-
* Rows with `is_publishable: false` have nothing publishable in them. Show them
|
|
26
|
-
* disabled rather than filtering them out, so a publisher looking for a table they
|
|
27
|
-
* know exists finds it and learns why it cannot be used.
|
|
28
|
-
*
|
|
29
|
-
* The set returned is exactly the set `createResourceVersion` will accept, so the
|
|
30
|
-
* picker can never offer a table the create then refuses. 404 on a resource whose
|
|
31
|
-
* `payload_type` is not `snapshot`.
|
|
32
|
-
*/
|
|
33
|
-
fetchSnapshotSources: (resourceId: string, requestConfig?: Record<string, any>) => Promise<DataWrapper<SnapshotSource[]>>;
|
|
34
|
-
/**
|
|
35
|
-
* Dry-run a column selection before creating a version from it.
|
|
36
|
-
*
|
|
37
|
-
* Returns the row count, an estimated size, the ceilings, the declared schema and
|
|
38
|
-
* a truncated sample. Publisher-only; 404 on a resource whose `payload_type` is
|
|
39
|
-
* not `snapshot`.
|
|
40
|
-
*
|
|
41
|
-
* **Show `exceeds_limits` before letting the publisher continue.** Above either
|
|
42
|
-
* ceiling the backend REFUSES the version rather than truncating it — a partial
|
|
43
|
-
* dataset is indistinguishable from a complete one once published — so a
|
|
44
|
-
* publisher who is not warned here meets a wall at the last step instead.
|
|
45
|
-
*
|
|
46
|
-
* Unlike creating a version, this does NOT require the personal-data declaration:
|
|
47
|
-
* the publisher is still assembling a selection.
|
|
48
|
-
*/
|
|
49
|
-
previewResourceSnapshot: (resourceId: string, payloadConfig: Omit<SnapshotPayloadConfig, 'declarations'> & Partial<Pick<SnapshotPayloadConfig, 'declarations'>>, requestConfig?: Record<string, any>) => Promise<DataWrapper<SnapshotPreview>>;
|
|
50
|
-
}
|
|
51
|
-
export declare function newResourceSnapshotFactory(client: AntHttpClient): ResourceSnapshotFactory;
|
|
52
|
-
/**
|
|
53
|
-
* Narrow a version's `payload_schema` to a snapshot schema.
|
|
54
|
-
*
|
|
55
|
-
* `ResourceVersion.payload_schema` is typed for snapshots because they are the only
|
|
56
|
-
* payload type that records one today, but AAD-899 may store a different shape — so
|
|
57
|
-
* a component rendering the field list should narrow rather than assume. Use this
|
|
58
|
-
* instead of a cast: `as` would happily assert a shape that is not there, and the
|
|
59
|
-
* crash lands in whichever component reads `fields` first.
|
|
60
|
-
*/
|
|
61
|
-
export declare function isSnapshotPayloadSchema(value: unknown): value is SnapshotPayloadSchema;
|
|
62
|
-
/**
|
|
63
|
-
* Narrow a version's source, or a schema's, to the FILE variant (AAD-948).
|
|
64
|
-
*
|
|
65
|
-
* A runtime guard rather than a cast, because the discriminator is optional on the
|
|
66
|
-
* table half — `source.type` is absent for every version written before AAD-948 and
|
|
67
|
-
* for every table-sourced version since. `value.type === 'file'` is the only safe
|
|
68
|
-
* test, and putting it here means no call site has to remember that.
|
|
69
|
-
*/
|
|
70
|
-
export declare function isFileSnapshotSource(value: unknown): value is {
|
|
71
|
-
type: 'file';
|
|
72
|
-
upload_id: string;
|
|
73
|
-
sha256: string | null;
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=resourceSnapshot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceSnapshot.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resourceSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC7G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;;;OAeG;IACH,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAEzH;;;;;;;;;;;;;;OAcG;IACH,uBAAuB,EAAE,CACvB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC,EACjH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAA;CAC3C;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,aAAa,GAAG,uBAAuB,CAQzF;AAMD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAgBtF;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAYrE"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export function newResourceSnapshotFactory(client) {
|
|
2
|
-
return {
|
|
3
|
-
fetchSnapshotSources: (resourceId, requestConfig) => client.get(`/store/resources/${resourceId}/snapshot-sources`, requestConfig),
|
|
4
|
-
previewResourceSnapshot: (resourceId, payloadConfig, requestConfig) => client.post(`/store/resources/${resourceId}/snapshot-preview`, { payload_config: payloadConfig }, requestConfig),
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
function isRecord(value) {
|
|
8
|
-
return typeof value === 'object' && value !== null;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Narrow a version's `payload_schema` to a snapshot schema.
|
|
12
|
-
*
|
|
13
|
-
* `ResourceVersion.payload_schema` is typed for snapshots because they are the only
|
|
14
|
-
* payload type that records one today, but AAD-899 may store a different shape — so
|
|
15
|
-
* a component rendering the field list should narrow rather than assume. Use this
|
|
16
|
-
* instead of a cast: `as` would happily assert a shape that is not there, and the
|
|
17
|
-
* crash lands in whichever component reads `fields` first.
|
|
18
|
-
*/
|
|
19
|
-
export function isSnapshotPayloadSchema(value) {
|
|
20
|
-
if (!isRecord(value))
|
|
21
|
-
return false;
|
|
22
|
-
// Every field the predicate asserts is verified. A guard that narrows to
|
|
23
|
-
// something it never checked is how `schema.fields.map` becomes a runtime error.
|
|
24
|
-
return typeof value.schema_version === 'number'
|
|
25
|
-
&& typeof value.row_count === 'number'
|
|
26
|
-
&& typeof value.byte_size === 'number'
|
|
27
|
-
&& Array.isArray(value.fields)
|
|
28
|
-
&& value.fields.every(field => isRecord(field)
|
|
29
|
-
&& typeof field.key === 'string'
|
|
30
|
-
&& typeof field.type === 'string'
|
|
31
|
-
&& typeof field.nullable === 'boolean'
|
|
32
|
-
&& typeof field.order === 'number'
|
|
33
|
-
&& typeof field.source_column_id === 'string');
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Narrow a version's source, or a schema's, to the FILE variant (AAD-948).
|
|
37
|
-
*
|
|
38
|
-
* A runtime guard rather than a cast, because the discriminator is optional on the
|
|
39
|
-
* table half — `source.type` is absent for every version written before AAD-948 and
|
|
40
|
-
* for every table-sourced version since. `value.type === 'file'` is the only safe
|
|
41
|
-
* test, and putting it here means no call site has to remember that.
|
|
42
|
-
*/
|
|
43
|
-
export function isFileSnapshotSource(value) {
|
|
44
|
-
if (typeof value !== 'object' || value === null)
|
|
45
|
-
return false;
|
|
46
|
-
const source = value;
|
|
47
|
-
// Every asserted field is CHECKED. A guard that narrows `upload_id` to `string`
|
|
48
|
-
// on the strength of the discriminator alone hands the caller a typed value that
|
|
49
|
-
// can be undefined at runtime — the exact failure a guard exists to prevent.
|
|
50
|
-
// `verified` is deliberately not asserted here: it is not validated, and the
|
|
51
|
-
// typed union already carries it for anyone who needs it.
|
|
52
|
-
return source.type === 'file'
|
|
53
|
-
&& typeof source.upload_id === 'string'
|
|
54
|
-
&& (typeof source.sha256 === 'string' || source.sha256 === null);
|
|
55
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { SnapshotUpload, UploadSnapshotFileData } from '../types/snapshotUploads';
|
|
2
|
-
import type { AntHttpClient } from "../../../AntHttpClient";
|
|
3
|
-
import type { DataWrapper } from "../../../types";
|
|
4
|
-
/**
|
|
5
|
-
* Staging dataset files for a snapshot version (AAD-948).
|
|
6
|
-
*
|
|
7
|
-
* Its own factory rather than more methods on `resources.ts`, which is at 228 of the
|
|
8
|
-
* 250-line limit. The public surface is unchanged — both are composed into
|
|
9
|
-
* `SellableResourceFactory` and reached as `c.apps.*`.
|
|
10
|
-
*/
|
|
11
|
-
export interface ResourceUploadFactory {
|
|
12
|
-
/**
|
|
13
|
-
* Stage a dataset file and get back what the server made of it.
|
|
14
|
-
*
|
|
15
|
-
* Synchronous: the response carries the row count, the column count and a PROPOSED
|
|
16
|
-
* type per column, which is what the publisher confirms or overrides before a
|
|
17
|
-
* version exists.
|
|
18
|
-
*
|
|
19
|
-
* **Nothing is created if the file cannot be read.** A truncated JSON document, a
|
|
20
|
-
* CSV row that disagrees with its header, binary content or non-UTF-8 text is a
|
|
21
|
-
* **422 on `errors.file`** and leaves no upload behind. Render that as "pick another
|
|
22
|
-
* file", never as a failed version — a failed version is a different event with a
|
|
23
|
-
* retry attached.
|
|
24
|
-
*/
|
|
25
|
-
uploadSnapshotFile: (resourceId: string, data: UploadSnapshotFileData, requestConfig?: Record<string, any>) => Promise<DataWrapper<SnapshotUpload>>;
|
|
26
|
-
/**
|
|
27
|
-
* Discard an upload the publisher decided against.
|
|
28
|
-
*
|
|
29
|
-
* **409 once a version has claimed it.** At that point the bytes are that version's
|
|
30
|
-
* source, and removing them would turn its retry into a re-upload for no reason the
|
|
31
|
-
* publisher asked for. Deleting the version is the way to remove those, and it takes
|
|
32
|
-
* the upload with it.
|
|
33
|
-
*/
|
|
34
|
-
deleteSnapshotUpload: (resourceId: string, uploadId: string, requestConfig?: Record<string, any>) => Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
export declare function newResourceUploadFactory(client: AntHttpClient): ResourceUploadFactory;
|
|
37
|
-
//# sourceMappingURL=resourceUploads.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceUploads.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resourceUploads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAG1C;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;OAYG;IACH,kBAAkB,EAAE,CAClB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,sBAAsB,EAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAEzC;;;;;;;OAOG;IACH,oBAAoB,EAAE,CACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;CACnB;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,aAAa,GAAG,qBAAqB,CAUrF"}
|