@skedulo/integration-sdk 0.8.1 → 0.9.0
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/.claude/worktrees/agent-a16acadaf5412dffd/jest.config.js +12 -0
- package/.claude/worktrees/agent-a33c3e4636d488e49/jest.config.js +12 -0
- package/.claude/worktrees/agent-a5b1d2ffa4ceef4a6/jest.config.js +12 -0
- package/.claude/worktrees/agent-aa1db4c22eabbde8e/jest.config.js +12 -0
- package/.claude/worktrees/agent-ac197ae8c69d7061c/jest.config.js +12 -0
- package/CHANGELOG.md +19 -0
- package/dist/actions/data-flow/preview.action.d.ts.map +1 -1
- package/dist/actions/data-flow/preview.action.js +18 -3
- package/dist/actions/data-flow/preview.action.js.map +1 -1
- package/dist/actions/event/on-vendor.action.d.ts.map +1 -1
- package/dist/actions/event/on-vendor.action.js +32 -5
- package/dist/actions/event/on-vendor.action.js.map +1 -1
- package/dist/handlers/metadata.handler.d.ts +17 -0
- package/dist/handlers/metadata.handler.d.ts.map +1 -0
- package/dist/handlers/metadata.handler.js +50 -0
- package/dist/handlers/metadata.handler.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces/adapter.interface.d.ts +7 -3
- package/dist/interfaces/adapter.interface.d.ts.map +1 -1
- package/dist/services/field-mapping.service.d.ts +7 -0
- package/dist/services/field-mapping.service.d.ts.map +1 -1
- package/dist/services/field-mapping.service.js +16 -0
- package/dist/services/field-mapping.service.js.map +1 -1
- package/dist/services/sync-runner.d.ts +3 -4
- package/dist/services/sync-runner.d.ts.map +1 -1
- package/dist/services/sync-runner.js +53 -90
- package/dist/services/sync-runner.js.map +1 -1
- package/dist/services/sync.service.d.ts +10 -1
- package/dist/services/sync.service.d.ts.map +1 -1
- package/dist/services/sync.service.js +29 -3
- package/dist/services/sync.service.js.map +1 -1
- package/dist/utils/coerceFilterValues.d.ts +10 -0
- package/dist/utils/coerceFilterValues.d.ts.map +1 -0
- package/dist/utils/coerceFilterValues.js +51 -0
- package/dist/utils/coerceFilterValues.js.map +1 -0
- package/dist/utils/compileFilter.d.ts.map +1 -1
- package/dist/utils/compileFilter.js +40 -15
- package/dist/utils/compileFilter.js.map +1 -1
- package/dist/utils/normalizeDataFlow.d.ts +3 -0
- package/dist/utils/normalizeDataFlow.d.ts.map +1 -0
- package/dist/utils/normalizeDataFlow.js +37 -0
- package/dist/utils/normalizeDataFlow.js.map +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +10 -0
- package/dist/utils.js.map +1 -0
- package/package.json +1 -1
- package/yarn.lock +3 -3
- package/dist/actions/data-flow.action.d.ts +0 -62
- package/dist/actions/data-flow.action.d.ts.map +0 -1
- package/dist/actions/data-flow.action.js +0 -217
- package/dist/actions/data-flow.action.js.map +0 -1
- package/dist/actions/event.action.d.ts +0 -32
- package/dist/actions/event.action.d.ts.map +0 -1
- package/dist/actions/event.action.js +0 -113
- package/dist/actions/event.action.js.map +0 -1
- package/dist/actions/metadata.action.d.ts +0 -44
- package/dist/actions/metadata.action.d.ts.map +0 -1
- package/dist/actions/metadata.action.js +0 -96
- package/dist/actions/metadata.action.js.map +0 -1
- package/dist/actions/scheduled-job.action.d.ts +0 -73
- package/dist/actions/scheduled-job.action.d.ts.map +0 -1
- package/dist/actions/scheduled-job.action.js +0 -355
- package/dist/actions/scheduled-job.action.js.map +0 -1
- package/dist/actions/sync.action.d.ts +0 -26
- package/dist/actions/sync.action.d.ts.map +0 -1
- package/dist/actions/sync.action.js +0 -81
- package/dist/actions/sync.action.js.map +0 -1
- package/dist/services/artifact-builder.d.ts +0 -95
- package/dist/services/artifact-builder.d.ts.map +0 -1
- package/dist/services/artifact-builder.js +0 -142
- package/dist/services/artifact-builder.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.normalizeDataFlow = normalizeDataFlow;
|
|
15
|
+
// Older stored flows may have `property` instead of `field` in filter rules.
|
|
16
|
+
// Normalize to `field` so the integration service API accepts them on re-save.
|
|
17
|
+
function normalizeFilterRule(rule) {
|
|
18
|
+
var _a;
|
|
19
|
+
const _b = rule, { property, field } = _b, rest = __rest(_b, ["property", "field"]);
|
|
20
|
+
return Object.assign({ field: (_a = field !== null && field !== void 0 ? field : property) !== null && _a !== void 0 ? _a : '' }, rest);
|
|
21
|
+
}
|
|
22
|
+
function normalizeFilter(filter) {
|
|
23
|
+
if (!filter)
|
|
24
|
+
return filter;
|
|
25
|
+
return Object.assign(Object.assign({}, filter), { rules: filter.rules.map((r) => normalizeFilterRule(r)) });
|
|
26
|
+
}
|
|
27
|
+
function normalizeDataFlow(flow) {
|
|
28
|
+
return Object.assign(Object.assign({}, flow), { filter: normalizeFilter(flow.filter), lastRunAt: (() => {
|
|
29
|
+
if (!flow.lastRunAt)
|
|
30
|
+
return null;
|
|
31
|
+
if (flow.lastRunAt instanceof Date)
|
|
32
|
+
return flow.lastRunAt;
|
|
33
|
+
const d = new Date(flow.lastRunAt);
|
|
34
|
+
return isNaN(d.getTime()) ? null : d;
|
|
35
|
+
})() });
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=normalizeDataFlow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeDataFlow.js","sourceRoot":"","sources":["../../src/utils/normalizeDataFlow.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAqBA,8CAWC;AA7BD,6EAA6E;AAC7E,+EAA+E;AAC/E,SAAS,mBAAmB,CAAC,IAA6B;;IACxD,MAAM,KAA+B,IAGpC,EAHK,EAAE,QAAQ,EAAE,KAAK,OAGtB,EAH2B,IAAI,cAA1B,qBAA4B,CAGjC,CAAC;IACF,OAAO,gBAAE,KAAK,EAAE,MAAA,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,QAAQ,mCAAI,EAAE,IAAK,IAAI,CAAgB,CAAC;AACnE,CAAC;AAED,SAAS,eAAe,CAAC,MAA8B;IACrD,IAAI,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC;IAC3B,uCACK,MAAM,KACT,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAuC,CAAC,CAAC,IAC5F;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAc;IAC9C,uCACK,IAAI,KACP,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,EACpC,SAAS,EAAE,CAAC,GAAG,EAAE;YACf,IAAI,CAAC,IAAI,CAAC,SAAS;gBAAE,OAAO,IAAI,CAAC;YACjC,IAAI,IAAI,CAAC,SAAS,YAAY,IAAI;gBAAE,OAAO,IAAI,CAAC,SAAS,CAAC;YAC1D,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAA8B,CAAC,CAAC;YACxD,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,EAAE,IACJ;AACJ,CAAC"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.escapeEqlString = escapeEqlString;
|
|
4
|
+
// EQL string literals use single quotes; the resulting filter is embedded in a
|
|
5
|
+
// GraphQL string literal that uses double quotes. Escape backslashes and single
|
|
6
|
+
// quotes only.
|
|
7
|
+
function escapeEqlString(value) {
|
|
8
|
+
return value.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;AAGA,0CAEC;AALD,+EAA+E;AAC/E,gFAAgF;AAChF,eAAe;AACf,SAAgB,eAAe,CAAC,KAAa;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC"}
|
package/package.json
CHANGED
package/yarn.lock
CHANGED
|
@@ -2093,9 +2093,9 @@ lines-and-columns@^1.1.6:
|
|
|
2093
2093
|
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
|
2094
2094
|
|
|
2095
2095
|
linkify-it@^5.0.0:
|
|
2096
|
-
version "5.0.
|
|
2097
|
-
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.
|
|
2098
|
-
integrity sha512-
|
|
2096
|
+
version "5.0.1"
|
|
2097
|
+
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.1.tgz#10c4cecbb5c6828eabf81d3c801adc4a542dfb55"
|
|
2098
|
+
integrity sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==
|
|
2099
2099
|
dependencies:
|
|
2100
2100
|
uc.micro "^2.0.0"
|
|
2101
2101
|
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { CreateDataFlowInput, DataFlowListParams, UpdateDataFlowPatch } from '../clients/dataflow.client';
|
|
2
|
-
import { type DataFlow } from '../interfaces/data-flow-spec.interface';
|
|
3
|
-
import type { Action } from './utils/types';
|
|
4
|
-
/**
|
|
5
|
-
* Create a new data flow. New flows start INACTIVE per IS schema — no ES
|
|
6
|
-
* artifact is created here. Call `data-flow.activate` to provision the ES side.
|
|
7
|
-
*/
|
|
8
|
-
export declare function makeDataFlowCreateAction(): Action<CreateDataFlowInput, DataFlow>;
|
|
9
|
-
export interface DataFlowUpdateInput {
|
|
10
|
-
id: number;
|
|
11
|
-
patch: UpdateDataFlowPatch;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Update an existing data flow.
|
|
15
|
-
*
|
|
16
|
-
* Constraints (business rules):
|
|
17
|
-
* - `sourceSystem` / `targetSystem` (direction) are immutable after create.
|
|
18
|
-
* Reject with `DIRECTION_IS_IMMUTABLE`.
|
|
19
|
-
* - If the flow is currently ACTIVE (its `sync_config` carries a
|
|
20
|
-
* `trigger_name`) AND the patch changes `strategy` or `interval_minutes`,
|
|
21
|
-
* the artifact would need to be recreated. v1 requires the caller to
|
|
22
|
-
* deactivate first and rejects with `DEACTIVATE_BEFORE_STRATEGY_CHANGE`.
|
|
23
|
-
*/
|
|
24
|
-
export declare function makeDataFlowUpdateAction(): Action<DataFlowUpdateInput, DataFlow>;
|
|
25
|
-
export interface DataFlowDeleteInput {
|
|
26
|
-
id: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Delete a data flow. If currently ACTIVE (has a provisioned artifact),
|
|
30
|
-
* deactivate first so the artifact is cleaned up, then delete from IS.
|
|
31
|
-
*/
|
|
32
|
-
export declare function makeDataFlowDeleteAction(): Action<DataFlowDeleteInput, {
|
|
33
|
-
id: number;
|
|
34
|
-
}>;
|
|
35
|
-
export interface DataFlowActivateInput {
|
|
36
|
-
id: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Activate a data flow. Two-phase fail-closed: ES artifact created first,
|
|
40
|
-
* then IS PATCH; if PATCH fails the ES artifact is compensatingly deleted.
|
|
41
|
-
* See `DataFlowService.activate` for full semantics.
|
|
42
|
-
*/
|
|
43
|
-
export declare function makeDataFlowActivateAction(): Action<DataFlowActivateInput, DataFlow>;
|
|
44
|
-
export interface DataFlowDeactivateInput {
|
|
45
|
-
id: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Deactivate a data flow. Deletes the artifact (404 = success) and clears
|
|
49
|
-
* `trigger_name`/`trigger_type` from `sync_config` in IS.
|
|
50
|
-
*/
|
|
51
|
-
export declare function makeDataFlowDeactivateAction(): Action<DataFlowDeactivateInput, DataFlow>;
|
|
52
|
-
export interface DataFlowGetInput {
|
|
53
|
-
id: number;
|
|
54
|
-
}
|
|
55
|
-
export declare function makeDataFlowGetAction(): Action<DataFlowGetInput, DataFlow>;
|
|
56
|
-
export interface DataFlowListInput {
|
|
57
|
-
filter?: DataFlowListParams;
|
|
58
|
-
}
|
|
59
|
-
export declare function makeDataFlowListAction(): Action<DataFlowListInput, Array<{
|
|
60
|
-
id: number;
|
|
61
|
-
}>>;
|
|
62
|
-
//# sourceMappingURL=data-flow.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-flow.action.d.ts","sourceRoot":"","sources":["../../src/actions/data-flow.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,m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AAM,CAAA;CAAE,CAAC,CAAC,CAoBzF"}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeDataFlowCreateAction = makeDataFlowCreateAction;
|
|
4
|
-
exports.makeDataFlowUpdateAction = makeDataFlowUpdateAction;
|
|
5
|
-
exports.makeDataFlowDeleteAction = makeDataFlowDeleteAction;
|
|
6
|
-
exports.makeDataFlowActivateAction = makeDataFlowActivateAction;
|
|
7
|
-
exports.makeDataFlowDeactivateAction = makeDataFlowDeactivateAction;
|
|
8
|
-
exports.makeDataFlowGetAction = makeDataFlowGetAction;
|
|
9
|
-
exports.makeDataFlowListAction = makeDataFlowListAction;
|
|
10
|
-
const data_flow_spec_interface_1 = require("../interfaces/data-flow-spec.interface");
|
|
11
|
-
const action_names_1 = require("./utils/action-names");
|
|
12
|
-
const errors_1 = require("./utils/errors");
|
|
13
|
-
function isNonEmptyString(v) {
|
|
14
|
-
return typeof v === 'string' && v.length > 0;
|
|
15
|
-
}
|
|
16
|
-
function parseId(raw) {
|
|
17
|
-
const obj = (raw !== null && raw !== void 0 ? raw : {});
|
|
18
|
-
if (!Number.isInteger(obj.id) || obj.id <= 0) {
|
|
19
|
-
throw new errors_1.InvalidInputError('id must be a positive integer');
|
|
20
|
-
}
|
|
21
|
-
return obj.id;
|
|
22
|
-
}
|
|
23
|
-
// ── data-flow.create ─────────────────────────────────────────────────────────
|
|
24
|
-
function parseCreateInput(raw) {
|
|
25
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
26
|
-
const obj = (raw !== null && raw !== void 0 ? raw : {});
|
|
27
|
-
const { name, sourceObject, targetObject, matchKeyField } = obj;
|
|
28
|
-
if (!isNonEmptyString(name)) {
|
|
29
|
-
throw new errors_1.InvalidInputError('name must be a non-empty string');
|
|
30
|
-
}
|
|
31
|
-
if (!isNonEmptyString(sourceObject)) {
|
|
32
|
-
throw new errors_1.InvalidInputError('sourceObject must be a non-empty string');
|
|
33
|
-
}
|
|
34
|
-
if (!isNonEmptyString(targetObject)) {
|
|
35
|
-
throw new errors_1.InvalidInputError('targetObject must be a non-empty string');
|
|
36
|
-
}
|
|
37
|
-
if (!isNonEmptyString(matchKeyField)) {
|
|
38
|
-
throw new errors_1.InvalidInputError('matchKeyField must be a non-empty string');
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
// Authoritative integrationType is injected by the handler from context;
|
|
42
|
-
// placeholder here keeps the parsed shape well-typed.
|
|
43
|
-
integrationType: '',
|
|
44
|
-
name,
|
|
45
|
-
description: (_a = obj.description) !== null && _a !== void 0 ? _a : null,
|
|
46
|
-
sourceSystem: (_b = obj.sourceSystem) !== null && _b !== void 0 ? _b : null,
|
|
47
|
-
targetSystem: (_c = obj.targetSystem) !== null && _c !== void 0 ? _c : null,
|
|
48
|
-
sourceObject,
|
|
49
|
-
targetObject,
|
|
50
|
-
triggerConfig: (_d = obj.triggerConfig) !== null && _d !== void 0 ? _d : null,
|
|
51
|
-
mappingConfig: (_e = obj.mappingConfig) !== null && _e !== void 0 ? _e : null,
|
|
52
|
-
filter: (_f = obj.filter) !== null && _f !== void 0 ? _f : null,
|
|
53
|
-
matchKeyField,
|
|
54
|
-
executionOrder: (_g = obj.executionOrder) !== null && _g !== void 0 ? _g : null,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Create a new data flow. New flows start INACTIVE per IS schema — no ES
|
|
59
|
-
* artifact is created here. Call `data-flow.activate` to provision the ES side.
|
|
60
|
-
*/
|
|
61
|
-
function makeDataFlowCreateAction() {
|
|
62
|
-
return {
|
|
63
|
-
name: action_names_1.ACTIONS.dataFlow.create,
|
|
64
|
-
parseInput: parseCreateInput,
|
|
65
|
-
async handler(input, ctx) {
|
|
66
|
-
// IS resolves tenantIntegrationId from integrationType + tenantId (token);
|
|
67
|
-
// take integrationType authoritatively from this function's context.
|
|
68
|
-
return ctx.dataFlowService.create(Object.assign(Object.assign({}, input), { integrationType: ctx.integrationType }));
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function parseUpdateInput(raw) {
|
|
73
|
-
const obj = (raw !== null && raw !== void 0 ? raw : {});
|
|
74
|
-
const { id, patch } = obj;
|
|
75
|
-
if (!Number.isInteger(id) || id <= 0) {
|
|
76
|
-
throw new errors_1.InvalidInputError('id must be a positive integer');
|
|
77
|
-
}
|
|
78
|
-
if (!patch || typeof patch !== 'object' || Array.isArray(patch)) {
|
|
79
|
-
throw new errors_1.InvalidInputError('patch must be an object');
|
|
80
|
-
}
|
|
81
|
-
return { id: id, patch: patch };
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Update an existing data flow.
|
|
85
|
-
*
|
|
86
|
-
* Constraints (business rules):
|
|
87
|
-
* - `sourceSystem` / `targetSystem` (direction) are immutable after create.
|
|
88
|
-
* Reject with `DIRECTION_IS_IMMUTABLE`.
|
|
89
|
-
* - If the flow is currently ACTIVE (its `sync_config` carries a
|
|
90
|
-
* `trigger_name`) AND the patch changes `strategy` or `interval_minutes`,
|
|
91
|
-
* the artifact would need to be recreated. v1 requires the caller to
|
|
92
|
-
* deactivate first and rejects with `DEACTIVATE_BEFORE_STRATEGY_CHANGE`.
|
|
93
|
-
*/
|
|
94
|
-
function makeDataFlowUpdateAction() {
|
|
95
|
-
return {
|
|
96
|
-
name: action_names_1.ACTIONS.dataFlow.update,
|
|
97
|
-
parseInput: parseUpdateInput,
|
|
98
|
-
async handler(input, ctx) {
|
|
99
|
-
var _a;
|
|
100
|
-
const { id, patch } = input;
|
|
101
|
-
const patchRecord = patch;
|
|
102
|
-
if (Object.prototype.hasOwnProperty.call(patchRecord, 'sourceSystem') ||
|
|
103
|
-
Object.prototype.hasOwnProperty.call(patchRecord, 'targetSystem')) {
|
|
104
|
-
throw new errors_1.ActionError('DIRECTION_IS_IMMUTABLE', 'Direction is locked after creation. To change direction, delete this flow and create a new one.');
|
|
105
|
-
}
|
|
106
|
-
const incomingTrigger = patch.triggerConfig;
|
|
107
|
-
if (incomingTrigger) {
|
|
108
|
-
const incoming = (0, data_flow_spec_interface_1.asSyncConfig)(incomingTrigger);
|
|
109
|
-
if (incoming) {
|
|
110
|
-
const flow = await ctx.dataFlowService.getFlowById(id);
|
|
111
|
-
if (!flow) {
|
|
112
|
-
throw new errors_1.ActionError('FLOW_NOT_FOUND', `Flow ${id} not found`);
|
|
113
|
-
}
|
|
114
|
-
// Normalize both sides so a legacy-shaped DB row compares correctly
|
|
115
|
-
// against the new-shaped patch.
|
|
116
|
-
const existing = (0, data_flow_spec_interface_1.asSyncConfig)((_a = flow.triggerConfig) !== null && _a !== void 0 ? _a : null);
|
|
117
|
-
const isActive = !!(existing === null || existing === void 0 ? void 0 : existing.trigger_name);
|
|
118
|
-
if (isActive && existing && incoming.strategy !== existing.strategy) {
|
|
119
|
-
throw new errors_1.ActionError('DEACTIVATE_BEFORE_STRATEGY_CHANGE', 'Deactivate the flow before changing the sync strategy');
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return ctx.dataFlowService.update(id, patch);
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Delete a data flow. If currently ACTIVE (has a provisioned artifact),
|
|
129
|
-
* deactivate first so the artifact is cleaned up, then delete from IS.
|
|
130
|
-
*/
|
|
131
|
-
function makeDataFlowDeleteAction() {
|
|
132
|
-
return {
|
|
133
|
-
name: action_names_1.ACTIONS.dataFlow.delete,
|
|
134
|
-
parseInput(raw) {
|
|
135
|
-
return { id: parseId(raw) };
|
|
136
|
-
},
|
|
137
|
-
async handler(input, ctx) {
|
|
138
|
-
var _a;
|
|
139
|
-
const flow = await ctx.dataFlowService.getFlowById(input.id);
|
|
140
|
-
if (!flow) {
|
|
141
|
-
throw new errors_1.ActionError('FLOW_NOT_FOUND', `Flow ${input.id} not found`);
|
|
142
|
-
}
|
|
143
|
-
const sc = (0, data_flow_spec_interface_1.asSyncConfig)((_a = flow.triggerConfig) !== null && _a !== void 0 ? _a : null);
|
|
144
|
-
if (sc === null || sc === void 0 ? void 0 : sc.trigger_name) {
|
|
145
|
-
await ctx.dataFlowService.deactivate(input.id, ctx);
|
|
146
|
-
}
|
|
147
|
-
await ctx.dataFlowService.delete(input.id);
|
|
148
|
-
return { id: input.id };
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Activate a data flow. Two-phase fail-closed: ES artifact created first,
|
|
154
|
-
* then IS PATCH; if PATCH fails the ES artifact is compensatingly deleted.
|
|
155
|
-
* See `DataFlowService.activate` for full semantics.
|
|
156
|
-
*/
|
|
157
|
-
function makeDataFlowActivateAction() {
|
|
158
|
-
return {
|
|
159
|
-
name: action_names_1.ACTIONS.dataFlow.activate,
|
|
160
|
-
parseInput(raw) {
|
|
161
|
-
return { id: parseId(raw) };
|
|
162
|
-
},
|
|
163
|
-
async handler(input, ctx) {
|
|
164
|
-
return ctx.dataFlowService.activate(input.id, ctx);
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Deactivate a data flow. Deletes the artifact (404 = success) and clears
|
|
170
|
-
* `trigger_name`/`trigger_type` from `sync_config` in IS.
|
|
171
|
-
*/
|
|
172
|
-
function makeDataFlowDeactivateAction() {
|
|
173
|
-
return {
|
|
174
|
-
name: action_names_1.ACTIONS.dataFlow.deactivate,
|
|
175
|
-
parseInput(raw) {
|
|
176
|
-
return { id: parseId(raw) };
|
|
177
|
-
},
|
|
178
|
-
async handler(input, ctx) {
|
|
179
|
-
return ctx.dataFlowService.deactivate(input.id, ctx);
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function makeDataFlowGetAction() {
|
|
184
|
-
return {
|
|
185
|
-
name: action_names_1.ACTIONS.dataFlow.get,
|
|
186
|
-
parseInput(raw) {
|
|
187
|
-
return { id: parseId(raw) };
|
|
188
|
-
},
|
|
189
|
-
async handler(input, ctx) {
|
|
190
|
-
const flow = await ctx.dataFlowService.getFlowById(input.id);
|
|
191
|
-
if (!flow) {
|
|
192
|
-
throw new errors_1.ActionError('FLOW_NOT_FOUND', `Flow ${input.id} not found`);
|
|
193
|
-
}
|
|
194
|
-
return flow;
|
|
195
|
-
},
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function makeDataFlowListAction() {
|
|
199
|
-
return {
|
|
200
|
-
name: action_names_1.ACTIONS.dataFlow.list,
|
|
201
|
-
parseInput(raw) {
|
|
202
|
-
const obj = (raw !== null && raw !== void 0 ? raw : {});
|
|
203
|
-
const filter = obj.filter;
|
|
204
|
-
if (filter !== undefined &&
|
|
205
|
-
(filter === null || typeof filter !== 'object' || Array.isArray(filter))) {
|
|
206
|
-
throw new errors_1.InvalidInputError('filter must be an object when provided');
|
|
207
|
-
}
|
|
208
|
-
return { filter: filter };
|
|
209
|
-
},
|
|
210
|
-
async handler(input, ctx) {
|
|
211
|
-
// Scope to this function's own integration type so a vendor function
|
|
212
|
-
// never lists another vendor's flows.
|
|
213
|
-
return ctx.dataFlowService.list(Object.assign(Object.assign({}, input.filter), { integrationType: ctx.integrationType }));
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
//# sourceMappingURL=data-flow.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-flow.action.js","sourceRoot":"","sources":["../../src/actions/data-flow.action.ts"],"names":[],"mappings":";;AA+DA,4DAUC;AAgCD,4DAyCC;AAYD,4DAmBC;AAaD,gEAUC;AAYD,oEAUC;AAQD,sDAcC;AAQD,wDAoBC;AA3QD,qFAAqF;AACrF,uDAA+C;AAC/C,2CAAgE;AAGhE,SAAS,gBAAgB,CAAC,CAAU;IAClC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC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CAAC;KACF,CAAC;AACJ,CAAC;AAQD,SAAgB,sBAAsB;IACpC,OAAO;QACL,IAAI,EAAE,sBAAO,CAAC,QAAQ,CAAC,IAAI;QAC3B,UAAU,CAAC,GAAG;YACZ,MAAM,GAAG,GAAG,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,EAAE,CAA4B,CAAC;YACnD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;YAC1B,IACE,MAAM,KAAK,SAAS;gBACpB,CAAC,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EACxE,CAAC;gBACD,MAAM,IAAI,0BAAiB,CAAC,wCAAwC,CAAC,CAAC;YACxE,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,MAAwC,EAAE,CAAC;QAC9D,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG;YACtB,qEAAqE;YACrE,sCAAsC;YACtC,OAAO,GAAG,CAAC,eAAe,CAAC,IAAI,iCAAM,KAAK,CAAC,MAAM,KAAE,eAAe,EAAE,GAAG,CAAC,eAAe,IAAG,CAAC;QAC7F,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Adapter } from '../interfaces/adapter.interface';
|
|
2
|
-
import type { AdapterRegistry } from '../adapters/adapter-registry';
|
|
3
|
-
import type { SyncResult } from '../interfaces/sync-result.interface';
|
|
4
|
-
import type { Action } from './utils/types';
|
|
5
|
-
type EventDeps = {
|
|
6
|
-
adapter: Adapter;
|
|
7
|
-
registry: AdapterRegistry;
|
|
8
|
-
};
|
|
9
|
-
type SkeduloOperation = 'INSERT' | 'UPDATE' | 'DELETE';
|
|
10
|
-
interface SkeduloChange {
|
|
11
|
-
operation: SkeduloOperation;
|
|
12
|
-
recordId: string;
|
|
13
|
-
payload: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
export interface OnSkeduloEventInput {
|
|
16
|
-
/** Resolved from the `sked-data-flow-id` header (passed by the dispatcher as parse meta). */
|
|
17
|
-
dataFlowId: number;
|
|
18
|
-
changes: SkeduloChange[];
|
|
19
|
-
}
|
|
20
|
-
export interface OnSkeduloEventOutput {
|
|
21
|
-
message: string;
|
|
22
|
-
results: SyncResult[];
|
|
23
|
-
}
|
|
24
|
-
export declare function makeOnSkeduloEventAction(deps: EventDeps): Action<OnSkeduloEventInput, OnSkeduloEventOutput>;
|
|
25
|
-
export type OnVendorEventInput = unknown;
|
|
26
|
-
export interface OnVendorEventOutput {
|
|
27
|
-
message: string;
|
|
28
|
-
results: SyncResult[];
|
|
29
|
-
}
|
|
30
|
-
export declare function makeOnVendorEventAction(deps: EventDeps): Action<OnVendorEventInput, OnVendorEventOutput>;
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=event.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event.action.d.ts","sourceRoot":"","sources":["../../src/actions/event.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAItE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,KAAK,SAAS,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC;AAIjE,KAAK,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvD,UAAU,aAAa;IACrB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,6FAA6F;IAC7F,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AACD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAkCD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,SAAS,GACd,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CA8CnD;AAID,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;AACzC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,GACd,MAAM,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CA2CjD"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeOnSkeduloEventAction = makeOnSkeduloEventAction;
|
|
4
|
-
exports.makeOnVendorEventAction = makeOnVendorEventAction;
|
|
5
|
-
const sync_runner_1 = require("../services/sync-runner");
|
|
6
|
-
const action_names_1 = require("./utils/action-names");
|
|
7
|
-
const helpers_1 = require("./utils/helpers");
|
|
8
|
-
const errors_1 = require("./utils/errors");
|
|
9
|
-
/**
|
|
10
|
-
* Parse one element of the ElasticServer triggered-action `call_url` body. Each
|
|
11
|
-
* element is the GraphQL query result wrapped under a single subscription-name
|
|
12
|
-
* key inside `data`, plus an `operation`, e.g.
|
|
13
|
-
* `{ "data": { "contacts": { "UID": "…", "Email": … } }, "operation": "INSERT" }`
|
|
14
|
-
*/
|
|
15
|
-
function parseSkeduloChange(raw, index) {
|
|
16
|
-
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
|
|
17
|
-
throw new errors_1.InvalidInputError(`change[${index}] must be an object`);
|
|
18
|
-
}
|
|
19
|
-
const obj = raw;
|
|
20
|
-
const operation = obj.operation;
|
|
21
|
-
if (operation !== 'INSERT' && operation !== 'UPDATE' && operation !== 'DELETE') {
|
|
22
|
-
throw new errors_1.InvalidInputError(`change[${index}] has unsupported operation: ${String(operation)}`);
|
|
23
|
-
}
|
|
24
|
-
// The record sits under the single key inside `data` (its name is the schema's
|
|
25
|
-
// GraphQL subscription name, which we don't know statically).
|
|
26
|
-
const container = obj.data;
|
|
27
|
-
const record = container && typeof container === 'object' && !Array.isArray(container)
|
|
28
|
-
? Object.values(container)[0]
|
|
29
|
-
: undefined;
|
|
30
|
-
if (!record || typeof record !== 'object') {
|
|
31
|
-
throw new errors_1.InvalidInputError(`change[${index}] is missing a record under "data"`);
|
|
32
|
-
}
|
|
33
|
-
const recordId = record.UID;
|
|
34
|
-
if (typeof recordId !== 'string' || !recordId) {
|
|
35
|
-
throw new errors_1.InvalidInputError(`change[${index}] record is missing a UID`);
|
|
36
|
-
}
|
|
37
|
-
return { operation, recordId, payload: record };
|
|
38
|
-
}
|
|
39
|
-
function makeOnSkeduloEventAction(deps) {
|
|
40
|
-
return {
|
|
41
|
-
name: action_names_1.ACTIONS.event.onSkedulo,
|
|
42
|
-
parseInput(raw, meta) {
|
|
43
|
-
var _a;
|
|
44
|
-
const dataFlowId = (_a = meta === null || meta === void 0 ? void 0 : meta.dataFlowId) !== null && _a !== void 0 ? _a : raw === null || raw === void 0 ? void 0 : raw.dataFlowId;
|
|
45
|
-
if (!Number.isInteger(dataFlowId) || dataFlowId <= 0) {
|
|
46
|
-
throw new errors_1.InvalidInputError('dataFlowId must be a positive integer');
|
|
47
|
-
}
|
|
48
|
-
// ES posts an array; tolerate `{ changes: [...] }` or a single object for
|
|
49
|
-
// manual / testing calls.
|
|
50
|
-
const obj = (raw !== null && raw !== void 0 ? raw : {});
|
|
51
|
-
const elements = Array.isArray(raw) ? raw : Array.isArray(obj.changes) ? obj.changes : [raw];
|
|
52
|
-
const changes = elements.map(parseSkeduloChange);
|
|
53
|
-
return { dataFlowId: dataFlowId, changes };
|
|
54
|
-
},
|
|
55
|
-
async handler(input, ctx) {
|
|
56
|
-
const integrationType = deps.adapter.integrationType;
|
|
57
|
-
const lookupStrategy = (0, helpers_1.resolveLookupStrategy)(deps.adapter);
|
|
58
|
-
const runner = new sync_runner_1.SyncRunner(deps.registry);
|
|
59
|
-
const results = [];
|
|
60
|
-
for (const change of input.changes) {
|
|
61
|
-
const result = await runner.handleFlowEvent({
|
|
62
|
-
flowId: input.dataFlowId,
|
|
63
|
-
event: {
|
|
64
|
-
integrationType,
|
|
65
|
-
objectType: '',
|
|
66
|
-
operation: change.operation,
|
|
67
|
-
recordId: change.recordId,
|
|
68
|
-
payload: change.payload,
|
|
69
|
-
dataFlowId: input.dataFlowId,
|
|
70
|
-
},
|
|
71
|
-
options: { lookupStrategy },
|
|
72
|
-
}, ctx);
|
|
73
|
-
results.push(result);
|
|
74
|
-
}
|
|
75
|
-
if (results.some((r) => r.status === 'failed')) {
|
|
76
|
-
throw new errors_1.ActionError('PROCESSING_FAILED', 'Skedulo event processing failed', results);
|
|
77
|
-
}
|
|
78
|
-
return { message: 'Skedulo event processed', results };
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
function makeOnVendorEventAction(deps) {
|
|
83
|
-
return {
|
|
84
|
-
name: action_names_1.ACTIONS.event.onVendor,
|
|
85
|
-
parseInput(raw) {
|
|
86
|
-
// Vendor payload is opaque — adapter.parseChangeEvent validates inside handler.
|
|
87
|
-
return raw;
|
|
88
|
-
},
|
|
89
|
-
async handler(input, ctx) {
|
|
90
|
-
const adapter = deps.adapter;
|
|
91
|
-
const lookupStrategy = (0, helpers_1.resolveLookupStrategy)(adapter);
|
|
92
|
-
if (!adapter.parseChangeEvent) {
|
|
93
|
-
throw new errors_1.ActionError('NOT_IMPLEMENTED', `${adapter.integrationType} adapter does not implement parseChangeEvent`);
|
|
94
|
-
}
|
|
95
|
-
const parsed = adapter.parseChangeEvent(input);
|
|
96
|
-
if (!('event' in parsed)) {
|
|
97
|
-
throw new errors_1.InvalidInputError(parsed.error);
|
|
98
|
-
}
|
|
99
|
-
const results = await new sync_runner_1.SyncRunner(deps.registry).handleEvent({ event: parsed.event, options: { lookupStrategy } }, ctx);
|
|
100
|
-
if (results.some((r) => r.status === 'precondition_failed')) {
|
|
101
|
-
throw new errors_1.ActionError('PRECONDITION_FAILED', 'Integration not bootstrapped — run /setup then /run-all-flows', results);
|
|
102
|
-
}
|
|
103
|
-
if (results.some((r) => r.status === 'failed')) {
|
|
104
|
-
throw new errors_1.ActionError('PROCESSING_FAILED', 'Event processing failed', results);
|
|
105
|
-
}
|
|
106
|
-
return {
|
|
107
|
-
message: `${parsed.event.objectType} ${parsed.event.operation.toLowerCase()} processed`,
|
|
108
|
-
results,
|
|
109
|
-
};
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=event.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event.action.js","sourceRoot":"","sources":["../../src/actions/event.action.ts"],"names":[],"mappings":";;AA+DA,4DAgDC;AAUD,0DA6CC;AApKD,yDAAqD;AAErD,uDAA+C;AAC/C,6CAAwD;AACxD,2CAAgE;AAyBhE;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,GAAY,EAAE,KAAa;IACrD,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,0BAAiB,CAAC,UAAU,KAAK,qBAAqB,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,GAAG,GAAG,GAA8B,CAAC;IAC3C,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAChC,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC/E,MAAM,I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ACJ,CAAC;YAEF,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,qBAAqB,CAAC,EAAE,CAAC;gBAC5D,MAAM,IAAI,oBAAW,CACnB,qBAAqB,EACrB,+DAA+D,EAC/D,OAAO,CACR,CAAC;YACJ,CAAC;YACD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,oBAAW,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,OAAO,CAAC,CAAC;YACjF,CAAC;YACD,OAAO;gBACL,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,YAAY;gBACvF,OAAO;aACR,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Adapter, DataFlowTemplate, FieldInfo, ObjectInfo, SampleAPI, SampleRecord } from '../interfaces/adapter.interface';
|
|
2
|
-
import type { Action } from './utils/types';
|
|
3
|
-
export interface GetObjectsInput {
|
|
4
|
-
system?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface GetObjectsOutput {
|
|
7
|
-
system: string;
|
|
8
|
-
objects: ObjectInfo[];
|
|
9
|
-
}
|
|
10
|
-
export declare function makeGetObjectsAction(adapter: Adapter): Action<GetObjectsInput, GetObjectsOutput>;
|
|
11
|
-
export interface GetFieldsInput {
|
|
12
|
-
system?: string;
|
|
13
|
-
object: string;
|
|
14
|
-
}
|
|
15
|
-
export interface GetFieldsOutput {
|
|
16
|
-
system: string;
|
|
17
|
-
object: string;
|
|
18
|
-
fields: FieldInfo[];
|
|
19
|
-
}
|
|
20
|
-
export declare function makeGetFieldsAction(adapter: Adapter): Action<GetFieldsInput, GetFieldsOutput>;
|
|
21
|
-
export interface GetTemplatesInput {
|
|
22
|
-
system?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface GetTemplatesOutput {
|
|
25
|
-
templates: DataFlowTemplate[];
|
|
26
|
-
}
|
|
27
|
-
export declare function makeGetTemplatesAction(adapter: Adapter): Action<GetTemplatesInput, GetTemplatesOutput>;
|
|
28
|
-
export interface GetSampleApisInput {
|
|
29
|
-
system?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface GetSampleApisOutput {
|
|
32
|
-
apis: SampleAPI[];
|
|
33
|
-
}
|
|
34
|
-
export declare function makeGetSampleApisAction(adapter: Adapter): Action<GetSampleApisInput, GetSampleApisOutput>;
|
|
35
|
-
export interface GetSampleRecordsInput {
|
|
36
|
-
system?: string;
|
|
37
|
-
objectType: string;
|
|
38
|
-
limit: number;
|
|
39
|
-
}
|
|
40
|
-
export interface GetSampleRecordsOutput {
|
|
41
|
-
records: SampleRecord[];
|
|
42
|
-
}
|
|
43
|
-
export declare function makeGetSampleRecordsAction(adapter: Adapter): Action<GetSampleRecordsInput, GetSampleRecordsOutput>;
|
|
44
|
-
//# sourceMappingURL=metadata.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.action.d.ts","sourceRoot":"","sources":["../../src/actions/metadata.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACb,MAAM,iCAAiC,CAAC;AAIzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAY5C,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,eAAe,EA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