@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.
- package/dist/{chunk-R6E57AD4.js → chunk-424242UX.js} +148 -1
- package/dist/chunk-424242UX.js.map +1 -0
- package/dist/index.cjs +147 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +247 -7
- package/dist/index.d.ts +247 -7
- package/dist/index.js +1 -1
- package/dist/internal.cjs +147 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +17 -18
- package/dist/chunk-R6E57AD4.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -911,6 +911,23 @@ var Connectors = class {
|
|
|
911
911
|
{ body: params }
|
|
912
912
|
);
|
|
913
913
|
}
|
|
914
|
+
/**
|
|
915
|
+
* Fold copies of the same provider account into this connector (todos#395).
|
|
916
|
+
* `POST /account/{accountId}/connectors/{connectorId}/consolidate`
|
|
917
|
+
*
|
|
918
|
+
* The copies' shops move to the connector with their on/off state, routing,
|
|
919
|
+
* checkout layout, currencies, saved credentials, mandates and
|
|
920
|
+
* subscriptions. A copy keeps answering for the payments made on it and
|
|
921
|
+
* serves no shop. Send `dry_run: true` first, then confirm with the
|
|
922
|
+
* preview's `preview_token` and a choice for every conflict.
|
|
923
|
+
*/
|
|
924
|
+
async consolidate(accountId, connectorId, params) {
|
|
925
|
+
return this.request(
|
|
926
|
+
"POST",
|
|
927
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/consolidate`,
|
|
928
|
+
{ body: params }
|
|
929
|
+
);
|
|
930
|
+
}
|
|
914
931
|
/**
|
|
915
932
|
* Switch a connector off, or back on, in one shop it serves.
|
|
916
933
|
* `POST /account/{accountId}/connectors/{connectorId}/shops/{profileId}`
|
|
@@ -6054,6 +6071,55 @@ var BuyerConversations = class {
|
|
|
6054
6071
|
body: params
|
|
6055
6072
|
});
|
|
6056
6073
|
}
|
|
6074
|
+
/**
|
|
6075
|
+
* A team member's internal note. Only the team reads it: the buyer never
|
|
6076
|
+
* sees a note, and a note does not move the conversation or mark it unread.
|
|
6077
|
+
* A closed conversation takes notes as well.
|
|
6078
|
+
* `POST /buyer-conversations/{id}/notes`
|
|
6079
|
+
*/
|
|
6080
|
+
async addNote(id, params) {
|
|
6081
|
+
return this.request("POST", `/buyer-conversations/${encodeURIComponent(id)}/notes`, {
|
|
6082
|
+
body: params
|
|
6083
|
+
});
|
|
6084
|
+
}
|
|
6085
|
+
/**
|
|
6086
|
+
* Upload a file for the caller's next answer, under the shop's attachment
|
|
6087
|
+
* rules (`attachment_rules` on the conversation). It belongs to the caller
|
|
6088
|
+
* until an answer names it in `attachments`; one no answer took within a
|
|
6089
|
+
* day is cleared. Uploading again with the same `clientUploadId` returns
|
|
6090
|
+
* the file the first upload stored.
|
|
6091
|
+
* `POST /buyer-conversation-files/{conversation}`
|
|
6092
|
+
*/
|
|
6093
|
+
async uploadFile(id, file, clientUploadId, fileName) {
|
|
6094
|
+
const form = new FormData();
|
|
6095
|
+
form.append("client_upload_id", clientUploadId);
|
|
6096
|
+
if (fileName === void 0) form.append("file", file);
|
|
6097
|
+
else form.append("file", file, fileName);
|
|
6098
|
+
return this.request("POST", `/buyer-conversation-files/${encodeURIComponent(id)}`, {
|
|
6099
|
+
body: form
|
|
6100
|
+
});
|
|
6101
|
+
}
|
|
6102
|
+
/**
|
|
6103
|
+
* Download a file a message of the conversation carries.
|
|
6104
|
+
* `GET /buyer-conversation-files/{conversation}/{file}`
|
|
6105
|
+
*/
|
|
6106
|
+
async downloadFile(id, fileId) {
|
|
6107
|
+
return this.request(
|
|
6108
|
+
"GET",
|
|
6109
|
+
`/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`,
|
|
6110
|
+
{ responseType: "blob" }
|
|
6111
|
+
);
|
|
6112
|
+
}
|
|
6113
|
+
/**
|
|
6114
|
+
* Remove a file the caller uploaded that no answer took.
|
|
6115
|
+
* `DELETE /buyer-conversation-files/{conversation}/{file}`
|
|
6116
|
+
*/
|
|
6117
|
+
async removeFile(id, fileId) {
|
|
6118
|
+
return this.request(
|
|
6119
|
+
"DELETE",
|
|
6120
|
+
`/buyer-conversation-files/${encodeURIComponent(id)}/${encodeURIComponent(fileId)}`
|
|
6121
|
+
);
|
|
6122
|
+
}
|
|
6057
6123
|
/**
|
|
6058
6124
|
* The team has read the conversation up to its last accepted message.
|
|
6059
6125
|
* `POST /buyer-conversations/{id}/read`
|
|
@@ -7870,6 +7936,53 @@ var BuyerAccount = class {
|
|
|
7870
7936
|
}
|
|
7871
7937
|
);
|
|
7872
7938
|
}
|
|
7939
|
+
/**
|
|
7940
|
+
* Upload a file for the buyer's next message to one shop of a confirmed
|
|
7941
|
+
* record, under the shop's attachment rules (`attachment_rules` on the
|
|
7942
|
+
* message page). It belongs to the buyer until a message names it in
|
|
7943
|
+
* `attachments`; one no message took within a day is cleared. Uploading
|
|
7944
|
+
* again with the same `clientUploadId` returns the file the first upload
|
|
7945
|
+
* stored. `shop` is required here.
|
|
7946
|
+
*/
|
|
7947
|
+
async uploadRecordMessageFile(record, file, clientUploadId, query, options) {
|
|
7948
|
+
const { fileName, ...extras } = options ?? {};
|
|
7949
|
+
const form = new FormData();
|
|
7950
|
+
form.append("client_upload_id", clientUploadId);
|
|
7951
|
+
if (fileName === void 0) form.append("file", file);
|
|
7952
|
+
else form.append("file", file, fileName);
|
|
7953
|
+
return this.request(
|
|
7954
|
+
"POST",
|
|
7955
|
+
`/buyer-account/records/${encodeURIComponent(record)}/messages/files`,
|
|
7956
|
+
{
|
|
7957
|
+
body: form,
|
|
7958
|
+
query,
|
|
7959
|
+
...extras
|
|
7960
|
+
}
|
|
7961
|
+
);
|
|
7962
|
+
}
|
|
7963
|
+
/** Download a file a message of a record's conversation with one shop carries. */
|
|
7964
|
+
async downloadRecordMessageFile(record, fileId, query, options) {
|
|
7965
|
+
return this.request(
|
|
7966
|
+
"GET",
|
|
7967
|
+
`/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,
|
|
7968
|
+
{
|
|
7969
|
+
query,
|
|
7970
|
+
responseType: "blob",
|
|
7971
|
+
...options
|
|
7972
|
+
}
|
|
7973
|
+
);
|
|
7974
|
+
}
|
|
7975
|
+
/** Remove a file the buyer uploaded for a record's conversation that no message took. */
|
|
7976
|
+
async removeRecordMessageFile(record, fileId, query, options) {
|
|
7977
|
+
return this.request(
|
|
7978
|
+
"DELETE",
|
|
7979
|
+
`/buyer-account/records/${encodeURIComponent(record)}/messages/files/${encodeURIComponent(fileId)}`,
|
|
7980
|
+
{
|
|
7981
|
+
query,
|
|
7982
|
+
...options
|
|
7983
|
+
}
|
|
7984
|
+
);
|
|
7985
|
+
}
|
|
7873
7986
|
/**
|
|
7874
7987
|
* What the buyer spent in a period: paid purchases summed per currency,
|
|
7875
7988
|
* never converted, for the whole period, per day, week or month, per shop
|
|
@@ -8092,6 +8205,40 @@ var BuyerPortal = class {
|
|
|
8092
8205
|
...options
|
|
8093
8206
|
});
|
|
8094
8207
|
}
|
|
8208
|
+
/**
|
|
8209
|
+
* Upload a file for the buyer's next message to one shop, under the shop's
|
|
8210
|
+
* attachment rules (`attachment_rules` on the message page). It belongs to
|
|
8211
|
+
* the buyer until a message names it in `attachments`; one no message took
|
|
8212
|
+
* within a day is cleared. Uploading again with the same `clientUploadId`
|
|
8213
|
+
* returns the file the first upload stored.
|
|
8214
|
+
*/
|
|
8215
|
+
async uploadMessageFile(file, clientUploadId, query, options) {
|
|
8216
|
+
const { fileName, ...extras } = options ?? {};
|
|
8217
|
+
const form = new FormData();
|
|
8218
|
+
form.append("client_upload_id", clientUploadId);
|
|
8219
|
+
if (fileName === void 0) form.append("file", file);
|
|
8220
|
+
else form.append("file", file, fileName);
|
|
8221
|
+
return this.request("POST", "/buyer-portal/messages/files", {
|
|
8222
|
+
body: form,
|
|
8223
|
+
query,
|
|
8224
|
+
...extras
|
|
8225
|
+
});
|
|
8226
|
+
}
|
|
8227
|
+
/** Download a file a message of the buyer's conversation with one shop carries. */
|
|
8228
|
+
async downloadMessageFile(fileId, query, options) {
|
|
8229
|
+
return this.request("GET", `/buyer-portal/messages/files/${encodeURIComponent(fileId)}`, {
|
|
8230
|
+
query,
|
|
8231
|
+
responseType: "blob",
|
|
8232
|
+
...options
|
|
8233
|
+
});
|
|
8234
|
+
}
|
|
8235
|
+
/** Remove a file the buyer uploaded that no message took. */
|
|
8236
|
+
async removeMessageFile(fileId, query, options) {
|
|
8237
|
+
return this.request("DELETE", `/buyer-portal/messages/files/${encodeURIComponent(fileId)}`, {
|
|
8238
|
+
query,
|
|
8239
|
+
...options
|
|
8240
|
+
});
|
|
8241
|
+
}
|
|
8095
8242
|
/** The buyer's contact and billing details, and what they may change. */
|
|
8096
8243
|
async getProfile(options) {
|
|
8097
8244
|
return this.request("GET", "/buyer-portal/profile", { ...options });
|