@didit-protocol/mcp-server 3.0.2 → 4.0.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/README.md +78 -22
- package/dist/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +65 -0
- package/dist/config.js.map +1 -1
- package/dist/index.js +830 -100
- package/dist/index.js.map +1 -1
- package/dist/tools/auth.d.ts +2 -0
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +33 -16
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/billing.d.ts.map +1 -1
- package/dist/tools/billing.js +3 -10
- package/dist/tools/billing.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 +35 -0
- package/dist/tools/businesses.js.map +1 -0
- package/dist/tools/customization.d.ts +12 -0
- package/dist/tools/customization.d.ts.map +1 -0
- package/dist/tools/customization.js +25 -0
- package/dist/tools/customization.js.map +1 -0
- package/dist/tools/lists.d.ts +10 -0
- package/dist/tools/lists.d.ts.map +1 -0
- package/dist/tools/lists.js +50 -0
- package/dist/tools/lists.js.map +1 -0
- package/dist/tools/questionnaires.d.ts.map +1 -1
- package/dist/tools/questionnaires.js +5 -25
- package/dist/tools/questionnaires.js.map +1 -1
- package/dist/tools/sessions.d.ts +7 -1
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +38 -61
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +5 -23
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/standalone.d.ts +8 -6
- package/dist/tools/standalone.d.ts.map +1 -1
- package/dist/tools/standalone.js +32 -102
- package/dist/tools/standalone.js.map +1 -1
- package/dist/tools/transactions.d.ts +5 -0
- package/dist/tools/transactions.d.ts.map +1 -0
- package/dist/tools/transactions.js +20 -0
- package/dist/tools/transactions.js.map +1 -0
- package/dist/tools/users.d.ts +2 -0
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +13 -21
- 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 +24 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/package.json +10 -2
- package/dist/tools/blocklist.d.ts +0 -4
- package/dist/tools/blocklist.d.ts.map +0 -1
- package/dist/tools/blocklist.js +0 -30
- package/dist/tools/blocklist.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The official [Model Context Protocol](https://modelcontextprotocol.io/) server for [Didit](https://www.didit.me) identity verification. Connect AI coding agents to the full Didit platform — register accounts, verify identities, manage workflows, screen against watchlists, and more — all through natural language.
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**82 tools** covering every public Didit API — KYC, KYB, AML, transaction monitoring, biometrics, document OCR, workflows, lists, webhooks, billing, and bulk import.
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
@@ -59,26 +59,39 @@ Two API calls, zero friction. See [Programmatic Registration](https://docs.didit
|
|
|
59
59
|
|------|-------------|
|
|
60
60
|
| `didit_register` | Register a new account (sends verification code to email) |
|
|
61
61
|
| `didit_verify_email` | Verify email with 6-char code → get `api_key` and credentials |
|
|
62
|
+
| `didit_resend_otp` | Resend the email verification code (codes expire after 10 min) |
|
|
62
63
|
| `didit_login` | Login to existing account → get access token |
|
|
63
64
|
| `didit_list_organizations` | List organizations you belong to |
|
|
65
|
+
| `didit_list_applications` | List applications in an organization (each has its own api_key) |
|
|
64
66
|
| `didit_get_application` | Get application details (client_id, api_key) |
|
|
65
67
|
|
|
66
68
|
### Sessions
|
|
67
69
|
|
|
68
70
|
| Tool | Description |
|
|
69
71
|
|------|-------------|
|
|
70
|
-
| `didit_create_session` | Create a verification session → returns session URL |
|
|
71
|
-
| `didit_list_sessions` | List sessions with status, vendor_data, and pagination filters |
|
|
72
|
+
| `didit_create_session` | Create a verification session (requires `workflow_id`) → returns session URL |
|
|
73
|
+
| `didit_list_sessions` | List sessions with status, kind, vendor_data, workflow, date, and pagination filters |
|
|
72
74
|
| `didit_get_session_decision` | Get full verification decision and extracted data |
|
|
73
|
-
| `didit_update_session_status` | Approve, decline, or request resubmission |
|
|
75
|
+
| `didit_update_session_status` | Approve, decline, or request resubmission (`new_status`, with optional reviewer comment + email) |
|
|
76
|
+
| `didit_update_session_data` | Reviewer override of extracted KYC (ID document) data |
|
|
77
|
+
| `didit_update_session_poa_data` | Reviewer override of extracted Proof of Address data |
|
|
74
78
|
| `didit_delete_session` | Delete a single session and all associated data |
|
|
75
79
|
| `didit_batch_delete_sessions` | Delete multiple sessions by number, or delete all |
|
|
76
80
|
| `didit_generate_session_pdf` | Generate a PDF verification report |
|
|
77
81
|
| `didit_list_session_reviews` | List review history and activity log |
|
|
78
|
-
| `didit_add_session_review` | Add a review note
|
|
82
|
+
| `didit_add_session_review` | Add a review note to the audit trail, optionally changing status |
|
|
79
83
|
| `didit_share_session` | Share a verified session with a partner (Reusable KYC) |
|
|
80
84
|
| `didit_import_shared_session` | Import a shared session from a partner |
|
|
81
85
|
|
|
86
|
+
### Session Imports (bulk migration)
|
|
87
|
+
|
|
88
|
+
| Tool | Description |
|
|
89
|
+
|------|-------------|
|
|
90
|
+
| `didit_create_import` | Bulk-import verifications from a hosted CSV/NDJSON file (canonical schema; no provider request field) |
|
|
91
|
+
| `didit_get_import_template` | Download the canonical import template |
|
|
92
|
+
| `didit_get_import` | Get the status and summary of an import job |
|
|
93
|
+
| `didit_get_import_errors` | List per-row errors for an import job |
|
|
94
|
+
|
|
82
95
|
### Workflows
|
|
83
96
|
|
|
84
97
|
| Tool | Description |
|
|
@@ -99,15 +112,37 @@ Two API calls, zero friction. See [Programmatic Registration](https://docs.didit
|
|
|
99
112
|
| `didit_update_questionnaire` | Update questions, options, or translations |
|
|
100
113
|
| `didit_delete_questionnaire` | Delete a questionnaire |
|
|
101
114
|
|
|
102
|
-
### Users
|
|
115
|
+
### Users (KYC)
|
|
103
116
|
|
|
104
117
|
| Tool | Description |
|
|
105
118
|
|------|-------------|
|
|
106
|
-
| `didit_list_users` | List verified users
|
|
119
|
+
| `didit_list_users` | List verified users (paginated) |
|
|
120
|
+
| `didit_create_user` | Create a user record manually (vendor_data, allowlisted emails/phones, etc.) |
|
|
107
121
|
| `didit_get_user` | Get user details by vendor_data identifier |
|
|
108
|
-
| `didit_update_user` | Update user metadata
|
|
122
|
+
| `didit_update_user` | Update user profile fields (name, DOB, status, metadata, allowlists) |
|
|
123
|
+
| `didit_update_user_status` | Set monitoring status — `ACTIVE`, `FLAGGED`, or `BLOCKED` |
|
|
109
124
|
| `didit_delete_users` | Batch delete users by vendor_data list |
|
|
110
125
|
|
|
126
|
+
### Businesses (KYB)
|
|
127
|
+
|
|
128
|
+
| Tool | Description |
|
|
129
|
+
|------|-------------|
|
|
130
|
+
| `didit_list_businesses` | List verified businesses (paginated) |
|
|
131
|
+
| `didit_create_business` | Create a business record manually |
|
|
132
|
+
| `didit_get_business` | Get business details by vendor_data identifier |
|
|
133
|
+
| `didit_update_business` | Update business profile fields |
|
|
134
|
+
| `didit_update_business_status` | Set monitoring status — `ACTIVE`, `FLAGGED`, or `BLOCKED` |
|
|
135
|
+
| `didit_delete_businesses` | Batch delete businesses by vendor_data / didit_internal_id list |
|
|
136
|
+
|
|
137
|
+
### Transactions (AML monitoring)
|
|
138
|
+
|
|
139
|
+
| Tool | Description |
|
|
140
|
+
|------|-------------|
|
|
141
|
+
| `didit_list_transactions` | List monitored transactions (paginated) |
|
|
142
|
+
| `didit_create_transaction` | Submit a transaction for monitoring and rule evaluation |
|
|
143
|
+
| `didit_get_transaction` | Get a transaction and its rule-evaluation result |
|
|
144
|
+
| `didit_screen_wallet` | Screen a crypto wallet address for AML risk without creating a transaction |
|
|
145
|
+
|
|
111
146
|
### Billing
|
|
112
147
|
|
|
113
148
|
| Tool | Description |
|
|
@@ -115,13 +150,36 @@ Two API calls, zero friction. See [Programmatic Registration](https://docs.didit
|
|
|
115
150
|
| `didit_get_balance` | Check credit balance and auto-refill settings |
|
|
116
151
|
| `didit_top_up` | Create a Stripe checkout to add credits (min $50) |
|
|
117
152
|
|
|
118
|
-
###
|
|
153
|
+
### Customization
|
|
154
|
+
|
|
155
|
+
| Tool | Description |
|
|
156
|
+
|------|-------------|
|
|
157
|
+
| `didit_get_customization` | Get the verification UI branding (logos, colors) |
|
|
158
|
+
| `didit_update_customization` | Upload branding images (square, rectangular, favicon) |
|
|
159
|
+
|
|
160
|
+
### Webhook destinations
|
|
161
|
+
|
|
162
|
+
| Tool | Description |
|
|
163
|
+
|------|-------------|
|
|
164
|
+
| `didit_list_webhook_destinations` | List webhook destinations (each with its own URL, version, secret, events) |
|
|
165
|
+
| `didit_create_webhook_destination` | Create a destination → returns the signing secret |
|
|
166
|
+
| `didit_get_webhook_destination` | Get a destination, including its signing secret |
|
|
167
|
+
| `didit_update_webhook_destination` | Update URL, version, enabled flag, or subscribed events |
|
|
168
|
+
| `didit_delete_webhook_destination` | Delete a destination |
|
|
169
|
+
|
|
170
|
+
### Lists (Blocklists, Allowlists & Custom)
|
|
119
171
|
|
|
120
172
|
| Tool | Description |
|
|
121
173
|
|------|-------------|
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
174
|
+
| `didit_list_lists` | List all lists (blocklists, allowlists, custom) — filter by type or entry type |
|
|
175
|
+
| `didit_create_list` | Create an allowlist or custom list (blocklists are auto-provisioned) |
|
|
176
|
+
| `didit_get_list` | Get a single list's details |
|
|
177
|
+
| `didit_update_list` | Rename or re-describe an allowlist/custom list |
|
|
178
|
+
| `didit_delete_list` | Delete an allowlist/custom list and its entries |
|
|
179
|
+
| `didit_list_entries` | List entries in a specific list with search |
|
|
180
|
+
| `didit_create_list_entry` | Add to a list — by value directly, or by session reference (auto-extracts face, document, phone, email, IP, device). Supports transaction/user/business traceability |
|
|
181
|
+
| `didit_upload_face_entry` | Add a face to a face list by uploading an image directly (no session needed) |
|
|
182
|
+
| `didit_delete_list_entry` | Remove an entry from a list (also unblocks users/businesses) |
|
|
125
183
|
|
|
126
184
|
### Standalone APIs
|
|
127
185
|
|
|
@@ -130,13 +188,15 @@ Run verification checks directly without creating a session.
|
|
|
130
188
|
| Tool | Description |
|
|
131
189
|
|------|-------------|
|
|
132
190
|
| `didit_id_verification` | Verify identity documents — OCR extraction + authenticity |
|
|
133
|
-
| `didit_poa_verification` | Proof of address — extract and validate address data |
|
|
134
|
-
| `didit_database_validation` | Validate identity against national/global databases |
|
|
191
|
+
| `didit_poa_verification` | Proof of address — extract and validate address data (single document) |
|
|
192
|
+
| `didit_database_validation` | Validate identity against national/global databases (requires `issuing_state`) |
|
|
193
|
+
| `didit_kyb_search` | Search official company registries by name / registration number |
|
|
194
|
+
| `didit_kyb_select` | Resolve a registry search candidate into a full company record |
|
|
135
195
|
| `didit_passive_liveness` | Detect if a person is physically present (single image) |
|
|
136
196
|
| `didit_face_match` | Compare two faces — 1:1 matching |
|
|
137
197
|
| `didit_face_search` | Search face against verified database — 1:N matching |
|
|
138
198
|
| `didit_age_estimation` | Estimate age from facial image |
|
|
139
|
-
| `didit_aml_screening` | Screen against AML, sanctions, and
|
|
199
|
+
| `didit_aml_screening` | Screen against AML, sanctions, PEP, and adverse-media watchlists |
|
|
140
200
|
| `didit_email_send` | Send email verification OTP |
|
|
141
201
|
| `didit_email_check` | Verify email OTP code |
|
|
142
202
|
| `didit_phone_send` | Send phone verification OTP via SMS |
|
|
@@ -147,19 +207,15 @@ Run verification checks directly without creating a session.
|
|
|
147
207
|
> **You:** Set up identity verification for my app with ID scan and liveness
|
|
148
208
|
>
|
|
149
209
|
> **Agent:** I'll create a workflow for you.
|
|
150
|
-
> *calls `didit_create_workflow`* with `
|
|
210
|
+
> *calls `didit_create_workflow`* with `features: [{"feature": "OCR"}, {"feature": "LIVENESS"}]`
|
|
151
211
|
>
|
|
152
212
|
> Done! Workflow "Standard KYC" is ready with ID document scanning and liveness detection.
|
|
153
|
-
>
|
|
154
|
-
> ```bash
|
|
155
|
-
> curl -X POST https://verification.didit.me/v3/session/ \
|
|
156
|
-
> -H "x-api-key: YOUR_API_KEY"
|
|
157
|
-
> ```
|
|
213
|
+
> *calls `didit_create_session`* with the returned `workflow_id` → returns a verification URL to send the user to.
|
|
158
214
|
|
|
159
215
|
> **You:** Check my credit balance and list recent sessions
|
|
160
216
|
>
|
|
161
217
|
> **Agent:** *calls `didit_get_balance`* → 4,250 credits remaining
|
|
162
|
-
> *calls `didit_list_sessions`* → 12 sessions (8 Approved, 2
|
|
218
|
+
> *calls `didit_list_sessions`* → 12 sessions (8 Approved, 2 In Review, 2 Declined)
|
|
163
219
|
|
|
164
220
|
> **You:** Screen "John Smith" born 1985-03-15 against AML watchlists
|
|
165
221
|
>
|
package/dist/config.d.ts
CHANGED
|
@@ -4,4 +4,29 @@ export declare const DIDIT_API_KEY: string;
|
|
|
4
4
|
export declare function getHeaders(): Record<string, string>;
|
|
5
5
|
export declare function getApiKeyHeaders(): Record<string, string>;
|
|
6
6
|
export declare function getAuthHeaders(accessToken: string): Record<string, string>;
|
|
7
|
+
export interface ApiRequestOptions {
|
|
8
|
+
method?: string;
|
|
9
|
+
/** JSON request body. */
|
|
10
|
+
json?: any;
|
|
11
|
+
/** Multipart body. When set, the request uses API-key-only headers (no Content-Type) so fetch sets the boundary. */
|
|
12
|
+
form?: FormData;
|
|
13
|
+
/** Query-string params; undefined/null values are skipped, others stringified. */
|
|
14
|
+
params?: Record<string, any>;
|
|
15
|
+
/** Override the base URL (defaults to the verification API). */
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
/** Override request headers (e.g. Bearer auth for the auth API). */
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Single entry point for every Didit HTTP call. Centralizes auth headers, query
|
|
22
|
+
* building, 204 handling, and — importantly — error handling: a non-2xx response
|
|
23
|
+
* throws with the status and body so the MCP dispatch surfaces it as a tool error
|
|
24
|
+
* instead of silently returning the error body as if it were a success.
|
|
25
|
+
*/
|
|
26
|
+
export declare function apiRequest(path: string, opts?: ApiRequestOptions): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Build a multipart/form-data body from file paths and optional scalar fields.
|
|
29
|
+
* Shared by the standalone image endpoints and branding customization.
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildFormData(files: Record<string, string | undefined>, scalars?: Record<string, any>): FormData;
|
|
7
32
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,QAAoE,CAAC;AACrG,eAAO,MAAM,kBAAkB,QAAuE,CAAC;AACvG,eAAO,MAAM,aAAa,QAAkC,CAAC;AAE7D,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQnD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMzD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK1E;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,oHAAoH;IACpH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,GAAG,CAAC,CAsCzF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACzC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAChC,QAAQ,CAYV"}
|
package/dist/config.js
CHANGED
|
@@ -4,6 +4,10 @@ exports.DIDIT_API_KEY = exports.DIDIT_API_BASE_URL = exports.DIDIT_AUTH_BASE_URL
|
|
|
4
4
|
exports.getHeaders = getHeaders;
|
|
5
5
|
exports.getApiKeyHeaders = getApiKeyHeaders;
|
|
6
6
|
exports.getAuthHeaders = getAuthHeaders;
|
|
7
|
+
exports.apiRequest = apiRequest;
|
|
8
|
+
exports.buildFormData = buildFormData;
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const path_1 = require("path");
|
|
7
11
|
exports.DIDIT_AUTH_BASE_URL = process.env.DIDIT_AUTH_BASE_URL || "https://apx.didit.me/auth/v2";
|
|
8
12
|
exports.DIDIT_API_BASE_URL = process.env.DIDIT_API_BASE_URL || "https://verification.didit.me/v3";
|
|
9
13
|
exports.DIDIT_API_KEY = process.env.DIDIT_API_KEY || "";
|
|
@@ -29,4 +33,65 @@ function getAuthHeaders(accessToken) {
|
|
|
29
33
|
Authorization: `Bearer ${accessToken}`,
|
|
30
34
|
};
|
|
31
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Single entry point for every Didit HTTP call. Centralizes auth headers, query
|
|
38
|
+
* building, 204 handling, and — importantly — error handling: a non-2xx response
|
|
39
|
+
* throws with the status and body so the MCP dispatch surfaces it as a tool error
|
|
40
|
+
* instead of silently returning the error body as if it were a success.
|
|
41
|
+
*/
|
|
42
|
+
async function apiRequest(path, opts = {}) {
|
|
43
|
+
const { method = "GET", json, form, params, baseUrl = exports.DIDIT_API_BASE_URL, headers } = opts;
|
|
44
|
+
const url = new URL(`${baseUrl}${path}`);
|
|
45
|
+
if (params) {
|
|
46
|
+
for (const [k, v] of Object.entries(params)) {
|
|
47
|
+
if (v !== undefined && v !== null)
|
|
48
|
+
url.searchParams.set(k, String(v));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const resolvedHeaders = headers ?? (form ? getApiKeyHeaders() : getHeaders());
|
|
52
|
+
const init = { method, headers: resolvedHeaders };
|
|
53
|
+
if (form) {
|
|
54
|
+
init.body = form;
|
|
55
|
+
}
|
|
56
|
+
else if (json !== undefined) {
|
|
57
|
+
init.body = JSON.stringify(json);
|
|
58
|
+
}
|
|
59
|
+
const res = await fetch(url.toString(), init);
|
|
60
|
+
if (res.status === 204)
|
|
61
|
+
return { success: true };
|
|
62
|
+
const text = await res.text();
|
|
63
|
+
let body = {};
|
|
64
|
+
if (text) {
|
|
65
|
+
try {
|
|
66
|
+
body = JSON.parse(text);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
body = { raw: text };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (!res.ok) {
|
|
73
|
+
const detail = typeof body === "string" ? body : JSON.stringify(body);
|
|
74
|
+
throw new Error(`Didit API ${res.status} ${res.statusText} on ${method} ${path}: ${detail}`);
|
|
75
|
+
}
|
|
76
|
+
return body;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Build a multipart/form-data body from file paths and optional scalar fields.
|
|
80
|
+
* Shared by the standalone image endpoints and branding customization.
|
|
81
|
+
*/
|
|
82
|
+
function buildFormData(files, scalars = {}) {
|
|
83
|
+
const form = new FormData();
|
|
84
|
+
for (const [key, filePath] of Object.entries(files)) {
|
|
85
|
+
if (!filePath)
|
|
86
|
+
continue;
|
|
87
|
+
const buffer = (0, fs_1.readFileSync)(filePath);
|
|
88
|
+
form.append(key, new Blob([buffer]), (0, path_1.basename)(filePath));
|
|
89
|
+
}
|
|
90
|
+
for (const [key, value] of Object.entries(scalars)) {
|
|
91
|
+
if (value === undefined || value === null)
|
|
92
|
+
continue;
|
|
93
|
+
form.append(key, typeof value === "string" ? value : String(value));
|
|
94
|
+
}
|
|
95
|
+
return form;
|
|
96
|
+
}
|
|
32
97
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAOA,gCAQC;AAED,4CAMC;AAED,wCAKC;AAsBD,gCAsCC;AAMD,sCAeC;AA/GD,2BAAkC;AAClC,+BAAgC;AAEnB,QAAA,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,8BAA8B,CAAC;AACxF,QAAA,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,kCAAkC,CAAC;AAC1F,QAAA,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;AAE7D,SAAgB,UAAU;IACxB,MAAM,OAAO,GAA2B;QACtC,cAAc,EAAE,kBAAkB;KACnC,CAAC;IACF,IAAI,qBAAa,EAAE,CAAC;QAClB,OAAO,CAAC,WAAW,CAAC,GAAG,qBAAa,CAAC;IACvC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,gBAAgB;IAC9B,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,IAAI,qBAAa,EAAE,CAAC;QAClB,OAAO,CAAC,WAAW,CAAC,GAAG,qBAAa,CAAC;IACvC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,cAAc,CAAC,WAAmB;IAChD,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