@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
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
CUSTOM_FIELD_VALUELESS_OPERATORS,
|
|
37
37
|
Cards,
|
|
38
38
|
CheckoutMethods,
|
|
39
|
+
CheckoutRecovery,
|
|
39
40
|
CheckoutSession,
|
|
40
41
|
CostRules,
|
|
41
42
|
DEFAULT_BADGES,
|
|
@@ -61,6 +62,7 @@ import {
|
|
|
61
62
|
MAX_SECTION_ORDER,
|
|
62
63
|
METHOD_SECTIONS,
|
|
63
64
|
MIN_SECTION_ORDER,
|
|
65
|
+
MessageTemplates,
|
|
64
66
|
NATIVE_ELEMENT_POSITIONS,
|
|
65
67
|
NATIVE_PANES_MAX,
|
|
66
68
|
NATIVE_PANE_CATEGORY_KEYS,
|
|
@@ -218,7 +220,7 @@ import {
|
|
|
218
220
|
validatePanes,
|
|
219
221
|
verticalGapValue,
|
|
220
222
|
visibleCustomFields
|
|
221
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-RG4EO47H.js";
|
|
222
224
|
export {
|
|
223
225
|
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
224
226
|
AIRWALLEX_CARD_LAYOUTS,
|
|
@@ -257,6 +259,7 @@ export {
|
|
|
257
259
|
CUSTOM_FIELD_VALUELESS_OPERATORS,
|
|
258
260
|
Cards,
|
|
259
261
|
CheckoutMethods,
|
|
262
|
+
CheckoutRecovery,
|
|
260
263
|
CheckoutSession,
|
|
261
264
|
CostRules,
|
|
262
265
|
DEFAULT_BADGES,
|
|
@@ -282,6 +285,7 @@ export {
|
|
|
282
285
|
MAX_SECTION_ORDER,
|
|
283
286
|
METHOD_SECTIONS,
|
|
284
287
|
MIN_SECTION_ORDER,
|
|
288
|
+
MessageTemplates,
|
|
285
289
|
NATIVE_ELEMENT_POSITIONS,
|
|
286
290
|
NATIVE_PANES_MAX,
|
|
287
291
|
NATIVE_PANE_CATEGORY_KEYS,
|
package/dist/internal.cjs
CHANGED
|
@@ -62,6 +62,7 @@ __export(internal_exports, {
|
|
|
62
62
|
CardIssuers: () => CardIssuers,
|
|
63
63
|
Cards: () => Cards,
|
|
64
64
|
CheckoutMethods: () => CheckoutMethods,
|
|
65
|
+
CheckoutRecovery: () => CheckoutRecovery,
|
|
65
66
|
CheckoutSession: () => CheckoutSession,
|
|
66
67
|
Configs: () => Configs,
|
|
67
68
|
ConnectorRestrictionRules: () => ConnectorRestrictionRules,
|
|
@@ -93,6 +94,7 @@ __export(internal_exports, {
|
|
|
93
94
|
MAX_SECTION_ORDER: () => MAX_SECTION_ORDER,
|
|
94
95
|
METHOD_SECTIONS: () => METHOD_SECTIONS,
|
|
95
96
|
MIN_SECTION_ORDER: () => MIN_SECTION_ORDER,
|
|
97
|
+
MessageTemplates: () => MessageTemplates,
|
|
96
98
|
NATIVE_ELEMENT_POSITIONS: () => NATIVE_ELEMENT_POSITIONS,
|
|
97
99
|
NATIVE_PANES_MAX: () => NATIVE_PANES_MAX,
|
|
98
100
|
NATIVE_PANE_CATEGORY_KEYS: () => NATIVE_PANE_CATEGORY_KEYS,
|
|
@@ -114,6 +116,7 @@ __export(internal_exports, {
|
|
|
114
116
|
PaypalDisputes: () => PaypalDisputes,
|
|
115
117
|
PlatformBilling: () => PlatformBilling,
|
|
116
118
|
PlatformFees: () => PlatformFees,
|
|
119
|
+
PlatformMessageTemplates: () => PlatformMessageTemplates,
|
|
117
120
|
PlatformSettings: () => PlatformSettings,
|
|
118
121
|
ProcessorCosts: () => ProcessorCosts,
|
|
119
122
|
Products: () => Products,
|
|
@@ -5285,6 +5288,94 @@ var SellToRestrictions = class {
|
|
|
5285
5288
|
}
|
|
5286
5289
|
};
|
|
5287
5290
|
|
|
5291
|
+
// src/resources/checkoutRecovery.ts
|
|
5292
|
+
var CheckoutRecovery = class {
|
|
5293
|
+
constructor(request) {
|
|
5294
|
+
this.request = request;
|
|
5295
|
+
}
|
|
5296
|
+
/**
|
|
5297
|
+
* A checkout's recovery: whether and when the rule reminds it, every reason
|
|
5298
|
+
* it does not, every message about it, and where its link goes. Any payment
|
|
5299
|
+
* of the checkout may be named.
|
|
5300
|
+
* `GET /checkout-recovery/payments/{payment_id}`
|
|
5301
|
+
*/
|
|
5302
|
+
async retrieve(paymentId) {
|
|
5303
|
+
return this.request("GET", `/checkout-recovery/payments/${encodeURIComponent(paymentId)}`);
|
|
5304
|
+
}
|
|
5305
|
+
/**
|
|
5306
|
+
* No automatic reminder about this checkout from now on.
|
|
5307
|
+
* `POST /checkout-recovery/payments/{payment_id}/stop`
|
|
5308
|
+
*/
|
|
5309
|
+
async stop(paymentId) {
|
|
5310
|
+
return this.request(
|
|
5311
|
+
"POST",
|
|
5312
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/stop`
|
|
5313
|
+
);
|
|
5314
|
+
}
|
|
5315
|
+
/**
|
|
5316
|
+
* Undo `stop`.
|
|
5317
|
+
* `POST /checkout-recovery/payments/{payment_id}/resume`
|
|
5318
|
+
*/
|
|
5319
|
+
async resume(paymentId) {
|
|
5320
|
+
return this.request(
|
|
5321
|
+
"POST",
|
|
5322
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/resume`
|
|
5323
|
+
);
|
|
5324
|
+
}
|
|
5325
|
+
/**
|
|
5326
|
+
* A message by hand as it would be sent now: recipient, sender, text, link
|
|
5327
|
+
* and destination, and why it would be refused. Nothing is sent.
|
|
5328
|
+
* `POST /checkout-recovery/payments/{payment_id}/email/preview`
|
|
5329
|
+
*/
|
|
5330
|
+
async previewEmail(paymentId, params) {
|
|
5331
|
+
return this.request(
|
|
5332
|
+
"POST",
|
|
5333
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email/preview`,
|
|
5334
|
+
{ body: params }
|
|
5335
|
+
);
|
|
5336
|
+
}
|
|
5337
|
+
/**
|
|
5338
|
+
* Send a message by hand, once per `idempotency_key`, composed again from
|
|
5339
|
+
* the checkout as it is now. Refused when the checkout was paid or is being
|
|
5340
|
+
* paid, was cancelled, the buyer unsubscribed, or no payment method could
|
|
5341
|
+
* pay it.
|
|
5342
|
+
* `POST /checkout-recovery/payments/{payment_id}/email`
|
|
5343
|
+
*/
|
|
5344
|
+
async sendEmail(paymentId, params) {
|
|
5345
|
+
return this.request(
|
|
5346
|
+
"POST",
|
|
5347
|
+
`/checkout-recovery/payments/${encodeURIComponent(paymentId)}/email`,
|
|
5348
|
+
{ body: params, bodyIdempotencyKey: params.idempotency_key ?? null }
|
|
5349
|
+
);
|
|
5350
|
+
}
|
|
5351
|
+
/**
|
|
5352
|
+
* Messages to buyers, newest first.
|
|
5353
|
+
* `GET /checkout-recovery/reminders`
|
|
5354
|
+
*/
|
|
5355
|
+
async listReminders(params) {
|
|
5356
|
+
if (params) {
|
|
5357
|
+
return this.request("GET", "/checkout-recovery/reminders", { query: { ...params } });
|
|
5358
|
+
}
|
|
5359
|
+
return this.request("GET", "/checkout-recovery/reminders");
|
|
5360
|
+
}
|
|
5361
|
+
/**
|
|
5362
|
+
* The shop's recent checkouts judged under a rule (the stored one, or the
|
|
5363
|
+
* one given) as if switched on, with every reason. Nothing is sent.
|
|
5364
|
+
* `POST /checkout-recovery/candidates`
|
|
5365
|
+
*/
|
|
5366
|
+
async previewCandidates(params = {}) {
|
|
5367
|
+
return this.request("POST", "/checkout-recovery/candidates", { body: params });
|
|
5368
|
+
}
|
|
5369
|
+
/**
|
|
5370
|
+
* A reminder with sample values, to the signed-in user's own address.
|
|
5371
|
+
* Dashboard sessions only.
|
|
5372
|
+
* `POST /checkout-recovery/test-email`
|
|
5373
|
+
*/
|
|
5374
|
+
async sendTestEmail(params) {
|
|
5375
|
+
return this.request("POST", "/checkout-recovery/test-email", { body: params });
|
|
5376
|
+
}
|
|
5377
|
+
};
|
|
5378
|
+
|
|
5288
5379
|
// src/resources/costRules.ts
|
|
5289
5380
|
var CostRules = class {
|
|
5290
5381
|
constructor(request) {
|
|
@@ -7476,6 +7567,71 @@ var Settings = class {
|
|
|
7476
7567
|
}
|
|
7477
7568
|
};
|
|
7478
7569
|
|
|
7570
|
+
// src/resources/messageTemplates.ts
|
|
7571
|
+
var MessageTemplates = class {
|
|
7572
|
+
constructor(request) {
|
|
7573
|
+
this.request = request;
|
|
7574
|
+
}
|
|
7575
|
+
/** `GET /message-templates/shops/{profile_id}` */
|
|
7576
|
+
async listShop(profileId) {
|
|
7577
|
+
return this.request("GET", `/message-templates/shops/${encodeURIComponent(profileId)}`);
|
|
7578
|
+
}
|
|
7579
|
+
/** `GET /message-templates/shops/{profile_id}/{template_id}` */
|
|
7580
|
+
async retrieveShop(profileId, templateId) {
|
|
7581
|
+
return this.request(
|
|
7582
|
+
"GET",
|
|
7583
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}`
|
|
7584
|
+
);
|
|
7585
|
+
}
|
|
7586
|
+
/**
|
|
7587
|
+
* Store the shop's text in one language.
|
|
7588
|
+
*
|
|
7589
|
+
* `PUT /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
|
|
7590
|
+
*/
|
|
7591
|
+
async updateShopLanguage(profileId, templateId, language, params) {
|
|
7592
|
+
return this.request(
|
|
7593
|
+
"PUT",
|
|
7594
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
|
|
7595
|
+
{ body: params }
|
|
7596
|
+
);
|
|
7597
|
+
}
|
|
7598
|
+
/**
|
|
7599
|
+
* Remove the shop's text in one language, so the platform's or the built-in
|
|
7600
|
+
* text applies.
|
|
7601
|
+
*
|
|
7602
|
+
* `DELETE /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
|
|
7603
|
+
*/
|
|
7604
|
+
async resetShopLanguage(profileId, templateId, language, params = {}) {
|
|
7605
|
+
return this.request(
|
|
7606
|
+
"DELETE",
|
|
7607
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
|
|
7608
|
+
{ query: { expected_revision: params.expected_revision } }
|
|
7609
|
+
);
|
|
7610
|
+
}
|
|
7611
|
+
/** `POST /message-templates/shops/{profile_id}/{template_id}/preview` */
|
|
7612
|
+
async previewShop(profileId, templateId, params) {
|
|
7613
|
+
return this.request(
|
|
7614
|
+
"POST",
|
|
7615
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/preview`,
|
|
7616
|
+
{
|
|
7617
|
+
body: params
|
|
7618
|
+
}
|
|
7619
|
+
);
|
|
7620
|
+
}
|
|
7621
|
+
/**
|
|
7622
|
+
* Send the template to the signed-in user's own address.
|
|
7623
|
+
*
|
|
7624
|
+
* `POST /message-templates/shops/{profile_id}/{template_id}/test`
|
|
7625
|
+
*/
|
|
7626
|
+
async sendShopTest(profileId, templateId, params) {
|
|
7627
|
+
return this.request(
|
|
7628
|
+
"POST",
|
|
7629
|
+
`/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/test`,
|
|
7630
|
+
{ body: params }
|
|
7631
|
+
);
|
|
7632
|
+
}
|
|
7633
|
+
};
|
|
7634
|
+
|
|
7479
7635
|
// src/resources/risk.ts
|
|
7480
7636
|
var Risk = class {
|
|
7481
7637
|
constructor(request) {
|
|
@@ -7738,6 +7894,7 @@ var Delopay = class {
|
|
|
7738
7894
|
this.settlement = new Settlement(request);
|
|
7739
7895
|
this.operationLimits = new OperationLimits(request);
|
|
7740
7896
|
this.settings = new Settings(request);
|
|
7897
|
+
this.messageTemplates = new MessageTemplates(request);
|
|
7741
7898
|
this.risk = new Risk(request);
|
|
7742
7899
|
this.subscriptions = new Subscriptions(request);
|
|
7743
7900
|
this.buyerPortal = new BuyerPortal(request);
|
|
@@ -7747,6 +7904,7 @@ var Delopay = class {
|
|
|
7747
7904
|
this.regions = new Regions(request);
|
|
7748
7905
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
7749
7906
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
7907
|
+
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
7750
7908
|
this.costRules = new CostRules(request);
|
|
7751
7909
|
this.externalRecords = new ExternalRecords(request);
|
|
7752
7910
|
this.products = new Products(request);
|
|
@@ -13068,6 +13226,69 @@ function projectQuery2(query) {
|
|
|
13068
13226
|
return query.project_id ? { project_id: query.project_id } : {};
|
|
13069
13227
|
}
|
|
13070
13228
|
|
|
13229
|
+
// src/internal/resources/platformMessageTemplates.ts
|
|
13230
|
+
var PlatformMessageTemplates = class {
|
|
13231
|
+
constructor(request) {
|
|
13232
|
+
this.request = request;
|
|
13233
|
+
}
|
|
13234
|
+
/** `GET /admin-portal/message-templates` */
|
|
13235
|
+
async list() {
|
|
13236
|
+
return this.request("GET", "/admin-portal/message-templates");
|
|
13237
|
+
}
|
|
13238
|
+
/** `GET /admin-portal/message-templates/{template_id}` */
|
|
13239
|
+
async retrieve(templateId) {
|
|
13240
|
+
return this.request("GET", `/admin-portal/message-templates/${encodeURIComponent(templateId)}`);
|
|
13241
|
+
}
|
|
13242
|
+
/**
|
|
13243
|
+
* Store the platform's text in one language.
|
|
13244
|
+
*
|
|
13245
|
+
* `PUT /admin-portal/message-templates/{template_id}/languages/{language}`
|
|
13246
|
+
*/
|
|
13247
|
+
async updateLanguage(templateId, language, params) {
|
|
13248
|
+
return this.request(
|
|
13249
|
+
"PUT",
|
|
13250
|
+
`/admin-portal/message-templates/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
|
|
13251
|
+
{
|
|
13252
|
+
body: params
|
|
13253
|
+
}
|
|
13254
|
+
);
|
|
13255
|
+
}
|
|
13256
|
+
/**
|
|
13257
|
+
* Remove the platform's text in one language, so the built-in text applies.
|
|
13258
|
+
*
|
|
13259
|
+
* `DELETE /admin-portal/message-templates/{template_id}/languages/{language}`
|
|
13260
|
+
*/
|
|
13261
|
+
async resetLanguage(templateId, language, params = {}) {
|
|
13262
|
+
return this.request(
|
|
13263
|
+
"DELETE",
|
|
13264
|
+
`/admin-portal/message-templates/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
|
|
13265
|
+
{
|
|
13266
|
+
query: { expected_revision: params.expected_revision }
|
|
13267
|
+
}
|
|
13268
|
+
);
|
|
13269
|
+
}
|
|
13270
|
+
/** `POST /admin-portal/message-templates/{template_id}/preview` */
|
|
13271
|
+
async preview(templateId, params) {
|
|
13272
|
+
return this.request(
|
|
13273
|
+
"POST",
|
|
13274
|
+
`/admin-portal/message-templates/${encodeURIComponent(templateId)}/preview`,
|
|
13275
|
+
{ body: params }
|
|
13276
|
+
);
|
|
13277
|
+
}
|
|
13278
|
+
/**
|
|
13279
|
+
* Send the template to the signed-in admin's own address.
|
|
13280
|
+
*
|
|
13281
|
+
* `POST /admin-portal/message-templates/{template_id}/test`
|
|
13282
|
+
*/
|
|
13283
|
+
async sendTest(templateId, params) {
|
|
13284
|
+
return this.request(
|
|
13285
|
+
"POST",
|
|
13286
|
+
`/admin-portal/message-templates/${encodeURIComponent(templateId)}/test`,
|
|
13287
|
+
{ body: params }
|
|
13288
|
+
);
|
|
13289
|
+
}
|
|
13290
|
+
};
|
|
13291
|
+
|
|
13071
13292
|
// src/internal/resources/nativeRenewals.ts
|
|
13072
13293
|
var NativeRenewals = class {
|
|
13073
13294
|
constructor(request, serviceKey) {
|
|
@@ -13106,6 +13327,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
13106
13327
|
this.platformBilling = new PlatformBilling(request);
|
|
13107
13328
|
this.platformFees = new PlatformFees(request);
|
|
13108
13329
|
this.platformSettings = new PlatformSettings(request);
|
|
13330
|
+
this.platformMessageTemplates = new PlatformMessageTemplates(request);
|
|
13109
13331
|
this.nativeRenewals = new NativeRenewals(request, args[0] ?? "");
|
|
13110
13332
|
}
|
|
13111
13333
|
};
|
|
@@ -13153,6 +13375,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
13153
13375
|
CardIssuers,
|
|
13154
13376
|
Cards,
|
|
13155
13377
|
CheckoutMethods,
|
|
13378
|
+
CheckoutRecovery,
|
|
13156
13379
|
CheckoutSession,
|
|
13157
13380
|
Configs,
|
|
13158
13381
|
ConnectorRestrictionRules,
|
|
@@ -13184,6 +13407,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
13184
13407
|
MAX_SECTION_ORDER,
|
|
13185
13408
|
METHOD_SECTIONS,
|
|
13186
13409
|
MIN_SECTION_ORDER,
|
|
13410
|
+
MessageTemplates,
|
|
13187
13411
|
NATIVE_ELEMENT_POSITIONS,
|
|
13188
13412
|
NATIVE_PANES_MAX,
|
|
13189
13413
|
NATIVE_PANE_CATEGORY_KEYS,
|
|
@@ -13205,6 +13429,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
13205
13429
|
PaypalDisputes,
|
|
13206
13430
|
PlatformBilling,
|
|
13207
13431
|
PlatformFees,
|
|
13432
|
+
PlatformMessageTemplates,
|
|
13208
13433
|
PlatformSettings,
|
|
13209
13434
|
ProcessorCosts,
|
|
13210
13435
|
Products,
|