@delopay/sdk 0.366.0 → 0.368.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-ESYKTYJA.js → chunk-RD3HP3EY.js} +136 -41
- package/dist/chunk-RD3HP3EY.js.map +1 -0
- package/dist/{index-C2-7sIZx.d.cts → index-DW1C5mFq.d.cts} +234 -4
- package/dist/{index-C2-7sIZx.d.ts → index-DW1C5mFq.d.ts} +234 -4
- package/dist/index.cjs +136 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/internal.cjs +207 -40
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +114 -3
- package/dist/internal.d.ts +114 -3
- package/dist/internal.js +73 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ESYKTYJA.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -147,6 +147,7 @@ import {
|
|
|
147
147
|
Settlement,
|
|
148
148
|
ShopLabels,
|
|
149
149
|
Subscriptions,
|
|
150
|
+
Support,
|
|
150
151
|
UNKNOWN_SECTION_ORDER,
|
|
151
152
|
WCAG_AA_TEXT,
|
|
152
153
|
WCAG_AA_UI,
|
|
@@ -298,7 +299,7 @@ import {
|
|
|
298
299
|
visibleCustomFields,
|
|
299
300
|
whopAccentSwatch,
|
|
300
301
|
whopCardElement
|
|
301
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-RD3HP3EY.js";
|
|
302
303
|
|
|
303
304
|
// src/internal/resources/admin.ts
|
|
304
305
|
var Admin = class {
|
|
@@ -927,6 +928,15 @@ var AdminPortal = class {
|
|
|
927
928
|
query
|
|
928
929
|
});
|
|
929
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Every shop's device intelligence account, with its assessments per environment and
|
|
933
|
+
* its error rate over the last `window_days` days. The error rate counts finished
|
|
934
|
+
* assessments: one still running and a payment naming no buyer are not errors.
|
|
935
|
+
* `GET /admin-portal/device-intelligence`
|
|
936
|
+
*/
|
|
937
|
+
async deviceIntelligenceUsage() {
|
|
938
|
+
return this.request("GET", "/admin-portal/device-intelligence");
|
|
939
|
+
}
|
|
930
940
|
/**
|
|
931
941
|
* Device analytics over the canonical client-context observation per
|
|
932
942
|
* payment, rooted at all merchants and drillable via `merchant_id` /
|
|
@@ -1738,6 +1748,65 @@ function adminAccount(merchantId) {
|
|
|
1738
1748
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
1739
1749
|
}
|
|
1740
1750
|
|
|
1751
|
+
// src/internal/resources/adminSupport.ts
|
|
1752
|
+
var path = (id) => `/admin-portal/support/conversations/${encodeURIComponent(id)}`;
|
|
1753
|
+
var AdminSupport = class {
|
|
1754
|
+
constructor(request) {
|
|
1755
|
+
this.request = request;
|
|
1756
|
+
}
|
|
1757
|
+
/** The queue. `GET /admin-portal/support/conversations` */
|
|
1758
|
+
async list(query) {
|
|
1759
|
+
return this.request("GET", "/admin-portal/support/conversations", {
|
|
1760
|
+
query: query === void 0 ? void 0 : { ...query }
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
/** One conversation. `GET /admin-portal/support/conversations/{id}` */
|
|
1764
|
+
async retrieve(id) {
|
|
1765
|
+
return this.request("GET", path(id));
|
|
1766
|
+
}
|
|
1767
|
+
/** Change status, kind, category or assignee. `PATCH /admin-portal/support/conversations/{id}` */
|
|
1768
|
+
async update(id, body) {
|
|
1769
|
+
return this.request("PATCH", path(id), { body });
|
|
1770
|
+
}
|
|
1771
|
+
/** Messages, notes included. `GET /admin-portal/support/conversations/{id}/messages` */
|
|
1772
|
+
async messages(id, query) {
|
|
1773
|
+
return this.request("GET", `${path(id)}/messages`, {
|
|
1774
|
+
query: query === void 0 ? void 0 : { ...query }
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
/** Answer, or leave a note. `POST /admin-portal/support/conversations/{id}/messages` */
|
|
1778
|
+
async reply(id, body) {
|
|
1779
|
+
return this.request("POST", `${path(id)}/messages`, { body });
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Upload a file for a message from staff, scanned like a merchant's.
|
|
1783
|
+
* `POST /admin-portal/support/conversations/{id}/attachments`
|
|
1784
|
+
*/
|
|
1785
|
+
async uploadAttachment(id, file, clientUploadId, fileName) {
|
|
1786
|
+
const form = new FormData();
|
|
1787
|
+
form.append("client_upload_id", clientUploadId);
|
|
1788
|
+
if (fileName === void 0) form.append("file", file);
|
|
1789
|
+
else form.append("file", file, fileName);
|
|
1790
|
+
return this.request("POST", `${path(id)}/attachments`, { body: form });
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Fetch a file once its scan is clean. A blocked file stays shut for staff too.
|
|
1794
|
+
* `GET /admin-portal/support/conversations/{id}/attachments/{fileId}`
|
|
1795
|
+
*/
|
|
1796
|
+
async downloadAttachment(id, fileId) {
|
|
1797
|
+
return this.request("GET", `${path(id)}/attachments/${encodeURIComponent(fileId)}`, {
|
|
1798
|
+
responseType: "blob"
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Clear the staff unread mark and read the conversation as it is now.
|
|
1803
|
+
* `POST /admin-portal/support/conversations/{id}/read`
|
|
1804
|
+
*/
|
|
1805
|
+
async markRead(id) {
|
|
1806
|
+
return this.request("POST", `${path(id)}/read`);
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1741
1810
|
// src/internal/resources/auditLogs.ts
|
|
1742
1811
|
var AuditLogs = class {
|
|
1743
1812
|
constructor(request) {
|
|
@@ -2517,6 +2586,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
2517
2586
|
const request = this.request.bind(this);
|
|
2518
2587
|
this.admin = new Admin(request);
|
|
2519
2588
|
this.adminPortal = new AdminPortal(request);
|
|
2589
|
+
this.adminSupport = new AdminSupport(request);
|
|
2520
2590
|
const openStream = this.openEventStream.bind(this);
|
|
2521
2591
|
this.adminLive = new AdminLive(request, openStream);
|
|
2522
2592
|
this.adminBranding = new AdminBranding(request);
|
|
@@ -2555,6 +2625,7 @@ export {
|
|
|
2555
2625
|
AdminBranding,
|
|
2556
2626
|
AdminLive,
|
|
2557
2627
|
AdminPortal,
|
|
2628
|
+
AdminSupport,
|
|
2558
2629
|
Analytics,
|
|
2559
2630
|
AnalyticsDashboard,
|
|
2560
2631
|
Audit,
|
|
@@ -2702,6 +2773,7 @@ export {
|
|
|
2702
2773
|
Settlement,
|
|
2703
2774
|
ShopLabels,
|
|
2704
2775
|
Subscriptions,
|
|
2776
|
+
Support,
|
|
2705
2777
|
UNKNOWN_SECTION_ORDER,
|
|
2706
2778
|
WCAG_AA_TEXT,
|
|
2707
2779
|
WCAG_AA_UI,
|