@delopay/sdk 0.213.0 → 0.215.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.
@@ -5060,6 +5060,36 @@ var CheckoutRecovery = class {
5060
5060
  `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/resume`
5061
5061
  );
5062
5062
  }
5063
+ /**
5064
+ * Whether the checkout can be reactivated now, why not when it cannot, and
5065
+ * what it would continue: order, amount, the current page's expiry and the
5066
+ * validity a reactivation gives. Changes nothing.
5067
+ * `GET /checkout-recovery/payments/{payment_id}/reactivation`
5068
+ */
5069
+ async previewReactivation(paymentId) {
5070
+ return this.request(
5071
+ "GET",
5072
+ `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/reactivation`
5073
+ );
5074
+ }
5075
+ /**
5076
+ * Continue an expired, unpaid checkout on a new payment for the same order,
5077
+ * amount and currency. The payment it replaces is closed first, so the two
5078
+ * can never both be charged; nothing is charged and nothing is sent to the
5079
+ * buyer. A repeated request answers with the same checkout
5080
+ * (`already_active`). Refused (`IR_16`, `error.data.reason` a
5081
+ * `ReactivationBlockedReason`, or `invalid_validity`) while the checkout is
5082
+ * paid, being paid, awaiting capture or authentication, cancelled or still
5083
+ * open, or when no payment method could pay it.
5084
+ * `POST /checkout-recovery/payments/{payment_id}/reactivate`
5085
+ */
5086
+ async reactivate(paymentId, params = {}) {
5087
+ return this.request(
5088
+ "POST",
5089
+ `/checkout-recovery/payments/${encodeURIComponent(paymentId)}/reactivate`,
5090
+ { body: params }
5091
+ );
5092
+ }
5063
5093
  /**
5064
5094
  * A message by hand as it would be sent now: recipient, sender, text, link
5065
5095
  * and destination, and why it would be refused. Nothing is sent.
@@ -7305,6 +7335,71 @@ var Settings = class {
7305
7335
  }
7306
7336
  };
7307
7337
 
7338
+ // src/resources/messageTemplates.ts
7339
+ var MessageTemplates = class {
7340
+ constructor(request) {
7341
+ this.request = request;
7342
+ }
7343
+ /** `GET /message-templates/shops/{profile_id}` */
7344
+ async listShop(profileId) {
7345
+ return this.request("GET", `/message-templates/shops/${encodeURIComponent(profileId)}`);
7346
+ }
7347
+ /** `GET /message-templates/shops/{profile_id}/{template_id}` */
7348
+ async retrieveShop(profileId, templateId) {
7349
+ return this.request(
7350
+ "GET",
7351
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}`
7352
+ );
7353
+ }
7354
+ /**
7355
+ * Store the shop's text in one language.
7356
+ *
7357
+ * `PUT /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
7358
+ */
7359
+ async updateShopLanguage(profileId, templateId, language, params) {
7360
+ return this.request(
7361
+ "PUT",
7362
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
7363
+ { body: params }
7364
+ );
7365
+ }
7366
+ /**
7367
+ * Remove the shop's text in one language, so the platform's or the built-in
7368
+ * text applies.
7369
+ *
7370
+ * `DELETE /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
7371
+ */
7372
+ async resetShopLanguage(profileId, templateId, language, params = {}) {
7373
+ return this.request(
7374
+ "DELETE",
7375
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
7376
+ { query: { expected_revision: params.expected_revision } }
7377
+ );
7378
+ }
7379
+ /** `POST /message-templates/shops/{profile_id}/{template_id}/preview` */
7380
+ async previewShop(profileId, templateId, params) {
7381
+ return this.request(
7382
+ "POST",
7383
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/preview`,
7384
+ {
7385
+ body: params
7386
+ }
7387
+ );
7388
+ }
7389
+ /**
7390
+ * Send the template to the signed-in user's own address.
7391
+ *
7392
+ * `POST /message-templates/shops/{profile_id}/{template_id}/test`
7393
+ */
7394
+ async sendShopTest(profileId, templateId, params) {
7395
+ return this.request(
7396
+ "POST",
7397
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/test`,
7398
+ { body: params }
7399
+ );
7400
+ }
7401
+ };
7402
+
7308
7403
  // src/resources/risk.ts
7309
7404
  var Risk = class {
7310
7405
  constructor(request) {
@@ -7567,6 +7662,7 @@ var Delopay = class {
7567
7662
  this.settlement = new Settlement(request);
7568
7663
  this.operationLimits = new OperationLimits(request);
7569
7664
  this.settings = new Settings(request);
7665
+ this.messageTemplates = new MessageTemplates(request);
7570
7666
  this.risk = new Risk(request);
7571
7667
  this.subscriptions = new Subscriptions(request);
7572
7668
  this.buyerPortal = new BuyerPortal(request);
@@ -11591,6 +11687,7 @@ export {
11591
11687
  Settlement,
11592
11688
  OperationLimits,
11593
11689
  Settings,
11690
+ MessageTemplates,
11594
11691
  Risk,
11595
11692
  Delopay,
11596
11693
  leaf,
@@ -11782,4 +11879,4 @@ export {
11782
11879
  decodeNativePanes,
11783
11880
  encodeNativePanes
11784
11881
  };
11785
- //# sourceMappingURL=chunk-BL5Y5CSM.js.map
11882
+ //# sourceMappingURL=chunk-2FVZDCET.js.map