@delopay/sdk 0.272.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.
- package/dist/{chunk-42VYNDXJ.js → chunk-424242UX.js} +167 -6
- package/dist/chunk-424242UX.js.map +1 -0
- package/dist/index.cjs +166 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +327 -22
- package/dist/index.d.ts +327 -22
- package/dist/index.js +1 -1
- package/dist/internal.cjs +180 -5
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +49 -2
- package/dist/internal.d.ts +49 -2
- package/dist/internal.js +15 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-42VYNDXJ.js.map +0 -1
|
@@ -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`
|
|
@@ -7568,8 +7634,9 @@ var BuyerAccount = class {
|
|
|
7568
7634
|
});
|
|
7569
7635
|
}
|
|
7570
7636
|
/**
|
|
7571
|
-
* A message from a confirmed record to one of its shops.
|
|
7572
|
-
*
|
|
7637
|
+
* A message from a confirmed record to one of its shops. A message to a
|
|
7638
|
+
* closed conversation reopens it. Sending again with the same
|
|
7639
|
+
* `client_message_id` returns the message the first send stored.
|
|
7573
7640
|
*/
|
|
7574
7641
|
async sendRecordMessage(record, message, options) {
|
|
7575
7642
|
return this.request("POST", `/buyer-account/records/${encodeURIComponent(record)}/messages`, {
|
|
@@ -7591,6 +7658,53 @@ var BuyerAccount = class {
|
|
|
7591
7658
|
}
|
|
7592
7659
|
);
|
|
7593
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
|
+
}
|
|
7594
7708
|
/**
|
|
7595
7709
|
* What the buyer spent in a period: paid purchases summed per currency,
|
|
7596
7710
|
* never converted, for the whole period, per day, week or month, per shop
|
|
@@ -7796,8 +7910,9 @@ var BuyerPortal = class {
|
|
|
7796
7910
|
});
|
|
7797
7911
|
}
|
|
7798
7912
|
/**
|
|
7799
|
-
* A message to the shop.
|
|
7800
|
-
*
|
|
7913
|
+
* A message to the shop. A message to a closed conversation reopens it.
|
|
7914
|
+
* Sending again with the same `client_message_id` returns the message the
|
|
7915
|
+
* first send stored.
|
|
7801
7916
|
*/
|
|
7802
7917
|
async sendMessage(message, options) {
|
|
7803
7918
|
return this.request("POST", "/buyer-portal/messages", { body: message, ...options });
|
|
@@ -7812,6 +7927,40 @@ var BuyerPortal = class {
|
|
|
7812
7927
|
...options
|
|
7813
7928
|
});
|
|
7814
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
|
+
}
|
|
7815
7964
|
/** The buyer's contact and billing details, and what they may change. */
|
|
7816
7965
|
async getProfile(options) {
|
|
7817
7966
|
return this.request("GET", "/buyer-portal/profile", { ...options });
|
|
@@ -12515,6 +12664,12 @@ var CheckoutSession = class {
|
|
|
12515
12664
|
* channel the backend's locale resolution reads; a `?locale=` query is
|
|
12516
12665
|
* silently ignored by this route.
|
|
12517
12666
|
*
|
|
12667
|
+
* `cardOnly` is a direct link to the card form (`payment_method=card`):
|
|
12668
|
+
* when the Stripe card form being prepared is the one the link names, its
|
|
12669
|
+
* PaymentIntent is created for `card` alone. `cardProvider` and
|
|
12670
|
+
* `cardAccount` name that form's connector and account; absent or blank
|
|
12671
|
+
* matches any.
|
|
12672
|
+
*
|
|
12518
12673
|
* `GET /payment-link/data/{merchantId}/{paymentId}`
|
|
12519
12674
|
*/
|
|
12520
12675
|
async fetchCheckoutData(params, options) {
|
|
@@ -12523,7 +12678,13 @@ var CheckoutSession = class {
|
|
|
12523
12678
|
"GET",
|
|
12524
12679
|
`/payment-link/data/${encodeURIComponent(this.merchantId)}/${encodeURIComponent(this.paymentId)}`,
|
|
12525
12680
|
{
|
|
12526
|
-
query: {
|
|
12681
|
+
query: {
|
|
12682
|
+
theme: params?.theme,
|
|
12683
|
+
country: country || void 0,
|
|
12684
|
+
card_only: params?.cardOnly || void 0,
|
|
12685
|
+
card_provider: params?.cardOnly ? params.cardProvider?.trim() || void 0 : void 0,
|
|
12686
|
+
card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0
|
|
12687
|
+
},
|
|
12527
12688
|
...options,
|
|
12528
12689
|
headers: {
|
|
12529
12690
|
...params?.locale ? {
|
|
@@ -14008,4 +14169,4 @@ export {
|
|
|
14008
14169
|
decodeNativePanes,
|
|
14009
14170
|
encodeNativePanes
|
|
14010
14171
|
};
|
|
14011
|
-
//# sourceMappingURL=chunk-
|
|
14172
|
+
//# sourceMappingURL=chunk-424242UX.js.map
|