@delopay/sdk 0.385.0 → 0.390.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-UGIHA7A6.js → chunk-PE7G347M.js} +380 -56
- package/dist/chunk-PE7G347M.js.map +1 -0
- package/dist/{index-CkiG9mc1.d.cts → index-CIObKeC7.d.cts} +887 -37
- package/dist/{index-CkiG9mc1.d.ts → index-CIObKeC7.d.ts} +887 -37
- package/dist/index.cjs +380 -55
- 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 +7 -1
- package/dist/internal.cjs +485 -78
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +269 -19
- package/dist/internal.d.ts +269 -19
- package/dist/internal.js +114 -24
- package/dist/internal.js.map +1 -1
- package/package.json +17 -19
- package/dist/chunk-UGIHA7A6.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -112,10 +112,12 @@ import {
|
|
|
112
112
|
PANES_MAX,
|
|
113
113
|
PANE_CATEGORY_KEYS,
|
|
114
114
|
PANE_ICON_KEYS,
|
|
115
|
+
PAYMENT_CURRENCIES,
|
|
115
116
|
PAYPAL_CARD_LAYOUTS,
|
|
116
117
|
PAYPAL_LABEL_STYLES,
|
|
117
118
|
PRESENTATION_CONTRACT_VERSION,
|
|
118
119
|
PaypalDisputes,
|
|
120
|
+
Persons,
|
|
119
121
|
PresentationCache,
|
|
120
122
|
ProcessorCosts,
|
|
121
123
|
ProcessorImports,
|
|
@@ -193,6 +195,7 @@ import {
|
|
|
193
195
|
compareSections,
|
|
194
196
|
contrastRatio,
|
|
195
197
|
copyTranslationsKey,
|
|
198
|
+
csvQuery,
|
|
196
199
|
customFieldContextFromMetadata,
|
|
197
200
|
customFieldIsTextLike,
|
|
198
201
|
customFieldOperatorTakesValue,
|
|
@@ -250,6 +253,7 @@ import {
|
|
|
250
253
|
leaf,
|
|
251
254
|
logoDimensions,
|
|
252
255
|
matchWhopLook,
|
|
256
|
+
metadataLeaf,
|
|
253
257
|
nativePaneMethodInfo,
|
|
254
258
|
nearestWhopAccent,
|
|
255
259
|
noticeText,
|
|
@@ -287,6 +291,7 @@ import {
|
|
|
287
291
|
selectableEntries,
|
|
288
292
|
shadowFor,
|
|
289
293
|
shownNotices,
|
|
294
|
+
statementListQuery,
|
|
290
295
|
stripeSpacingValues,
|
|
291
296
|
surchargeFigurePlan,
|
|
292
297
|
surchargeShowsLabel,
|
|
@@ -300,7 +305,7 @@ import {
|
|
|
300
305
|
visibleCustomFields,
|
|
301
306
|
whopAccentSwatch,
|
|
302
307
|
whopCardElement
|
|
303
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-PE7G347M.js";
|
|
304
309
|
|
|
305
310
|
// src/internal/resources/admin.ts
|
|
306
311
|
var Admin = class {
|
|
@@ -393,12 +398,15 @@ var AdminFileScans = class {
|
|
|
393
398
|
return this.request("POST", "/admin-portal/file-scans/test", { body });
|
|
394
399
|
}
|
|
395
400
|
/**
|
|
396
|
-
* Uploaded files their scan blocked, of every kind, latest result first
|
|
397
|
-
* with what the scanner found.
|
|
398
|
-
*
|
|
401
|
+
* Uploaded files their scan blocked, of every kind, latest result first
|
|
402
|
+
* unless `sort_by` says otherwise, with what the scanner found. Several
|
|
403
|
+
* `kind` or `side` values match a file with any of them. A blocked file's
|
|
404
|
+
* content is never handed out. `GET /admin-portal/file-scans/blocked`
|
|
399
405
|
*/
|
|
400
406
|
async blocked(query = {}) {
|
|
401
|
-
return this.request("GET", "/admin-portal/file-scans/blocked", {
|
|
407
|
+
return this.request("GET", "/admin-portal/file-scans/blocked", {
|
|
408
|
+
query: csvQuery(query, ["kind", "side"])
|
|
409
|
+
});
|
|
402
410
|
}
|
|
403
411
|
};
|
|
404
412
|
|
|
@@ -622,9 +630,14 @@ var AdminPortal = class {
|
|
|
622
630
|
{ body }
|
|
623
631
|
);
|
|
624
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* One page of merchants. Without `sort_by` the caller's favorite merchants
|
|
635
|
+
* come first; with one, favorites are not moved. Several `billing_status`
|
|
636
|
+
* values match a merchant in any of them. `GET /admin-portal/customers`
|
|
637
|
+
*/
|
|
625
638
|
async listCustomers(params) {
|
|
626
639
|
return this.request("GET", "/admin-portal/customers", {
|
|
627
|
-
query: params
|
|
640
|
+
query: csvQuery(params, ["billing_status"])
|
|
628
641
|
});
|
|
629
642
|
}
|
|
630
643
|
async getCustomer(customerId) {
|
|
@@ -636,6 +649,55 @@ var AdminPortal = class {
|
|
|
636
649
|
query
|
|
637
650
|
});
|
|
638
651
|
}
|
|
652
|
+
/**
|
|
653
|
+
* One page of ONE merchant's persons: the same query and response as the
|
|
654
|
+
* merchant-facing `persons.list`, admin-authenticated. Persons are never
|
|
655
|
+
* read across merchants.
|
|
656
|
+
*
|
|
657
|
+
* `GET /admin-portal/persons/{merchantId}`
|
|
658
|
+
*/
|
|
659
|
+
async listPersons(merchantId, params) {
|
|
660
|
+
return this.request("GET", adminPersons(merchantId), {
|
|
661
|
+
query: params
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* One person of a merchant, as the merchant-facing `persons.retrieve`
|
|
666
|
+
* returns it.
|
|
667
|
+
*
|
|
668
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}`
|
|
669
|
+
*/
|
|
670
|
+
async getPerson(merchantId, personId, params) {
|
|
671
|
+
return this.request("GET", `${adminPersons(merchantId)}/${encodeURIComponent(personId)}`, {
|
|
672
|
+
query: params
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* The persons of a merchant that may be the same person as this one, as
|
|
677
|
+
* the merchant-facing `persons.related` returns them.
|
|
678
|
+
*
|
|
679
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/related`
|
|
680
|
+
*/
|
|
681
|
+
async listRelatedPersons(merchantId, personId, params) {
|
|
682
|
+
return this.request(
|
|
683
|
+
"GET",
|
|
684
|
+
`${adminPersons(merchantId)}/${encodeURIComponent(personId)}/related`,
|
|
685
|
+
{ query: params }
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* The person of one payment of a merchant, as the merchant-facing
|
|
690
|
+
* `persons.ofPayment` returns it.
|
|
691
|
+
*
|
|
692
|
+
* `GET /admin-portal/persons/{merchantId}/payment/{paymentId}`
|
|
693
|
+
*/
|
|
694
|
+
async getPaymentPerson(merchantId, paymentId, params) {
|
|
695
|
+
return this.request(
|
|
696
|
+
"GET",
|
|
697
|
+
`${adminPersons(merchantId)}/payment/${encodeURIComponent(paymentId)}`,
|
|
698
|
+
{ query: params }
|
|
699
|
+
);
|
|
700
|
+
}
|
|
639
701
|
async exportTransactions(params, options) {
|
|
640
702
|
return runExport(
|
|
641
703
|
this.request,
|
|
@@ -801,21 +863,25 @@ var AdminPortal = class {
|
|
|
801
863
|
}
|
|
802
864
|
/**
|
|
803
865
|
* Refunds of ANY merchant mirrored from a connector webhook at a
|
|
804
|
-
* non-terminal status that no sync can advance. Newest first
|
|
866
|
+
* non-terminal status that no sync can advance. Newest first unless
|
|
867
|
+
* `sort_by` says otherwise. Several `connector`, `status` or `sync_reason`
|
|
868
|
+
* values match a refund with any of them.
|
|
805
869
|
*/
|
|
806
870
|
async listUnresolvedRefunds(params) {
|
|
807
871
|
return this.request("GET", "/admin-portal/refunds/unresolved", {
|
|
808
|
-
query: params
|
|
872
|
+
query: csvQuery(params, ["connector", "status", "sync_reason"])
|
|
809
873
|
});
|
|
810
874
|
}
|
|
811
875
|
// --- Buyer evidence review --------------------------------------------------
|
|
812
876
|
/**
|
|
813
|
-
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
814
|
-
* across merchants unless `merchant_id`
|
|
877
|
+
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
878
|
+
* unless `sort_by` says otherwise, across merchants unless `merchant_id` or
|
|
879
|
+
* `profile_id` narrows it. Several `state` values match a case in any of
|
|
880
|
+
* them.
|
|
815
881
|
*/
|
|
816
882
|
async listBuyerEvidence(params) {
|
|
817
883
|
return this.request("GET", "/admin-portal/buyer-evidence", {
|
|
818
|
-
query: params
|
|
884
|
+
query: csvQuery(params, ["state"])
|
|
819
885
|
});
|
|
820
886
|
}
|
|
821
887
|
/** Chargeback prevention connections across merchants, or of one merchant. */
|
|
@@ -1486,14 +1552,7 @@ var AdminPortal = class {
|
|
|
1486
1552
|
return this.request(
|
|
1487
1553
|
"GET",
|
|
1488
1554
|
`/admin-portal/accounts/${encodeURIComponent(merchantId)}/settlement/statements`,
|
|
1489
|
-
{
|
|
1490
|
-
query: {
|
|
1491
|
-
test_mode: params.test_mode,
|
|
1492
|
-
profile_id: params.profile_id,
|
|
1493
|
-
limit: params.limit,
|
|
1494
|
-
offset: params.offset
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1555
|
+
{ query: statementListQuery(params) }
|
|
1497
1556
|
);
|
|
1498
1557
|
}
|
|
1499
1558
|
/**
|
|
@@ -1840,6 +1899,7 @@ function transactionListQuery(params) {
|
|
|
1840
1899
|
failure_substatuses,
|
|
1841
1900
|
product_ids,
|
|
1842
1901
|
buyer_risk_band,
|
|
1902
|
+
merchant_ids,
|
|
1843
1903
|
...query
|
|
1844
1904
|
} = params;
|
|
1845
1905
|
return {
|
|
@@ -1854,9 +1914,13 @@ function transactionListQuery(params) {
|
|
|
1854
1914
|
...routing_approaches?.length ? { routing_approaches: routing_approaches.join(",") } : {},
|
|
1855
1915
|
...failure_substatuses?.length ? { failure_substatuses: failure_substatuses.join(",") } : {},
|
|
1856
1916
|
...product_ids?.length ? { product_ids: product_ids.join(",") } : {},
|
|
1857
|
-
...buyer_risk_band?.length ? { buyer_risk_band: buyer_risk_band.join(",") } : {}
|
|
1917
|
+
...buyer_risk_band?.length ? { buyer_risk_band: buyer_risk_band.join(",") } : {},
|
|
1918
|
+
...merchant_ids?.length ? { merchant_ids: merchant_ids.join(",") } : {}
|
|
1858
1919
|
};
|
|
1859
1920
|
}
|
|
1921
|
+
function adminPersons(merchantId) {
|
|
1922
|
+
return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
|
|
1923
|
+
}
|
|
1860
1924
|
function adminAccount(merchantId) {
|
|
1861
1925
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
1862
1926
|
}
|
|
@@ -1867,12 +1931,30 @@ var AdminSupport = class {
|
|
|
1867
1931
|
constructor(request) {
|
|
1868
1932
|
this.request = request;
|
|
1869
1933
|
}
|
|
1870
|
-
/**
|
|
1934
|
+
/**
|
|
1935
|
+
* The queue, the latest message first unless `sort_by` says otherwise.
|
|
1936
|
+
* Several `kind`, `category` or `status` values match a conversation with
|
|
1937
|
+
* any of them. `GET /admin-portal/support/conversations`
|
|
1938
|
+
*/
|
|
1871
1939
|
async list(query) {
|
|
1872
1940
|
return this.request("GET", "/admin-portal/support/conversations", {
|
|
1873
|
-
query: query
|
|
1941
|
+
query: csvQuery(query, ["kind", "category", "status"])
|
|
1874
1942
|
});
|
|
1875
1943
|
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Open a conversation towards a merchant, one of its shops or one of its members,
|
|
1946
|
+
* with a first message from the support team. `POST /admin-portal/support/conversations`
|
|
1947
|
+
*/
|
|
1948
|
+
async create(body) {
|
|
1949
|
+
return this.request("POST", "/admin-portal/support/conversations", { body });
|
|
1950
|
+
}
|
|
1951
|
+
/**
|
|
1952
|
+
* The members of a merchant a message can be addressed to, with whether their role
|
|
1953
|
+
* opens the support page. `GET /admin-portal/support/recipients`
|
|
1954
|
+
*/
|
|
1955
|
+
async recipients(query) {
|
|
1956
|
+
return this.request("GET", "/admin-portal/support/recipients", { query: { ...query } });
|
|
1957
|
+
}
|
|
1876
1958
|
/** One conversation. `GET /admin-portal/support/conversations/{id}` */
|
|
1877
1959
|
async retrieve(id) {
|
|
1878
1960
|
return this.request("GET", path2(id));
|
|
@@ -1925,9 +2007,14 @@ var AuditLogs = class {
|
|
|
1925
2007
|
constructor(request) {
|
|
1926
2008
|
this.request = request;
|
|
1927
2009
|
}
|
|
2010
|
+
/**
|
|
2011
|
+
* One page of the platform audit log, the newest entry first unless
|
|
2012
|
+
* `sort_by` says otherwise. Several `action` or `entity_type` values match
|
|
2013
|
+
* an entry with any of them.
|
|
2014
|
+
*/
|
|
1928
2015
|
async list(params) {
|
|
1929
2016
|
return this.request("GET", "/admin-portal/audit", {
|
|
1930
|
-
query: params
|
|
2017
|
+
query: csvQuery(params, ["action", "entity_type"])
|
|
1931
2018
|
});
|
|
1932
2019
|
}
|
|
1933
2020
|
async retrieve(logId) {
|
|
@@ -1941,7 +2028,7 @@ var AuditLogs = class {
|
|
|
1941
2028
|
// The format is negotiated by `Accept`, never a query field: the query
|
|
1942
2029
|
// here is the list's own filter model, and adding a key to it would fork
|
|
1943
2030
|
// the filter vocabulary the export exists to reuse.
|
|
1944
|
-
{ query: params },
|
|
2031
|
+
{ query: csvQuery(params, ["action", "entity_type"]) },
|
|
1945
2032
|
options
|
|
1946
2033
|
);
|
|
1947
2034
|
}
|
|
@@ -2851,10 +2938,12 @@ export {
|
|
|
2851
2938
|
PANES_MAX,
|
|
2852
2939
|
PANE_CATEGORY_KEYS,
|
|
2853
2940
|
PANE_ICON_KEYS,
|
|
2941
|
+
PAYMENT_CURRENCIES,
|
|
2854
2942
|
PAYPAL_CARD_LAYOUTS,
|
|
2855
2943
|
PAYPAL_LABEL_STYLES,
|
|
2856
2944
|
PRESENTATION_CONTRACT_VERSION,
|
|
2857
2945
|
PaypalDisputes,
|
|
2946
|
+
Persons,
|
|
2858
2947
|
PlatformBilling,
|
|
2859
2948
|
PlatformFees,
|
|
2860
2949
|
PlatformMessageTemplates,
|
|
@@ -2993,6 +3082,7 @@ export {
|
|
|
2993
3082
|
leaf,
|
|
2994
3083
|
logoDimensions,
|
|
2995
3084
|
matchWhopLook,
|
|
3085
|
+
metadataLeaf,
|
|
2996
3086
|
nativePaneMethodInfo,
|
|
2997
3087
|
nearestWhopAccent,
|
|
2998
3088
|
noticeText,
|