@delopay/sdk 0.285.0 → 0.290.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-7QXWTMSG.js} +455 -4
- package/dist/chunk-7QXWTMSG.js.map +1 -0
- package/dist/{index-CkqlDJ_s.d.cts → index-CCxMFvNk.d.cts} +1129 -6
- package/dist/{index-CkqlDJ_s.d.ts → index-CCxMFvNk.d.ts} +1129 -6
- package/dist/index.cjs +459 -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 +11 -1
- package/dist/internal.cjs +515 -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 +66 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-CEYQMVOJ.js.map +0 -1
|
@@ -1716,6 +1716,44 @@ var Disputes = class {
|
|
|
1716
1716
|
options
|
|
1717
1717
|
);
|
|
1718
1718
|
}
|
|
1719
|
+
/**
|
|
1720
|
+
* What a bulk action would do to the selected cases, changing nothing:
|
|
1721
|
+
* each case as eligible or skipped with a reason, and what the eligible ones
|
|
1722
|
+
* add up to per currency. Name the cases by `ids` or by the list's
|
|
1723
|
+
* `filters`, exactly one of the two; at most `max_cases` are read.
|
|
1724
|
+
*
|
|
1725
|
+
* `POST /disputes/workspace/bulk/preview`. Needs a dashboard JWT.
|
|
1726
|
+
*/
|
|
1727
|
+
async bulkPreview(request) {
|
|
1728
|
+
const { filters, ...rest } = request;
|
|
1729
|
+
return this.request("POST", "/disputes/workspace/bulk/preview", {
|
|
1730
|
+
body: filters ? { ...rest, filters: workspaceQuery(filters) } : rest
|
|
1731
|
+
});
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Accept the listed cases at their processors, at most the preview's
|
|
1735
|
+
* `max_run_cases` per call; send a larger set in parts under one
|
|
1736
|
+
* `request_id`. Eligibility is decided again at run time, and every case
|
|
1737
|
+
* gets its own result. An `unknown` result means the processor may have
|
|
1738
|
+
* acted: read the case before acting on it again.
|
|
1739
|
+
*
|
|
1740
|
+
* `POST /disputes/workspace/bulk/accept`. Needs a dashboard JWT.
|
|
1741
|
+
*/
|
|
1742
|
+
async bulkAccept(request) {
|
|
1743
|
+
return this.request("POST", "/disputes/workspace/bulk/accept", { body: request });
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* Add the buyer of each listed case's payment to the buyer blocklist: the
|
|
1747
|
+
* payment's email and customer id, and the device ids and IP address of the
|
|
1748
|
+
* browser that paid, when DeloPay can tie them to it. Identifiers already
|
|
1749
|
+
* blocked are not added again, and `unattributed` names those it could not
|
|
1750
|
+
* tie to the buyer.
|
|
1751
|
+
*
|
|
1752
|
+
* `POST /disputes/workspace/bulk/block-buyer`. Needs a dashboard JWT.
|
|
1753
|
+
*/
|
|
1754
|
+
async bulkBlockBuyer(request) {
|
|
1755
|
+
return this.request("POST", "/disputes/workspace/bulk/block-buyer", { body: request });
|
|
1756
|
+
}
|
|
1719
1757
|
/**
|
|
1720
1758
|
* Retrieve a dispute by its ID.
|
|
1721
1759
|
*
|
|
@@ -4968,6 +5006,49 @@ var Users = class {
|
|
|
4968
5006
|
body: params
|
|
4969
5007
|
});
|
|
4970
5008
|
}
|
|
5009
|
+
/**
|
|
5010
|
+
* A member's permission overrides in your merchant: every area that can be
|
|
5011
|
+
* overridden at their level, with what their roles give, the level set for
|
|
5012
|
+
* them, and what they have. `GET /user/employees/{user_id}/permission-overrides`
|
|
5013
|
+
*
|
|
5014
|
+
* Needs the *Users* read permission, and answers only for a member
|
|
5015
|
+
* `listUsersInLineage` shows you (any other id is a 404 `UR_68`).
|
|
5016
|
+
* `can_edit`, `can_raise` and each area's `grantable_level` say what you
|
|
5017
|
+
* may change.
|
|
5018
|
+
*/
|
|
5019
|
+
async getMemberPermissionOverrides(userId) {
|
|
5020
|
+
return this.request(
|
|
5021
|
+
"GET",
|
|
5022
|
+
`/user/employees/${encodeURIComponent(userId)}/permission-overrides`
|
|
5023
|
+
);
|
|
5024
|
+
}
|
|
5025
|
+
/**
|
|
5026
|
+
* Replace a member's permission overrides. An area left out goes back to
|
|
5027
|
+
* what their roles give. `PUT /user/employees/{user_id}/permission-overrides`
|
|
5028
|
+
*
|
|
5029
|
+
* Needs the *Users* write permission and a member within your reach, other
|
|
5030
|
+
* than yourself. Keeping or lowering is always allowed; a gain must stay
|
|
5031
|
+
* within what you hold in that area, and a gain above the member's roles
|
|
5032
|
+
* needs `can_raise`. The change is audited and applies to the member's next
|
|
5033
|
+
* request. A refusal is a `UR_68` whose `data` is
|
|
5034
|
+
* `{ reason: 'permission_overrides', refusal }` (see
|
|
5035
|
+
* {@link PermissionOverrideRefusal}).
|
|
5036
|
+
*/
|
|
5037
|
+
async updateMemberPermissionOverrides(userId, params) {
|
|
5038
|
+
return this.request(
|
|
5039
|
+
"PUT",
|
|
5040
|
+
`/user/employees/${encodeURIComponent(userId)}/permission-overrides`,
|
|
5041
|
+
{ body: params }
|
|
5042
|
+
);
|
|
5043
|
+
}
|
|
5044
|
+
/**
|
|
5045
|
+
* The permission overrides your own session acts under, sorted by area.
|
|
5046
|
+
* An area named here has exactly that level, whatever a broader legacy area
|
|
5047
|
+
* of the role would suggest. `GET /user/role/permission-overrides`
|
|
5048
|
+
*/
|
|
5049
|
+
async getOwnPermissionOverrides() {
|
|
5050
|
+
return this.request("GET", "/user/role/permission-overrides");
|
|
5051
|
+
}
|
|
4971
5052
|
/** Sign in via OIDC. `POST /user/oidc` */
|
|
4972
5053
|
async signInOidc(params) {
|
|
4973
5054
|
return this.request("POST", "/user/oidc", { body: params });
|
|
@@ -5192,7 +5273,8 @@ var IdentityVerifications = class {
|
|
|
5192
5273
|
}
|
|
5193
5274
|
/**
|
|
5194
5275
|
* One verification. With `force_sync: true`, a verification the provider
|
|
5195
|
-
* can still change (pending or in review
|
|
5276
|
+
* can still change (pending or in review, or a subject under ongoing AML
|
|
5277
|
+
* monitoring) is read from the provider first.
|
|
5196
5278
|
*
|
|
5197
5279
|
* `GET /identity-verifications/{verification_id}`
|
|
5198
5280
|
*/
|
|
@@ -5204,8 +5286,9 @@ var IdentityVerifications = class {
|
|
|
5204
5286
|
}
|
|
5205
5287
|
/**
|
|
5206
5288
|
* A subject's latest verification in one environment (live unless
|
|
5207
|
-
* `test_mode: true`), with its checks
|
|
5208
|
-
*
|
|
5289
|
+
* `test_mode: true`), with its checks, and the subject's verification under
|
|
5290
|
+
* ongoing AML monitoring. This is what risk rules read. `verification` and
|
|
5291
|
+
* `aml_monitoring` are `null` when the subject has none.
|
|
5209
5292
|
*
|
|
5210
5293
|
* `GET /identity-verifications/subjects/{subject_reference}`
|
|
5211
5294
|
*/
|
|
@@ -5230,6 +5313,78 @@ var IdentityVerifications = class {
|
|
|
5230
5313
|
{ query, ...options }
|
|
5231
5314
|
);
|
|
5232
5315
|
}
|
|
5316
|
+
/**
|
|
5317
|
+
* Switch ongoing AML monitoring of a verification's subject. The provider
|
|
5318
|
+
* then keeps re-screening the subject against sanctions, PEP and
|
|
5319
|
+
* adverse-media lists, and every change it reports is recorded. Only a
|
|
5320
|
+
* verified person or business can be enrolled; monitoring can be switched
|
|
5321
|
+
* off at any time. Needs permission to edit customers.
|
|
5322
|
+
*
|
|
5323
|
+
* `POST /identity-verifications/{verification_id}/aml-monitoring`
|
|
5324
|
+
*/
|
|
5325
|
+
async setAmlMonitoring(verificationId, params, options) {
|
|
5326
|
+
return this.request(
|
|
5327
|
+
"POST",
|
|
5328
|
+
`/identity-verifications/${encodeURIComponent(verificationId)}/aml-monitoring`,
|
|
5329
|
+
{ body: params, ...options }
|
|
5330
|
+
);
|
|
5331
|
+
}
|
|
5332
|
+
/**
|
|
5333
|
+
* Every change of the subject's AML result the provider reported while the
|
|
5334
|
+
* subject was monitored, newest first, at most 100.
|
|
5335
|
+
*
|
|
5336
|
+
* `GET /identity-verifications/{verification_id}/aml-events`
|
|
5337
|
+
*/
|
|
5338
|
+
async amlEvents(verificationId, options) {
|
|
5339
|
+
return this.request(
|
|
5340
|
+
"GET",
|
|
5341
|
+
`/identity-verifications/${encodeURIComponent(verificationId)}/aml-events`,
|
|
5342
|
+
options
|
|
5343
|
+
);
|
|
5344
|
+
}
|
|
5345
|
+
/**
|
|
5346
|
+
* A payment's screening by the transaction monitoring of the shop's
|
|
5347
|
+
* screening account. Recorded only: it never holds or refuses the payment.
|
|
5348
|
+
* Answers 404 when the payment has no screening. Needs permission to read
|
|
5349
|
+
* payments.
|
|
5350
|
+
*
|
|
5351
|
+
* `GET /identity-verifications/payment-screenings/{payment_id}`
|
|
5352
|
+
*/
|
|
5353
|
+
async paymentScreening(paymentId, options) {
|
|
5354
|
+
return this.request(
|
|
5355
|
+
"GET",
|
|
5356
|
+
`/identity-verifications/payment-screenings/${encodeURIComponent(paymentId)}`,
|
|
5357
|
+
options
|
|
5358
|
+
);
|
|
5359
|
+
}
|
|
5360
|
+
/**
|
|
5361
|
+
* Whether an account screens its shop's payments. Needs permission to read
|
|
5362
|
+
* connectors.
|
|
5363
|
+
*
|
|
5364
|
+
* `GET /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
|
|
5365
|
+
*/
|
|
5366
|
+
async paymentScreeningSetting(merchantConnectorId, options) {
|
|
5367
|
+
return this.request(
|
|
5368
|
+
"GET",
|
|
5369
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
|
|
5370
|
+
options
|
|
5371
|
+
);
|
|
5372
|
+
}
|
|
5373
|
+
/**
|
|
5374
|
+
* Switch screening of the account's shop's payments. Switched on, every
|
|
5375
|
+
* payment of the shop that succeeds from then on is screened shortly after,
|
|
5376
|
+
* in the payment's own environment. A shop has at most one screening
|
|
5377
|
+
* account. Needs permission to edit connectors.
|
|
5378
|
+
*
|
|
5379
|
+
* `PUT /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
|
|
5380
|
+
*/
|
|
5381
|
+
async updatePaymentScreeningSetting(merchantConnectorId, params, options) {
|
|
5382
|
+
return this.request(
|
|
5383
|
+
"PUT",
|
|
5384
|
+
`/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
|
|
5385
|
+
{ body: params, ...options }
|
|
5386
|
+
);
|
|
5387
|
+
}
|
|
5233
5388
|
};
|
|
5234
5389
|
|
|
5235
5390
|
// src/resources/webhooks.ts
|
|
@@ -5968,6 +6123,110 @@ var ShopLabels = class {
|
|
|
5968
6123
|
}
|
|
5969
6124
|
};
|
|
5970
6125
|
|
|
6126
|
+
// src/resources/checkoutTemplates.ts
|
|
6127
|
+
var CheckoutTemplates = class {
|
|
6128
|
+
constructor(request) {
|
|
6129
|
+
this.request = request;
|
|
6130
|
+
}
|
|
6131
|
+
/**
|
|
6132
|
+
* The merchant's templates, each with the shops on it and whether each
|
|
6133
|
+
* runs the template's current settings.
|
|
6134
|
+
* `GET /checkout-templates/{merchantId}`
|
|
6135
|
+
*/
|
|
6136
|
+
async list(merchantId) {
|
|
6137
|
+
return this.request("GET", `/checkout-templates/${encodeURIComponent(merchantId)}`);
|
|
6138
|
+
}
|
|
6139
|
+
/**
|
|
6140
|
+
* Create a template, empty or copied from a shop's current settings. The
|
|
6141
|
+
* shop copied from is not changed.
|
|
6142
|
+
* `POST /checkout-templates/{merchantId}`
|
|
6143
|
+
*/
|
|
6144
|
+
async create(merchantId, params) {
|
|
6145
|
+
return this.request("POST", `/checkout-templates/${encodeURIComponent(merchantId)}`, {
|
|
6146
|
+
body: params
|
|
6147
|
+
});
|
|
6148
|
+
}
|
|
6149
|
+
/** `GET /checkout-templates/{merchantId}/{templateId}` */
|
|
6150
|
+
async retrieve(merchantId, templateId) {
|
|
6151
|
+
return this.request(
|
|
6152
|
+
"GET",
|
|
6153
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
6154
|
+
);
|
|
6155
|
+
}
|
|
6156
|
+
/**
|
|
6157
|
+
* Rename a template. A name another template of the merchant holds is
|
|
6158
|
+
* refused.
|
|
6159
|
+
* `POST /checkout-templates/{merchantId}/{templateId}`
|
|
6160
|
+
*/
|
|
6161
|
+
async rename(merchantId, templateId, params) {
|
|
6162
|
+
return this.request(
|
|
6163
|
+
"POST",
|
|
6164
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,
|
|
6165
|
+
{ body: params }
|
|
6166
|
+
);
|
|
6167
|
+
}
|
|
6168
|
+
/**
|
|
6169
|
+
* Delete a template. Refused while a shop is on it.
|
|
6170
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}`
|
|
6171
|
+
*/
|
|
6172
|
+
async delete(merchantId, templateId) {
|
|
6173
|
+
return this.request(
|
|
6174
|
+
"DELETE",
|
|
6175
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
|
|
6176
|
+
);
|
|
6177
|
+
}
|
|
6178
|
+
/**
|
|
6179
|
+
* Put shops on the template and copy its settings into them; a shop on
|
|
6180
|
+
* another template moves. Each shop is reported on its own: one with
|
|
6181
|
+
* `blockers` is left unchanged. `dry_run` changes nothing and reports what
|
|
6182
|
+
* would change.
|
|
6183
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/shops`
|
|
6184
|
+
*/
|
|
6185
|
+
async assign(merchantId, templateId, params) {
|
|
6186
|
+
return this.request(
|
|
6187
|
+
"POST",
|
|
6188
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,
|
|
6189
|
+
{
|
|
6190
|
+
body: params
|
|
6191
|
+
}
|
|
6192
|
+
);
|
|
6193
|
+
}
|
|
6194
|
+
/**
|
|
6195
|
+
* Take a shop off the template. It keeps every setting it has, as its own.
|
|
6196
|
+
* `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`
|
|
6197
|
+
*/
|
|
6198
|
+
async unassign(merchantId, templateId, profileId) {
|
|
6199
|
+
return this.request(
|
|
6200
|
+
"DELETE",
|
|
6201
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`
|
|
6202
|
+
);
|
|
6203
|
+
}
|
|
6204
|
+
/**
|
|
6205
|
+
* Copy the template's current settings into its shops, all or the ones
|
|
6206
|
+
* named.
|
|
6207
|
+
* `POST /checkout-templates/{merchantId}/{templateId}/apply`
|
|
6208
|
+
*/
|
|
6209
|
+
async apply(merchantId, templateId, params = {}) {
|
|
6210
|
+
return this.request(
|
|
6211
|
+
"POST",
|
|
6212
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,
|
|
6213
|
+
{
|
|
6214
|
+
body: params
|
|
6215
|
+
}
|
|
6216
|
+
);
|
|
6217
|
+
}
|
|
6218
|
+
/**
|
|
6219
|
+
* The template a shop is on, if any. Readable by the shop's own members.
|
|
6220
|
+
* `GET /checkout-templates/{merchantId}/shops/{profileId}`
|
|
6221
|
+
*/
|
|
6222
|
+
async ofShop(merchantId, profileId) {
|
|
6223
|
+
return this.request(
|
|
6224
|
+
"GET",
|
|
6225
|
+
`/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`
|
|
6226
|
+
);
|
|
6227
|
+
}
|
|
6228
|
+
};
|
|
6229
|
+
|
|
5971
6230
|
// src/resources/buyerConversations.ts
|
|
5972
6231
|
var BuyerConversations = class {
|
|
5973
6232
|
constructor(request) {
|
|
@@ -9219,6 +9478,167 @@ var Live = class {
|
|
|
9219
9478
|
}
|
|
9220
9479
|
};
|
|
9221
9480
|
|
|
9481
|
+
// src/resources/processorImports.ts
|
|
9482
|
+
function toPspImportStreamEvent(event) {
|
|
9483
|
+
switch (event.type) {
|
|
9484
|
+
case "progress": {
|
|
9485
|
+
let run;
|
|
9486
|
+
try {
|
|
9487
|
+
run = JSON.parse(event.data);
|
|
9488
|
+
} catch {
|
|
9489
|
+
return null;
|
|
9490
|
+
}
|
|
9491
|
+
if (run === null || typeof run !== "object" || Array.isArray(run)) return null;
|
|
9492
|
+
return { type: "progress", run };
|
|
9493
|
+
}
|
|
9494
|
+
case "done":
|
|
9495
|
+
return { type: "done" };
|
|
9496
|
+
default:
|
|
9497
|
+
return null;
|
|
9498
|
+
}
|
|
9499
|
+
}
|
|
9500
|
+
var PspImportEventStream = class {
|
|
9501
|
+
constructor(connection) {
|
|
9502
|
+
this.connection = connection;
|
|
9503
|
+
}
|
|
9504
|
+
/** Close the stream; the iteration ends without an error. */
|
|
9505
|
+
close() {
|
|
9506
|
+
this.connection.close();
|
|
9507
|
+
}
|
|
9508
|
+
[Symbol.asyncIterator]() {
|
|
9509
|
+
this.iterator ?? (this.iterator = this.events());
|
|
9510
|
+
return this.iterator;
|
|
9511
|
+
}
|
|
9512
|
+
async *events() {
|
|
9513
|
+
for await (const dispatch of this.connection.dispatches) {
|
|
9514
|
+
if (!dispatch.event) continue;
|
|
9515
|
+
const event = toPspImportStreamEvent(dispatch.event);
|
|
9516
|
+
if (event) yield event;
|
|
9517
|
+
}
|
|
9518
|
+
}
|
|
9519
|
+
};
|
|
9520
|
+
var ProcessorImports = class {
|
|
9521
|
+
constructor(request, openStream) {
|
|
9522
|
+
this.request = request;
|
|
9523
|
+
this.openStream = openStream;
|
|
9524
|
+
}
|
|
9525
|
+
/**
|
|
9526
|
+
* Every connected processor account the caller may see, with what each can
|
|
9527
|
+
* provide in the environment: listed, read payment by payment, or
|
|
9528
|
+
* unavailable with a reason.
|
|
9529
|
+
*
|
|
9530
|
+
* `GET /refunds-disputes/imports/sources`
|
|
9531
|
+
*/
|
|
9532
|
+
async sources(params) {
|
|
9533
|
+
return this.request("GET", "/refunds-disputes/imports/sources", {
|
|
9534
|
+
query: { test_mode: params.test_mode }
|
|
9535
|
+
});
|
|
9536
|
+
}
|
|
9537
|
+
/**
|
|
9538
|
+
* Start an import. A source a processor cannot provide is stored as
|
|
9539
|
+
* `unavailable` with its reason. Refused while another import of the
|
|
9540
|
+
* merchant runs in the same environment.
|
|
9541
|
+
*
|
|
9542
|
+
* `POST /refunds-disputes/imports`
|
|
9543
|
+
*/
|
|
9544
|
+
async create(request) {
|
|
9545
|
+
return this.request("POST", "/refunds-disputes/imports", { body: request });
|
|
9546
|
+
}
|
|
9547
|
+
/**
|
|
9548
|
+
* The newest import in the environment, running or finished.
|
|
9549
|
+
*
|
|
9550
|
+
* `GET /refunds-disputes/imports/latest`
|
|
9551
|
+
*/
|
|
9552
|
+
async latest(params) {
|
|
9553
|
+
return this.request("GET", "/refunds-disputes/imports/latest", {
|
|
9554
|
+
query: { test_mode: params.test_mode }
|
|
9555
|
+
});
|
|
9556
|
+
}
|
|
9557
|
+
/** `GET /refunds-disputes/imports/{id}` */
|
|
9558
|
+
async retrieve(id) {
|
|
9559
|
+
return this.request("GET", `/refunds-disputes/imports/${encodeURIComponent(id)}`);
|
|
9560
|
+
}
|
|
9561
|
+
/**
|
|
9562
|
+
* The records an import left out or could not record, each with its reason.
|
|
9563
|
+
*
|
|
9564
|
+
* `GET /refunds-disputes/imports/{id}/issues`
|
|
9565
|
+
*/
|
|
9566
|
+
async issues(id, params) {
|
|
9567
|
+
return this.request("GET", `/refunds-disputes/imports/${encodeURIComponent(id)}/issues`, {
|
|
9568
|
+
query: { limit: params?.limit, offset: params?.offset }
|
|
9569
|
+
});
|
|
9570
|
+
}
|
|
9571
|
+
/**
|
|
9572
|
+
* Ask a running import to stop. It stops after the page it is reading;
|
|
9573
|
+
* what it recorded stays recorded.
|
|
9574
|
+
*
|
|
9575
|
+
* `POST /refunds-disputes/imports/{id}/cancel`
|
|
9576
|
+
*/
|
|
9577
|
+
async cancel(id) {
|
|
9578
|
+
return this.request("POST", `/refunds-disputes/imports/${encodeURIComponent(id)}/cancel`);
|
|
9579
|
+
}
|
|
9580
|
+
/**
|
|
9581
|
+
* Open the progress stream of an import. Resolves once the server answered;
|
|
9582
|
+
* a `401` rejects with `DelopayAuthenticationError`.
|
|
9583
|
+
*
|
|
9584
|
+
* `GET /refunds-disputes/imports/{id}/stream`
|
|
9585
|
+
*
|
|
9586
|
+
* @example
|
|
9587
|
+
* ```typescript
|
|
9588
|
+
* const stream = await delopay.processorImports.stream(run.id, { signal });
|
|
9589
|
+
* for await (const event of stream) {
|
|
9590
|
+
* if (event.type === 'progress') render(event.run);
|
|
9591
|
+
* }
|
|
9592
|
+
* ```
|
|
9593
|
+
*/
|
|
9594
|
+
async stream(id, options = {}) {
|
|
9595
|
+
const connection = await this.openStream(
|
|
9596
|
+
`/refunds-disputes/imports/${encodeURIComponent(id)}/stream`,
|
|
9597
|
+
{
|
|
9598
|
+
...options.signal ? { signal: options.signal } : {},
|
|
9599
|
+
...options.idleTimeoutMs !== void 0 ? { idleTimeoutMs: options.idleTimeoutMs } : {},
|
|
9600
|
+
...options.headers ? { headers: options.headers } : {}
|
|
9601
|
+
}
|
|
9602
|
+
);
|
|
9603
|
+
return new PspImportEventStream(connection);
|
|
9604
|
+
}
|
|
9605
|
+
};
|
|
9606
|
+
|
|
9607
|
+
// src/resources/deploymentBranding.ts
|
|
9608
|
+
function brandingAssetPath(asset, version) {
|
|
9609
|
+
const path = `/branding/assets/${encodeURIComponent(asset)}`;
|
|
9610
|
+
return version ? `${path}?v=${encodeURIComponent(version)}` : path;
|
|
9611
|
+
}
|
|
9612
|
+
var Branding = class {
|
|
9613
|
+
constructor(request, baseUrl) {
|
|
9614
|
+
this.request = request;
|
|
9615
|
+
this.baseUrl = baseUrl;
|
|
9616
|
+
}
|
|
9617
|
+
/**
|
|
9618
|
+
* The saved branding. A `null` field means "keep your own default".
|
|
9619
|
+
*
|
|
9620
|
+
* Branding is cosmetic, so treat any failure as "nothing saved": routers
|
|
9621
|
+
* from before this route answer 404, and a page must never wait long for
|
|
9622
|
+
* it. Pass a `signal` (e.g. `AbortSignal.timeout(2500)`) to bound the call
|
|
9623
|
+
* including its retries; a `timeout` alone applies to each attempt.
|
|
9624
|
+
*
|
|
9625
|
+
* `GET /branding`
|
|
9626
|
+
*/
|
|
9627
|
+
async retrieve(options) {
|
|
9628
|
+
return this.request("GET", "/branding", { ...options });
|
|
9629
|
+
}
|
|
9630
|
+
/**
|
|
9631
|
+
* The address of one branding image or font file on this client's base
|
|
9632
|
+
* URL, for an `<img src>` or a `@font-face` `src`. See
|
|
9633
|
+
* {@link brandingAssetPath}.
|
|
9634
|
+
*
|
|
9635
|
+
* `GET /branding/assets/{asset}`
|
|
9636
|
+
*/
|
|
9637
|
+
assetUrl(asset, version) {
|
|
9638
|
+
return `${this.baseUrl}${brandingAssetPath(asset, version)}`;
|
|
9639
|
+
}
|
|
9640
|
+
};
|
|
9641
|
+
|
|
9222
9642
|
// src/client.ts
|
|
9223
9643
|
var PRODUCTION_URL = "https://api.delopay.net";
|
|
9224
9644
|
var SANDBOX_URL = "https://sandbox.delopay.net";
|
|
@@ -9498,6 +9918,8 @@ var Delopay = class {
|
|
|
9498
9918
|
this.messageTemplates = new MessageTemplates(request);
|
|
9499
9919
|
this.risk = new Risk(request);
|
|
9500
9920
|
this.live = new Live(request, openStream);
|
|
9921
|
+
this.processorImports = new ProcessorImports(request, openStream);
|
|
9922
|
+
this.branding = new Branding(request, this.baseUrl);
|
|
9501
9923
|
this.subscriptions = new Subscriptions(request);
|
|
9502
9924
|
this.buyerPortal = new BuyerPortal(request);
|
|
9503
9925
|
this.buyerAccount = new BuyerAccount(request);
|
|
@@ -9509,6 +9931,7 @@ var Delopay = class {
|
|
|
9509
9931
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
9510
9932
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
9511
9933
|
this.shopLabels = new ShopLabels(request);
|
|
9934
|
+
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
9512
9935
|
this.buyerConversations = new BuyerConversations(request);
|
|
9513
9936
|
this.buyerEvidence = new BuyerEvidenceReviews(request);
|
|
9514
9937
|
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
@@ -13780,6 +14203,25 @@ var CheckoutSession = class {
|
|
|
13780
14203
|
headers: this.bearerHeaders(options?.headers)
|
|
13781
14204
|
});
|
|
13782
14205
|
}
|
|
14206
|
+
/**
|
|
14207
|
+
* Reserve this payment attempt before a hosted card form contacts Stripe,
|
|
14208
|
+
* Airwallex, or NomuPay. Send the provider object rendered to this checkout
|
|
14209
|
+
* and retain the same `flow_id` across retries and any 3-D Secure step.
|
|
14210
|
+
*
|
|
14211
|
+
* Only `authorized: true` permits the form to contact its processor. A
|
|
14212
|
+
* competing flow receives `false` and must reload; an unresolved provider
|
|
14213
|
+
* outcome stays reserved, regardless of elapsed time. A buyer-blocklist
|
|
14214
|
+
* refusal throws a `DelopayError` with code `DE_14`.
|
|
14215
|
+
*
|
|
14216
|
+
* `POST /payment-link/{merchantId}/{paymentId}/browser-card-claim`
|
|
14217
|
+
*/
|
|
14218
|
+
async claimBrowserCard(params, options) {
|
|
14219
|
+
return this.client.request("POST", `${this.linkBase}/browser-card-claim`, {
|
|
14220
|
+
body: params,
|
|
14221
|
+
...options,
|
|
14222
|
+
headers: this.bearerHeaders(options?.headers)
|
|
14223
|
+
});
|
|
14224
|
+
}
|
|
13783
14225
|
/**
|
|
13784
14226
|
* Confirm the Stripe card form's PaymentIntent through the router, for a
|
|
13785
14227
|
* checkout payload with `card_connector_server_confirm: true`. Stripe refuses
|
|
@@ -13801,6 +14243,10 @@ var CheckoutSession = class {
|
|
|
13801
14243
|
* and that secret confirms nothing without the secret key — then call this
|
|
13802
14244
|
* again without a payment method to finalize.
|
|
13803
14245
|
*
|
|
14246
|
+
* Reserve the attempt with {@link claimBrowserCard} first. Send its granted
|
|
14247
|
+
* `flow_id` as `browser_flow_id` on both the initial and post-action confirm;
|
|
14248
|
+
* an omitted, null or nonholder flow is refused with `400` and code `IR_16`.
|
|
14249
|
+
*
|
|
13804
14250
|
* A PaymentMethod rules out what `stripe.createPaymentMethod` cannot
|
|
13805
14251
|
* produce: Stripe names Amazon Pay and Klarna in the Express Checkout
|
|
13806
14252
|
* Element, which need `stripe.createConfirmationToken` instead. Neither can
|
|
@@ -14664,6 +15110,7 @@ export {
|
|
|
14664
15110
|
SellToRestrictions,
|
|
14665
15111
|
BuyerBlocklist,
|
|
14666
15112
|
ShopLabels,
|
|
15113
|
+
CheckoutTemplates,
|
|
14667
15114
|
BuyerConversations,
|
|
14668
15115
|
BuyerEvidenceReviews,
|
|
14669
15116
|
CheckoutRecovery,
|
|
@@ -14684,6 +15131,10 @@ export {
|
|
|
14684
15131
|
LiveEventStream,
|
|
14685
15132
|
openLiveStream,
|
|
14686
15133
|
Live,
|
|
15134
|
+
PspImportEventStream,
|
|
15135
|
+
ProcessorImports,
|
|
15136
|
+
brandingAssetPath,
|
|
15137
|
+
Branding,
|
|
14687
15138
|
Delopay,
|
|
14688
15139
|
leaf,
|
|
14689
15140
|
allOf,
|
|
@@ -14903,4 +15354,4 @@ export {
|
|
|
14903
15354
|
decodeNativePanes,
|
|
14904
15355
|
encodeNativePanes
|
|
14905
15356
|
};
|
|
14906
|
-
//# sourceMappingURL=chunk-
|
|
15357
|
+
//# sourceMappingURL=chunk-7QXWTMSG.js.map
|