@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/internal.cjs CHANGED
@@ -36,6 +36,7 @@ __export(internal_exports, {
36
36
  APPLE_PAY_BUTTON_STYLES: () => APPLE_PAY_BUTTON_STYLES,
37
37
  APPLE_PAY_BUTTON_TYPES: () => APPLE_PAY_BUTTON_TYPES,
38
38
  Admin: () => Admin,
39
+ AdminBranding: () => AdminBranding,
39
40
  AdminLive: () => AdminLive,
40
41
  AdminPortal: () => AdminPortal,
41
42
  Analytics: () => Analytics,
@@ -46,6 +47,7 @@ __export(internal_exports, {
46
47
  BRANDING_EXPORT_FORMAT: () => BRANDING_EXPORT_FORMAT,
47
48
  BRANDING_EXPORT_VERSION: () => BRANDING_EXPORT_VERSION,
48
49
  BUILTIN_PAYMENT_ICON_KEYS: () => BUILTIN_PAYMENT_ICON_KEYS,
50
+ Branding: () => Branding,
49
51
  BuyerBlocklist: () => BuyerBlocklist,
50
52
  BuyerConversations: () => BuyerConversations,
51
53
  BuyerEvidenceReviews: () => BuyerEvidenceReviews,
@@ -69,6 +71,7 @@ __export(internal_exports, {
69
71
  CheckoutMethods: () => CheckoutMethods,
70
72
  CheckoutRecovery: () => CheckoutRecovery,
71
73
  CheckoutSession: () => CheckoutSession,
74
+ CheckoutTemplates: () => CheckoutTemplates,
72
75
  Configs: () => Configs,
73
76
  ConnectorRestrictionRules: () => ConnectorRestrictionRules,
74
77
  ConnectorRestrictions: () => ConnectorRestrictions,
@@ -92,6 +95,7 @@ __export(internal_exports, {
92
95
  GOOGLE_PAY_BUTTON_COLORS: () => GOOGLE_PAY_BUTTON_COLORS,
93
96
  GOOGLE_PAY_BUTTON_TYPES: () => GOOGLE_PAY_BUTTON_TYPES,
94
97
  Gsm: () => Gsm,
98
+ IdentityVerifications: () => IdentityVerifications,
95
99
  InvoiceSettingsResource: () => InvoiceSettingsResource,
96
100
  Invoices: () => Invoices,
97
101
  LOCALIZABLE_COPY_FIELDS: () => LOCALIZABLE_COPY_FIELDS,
@@ -180,6 +184,7 @@ __export(internal_exports, {
180
184
  anyOf: () => anyOf,
181
185
  applyBrandingVariables: () => applyBrandingVariables,
182
186
  asAirwallexCardPreset: () => asAirwallexCardPreset,
187
+ brandingAssetPath: () => brandingAssetPath,
183
188
  buildBrandingExport: () => buildBrandingExport,
184
189
  builtinPaymentIconDataUri: () => builtinPaymentIconDataUri,
185
190
  builtinPaymentIconSvg: () => builtinPaymentIconSvg,
@@ -188,6 +193,7 @@ __export(internal_exports, {
188
193
  cardFieldFontPx: () => cardFieldFontPx,
189
194
  cardFieldWeightValue: () => cardFieldWeightValue,
190
195
  checkoutCopy: () => checkoutCopy,
196
+ checkoutEntryUrl: () => checkoutEntryUrl,
191
197
  checkoutLocaleDir: () => checkoutLocaleDir,
192
198
  cloneBranding: () => cloneBranding,
193
199
  cloneCustomField: () => cloneCustomField,
@@ -234,6 +240,7 @@ __export(internal_exports, {
234
240
  fontWeightValue: () => fontWeightValue,
235
241
  inputPadValue: () => inputPadValue,
236
242
  isCheckboxChecked: () => isCheckboxChecked,
243
+ isCheckoutOpenEntryMessage: () => isCheckoutOpenEntryMessage,
237
244
  isConfirmedChild: () => isConfirmedChild,
238
245
  isDarkSurface: () => isDarkSurface,
239
246
  isDefaultBadgeSet: () => isDefaultBadgeSet,
@@ -3079,6 +3086,29 @@ var Payments = class {
3079
3086
  body: params ?? {}
3080
3087
  });
3081
3088
  }
3089
+ /**
3090
+ * Mark a payment as an integration test, or remove the mark.
3091
+ *
3092
+ * A marked payment stays live or test as it was; only analytics leave it
3093
+ * out, from their next refresh on. Every change is recorded in the
3094
+ * payment's status history with the person who made it. Needs a dashboard
3095
+ * JWT with write access to transactions. Asking for the mark the payment
3096
+ * already carries changes nothing (`changed: false`).
3097
+ *
3098
+ * `POST /payments/{paymentId}/integration-test`
3099
+ *
3100
+ * @example
3101
+ * ```typescript
3102
+ * const { is_integration_test } = await delopay.payments.setIntegrationTest('pay_123', {
3103
+ * is_integration_test: true,
3104
+ * });
3105
+ * ```
3106
+ */
3107
+ async setIntegrationTest(paymentId, params) {
3108
+ return this.request("POST", `/payments/${encodeURIComponent(paymentId)}/integration-test`, {
3109
+ body: params
3110
+ });
3111
+ }
3082
3112
  /**
3083
3113
  * List payment intents, optionally filtered by customer or date range.
3084
3114
  *
@@ -5242,6 +5272,49 @@ var Users = class {
5242
5272
  body: params
5243
5273
  });
5244
5274
  }
5275
+ /**
5276
+ * A member's permission overrides in your merchant: every area that can be
5277
+ * overridden at their level, with what their roles give, the level set for
5278
+ * them, and what they have. `GET /user/employees/{user_id}/permission-overrides`
5279
+ *
5280
+ * Needs the *Users* read permission, and answers only for a member
5281
+ * `listUsersInLineage` shows you (any other id is a 404 `UR_68`).
5282
+ * `can_edit`, `can_raise` and each area's `grantable_level` say what you
5283
+ * may change.
5284
+ */
5285
+ async getMemberPermissionOverrides(userId) {
5286
+ return this.request(
5287
+ "GET",
5288
+ `/user/employees/${encodeURIComponent(userId)}/permission-overrides`
5289
+ );
5290
+ }
5291
+ /**
5292
+ * Replace a member's permission overrides. An area left out goes back to
5293
+ * what their roles give. `PUT /user/employees/{user_id}/permission-overrides`
5294
+ *
5295
+ * Needs the *Users* write permission and a member within your reach, other
5296
+ * than yourself. Keeping or lowering is always allowed; a gain must stay
5297
+ * within what you hold in that area, and a gain above the member's roles
5298
+ * needs `can_raise`. The change is audited and applies to the member's next
5299
+ * request. A refusal is a `UR_68` whose `data` is
5300
+ * `{ reason: 'permission_overrides', refusal }` (see
5301
+ * {@link PermissionOverrideRefusal}).
5302
+ */
5303
+ async updateMemberPermissionOverrides(userId, params) {
5304
+ return this.request(
5305
+ "PUT",
5306
+ `/user/employees/${encodeURIComponent(userId)}/permission-overrides`,
5307
+ { body: params }
5308
+ );
5309
+ }
5310
+ /**
5311
+ * The permission overrides your own session acts under, sorted by area.
5312
+ * An area named here has exactly that level, whatever a broader legacy area
5313
+ * of the role would suggest. `GET /user/role/permission-overrides`
5314
+ */
5315
+ async getOwnPermissionOverrides() {
5316
+ return this.request("GET", "/user/role/permission-overrides");
5317
+ }
5245
5318
  /** Sign in via OIDC. `POST /user/oidc` */
5246
5319
  async signInOidc(params) {
5247
5320
  return this.request("POST", "/user/oidc", { body: params });
@@ -5436,6 +5509,150 @@ var Verification = class {
5436
5509
  }
5437
5510
  };
5438
5511
 
5512
+ // src/resources/identityVerifications.ts
5513
+ var IdentityVerifications = class {
5514
+ constructor(request) {
5515
+ this.request = request;
5516
+ }
5517
+ /**
5518
+ * Start a verification of a person or a business. The provider-side
5519
+ * workflow decides the checks. With a `return_url`, the provider's session
5520
+ * is created at once and its page returned in `verification_url`. With a
5521
+ * `payment_id` and no `return_url`, the payment's checkout starts it.
5522
+ *
5523
+ * `POST /identity-verifications`
5524
+ */
5525
+ async create(params, options) {
5526
+ return this.request("POST", "/identity-verifications", { body: params, ...options });
5527
+ }
5528
+ /**
5529
+ * The merchant's verifications, newest first. A caller limited to one shop
5530
+ * sees that shop's only.
5531
+ *
5532
+ * `GET /identity-verifications`
5533
+ */
5534
+ async list(query, options) {
5535
+ return this.request("GET", "/identity-verifications", {
5536
+ query,
5537
+ ...options
5538
+ });
5539
+ }
5540
+ /**
5541
+ * One verification. With `force_sync: true`, a verification the provider
5542
+ * can still change (pending or in review, or a subject under ongoing AML
5543
+ * monitoring) is read from the provider first.
5544
+ *
5545
+ * `GET /identity-verifications/{verification_id}`
5546
+ */
5547
+ async retrieve(verificationId, query, options) {
5548
+ return this.request("GET", `/identity-verifications/${encodeURIComponent(verificationId)}`, {
5549
+ query,
5550
+ ...options
5551
+ });
5552
+ }
5553
+ /**
5554
+ * A subject's latest verification in one environment (live unless
5555
+ * `test_mode: true`), with its checks, and the subject's verification under
5556
+ * ongoing AML monitoring. This is what risk rules read. `verification` and
5557
+ * `aml_monitoring` are `null` when the subject has none.
5558
+ *
5559
+ * `GET /identity-verifications/subjects/{subject_reference}`
5560
+ */
5561
+ async subject(subjectReference, query, options) {
5562
+ return this.request(
5563
+ "GET",
5564
+ `/identity-verifications/subjects/${encodeURIComponent(subjectReference)}`,
5565
+ { query, ...options }
5566
+ );
5567
+ }
5568
+ /**
5569
+ * The provider-side workflows an account can run in one environment, read
5570
+ * from the provider with that environment's credentials. Pass a `flow_id`
5571
+ * as `provider_flow_id` to {@link IdentityVerifications.create}.
5572
+ *
5573
+ * `GET /identity-verifications/accounts/{merchant_connector_id}/flows`
5574
+ */
5575
+ async flows(merchantConnectorId, query, options) {
5576
+ return this.request(
5577
+ "GET",
5578
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/flows`,
5579
+ { query, ...options }
5580
+ );
5581
+ }
5582
+ /**
5583
+ * Switch ongoing AML monitoring of a verification's subject. The provider
5584
+ * then keeps re-screening the subject against sanctions, PEP and
5585
+ * adverse-media lists, and every change it reports is recorded. Only a
5586
+ * verified person or business can be enrolled; monitoring can be switched
5587
+ * off at any time. Needs permission to edit customers.
5588
+ *
5589
+ * `POST /identity-verifications/{verification_id}/aml-monitoring`
5590
+ */
5591
+ async setAmlMonitoring(verificationId, params, options) {
5592
+ return this.request(
5593
+ "POST",
5594
+ `/identity-verifications/${encodeURIComponent(verificationId)}/aml-monitoring`,
5595
+ { body: params, ...options }
5596
+ );
5597
+ }
5598
+ /**
5599
+ * Every change of the subject's AML result the provider reported while the
5600
+ * subject was monitored, newest first, at most 100.
5601
+ *
5602
+ * `GET /identity-verifications/{verification_id}/aml-events`
5603
+ */
5604
+ async amlEvents(verificationId, options) {
5605
+ return this.request(
5606
+ "GET",
5607
+ `/identity-verifications/${encodeURIComponent(verificationId)}/aml-events`,
5608
+ options
5609
+ );
5610
+ }
5611
+ /**
5612
+ * A payment's screening by the transaction monitoring of the shop's
5613
+ * screening account. Recorded only: it never holds or refuses the payment.
5614
+ * Answers 404 when the payment has no screening. Needs permission to read
5615
+ * payments.
5616
+ *
5617
+ * `GET /identity-verifications/payment-screenings/{payment_id}`
5618
+ */
5619
+ async paymentScreening(paymentId, options) {
5620
+ return this.request(
5621
+ "GET",
5622
+ `/identity-verifications/payment-screenings/${encodeURIComponent(paymentId)}`,
5623
+ options
5624
+ );
5625
+ }
5626
+ /**
5627
+ * Whether an account screens its shop's payments. Needs permission to read
5628
+ * connectors.
5629
+ *
5630
+ * `GET /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
5631
+ */
5632
+ async paymentScreeningSetting(merchantConnectorId, options) {
5633
+ return this.request(
5634
+ "GET",
5635
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
5636
+ options
5637
+ );
5638
+ }
5639
+ /**
5640
+ * Switch screening of the account's shop's payments. Switched on, every
5641
+ * payment of the shop that succeeds from then on is screened shortly after,
5642
+ * in the payment's own environment. A shop has at most one screening
5643
+ * account. Needs permission to edit connectors.
5644
+ *
5645
+ * `PUT /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
5646
+ */
5647
+ async updatePaymentScreeningSetting(merchantConnectorId, params, options) {
5648
+ return this.request(
5649
+ "PUT",
5650
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
5651
+ { body: params, ...options }
5652
+ );
5653
+ }
5654
+ };
5655
+
5439
5656
  // src/resources/webhooks.ts
5440
5657
  function isSubscriptionLifecycleWebhook(object) {
5441
5658
  return typeof object.transition_id === "string";
@@ -6172,6 +6389,110 @@ var ShopLabels = class {
6172
6389
  }
6173
6390
  };
6174
6391
 
6392
+ // src/resources/checkoutTemplates.ts
6393
+ var CheckoutTemplates = class {
6394
+ constructor(request) {
6395
+ this.request = request;
6396
+ }
6397
+ /**
6398
+ * The merchant's templates, each with the shops on it and whether each
6399
+ * runs the template's current settings.
6400
+ * `GET /checkout-templates/{merchantId}`
6401
+ */
6402
+ async list(merchantId) {
6403
+ return this.request("GET", `/checkout-templates/${encodeURIComponent(merchantId)}`);
6404
+ }
6405
+ /**
6406
+ * Create a template, empty or copied from a shop's current settings. The
6407
+ * shop copied from is not changed.
6408
+ * `POST /checkout-templates/{merchantId}`
6409
+ */
6410
+ async create(merchantId, params) {
6411
+ return this.request("POST", `/checkout-templates/${encodeURIComponent(merchantId)}`, {
6412
+ body: params
6413
+ });
6414
+ }
6415
+ /** `GET /checkout-templates/{merchantId}/{templateId}` */
6416
+ async retrieve(merchantId, templateId) {
6417
+ return this.request(
6418
+ "GET",
6419
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
6420
+ );
6421
+ }
6422
+ /**
6423
+ * Rename a template. A name another template of the merchant holds is
6424
+ * refused.
6425
+ * `POST /checkout-templates/{merchantId}/{templateId}`
6426
+ */
6427
+ async rename(merchantId, templateId, params) {
6428
+ return this.request(
6429
+ "POST",
6430
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,
6431
+ { body: params }
6432
+ );
6433
+ }
6434
+ /**
6435
+ * Delete a template. Refused while a shop is on it.
6436
+ * `DELETE /checkout-templates/{merchantId}/{templateId}`
6437
+ */
6438
+ async delete(merchantId, templateId) {
6439
+ return this.request(
6440
+ "DELETE",
6441
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
6442
+ );
6443
+ }
6444
+ /**
6445
+ * Put shops on the template and copy its settings into them; a shop on
6446
+ * another template moves. Each shop is reported on its own: one with
6447
+ * `blockers` is left unchanged. `dry_run` changes nothing and reports what
6448
+ * would change.
6449
+ * `POST /checkout-templates/{merchantId}/{templateId}/shops`
6450
+ */
6451
+ async assign(merchantId, templateId, params) {
6452
+ return this.request(
6453
+ "POST",
6454
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,
6455
+ {
6456
+ body: params
6457
+ }
6458
+ );
6459
+ }
6460
+ /**
6461
+ * Take a shop off the template. It keeps every setting it has, as its own.
6462
+ * `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`
6463
+ */
6464
+ async unassign(merchantId, templateId, profileId) {
6465
+ return this.request(
6466
+ "DELETE",
6467
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`
6468
+ );
6469
+ }
6470
+ /**
6471
+ * Copy the template's current settings into its shops, all or the ones
6472
+ * named.
6473
+ * `POST /checkout-templates/{merchantId}/{templateId}/apply`
6474
+ */
6475
+ async apply(merchantId, templateId, params = {}) {
6476
+ return this.request(
6477
+ "POST",
6478
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,
6479
+ {
6480
+ body: params
6481
+ }
6482
+ );
6483
+ }
6484
+ /**
6485
+ * The template a shop is on, if any. Readable by the shop's own members.
6486
+ * `GET /checkout-templates/{merchantId}/shops/{profileId}`
6487
+ */
6488
+ async ofShop(merchantId, profileId) {
6489
+ return this.request(
6490
+ "GET",
6491
+ `/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`
6492
+ );
6493
+ }
6494
+ };
6495
+
6175
6496
  // src/resources/buyerConversations.ts
6176
6497
  var BuyerConversations = class {
6177
6498
  constructor(request) {
@@ -7625,7 +7946,48 @@ var CheckoutMethods = class {
7625
7946
  query: { merchant_id: merchantId }
7626
7947
  });
7627
7948
  }
7949
+ /**
7950
+ * The shop's checkout entries: separate ways into the hosted checkout of
7951
+ * one payment (`?entry=<key>`), such as a card form embedded in the shop's
7952
+ * page, a "Pay with crypto" checkout and an "Other payment methods"
7953
+ * checkout, each in its own named look. Live's by default; `environment:
7954
+ * 'test'` reads the Test checkout's, used by payments with `test_mode: true`.
7955
+ * Refused (403) to a caller that may not see or change every method.
7956
+ * `GET /checkout-methods/{profile_id}/entries` (`/test/entries`)
7957
+ */
7958
+ async entries(merchantId, profileId, params = {}) {
7959
+ return this.request("GET", entriesPath(profileId, params.environment), {
7960
+ query: { merchant_id: merchantId }
7961
+ });
7962
+ }
7963
+ /**
7964
+ * Replace the shop's entries of one environment. Refused when a key is
7965
+ * malformed or used twice, when an entry lists a method, group or card form
7966
+ * that environment's layout does not place, or when a card entry's
7967
+ * `other_entry` is not another `methods` entry.
7968
+ * `PUT /checkout-methods/{profile_id}/entries` (`/test/entries`)
7969
+ */
7970
+ async updateEntries(merchantId, profileId, body, params = {}) {
7971
+ return this.request("PUT", entriesPath(profileId, params.environment), {
7972
+ query: { merchant_id: merchantId },
7973
+ body
7974
+ });
7975
+ }
7976
+ /**
7977
+ * Delete every entry of one environment. A link that still names an entry
7978
+ * then offers nothing.
7979
+ * `DELETE /checkout-methods/{profile_id}/entries` (`/test/entries`)
7980
+ */
7981
+ async clearEntries(merchantId, profileId, params = {}) {
7982
+ return this.request("DELETE", entriesPath(profileId, params.environment), {
7983
+ query: { merchant_id: merchantId }
7984
+ });
7985
+ }
7628
7986
  };
7987
+ function entriesPath(profileId, environment) {
7988
+ const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;
7989
+ return environment === "test" ? `${shop}/test/entries` : `${shop}/entries`;
7990
+ }
7629
7991
 
7630
7992
  // src/resources/subscriptions.ts
7631
7993
  var Subscriptions = class {
@@ -9382,6 +9744,41 @@ var Live = class {
9382
9744
  }
9383
9745
  };
9384
9746
 
9747
+ // src/resources/deploymentBranding.ts
9748
+ function brandingAssetPath(asset, version) {
9749
+ const path = `/branding/assets/${encodeURIComponent(asset)}`;
9750
+ return version ? `${path}?v=${encodeURIComponent(version)}` : path;
9751
+ }
9752
+ var Branding = class {
9753
+ constructor(request, baseUrl) {
9754
+ this.request = request;
9755
+ this.baseUrl = baseUrl;
9756
+ }
9757
+ /**
9758
+ * The saved branding. A `null` field means "keep your own default".
9759
+ *
9760
+ * Branding is cosmetic, so treat any failure as "nothing saved": routers
9761
+ * from before this route answer 404, and a page must never wait long for
9762
+ * it. Pass a `signal` (e.g. `AbortSignal.timeout(2500)`) to bound the call
9763
+ * including its retries; a `timeout` alone applies to each attempt.
9764
+ *
9765
+ * `GET /branding`
9766
+ */
9767
+ async retrieve(options) {
9768
+ return this.request("GET", "/branding", { ...options });
9769
+ }
9770
+ /**
9771
+ * The address of one branding image or font file on this client's base
9772
+ * URL, for an `<img src>` or a `@font-face` `src`. See
9773
+ * {@link brandingAssetPath}.
9774
+ *
9775
+ * `GET /branding/assets/{asset}`
9776
+ */
9777
+ assetUrl(asset, version) {
9778
+ return `${this.baseUrl}${brandingAssetPath(asset, version)}`;
9779
+ }
9780
+ };
9781
+
9385
9782
  // src/client.ts
9386
9783
  var PRODUCTION_URL = "https://api.delopay.net";
9387
9784
  var SANDBOX_URL = "https://sandbox.delopay.net";
@@ -9643,6 +10040,7 @@ var Delopay = class {
9643
10040
  this.profileAcquirers = new ProfileAcquirers(request);
9644
10041
  this.authentication = new Authentication(request);
9645
10042
  this.verification = new Verification(request);
10043
+ this.identityVerifications = new IdentityVerifications(request);
9646
10044
  this.users = new Users(request);
9647
10045
  this.apiKeys = new ApiKeys(request);
9648
10046
  this.billing = new Billing(request);
@@ -9660,6 +10058,7 @@ var Delopay = class {
9660
10058
  this.messageTemplates = new MessageTemplates(request);
9661
10059
  this.risk = new Risk(request);
9662
10060
  this.live = new Live(request, openStream);
10061
+ this.branding = new Branding(request, this.baseUrl);
9663
10062
  this.subscriptions = new Subscriptions(request);
9664
10063
  this.buyerPortal = new BuyerPortal(request);
9665
10064
  this.buyerAccount = new BuyerAccount(request);
@@ -9671,6 +10070,7 @@ var Delopay = class {
9671
10070
  this.sellToRestrictions = new SellToRestrictions(request);
9672
10071
  this.buyerBlocklist = new BuyerBlocklist(request);
9673
10072
  this.shopLabels = new ShopLabels(request);
10073
+ this.checkoutTemplates = new CheckoutTemplates(request);
9674
10074
  this.buyerConversations = new BuyerConversations(request);
9675
10075
  this.buyerEvidence = new BuyerEvidenceReviews(request);
9676
10076
  this.checkoutRecovery = new CheckoutRecovery(request);
@@ -13504,6 +13904,10 @@ var CheckoutSession = class {
13504
13904
  * `cardAccount` name that form's connector and account; absent or blank
13505
13905
  * matches any.
13506
13906
  *
13907
+ * `entry` opens one of the shop's checkout entries (`?entry=`): the layout
13908
+ * holds only that entry's methods and is drawn in its named look, and
13909
+ * `entry` on the answer says whether it had anything to offer.
13910
+ *
13507
13911
  * `GET /payment-link/data/{merchantId}/{paymentId}`
13508
13912
  */
13509
13913
  async fetchCheckoutData(params, options) {
@@ -13517,7 +13921,8 @@ var CheckoutSession = class {
13517
13921
  country: country || void 0,
13518
13922
  card_only: params?.cardOnly || void 0,
13519
13923
  card_provider: params?.cardOnly ? params.cardProvider?.trim() || void 0 : void 0,
13520
- card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0
13924
+ card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0,
13925
+ entry: params?.entry?.trim() || void 0
13521
13926
  },
13522
13927
  ...options,
13523
13928
  headers: {
@@ -13937,6 +14342,25 @@ var CheckoutSession = class {
13937
14342
  headers: this.bearerHeaders(options?.headers)
13938
14343
  });
13939
14344
  }
14345
+ /**
14346
+ * Reserve this payment attempt before a hosted card form contacts Stripe,
14347
+ * Airwallex, or NomuPay. Send the provider object rendered to this checkout
14348
+ * and retain the same `flow_id` across retries and any 3-D Secure step.
14349
+ *
14350
+ * Only `authorized: true` permits the form to contact its processor. A
14351
+ * competing flow receives `false` and must reload; an unresolved provider
14352
+ * outcome stays reserved, regardless of elapsed time. A buyer-blocklist
14353
+ * refusal throws a `DelopayError` with code `DE_14`.
14354
+ *
14355
+ * `POST /payment-link/{merchantId}/{paymentId}/browser-card-claim`
14356
+ */
14357
+ async claimBrowserCard(params, options) {
14358
+ return this.client.request("POST", `${this.linkBase}/browser-card-claim`, {
14359
+ body: params,
14360
+ ...options,
14361
+ headers: this.bearerHeaders(options?.headers)
14362
+ });
14363
+ }
13940
14364
  /**
13941
14365
  * Confirm the Stripe card form's PaymentIntent through the router, for a
13942
14366
  * checkout payload with `card_connector_server_confirm: true`. Stripe refuses
@@ -13958,6 +14382,10 @@ var CheckoutSession = class {
13958
14382
  * and that secret confirms nothing without the secret key — then call this
13959
14383
  * again without a payment method to finalize.
13960
14384
  *
14385
+ * Reserve the attempt with {@link claimBrowserCard} first. Send its granted
14386
+ * `flow_id` as `browser_flow_id` on both the initial and post-action confirm;
14387
+ * an omitted, null or nonholder flow is refused with `400` and code `IR_16`.
14388
+ *
13961
14389
  * A PaymentMethod rules out what `stripe.createPaymentMethod` cannot
13962
14390
  * produce: Stripe names Amazon Pay and Klarna in the Express Checkout
13963
14391
  * Element, which need `stripe.createConfirmationToken` instead. Neither can
@@ -13998,6 +14426,43 @@ var CheckoutSession = class {
13998
14426
  headers: this.bearerHeaders(options?.headers)
13999
14427
  });
14000
14428
  }
14429
+ /**
14430
+ * The payment's identity verification step: whether the payment asked for
14431
+ * one, its outcome, and the provider's page while it is pending. A pending
14432
+ * verification is read from the provider first, so call this when the buyer
14433
+ * comes back from the provider's page.
14434
+ *
14435
+ * `required` is `false` when the payment asked for no verification.
14436
+ * `can_retry` is `true` after an expired or abandoned attempt; start a new
14437
+ * one with {@link CheckoutSession.startIdentityVerification}.
14438
+ *
14439
+ * `GET /payment-link/{merchantId}/{paymentId}/identity-verification`
14440
+ */
14441
+ async identityVerification(options) {
14442
+ return this.client.request("GET", `${this.linkBase}/identity-verification`, {
14443
+ ...options,
14444
+ headers: this.bearerHeaders(options?.headers)
14445
+ });
14446
+ }
14447
+ /**
14448
+ * Resume the payment's pending identity verification, start it, or start a
14449
+ * new attempt after an expired or abandoned one. Send the buyer to the
14450
+ * returned `verification_url`; the provider sends them back to `return_url`,
14451
+ * which must be on the payment's checkout origin.
14452
+ *
14453
+ * Refusals throw a `DelopayError`: `400` when the return URL is not on the
14454
+ * payment's checkout or the verification is already decided, `404` when the
14455
+ * payment asked for no verification.
14456
+ *
14457
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification`
14458
+ */
14459
+ async startIdentityVerification(params, options) {
14460
+ return this.client.request("POST", `${this.linkBase}/identity-verification`, {
14461
+ body: params,
14462
+ ...options,
14463
+ headers: this.bearerHeaders(options?.headers)
14464
+ });
14465
+ }
14001
14466
  /**
14002
14467
  * Ask whether NomuPay's COPYandPAY widget may submit a card, from the
14003
14468
  * form's pre-submit hook.
@@ -14720,6 +15185,20 @@ function focusedCheckoutUrl(params) {
14720
15185
  if (params.customFieldsCollected) query.set("cf", "1");
14721
15186
  return `${path}?${query.toString()}`;
14722
15187
  }
15188
+ function checkoutEntryUrl(params) {
15189
+ const base = params.checkoutBaseUrl.replace(/\/+$/, "");
15190
+ const path = params.paymentLinkId && OPAQUE_PAYMENT_LINK_ID.test(params.paymentLinkId) ? `${base}/pay/${params.paymentLinkId}` : `${base}/pay/${encodeURIComponent(params.merchantId)}/${encodeURIComponent(
15191
+ params.paymentId
15192
+ )}`;
15193
+ const query = new URLSearchParams({ entry: params.entry.trim() });
15194
+ if (params.locale) query.set("locale", params.locale);
15195
+ return `${path}?${query.toString()}`;
15196
+ }
15197
+ function isCheckoutOpenEntryMessage(data) {
15198
+ if (typeof data !== "object" || data === null) return false;
15199
+ const message = data;
15200
+ return message.type === "open_entry" && typeof message.source === "string" && typeof message.payment_id === "string" && typeof message.entry === "string" && typeof message.url === "string";
15201
+ }
14723
15202
  var CHECKOUT_EVENT_KINDS = [
14724
15203
  "native_pane_selected",
14725
15204
  "native_pane_tab_opened",
@@ -14787,6 +15266,33 @@ var Admin = class {
14787
15266
  }
14788
15267
  };
14789
15268
 
15269
+ // src/internal/resources/adminBranding.ts
15270
+ var AdminBranding = class {
15271
+ constructor(request) {
15272
+ this.request = request;
15273
+ }
15274
+ /**
15275
+ * What is saved, the value in force for each unset field, and the revision
15276
+ * to send back on the next update.
15277
+ *
15278
+ * `GET /admin-portal/branding`
15279
+ */
15280
+ async retrieve(options) {
15281
+ return this.request("GET", "/admin-portal/branding", { ...options });
15282
+ }
15283
+ /**
15284
+ * Replace the whole branding; all fields `null` clears it. A changed image
15285
+ * or font address is fetched first and refused unless it answers with the
15286
+ * right kind of file. A stale `expected_revision` is refused and changes
15287
+ * nothing.
15288
+ *
15289
+ * `PUT /admin-portal/branding`
15290
+ */
15291
+ async update(params, options) {
15292
+ return this.request("PUT", "/admin-portal/branding", { body: params, ...options });
15293
+ }
15294
+ };
15295
+
14790
15296
  // src/internal/resources/adminLive.ts
14791
15297
  var AdminLive = class {
14792
15298
  constructor(request, openStream) {
@@ -15401,6 +15907,32 @@ var AdminPortal = class {
15401
15907
  { body }
15402
15908
  );
15403
15909
  }
15910
+ /**
15911
+ * A member of `merchantId`'s permission overrides.
15912
+ * `GET /admin-portal/accounts/{merchant_id}/members/{user_id}/permission-overrides`
15913
+ *
15914
+ * Any internal role may read them; `can_edit` is `false` for one without
15915
+ * `UsersManage`. A user holding no role in the merchant is a 404 `UR_68`.
15916
+ */
15917
+ async getMemberPermissionOverrides(merchantId, userId) {
15918
+ return this.request(
15919
+ "GET",
15920
+ `/admin-portal/accounts/${encodeURIComponent(merchantId)}/members/${encodeURIComponent(userId)}/permission-overrides`
15921
+ );
15922
+ }
15923
+ /**
15924
+ * Replace a member of `merchantId`'s permission overrides. Needs
15925
+ * `UsersManage`; an operator is not limited by their own access. Recorded
15926
+ * in the merchant's audit log and applied to the member's next request.
15927
+ * `PUT /admin-portal/accounts/{merchant_id}/members/{user_id}/permission-overrides`
15928
+ */
15929
+ async updateMemberPermissionOverrides(merchantId, userId, body) {
15930
+ return this.request(
15931
+ "PUT",
15932
+ `/admin-portal/accounts/${encodeURIComponent(merchantId)}/members/${encodeURIComponent(userId)}/permission-overrides`,
15933
+ { body }
15934
+ );
15935
+ }
15404
15936
  /**
15405
15937
  * Soft-delete a user globally: deactivates the row, blacklists existing
15406
15938
  * JWTs, and wipes credentials. Distinct from `deleteUserRole`, which
@@ -15475,6 +16007,19 @@ var AdminPortal = class {
15475
16007
  `/admin-portal/transactions/${encodeURIComponent(paymentId)}/recover`
15476
16008
  );
15477
16009
  }
16010
+ /**
16011
+ * Mark a transaction of ANY merchant as an integration test, or remove the
16012
+ * mark. Recorded in the payment's status history as an operator's change.
16013
+ *
16014
+ * `POST /admin-portal/transactions/{paymentId}/integration-test`
16015
+ */
16016
+ async setTransactionIntegrationTest(paymentId, params) {
16017
+ return this.request(
16018
+ "POST",
16019
+ `/admin-portal/transactions/${encodeURIComponent(paymentId)}/integration-test`,
16020
+ { body: params }
16021
+ );
16022
+ }
15478
16023
  /**
15479
16024
  * Client/device observations captured while the buyer interacted with a
15480
16025
  * transaction of ANY merchant, oldest first.
@@ -16514,6 +17059,7 @@ var DelopayInternal = class extends Delopay {
16514
17059
  this.adminPortal = new AdminPortal(request);
16515
17060
  const openStream = this.openEventStream.bind(this);
16516
17061
  this.adminLive = new AdminLive(request, openStream);
17062
+ this.adminBranding = new AdminBranding(request);
16517
17063
  this.auditLogs = new AuditLogs(request);
16518
17064
  this.cache = new Cache(request);
16519
17065
  this.cardIssuers = new CardIssuers(request);
@@ -16547,6 +17093,7 @@ var DelopayInternal = class extends Delopay {
16547
17093
  APPLE_PAY_BUTTON_STYLES,
16548
17094
  APPLE_PAY_BUTTON_TYPES,
16549
17095
  Admin,
17096
+ AdminBranding,
16550
17097
  AdminLive,
16551
17098
  AdminPortal,
16552
17099
  Analytics,
@@ -16557,6 +17104,7 @@ var DelopayInternal = class extends Delopay {
16557
17104
  BRANDING_EXPORT_FORMAT,
16558
17105
  BRANDING_EXPORT_VERSION,
16559
17106
  BUILTIN_PAYMENT_ICON_KEYS,
17107
+ Branding,
16560
17108
  BuyerBlocklist,
16561
17109
  BuyerConversations,
16562
17110
  BuyerEvidenceReviews,
@@ -16580,6 +17128,7 @@ var DelopayInternal = class extends Delopay {
16580
17128
  CheckoutMethods,
16581
17129
  CheckoutRecovery,
16582
17130
  CheckoutSession,
17131
+ CheckoutTemplates,
16583
17132
  Configs,
16584
17133
  ConnectorRestrictionRules,
16585
17134
  ConnectorRestrictions,
@@ -16603,6 +17152,7 @@ var DelopayInternal = class extends Delopay {
16603
17152
  GOOGLE_PAY_BUTTON_COLORS,
16604
17153
  GOOGLE_PAY_BUTTON_TYPES,
16605
17154
  Gsm,
17155
+ IdentityVerifications,
16606
17156
  InvoiceSettingsResource,
16607
17157
  Invoices,
16608
17158
  LOCALIZABLE_COPY_FIELDS,
@@ -16691,6 +17241,7 @@ var DelopayInternal = class extends Delopay {
16691
17241
  anyOf,
16692
17242
  applyBrandingVariables,
16693
17243
  asAirwallexCardPreset,
17244
+ brandingAssetPath,
16694
17245
  buildBrandingExport,
16695
17246
  builtinPaymentIconDataUri,
16696
17247
  builtinPaymentIconSvg,
@@ -16699,6 +17250,7 @@ var DelopayInternal = class extends Delopay {
16699
17250
  cardFieldFontPx,
16700
17251
  cardFieldWeightValue,
16701
17252
  checkoutCopy,
17253
+ checkoutEntryUrl,
16702
17254
  checkoutLocaleDir,
16703
17255
  cloneBranding,
16704
17256
  cloneCustomField,
@@ -16745,6 +17297,7 @@ var DelopayInternal = class extends Delopay {
16745
17297
  fontWeightValue,
16746
17298
  inputPadValue,
16747
17299
  isCheckboxChecked,
17300
+ isCheckoutOpenEntryMessage,
16748
17301
  isConfirmedChild,
16749
17302
  isDarkSurface,
16750
17303
  isDefaultBadgeSet,