@delopay/sdk 0.285.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-CEYQMVOJ.js → chunk-ZZEGL45P.js} +288 -4
- package/dist/chunk-ZZEGL45P.js.map +1 -0
- package/dist/{index-CkqlDJ_s.d.cts → index-DIzFgkFA.d.cts} +654 -5
- package/dist/{index-CkqlDJ_s.d.ts → index-DIzFgkFA.d.ts} +654 -5
- package/dist/index.cjs +290 -3
- 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 +7 -1
- package/dist/internal.cjs +346 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +120 -4
- package/dist/internal.d.ts +120 -4
- package/dist/internal.js +62 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-CEYQMVOJ.js.map +0 -1
|
@@ -4968,6 +4968,49 @@ var Users = class {
|
|
|
4968
4968
|
body: params
|
|
4969
4969
|
});
|
|
4970
4970
|
}
|
|
4971
|
+
/**
|
|
4972
|
+
* A member's permission overrides in your merchant: every area that can be
|
|
4973
|
+
* overridden at their level, with what their roles give, the level set for
|
|
4974
|
+
* them, and what they have. `GET /user/employees/{user_id}/permission-overrides`
|
|
4975
|
+
*
|
|
4976
|
+
* Needs the *Users* read permission, and answers only for a member
|
|
4977
|
+
* `listUsersInLineage` shows you (any other id is a 404 `UR_68`).
|
|
4978
|
+
* `can_edit`, `can_raise` and each area's `grantable_level` say what you
|
|
4979
|
+
* may change.
|
|
4980
|
+
*/
|
|
4981
|
+
async getMemberPermissionOverrides(userId) {
|
|
4982
|
+
return this.request(
|
|
4983
|
+
"GET",
|
|
4984
|
+
`/user/employees/${encodeURIComponent(userId)}/permission-overrides`
|
|
4985
|
+
);
|
|
4986
|
+
}
|
|
4987
|
+
/**
|
|
4988
|
+
* Replace a member's permission overrides. An area left out goes back to
|
|
4989
|
+
* what their roles give. `PUT /user/employees/{user_id}/permission-overrides`
|
|
4990
|
+
*
|
|
4991
|
+
* Needs the *Users* write permission and a member within your reach, other
|
|
4992
|
+
* than yourself. Keeping or lowering is always allowed; a gain must stay
|
|
4993
|
+
* within what you hold in that area, and a gain above the member's roles
|
|
4994
|
+
* needs `can_raise`. The change is audited and applies to the member's next
|
|
4995
|
+
* request. A refusal is a `UR_68` whose `data` is
|
|
4996
|
+
* `{ reason: 'permission_overrides', refusal }` (see
|
|
4997
|
+
* {@link PermissionOverrideRefusal}).
|
|
4998
|
+
*/
|
|
4999
|
+
async updateMemberPermissionOverrides(userId, params) {
|
|
5000
|
+
return this.request(
|
|
5001
|
+
"PUT",
|
|
5002
|
+
`/user/employees/${encodeURIComponent(userId)}/permission-overrides`,
|
|
5003
|
+
{ body: params }
|
|
5004
|
+
);
|
|
5005
|
+
}
|
|
5006
|
+
/**
|
|
5007
|
+
* The permission overrides your own session acts under, sorted by area.
|
|
5008
|
+
* An area named here has exactly that level, whatever a broader legacy area
|
|
5009
|
+
* of the role would suggest. `GET /user/role/permission-overrides`
|
|
5010
|
+
*/
|
|
5011
|
+
async getOwnPermissionOverrides() {
|
|
5012
|
+
return this.request("GET", "/user/role/permission-overrides");
|
|
5013
|
+
}
|
|
4971
5014
|
/** Sign in via OIDC. `POST /user/oidc` */
|
|
4972
5015
|
async signInOidc(params) {
|
|
4973
5016
|
return this.request("POST", "/user/oidc", { body: params });
|
|
@@ -5192,7 +5235,8 @@ var IdentityVerifications = class {
|
|
|
5192
5235
|
}
|
|
5193
5236
|
/**
|
|
5194
5237
|
* One verification. With `force_sync: true`, a verification the provider
|
|
5195
|
-
* can still change (pending or in review
|
|
5238
|
+
* can still change (pending or in review, or a subject under ongoing AML
|
|
5239
|
+
* monitoring) is read from the provider first.
|
|
5196
5240
|
*
|
|
5197
5241
|
* `GET /identity-verifications/{verification_id}`
|
|
5198
5242
|
*/
|
|
@@ -5204,8 +5248,9 @@ var IdentityVerifications = class {
|
|
|
5204
5248
|
}
|
|
5205
5249
|
/**
|
|
5206
5250
|
* A subject's latest verification in one environment (live unless
|
|
5207
|
-
* `test_mode: true`), with its checks
|
|
5208
|
-
*
|
|
5251
|
+
* `test_mode: true`), with its checks, and the subject's verification under
|
|
5252
|
+
* ongoing AML monitoring. This is what risk rules read. `verification` and
|
|
5253
|
+
* `aml_monitoring` are `null` when the subject has none.
|
|
5209
5254
|
*
|
|
5210
5255
|
* `GET /identity-verifications/subjects/{subject_reference}`
|
|
5211
5256
|
*/
|
|
@@ -5230,6 +5275,78 @@ var IdentityVerifications = class {
|
|
|
5230
5275
|
{ query, ...options }
|
|
5231
5276
|
);
|
|
5232
5277
|
}
|
|
5278
|
+
/**
|
|
5279
|
+
* Switch ongoing AML monitoring of a verification's subject. The provider
|
|
5280
|
+
* then keeps re-screening the subject against sanctions, PEP and
|
|
5281
|
+
* adverse-media lists, and every change it reports is recorded. Only a
|
|
5282
|
+
* verified person or business can be enrolled; monitoring can be switched
|
|
5283
|
+
* off at any time. Needs permission to edit customers.
|
|
5284
|
+
*
|
|
5285
|
+
* `POST /identity-verifications/{verification_id}/aml-monitoring`
|
|
5286
|
+
*/
|
|
5287
|
+
async setAmlMonitoring(verificationId, params, options) {
|
|
5288
|
+
return this.request(
|
|
5289
|
+
"POST",
|
|
5290
|
+
`/identity-verifications/${encodeURIComponent(verificationId)}/aml-monitoring`,
|
|
5291
|
+
{ body: params, ...options }
|
|
5292
|
+
);
|
|
5293
|
+
}
|
|
5294
|
+
/**
|
|
5295
|
+
* Every change of the subject's AML result the provider reported while the
|
|
5296
|
+
* subject was monitored, newest first, at most 100.
|
|
5297
|
+
*
|
|
5298
|
+
* `GET /identity-verifications/{verification_id}/aml-events`
|
|
5299
|
+
*/
|
|
5300
|
+
async amlEvents(verificationId, options) {
|
|
5301
|
+
return this.request(
|
|
5302
|
+
"GET",
|
|
5303
|
+
`/identity-verifications/${encodeURIComponent(verificationId)}/aml-events`,
|
|
5304
|
+
options
|
|
5305
|
+
);
|
|
5306
|
+
}
|
|
5307
|
+
/**
|
|
5308
|
+
* A payment's screening by the transaction monitoring of the shop's
|
|
5309
|
+
* screening account. Recorded only: it never holds or refuses the payment.
|
|
5310
|
+
* Answers 404 when the payment has no screening. Needs permission to read
|
|
5311
|
+
* payments.
|
|
5312
|
+
*
|
|
5313
|
+
* `GET /identity-verifications/payment-screenings/{payment_id}`
|
|
5314
|
+
*/
|
|
5315
|
+
async paymentScreening(paymentId, options) {
|
|
5316
|
+
return this.request(
|
|
5317
|
+
"GET",
|
|
5318
|
+
`/identity-verifications/payment-screenings/${encodeURIComponent(paymentId)}`,
|
|
5319
|
+
options
|
|
5320
|
+
);
|
|
5321
|
+
}
|
|
5322
|
+
/**
|
|
5323
|
+
* Whether an account screens its shop's payments. Needs permission to read
|
|
5324
|
+
* connectors.
|
|
5325
|
+
*
|
|
5326
|
+
* `GET /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
|
|
5327
|
+
*/
|
|
5328
|
+
async paymentScreeningSetting(merchantConnectorId, options) {
|
|
5329
|
+
return this.request(
|
|
5330
|
+
"GET",
|
|
5331
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
|
|
5332
|
+
options
|
|
5333
|
+
);
|
|
5334
|
+
}
|
|
5335
|
+
/**
|
|
5336
|
+
* Switch screening of the account's shop's payments. Switched on, every
|
|
5337
|
+
* payment of the shop that succeeds from then on is screened shortly after,
|
|
5338
|
+
* in the payment's own environment. A shop has at most one screening
|
|
5339
|
+
* account. Needs permission to edit connectors.
|
|
5340
|
+
*
|
|
5341
|
+
* `PUT /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
|
|
5342
|
+
*/
|
|
5343
|
+
async updatePaymentScreeningSetting(merchantConnectorId, params, options) {
|
|
5344
|
+
return this.request(
|
|
5345
|
+
"PUT",
|
|
5346
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
|
|
5347
|
+
{ body: params, ...options }
|
|
5348
|
+
);
|
|
5349
|
+
}
|
|
5233
5350
|
};
|
|
5234
5351
|
|
|
5235
5352
|
// src/resources/webhooks.ts
|
|
@@ -5968,6 +6085,110 @@ var ShopLabels = class {
|
|
|
5968
6085
|
}
|
|
5969
6086
|
};
|
|
5970
6087
|
|
|
6088
|
+
// src/resources/checkoutTemplates.ts
|
|
6089
|
+
var CheckoutTemplates = class {
|
|
6090
|
+
constructor(request) {
|
|
6091
|
+
this.request = request;
|
|
6092
|
+
}
|
|
6093
|
+
/**
|
|
6094
|
+
* The merchant's templates, each with the shops on it and whether each
|
|
6095
|
+
* runs the template's current settings.
|
|
6096
|
+
* `GET /checkout-templates/{merchantId}`
|
|
6097
|
+
*/
|
|
6098
|
+
async list(merchantId) {
|
|
6099
|
+
return this.request("GET", `/checkout-templates/${encodeURIComponent(merchantId)}`);
|
|
6100
|
+
}
|
|
6101
|
+
/**
|
|
6102
|
+
* Create a template, empty or copied from a shop's current settings. The
|
|
6103
|
+
* shop copied from is not changed.
|
|
6104
|
+
* `POST /checkout-templates/{merchantId}`
|
|
6105
|
+
*/
|
|
6106
|
+
async create(merchantId, params) {
|
|
6107
|
+
return this.request("POST", `/checkout-templates/${encodeURIComponent(merchantId)}`, {
|
|
6108
|
+
body: params
|
|
6109
|
+
});
|
|
6110
|
+
}
|
|
6111
|
+
/** `GET /checkout-templates/{merchantId}/{templateId}` */
|
|
6112
|
+
async retrieve(merchantId, templateId) {
|
|
6113
|
+
return this.request(
|
|
6114
|
+
"GET",
|
|
6115
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
6116
|
+
);
|
|
6117
|
+
}
|
|
6118
|
+
/**
|
|
6119
|
+
* Rename a template. A name another template of the merchant holds is
|
|
6120
|
+
* refused.
|
|
6121
|
+
* `POST /checkout-templates/{merchantId}/{templateId}`
|
|
6122
|
+
*/
|
|
6123
|
+
async rename(merchantId, templateId, params) {
|
|
6124
|
+
return this.request(
|
|
6125
|
+
"POST",
|
|
6126
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,
|
|
6127
|
+
{ body: params }
|
|
6128
|
+
);
|
|
6129
|
+
}
|
|
6130
|
+
/**
|
|
6131
|
+
* Delete a template. Refused while a shop is on it.
|
|
6132
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}`
|
|
6133
|
+
*/
|
|
6134
|
+
async delete(merchantId, templateId) {
|
|
6135
|
+
return this.request(
|
|
6136
|
+
"DELETE",
|
|
6137
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
6138
|
+
);
|
|
6139
|
+
}
|
|
6140
|
+
/**
|
|
6141
|
+
* Put shops on the template and copy its settings into them; a shop on
|
|
6142
|
+
* another template moves. Each shop is reported on its own: one with
|
|
6143
|
+
* `blockers` is left unchanged. `dry_run` changes nothing and reports what
|
|
6144
|
+
* would change.
|
|
6145
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/shops`
|
|
6146
|
+
*/
|
|
6147
|
+
async assign(merchantId, templateId, params) {
|
|
6148
|
+
return this.request(
|
|
6149
|
+
"POST",
|
|
6150
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,
|
|
6151
|
+
{
|
|
6152
|
+
body: params
|
|
6153
|
+
}
|
|
6154
|
+
);
|
|
6155
|
+
}
|
|
6156
|
+
/**
|
|
6157
|
+
* Take a shop off the template. It keeps every setting it has, as its own.
|
|
6158
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`
|
|
6159
|
+
*/
|
|
6160
|
+
async unassign(merchantId, templateId, profileId) {
|
|
6161
|
+
return this.request(
|
|
6162
|
+
"DELETE",
|
|
6163
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`
|
|
6164
|
+
);
|
|
6165
|
+
}
|
|
6166
|
+
/**
|
|
6167
|
+
* Copy the template's current settings into its shops, all or the ones
|
|
6168
|
+
* named.
|
|
6169
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/apply`
|
|
6170
|
+
*/
|
|
6171
|
+
async apply(merchantId, templateId, params = {}) {
|
|
6172
|
+
return this.request(
|
|
6173
|
+
"POST",
|
|
6174
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,
|
|
6175
|
+
{
|
|
6176
|
+
body: params
|
|
6177
|
+
}
|
|
6178
|
+
);
|
|
6179
|
+
}
|
|
6180
|
+
/**
|
|
6181
|
+
* The template a shop is on, if any. Readable by the shop's own members.
|
|
6182
|
+
* `GET /checkout-templates/{merchantId}/shops/{profileId}`
|
|
6183
|
+
*/
|
|
6184
|
+
async ofShop(merchantId, profileId) {
|
|
6185
|
+
return this.request(
|
|
6186
|
+
"GET",
|
|
6187
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`
|
|
6188
|
+
);
|
|
6189
|
+
}
|
|
6190
|
+
};
|
|
6191
|
+
|
|
5971
6192
|
// src/resources/buyerConversations.ts
|
|
5972
6193
|
var BuyerConversations = class {
|
|
5973
6194
|
constructor(request) {
|
|
@@ -9219,6 +9440,41 @@ var Live = class {
|
|
|
9219
9440
|
}
|
|
9220
9441
|
};
|
|
9221
9442
|
|
|
9443
|
+
// src/resources/deploymentBranding.ts
|
|
9444
|
+
function brandingAssetPath(asset, version) {
|
|
9445
|
+
const path = `/branding/assets/${encodeURIComponent(asset)}`;
|
|
9446
|
+
return version ? `${path}?v=${encodeURIComponent(version)}` : path;
|
|
9447
|
+
}
|
|
9448
|
+
var Branding = class {
|
|
9449
|
+
constructor(request, baseUrl) {
|
|
9450
|
+
this.request = request;
|
|
9451
|
+
this.baseUrl = baseUrl;
|
|
9452
|
+
}
|
|
9453
|
+
/**
|
|
9454
|
+
* The saved branding. A `null` field means "keep your own default".
|
|
9455
|
+
*
|
|
9456
|
+
* Branding is cosmetic, so treat any failure as "nothing saved": routers
|
|
9457
|
+
* from before this route answer 404, and a page must never wait long for
|
|
9458
|
+
* it. Pass a `signal` (e.g. `AbortSignal.timeout(2500)`) to bound the call
|
|
9459
|
+
* including its retries; a `timeout` alone applies to each attempt.
|
|
9460
|
+
*
|
|
9461
|
+
* `GET /branding`
|
|
9462
|
+
*/
|
|
9463
|
+
async retrieve(options) {
|
|
9464
|
+
return this.request("GET", "/branding", { ...options });
|
|
9465
|
+
}
|
|
9466
|
+
/**
|
|
9467
|
+
* The address of one branding image or font file on this client's base
|
|
9468
|
+
* URL, for an `<img src>` or a `@font-face` `src`. See
|
|
9469
|
+
* {@link brandingAssetPath}.
|
|
9470
|
+
*
|
|
9471
|
+
* `GET /branding/assets/{asset}`
|
|
9472
|
+
*/
|
|
9473
|
+
assetUrl(asset, version) {
|
|
9474
|
+
return `${this.baseUrl}${brandingAssetPath(asset, version)}`;
|
|
9475
|
+
}
|
|
9476
|
+
};
|
|
9477
|
+
|
|
9222
9478
|
// src/client.ts
|
|
9223
9479
|
var PRODUCTION_URL = "https://api.delopay.net";
|
|
9224
9480
|
var SANDBOX_URL = "https://sandbox.delopay.net";
|
|
@@ -9498,6 +9754,7 @@ var Delopay = class {
|
|
|
9498
9754
|
this.messageTemplates = new MessageTemplates(request);
|
|
9499
9755
|
this.risk = new Risk(request);
|
|
9500
9756
|
this.live = new Live(request, openStream);
|
|
9757
|
+
this.branding = new Branding(request, this.baseUrl);
|
|
9501
9758
|
this.subscriptions = new Subscriptions(request);
|
|
9502
9759
|
this.buyerPortal = new BuyerPortal(request);
|
|
9503
9760
|
this.buyerAccount = new BuyerAccount(request);
|
|
@@ -9509,6 +9766,7 @@ var Delopay = class {
|
|
|
9509
9766
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
9510
9767
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
9511
9768
|
this.shopLabels = new ShopLabels(request);
|
|
9769
|
+
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
9512
9770
|
this.buyerConversations = new BuyerConversations(request);
|
|
9513
9771
|
this.buyerEvidence = new BuyerEvidenceReviews(request);
|
|
9514
9772
|
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
@@ -13780,6 +14038,25 @@ var CheckoutSession = class {
|
|
|
13780
14038
|
headers: this.bearerHeaders(options?.headers)
|
|
13781
14039
|
});
|
|
13782
14040
|
}
|
|
14041
|
+
/**
|
|
14042
|
+
* Reserve this payment attempt before a hosted card form contacts Stripe,
|
|
14043
|
+
* Airwallex, or NomuPay. Send the provider object rendered to this checkout
|
|
14044
|
+
* and retain the same `flow_id` across retries and any 3-D Secure step.
|
|
14045
|
+
*
|
|
14046
|
+
* Only `authorized: true` permits the form to contact its processor. A
|
|
14047
|
+
* competing flow receives `false` and must reload; an unresolved provider
|
|
14048
|
+
* outcome stays reserved, regardless of elapsed time. A buyer-blocklist
|
|
14049
|
+
* refusal throws a `DelopayError` with code `DE_14`.
|
|
14050
|
+
*
|
|
14051
|
+
* `POST /payment-link/{merchantId}/{paymentId}/browser-card-claim`
|
|
14052
|
+
*/
|
|
14053
|
+
async claimBrowserCard(params, options) {
|
|
14054
|
+
return this.client.request("POST", `${this.linkBase}/browser-card-claim`, {
|
|
14055
|
+
body: params,
|
|
14056
|
+
...options,
|
|
14057
|
+
headers: this.bearerHeaders(options?.headers)
|
|
14058
|
+
});
|
|
14059
|
+
}
|
|
13783
14060
|
/**
|
|
13784
14061
|
* Confirm the Stripe card form's PaymentIntent through the router, for a
|
|
13785
14062
|
* checkout payload with `card_connector_server_confirm: true`. Stripe refuses
|
|
@@ -13801,6 +14078,10 @@ var CheckoutSession = class {
|
|
|
13801
14078
|
* and that secret confirms nothing without the secret key — then call this
|
|
13802
14079
|
* again without a payment method to finalize.
|
|
13803
14080
|
*
|
|
14081
|
+
* Reserve the attempt with {@link claimBrowserCard} first. Send its granted
|
|
14082
|
+
* `flow_id` as `browser_flow_id` on both the initial and post-action confirm;
|
|
14083
|
+
* an omitted, null or nonholder flow is refused with `400` and code `IR_16`.
|
|
14084
|
+
*
|
|
13804
14085
|
* A PaymentMethod rules out what `stripe.createPaymentMethod` cannot
|
|
13805
14086
|
* produce: Stripe names Amazon Pay and Klarna in the Express Checkout
|
|
13806
14087
|
* Element, which need `stripe.createConfirmationToken` instead. Neither can
|
|
@@ -14664,6 +14945,7 @@ export {
|
|
|
14664
14945
|
SellToRestrictions,
|
|
14665
14946
|
BuyerBlocklist,
|
|
14666
14947
|
ShopLabels,
|
|
14948
|
+
CheckoutTemplates,
|
|
14667
14949
|
BuyerConversations,
|
|
14668
14950
|
BuyerEvidenceReviews,
|
|
14669
14951
|
CheckoutRecovery,
|
|
@@ -14684,6 +14966,8 @@ export {
|
|
|
14684
14966
|
LiveEventStream,
|
|
14685
14967
|
openLiveStream,
|
|
14686
14968
|
Live,
|
|
14969
|
+
brandingAssetPath,
|
|
14970
|
+
Branding,
|
|
14687
14971
|
Delopay,
|
|
14688
14972
|
leaf,
|
|
14689
14973
|
allOf,
|
|
@@ -14903,4 +15187,4 @@ export {
|
|
|
14903
15187
|
decodeNativePanes,
|
|
14904
15188
|
encodeNativePanes
|
|
14905
15189
|
};
|
|
14906
|
-
//# sourceMappingURL=chunk-
|
|
15190
|
+
//# sourceMappingURL=chunk-ZZEGL45P.js.map
|