@delopay/sdk 0.212.0 → 0.214.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-UKKUBVQJ.js → chunk-RG4EO47H.js} +158 -1
- package/dist/chunk-RG4EO47H.js.map +1 -0
- package/dist/index.cjs +159 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +548 -1
- package/dist/index.d.ts +548 -1
- package/dist/index.js +5 -1
- package/dist/internal.cjs +225 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +45 -3
- package/dist/internal.d.ts +45 -3
- package/dist/internal.js +70 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-UKKUBVQJ.js.map +0 -1
|
@@ -5026,6 +5026,94 @@ var SellToRestrictions = class {
|
|
|
5026
5026
|
}
|
|
5027
5027
|
};
|
|
5028
5028
|
|
|
5029
|
+
// src/resources/checkoutRecovery.ts
|
|
5030
|
+
var CheckoutRecovery = class {
|
|
5031
|
+
constructor(request) {
|
|
5032
|
+
this.request = request;
|
|
5033
|
+
}
|
|
5034
|
+
/**
|
|
5035
|
+
* A checkout's recovery: whether and when the rule reminds it, every reason
|
|
5036
|
+
* it does not, every message about it, and where its link goes. Any payment
|
|
5037
|
+
* of the checkout may be named.
|
|
5038
|
+
* `GET /checkout-recovery/payments/{payment_id}`
|
|
5039
|
+
*/
|
|
5040
|
+
async retrieve(paymentId) {
|
|
5041
|
+
return this.request("GET", `/checkout-recovery/payments/${encodeURIComponent(paymentId)}`);
|
|
5042
|
+
}
|
|
5043
|
+
/**
|
|
5044
|
+
* No automatic reminder about this checkout from now on.
|
|
5045
|
+
* `POST /checkout-recovery/payments/{payment_id}/stop`
|
|
5046
|
+
*/
|
|
5047
|
+
async stop(paymentId) {
|
|
5048
|
+
return this.request(
|
|
5049
|
+
"POST",
|
|
5050
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/stop`
|
|
5051
|
+
);
|
|
5052
|
+
}
|
|
5053
|
+
/**
|
|
5054
|
+
* Undo `stop`.
|
|
5055
|
+
* `POST /checkout-recovery/payments/{payment_id}/resume`
|
|
5056
|
+
*/
|
|
5057
|
+
async resume(paymentId) {
|
|
5058
|
+
return this.request(
|
|
5059
|
+
"POST",
|
|
5060
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/resume`
|
|
5061
|
+
);
|
|
5062
|
+
}
|
|
5063
|
+
/**
|
|
5064
|
+
* A message by hand as it would be sent now: recipient, sender, text, link
|
|
5065
|
+
* and destination, and why it would be refused. Nothing is sent.
|
|
5066
|
+
* `POST /checkout-recovery/payments/{payment_id}/email/preview`
|
|
5067
|
+
*/
|
|
5068
|
+
async previewEmail(paymentId, params) {
|
|
5069
|
+
return this.request(
|
|
5070
|
+
"POST",
|
|
5071
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email/preview`,
|
|
5072
|
+
{ body: params }
|
|
5073
|
+
);
|
|
5074
|
+
}
|
|
5075
|
+
/**
|
|
5076
|
+
* Send a message by hand, once per `idempotency_key`, composed again from
|
|
5077
|
+
* the checkout as it is now. Refused when the checkout was paid or is being
|
|
5078
|
+
* paid, was cancelled, the buyer unsubscribed, or no payment method could
|
|
5079
|
+
* pay it.
|
|
5080
|
+
* `POST /checkout-recovery/payments/{payment_id}/email`
|
|
5081
|
+
*/
|
|
5082
|
+
async sendEmail(paymentId, params) {
|
|
5083
|
+
return this.request(
|
|
5084
|
+
"POST",
|
|
5085
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email`,
|
|
5086
|
+
{ body: params, bodyIdempotencyKey: params.idempotency_key ?? null }
|
|
5087
|
+
);
|
|
5088
|
+
}
|
|
5089
|
+
/**
|
|
5090
|
+
* Messages to buyers, newest first.
|
|
5091
|
+
* `GET /checkout-recovery/reminders`
|
|
5092
|
+
*/
|
|
5093
|
+
async listReminders(params) {
|
|
5094
|
+
if (params) {
|
|
5095
|
+
return this.request("GET", "/checkout-recovery/reminders", { query: { ...params } });
|
|
5096
|
+
}
|
|
5097
|
+
return this.request("GET", "/checkout-recovery/reminders");
|
|
5098
|
+
}
|
|
5099
|
+
/**
|
|
5100
|
+
* The shop's recent checkouts judged under a rule (the stored one, or the
|
|
5101
|
+
* one given) as if switched on, with every reason. Nothing is sent.
|
|
5102
|
+
* `POST /checkout-recovery/candidates`
|
|
5103
|
+
*/
|
|
5104
|
+
async previewCandidates(params = {}) {
|
|
5105
|
+
return this.request("POST", "/checkout-recovery/candidates", { body: params });
|
|
5106
|
+
}
|
|
5107
|
+
/**
|
|
5108
|
+
* A reminder with sample values, to the signed-in user's own address.
|
|
5109
|
+
* Dashboard sessions only.
|
|
5110
|
+
* `POST /checkout-recovery/test-email`
|
|
5111
|
+
*/
|
|
5112
|
+
async sendTestEmail(params) {
|
|
5113
|
+
return this.request("POST", "/checkout-recovery/test-email", { body: params });
|
|
5114
|
+
}
|
|
5115
|
+
};
|
|
5116
|
+
|
|
5029
5117
|
// src/resources/costRules.ts
|
|
5030
5118
|
var CostRules = class {
|
|
5031
5119
|
constructor(request) {
|
|
@@ -7217,6 +7305,71 @@ var Settings = class {
|
|
|
7217
7305
|
}
|
|
7218
7306
|
};
|
|
7219
7307
|
|
|
7308
|
+
// src/resources/messageTemplates.ts
|
|
7309
|
+
var MessageTemplates = class {
|
|
7310
|
+
constructor(request) {
|
|
7311
|
+
this.request = request;
|
|
7312
|
+
}
|
|
7313
|
+
/** `GET /message-templates/shops/{profile_id}` */
|
|
7314
|
+
async listShop(profileId) {
|
|
7315
|
+
return this.request("GET", `/message-templates/shops/${encodeURIComponent(profileId)}`);
|
|
7316
|
+
}
|
|
7317
|
+
/** `GET /message-templates/shops/{profile_id}/{template_id}` */
|
|
7318
|
+
async retrieveShop(profileId, templateId) {
|
|
7319
|
+
return this.request(
|
|
7320
|
+
"GET",
|
|
7321
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}`
|
|
7322
|
+
);
|
|
7323
|
+
}
|
|
7324
|
+
/**
|
|
7325
|
+
* Store the shop's text in one language.
|
|
7326
|
+
*
|
|
7327
|
+
* `PUT /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
|
|
7328
|
+
*/
|
|
7329
|
+
async updateShopLanguage(profileId, templateId, language, params) {
|
|
7330
|
+
return this.request(
|
|
7331
|
+
"PUT",
|
|
7332
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
|
|
7333
|
+
{ body: params }
|
|
7334
|
+
);
|
|
7335
|
+
}
|
|
7336
|
+
/**
|
|
7337
|
+
* Remove the shop's text in one language, so the platform's or the built-in
|
|
7338
|
+
* text applies.
|
|
7339
|
+
*
|
|
7340
|
+
* `DELETE /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
|
|
7341
|
+
*/
|
|
7342
|
+
async resetShopLanguage(profileId, templateId, language, params = {}) {
|
|
7343
|
+
return this.request(
|
|
7344
|
+
"DELETE",
|
|
7345
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
|
|
7346
|
+
{ query: { expected_revision: params.expected_revision } }
|
|
7347
|
+
);
|
|
7348
|
+
}
|
|
7349
|
+
/** `POST /message-templates/shops/{profile_id}/{template_id}/preview` */
|
|
7350
|
+
async previewShop(profileId, templateId, params) {
|
|
7351
|
+
return this.request(
|
|
7352
|
+
"POST",
|
|
7353
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/preview`,
|
|
7354
|
+
{
|
|
7355
|
+
body: params
|
|
7356
|
+
}
|
|
7357
|
+
);
|
|
7358
|
+
}
|
|
7359
|
+
/**
|
|
7360
|
+
* Send the template to the signed-in user's own address.
|
|
7361
|
+
*
|
|
7362
|
+
* `POST /message-templates/shops/{profile_id}/{template_id}/test`
|
|
7363
|
+
*/
|
|
7364
|
+
async sendShopTest(profileId, templateId, params) {
|
|
7365
|
+
return this.request(
|
|
7366
|
+
"POST",
|
|
7367
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/test`,
|
|
7368
|
+
{ body: params }
|
|
7369
|
+
);
|
|
7370
|
+
}
|
|
7371
|
+
};
|
|
7372
|
+
|
|
7220
7373
|
// src/resources/risk.ts
|
|
7221
7374
|
var Risk = class {
|
|
7222
7375
|
constructor(request) {
|
|
@@ -7479,6 +7632,7 @@ var Delopay = class {
|
|
|
7479
7632
|
this.settlement = new Settlement(request);
|
|
7480
7633
|
this.operationLimits = new OperationLimits(request);
|
|
7481
7634
|
this.settings = new Settings(request);
|
|
7635
|
+
this.messageTemplates = new MessageTemplates(request);
|
|
7482
7636
|
this.risk = new Risk(request);
|
|
7483
7637
|
this.subscriptions = new Subscriptions(request);
|
|
7484
7638
|
this.buyerPortal = new BuyerPortal(request);
|
|
@@ -7488,6 +7642,7 @@ var Delopay = class {
|
|
|
7488
7642
|
this.regions = new Regions(request);
|
|
7489
7643
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
7490
7644
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
7645
|
+
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
7491
7646
|
this.costRules = new CostRules(request);
|
|
7492
7647
|
this.externalRecords = new ExternalRecords(request);
|
|
7493
7648
|
this.products = new Products(request);
|
|
@@ -11489,6 +11644,7 @@ export {
|
|
|
11489
11644
|
Regions,
|
|
11490
11645
|
AvailabilityOverrides,
|
|
11491
11646
|
SellToRestrictions,
|
|
11647
|
+
CheckoutRecovery,
|
|
11492
11648
|
CostRules,
|
|
11493
11649
|
ExternalRecords,
|
|
11494
11650
|
Products,
|
|
@@ -11501,6 +11657,7 @@ export {
|
|
|
11501
11657
|
Settlement,
|
|
11502
11658
|
OperationLimits,
|
|
11503
11659
|
Settings,
|
|
11660
|
+
MessageTemplates,
|
|
11504
11661
|
Risk,
|
|
11505
11662
|
Delopay,
|
|
11506
11663
|
leaf,
|
|
@@ -11692,4 +11849,4 @@ export {
|
|
|
11692
11849
|
decodeNativePanes,
|
|
11693
11850
|
encodeNativePanes
|
|
11694
11851
|
};
|
|
11695
|
-
//# sourceMappingURL=chunk-
|
|
11852
|
+
//# sourceMappingURL=chunk-RG4EO47H.js.map
|