@didit-protocol/sdk-node 2.9.0 → 2.10.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/dist/index.cjs +28 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +100 -22
- package/dist/index.d.ts +100 -22
- package/dist/index.js +28 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -282,7 +282,7 @@ function decodeDates(value, plan, named, depth = 0) {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// src/core/version.ts
|
|
285
|
-
var VERSION = "2.
|
|
285
|
+
var VERSION = "2.10.0";
|
|
286
286
|
|
|
287
287
|
// src/core/runtime.ts
|
|
288
288
|
function processLike() {
|
|
@@ -1175,6 +1175,7 @@ var DATE_PLANS = {
|
|
|
1175
1175
|
},
|
|
1176
1176
|
AddressValidationResponse: { p: { created_at: 1 } },
|
|
1177
1177
|
AgeEstimationEstimateResponse: { p: { created_at: 1 } },
|
|
1178
|
+
AgentTopUp: { p: { created_at: 1 } },
|
|
1178
1179
|
AmlMonitoringRetrieveJobResponse: { p: { created_at: 1, completed_at: 1 } },
|
|
1179
1180
|
AmlRetrieveDatasetFreshnessResponse: { p: { dataset_freshness: "AMLDatasetFreshness" } },
|
|
1180
1181
|
AmlScreenResponse: {
|
|
@@ -1192,6 +1193,7 @@ var DATE_PLANS = {
|
|
|
1192
1193
|
updated_at: 1
|
|
1193
1194
|
}
|
|
1194
1195
|
},
|
|
1196
|
+
BillingTopUpCharge: { p: { top_up: "AgentTopUp" } },
|
|
1195
1197
|
BiometricRetention: { p: { deletes_at: 1 } },
|
|
1196
1198
|
BiometricTemplatesListResponse: {
|
|
1197
1199
|
p: { results: { i: { p: { retained_at: 1, expires_at: 1, purged_at: 1 } } } }
|
|
@@ -2287,7 +2289,12 @@ var Bank = class extends APIResource {
|
|
|
2287
2289
|
|
|
2288
2290
|
// src/resources/billing.ts
|
|
2289
2291
|
var BILLING_RETRIEVE_BALANCE = { method: "GET", path: "/v3/billing/balance/" };
|
|
2290
|
-
var BILLING_TOP_UP = {
|
|
2292
|
+
var BILLING_TOP_UP = {
|
|
2293
|
+
method: "POST",
|
|
2294
|
+
path: "/v3/billing/top-up/",
|
|
2295
|
+
body: "json",
|
|
2296
|
+
dates: "BillingTopUpCharge"
|
|
2297
|
+
};
|
|
2291
2298
|
var Billing = class extends APIResource {
|
|
2292
2299
|
/**
|
|
2293
2300
|
* Get credit balance
|
|
@@ -2302,9 +2309,24 @@ var Billing = class extends APIResource {
|
|
|
2302
2309
|
/**
|
|
2303
2310
|
* Top up credits
|
|
2304
2311
|
*
|
|
2305
|
-
* Add credits
|
|
2312
|
+
* Add credits to the organization's balance (**\$50 to \$20,000** per top-up). Top-ups are available on the Free, Growth and Scale plans, added at face value with no discount or bonus, and last 12 months; Enterprise annual contracts cannot top up.
|
|
2313
|
+
*
|
|
2314
|
+
* Two payment methods, chosen with `payment_method`:
|
|
2315
|
+
*
|
|
2316
|
+
* - `checkout` (default): creates a hosted Stripe Checkout session. Redirect the customer to the returned `checkout_session_url` (`200`).
|
|
2317
|
+
* - `saved_card`: charges the organization's saved primary card off-session, now, at the normal self-serve amounts. Send an `Idempotency-Key` header (required for this method). It answers `201` when the card was charged, and `202` when a request with the same key is still being processed.
|
|
2318
|
+
*
|
|
2319
|
+
* **Agent top-ups (`saved_card`).** One switch controls them: "Connected AI agents can top up with your saved card". It is off by default and only a person signed in to the console can turn it on (Billing > Payment methods), never an API key or an agent. While it is on, agents and API keys can top up with the primary saved card. When it is off, the request returns `403` `agent_top_up_not_enabled` with a link a person can use to top up in the console.
|
|
2320
|
+
*
|
|
2321
|
+
* The balance is credited once the payment is confirmed, usually within seconds, and tax is added to the amount charged when it applies, so `total` can be higher than `credit_amount`. Read `GET /v3/billing/balance/` to confirm.
|
|
2322
|
+
*
|
|
2323
|
+
* **Idempotency.** Retrying with the same `Idempotency-Key` and the same amount returns the same top-up and never charges twice. The same key with another amount returns `409` `idempotency_key_conflict`.
|
|
2324
|
+
*
|
|
2325
|
+
* Every error of a `saved_card` request carries a `code` and a `detail`, and most also a `next_step` (read it only when it is present). When the step needs a person (for example `authentication_required`, where the card's bank asks the cardholder to approve and nothing is charged), `next_step.url` is a signed link to the console that opens the Top up dialog with the amount filled in and says which agent asked; nothing is charged until the person pays. Each top-up is marked with the agent's name in billing history and in the ordinary receipt email.
|
|
2306
2326
|
*
|
|
2307
2327
|
* `POST /v3/billing/top-up/`
|
|
2328
|
+
*
|
|
2329
|
+
* Accepts `options.idempotencyKey` (header `Idempotency-Key`).
|
|
2308
2330
|
*/
|
|
2309
2331
|
topUp(params, options) {
|
|
2310
2332
|
return this._client.request(BILLING_TOP_UP, [], params, options);
|
|
@@ -3482,7 +3504,7 @@ var CasesRegulatoryReports = class extends APIResource {
|
|
|
3482
3504
|
/**
|
|
3483
3505
|
* Create report from case
|
|
3484
3506
|
*
|
|
3485
|
-
* Create a draft FIU report for the case: DRAFT status, auto-populated from the optional template plus the case's subject, linked transactions, and narrative. Validate then finalize to produce the goAML XML and PDF.
|
|
3507
|
+
* Create a draft FIU report for the case: DRAFT status, auto-populated from the optional template plus the case's subject, linked transactions, and narrative. Validate then finalize to produce the goAML XML and PDF. FFR (Confirmed Name Match Report, formerly the Funds Freeze Report) and PNMR (Partial Name Match Report) are activity reports: they report the case's subject, not transactions, so a draft links no transactions by default and the narrative, reason and action are written from the sanctions matches on the case's AML screenings.
|
|
3486
3508
|
*
|
|
3487
3509
|
* `POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/`
|
|
3488
3510
|
*
|
|
@@ -6335,7 +6357,7 @@ var RegulatoryReports = class extends APIResource {
|
|
|
6335
6357
|
/**
|
|
6336
6358
|
* Finalize report
|
|
6337
6359
|
*
|
|
6338
|
-
* Re-validate, then render the goAML XML and PDF and upload both to S3. On SAR/STR/TFR reports, this also moves the case's transaction alerts from Pending SAR to SAR filed.
|
|
6360
|
+
* Re-validate, then render the goAML XML and PDF and upload both to S3. On SAR/STR/TFR reports, this also moves the case's transaction alerts from Pending SAR to SAR filed. FFR and PNMR reports do not move alerts.
|
|
6339
6361
|
*
|
|
6340
6362
|
* `POST /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/finalize/`
|
|
6341
6363
|
*
|
|
@@ -6398,7 +6420,7 @@ var RegulatoryReports = class extends APIResource {
|
|
|
6398
6420
|
/**
|
|
6399
6421
|
* Validate report
|
|
6400
6422
|
*
|
|
6401
|
-
* Check the report against the obligatory goAML header fields (reporting entity ID, submission code, local currency, action taken, submission date), plus at least one attached transaction and a 2-letter jurisdiction, without generating any files. Also stores the result on the report: validation_errors and validated_at are updated, and a non-finalized report's status moves to VALIDATED (no errors) or back to DRAFT (errors).
|
|
6423
|
+
* Check the report against the obligatory goAML header fields (reporting entity ID, submission code, local currency, action taken, submission date), plus at least one attached transaction and a 2-letter jurisdiction, without generating any files. For jurisdiction AE, once those pass, the report's goAML XML is also checked against the UAE FIU's goAML XML schema and each problem is returned as a field and a message; finalize refuses a report that fails. FFR and PNMR reports need no attached transaction: they require the case to have a subject, otherwise validation_errors contains an error with field `subject`. Also stores the result on the report: validation_errors and validated_at are updated, and a non-finalized report's status moves to VALIDATED (no errors) or back to DRAFT (errors).
|
|
6402
6424
|
*
|
|
6403
6425
|
* `POST /v3/organization/{organization_id}/application/{application_id}/regulatory-reports/{report_uuid}/validate/`
|
|
6404
6426
|
*
|