@delopay/sdk 0.213.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/index.cjs CHANGED
@@ -83,6 +83,7 @@ __export(index_exports, {
83
83
  MAX_SECTION_ORDER: () => MAX_SECTION_ORDER,
84
84
  METHOD_SECTIONS: () => METHOD_SECTIONS,
85
85
  MIN_SECTION_ORDER: () => MIN_SECTION_ORDER,
86
+ MessageTemplates: () => MessageTemplates,
86
87
  NATIVE_ELEMENT_POSITIONS: () => NATIVE_ELEMENT_POSITIONS,
87
88
  NATIVE_PANES_MAX: () => NATIVE_PANES_MAX,
88
89
  NATIVE_PANE_CATEGORY_KEYS: () => NATIVE_PANE_CATEGORY_KEYS,
@@ -7550,6 +7551,71 @@ var Settings = class {
7550
7551
  }
7551
7552
  };
7552
7553
 
7554
+ // src/resources/messageTemplates.ts
7555
+ var MessageTemplates = class {
7556
+ constructor(request) {
7557
+ this.request = request;
7558
+ }
7559
+ /** `GET /message-templates/shops/{profile_id}` */
7560
+ async listShop(profileId) {
7561
+ return this.request("GET", `/message-templates/shops/${encodeURIComponent(profileId)}`);
7562
+ }
7563
+ /** `GET /message-templates/shops/{profile_id}/{template_id}` */
7564
+ async retrieveShop(profileId, templateId) {
7565
+ return this.request(
7566
+ "GET",
7567
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}`
7568
+ );
7569
+ }
7570
+ /**
7571
+ * Store the shop's text in one language.
7572
+ *
7573
+ * `PUT /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
7574
+ */
7575
+ async updateShopLanguage(profileId, templateId, language, params) {
7576
+ return this.request(
7577
+ "PUT",
7578
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
7579
+ { body: params }
7580
+ );
7581
+ }
7582
+ /**
7583
+ * Remove the shop's text in one language, so the platform's or the built-in
7584
+ * text applies.
7585
+ *
7586
+ * `DELETE /message-templates/shops/{profile_id}/{template_id}/languages/{language}`
7587
+ */
7588
+ async resetShopLanguage(profileId, templateId, language, params = {}) {
7589
+ return this.request(
7590
+ "DELETE",
7591
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/languages/${encodeURIComponent(language)}`,
7592
+ { query: { expected_revision: params.expected_revision } }
7593
+ );
7594
+ }
7595
+ /** `POST /message-templates/shops/{profile_id}/{template_id}/preview` */
7596
+ async previewShop(profileId, templateId, params) {
7597
+ return this.request(
7598
+ "POST",
7599
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/preview`,
7600
+ {
7601
+ body: params
7602
+ }
7603
+ );
7604
+ }
7605
+ /**
7606
+ * Send the template to the signed-in user's own address.
7607
+ *
7608
+ * `POST /message-templates/shops/{profile_id}/{template_id}/test`
7609
+ */
7610
+ async sendShopTest(profileId, templateId, params) {
7611
+ return this.request(
7612
+ "POST",
7613
+ `/message-templates/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(templateId)}/test`,
7614
+ { body: params }
7615
+ );
7616
+ }
7617
+ };
7618
+
7553
7619
  // src/resources/risk.ts
7554
7620
  var Risk = class {
7555
7621
  constructor(request) {
@@ -7812,6 +7878,7 @@ var Delopay = class {
7812
7878
  this.settlement = new Settlement(request);
7813
7879
  this.operationLimits = new OperationLimits(request);
7814
7880
  this.settings = new Settings(request);
7881
+ this.messageTemplates = new MessageTemplates(request);
7815
7882
  this.risk = new Risk(request);
7816
7883
  this.subscriptions = new Subscriptions(request);
7817
7884
  this.buyerPortal = new BuyerPortal(request);
@@ -11868,6 +11935,7 @@ var encodeNativePanes = encodePanes;
11868
11935
  MAX_SECTION_ORDER,
11869
11936
  METHOD_SECTIONS,
11870
11937
  MIN_SECTION_ORDER,
11938
+ MessageTemplates,
11871
11939
  NATIVE_ELEMENT_POSITIONS,
11872
11940
  NATIVE_PANES_MAX,
11873
11941
  NATIVE_PANE_CATEGORY_KEYS,