@delopay/sdk 0.221.0 → 0.225.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-VOI3NAJB.js → chunk-KJFUYMWL.js} +94 -1
- package/dist/chunk-KJFUYMWL.js.map +1 -0
- package/dist/index.cjs +93 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +214 -8
- package/dist/index.d.ts +214 -8
- package/dist/index.js +1 -1
- package/dist/internal.cjs +170 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +296 -3
- package/dist/internal.d.ts +296 -3
- package/dist/internal.js +78 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -18
- package/dist/chunk-VOI3NAJB.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -4439,6 +4439,11 @@ var Users = class {
|
|
|
4439
4439
|
* parent-groups shape: `[{role_id, role_name, entity_type, role_scope,
|
|
4440
4440
|
* parent_groups: [{name, description, scopes}]}]`; without it, the
|
|
4441
4441
|
* deprecated flat `groups` shape.
|
|
4442
|
+
*
|
|
4443
|
+
* Each role carries `managed_centrally: true` when it is a shared role the
|
|
4444
|
+
* platform offers this merchant: it can be assigned, but `updateRole`,
|
|
4445
|
+
* `deleteRole` and `updateRoleConnectors` refuse it with `UR_71`
|
|
4446
|
+
* (`data.reason: 'managed_centrally'`).
|
|
4442
4447
|
*/
|
|
4443
4448
|
async listRoles(params) {
|
|
4444
4449
|
if (params === void 0) {
|
|
@@ -9485,6 +9490,10 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
9485
9490
|
nomupayApplePayButtonType: "pay",
|
|
9486
9491
|
nomupayGooglePayButtonColor: "auto",
|
|
9487
9492
|
nomupayGooglePayButtonType: "pay",
|
|
9493
|
+
micropaymentFieldChrome: "outlined",
|
|
9494
|
+
micropaymentFieldFontSize: "md",
|
|
9495
|
+
micropaymentFieldWeight: "regular",
|
|
9496
|
+
micropaymentFocusRing: "strong",
|
|
9488
9497
|
customCss: ""
|
|
9489
9498
|
};
|
|
9490
9499
|
var DEFAULT_BRANDING = {
|
|
@@ -10407,6 +10416,26 @@ function decodeBranding(source) {
|
|
|
10407
10416
|
CARD_FOCUS_RINGS,
|
|
10408
10417
|
DEFAULT_BRANDING.mollieFocusRing
|
|
10409
10418
|
),
|
|
10419
|
+
micropaymentFieldChrome: pickEnum(
|
|
10420
|
+
extras["micropaymentFieldChrome"],
|
|
10421
|
+
CARD_FIELD_CHROMES,
|
|
10422
|
+
DEFAULT_BRANDING.micropaymentFieldChrome
|
|
10423
|
+
),
|
|
10424
|
+
micropaymentFieldFontSize: pickEnum(
|
|
10425
|
+
extras["micropaymentFieldFontSize"],
|
|
10426
|
+
CARD_FIELD_FONT_SIZES,
|
|
10427
|
+
DEFAULT_BRANDING.micropaymentFieldFontSize
|
|
10428
|
+
),
|
|
10429
|
+
micropaymentFieldWeight: pickEnum(
|
|
10430
|
+
extras["micropaymentFieldWeight"],
|
|
10431
|
+
CARD_FIELD_WEIGHTS,
|
|
10432
|
+
DEFAULT_BRANDING.micropaymentFieldWeight
|
|
10433
|
+
),
|
|
10434
|
+
micropaymentFocusRing: pickEnum(
|
|
10435
|
+
extras["micropaymentFocusRing"],
|
|
10436
|
+
CARD_FOCUS_RINGS,
|
|
10437
|
+
DEFAULT_BRANDING.micropaymentFocusRing
|
|
10438
|
+
),
|
|
10410
10439
|
paypalValidTint: parseBool(extras["paypalValidTint"], DEFAULT_BRANDING.paypalValidTint),
|
|
10411
10440
|
nomupayFormStyle: pickEnum(
|
|
10412
10441
|
extras["nomupayFormStyle"],
|
|
@@ -10550,6 +10579,10 @@ function encodeBranding(branding, base) {
|
|
|
10550
10579
|
mollieFieldWeight: branding.mollieFieldWeight,
|
|
10551
10580
|
paypalFocusRing: branding.paypalFocusRing,
|
|
10552
10581
|
mollieFocusRing: branding.mollieFocusRing,
|
|
10582
|
+
micropaymentFieldChrome: branding.micropaymentFieldChrome,
|
|
10583
|
+
micropaymentFieldFontSize: branding.micropaymentFieldFontSize,
|
|
10584
|
+
micropaymentFieldWeight: branding.micropaymentFieldWeight,
|
|
10585
|
+
micropaymentFocusRing: branding.micropaymentFocusRing,
|
|
10553
10586
|
paypalValidTint: String(branding.paypalValidTint),
|
|
10554
10587
|
nomupayFormStyle: branding.nomupayFormStyle,
|
|
10555
10588
|
nomupayShowLabels: String(branding.nomupayShowLabels),
|
|
@@ -10937,6 +10970,26 @@ function parseImportedBranding(raw) {
|
|
|
10937
10970
|
CARD_FOCUS_RINGS,
|
|
10938
10971
|
dflt.mollieFocusRing
|
|
10939
10972
|
),
|
|
10973
|
+
micropaymentFieldChrome: pickEnum(
|
|
10974
|
+
root["micropaymentFieldChrome"],
|
|
10975
|
+
CARD_FIELD_CHROMES,
|
|
10976
|
+
dflt.micropaymentFieldChrome
|
|
10977
|
+
),
|
|
10978
|
+
micropaymentFieldFontSize: pickEnum(
|
|
10979
|
+
root["micropaymentFieldFontSize"],
|
|
10980
|
+
CARD_FIELD_FONT_SIZES,
|
|
10981
|
+
dflt.micropaymentFieldFontSize
|
|
10982
|
+
),
|
|
10983
|
+
micropaymentFieldWeight: pickEnum(
|
|
10984
|
+
root["micropaymentFieldWeight"],
|
|
10985
|
+
CARD_FIELD_WEIGHTS,
|
|
10986
|
+
dflt.micropaymentFieldWeight
|
|
10987
|
+
),
|
|
10988
|
+
micropaymentFocusRing: pickEnum(
|
|
10989
|
+
root["micropaymentFocusRing"],
|
|
10990
|
+
CARD_FOCUS_RINGS,
|
|
10991
|
+
dflt.micropaymentFocusRing
|
|
10992
|
+
),
|
|
10940
10993
|
paypalValidTint: parseBool(root["paypalValidTint"], dflt.paypalValidTint),
|
|
10941
10994
|
nomupayFormStyle: pickEnum(
|
|
10942
10995
|
root["nomupayFormStyle"],
|
|
@@ -11439,6 +11492,28 @@ var CheckoutSession = class {
|
|
|
11439
11492
|
headers: this.bearerHeaders(options?.headers)
|
|
11440
11493
|
});
|
|
11441
11494
|
}
|
|
11495
|
+
/**
|
|
11496
|
+
* Prepare MicroPayment transfer instructions or an unsigned SEPA mandate.
|
|
11497
|
+
* No debit is approved. Show the returned mandate disclosure before collecting
|
|
11498
|
+
* acceptance, then confirm with metadata.micropayment_preparation and, for
|
|
11499
|
+
* new SEPA mandates, explicit customer_acceptance. Every SEPA confirm must
|
|
11500
|
+
* acknowledge its amount/date notice with metadata.micropayment_prenotified.
|
|
11501
|
+
* Echo native_pane_merchant_connector_id and the returned
|
|
11502
|
+
* native_pane_quote_generation on confirm. Saved reuse sends
|
|
11503
|
+
* recurring_details: { type: 'payment_method_id', data: payment_method_id }
|
|
11504
|
+
* with payment_method: 'bank_debit', payment_method_type: 'sepa' and no raw
|
|
11505
|
+
* bank data. Only saved off-session preparation may omit quote_generation.
|
|
11506
|
+
* Transfer instructions become available only after canonical confirmation.
|
|
11507
|
+
*
|
|
11508
|
+
* `POST /payment-link/{merchantId}/{paymentId}/micropayment/bank-session`
|
|
11509
|
+
*/
|
|
11510
|
+
async micropaymentBankSession(params, options) {
|
|
11511
|
+
return this.client.request("POST", `${this.linkBase}/micropayment/bank-session`, {
|
|
11512
|
+
...options,
|
|
11513
|
+
body: params,
|
|
11514
|
+
headers: this.bearerHeaders(options?.headers)
|
|
11515
|
+
});
|
|
11516
|
+
}
|
|
11442
11517
|
/**
|
|
11443
11518
|
* A short-lived VGS Collect session for browser-side card capture.
|
|
11444
11519
|
*
|
|
@@ -11462,6 +11537,24 @@ var CheckoutSession = class {
|
|
|
11462
11537
|
headers: this.bearerHeaders(options?.headers)
|
|
11463
11538
|
});
|
|
11464
11539
|
}
|
|
11540
|
+
/**
|
|
11541
|
+
* Mint the security-code form for a saved card, on a shop whose vault keeps
|
|
11542
|
+
* the code itself (Enigma Vault). The buyer re-enters the code into the
|
|
11543
|
+
* vault's own form, so it never reaches the checkout; confirm with the saved
|
|
11544
|
+
* card's `payment_token` once the form reports it stored.
|
|
11545
|
+
*
|
|
11546
|
+
* `paymentToken` is the saved card's token from the payment-method list. A
|
|
11547
|
+
* VGS shop answers `400`: VGS re-collects the code with Collect.
|
|
11548
|
+
*
|
|
11549
|
+
* `GET /payment-link/{merchantId}/{paymentId}/vault/security-code-session`
|
|
11550
|
+
*/
|
|
11551
|
+
async vaultSecurityCodeSession(paymentToken, options) {
|
|
11552
|
+
return this.client.request("GET", `${this.linkBase}/vault/security-code-session`, {
|
|
11553
|
+
...options,
|
|
11554
|
+
query: { payment_token: paymentToken },
|
|
11555
|
+
headers: this.bearerHeaders(options?.headers)
|
|
11556
|
+
});
|
|
11557
|
+
}
|
|
11465
11558
|
/**
|
|
11466
11559
|
* Register the aliased card as a payment method and mint the one-shot
|
|
11467
11560
|
* `payment_token` the confirm call spends.
|
|
@@ -12134,6 +12227,83 @@ var AdminPortal = class {
|
|
|
12134
12227
|
}
|
|
12135
12228
|
);
|
|
12136
12229
|
}
|
|
12230
|
+
/**
|
|
12231
|
+
* The deployment's merchant roles: shared roles, the roles defined in code,
|
|
12232
|
+
* and every merchant's own custom roles. `GET /admin-portal/merchant-roles`
|
|
12233
|
+
*/
|
|
12234
|
+
async listSharedRoles() {
|
|
12235
|
+
return this.request("GET", "/admin-portal/merchant-roles");
|
|
12236
|
+
}
|
|
12237
|
+
/** `GET /admin-portal/merchant-roles/{roleId}` */
|
|
12238
|
+
async getSharedRole(roleId) {
|
|
12239
|
+
return this.request("GET", `/admin-portal/merchant-roles/${encodeURIComponent(roleId)}`);
|
|
12240
|
+
}
|
|
12241
|
+
/**
|
|
12242
|
+
* Define a role once and offer it to every merchant, or to the ones listed.
|
|
12243
|
+
* Offering never assigns it. `POST /admin-portal/merchant-roles`
|
|
12244
|
+
*/
|
|
12245
|
+
async createSharedRole(body) {
|
|
12246
|
+
return this.request("POST", "/admin-portal/merchant-roles", { body });
|
|
12247
|
+
}
|
|
12248
|
+
/**
|
|
12249
|
+
* What a change would do, without writing anything. Apply it with
|
|
12250
|
+
* `updateSharedRole` and the `version` this returns.
|
|
12251
|
+
* `POST /admin-portal/merchant-roles/{roleId}/preview`
|
|
12252
|
+
*/
|
|
12253
|
+
async previewSharedRole(roleId, change) {
|
|
12254
|
+
return this.request(
|
|
12255
|
+
"POST",
|
|
12256
|
+
`/admin-portal/merchant-roles/${encodeURIComponent(roleId)}/preview`,
|
|
12257
|
+
{ body: change }
|
|
12258
|
+
);
|
|
12259
|
+
}
|
|
12260
|
+
/**
|
|
12261
|
+
* Apply a reviewed change. A change that takes access away needs
|
|
12262
|
+
* `acknowledge_sign_out` and signs out every holder.
|
|
12263
|
+
* `PUT /admin-portal/merchant-roles/{roleId}`
|
|
12264
|
+
*/
|
|
12265
|
+
async updateSharedRole(roleId, body) {
|
|
12266
|
+
return this.request("PUT", `/admin-portal/merchant-roles/${encodeURIComponent(roleId)}`, {
|
|
12267
|
+
body
|
|
12268
|
+
});
|
|
12269
|
+
}
|
|
12270
|
+
/** `POST /admin-portal/merchant-roles/{roleId}/retire/preview` */
|
|
12271
|
+
async previewRetireSharedRole(roleId, body = {}) {
|
|
12272
|
+
return this.request(
|
|
12273
|
+
"POST",
|
|
12274
|
+
`/admin-portal/merchant-roles/${encodeURIComponent(roleId)}/retire/preview`,
|
|
12275
|
+
{ body }
|
|
12276
|
+
);
|
|
12277
|
+
}
|
|
12278
|
+
/**
|
|
12279
|
+
* Retire a shared role, moving its holders to the replacement.
|
|
12280
|
+
* `POST /admin-portal/merchant-roles/{roleId}/retire`
|
|
12281
|
+
*/
|
|
12282
|
+
async retireSharedRole(roleId, body) {
|
|
12283
|
+
return this.request(
|
|
12284
|
+
"POST",
|
|
12285
|
+
`/admin-portal/merchant-roles/${encodeURIComponent(roleId)}/retire`,
|
|
12286
|
+
{ body }
|
|
12287
|
+
);
|
|
12288
|
+
}
|
|
12289
|
+
/**
|
|
12290
|
+
* Merchant-specific roles whose holders could move to this shared role, and
|
|
12291
|
+
* what each move would change. `GET /admin-portal/merchant-roles/{roleId}/consolidation`
|
|
12292
|
+
*/
|
|
12293
|
+
async sharedRoleConsolidationCandidates(roleId) {
|
|
12294
|
+
return this.request(
|
|
12295
|
+
"GET",
|
|
12296
|
+
`/admin-portal/merchant-roles/${encodeURIComponent(roleId)}/consolidation`
|
|
12297
|
+
);
|
|
12298
|
+
}
|
|
12299
|
+
/** `POST /admin-portal/merchant-roles/{roleId}/consolidate` */
|
|
12300
|
+
async consolidateIntoSharedRole(roleId, body) {
|
|
12301
|
+
return this.request(
|
|
12302
|
+
"POST",
|
|
12303
|
+
`/admin-portal/merchant-roles/${encodeURIComponent(roleId)}/consolidate`,
|
|
12304
|
+
{ body }
|
|
12305
|
+
);
|
|
12306
|
+
}
|
|
12137
12307
|
async listCustomers(params) {
|
|
12138
12308
|
return this.request("GET", "/admin-portal/customers", {
|
|
12139
12309
|
query: params
|