@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.cjs
CHANGED
|
@@ -155,6 +155,7 @@ __export(internal_exports, {
|
|
|
155
155
|
PAYPAL_LABEL_STYLES: () => PAYPAL_LABEL_STYLES,
|
|
156
156
|
PRESENTATION_CONTRACT_VERSION: () => PRESENTATION_CONTRACT_VERSION,
|
|
157
157
|
PaypalDisputes: () => PaypalDisputes,
|
|
158
|
+
Persons: () => Persons,
|
|
158
159
|
PlatformBilling: () => PlatformBilling,
|
|
159
160
|
PlatformFees: () => PlatformFees,
|
|
160
161
|
PlatformMessageTemplates: () => PlatformMessageTemplates,
|
|
@@ -715,6 +716,21 @@ var Authentication = class {
|
|
|
715
716
|
}
|
|
716
717
|
};
|
|
717
718
|
|
|
719
|
+
// src/listQuery.ts
|
|
720
|
+
function csvQuery(params, csvKeys) {
|
|
721
|
+
if (!params) return void 0;
|
|
722
|
+
const joined = csvKeys;
|
|
723
|
+
const query = {};
|
|
724
|
+
for (const [key, value] of Object.entries(params)) {
|
|
725
|
+
if (!joined.includes(key) || !Array.isArray(value)) {
|
|
726
|
+
query[key] = value;
|
|
727
|
+
} else if (value.length > 0) {
|
|
728
|
+
query[key] = value.join(",");
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return query;
|
|
732
|
+
}
|
|
733
|
+
|
|
718
734
|
// src/resources/billing.ts
|
|
719
735
|
var BillingAllocations = class {
|
|
720
736
|
constructor(request) {
|
|
@@ -830,15 +846,17 @@ var Billing = class {
|
|
|
830
846
|
});
|
|
831
847
|
}
|
|
832
848
|
/**
|
|
833
|
-
* List the balance ledger (credits and debits) for a merchant
|
|
849
|
+
* List the balance ledger (credits and debits) for a merchant, the newest
|
|
850
|
+
* entry first unless `sort_by` says otherwise.
|
|
834
851
|
*
|
|
835
852
|
* @param merchantId - The merchant account ID.
|
|
836
|
-
* @param params - Optional pagination
|
|
853
|
+
* @param params - Optional pagination, filters (entry types, a creation
|
|
854
|
+
* window) and sort.
|
|
837
855
|
* @returns The ledger entries.
|
|
838
856
|
*/
|
|
839
857
|
async listLedger(merchantId, params) {
|
|
840
858
|
return this.request("GET", `/billing/${encodeURIComponent(merchantId)}/ledger`, {
|
|
841
|
-
query: params
|
|
859
|
+
query: csvQuery(params, ["entry_type"])
|
|
842
860
|
});
|
|
843
861
|
}
|
|
844
862
|
/**
|
|
@@ -1641,6 +1659,29 @@ var Customers = class {
|
|
|
1641
1659
|
async retrieve(customerId) {
|
|
1642
1660
|
return this.request("GET", `/customers/${encodeURIComponent(customerId)}`);
|
|
1643
1661
|
}
|
|
1662
|
+
/**
|
|
1663
|
+
* Place an existing customer in a shop of the merchant, so the shop's API keys and team members
|
|
1664
|
+
* find the customer before any payment. The customer keeps the shops they already belong to;
|
|
1665
|
+
* placing one already in the shop changes nothing (`already_in_shop`). Needs a merchant-wide key:
|
|
1666
|
+
* a key bound to one shop is refused. `POST /customers/{customer_id}/shops`
|
|
1667
|
+
*
|
|
1668
|
+
* @param customerId - The customer to place.
|
|
1669
|
+
* @param profileId - The shop. It must belong to the merchant.
|
|
1670
|
+
*/
|
|
1671
|
+
async placeInShop(customerId, profileId, options) {
|
|
1672
|
+
return this.request("POST", `/customers/${encodeURIComponent(customerId)}/shops`, {
|
|
1673
|
+
body: { profile_id: profileId },
|
|
1674
|
+
...options
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
/**
|
|
1678
|
+
* Place up to 500 existing customers in one shop of the merchant, for example after an import.
|
|
1679
|
+
* The answer lists every distinct customer in request order with what happened: `placed`,
|
|
1680
|
+
* `already_in_shop` or `not_found`. Needs a merchant-wide key. `POST /customers/shops/place`
|
|
1681
|
+
*/
|
|
1682
|
+
async placeManyInShop(params, options) {
|
|
1683
|
+
return this.request("POST", "/customers/shops/place", { body: params, ...options });
|
|
1684
|
+
}
|
|
1644
1685
|
/**
|
|
1645
1686
|
* Update an existing customer's details.
|
|
1646
1687
|
*
|
|
@@ -5304,13 +5345,16 @@ var Users = class {
|
|
|
5304
5345
|
*
|
|
5305
5346
|
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
5306
5347
|
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
5348
|
+
*
|
|
5349
|
+
* Newest first unless `sort_by` says otherwise. Several `event_type` or
|
|
5350
|
+
* `auth_method` values match an event with any of them.
|
|
5307
5351
|
*/
|
|
5308
5352
|
async listLoginActivity(params) {
|
|
5309
5353
|
if (params === void 0) {
|
|
5310
5354
|
return this.request("GET", "/user/me/login-activity");
|
|
5311
5355
|
}
|
|
5312
5356
|
return this.request("GET", "/user/me/login-activity", {
|
|
5313
|
-
query: params
|
|
5357
|
+
query: csvQuery(params, ["event_type", "auth_method"])
|
|
5314
5358
|
});
|
|
5315
5359
|
}
|
|
5316
5360
|
/**
|
|
@@ -6174,14 +6218,16 @@ var IdentityVerifications = class {
|
|
|
6174
6218
|
return this.request("POST", "/identity-verifications", { body: params, ...options });
|
|
6175
6219
|
}
|
|
6176
6220
|
/**
|
|
6177
|
-
* The merchant's verifications, newest first
|
|
6178
|
-
* sees that shop's only.
|
|
6221
|
+
* The merchant's verifications, newest first unless `sort_by` says
|
|
6222
|
+
* otherwise. A caller limited to one shop sees that shop's only. Several
|
|
6223
|
+
* `outcome`, `kind` or `merchant_connector_id` values match a verification
|
|
6224
|
+
* with any of them.
|
|
6179
6225
|
*
|
|
6180
6226
|
* `GET /identity-verifications`
|
|
6181
6227
|
*/
|
|
6182
6228
|
async list(query, options) {
|
|
6183
6229
|
return this.request("GET", "/identity-verifications", {
|
|
6184
|
-
query,
|
|
6230
|
+
query: csvQuery(query, ["outcome", "kind", "merchant_connector_id"]),
|
|
6185
6231
|
...options
|
|
6186
6232
|
});
|
|
6187
6233
|
}
|
|
@@ -6965,7 +7011,13 @@ var Export = class {
|
|
|
6965
7011
|
);
|
|
6966
7012
|
}
|
|
6967
7013
|
async auditLog(params, options) {
|
|
6968
|
-
return runExport(
|
|
7014
|
+
return runExport(
|
|
7015
|
+
this.request,
|
|
7016
|
+
"GET",
|
|
7017
|
+
"/audit/export",
|
|
7018
|
+
{ query: csvQuery(params, ["profile_id", "action", "entity_type"]) },
|
|
7019
|
+
options
|
|
7020
|
+
);
|
|
6969
7021
|
}
|
|
6970
7022
|
};
|
|
6971
7023
|
function queried(params, headers) {
|
|
@@ -7262,14 +7314,15 @@ var BuyerBlocklist = class {
|
|
|
7262
7314
|
this.request = request;
|
|
7263
7315
|
}
|
|
7264
7316
|
/**
|
|
7265
|
-
* One page of blocked buyers, newest first
|
|
7266
|
-
* (the entries that include an identifier of
|
|
7267
|
-
*
|
|
7317
|
+
* One page of blocked buyers, newest first unless `sort_by` says otherwise,
|
|
7318
|
+
* filtered by scope, by `kind` (the entries that include an identifier of
|
|
7319
|
+
* that kind, or of any of several) and by a search over every identifier
|
|
7320
|
+
* and the note. Expired entries are not listed.
|
|
7268
7321
|
* `GET /buyer-blocklist`
|
|
7269
7322
|
*/
|
|
7270
7323
|
async list(params) {
|
|
7271
7324
|
return this.request("GET", "/buyer-blocklist", {
|
|
7272
|
-
query: params
|
|
7325
|
+
query: csvQuery(params, ["kind"])
|
|
7273
7326
|
});
|
|
7274
7327
|
}
|
|
7275
7328
|
/**
|
|
@@ -7395,6 +7448,56 @@ var BuyerBlocklist = class {
|
|
|
7395
7448
|
}
|
|
7396
7449
|
};
|
|
7397
7450
|
|
|
7451
|
+
// src/resources/persons.ts
|
|
7452
|
+
var Persons = class {
|
|
7453
|
+
constructor(request) {
|
|
7454
|
+
this.request = request;
|
|
7455
|
+
}
|
|
7456
|
+
/**
|
|
7457
|
+
* One page of persons, by default the most recent payment first, with the
|
|
7458
|
+
* number of persons the request matches.
|
|
7459
|
+
* `GET /persons`
|
|
7460
|
+
*/
|
|
7461
|
+
async list(params) {
|
|
7462
|
+
return this.request("GET", "/persons", { query: params });
|
|
7463
|
+
}
|
|
7464
|
+
/**
|
|
7465
|
+
* One person: its figures, the identifiers and IP addresses its payments
|
|
7466
|
+
* carry, and its payments by status, shop, payment method, risk band and
|
|
7467
|
+
* environment. The id of a person that was merged into another returns
|
|
7468
|
+
* that person, with `merged_from` naming the id asked for. A person with
|
|
7469
|
+
* no payment in the scope is not found (`404`).
|
|
7470
|
+
* `GET /persons/{person_id}`
|
|
7471
|
+
*/
|
|
7472
|
+
async retrieve(personId, params) {
|
|
7473
|
+
return this.request("GET", `/persons/${encodeURIComponent(personId)}`, {
|
|
7474
|
+
query: params
|
|
7475
|
+
});
|
|
7476
|
+
}
|
|
7477
|
+
/**
|
|
7478
|
+
* Other persons of the merchant that may be the same person, the likeliest
|
|
7479
|
+
* first, at most 20. An estimate from the devices the persons paid with;
|
|
7480
|
+
* related persons stay separate persons.
|
|
7481
|
+
* `GET /persons/{person_id}/related`
|
|
7482
|
+
*/
|
|
7483
|
+
async related(personId, params) {
|
|
7484
|
+
return this.request("GET", `/persons/${encodeURIComponent(personId)}/related`, {
|
|
7485
|
+
query: params
|
|
7486
|
+
});
|
|
7487
|
+
}
|
|
7488
|
+
/**
|
|
7489
|
+
* The person of one payment, with how many payments the person has and
|
|
7490
|
+
* which kinds of identifier tie this payment to the others. `404` while
|
|
7491
|
+
* the payment has no person yet.
|
|
7492
|
+
* `GET /persons/payment/{payment_id}`
|
|
7493
|
+
*/
|
|
7494
|
+
async ofPayment(paymentId, params) {
|
|
7495
|
+
return this.request("GET", `/persons/payment/${encodeURIComponent(paymentId)}`, {
|
|
7496
|
+
query: params
|
|
7497
|
+
});
|
|
7498
|
+
}
|
|
7499
|
+
};
|
|
7500
|
+
|
|
7398
7501
|
// src/resources/shopLabels.ts
|
|
7399
7502
|
var labelsPath = (merchantId) => `/account/${encodeURIComponent(merchantId)}/business-profile/labels`;
|
|
7400
7503
|
var ShopLabels = class {
|
|
@@ -7647,12 +7750,13 @@ var BuyerConversations = class {
|
|
|
7647
7750
|
this.request = request;
|
|
7648
7751
|
}
|
|
7649
7752
|
/**
|
|
7650
|
-
* One page of the inbox, the latest message first
|
|
7651
|
-
* status, assignee, mode or
|
|
7753
|
+
* One page of the inbox, the latest message first unless `sort_by` says
|
|
7754
|
+
* otherwise, filtered by shop, status (one or several), assignee, mode or
|
|
7755
|
+
* buyer. `GET /buyer-conversations`
|
|
7652
7756
|
*/
|
|
7653
7757
|
async list(params) {
|
|
7654
7758
|
return this.request("GET", "/buyer-conversations", {
|
|
7655
|
-
query: params
|
|
7759
|
+
query: csvQuery(params, ["status"])
|
|
7656
7760
|
});
|
|
7657
7761
|
}
|
|
7658
7762
|
/**
|
|
@@ -7763,12 +7867,14 @@ var BuyerEvidenceReviews = class {
|
|
|
7763
7867
|
this.request = request;
|
|
7764
7868
|
}
|
|
7765
7869
|
/**
|
|
7766
|
-
* The shop's cases with buyer evidence, the nearest target first
|
|
7767
|
-
* `
|
|
7870
|
+
* The shop's cases with buyer evidence, the nearest target first unless
|
|
7871
|
+
* `sort_by` says otherwise. Several `state` values match a case in any of
|
|
7872
|
+
* them. `merchant_id` and `reviewer` are ignored here, and so are the
|
|
7873
|
+
* `merchant` and `reviewer` sorts. `GET /buyer-evidence`
|
|
7768
7874
|
*/
|
|
7769
7875
|
async list(params) {
|
|
7770
7876
|
return this.request("GET", "/buyer-evidence", {
|
|
7771
|
-
query: params
|
|
7877
|
+
query: csvQuery(params, ["state"])
|
|
7772
7878
|
});
|
|
7773
7879
|
}
|
|
7774
7880
|
/** One case's evidence with its history and files. `GET /buyer-evidence/{id}` */
|
|
@@ -8540,10 +8646,14 @@ var Support = class {
|
|
|
8540
8646
|
async create(body) {
|
|
8541
8647
|
return this.request("POST", "/support/conversations", { body });
|
|
8542
8648
|
}
|
|
8543
|
-
/**
|
|
8649
|
+
/**
|
|
8650
|
+
* The conversations the caller may read, the latest message first unless
|
|
8651
|
+
* `sort_by` says otherwise. Several `kind`, `category` or `status` values
|
|
8652
|
+
* match a conversation with any of them. `GET /support/conversations`
|
|
8653
|
+
*/
|
|
8544
8654
|
async list(query) {
|
|
8545
8655
|
return this.request("GET", "/support/conversations", {
|
|
8546
|
-
query: query
|
|
8656
|
+
query: csvQuery(query, ["kind", "category", "status"])
|
|
8547
8657
|
});
|
|
8548
8658
|
}
|
|
8549
8659
|
/** One conversation. `GET /support/conversations/{id}` */
|
|
@@ -8594,6 +8704,7 @@ var Support = class {
|
|
|
8594
8704
|
};
|
|
8595
8705
|
|
|
8596
8706
|
// src/resources/invoices.ts
|
|
8707
|
+
var INVOICE_CSV_KEYS = ["status", "kind"];
|
|
8597
8708
|
var Invoices = class {
|
|
8598
8709
|
constructor(request) {
|
|
8599
8710
|
this.request = request;
|
|
@@ -8613,13 +8724,15 @@ var Invoices = class {
|
|
|
8613
8724
|
return this.request("POST", "/invoices", { body: params, ...options });
|
|
8614
8725
|
}
|
|
8615
8726
|
/**
|
|
8616
|
-
* One page of documents, newest first
|
|
8617
|
-
* `include_lines` is set, and never a `refund`
|
|
8727
|
+
* One page of documents, newest first unless `sort_by` says otherwise. List
|
|
8728
|
+
* rows carry no `lines` unless `include_lines` is set, and never a `refund`
|
|
8729
|
+
* summary. Several `status` or `kind` values match a document in any of
|
|
8730
|
+
* them.
|
|
8618
8731
|
* `GET /invoices`
|
|
8619
8732
|
*/
|
|
8620
8733
|
async list(params, options) {
|
|
8621
8734
|
return this.request("GET", "/invoices", {
|
|
8622
|
-
query: params
|
|
8735
|
+
query: csvQuery(params, INVOICE_CSV_KEYS),
|
|
8623
8736
|
...options
|
|
8624
8737
|
});
|
|
8625
8738
|
}
|
|
@@ -8644,7 +8757,7 @@ var Invoices = class {
|
|
|
8644
8757
|
*/
|
|
8645
8758
|
async listForProduct(productId, params, options) {
|
|
8646
8759
|
return this.request("GET", `/products/${encodeURIComponent(productId)}/invoices`, {
|
|
8647
|
-
query: params
|
|
8760
|
+
query: csvQuery(params, INVOICE_CSV_KEYS),
|
|
8648
8761
|
...options
|
|
8649
8762
|
});
|
|
8650
8763
|
}
|
|
@@ -8662,7 +8775,7 @@ var Invoices = class {
|
|
|
8662
8775
|
*/
|
|
8663
8776
|
async export(params, options) {
|
|
8664
8777
|
return this.request("GET", "/invoices/export", {
|
|
8665
|
-
query:
|
|
8778
|
+
query: csvQuery(params, INVOICE_CSV_KEYS),
|
|
8666
8779
|
responseType: "blob",
|
|
8667
8780
|
...options
|
|
8668
8781
|
});
|
|
@@ -9357,7 +9470,10 @@ var Subscriptions = class {
|
|
|
9357
9470
|
...options
|
|
9358
9471
|
});
|
|
9359
9472
|
}
|
|
9360
|
-
/**
|
|
9473
|
+
/**
|
|
9474
|
+
* List subscriptions for the profile, or one customer's with `customer_id`.
|
|
9475
|
+
* `GET /subscriptions/list`
|
|
9476
|
+
*/
|
|
9361
9477
|
async list(params, options) {
|
|
9362
9478
|
return this.request("GET", "/subscriptions/list", {
|
|
9363
9479
|
query: params,
|
|
@@ -10153,13 +10269,19 @@ var BuyerPortal = class {
|
|
|
10153
10269
|
};
|
|
10154
10270
|
|
|
10155
10271
|
// src/resources/audit.ts
|
|
10272
|
+
var MERCHANT_AUDIT_CSV_KEYS = ["profile_id", "action", "entity_type"];
|
|
10156
10273
|
var Audit = class {
|
|
10157
10274
|
constructor(request) {
|
|
10158
10275
|
this.request = request;
|
|
10159
10276
|
}
|
|
10277
|
+
/**
|
|
10278
|
+
* One page of the merchant's audit log, the newest entry first unless
|
|
10279
|
+
* `sort_by` says otherwise. Several `profile_id`, `action` or `entity_type`
|
|
10280
|
+
* values match an entry with any of them. `GET /audit`
|
|
10281
|
+
*/
|
|
10160
10282
|
async list(params) {
|
|
10161
10283
|
return this.request("GET", "/audit", {
|
|
10162
|
-
query: params
|
|
10284
|
+
query: csvQuery(params, MERCHANT_AUDIT_CSV_KEYS)
|
|
10163
10285
|
});
|
|
10164
10286
|
}
|
|
10165
10287
|
/**
|
|
@@ -10172,6 +10294,33 @@ var Audit = class {
|
|
|
10172
10294
|
};
|
|
10173
10295
|
|
|
10174
10296
|
// src/resources/settlement.ts
|
|
10297
|
+
function statementListQuery(params) {
|
|
10298
|
+
return csvQuery(
|
|
10299
|
+
{
|
|
10300
|
+
test_mode: params.test_mode,
|
|
10301
|
+
profile_id: params.profile_id,
|
|
10302
|
+
limit: params.limit,
|
|
10303
|
+
offset: params.offset,
|
|
10304
|
+
payout_status: params.payout_status,
|
|
10305
|
+
period_from: params.period_from,
|
|
10306
|
+
period_to: params.period_to,
|
|
10307
|
+
sort_by: params.sort_by,
|
|
10308
|
+
sort_order: params.sort_order
|
|
10309
|
+
},
|
|
10310
|
+
["payout_status"]
|
|
10311
|
+
);
|
|
10312
|
+
}
|
|
10313
|
+
function nativeListQuery(params) {
|
|
10314
|
+
return {
|
|
10315
|
+
profile_id: params.profile_id,
|
|
10316
|
+
currency: params.currency,
|
|
10317
|
+
test_mode: params.test_mode,
|
|
10318
|
+
limit: params.limit,
|
|
10319
|
+
offset: params.offset,
|
|
10320
|
+
sort_by: params.sort_by,
|
|
10321
|
+
sort_order: params.sort_order
|
|
10322
|
+
};
|
|
10323
|
+
}
|
|
10175
10324
|
function exportHeaders(options, accept) {
|
|
10176
10325
|
const headers = new Headers(options?.headers);
|
|
10177
10326
|
headers.set("Accept", accept);
|
|
@@ -10335,18 +10484,15 @@ var Settlement = class {
|
|
|
10335
10484
|
});
|
|
10336
10485
|
}
|
|
10337
10486
|
/**
|
|
10338
|
-
* List generated settlement statements, newest first
|
|
10487
|
+
* List generated settlement statements, the newest period first unless
|
|
10488
|
+
* `sort_by` says otherwise. Several `payout_status` values match a
|
|
10489
|
+
* statement in any of them.
|
|
10339
10490
|
*
|
|
10340
10491
|
* `GET /settlement/statements`
|
|
10341
10492
|
*/
|
|
10342
10493
|
async listStatements(params, options) {
|
|
10343
10494
|
return this.request("GET", "/settlement/statements", {
|
|
10344
|
-
query:
|
|
10345
|
-
test_mode: params.test_mode,
|
|
10346
|
-
profile_id: params.profile_id,
|
|
10347
|
-
limit: params.limit,
|
|
10348
|
-
offset: params.offset
|
|
10349
|
-
},
|
|
10495
|
+
query: statementListQuery(params),
|
|
10350
10496
|
...options
|
|
10351
10497
|
});
|
|
10352
10498
|
}
|
|
@@ -10603,16 +10749,14 @@ var Settlement = class {
|
|
|
10603
10749
|
options
|
|
10604
10750
|
);
|
|
10605
10751
|
}
|
|
10606
|
-
/**
|
|
10752
|
+
/**
|
|
10753
|
+
* List report summaries without fetching every source row in each saved
|
|
10754
|
+
* snapshot, the newest first. `sort_by` takes `period` here; another value
|
|
10755
|
+
* is refused.
|
|
10756
|
+
*/
|
|
10607
10757
|
async listNativeReports(params, options) {
|
|
10608
10758
|
return this.request("GET", "/settlement/native/reports", {
|
|
10609
|
-
query:
|
|
10610
|
-
profile_id: params.profile_id,
|
|
10611
|
-
currency: params.currency,
|
|
10612
|
-
test_mode: params.test_mode,
|
|
10613
|
-
limit: params.limit,
|
|
10614
|
-
offset: params.offset
|
|
10615
|
-
},
|
|
10759
|
+
query: nativeListQuery(params),
|
|
10616
10760
|
...options
|
|
10617
10761
|
});
|
|
10618
10762
|
}
|
|
@@ -10630,15 +10774,13 @@ var Settlement = class {
|
|
|
10630
10774
|
bodyIdempotencyKey: params.idempotency_key
|
|
10631
10775
|
});
|
|
10632
10776
|
}
|
|
10777
|
+
/**
|
|
10778
|
+
* List recorded payouts, the earliest value date first. `sort_by` takes
|
|
10779
|
+
* `value_date` or `amount` here; another value is refused.
|
|
10780
|
+
*/
|
|
10633
10781
|
async listNativePayouts(params, options) {
|
|
10634
10782
|
return this.request("GET", "/settlement/native/payouts", {
|
|
10635
|
-
query:
|
|
10636
|
-
profile_id: params.profile_id,
|
|
10637
|
-
currency: params.currency,
|
|
10638
|
-
test_mode: params.test_mode,
|
|
10639
|
-
limit: params.limit,
|
|
10640
|
-
offset: params.offset
|
|
10641
|
-
},
|
|
10783
|
+
query: nativeListQuery(params),
|
|
10642
10784
|
...options
|
|
10643
10785
|
});
|
|
10644
10786
|
}
|
|
@@ -11592,6 +11734,7 @@ var Delopay = class {
|
|
|
11592
11734
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
11593
11735
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
11594
11736
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
11737
|
+
this.persons = new Persons(request);
|
|
11595
11738
|
this.shopLabels = new ShopLabels(request);
|
|
11596
11739
|
this.industries = new Industries(request);
|
|
11597
11740
|
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
@@ -17670,12 +17813,15 @@ var AdminFileScans = class {
|
|
|
17670
17813
|
return this.request("POST", "/admin-portal/file-scans/test", { body });
|
|
17671
17814
|
}
|
|
17672
17815
|
/**
|
|
17673
|
-
* Uploaded files their scan blocked, of every kind, latest result first
|
|
17674
|
-
* with what the scanner found.
|
|
17675
|
-
*
|
|
17816
|
+
* Uploaded files their scan blocked, of every kind, latest result first
|
|
17817
|
+
* unless `sort_by` says otherwise, with what the scanner found. Several
|
|
17818
|
+
* `kind` or `side` values match a file with any of them. A blocked file's
|
|
17819
|
+
* content is never handed out. `GET /admin-portal/file-scans/blocked`
|
|
17676
17820
|
*/
|
|
17677
17821
|
async blocked(query = {}) {
|
|
17678
|
-
return this.request("GET", "/admin-portal/file-scans/blocked", {
|
|
17822
|
+
return this.request("GET", "/admin-portal/file-scans/blocked", {
|
|
17823
|
+
query: csvQuery(query, ["kind", "side"])
|
|
17824
|
+
});
|
|
17679
17825
|
}
|
|
17680
17826
|
};
|
|
17681
17827
|
|
|
@@ -17899,9 +18045,14 @@ var AdminPortal = class {
|
|
|
17899
18045
|
{ body }
|
|
17900
18046
|
);
|
|
17901
18047
|
}
|
|
18048
|
+
/**
|
|
18049
|
+
* One page of merchants. Without `sort_by` the caller's favorite merchants
|
|
18050
|
+
* come first; with one, favorites are not moved. Several `billing_status`
|
|
18051
|
+
* values match a merchant in any of them. `GET /admin-portal/customers`
|
|
18052
|
+
*/
|
|
17902
18053
|
async listCustomers(params) {
|
|
17903
18054
|
return this.request("GET", "/admin-portal/customers", {
|
|
17904
|
-
query: params
|
|
18055
|
+
query: csvQuery(params, ["billing_status"])
|
|
17905
18056
|
});
|
|
17906
18057
|
}
|
|
17907
18058
|
async getCustomer(customerId) {
|
|
@@ -17913,6 +18064,55 @@ var AdminPortal = class {
|
|
|
17913
18064
|
query
|
|
17914
18065
|
});
|
|
17915
18066
|
}
|
|
18067
|
+
/**
|
|
18068
|
+
* One page of ONE merchant's persons: the same query and response as the
|
|
18069
|
+
* merchant-facing `persons.list`, admin-authenticated. Persons are never
|
|
18070
|
+
* read across merchants.
|
|
18071
|
+
*
|
|
18072
|
+
* `GET /admin-portal/persons/{merchantId}`
|
|
18073
|
+
*/
|
|
18074
|
+
async listPersons(merchantId, params) {
|
|
18075
|
+
return this.request("GET", adminPersons(merchantId), {
|
|
18076
|
+
query: params
|
|
18077
|
+
});
|
|
18078
|
+
}
|
|
18079
|
+
/**
|
|
18080
|
+
* One person of a merchant, as the merchant-facing `persons.retrieve`
|
|
18081
|
+
* returns it.
|
|
18082
|
+
*
|
|
18083
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}`
|
|
18084
|
+
*/
|
|
18085
|
+
async getPerson(merchantId, personId, params) {
|
|
18086
|
+
return this.request("GET", `${adminPersons(merchantId)}/${encodeURIComponent(personId)}`, {
|
|
18087
|
+
query: params
|
|
18088
|
+
});
|
|
18089
|
+
}
|
|
18090
|
+
/**
|
|
18091
|
+
* The persons of a merchant that may be the same person as this one, as
|
|
18092
|
+
* the merchant-facing `persons.related` returns them.
|
|
18093
|
+
*
|
|
18094
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/related`
|
|
18095
|
+
*/
|
|
18096
|
+
async listRelatedPersons(merchantId, personId, params) {
|
|
18097
|
+
return this.request(
|
|
18098
|
+
"GET",
|
|
18099
|
+
`${adminPersons(merchantId)}/${encodeURIComponent(personId)}/related`,
|
|
18100
|
+
{ query: params }
|
|
18101
|
+
);
|
|
18102
|
+
}
|
|
18103
|
+
/**
|
|
18104
|
+
* The person of one payment of a merchant, as the merchant-facing
|
|
18105
|
+
* `persons.ofPayment` returns it.
|
|
18106
|
+
*
|
|
18107
|
+
* `GET /admin-portal/persons/{merchantId}/payment/{paymentId}`
|
|
18108
|
+
*/
|
|
18109
|
+
async getPaymentPerson(merchantId, paymentId, params) {
|
|
18110
|
+
return this.request(
|
|
18111
|
+
"GET",
|
|
18112
|
+
`${adminPersons(merchantId)}/payment/${encodeURIComponent(paymentId)}`,
|
|
18113
|
+
{ query: params }
|
|
18114
|
+
);
|
|
18115
|
+
}
|
|
17916
18116
|
async exportTransactions(params, options) {
|
|
17917
18117
|
return runExport(
|
|
17918
18118
|
this.request,
|
|
@@ -18078,21 +18278,25 @@ var AdminPortal = class {
|
|
|
18078
18278
|
}
|
|
18079
18279
|
/**
|
|
18080
18280
|
* Refunds of ANY merchant mirrored from a connector webhook at a
|
|
18081
|
-
* non-terminal status that no sync can advance. Newest first
|
|
18281
|
+
* non-terminal status that no sync can advance. Newest first unless
|
|
18282
|
+
* `sort_by` says otherwise. Several `connector`, `status` or `sync_reason`
|
|
18283
|
+
* values match a refund with any of them.
|
|
18082
18284
|
*/
|
|
18083
18285
|
async listUnresolvedRefunds(params) {
|
|
18084
18286
|
return this.request("GET", "/admin-portal/refunds/unresolved", {
|
|
18085
|
-
query: params
|
|
18287
|
+
query: csvQuery(params, ["connector", "status", "sync_reason"])
|
|
18086
18288
|
});
|
|
18087
18289
|
}
|
|
18088
18290
|
// --- Buyer evidence review --------------------------------------------------
|
|
18089
18291
|
/**
|
|
18090
|
-
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
18091
|
-
* across merchants unless `merchant_id`
|
|
18292
|
+
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
18293
|
+
* unless `sort_by` says otherwise, across merchants unless `merchant_id` or
|
|
18294
|
+
* `profile_id` narrows it. Several `state` values match a case in any of
|
|
18295
|
+
* them.
|
|
18092
18296
|
*/
|
|
18093
18297
|
async listBuyerEvidence(params) {
|
|
18094
18298
|
return this.request("GET", "/admin-portal/buyer-evidence", {
|
|
18095
|
-
query: params
|
|
18299
|
+
query: csvQuery(params, ["state"])
|
|
18096
18300
|
});
|
|
18097
18301
|
}
|
|
18098
18302
|
/** Chargeback prevention connections across merchants, or of one merchant. */
|
|
@@ -18763,14 +18967,7 @@ var AdminPortal = class {
|
|
|
18763
18967
|
return this.request(
|
|
18764
18968
|
"GET",
|
|
18765
18969
|
`/admin-portal/accounts/${encodeURIComponent(merchantId)}/settlement/statements`,
|
|
18766
|
-
{
|
|
18767
|
-
query: {
|
|
18768
|
-
test_mode: params.test_mode,
|
|
18769
|
-
profile_id: params.profile_id,
|
|
18770
|
-
limit: params.limit,
|
|
18771
|
-
offset: params.offset
|
|
18772
|
-
}
|
|
18773
|
-
}
|
|
18970
|
+
{ query: statementListQuery(params) }
|
|
18774
18971
|
);
|
|
18775
18972
|
}
|
|
18776
18973
|
/**
|
|
@@ -19117,6 +19314,7 @@ function transactionListQuery(params) {
|
|
|
19117
19314
|
failure_substatuses,
|
|
19118
19315
|
product_ids,
|
|
19119
19316
|
buyer_risk_band,
|
|
19317
|
+
merchant_ids,
|
|
19120
19318
|
...query
|
|
19121
19319
|
} = params;
|
|
19122
19320
|
return {
|
|
@@ -19131,9 +19329,13 @@ function transactionListQuery(params) {
|
|
|
19131
19329
|
...routing_approaches?.length ? { routing_approaches: routing_approaches.join(",") } : {},
|
|
19132
19330
|
...failure_substatuses?.length ? { failure_substatuses: failure_substatuses.join(",") } : {},
|
|
19133
19331
|
...product_ids?.length ? { product_ids: product_ids.join(",") } : {},
|
|
19134
|
-
...buyer_risk_band?.length ? { buyer_risk_band: buyer_risk_band.join(",") } : {}
|
|
19332
|
+
...buyer_risk_band?.length ? { buyer_risk_band: buyer_risk_band.join(",") } : {},
|
|
19333
|
+
...merchant_ids?.length ? { merchant_ids: merchant_ids.join(",") } : {}
|
|
19135
19334
|
};
|
|
19136
19335
|
}
|
|
19336
|
+
function adminPersons(merchantId) {
|
|
19337
|
+
return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
|
|
19338
|
+
}
|
|
19137
19339
|
function adminAccount(merchantId) {
|
|
19138
19340
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
19139
19341
|
}
|
|
@@ -19144,10 +19346,14 @@ var AdminSupport = class {
|
|
|
19144
19346
|
constructor(request) {
|
|
19145
19347
|
this.request = request;
|
|
19146
19348
|
}
|
|
19147
|
-
/**
|
|
19349
|
+
/**
|
|
19350
|
+
* The queue, the latest message first unless `sort_by` says otherwise.
|
|
19351
|
+
* Several `kind`, `category` or `status` values match a conversation with
|
|
19352
|
+
* any of them. `GET /admin-portal/support/conversations`
|
|
19353
|
+
*/
|
|
19148
19354
|
async list(query) {
|
|
19149
19355
|
return this.request("GET", "/admin-portal/support/conversations", {
|
|
19150
|
-
query: query
|
|
19356
|
+
query: csvQuery(query, ["kind", "category", "status"])
|
|
19151
19357
|
});
|
|
19152
19358
|
}
|
|
19153
19359
|
/**
|
|
@@ -19216,9 +19422,14 @@ var AuditLogs = class {
|
|
|
19216
19422
|
constructor(request) {
|
|
19217
19423
|
this.request = request;
|
|
19218
19424
|
}
|
|
19425
|
+
/**
|
|
19426
|
+
* One page of the platform audit log, the newest entry first unless
|
|
19427
|
+
* `sort_by` says otherwise. Several `action` or `entity_type` values match
|
|
19428
|
+
* an entry with any of them.
|
|
19429
|
+
*/
|
|
19219
19430
|
async list(params) {
|
|
19220
19431
|
return this.request("GET", "/admin-portal/audit", {
|
|
19221
|
-
query: params
|
|
19432
|
+
query: csvQuery(params, ["action", "entity_type"])
|
|
19222
19433
|
});
|
|
19223
19434
|
}
|
|
19224
19435
|
async retrieve(logId) {
|
|
@@ -19232,7 +19443,7 @@ var AuditLogs = class {
|
|
|
19232
19443
|
// The format is negotiated by `Accept`, never a query field: the query
|
|
19233
19444
|
// here is the list's own filter model, and adding a key to it would fork
|
|
19234
19445
|
// the filter vocabulary the export exists to reuse.
|
|
19235
|
-
{ query: params },
|
|
19446
|
+
{ query: csvQuery(params, ["action", "entity_type"]) },
|
|
19236
19447
|
options
|
|
19237
19448
|
);
|
|
19238
19449
|
}
|
|
@@ -20148,6 +20359,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
20148
20359
|
PAYPAL_LABEL_STYLES,
|
|
20149
20360
|
PRESENTATION_CONTRACT_VERSION,
|
|
20150
20361
|
PaypalDisputes,
|
|
20362
|
+
Persons,
|
|
20151
20363
|
PlatformBilling,
|
|
20152
20364
|
PlatformFees,
|
|
20153
20365
|
PlatformMessageTemplates,
|