@delopay/sdk 0.388.0 → 0.392.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-A6CXJOUK.js → chunk-GN6GS4V2.js} +195 -50
- package/dist/chunk-GN6GS4V2.js.map +1 -0
- package/dist/{index-BSd4HpQq.d.cts → index-C3WTfnm_.d.cts} +776 -35
- package/dist/{index-BSd4HpQq.d.ts → index-C3WTfnm_.d.ts} +776 -35
- package/dist/index.cjs +193 -49
- 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 +284 -72
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +216 -19
- package/dist/internal.d.ts +216 -19
- package/dist/internal.js +96 -24
- package/dist/internal.js.map +1 -1
- package/package.json +19 -17
- package/dist/chunk-A6CXJOUK.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -117,6 +117,7 @@ import {
|
|
|
117
117
|
PAYPAL_LABEL_STYLES,
|
|
118
118
|
PRESENTATION_CONTRACT_VERSION,
|
|
119
119
|
PaypalDisputes,
|
|
120
|
+
Persons,
|
|
120
121
|
PresentationCache,
|
|
121
122
|
ProcessorCosts,
|
|
122
123
|
ProcessorImports,
|
|
@@ -194,6 +195,7 @@ import {
|
|
|
194
195
|
compareSections,
|
|
195
196
|
contrastRatio,
|
|
196
197
|
copyTranslationsKey,
|
|
198
|
+
csvQuery,
|
|
197
199
|
customFieldContextFromMetadata,
|
|
198
200
|
customFieldIsTextLike,
|
|
199
201
|
customFieldOperatorTakesValue,
|
|
@@ -289,6 +291,7 @@ import {
|
|
|
289
291
|
selectableEntries,
|
|
290
292
|
shadowFor,
|
|
291
293
|
shownNotices,
|
|
294
|
+
statementListQuery,
|
|
292
295
|
stripeSpacingValues,
|
|
293
296
|
surchargeFigurePlan,
|
|
294
297
|
surchargeShowsLabel,
|
|
@@ -302,7 +305,7 @@ import {
|
|
|
302
305
|
visibleCustomFields,
|
|
303
306
|
whopAccentSwatch,
|
|
304
307
|
whopCardElement
|
|
305
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-GN6GS4V2.js";
|
|
306
309
|
|
|
307
310
|
// src/internal/resources/admin.ts
|
|
308
311
|
var Admin = class {
|
|
@@ -395,12 +398,15 @@ var AdminFileScans = class {
|
|
|
395
398
|
return this.request("POST", "/admin-portal/file-scans/test", { body });
|
|
396
399
|
}
|
|
397
400
|
/**
|
|
398
|
-
* Uploaded files their scan blocked, of every kind, latest result first
|
|
399
|
-
* with what the scanner found.
|
|
400
|
-
*
|
|
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`
|
|
401
405
|
*/
|
|
402
406
|
async blocked(query = {}) {
|
|
403
|
-
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
|
+
});
|
|
404
410
|
}
|
|
405
411
|
};
|
|
406
412
|
|
|
@@ -624,9 +630,14 @@ var AdminPortal = class {
|
|
|
624
630
|
{ body }
|
|
625
631
|
);
|
|
626
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
|
+
*/
|
|
627
638
|
async listCustomers(params) {
|
|
628
639
|
return this.request("GET", "/admin-portal/customers", {
|
|
629
|
-
query: params
|
|
640
|
+
query: csvQuery(params, ["billing_status"])
|
|
630
641
|
});
|
|
631
642
|
}
|
|
632
643
|
async getCustomer(customerId) {
|
|
@@ -638,6 +649,55 @@ var AdminPortal = class {
|
|
|
638
649
|
query
|
|
639
650
|
});
|
|
640
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
|
+
}
|
|
641
701
|
async exportTransactions(params, options) {
|
|
642
702
|
return runExport(
|
|
643
703
|
this.request,
|
|
@@ -803,21 +863,25 @@ var AdminPortal = class {
|
|
|
803
863
|
}
|
|
804
864
|
/**
|
|
805
865
|
* Refunds of ANY merchant mirrored from a connector webhook at a
|
|
806
|
-
* 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.
|
|
807
869
|
*/
|
|
808
870
|
async listUnresolvedRefunds(params) {
|
|
809
871
|
return this.request("GET", "/admin-portal/refunds/unresolved", {
|
|
810
|
-
query: params
|
|
872
|
+
query: csvQuery(params, ["connector", "status", "sync_reason"])
|
|
811
873
|
});
|
|
812
874
|
}
|
|
813
875
|
// --- Buyer evidence review --------------------------------------------------
|
|
814
876
|
/**
|
|
815
|
-
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
816
|
-
* 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.
|
|
817
881
|
*/
|
|
818
882
|
async listBuyerEvidence(params) {
|
|
819
883
|
return this.request("GET", "/admin-portal/buyer-evidence", {
|
|
820
|
-
query: params
|
|
884
|
+
query: csvQuery(params, ["state"])
|
|
821
885
|
});
|
|
822
886
|
}
|
|
823
887
|
/** Chargeback prevention connections across merchants, or of one merchant. */
|
|
@@ -1488,14 +1552,7 @@ var AdminPortal = class {
|
|
|
1488
1552
|
return this.request(
|
|
1489
1553
|
"GET",
|
|
1490
1554
|
`/admin-portal/accounts/${encodeURIComponent(merchantId)}/settlement/statements`,
|
|
1491
|
-
{
|
|
1492
|
-
query: {
|
|
1493
|
-
test_mode: params.test_mode,
|
|
1494
|
-
profile_id: params.profile_id,
|
|
1495
|
-
limit: params.limit,
|
|
1496
|
-
offset: params.offset
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1555
|
+
{ query: statementListQuery(params) }
|
|
1499
1556
|
);
|
|
1500
1557
|
}
|
|
1501
1558
|
/**
|
|
@@ -1842,6 +1899,7 @@ function transactionListQuery(params) {
|
|
|
1842
1899
|
failure_substatuses,
|
|
1843
1900
|
product_ids,
|
|
1844
1901
|
buyer_risk_band,
|
|
1902
|
+
merchant_ids,
|
|
1845
1903
|
...query
|
|
1846
1904
|
} = params;
|
|
1847
1905
|
return {
|
|
@@ -1856,9 +1914,13 @@ function transactionListQuery(params) {
|
|
|
1856
1914
|
...routing_approaches?.length ? { routing_approaches: routing_approaches.join(",") } : {},
|
|
1857
1915
|
...failure_substatuses?.length ? { failure_substatuses: failure_substatuses.join(",") } : {},
|
|
1858
1916
|
...product_ids?.length ? { product_ids: product_ids.join(",") } : {},
|
|
1859
|
-
...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(",") } : {}
|
|
1860
1919
|
};
|
|
1861
1920
|
}
|
|
1921
|
+
function adminPersons(merchantId) {
|
|
1922
|
+
return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
|
|
1923
|
+
}
|
|
1862
1924
|
function adminAccount(merchantId) {
|
|
1863
1925
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
1864
1926
|
}
|
|
@@ -1869,10 +1931,14 @@ var AdminSupport = class {
|
|
|
1869
1931
|
constructor(request) {
|
|
1870
1932
|
this.request = request;
|
|
1871
1933
|
}
|
|
1872
|
-
/**
|
|
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
|
+
*/
|
|
1873
1939
|
async list(query) {
|
|
1874
1940
|
return this.request("GET", "/admin-portal/support/conversations", {
|
|
1875
|
-
query: query
|
|
1941
|
+
query: csvQuery(query, ["kind", "category", "status"])
|
|
1876
1942
|
});
|
|
1877
1943
|
}
|
|
1878
1944
|
/**
|
|
@@ -1941,9 +2007,14 @@ var AuditLogs = class {
|
|
|
1941
2007
|
constructor(request) {
|
|
1942
2008
|
this.request = request;
|
|
1943
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
|
+
*/
|
|
1944
2015
|
async list(params) {
|
|
1945
2016
|
return this.request("GET", "/admin-portal/audit", {
|
|
1946
|
-
query: params
|
|
2017
|
+
query: csvQuery(params, ["action", "entity_type"])
|
|
1947
2018
|
});
|
|
1948
2019
|
}
|
|
1949
2020
|
async retrieve(logId) {
|
|
@@ -1957,7 +2028,7 @@ var AuditLogs = class {
|
|
|
1957
2028
|
// The format is negotiated by `Accept`, never a query field: the query
|
|
1958
2029
|
// here is the list's own filter model, and adding a key to it would fork
|
|
1959
2030
|
// the filter vocabulary the export exists to reuse.
|
|
1960
|
-
{ query: params },
|
|
2031
|
+
{ query: csvQuery(params, ["action", "entity_type"]) },
|
|
1961
2032
|
options
|
|
1962
2033
|
);
|
|
1963
2034
|
}
|
|
@@ -2872,6 +2943,7 @@ export {
|
|
|
2872
2943
|
PAYPAL_LABEL_STYLES,
|
|
2873
2944
|
PRESENTATION_CONTRACT_VERSION,
|
|
2874
2945
|
PaypalDisputes,
|
|
2946
|
+
Persons,
|
|
2875
2947
|
PlatformBilling,
|
|
2876
2948
|
PlatformFees,
|
|
2877
2949
|
PlatformMessageTemplates,
|