@didit-protocol/mcp-server 3.0.3 → 5.1.33
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/LICENSE +21 -0
- package/README.md +582 -178
- package/dist/audit-log.d.ts +22 -0
- package/dist/audit-log.d.ts.map +1 -0
- package/dist/audit-log.js +77 -0
- package/dist/audit-log.js.map +1 -0
- package/dist/auth/introspection-verifier.d.ts +16 -0
- package/dist/auth/introspection-verifier.d.ts.map +1 -0
- package/dist/auth/introspection-verifier.js +77 -0
- package/dist/auth/introspection-verifier.js.map +1 -0
- package/dist/auth/verifier.d.ts +19 -0
- package/dist/auth/verifier.d.ts.map +1 -0
- package/dist/auth/verifier.js +88 -0
- package/dist/auth/verifier.js.map +1 -0
- package/dist/blank-args.d.ts +10 -0
- package/dist/blank-args.d.ts.map +1 -0
- package/dist/blank-args.js +34 -0
- package/dist/blank-args.js.map +1 -0
- package/dist/chatgpt-app.d.ts +44 -0
- package/dist/chatgpt-app.d.ts.map +1 -0
- package/dist/chatgpt-app.js +52 -0
- package/dist/chatgpt-app.js.map +1 -0
- package/dist/config.d.ts +115 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +251 -15
- package/dist/config.js.map +1 -1
- package/dist/dates.d.ts +2 -0
- package/dist/dates.d.ts.map +1 -0
- package/dist/dates.js +23 -0
- package/dist/dates.js.map +1 -0
- package/dist/feature-config-schema.d.ts +66 -0
- package/dist/feature-config-schema.d.ts.map +1 -0
- package/dist/feature-config-schema.js +192 -0
- package/dist/feature-config-schema.js.map +1 -0
- package/dist/http.d.ts +4 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +230 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2986 -440
- package/dist/index.js.map +1 -1
- package/dist/internal-tools.d.ts +17 -0
- package/dist/internal-tools.d.ts.map +1 -0
- package/dist/internal-tools.js +26 -0
- package/dist/internal-tools.js.map +1 -0
- package/dist/mcp-modern.d.ts +36 -0
- package/dist/mcp-modern.d.ts.map +1 -0
- package/dist/mcp-modern.js +152 -0
- package/dist/mcp-modern.js.map +1 -0
- package/dist/orgapp.d.ts +34 -0
- package/dist/orgapp.d.ts.map +1 -0
- package/dist/orgapp.js +93 -0
- package/dist/orgapp.js.map +1 -0
- package/dist/permissions.d.ts +24 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +210 -0
- package/dist/permissions.js.map +1 -0
- package/dist/privileged-tools.d.ts +14 -0
- package/dist/privileged-tools.d.ts.map +1 -0
- package/dist/privileged-tools.js +21 -0
- package/dist/privileged-tools.js.map +1 -0
- package/dist/schema/feature-config-schema.json +4446 -0
- package/dist/security.d.ts +168 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +858 -0
- package/dist/security.js.map +1 -0
- package/dist/session-pdf-download.d.ts +8 -0
- package/dist/session-pdf-download.d.ts.map +1 -0
- package/dist/session-pdf-download.js +91 -0
- package/dist/session-pdf-download.js.map +1 -0
- package/dist/tools/analytics.d.ts +13 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +171 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/auth.d.ts +11 -2
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +93 -19
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/billing.d.ts +2 -2
- package/dist/tools/billing.d.ts.map +1 -1
- package/dist/tools/billing.js +38 -12
- package/dist/tools/billing.js.map +1 -1
- package/dist/tools/blocklist.d.ts +2 -1
- package/dist/tools/blocklist.d.ts.map +1 -1
- package/dist/tools/blocklist.js +10 -19
- package/dist/tools/blocklist.js.map +1 -1
- package/dist/tools/businesses.d.ts +7 -0
- package/dist/tools/businesses.d.ts.map +1 -0
- package/dist/tools/businesses.js +57 -0
- package/dist/tools/businesses.js.map +1 -0
- package/dist/tools/cases.d.ts +6 -0
- package/dist/tools/cases.d.ts.map +1 -0
- package/dist/tools/cases.js +63 -0
- package/dist/tools/cases.js.map +1 -0
- package/dist/tools/compliance.d.ts +8 -0
- package/dist/tools/compliance.d.ts.map +1 -0
- package/dist/tools/compliance.js +95 -0
- package/dist/tools/compliance.js.map +1 -0
- package/dist/tools/context.d.ts +2 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +37 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/customization.d.ts +18 -0
- package/dist/tools/customization.d.ts.map +1 -0
- package/dist/tools/customization.js +35 -0
- package/dist/tools/customization.js.map +1 -0
- package/dist/tools/feature-config.d.ts +53 -0
- package/dist/tools/feature-config.d.ts.map +1 -0
- package/dist/tools/feature-config.js +432 -0
- package/dist/tools/feature-config.js.map +1 -0
- package/dist/tools/lists.d.ts +3 -0
- package/dist/tools/lists.d.ts.map +1 -1
- package/dist/tools/lists.js +29 -26
- package/dist/tools/lists.js.map +1 -1
- package/dist/tools/members.d.ts +7 -0
- package/dist/tools/members.d.ts.map +1 -0
- package/dist/tools/members.js +60 -0
- package/dist/tools/members.js.map +1 -0
- package/dist/tools/observability.d.ts +4 -0
- package/dist/tools/observability.d.ts.map +1 -0
- package/dist/tools/observability.js +17 -0
- package/dist/tools/observability.js.map +1 -0
- package/dist/tools/questionnaires.d.ts +61 -3
- package/dist/tools/questionnaires.d.ts.map +1 -1
- package/dist/tools/questionnaires.js +128 -24
- package/dist/tools/questionnaires.js.map +1 -1
- package/dist/tools/reports.d.ts +5 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +89 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/search.d.ts +30 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +317 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/session-explain-levers.d.ts +17 -0
- package/dist/tools/session-explain-levers.d.ts.map +1 -0
- package/dist/tools/session-explain-levers.js +139 -0
- package/dist/tools/session-explain-levers.js.map +1 -0
- package/dist/tools/session-explain.d.ts +3 -0
- package/dist/tools/session-explain.d.ts.map +1 -0
- package/dist/tools/session-explain.js +180 -0
- package/dist/tools/session-explain.js.map +1 -0
- package/dist/tools/sessions.d.ts +16 -3
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +150 -64
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts +15 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +141 -22
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/standalone.d.ts +9 -6
- package/dist/tools/standalone.d.ts.map +1 -1
- package/dist/tools/standalone.js +47 -102
- package/dist/tools/standalone.js.map +1 -1
- package/dist/tools/transactions.d.ts +14 -0
- package/dist/tools/transactions.d.ts.map +1 -0
- package/dist/tools/transactions.js +93 -0
- package/dist/tools/transactions.js.map +1 -0
- package/dist/tools/users.d.ts +3 -1
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +35 -22
- package/dist/tools/users.js.map +1 -1
- package/dist/tools/webhooks.d.ts +6 -0
- package/dist/tools/webhooks.d.ts.map +1 -0
- package/dist/tools/webhooks.js +41 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/dist/tools/workflow-graph.d.ts +65 -0
- package/dist/tools/workflow-graph.d.ts.map +1 -0
- package/dist/tools/workflow-graph.js +686 -0
- package/dist/tools/workflow-graph.js.map +1 -0
- package/package.json +23 -6
package/dist/tools/settings.js
CHANGED
|
@@ -6,37 +6,156 @@ exports.createWorkflow = createWorkflow;
|
|
|
6
6
|
exports.updateWorkflow = updateWorkflow;
|
|
7
7
|
exports.deleteWorkflow = deleteWorkflow;
|
|
8
8
|
const config_1 = require("../config");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const feature_config_1 = require("./feature-config");
|
|
10
|
+
// Workflows are the console's "verification-settings" resource, scoped per org+app.
|
|
11
|
+
// org/application are resolved from the tool arguments (organization_id/application_id)
|
|
12
|
+
// via the request context — see orgAppPath / the CallTool dispatch in index.ts.
|
|
13
|
+
async function listWorkflows(params) {
|
|
14
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/verification-settings/"), { params });
|
|
12
15
|
}
|
|
13
16
|
async function getWorkflow(uuid) {
|
|
14
|
-
|
|
15
|
-
return res.json();
|
|
17
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${uuid}/`));
|
|
16
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a simple (linear) workflow from an ordered `features` list.
|
|
21
|
+
*
|
|
22
|
+
* IMPORTANT: the console verification-settings endpoint does NOT persist a `features` payload —
|
|
23
|
+
* `features` is a read-only computed property there, so POSTing it produces a workflow that runs
|
|
24
|
+
* NONE of the requested features (and whose derived graph is a featureless, branch-rooted graph
|
|
25
|
+
* that used to crash the console editor). The only way to make the requested features actually
|
|
26
|
+
* run is to express them as a workflow GRAPH and save that. So we: build a linear graph from the
|
|
27
|
+
* features (normalizing each config) and check its KYC/KYB coherence BEFORE creating anything,
|
|
28
|
+
* then create an empty DRAFT, validate the graph against the backend, PUT it, and finally publish
|
|
29
|
+
* (unless the caller asked for a draft). A mixed KYC/KYB list creates nothing at all, because the
|
|
30
|
+
* type a create fixes cannot be changed afterwards; on backend validation failure nothing is
|
|
31
|
+
* published and the draft is left for the agent to fix with set_graph / edit_graph.
|
|
32
|
+
*/
|
|
17
33
|
async function createWorkflow(data) {
|
|
18
|
-
const
|
|
34
|
+
const { features, status, ...rest } = data || {};
|
|
35
|
+
const featureList = Array.isArray(features) ? features : [];
|
|
36
|
+
// Assemble and check the feature list BEFORE anything is created. The backend types a workflow
|
|
37
|
+
// on CREATE and then refuses to change it ("Workflow type cannot be changed once it has been
|
|
38
|
+
// set"), so creating the draft first would leave a mixed KYC/KYB request behind a draft
|
|
39
|
+
// permanently typed `kyb`, and the pure-KYC repair would then be rejected by the backend's own
|
|
40
|
+
// declared-type segregation rule, making the advice we hand back impossible to follow. Nothing
|
|
41
|
+
// is POSTed until the list is known to be assemblable and KYC/KYB-coherent.
|
|
42
|
+
const graph = featureList.length > 0 ? (0, feature_config_1.buildLinearGraphFromFeatures)(featureList) : undefined;
|
|
43
|
+
if (graph) {
|
|
44
|
+
(0, feature_config_1.normalizeFeatureConfigs)(graph);
|
|
45
|
+
try {
|
|
46
|
+
(0, feature_config_1.assertKycKybSegregation)(graph);
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
return {
|
|
50
|
+
created: false,
|
|
51
|
+
graph_applied: false,
|
|
52
|
+
validation: { is_valid: false, error: e?.message ?? String(e) },
|
|
53
|
+
note: "NOTHING WAS CREATED: the requested features mix business (KYB) and person (KYC) " +
|
|
54
|
+
"verification, which cannot share one workflow. Call didit_workflow_create again with a " +
|
|
55
|
+
"pure-KYB or pure-KYC feature list. A workflow's type is fixed when it is created, so a " +
|
|
56
|
+
"mixed request cannot be repaired with didit_workflow_set_graph. To verify the people " +
|
|
57
|
+
"behind a company, create a SEPARATE KYC workflow and reference it from the KYB Key " +
|
|
58
|
+
"People node.",
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// The type is settable on CREATE only (see workflowTypeForFeatures): the graph PUT below
|
|
63
|
+
// never retypes the draft, so a KYB feature list must declare it here or the draft is a
|
|
64
|
+
// KYC workflow with business steps as far as the console's validator is concerned.
|
|
65
|
+
const workflowType = (0, feature_config_1.workflowTypeForFeatures)(featureList);
|
|
66
|
+
const base = await (0, config_1.apiRequest)((0, config_1.orgAppPath)("/verification-settings/"), {
|
|
19
67
|
method: "POST",
|
|
20
|
-
|
|
21
|
-
body: JSON.stringify(data),
|
|
68
|
+
json: { ...rest, ...(workflowType && { workflow_type: workflowType }), status: "draft" },
|
|
22
69
|
});
|
|
23
|
-
|
|
70
|
+
const uuid = base?.uuid ?? base?.workflow_id;
|
|
71
|
+
if (!uuid)
|
|
72
|
+
return base;
|
|
73
|
+
if (!graph) {
|
|
74
|
+
return { workflow_id: uuid, created: true, graph_applied: false, status: "draft", workflow: base };
|
|
75
|
+
}
|
|
76
|
+
let validation;
|
|
77
|
+
try {
|
|
78
|
+
validation = await (0, config_1.apiRequest)((0, config_1.orgAppPath)("/workflow-graph/validate/"), {
|
|
79
|
+
method: "POST",
|
|
80
|
+
json: { graph, workflow_uuid: uuid },
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
validation = { is_valid: false, error: e?.message ?? String(e) };
|
|
85
|
+
}
|
|
86
|
+
if (validation && validation.is_valid === false) {
|
|
87
|
+
return {
|
|
88
|
+
workflow_id: uuid,
|
|
89
|
+
created: true,
|
|
90
|
+
graph_applied: false,
|
|
91
|
+
status: "draft",
|
|
92
|
+
validation,
|
|
93
|
+
...(workflowType && { workflow_type: workflowType }),
|
|
94
|
+
note: "Created an empty DRAFT, but the requested features could not be assembled into a valid " +
|
|
95
|
+
"graph (see validation — usually a feature ordered before a dependency, e.g. FACE_MATCH/NFC " +
|
|
96
|
+
"before OCR). Fix the order/config and apply with didit_workflow_set_graph, then publish." +
|
|
97
|
+
(workflowType
|
|
98
|
+
? ` The draft is permanently typed ${workflowType}, so the repair graph must stay pure-${workflowType.toUpperCase()}.`
|
|
99
|
+
: ""),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
await (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${uuid}/workflow-graph/`), {
|
|
103
|
+
method: "PUT",
|
|
104
|
+
json: { graph },
|
|
105
|
+
});
|
|
106
|
+
const wantPublished = status === undefined || String(status).toLowerCase() === "published";
|
|
107
|
+
let final = base;
|
|
108
|
+
if (wantPublished) {
|
|
109
|
+
final = await (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${uuid}/`), {
|
|
110
|
+
method: "PATCH",
|
|
111
|
+
json: { status: "published" },
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Return only the accurate, post-graph summary — NOT the base create body, whose `features`/
|
|
115
|
+
// `workflow_graph` reflect the pre-graph draft and would read as "nothing was configured".
|
|
116
|
+
return {
|
|
117
|
+
workflow_id: uuid,
|
|
118
|
+
status: wantPublished ? "published" : "draft",
|
|
119
|
+
created: true,
|
|
120
|
+
graph_applied: true,
|
|
121
|
+
features: featureList.map((f) => String(f?.feature ?? "").toUpperCase()).filter(Boolean),
|
|
122
|
+
workflow_url: final?.workflow_url ?? base?.workflow_url,
|
|
123
|
+
note: wantPublished
|
|
124
|
+
? "Workflow created and published — live for new sessions."
|
|
125
|
+
: "Workflow created as a DRAFT. Publish it in the console or with didit_workflow_publish.",
|
|
126
|
+
};
|
|
24
127
|
}
|
|
25
128
|
async function updateWorkflow(uuid, data) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
129
|
+
const patch = { ...data };
|
|
130
|
+
if (patch.status === undefined) {
|
|
131
|
+
const current = await getWorkflow(uuid);
|
|
132
|
+
if (!current?.status)
|
|
133
|
+
throw new Error(`Could not preserve the publication state of workflow ${uuid}.`);
|
|
134
|
+
patch.status = current.status;
|
|
135
|
+
}
|
|
136
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${uuid}/`), { method: "PATCH", json: patch });
|
|
32
137
|
}
|
|
33
138
|
async function deleteWorkflow(uuid) {
|
|
34
|
-
|
|
35
|
-
method: "DELETE"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
139
|
+
try {
|
|
140
|
+
return await (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${uuid}/`), { method: "DELETE" });
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
144
|
+
if (!/only version|only draft versions|archive it instead/i.test(message))
|
|
145
|
+
throw error;
|
|
146
|
+
const current = await getWorkflow(uuid);
|
|
147
|
+
if (!current?.status)
|
|
148
|
+
throw error;
|
|
149
|
+
const archived = await (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/verification-settings/${uuid}/`), {
|
|
150
|
+
method: "PATCH",
|
|
151
|
+
json: { is_archived: true, status: current.status },
|
|
152
|
+
});
|
|
153
|
+
return {
|
|
154
|
+
...archived,
|
|
155
|
+
deleted: false,
|
|
156
|
+
archived: true,
|
|
157
|
+
note: "The API would not delete this workflow version, so the workflow was archived instead.",
|
|
158
|
+
};
|
|
159
|
+
}
|
|
41
160
|
}
|
|
42
161
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/tools/settings.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/tools/settings.ts"],"names":[],"mappings":";;AAYA,sCAEC;AAED,kCAEC;AAgBD,wCAmGC;AAED,wCAQC;AAED,wCAmBC;AApKD,sCAAmD;AACnD,qDAK0B;AAE1B,oFAAoF;AACpF,wFAAwF;AACxF,gFAAgF;AAEzE,KAAK,UAAU,aAAa,CAAC,MAA4B;IAC9D,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACvE,CAAC;AAEM,KAAK,UAAU,WAAW,CAAC,IAAY;IAC5C,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,0BAA0B,IAAI,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,cAAc,CAAC,IAAyB;IAC5D,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IACjD,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,C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C,CAAC;IACD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,0BAA0B,IAAI,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACrG,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,IAAY;IAC/C,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,0BAA0B,IAAI,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC/F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,IAAI,CAAC,sDAAsD,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,MAAM,KAAK,CAAC;QACvF,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,EAAE,MAAM;YAAE,MAAM,KAAK,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,0BAA0B,IAAI,GAAG,CAAC,EAAE;YAC/E,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE;SACpD,CAAC,CAAC;QACH,OAAO;YACL,GAAG,QAAQ;YACX,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,uFAAuF;SAC9F,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
import type { FileSource } from "../security";
|
|
2
|
+
export declare function idVerification(frontImage: FileSource, backImage: FileSource | undefined, options?: Record<string, any>): Promise<any>;
|
|
3
|
+
export declare function poaVerification(documentImage: FileSource, options?: Record<string, any>): Promise<any>;
|
|
3
4
|
export declare function databaseValidation(data: Record<string, any>): Promise<any>;
|
|
4
|
-
export declare function passiveLiveness(
|
|
5
|
-
export declare function faceMatch(
|
|
6
|
-
export declare function faceSearch(
|
|
7
|
-
export declare function ageEstimation(
|
|
5
|
+
export declare function passiveLiveness(image: FileSource, options?: Record<string, any>): Promise<any>;
|
|
6
|
+
export declare function faceMatch(image1: FileSource, image2: FileSource, options?: Record<string, any>): Promise<any>;
|
|
7
|
+
export declare function faceSearch(image: FileSource, options?: Record<string, any>): Promise<any>;
|
|
8
|
+
export declare function ageEstimation(image: FileSource, options?: Record<string, any>): Promise<any>;
|
|
8
9
|
export declare function amlScreening(data: Record<string, any>): Promise<any>;
|
|
10
|
+
export declare function kybSearch(data: Record<string, any>): Promise<any>;
|
|
11
|
+
export declare function kybSelect(data: Record<string, any>): Promise<any>;
|
|
9
12
|
export declare function emailSend(data: Record<string, any>): Promise<any>;
|
|
10
13
|
export declare function emailCheck(data: Record<string, any>): Promise<any>;
|
|
11
14
|
export declare function phoneSend(data: Record<string, any>): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/tools/standalone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/tools/standalone.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAU9C,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,UAAU,GAAG,SAAS,EACjC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAChC,OAAO,CAAC,GAAG,CAAC,CAMd;AAED,wBAAsB,eAAe,CACnC,aAAa,EAAE,UAAU,EACzB,OAAO,GAAE,MAAM,CAAC,MAAM,E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GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAExE;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAEvE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAExE"}
|
package/dist/tools/standalone.js
CHANGED
|
@@ -8,129 +8,74 @@ exports.faceMatch = faceMatch;
|
|
|
8
8
|
exports.faceSearch = faceSearch;
|
|
9
9
|
exports.ageEstimation = ageEstimation;
|
|
10
10
|
exports.amlScreening = amlScreening;
|
|
11
|
+
exports.kybSearch = kybSearch;
|
|
12
|
+
exports.kybSelect = kybSelect;
|
|
11
13
|
exports.emailSend = emailSend;
|
|
12
14
|
exports.emailCheck = emailCheck;
|
|
13
15
|
exports.phoneSend = phoneSend;
|
|
14
16
|
exports.phoneCheck = phoneCheck;
|
|
15
|
-
const fs_1 = require("fs");
|
|
16
|
-
const path_1 = require("path");
|
|
17
17
|
const config_1 = require("../config");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const security_1 = require("../security");
|
|
19
|
+
// Standalone verification APIs via the console's user-Bearer proxy:
|
|
20
|
+
// /organization/{org}/application/{app}/apis/<check>/ (mirrors the console "manual checks"
|
|
21
|
+
// feature). This lets these run with the user's OAuth Bearer + role permissions — no
|
|
22
|
+
// app api-key. org/app resolve from the tool args via the request context (orgAppPath).
|
|
23
|
+
//
|
|
24
|
+
// Every image input is a FileSource: a local absolute *_path (stdio/local runs) or
|
|
25
|
+
// inline *_base64 content (hosted runs — e.g. Didit Copilot chat attachments).
|
|
26
|
+
async function idVerification(frontImage, backImage, options = {}) {
|
|
27
|
+
const form = (0, config_1.buildFormData)({ front_image: (0, security_1.requireFileSource)(frontImage, "front_image"), back_image: backImage }, options);
|
|
28
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/id-verification/"), { method: "POST", form });
|
|
27
29
|
}
|
|
28
|
-
async function
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
fields.back_image = backImagePath;
|
|
32
|
-
const form = createImageFormData(fields);
|
|
33
|
-
const res = await fetch(`${config_1.DIDIT_API_BASE_URL}/id-verification/`, {
|
|
34
|
-
method: "POST",
|
|
35
|
-
headers: (0, config_1.getApiKeyHeaders)(),
|
|
36
|
-
body: form,
|
|
37
|
-
});
|
|
38
|
-
return res.json();
|
|
39
|
-
}
|
|
40
|
-
async function poaVerification(frontImagePath, backImagePath) {
|
|
41
|
-
const fields = { front_image: frontImagePath };
|
|
42
|
-
if (backImagePath)
|
|
43
|
-
fields.back_image = backImagePath;
|
|
44
|
-
const form = createImageFormData(fields);
|
|
45
|
-
const res = await fetch(`${config_1.DIDIT_API_BASE_URL}/poa/`, {
|
|
46
|
-
method: "POST",
|
|
47
|
-
headers: (0, config_1.getApiKeyHeaders)(),
|
|
48
|
-
body: form,
|
|
49
|
-
});
|
|
50
|
-
return res.json();
|
|
30
|
+
async function poaVerification(documentImage, options = {}) {
|
|
31
|
+
const form = (0, config_1.buildFormData)({ document: (0, security_1.requireFileSource)(documentImage, "document_image") }, options);
|
|
32
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/poa/"), { method: "POST", form });
|
|
51
33
|
}
|
|
52
34
|
async function databaseValidation(data) {
|
|
53
|
-
|
|
54
|
-
method: "POST",
|
|
55
|
-
headers: (0, config_1.getHeaders)(),
|
|
56
|
-
body: JSON.stringify(data),
|
|
57
|
-
});
|
|
58
|
-
return res.json();
|
|
35
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/database-validation/"), { method: "POST", json: data });
|
|
59
36
|
}
|
|
60
|
-
async function passiveLiveness(
|
|
61
|
-
const form =
|
|
62
|
-
|
|
63
|
-
method: "POST",
|
|
64
|
-
headers: (0, config_1.getApiKeyHeaders)(),
|
|
65
|
-
body: form,
|
|
66
|
-
});
|
|
67
|
-
return res.json();
|
|
37
|
+
async function passiveLiveness(image, options = {}) {
|
|
38
|
+
const form = (0, config_1.buildFormData)({ user_image: (0, security_1.requireFileSource)(image, "image") }, options);
|
|
39
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/passive-liveness/"), { method: "POST", form });
|
|
68
40
|
}
|
|
69
|
-
async function faceMatch(
|
|
70
|
-
const form =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
return res.json();
|
|
41
|
+
async function faceMatch(image1, image2, options = {}) {
|
|
42
|
+
const form = (0, config_1.buildFormData)({
|
|
43
|
+
user_image: (0, security_1.requireFileSource)(image1, "image_1"),
|
|
44
|
+
ref_image: (0, security_1.requireFileSource)(image2, "image_2"),
|
|
45
|
+
}, options);
|
|
46
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/face-match/"), { method: "POST", form });
|
|
77
47
|
}
|
|
78
|
-
async function faceSearch(
|
|
79
|
-
const form =
|
|
80
|
-
|
|
81
|
-
method: "POST",
|
|
82
|
-
headers: (0, config_1.getApiKeyHeaders)(),
|
|
83
|
-
body: form,
|
|
84
|
-
});
|
|
85
|
-
return res.json();
|
|
48
|
+
async function faceSearch(image, options = {}) {
|
|
49
|
+
const form = (0, config_1.buildFormData)({ user_image: (0, security_1.requireFileSource)(image, "image") }, options);
|
|
50
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/face-search/"), { method: "POST", form });
|
|
86
51
|
}
|
|
87
|
-
async function ageEstimation(
|
|
88
|
-
const form =
|
|
89
|
-
|
|
90
|
-
method: "POST",
|
|
91
|
-
headers: (0, config_1.getApiKeyHeaders)(),
|
|
92
|
-
body: form,
|
|
93
|
-
});
|
|
94
|
-
return res.json();
|
|
52
|
+
async function ageEstimation(image, options = {}) {
|
|
53
|
+
const form = (0, config_1.buildFormData)({ user_image: (0, security_1.requireFileSource)(image, "image") }, options);
|
|
54
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/age-estimation/"), { method: "POST", form });
|
|
95
55
|
}
|
|
96
56
|
async function amlScreening(data) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
57
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/aml/"), { method: "POST", json: data });
|
|
58
|
+
}
|
|
59
|
+
async function kybSearch(data) {
|
|
60
|
+
const json = { ...data };
|
|
61
|
+
// The backend calls webhook_url when a registry result resolves — SSRF-guard it.
|
|
62
|
+
if (typeof json.webhook_url === "string")
|
|
63
|
+
json.webhook_url = (0, security_1.assertSafeWebhookUrl)(json.webhook_url, "webhook_url");
|
|
64
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/kyb/search/"), { method: "POST", json });
|
|
65
|
+
}
|
|
66
|
+
async function kybSelect(data) {
|
|
67
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/kyb/select/"), { method: "POST", json: data });
|
|
103
68
|
}
|
|
104
69
|
async function emailSend(data) {
|
|
105
|
-
|
|
106
|
-
method: "POST",
|
|
107
|
-
headers: (0, config_1.getHeaders)(),
|
|
108
|
-
body: JSON.stringify(data),
|
|
109
|
-
});
|
|
110
|
-
return res.json();
|
|
70
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/email/send/"), { method: "POST", json: data });
|
|
111
71
|
}
|
|
112
72
|
async function emailCheck(data) {
|
|
113
|
-
|
|
114
|
-
method: "POST",
|
|
115
|
-
headers: (0, config_1.getHeaders)(),
|
|
116
|
-
body: JSON.stringify(data),
|
|
117
|
-
});
|
|
118
|
-
return res.json();
|
|
73
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/email/check/"), { method: "POST", json: data });
|
|
119
74
|
}
|
|
120
75
|
async function phoneSend(data) {
|
|
121
|
-
|
|
122
|
-
method: "POST",
|
|
123
|
-
headers: (0, config_1.getHeaders)(),
|
|
124
|
-
body: JSON.stringify(data),
|
|
125
|
-
});
|
|
126
|
-
return res.json();
|
|
76
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/phone/send/"), { method: "POST", json: data });
|
|
127
77
|
}
|
|
128
78
|
async function phoneCheck(data) {
|
|
129
|
-
|
|
130
|
-
method: "POST",
|
|
131
|
-
headers: (0, config_1.getHeaders)(),
|
|
132
|
-
body: JSON.stringify(data),
|
|
133
|
-
});
|
|
134
|
-
return res.json();
|
|
79
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/apis/phone/check/"), { method: "POST", json: data });
|
|
135
80
|
}
|
|
136
81
|
//# sourceMappingURL=standalone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../src/tools/standalone.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../src/tools/standalone.ts"],"names":[],"mappings":";;AAYA,wCAUC;AAED,0CAMC;AAED,gDAEC;AAED,0CAGC;AAED,8BAaC;AAED,gCAGC;AAED,sCAGC;AAED,oCAEC;AAED,8BAKC;AAED,8BAEC;AAED,8BAEC;AAED,gCAEC;AAED,8BAEC;AAED,gCAEC;AA/FD,sCAAkE;AAClE,0CAAsE;AAGtE,oEAAoE;AACpE,4FAA4F;AAC5F,qFAAqF;AACrF,wFAAwF;AACxF,EAAE;AACF,mFAAmF;AACnF,+EAA+E;AAExE,KAAK,UAAU,cAAc,CAClC,UAAsB,EACtB,SAAiC,EACjC,UAA+B,EAAE;IAEjC,MAAM,IAAI,GAAG,IAAA,sBAAa,EACxB,EAAE,WAAW,EAAE,IAAA,4BAAiB,EAAC,UAAU,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EACpF,OAAO,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C,WAAW,EAAE,aAAa,CAAC,CAAC;IACnH,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/E,CAAC;AAEM,KAAK,UAAU,SAAS,CAAC,IAAyB;IACvD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACrF,CAAC;AAEM,KAAK,UAAU,SAAS,CAAC,IAAyB;IACvD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACrF,CAAC;AAEM,KAAK,UAAU,UAAU,CAAC,IAAyB;IACxD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACtF,CAAC;AAEM,KAAK,UAAU,SAAS,CAAC,IAAyB;IACvD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACrF,CAAC;AAEM,KAAK,UAAU,UAAU,CAAC,IAAyB;IACxD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function listTransactions(params?: Record<string, string>): Promise<any>;
|
|
2
|
+
export declare function createTransaction(data: Record<string, any>): Promise<any>;
|
|
3
|
+
export declare function getTransaction(transactionId: string): Promise<any>;
|
|
4
|
+
export declare function screenWallet(data: Record<string, any>): Promise<any>;
|
|
5
|
+
export declare function listTransactionRules(params?: Record<string, any>): Promise<any>;
|
|
6
|
+
export declare function getTransactionRule(ruleUuidValue: string): Promise<any>;
|
|
7
|
+
export declare function createTransactionRule(data: Record<string, any>): Promise<any>;
|
|
8
|
+
export declare function updateTransactionRule(ruleUuidValue: string, data: Record<string, any>): Promise<any>;
|
|
9
|
+
export declare function deleteTransactionRule(ruleUuidValue: string): Promise<any>;
|
|
10
|
+
export declare function backtestTransactionRule(data: Record<string, any>): Promise<any>;
|
|
11
|
+
export declare function listTransactionRuleLibrary(params?: Record<string, any>): Promise<any>;
|
|
12
|
+
export declare function installTransactionRuleLibrary(data: Record<string, any>): Promise<any>;
|
|
13
|
+
export declare function uninstallTransactionRuleLibrary(data: Record<string, any>): Promise<any>;
|
|
14
|
+
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/tools/transactions.ts"],"names":[],"mappings":"AAKA,wBAAsB,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAEpF;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE/E;AAED,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAExE;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE1E;AAgCD,wBAAsB,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAErF;AAED,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAE5E;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAGnF;AAED,wBAAsB,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAM1G;AAED,wBAAsB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAE/E;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAGrF;AAED,wBAAsB,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE3F;AAED,wBAAsB,6BAA6B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE3F;AAED,wBAAsB,+BAA+B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE7F"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listTransactions = listTransactions;
|
|
4
|
+
exports.createTransaction = createTransaction;
|
|
5
|
+
exports.getTransaction = getTransaction;
|
|
6
|
+
exports.screenWallet = screenWallet;
|
|
7
|
+
exports.listTransactionRules = listTransactionRules;
|
|
8
|
+
exports.getTransactionRule = getTransactionRule;
|
|
9
|
+
exports.createTransactionRule = createTransactionRule;
|
|
10
|
+
exports.updateTransactionRule = updateTransactionRule;
|
|
11
|
+
exports.deleteTransactionRule = deleteTransactionRule;
|
|
12
|
+
exports.backtestTransactionRule = backtestTransactionRule;
|
|
13
|
+
exports.listTransactionRuleLibrary = listTransactionRuleLibrary;
|
|
14
|
+
exports.installTransactionRuleLibrary = installTransactionRuleLibrary;
|
|
15
|
+
exports.uninstallTransactionRuleLibrary = uninstallTransactionRuleLibrary;
|
|
16
|
+
const config_1 = require("../config");
|
|
17
|
+
const security_1 = require("../security");
|
|
18
|
+
// Transaction monitoring (AML) — org/app-scoped console resource.
|
|
19
|
+
async function listTransactions(params) {
|
|
20
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/"), { params });
|
|
21
|
+
}
|
|
22
|
+
async function createTransaction(data) {
|
|
23
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/"), { method: "POST", json: data });
|
|
24
|
+
}
|
|
25
|
+
async function getTransaction(transactionId) {
|
|
26
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/transactions/${transactionId}/`));
|
|
27
|
+
}
|
|
28
|
+
async function screenWallet(data) {
|
|
29
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/screen-wallet/"), { method: "POST", json: data });
|
|
30
|
+
}
|
|
31
|
+
const ruleUuid = (id) => (0, security_1.pathSegment)(id, "rule_uuid");
|
|
32
|
+
function validateAggregationWindows(data) {
|
|
33
|
+
if (data.aggregation === undefined)
|
|
34
|
+
return;
|
|
35
|
+
if (!Array.isArray(data.aggregation)) {
|
|
36
|
+
throw new security_1.DiditError({
|
|
37
|
+
code: "bad_request",
|
|
38
|
+
message: "aggregation must be an array of velocity checks.",
|
|
39
|
+
field: "aggregation",
|
|
40
|
+
hint: "Provide an array, or [] to deliberately use no aggregation checks.",
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const aggregation = data.aggregation;
|
|
44
|
+
for (const [index, entry] of aggregation.entries()) {
|
|
45
|
+
const window = typeof entry === "object" && entry !== null && "window" in entry
|
|
46
|
+
? entry.window
|
|
47
|
+
: undefined;
|
|
48
|
+
// Enforce the advertised window contract before the backend can default to 1d.
|
|
49
|
+
if (typeof window !== "string" || !/^\d+[mhd]$/.test(window) || window !== window.trim()) {
|
|
50
|
+
const field = `aggregation[${index}].window`;
|
|
51
|
+
throw new security_1.DiditError({
|
|
52
|
+
code: "bad_request",
|
|
53
|
+
message: `${field} requires an explicit velocity window.`,
|
|
54
|
+
field,
|
|
55
|
+
hint: "Use digits followed by m (minutes), h (hours), or d (days), e.g. 30m, 24h, or 7d.",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function listTransactionRules(params) {
|
|
61
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/"), { params });
|
|
62
|
+
}
|
|
63
|
+
async function getTransactionRule(ruleUuidValue) {
|
|
64
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/transactions/rules/${ruleUuid(ruleUuidValue)}/`));
|
|
65
|
+
}
|
|
66
|
+
async function createTransactionRule(data) {
|
|
67
|
+
validateAggregationWindows(data);
|
|
68
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/"), { method: "POST", json: data });
|
|
69
|
+
}
|
|
70
|
+
async function updateTransactionRule(ruleUuidValue, data) {
|
|
71
|
+
validateAggregationWindows(data);
|
|
72
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/transactions/rules/${ruleUuid(ruleUuidValue)}/`), {
|
|
73
|
+
method: "PATCH",
|
|
74
|
+
json: data,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
async function deleteTransactionRule(ruleUuidValue) {
|
|
78
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/transactions/rules/${ruleUuid(ruleUuidValue)}/`), { method: "DELETE" });
|
|
79
|
+
}
|
|
80
|
+
async function backtestTransactionRule(data) {
|
|
81
|
+
validateAggregationWindows(data);
|
|
82
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/backtest/"), { method: "POST", json: data });
|
|
83
|
+
}
|
|
84
|
+
async function listTransactionRuleLibrary(params) {
|
|
85
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/library/"), { params });
|
|
86
|
+
}
|
|
87
|
+
async function installTransactionRuleLibrary(data) {
|
|
88
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/install/"), { method: "POST", json: data });
|
|
89
|
+
}
|
|
90
|
+
async function uninstallTransactionRuleLibrary(data) {
|
|
91
|
+
return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/transactions/rules/install/"), { method: "DELETE", json: data });
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/tools/transactions.ts"],"names":[],"mappings":";;AAKA,4CAEC;AAED,8CAEC;AAED,wCAEC;AAED,oCAEC;AAgCD,oDAEC;AAED,gDAEC;AAED,sDAGC;AAED,sDAMC;AAED,sDAEC;AAED,0DAGC;AAED,gEAEC;AAED,sEAEC;AAED,0EAEC;AA3FD,sCAAmD;AACnD,0CAAsD;AAEtD,kEAAkE;AAE3D,KAAK,UAAU,gBAAgB,CAAC,MAA+B;IACpE,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAC9D,CAAC;AAEM,KAAK,UAAU,iBAAiB,CAAC,IAAyB;IAC/D,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAAqB;IACxD,OAAO,IAAA,mBAAU,EAAC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,CAAC,CAAC;IACjC,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACjG,CAAC;AAEM,KAAK,UAAU,0BAA0B,CAAC,MAA4B;IAC3E,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,8BAA8B,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAC5E,CAAC;AAEM,KAAK,UAAU,6BAA6B,CAAC,IAAyB;IAC3E,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,8BAA8B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAChG,CAAC;AAEM,KAAK,UAAU,+BAA+B,CAAC,IAAyB;IAC7E,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,8BAA8B,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAClG,CAAC"}
|
package/dist/tools/users.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare function listUsers(params?: Record<string, string>): Promise<any>;
|
|
2
2
|
export declare function getUser(vendorData: string): Promise<any>;
|
|
3
|
+
export declare function createUser(data: Record<string, any>): Promise<any>;
|
|
3
4
|
export declare function updateUser(vendorData: string, data: Record<string, any>): Promise<any>;
|
|
4
|
-
export declare function
|
|
5
|
+
export declare function updateUserStatus(vendorData: string, status: string): Promise<any>;
|
|
6
|
+
export declare function deleteUsers(vendorDataList?: string[], deleteAll?: unknown, confirm?: unknown): Promise<any>;
|
|
5
7
|
//# sourceMappingURL=users.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/tools/users.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/tools/users.ts"],"names":[],"mappings":"AAQA,wBAAsB,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE7E;AAED,wBAAsB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAE9D;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAExE;AAED,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE5F;AAED,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAKvF;AAED,wBAAsB,WAAW,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAgBjH"}
|