@delopay/sdk 0.274.0 → 0.277.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.
@@ -633,6 +633,23 @@ var Connectors = class {
633
633
  { body: params }
634
634
  );
635
635
  }
636
+ /**
637
+ * Fold copies of the same provider account into this connector (todos#395).
638
+ * `POST /account/{accountId}/connectors/{connectorId}/consolidate`
639
+ *
640
+ * The copies' shops move to the connector with their on/off state, routing,
641
+ * checkout layout, currencies, saved credentials, mandates and
642
+ * subscriptions. A copy keeps answering for the payments made on it and
643
+ * serves no shop. Send `dry_run: true` first, then confirm with the
644
+ * preview's `preview_token` and a choice for every conflict.
645
+ */
646
+ async consolidate(accountId, connectorId, params) {
647
+ return this.request(
648
+ "POST",
649
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,
650
+ { body: params }
651
+ );
652
+ }
636
653
  /**
637
654
  * Switch a connector off, or back on, in one shop it serves.
638
655
  * `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`
@@ -5776,6 +5793,55 @@ var BuyerConversations = class {
5776
5793
  body: params
5777
5794
  });
5778
5795
  }
5796
+ /**
5797
+ * A team member's internal note. Only the team reads it: the buyer never
5798
+ * sees a note, and a note does not move the conversation or mark it unread.
5799
+ * A closed conversation takes notes as well.
5800
+ * `POST /buyer-conversations/{id}/notes`
5801
+ */
5802
+ async addNote(id, params) {
5803
+ return this.request("POST", `/buyer-conversations/${encodeURIComponent(id)}/notes`, {
5804
+ body: params
5805
+ });
5806
+ }
5807
+ /**
5808
+ * Upload a file for the caller's next answer, under the shop's attachment
5809
+ * rules (`attachment_rules` on the conversation). It belongs to the caller
5810
+ * until an answer names it in `attachments`; one no answer took within a
5811
+ * day is cleared. Uploading again with the same `clientUploadId` returns
5812
+ * the file the first upload stored.
5813
+ * `POST /buyer-conversation-files/{conversation}`
5814
+ */
5815
+ async uploadFile(id, file, clientUploadId, fileName) {
5816
+ const form = new FormData();
5817
+ form.append("client_upload_id", clientUploadId);
5818
+ if (fileName === void 0) form.append("file", file);
5819
+ else form.append("file", file, fileName);
5820
+ return this.request("POST", `/buyer-conversation-files/${encodeURIComponent(id)}`, {
5821
+ body: form
5822
+ });
5823
+ }
5824
+ /**
5825
+ * Download a file a message of the conversation carries.
5826
+ * `GET /buyer-conversation-files/{conversation}/{file}`
5827
+ */
5828
+ async downloadFile(id, fileId) {
5829
+ return this.request(
5830
+ "GET",
5831
+ `/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`,
5832
+ { responseType: "blob" }
5833
+ );
5834
+ }
5835
+ /**
5836
+ * Remove a file the caller uploaded that no answer took.
5837
+ * `DELETE /buyer-conversation-files/{conversation}/{file}`
5838
+ */
5839
+ async removeFile(id, fileId) {
5840
+ return this.request(
5841
+ "DELETE",
5842
+ `/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`
5843
+ );
5844
+ }
5779
5845
  /**
5780
5846
  * The team has read the conversation up to its last accepted message.
5781
5847
  * `POST /buyer-conversations/{id}/read`
@@ -7592,6 +7658,53 @@ var BuyerAccount = class {
7592
7658
  }
7593
7659
  );
7594
7660
  }
7661
+ /**
7662
+ * Upload a file for the buyer's next message to one shop of a confirmed
7663
+ * record, under the shop's attachment rules (`attachment_rules` on the
7664
+ * message page). It belongs to the buyer until a message names it in
7665
+ * `attachments`; one no message took within a day is cleared. Uploading
7666
+ * again with the same `clientUploadId` returns the file the first upload
7667
+ * stored. `shop` is required here.
7668
+ */
7669
+ async uploadRecordMessageFile(record, file, clientUploadId, query, options) {
7670
+ const { fileName, ...extras } = options ?? {};
7671
+ const form = new FormData();
7672
+ form.append("client_upload_id", clientUploadId);
7673
+ if (fileName === void 0) form.append("file", file);
7674
+ else form.append("file", file, fileName);
7675
+ return this.request(
7676
+ "POST",
7677
+ `/buyer-account/records/${encodeURIComponent(record)}/messages/files`,
7678
+ {
7679
+ body: form,
7680
+ query,
7681
+ ...extras
7682
+ }
7683
+ );
7684
+ }
7685
+ /** Download a file a message of a record's conversation with one shop carries. */
7686
+ async downloadRecordMessageFile(record, fileId, query, options) {
7687
+ return this.request(
7688
+ "GET",
7689
+ `/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,
7690
+ {
7691
+ query,
7692
+ responseType: "blob",
7693
+ ...options
7694
+ }
7695
+ );
7696
+ }
7697
+ /** Remove a file the buyer uploaded for a record's conversation that no message took. */
7698
+ async removeRecordMessageFile(record, fileId, query, options) {
7699
+ return this.request(
7700
+ "DELETE",
7701
+ `/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,
7702
+ {
7703
+ query,
7704
+ ...options
7705
+ }
7706
+ );
7707
+ }
7595
7708
  /**
7596
7709
  * What the buyer spent in a period: paid purchases summed per currency,
7597
7710
  * never converted, for the whole period, per day, week or month, per shop
@@ -7814,6 +7927,40 @@ var BuyerPortal = class {
7814
7927
  ...options
7815
7928
  });
7816
7929
  }
7930
+ /**
7931
+ * Upload a file for the buyer's next message to one shop, under the shop's
7932
+ * attachment rules (`attachment_rules` on the message page). It belongs to
7933
+ * the buyer until a message names it in `attachments`; one no message took
7934
+ * within a day is cleared. Uploading again with the same `clientUploadId`
7935
+ * returns the file the first upload stored.
7936
+ */
7937
+ async uploadMessageFile(file, clientUploadId, query, options) {
7938
+ const { fileName, ...extras } = options ?? {};
7939
+ const form = new FormData();
7940
+ form.append("client_upload_id", clientUploadId);
7941
+ if (fileName === void 0) form.append("file", file);
7942
+ else form.append("file", file, fileName);
7943
+ return this.request("POST", "/buyer-portal/messages/files", {
7944
+ body: form,
7945
+ query,
7946
+ ...extras
7947
+ });
7948
+ }
7949
+ /** Download a file a message of the buyer's conversation with one shop carries. */
7950
+ async downloadMessageFile(fileId, query, options) {
7951
+ return this.request("GET", `/buyer-portal/messages/files/${encodeURIComponent(fileId)}`, {
7952
+ query,
7953
+ responseType: "blob",
7954
+ ...options
7955
+ });
7956
+ }
7957
+ /** Remove a file the buyer uploaded that no message took. */
7958
+ async removeMessageFile(fileId, query, options) {
7959
+ return this.request("DELETE", `/buyer-portal/messages/files/${encodeURIComponent(fileId)}`, {
7960
+ query,
7961
+ ...options
7962
+ });
7963
+ }
7817
7964
  /** The buyer's contact and billing details, and what they may change. */
7818
7965
  async getProfile(options) {
7819
7966
  return this.request("GET", "/buyer-portal/profile", { ...options });
@@ -14022,4 +14169,4 @@ export {
14022
14169
  decodeNativePanes,
14023
14170
  encodeNativePanes
14024
14171
  };
14025
- //# sourceMappingURL=chunk-R6E57AD4.js.map
14172
+ //# sourceMappingURL=chunk-424242UX.js.map