@delopay/sdk 0.280.0 → 0.289.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/{chunk-3CHJT5YW.js → chunk-ZZEGL45P.js} +480 -2
- package/dist/chunk-ZZEGL45P.js.map +1 -0
- package/dist/{index-DmObtUEw.d.cts → index-DIzFgkFA.d.cts} +1173 -7
- package/dist/{index-DmObtUEw.d.ts → index-DIzFgkFA.d.ts} +1173 -7
- package/dist/index.cjs +485 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -1
- package/dist/internal.cjs +554 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +133 -5
- package/dist/internal.d.ts +133 -5
- package/dist/internal.js +81 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-3CHJT5YW.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
BRANDING_EXPORT_FORMAT: () => BRANDING_EXPORT_FORMAT,
|
|
43
43
|
BRANDING_EXPORT_VERSION: () => BRANDING_EXPORT_VERSION,
|
|
44
44
|
BUILTIN_PAYMENT_ICON_KEYS: () => BUILTIN_PAYMENT_ICON_KEYS,
|
|
45
|
+
Branding: () => Branding,
|
|
45
46
|
BuyerBlocklist: () => BuyerBlocklist,
|
|
46
47
|
BuyerConversations: () => BuyerConversations,
|
|
47
48
|
BuyerEvidenceReviews: () => BuyerEvidenceReviews,
|
|
@@ -63,6 +64,7 @@ __export(index_exports, {
|
|
|
63
64
|
CheckoutMethods: () => CheckoutMethods,
|
|
64
65
|
CheckoutRecovery: () => CheckoutRecovery,
|
|
65
66
|
CheckoutSession: () => CheckoutSession,
|
|
67
|
+
CheckoutTemplates: () => CheckoutTemplates,
|
|
66
68
|
CostRules: () => CostRules,
|
|
67
69
|
DEFAULT_BADGES: () => DEFAULT_BADGES,
|
|
68
70
|
DEFAULT_BADGES_DARK: () => DEFAULT_BADGES_DARK,
|
|
@@ -80,6 +82,7 @@ __export(index_exports, {
|
|
|
80
82
|
Forex: () => Forex,
|
|
81
83
|
GOOGLE_PAY_BUTTON_COLORS: () => GOOGLE_PAY_BUTTON_COLORS,
|
|
82
84
|
GOOGLE_PAY_BUTTON_TYPES: () => GOOGLE_PAY_BUTTON_TYPES,
|
|
85
|
+
IdentityVerifications: () => IdentityVerifications,
|
|
83
86
|
InvoiceSettingsResource: () => InvoiceSettingsResource,
|
|
84
87
|
Invoices: () => Invoices,
|
|
85
88
|
LOCALIZABLE_COPY_FIELDS: () => LOCALIZABLE_COPY_FIELDS,
|
|
@@ -163,6 +166,7 @@ __export(index_exports, {
|
|
|
163
166
|
anyOf: () => anyOf,
|
|
164
167
|
applyBrandingVariables: () => applyBrandingVariables,
|
|
165
168
|
asAirwallexCardPreset: () => asAirwallexCardPreset,
|
|
169
|
+
brandingAssetPath: () => brandingAssetPath,
|
|
166
170
|
buildBrandingExport: () => buildBrandingExport,
|
|
167
171
|
builtinPaymentIconDataUri: () => builtinPaymentIconDataUri,
|
|
168
172
|
builtinPaymentIconSvg: () => builtinPaymentIconSvg,
|
|
@@ -171,6 +175,7 @@ __export(index_exports, {
|
|
|
171
175
|
cardFieldFontPx: () => cardFieldFontPx,
|
|
172
176
|
cardFieldWeightValue: () => cardFieldWeightValue,
|
|
173
177
|
checkoutCopy: () => checkoutCopy,
|
|
178
|
+
checkoutEntryUrl: () => checkoutEntryUrl,
|
|
174
179
|
checkoutLocaleDir: () => checkoutLocaleDir,
|
|
175
180
|
cloneBranding: () => cloneBranding,
|
|
176
181
|
cloneCustomField: () => cloneCustomField,
|
|
@@ -217,6 +222,7 @@ __export(index_exports, {
|
|
|
217
222
|
fontWeightValue: () => fontWeightValue,
|
|
218
223
|
inputPadValue: () => inputPadValue,
|
|
219
224
|
isCheckboxChecked: () => isCheckboxChecked,
|
|
225
|
+
isCheckoutOpenEntryMessage: () => isCheckoutOpenEntryMessage,
|
|
220
226
|
isConfirmedChild: () => isConfirmedChild,
|
|
221
227
|
isDarkSurface: () => isDarkSurface,
|
|
222
228
|
isDefaultBadgeSet: () => isDefaultBadgeSet,
|
|
@@ -3062,6 +3068,29 @@ var Payments = class {
|
|
|
3062
3068
|
body: params ?? {}
|
|
3063
3069
|
});
|
|
3064
3070
|
}
|
|
3071
|
+
/**
|
|
3072
|
+
* Mark a payment as an integration test, or remove the mark.
|
|
3073
|
+
*
|
|
3074
|
+
* A marked payment stays live or test as it was; only analytics leave it
|
|
3075
|
+
* out, from their next refresh on. Every change is recorded in the
|
|
3076
|
+
* payment's status history with the person who made it. Needs a dashboard
|
|
3077
|
+
* JWT with write access to transactions. Asking for the mark the payment
|
|
3078
|
+
* already carries changes nothing (`changed: false`).
|
|
3079
|
+
*
|
|
3080
|
+
* `POST /payments/{paymentId}/integration-test`
|
|
3081
|
+
*
|
|
3082
|
+
* @example
|
|
3083
|
+
* ```typescript
|
|
3084
|
+
* const { is_integration_test } = await delopay.payments.setIntegrationTest('pay_123', {
|
|
3085
|
+
* is_integration_test: true,
|
|
3086
|
+
* });
|
|
3087
|
+
* ```
|
|
3088
|
+
*/
|
|
3089
|
+
async setIntegrationTest(paymentId, params) {
|
|
3090
|
+
return this.request("POST", `/payments/${encodeURIComponent(paymentId)}/integration-test`, {
|
|
3091
|
+
body: params
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3065
3094
|
/**
|
|
3066
3095
|
* List payment intents, optionally filtered by customer or date range.
|
|
3067
3096
|
*
|
|
@@ -5225,6 +5254,49 @@ var Users = class {
|
|
|
5225
5254
|
body: params
|
|
5226
5255
|
});
|
|
5227
5256
|
}
|
|
5257
|
+
/**
|
|
5258
|
+
* A member's permission overrides in your merchant: every area that can be
|
|
5259
|
+
* overridden at their level, with what their roles give, the level set for
|
|
5260
|
+
* them, and what they have. `GET /user/employees/{user_id}/permission-overrides`
|
|
5261
|
+
*
|
|
5262
|
+
* Needs the *Users* read permission, and answers only for a member
|
|
5263
|
+
* `listUsersInLineage` shows you (any other id is a 404 `UR_68`).
|
|
5264
|
+
* `can_edit`, `can_raise` and each area's `grantable_level` say what you
|
|
5265
|
+
* may change.
|
|
5266
|
+
*/
|
|
5267
|
+
async getMemberPermissionOverrides(userId) {
|
|
5268
|
+
return this.request(
|
|
5269
|
+
"GET",
|
|
5270
|
+
`/user/employees/${encodeURIComponent(userId)}/permission-overrides`
|
|
5271
|
+
);
|
|
5272
|
+
}
|
|
5273
|
+
/**
|
|
5274
|
+
* Replace a member's permission overrides. An area left out goes back to
|
|
5275
|
+
* what their roles give. `PUT /user/employees/{user_id}/permission-overrides`
|
|
5276
|
+
*
|
|
5277
|
+
* Needs the *Users* write permission and a member within your reach, other
|
|
5278
|
+
* than yourself. Keeping or lowering is always allowed; a gain must stay
|
|
5279
|
+
* within what you hold in that area, and a gain above the member's roles
|
|
5280
|
+
* needs `can_raise`. The change is audited and applies to the member's next
|
|
5281
|
+
* request. A refusal is a `UR_68` whose `data` is
|
|
5282
|
+
* `{ reason: 'permission_overrides', refusal }` (see
|
|
5283
|
+
* {@link PermissionOverrideRefusal}).
|
|
5284
|
+
*/
|
|
5285
|
+
async updateMemberPermissionOverrides(userId, params) {
|
|
5286
|
+
return this.request(
|
|
5287
|
+
"PUT",
|
|
5288
|
+
`/user/employees/${encodeURIComponent(userId)}/permission-overrides`,
|
|
5289
|
+
{ body: params }
|
|
5290
|
+
);
|
|
5291
|
+
}
|
|
5292
|
+
/**
|
|
5293
|
+
* The permission overrides your own session acts under, sorted by area.
|
|
5294
|
+
* An area named here has exactly that level, whatever a broader legacy area
|
|
5295
|
+
* of the role would suggest. `GET /user/role/permission-overrides`
|
|
5296
|
+
*/
|
|
5297
|
+
async getOwnPermissionOverrides() {
|
|
5298
|
+
return this.request("GET", "/user/role/permission-overrides");
|
|
5299
|
+
}
|
|
5228
5300
|
/** Sign in via OIDC. `POST /user/oidc` */
|
|
5229
5301
|
async signInOidc(params) {
|
|
5230
5302
|
return this.request("POST", "/user/oidc", { body: params });
|
|
@@ -5419,6 +5491,150 @@ var Verification = class {
|
|
|
5419
5491
|
}
|
|
5420
5492
|
};
|
|
5421
5493
|
|
|
5494
|
+
// src/resources/identityVerifications.ts
|
|
5495
|
+
var IdentityVerifications = class {
|
|
5496
|
+
constructor(request) {
|
|
5497
|
+
this.request = request;
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Start a verification of a person or a business. The provider-side
|
|
5501
|
+
* workflow decides the checks. With a `return_url`, the provider's session
|
|
5502
|
+
* is created at once and its page returned in `verification_url`. With a
|
|
5503
|
+
* `payment_id` and no `return_url`, the payment's checkout starts it.
|
|
5504
|
+
*
|
|
5505
|
+
* `POST /identity-verifications`
|
|
5506
|
+
*/
|
|
5507
|
+
async create(params, options) {
|
|
5508
|
+
return this.request("POST", "/identity-verifications", { body: params, ...options });
|
|
5509
|
+
}
|
|
5510
|
+
/**
|
|
5511
|
+
* The merchant's verifications, newest first. A caller limited to one shop
|
|
5512
|
+
* sees that shop's only.
|
|
5513
|
+
*
|
|
5514
|
+
* `GET /identity-verifications`
|
|
5515
|
+
*/
|
|
5516
|
+
async list(query, options) {
|
|
5517
|
+
return this.request("GET", "/identity-verifications", {
|
|
5518
|
+
query,
|
|
5519
|
+
...options
|
|
5520
|
+
});
|
|
5521
|
+
}
|
|
5522
|
+
/**
|
|
5523
|
+
* One verification. With `force_sync: true`, a verification the provider
|
|
5524
|
+
* can still change (pending or in review, or a subject under ongoing AML
|
|
5525
|
+
* monitoring) is read from the provider first.
|
|
5526
|
+
*
|
|
5527
|
+
* `GET /identity-verifications/{verification_id}`
|
|
5528
|
+
*/
|
|
5529
|
+
async retrieve(verificationId, query, options) {
|
|
5530
|
+
return this.request("GET", `/identity-verifications/${encodeURIComponent(verificationId)}`, {
|
|
5531
|
+
query,
|
|
5532
|
+
...options
|
|
5533
|
+
});
|
|
5534
|
+
}
|
|
5535
|
+
/**
|
|
5536
|
+
* A subject's latest verification in one environment (live unless
|
|
5537
|
+
* `test_mode: true`), with its checks, and the subject's verification under
|
|
5538
|
+
* ongoing AML monitoring. This is what risk rules read. `verification` and
|
|
5539
|
+
* `aml_monitoring` are `null` when the subject has none.
|
|
5540
|
+
*
|
|
5541
|
+
* `GET /identity-verifications/subjects/{subject_reference}`
|
|
5542
|
+
*/
|
|
5543
|
+
async subject(subjectReference, query, options) {
|
|
5544
|
+
return this.request(
|
|
5545
|
+
"GET",
|
|
5546
|
+
`/identity-verifications/subjects/${encodeURIComponent(subjectReference)}`,
|
|
5547
|
+
{ query, ...options }
|
|
5548
|
+
);
|
|
5549
|
+
}
|
|
5550
|
+
/**
|
|
5551
|
+
* The provider-side workflows an account can run in one environment, read
|
|
5552
|
+
* from the provider with that environment's credentials. Pass a `flow_id`
|
|
5553
|
+
* as `provider_flow_id` to {@link IdentityVerifications.create}.
|
|
5554
|
+
*
|
|
5555
|
+
* `GET /identity-verifications/accounts/{merchant_connector_id}/flows`
|
|
5556
|
+
*/
|
|
5557
|
+
async flows(merchantConnectorId, query, options) {
|
|
5558
|
+
return this.request(
|
|
5559
|
+
"GET",
|
|
5560
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/flows`,
|
|
5561
|
+
{ query, ...options }
|
|
5562
|
+
);
|
|
5563
|
+
}
|
|
5564
|
+
/**
|
|
5565
|
+
* Switch ongoing AML monitoring of a verification's subject. The provider
|
|
5566
|
+
* then keeps re-screening the subject against sanctions, PEP and
|
|
5567
|
+
* adverse-media lists, and every change it reports is recorded. Only a
|
|
5568
|
+
* verified person or business can be enrolled; monitoring can be switched
|
|
5569
|
+
* off at any time. Needs permission to edit customers.
|
|
5570
|
+
*
|
|
5571
|
+
* `POST /identity-verifications/{verification_id}/aml-monitoring`
|
|
5572
|
+
*/
|
|
5573
|
+
async setAmlMonitoring(verificationId, params, options) {
|
|
5574
|
+
return this.request(
|
|
5575
|
+
"POST",
|
|
5576
|
+
`/identity-verifications/${encodeURIComponent(verificationId)}/aml-monitoring`,
|
|
5577
|
+
{ body: params, ...options }
|
|
5578
|
+
);
|
|
5579
|
+
}
|
|
5580
|
+
/**
|
|
5581
|
+
* Every change of the subject's AML result the provider reported while the
|
|
5582
|
+
* subject was monitored, newest first, at most 100.
|
|
5583
|
+
*
|
|
5584
|
+
* `GET /identity-verifications/{verification_id}/aml-events`
|
|
5585
|
+
*/
|
|
5586
|
+
async amlEvents(verificationId, options) {
|
|
5587
|
+
return this.request(
|
|
5588
|
+
"GET",
|
|
5589
|
+
`/identity-verifications/${encodeURIComponent(verificationId)}/aml-events`,
|
|
5590
|
+
options
|
|
5591
|
+
);
|
|
5592
|
+
}
|
|
5593
|
+
/**
|
|
5594
|
+
* A payment's screening by the transaction monitoring of the shop's
|
|
5595
|
+
* screening account. Recorded only: it never holds or refuses the payment.
|
|
5596
|
+
* Answers 404 when the payment has no screening. Needs permission to read
|
|
5597
|
+
* payments.
|
|
5598
|
+
*
|
|
5599
|
+
* `GET /identity-verifications/payment-screenings/{payment_id}`
|
|
5600
|
+
*/
|
|
5601
|
+
async paymentScreening(paymentId, options) {
|
|
5602
|
+
return this.request(
|
|
5603
|
+
"GET",
|
|
5604
|
+
`/identity-verifications/payment-screenings/${encodeURIComponent(paymentId)}`,
|
|
5605
|
+
options
|
|
5606
|
+
);
|
|
5607
|
+
}
|
|
5608
|
+
/**
|
|
5609
|
+
* Whether an account screens its shop's payments. Needs permission to read
|
|
5610
|
+
* connectors.
|
|
5611
|
+
*
|
|
5612
|
+
* `GET /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
|
|
5613
|
+
*/
|
|
5614
|
+
async paymentScreeningSetting(merchantConnectorId, options) {
|
|
5615
|
+
return this.request(
|
|
5616
|
+
"GET",
|
|
5617
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
|
|
5618
|
+
options
|
|
5619
|
+
);
|
|
5620
|
+
}
|
|
5621
|
+
/**
|
|
5622
|
+
* Switch screening of the account's shop's payments. Switched on, every
|
|
5623
|
+
* payment of the shop that succeeds from then on is screened shortly after,
|
|
5624
|
+
* in the payment's own environment. A shop has at most one screening
|
|
5625
|
+
* account. Needs permission to edit connectors.
|
|
5626
|
+
*
|
|
5627
|
+
* `PUT /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
|
|
5628
|
+
*/
|
|
5629
|
+
async updatePaymentScreeningSetting(merchantConnectorId, params, options) {
|
|
5630
|
+
return this.request(
|
|
5631
|
+
"PUT",
|
|
5632
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
|
|
5633
|
+
{ body: params, ...options }
|
|
5634
|
+
);
|
|
5635
|
+
}
|
|
5636
|
+
};
|
|
5637
|
+
|
|
5422
5638
|
// src/resources/webhooks.ts
|
|
5423
5639
|
function isSubscriptionLifecycleWebhook(object) {
|
|
5424
5640
|
return typeof object.transition_id === "string";
|
|
@@ -6155,6 +6371,110 @@ var ShopLabels = class {
|
|
|
6155
6371
|
}
|
|
6156
6372
|
};
|
|
6157
6373
|
|
|
6374
|
+
// src/resources/checkoutTemplates.ts
|
|
6375
|
+
var CheckoutTemplates = class {
|
|
6376
|
+
constructor(request) {
|
|
6377
|
+
this.request = request;
|
|
6378
|
+
}
|
|
6379
|
+
/**
|
|
6380
|
+
* The merchant's templates, each with the shops on it and whether each
|
|
6381
|
+
* runs the template's current settings.
|
|
6382
|
+
* `GET /checkout-templates/{merchantId}`
|
|
6383
|
+
*/
|
|
6384
|
+
async list(merchantId) {
|
|
6385
|
+
return this.request("GET", `/checkout-templates/${encodeURIComponent(merchantId)}`);
|
|
6386
|
+
}
|
|
6387
|
+
/**
|
|
6388
|
+
* Create a template, empty or copied from a shop's current settings. The
|
|
6389
|
+
* shop copied from is not changed.
|
|
6390
|
+
* `POST /checkout-templates/{merchantId}`
|
|
6391
|
+
*/
|
|
6392
|
+
async create(merchantId, params) {
|
|
6393
|
+
return this.request("POST", `/checkout-templates/${encodeURIComponent(merchantId)}`, {
|
|
6394
|
+
body: params
|
|
6395
|
+
});
|
|
6396
|
+
}
|
|
6397
|
+
/** `GET /checkout-templates/{merchantId}/{templateId}` */
|
|
6398
|
+
async retrieve(merchantId, templateId) {
|
|
6399
|
+
return this.request(
|
|
6400
|
+
"GET",
|
|
6401
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
6402
|
+
);
|
|
6403
|
+
}
|
|
6404
|
+
/**
|
|
6405
|
+
* Rename a template. A name another template of the merchant holds is
|
|
6406
|
+
* refused.
|
|
6407
|
+
* `POST /checkout-templates/{merchantId}/{templateId}`
|
|
6408
|
+
*/
|
|
6409
|
+
async rename(merchantId, templateId, params) {
|
|
6410
|
+
return this.request(
|
|
6411
|
+
"POST",
|
|
6412
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,
|
|
6413
|
+
{ body: params }
|
|
6414
|
+
);
|
|
6415
|
+
}
|
|
6416
|
+
/**
|
|
6417
|
+
* Delete a template. Refused while a shop is on it.
|
|
6418
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}`
|
|
6419
|
+
*/
|
|
6420
|
+
async delete(merchantId, templateId) {
|
|
6421
|
+
return this.request(
|
|
6422
|
+
"DELETE",
|
|
6423
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
6424
|
+
);
|
|
6425
|
+
}
|
|
6426
|
+
/**
|
|
6427
|
+
* Put shops on the template and copy its settings into them; a shop on
|
|
6428
|
+
* another template moves. Each shop is reported on its own: one with
|
|
6429
|
+
* `blockers` is left unchanged. `dry_run` changes nothing and reports what
|
|
6430
|
+
* would change.
|
|
6431
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/shops`
|
|
6432
|
+
*/
|
|
6433
|
+
async assign(merchantId, templateId, params) {
|
|
6434
|
+
return this.request(
|
|
6435
|
+
"POST",
|
|
6436
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,
|
|
6437
|
+
{
|
|
6438
|
+
body: params
|
|
6439
|
+
}
|
|
6440
|
+
);
|
|
6441
|
+
}
|
|
6442
|
+
/**
|
|
6443
|
+
* Take a shop off the template. It keeps every setting it has, as its own.
|
|
6444
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`
|
|
6445
|
+
*/
|
|
6446
|
+
async unassign(merchantId, templateId, profileId) {
|
|
6447
|
+
return this.request(
|
|
6448
|
+
"DELETE",
|
|
6449
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`
|
|
6450
|
+
);
|
|
6451
|
+
}
|
|
6452
|
+
/**
|
|
6453
|
+
* Copy the template's current settings into its shops, all or the ones
|
|
6454
|
+
* named.
|
|
6455
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/apply`
|
|
6456
|
+
*/
|
|
6457
|
+
async apply(merchantId, templateId, params = {}) {
|
|
6458
|
+
return this.request(
|
|
6459
|
+
"POST",
|
|
6460
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,
|
|
6461
|
+
{
|
|
6462
|
+
body: params
|
|
6463
|
+
}
|
|
6464
|
+
);
|
|
6465
|
+
}
|
|
6466
|
+
/**
|
|
6467
|
+
* The template a shop is on, if any. Readable by the shop's own members.
|
|
6468
|
+
* `GET /checkout-templates/{merchantId}/shops/{profileId}`
|
|
6469
|
+
*/
|
|
6470
|
+
async ofShop(merchantId, profileId) {
|
|
6471
|
+
return this.request(
|
|
6472
|
+
"GET",
|
|
6473
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`
|
|
6474
|
+
);
|
|
6475
|
+
}
|
|
6476
|
+
};
|
|
6477
|
+
|
|
6158
6478
|
// src/resources/buyerConversations.ts
|
|
6159
6479
|
var BuyerConversations = class {
|
|
6160
6480
|
constructor(request) {
|
|
@@ -7608,7 +7928,48 @@ var CheckoutMethods = class {
|
|
|
7608
7928
|
query: { merchant_id: merchantId }
|
|
7609
7929
|
});
|
|
7610
7930
|
}
|
|
7931
|
+
/**
|
|
7932
|
+
* The shop's checkout entries: separate ways into the hosted checkout of
|
|
7933
|
+
* one payment (`?entry=<key>`), such as a card form embedded in the shop's
|
|
7934
|
+
* page, a "Pay with crypto" checkout and an "Other payment methods"
|
|
7935
|
+
* checkout, each in its own named look. Live's by default; `environment:
|
|
7936
|
+
* 'test'` reads the Test checkout's, used by payments with `test_mode: true`.
|
|
7937
|
+
* Refused (403) to a caller that may not see or change every method.
|
|
7938
|
+
* `GET /checkout-methods/{profile_id}/entries` (`/test/entries`)
|
|
7939
|
+
*/
|
|
7940
|
+
async entries(merchantId, profileId, params = {}) {
|
|
7941
|
+
return this.request("GET", entriesPath(profileId, params.environment), {
|
|
7942
|
+
query: { merchant_id: merchantId }
|
|
7943
|
+
});
|
|
7944
|
+
}
|
|
7945
|
+
/**
|
|
7946
|
+
* Replace the shop's entries of one environment. Refused when a key is
|
|
7947
|
+
* malformed or used twice, when an entry lists a method, group or card form
|
|
7948
|
+
* that environment's layout does not place, or when a card entry's
|
|
7949
|
+
* `other_entry` is not another `methods` entry.
|
|
7950
|
+
* `PUT /checkout-methods/{profile_id}/entries` (`/test/entries`)
|
|
7951
|
+
*/
|
|
7952
|
+
async updateEntries(merchantId, profileId, body, params = {}) {
|
|
7953
|
+
return this.request("PUT", entriesPath(profileId, params.environment), {
|
|
7954
|
+
query: { merchant_id: merchantId },
|
|
7955
|
+
body
|
|
7956
|
+
});
|
|
7957
|
+
}
|
|
7958
|
+
/**
|
|
7959
|
+
* Delete every entry of one environment. A link that still names an entry
|
|
7960
|
+
* then offers nothing.
|
|
7961
|
+
* `DELETE /checkout-methods/{profile_id}/entries` (`/test/entries`)
|
|
7962
|
+
*/
|
|
7963
|
+
async clearEntries(merchantId, profileId, params = {}) {
|
|
7964
|
+
return this.request("DELETE", entriesPath(profileId, params.environment), {
|
|
7965
|
+
query: { merchant_id: merchantId }
|
|
7966
|
+
});
|
|
7967
|
+
}
|
|
7611
7968
|
};
|
|
7969
|
+
function entriesPath(profileId, environment) {
|
|
7970
|
+
const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;
|
|
7971
|
+
return environment === "test" ? `${shop}/test/entries` : `${shop}/entries`;
|
|
7972
|
+
}
|
|
7612
7973
|
|
|
7613
7974
|
// src/resources/subscriptions.ts
|
|
7614
7975
|
var Subscriptions = class {
|
|
@@ -9365,6 +9726,41 @@ var Live = class {
|
|
|
9365
9726
|
}
|
|
9366
9727
|
};
|
|
9367
9728
|
|
|
9729
|
+
// src/resources/deploymentBranding.ts
|
|
9730
|
+
function brandingAssetPath(asset, version) {
|
|
9731
|
+
const path = `/branding/assets/${encodeURIComponent(asset)}`;
|
|
9732
|
+
return version ? `${path}?v=${encodeURIComponent(version)}` : path;
|
|
9733
|
+
}
|
|
9734
|
+
var Branding = class {
|
|
9735
|
+
constructor(request, baseUrl) {
|
|
9736
|
+
this.request = request;
|
|
9737
|
+
this.baseUrl = baseUrl;
|
|
9738
|
+
}
|
|
9739
|
+
/**
|
|
9740
|
+
* The saved branding. A `null` field means "keep your own default".
|
|
9741
|
+
*
|
|
9742
|
+
* Branding is cosmetic, so treat any failure as "nothing saved": routers
|
|
9743
|
+
* from before this route answer 404, and a page must never wait long for
|
|
9744
|
+
* it. Pass a `signal` (e.g. `AbortSignal.timeout(2500)`) to bound the call
|
|
9745
|
+
* including its retries; a `timeout` alone applies to each attempt.
|
|
9746
|
+
*
|
|
9747
|
+
* `GET /branding`
|
|
9748
|
+
*/
|
|
9749
|
+
async retrieve(options) {
|
|
9750
|
+
return this.request("GET", "/branding", { ...options });
|
|
9751
|
+
}
|
|
9752
|
+
/**
|
|
9753
|
+
* The address of one branding image or font file on this client's base
|
|
9754
|
+
* URL, for an `<img src>` or a `@font-face` `src`. See
|
|
9755
|
+
* {@link brandingAssetPath}.
|
|
9756
|
+
*
|
|
9757
|
+
* `GET /branding/assets/{asset}`
|
|
9758
|
+
*/
|
|
9759
|
+
assetUrl(asset, version) {
|
|
9760
|
+
return `${this.baseUrl}${brandingAssetPath(asset, version)}`;
|
|
9761
|
+
}
|
|
9762
|
+
};
|
|
9763
|
+
|
|
9368
9764
|
// src/client.ts
|
|
9369
9765
|
var PRODUCTION_URL = "https://api.delopay.net";
|
|
9370
9766
|
var SANDBOX_URL = "https://sandbox.delopay.net";
|
|
@@ -9626,6 +10022,7 @@ var Delopay = class {
|
|
|
9626
10022
|
this.profileAcquirers = new ProfileAcquirers(request);
|
|
9627
10023
|
this.authentication = new Authentication(request);
|
|
9628
10024
|
this.verification = new Verification(request);
|
|
10025
|
+
this.identityVerifications = new IdentityVerifications(request);
|
|
9629
10026
|
this.users = new Users(request);
|
|
9630
10027
|
this.apiKeys = new ApiKeys(request);
|
|
9631
10028
|
this.billing = new Billing(request);
|
|
@@ -9643,6 +10040,7 @@ var Delopay = class {
|
|
|
9643
10040
|
this.messageTemplates = new MessageTemplates(request);
|
|
9644
10041
|
this.risk = new Risk(request);
|
|
9645
10042
|
this.live = new Live(request, openStream);
|
|
10043
|
+
this.branding = new Branding(request, this.baseUrl);
|
|
9646
10044
|
this.subscriptions = new Subscriptions(request);
|
|
9647
10045
|
this.buyerPortal = new BuyerPortal(request);
|
|
9648
10046
|
this.buyerAccount = new BuyerAccount(request);
|
|
@@ -9654,6 +10052,7 @@ var Delopay = class {
|
|
|
9654
10052
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
9655
10053
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
9656
10054
|
this.shopLabels = new ShopLabels(request);
|
|
10055
|
+
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
9657
10056
|
this.buyerConversations = new BuyerConversations(request);
|
|
9658
10057
|
this.buyerEvidence = new BuyerEvidenceReviews(request);
|
|
9659
10058
|
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
@@ -13487,6 +13886,10 @@ var CheckoutSession = class {
|
|
|
13487
13886
|
* `cardAccount` name that form's connector and account; absent or blank
|
|
13488
13887
|
* matches any.
|
|
13489
13888
|
*
|
|
13889
|
+
* `entry` opens one of the shop's checkout entries (`?entry=`): the layout
|
|
13890
|
+
* holds only that entry's methods and is drawn in its named look, and
|
|
13891
|
+
* `entry` on the answer says whether it had anything to offer.
|
|
13892
|
+
*
|
|
13490
13893
|
* `GET /payment-link/data/{merchantId}/{paymentId}`
|
|
13491
13894
|
*/
|
|
13492
13895
|
async fetchCheckoutData(params, options) {
|
|
@@ -13500,7 +13903,8 @@ var CheckoutSession = class {
|
|
|
13500
13903
|
country: country || void 0,
|
|
13501
13904
|
card_only: params?.cardOnly || void 0,
|
|
13502
13905
|
card_provider: params?.cardOnly ? params.cardProvider?.trim() || void 0 : void 0,
|
|
13503
|
-
card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0
|
|
13906
|
+
card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0,
|
|
13907
|
+
entry: params?.entry?.trim() || void 0
|
|
13504
13908
|
},
|
|
13505
13909
|
...options,
|
|
13506
13910
|
headers: {
|
|
@@ -13920,6 +14324,25 @@ var CheckoutSession = class {
|
|
|
13920
14324
|
headers: this.bearerHeaders(options?.headers)
|
|
13921
14325
|
});
|
|
13922
14326
|
}
|
|
14327
|
+
/**
|
|
14328
|
+
* Reserve this payment attempt before a hosted card form contacts Stripe,
|
|
14329
|
+
* Airwallex, or NomuPay. Send the provider object rendered to this checkout
|
|
14330
|
+
* and retain the same `flow_id` across retries and any 3-D Secure step.
|
|
14331
|
+
*
|
|
14332
|
+
* Only `authorized: true` permits the form to contact its processor. A
|
|
14333
|
+
* competing flow receives `false` and must reload; an unresolved provider
|
|
14334
|
+
* outcome stays reserved, regardless of elapsed time. A buyer-blocklist
|
|
14335
|
+
* refusal throws a `DelopayError` with code `DE_14`.
|
|
14336
|
+
*
|
|
14337
|
+
* `POST /payment-link/{merchantId}/{paymentId}/browser-card-claim`
|
|
14338
|
+
*/
|
|
14339
|
+
async claimBrowserCard(params, options) {
|
|
14340
|
+
return this.client.request("POST", `${this.linkBase}/browser-card-claim`, {
|
|
14341
|
+
body: params,
|
|
14342
|
+
...options,
|
|
14343
|
+
headers: this.bearerHeaders(options?.headers)
|
|
14344
|
+
});
|
|
14345
|
+
}
|
|
13923
14346
|
/**
|
|
13924
14347
|
* Confirm the Stripe card form's PaymentIntent through the router, for a
|
|
13925
14348
|
* checkout payload with `card_connector_server_confirm: true`. Stripe refuses
|
|
@@ -13941,6 +14364,10 @@ var CheckoutSession = class {
|
|
|
13941
14364
|
* and that secret confirms nothing without the secret key — then call this
|
|
13942
14365
|
* again without a payment method to finalize.
|
|
13943
14366
|
*
|
|
14367
|
+
* Reserve the attempt with {@link claimBrowserCard} first. Send its granted
|
|
14368
|
+
* `flow_id` as `browser_flow_id` on both the initial and post-action confirm;
|
|
14369
|
+
* an omitted, null or nonholder flow is refused with `400` and code `IR_16`.
|
|
14370
|
+
*
|
|
13944
14371
|
* A PaymentMethod rules out what `stripe.createPaymentMethod` cannot
|
|
13945
14372
|
* produce: Stripe names Amazon Pay and Klarna in the Express Checkout
|
|
13946
14373
|
* Element, which need `stripe.createConfirmationToken` instead. Neither can
|
|
@@ -13981,6 +14408,43 @@ var CheckoutSession = class {
|
|
|
13981
14408
|
headers: this.bearerHeaders(options?.headers)
|
|
13982
14409
|
});
|
|
13983
14410
|
}
|
|
14411
|
+
/**
|
|
14412
|
+
* The payment's identity verification step: whether the payment asked for
|
|
14413
|
+
* one, its outcome, and the provider's page while it is pending. A pending
|
|
14414
|
+
* verification is read from the provider first, so call this when the buyer
|
|
14415
|
+
* comes back from the provider's page.
|
|
14416
|
+
*
|
|
14417
|
+
* `required` is `false` when the payment asked for no verification.
|
|
14418
|
+
* `can_retry` is `true` after an expired or abandoned attempt; start a new
|
|
14419
|
+
* one with {@link CheckoutSession.startIdentityVerification}.
|
|
14420
|
+
*
|
|
14421
|
+
* `GET /payment-link/{merchantId}/{paymentId}/identity-verification`
|
|
14422
|
+
*/
|
|
14423
|
+
async identityVerification(options) {
|
|
14424
|
+
return this.client.request("GET", `${this.linkBase}/identity-verification`, {
|
|
14425
|
+
...options,
|
|
14426
|
+
headers: this.bearerHeaders(options?.headers)
|
|
14427
|
+
});
|
|
14428
|
+
}
|
|
14429
|
+
/**
|
|
14430
|
+
* Resume the payment's pending identity verification, start it, or start a
|
|
14431
|
+
* new attempt after an expired or abandoned one. Send the buyer to the
|
|
14432
|
+
* returned `verification_url`; the provider sends them back to `return_url`,
|
|
14433
|
+
* which must be on the payment's checkout origin.
|
|
14434
|
+
*
|
|
14435
|
+
* Refusals throw a `DelopayError`: `400` when the return URL is not on the
|
|
14436
|
+
* payment's checkout or the verification is already decided, `404` when the
|
|
14437
|
+
* payment asked for no verification.
|
|
14438
|
+
*
|
|
14439
|
+
* `POST /payment-link/{merchantId}/{paymentId}/identity-verification`
|
|
14440
|
+
*/
|
|
14441
|
+
async startIdentityVerification(params, options) {
|
|
14442
|
+
return this.client.request("POST", `${this.linkBase}/identity-verification`, {
|
|
14443
|
+
body: params,
|
|
14444
|
+
...options,
|
|
14445
|
+
headers: this.bearerHeaders(options?.headers)
|
|
14446
|
+
});
|
|
14447
|
+
}
|
|
13984
14448
|
/**
|
|
13985
14449
|
* Ask whether NomuPay's COPYandPAY widget may submit a card, from the
|
|
13986
14450
|
* form's pre-submit hook.
|
|
@@ -14703,6 +15167,20 @@ function focusedCheckoutUrl(params) {
|
|
|
14703
15167
|
if (params.customFieldsCollected) query.set("cf", "1");
|
|
14704
15168
|
return `${path}?${query.toString()}`;
|
|
14705
15169
|
}
|
|
15170
|
+
function checkoutEntryUrl(params) {
|
|
15171
|
+
const base = params.checkoutBaseUrl.replace(/\/+$/, "");
|
|
15172
|
+
const path = params.paymentLinkId && OPAQUE_PAYMENT_LINK_ID.test(params.paymentLinkId) ? `${base}/pay/${params.paymentLinkId}` : `${base}/pay/${encodeURIComponent(params.merchantId)}/${encodeURIComponent(
|
|
15173
|
+
params.paymentId
|
|
15174
|
+
)}`;
|
|
15175
|
+
const query = new URLSearchParams({ entry: params.entry.trim() });
|
|
15176
|
+
if (params.locale) query.set("locale", params.locale);
|
|
15177
|
+
return `${path}?${query.toString()}`;
|
|
15178
|
+
}
|
|
15179
|
+
function isCheckoutOpenEntryMessage(data) {
|
|
15180
|
+
if (typeof data !== "object" || data === null) return false;
|
|
15181
|
+
const message = data;
|
|
15182
|
+
return message.type === "open_entry" && typeof message.source === "string" && typeof message.payment_id === "string" && typeof message.entry === "string" && typeof message.url === "string";
|
|
15183
|
+
}
|
|
14706
15184
|
var CHECKOUT_EVENT_KINDS = [
|
|
14707
15185
|
"native_pane_selected",
|
|
14708
15186
|
"native_pane_tab_opened",
|
|
@@ -14753,6 +15231,7 @@ var encodeNativePanes = encodePanes;
|
|
|
14753
15231
|
BRANDING_EXPORT_FORMAT,
|
|
14754
15232
|
BRANDING_EXPORT_VERSION,
|
|
14755
15233
|
BUILTIN_PAYMENT_ICON_KEYS,
|
|
15234
|
+
Branding,
|
|
14756
15235
|
BuyerBlocklist,
|
|
14757
15236
|
BuyerConversations,
|
|
14758
15237
|
BuyerEvidenceReviews,
|
|
@@ -14774,6 +15253,7 @@ var encodeNativePanes = encodePanes;
|
|
|
14774
15253
|
CheckoutMethods,
|
|
14775
15254
|
CheckoutRecovery,
|
|
14776
15255
|
CheckoutSession,
|
|
15256
|
+
CheckoutTemplates,
|
|
14777
15257
|
CostRules,
|
|
14778
15258
|
DEFAULT_BADGES,
|
|
14779
15259
|
DEFAULT_BADGES_DARK,
|
|
@@ -14791,6 +15271,7 @@ var encodeNativePanes = encodePanes;
|
|
|
14791
15271
|
Forex,
|
|
14792
15272
|
GOOGLE_PAY_BUTTON_COLORS,
|
|
14793
15273
|
GOOGLE_PAY_BUTTON_TYPES,
|
|
15274
|
+
IdentityVerifications,
|
|
14794
15275
|
InvoiceSettingsResource,
|
|
14795
15276
|
Invoices,
|
|
14796
15277
|
LOCALIZABLE_COPY_FIELDS,
|
|
@@ -14874,6 +15355,7 @@ var encodeNativePanes = encodePanes;
|
|
|
14874
15355
|
anyOf,
|
|
14875
15356
|
applyBrandingVariables,
|
|
14876
15357
|
asAirwallexCardPreset,
|
|
15358
|
+
brandingAssetPath,
|
|
14877
15359
|
buildBrandingExport,
|
|
14878
15360
|
builtinPaymentIconDataUri,
|
|
14879
15361
|
builtinPaymentIconSvg,
|
|
@@ -14882,6 +15364,7 @@ var encodeNativePanes = encodePanes;
|
|
|
14882
15364
|
cardFieldFontPx,
|
|
14883
15365
|
cardFieldWeightValue,
|
|
14884
15366
|
checkoutCopy,
|
|
15367
|
+
checkoutEntryUrl,
|
|
14885
15368
|
checkoutLocaleDir,
|
|
14886
15369
|
cloneBranding,
|
|
14887
15370
|
cloneCustomField,
|
|
@@ -14928,6 +15411,7 @@ var encodeNativePanes = encodePanes;
|
|
|
14928
15411
|
fontWeightValue,
|
|
14929
15412
|
inputPadValue,
|
|
14930
15413
|
isCheckboxChecked,
|
|
15414
|
+
isCheckoutOpenEntryMessage,
|
|
14931
15415
|
isConfirmedChild,
|
|
14932
15416
|
isDarkSurface,
|
|
14933
15417
|
isDefaultBadgeSet,
|