@delopay/sdk 0.388.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-A6CXJOUK.js → chunk-PE7G347M.js} +172 -50
- package/dist/chunk-PE7G347M.js.map +1 -0
- package/dist/{index-BSd4HpQq.d.cts → index-CIObKeC7.d.cts} +618 -35
- package/dist/{index-BSd4HpQq.d.ts → index-CIObKeC7.d.ts} +618 -35
- package/dist/index.cjs +170 -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 +261 -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 +1 -1
- 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
|
/**
|
|
@@ -5304,13 +5322,16 @@ var Users = class {
|
|
|
5304
5322
|
*
|
|
5305
5323
|
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
5306
5324
|
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
5325
|
+
*
|
|
5326
|
+
* Newest first unless `sort_by` says otherwise. Several `event_type` or
|
|
5327
|
+
* `auth_method` values match an event with any of them.
|
|
5307
5328
|
*/
|
|
5308
5329
|
async listLoginActivity(params) {
|
|
5309
5330
|
if (params === void 0) {
|
|
5310
5331
|
return this.request("GET", "/user/me/login-activity");
|
|
5311
5332
|
}
|
|
5312
5333
|
return this.request("GET", "/user/me/login-activity", {
|
|
5313
|
-
query: params
|
|
5334
|
+
query: csvQuery(params, ["event_type", "auth_method"])
|
|
5314
5335
|
});
|
|
5315
5336
|
}
|
|
5316
5337
|
/**
|
|
@@ -6174,14 +6195,16 @@ var IdentityVerifications = class {
|
|
|
6174
6195
|
return this.request("POST", "/identity-verifications", { body: params, ...options });
|
|
6175
6196
|
}
|
|
6176
6197
|
/**
|
|
6177
|
-
* The merchant's verifications, newest first
|
|
6178
|
-
* sees that shop's only.
|
|
6198
|
+
* The merchant's verifications, newest first unless `sort_by` says
|
|
6199
|
+
* otherwise. A caller limited to one shop sees that shop's only. Several
|
|
6200
|
+
* `outcome`, `kind` or `merchant_connector_id` values match a verification
|
|
6201
|
+
* with any of them.
|
|
6179
6202
|
*
|
|
6180
6203
|
* `GET /identity-verifications`
|
|
6181
6204
|
*/
|
|
6182
6205
|
async list(query, options) {
|
|
6183
6206
|
return this.request("GET", "/identity-verifications", {
|
|
6184
|
-
query,
|
|
6207
|
+
query: csvQuery(query, ["outcome", "kind", "merchant_connector_id"]),
|
|
6185
6208
|
...options
|
|
6186
6209
|
});
|
|
6187
6210
|
}
|
|
@@ -6965,7 +6988,13 @@ var Export = class {
|
|
|
6965
6988
|
);
|
|
6966
6989
|
}
|
|
6967
6990
|
async auditLog(params, options) {
|
|
6968
|
-
return runExport(
|
|
6991
|
+
return runExport(
|
|
6992
|
+
this.request,
|
|
6993
|
+
"GET",
|
|
6994
|
+
"/audit/export",
|
|
6995
|
+
{ query: csvQuery(params, ["profile_id", "action", "entity_type"]) },
|
|
6996
|
+
options
|
|
6997
|
+
);
|
|
6969
6998
|
}
|
|
6970
6999
|
};
|
|
6971
7000
|
function queried(params, headers) {
|
|
@@ -7262,14 +7291,15 @@ var BuyerBlocklist = class {
|
|
|
7262
7291
|
this.request = request;
|
|
7263
7292
|
}
|
|
7264
7293
|
/**
|
|
7265
|
-
* One page of blocked buyers, newest first
|
|
7266
|
-
* (the entries that include an identifier of
|
|
7267
|
-
*
|
|
7294
|
+
* One page of blocked buyers, newest first unless `sort_by` says otherwise,
|
|
7295
|
+
* filtered by scope, by `kind` (the entries that include an identifier of
|
|
7296
|
+
* that kind, or of any of several) and by a search over every identifier
|
|
7297
|
+
* and the note. Expired entries are not listed.
|
|
7268
7298
|
* `GET /buyer-blocklist`
|
|
7269
7299
|
*/
|
|
7270
7300
|
async list(params) {
|
|
7271
7301
|
return this.request("GET", "/buyer-blocklist", {
|
|
7272
|
-
query: params
|
|
7302
|
+
query: csvQuery(params, ["kind"])
|
|
7273
7303
|
});
|
|
7274
7304
|
}
|
|
7275
7305
|
/**
|
|
@@ -7395,6 +7425,56 @@ var BuyerBlocklist = class {
|
|
|
7395
7425
|
}
|
|
7396
7426
|
};
|
|
7397
7427
|
|
|
7428
|
+
// src/resources/persons.ts
|
|
7429
|
+
var Persons = class {
|
|
7430
|
+
constructor(request) {
|
|
7431
|
+
this.request = request;
|
|
7432
|
+
}
|
|
7433
|
+
/**
|
|
7434
|
+
* One page of persons, by default the most recent payment first, with the
|
|
7435
|
+
* number of persons the request matches.
|
|
7436
|
+
* `GET /persons`
|
|
7437
|
+
*/
|
|
7438
|
+
async list(params) {
|
|
7439
|
+
return this.request("GET", "/persons", { query: params });
|
|
7440
|
+
}
|
|
7441
|
+
/**
|
|
7442
|
+
* One person: its figures, the identifiers and IP addresses its payments
|
|
7443
|
+
* carry, and its payments by status, shop, payment method, risk band and
|
|
7444
|
+
* environment. The id of a person that was merged into another returns
|
|
7445
|
+
* that person, with `merged_from` naming the id asked for. A person with
|
|
7446
|
+
* no payment in the scope is not found (`404`).
|
|
7447
|
+
* `GET /persons/{person_id}`
|
|
7448
|
+
*/
|
|
7449
|
+
async retrieve(personId, params) {
|
|
7450
|
+
return this.request("GET", `/persons/${encodeURIComponent(personId)}`, {
|
|
7451
|
+
query: params
|
|
7452
|
+
});
|
|
7453
|
+
}
|
|
7454
|
+
/**
|
|
7455
|
+
* Other persons of the merchant that may be the same person, the likeliest
|
|
7456
|
+
* first, at most 20. An estimate from the devices the persons paid with;
|
|
7457
|
+
* related persons stay separate persons.
|
|
7458
|
+
* `GET /persons/{person_id}/related`
|
|
7459
|
+
*/
|
|
7460
|
+
async related(personId, params) {
|
|
7461
|
+
return this.request("GET", `/persons/${encodeURIComponent(personId)}/related`, {
|
|
7462
|
+
query: params
|
|
7463
|
+
});
|
|
7464
|
+
}
|
|
7465
|
+
/**
|
|
7466
|
+
* The person of one payment, with how many payments the person has and
|
|
7467
|
+
* which kinds of identifier tie this payment to the others. `404` while
|
|
7468
|
+
* the payment has no person yet.
|
|
7469
|
+
* `GET /persons/payment/{payment_id}`
|
|
7470
|
+
*/
|
|
7471
|
+
async ofPayment(paymentId, params) {
|
|
7472
|
+
return this.request("GET", `/persons/payment/${encodeURIComponent(paymentId)}`, {
|
|
7473
|
+
query: params
|
|
7474
|
+
});
|
|
7475
|
+
}
|
|
7476
|
+
};
|
|
7477
|
+
|
|
7398
7478
|
// src/resources/shopLabels.ts
|
|
7399
7479
|
var labelsPath = (merchantId) => `/account/${encodeURIComponent(merchantId)}/business-profile/labels`;
|
|
7400
7480
|
var ShopLabels = class {
|
|
@@ -7647,12 +7727,13 @@ var BuyerConversations = class {
|
|
|
7647
7727
|
this.request = request;
|
|
7648
7728
|
}
|
|
7649
7729
|
/**
|
|
7650
|
-
* One page of the inbox, the latest message first
|
|
7651
|
-
* status, assignee, mode or
|
|
7730
|
+
* One page of the inbox, the latest message first unless `sort_by` says
|
|
7731
|
+
* otherwise, filtered by shop, status (one or several), assignee, mode or
|
|
7732
|
+
* buyer. `GET /buyer-conversations`
|
|
7652
7733
|
*/
|
|
7653
7734
|
async list(params) {
|
|
7654
7735
|
return this.request("GET", "/buyer-conversations", {
|
|
7655
|
-
query: params
|
|
7736
|
+
query: csvQuery(params, ["status"])
|
|
7656
7737
|
});
|
|
7657
7738
|
}
|
|
7658
7739
|
/**
|
|
@@ -7763,12 +7844,14 @@ var BuyerEvidenceReviews = class {
|
|
|
7763
7844
|
this.request = request;
|
|
7764
7845
|
}
|
|
7765
7846
|
/**
|
|
7766
|
-
* The shop's cases with buyer evidence, the nearest target first
|
|
7767
|
-
* `
|
|
7847
|
+
* The shop's cases with buyer evidence, the nearest target first unless
|
|
7848
|
+
* `sort_by` says otherwise. Several `state` values match a case in any of
|
|
7849
|
+
* them. `merchant_id` and `reviewer` are ignored here, and so are the
|
|
7850
|
+
* `merchant` and `reviewer` sorts. `GET /buyer-evidence`
|
|
7768
7851
|
*/
|
|
7769
7852
|
async list(params) {
|
|
7770
7853
|
return this.request("GET", "/buyer-evidence", {
|
|
7771
|
-
query: params
|
|
7854
|
+
query: csvQuery(params, ["state"])
|
|
7772
7855
|
});
|
|
7773
7856
|
}
|
|
7774
7857
|
/** One case's evidence with its history and files. `GET /buyer-evidence/{id}` */
|
|
@@ -8540,10 +8623,14 @@ var Support = class {
|
|
|
8540
8623
|
async create(body) {
|
|
8541
8624
|
return this.request("POST", "/support/conversations", { body });
|
|
8542
8625
|
}
|
|
8543
|
-
/**
|
|
8626
|
+
/**
|
|
8627
|
+
* The conversations the caller may read, the latest message first unless
|
|
8628
|
+
* `sort_by` says otherwise. Several `kind`, `category` or `status` values
|
|
8629
|
+
* match a conversation with any of them. `GET /support/conversations`
|
|
8630
|
+
*/
|
|
8544
8631
|
async list(query) {
|
|
8545
8632
|
return this.request("GET", "/support/conversations", {
|
|
8546
|
-
query: query
|
|
8633
|
+
query: csvQuery(query, ["kind", "category", "status"])
|
|
8547
8634
|
});
|
|
8548
8635
|
}
|
|
8549
8636
|
/** One conversation. `GET /support/conversations/{id}` */
|
|
@@ -8594,6 +8681,7 @@ var Support = class {
|
|
|
8594
8681
|
};
|
|
8595
8682
|
|
|
8596
8683
|
// src/resources/invoices.ts
|
|
8684
|
+
var INVOICE_CSV_KEYS = ["status", "kind"];
|
|
8597
8685
|
var Invoices = class {
|
|
8598
8686
|
constructor(request) {
|
|
8599
8687
|
this.request = request;
|
|
@@ -8613,13 +8701,15 @@ var Invoices = class {
|
|
|
8613
8701
|
return this.request("POST", "/invoices", { body: params, ...options });
|
|
8614
8702
|
}
|
|
8615
8703
|
/**
|
|
8616
|
-
* One page of documents, newest first
|
|
8617
|
-
* `include_lines` is set, and never a `refund`
|
|
8704
|
+
* One page of documents, newest first unless `sort_by` says otherwise. List
|
|
8705
|
+
* rows carry no `lines` unless `include_lines` is set, and never a `refund`
|
|
8706
|
+
* summary. Several `status` or `kind` values match a document in any of
|
|
8707
|
+
* them.
|
|
8618
8708
|
* `GET /invoices`
|
|
8619
8709
|
*/
|
|
8620
8710
|
async list(params, options) {
|
|
8621
8711
|
return this.request("GET", "/invoices", {
|
|
8622
|
-
query: params
|
|
8712
|
+
query: csvQuery(params, INVOICE_CSV_KEYS),
|
|
8623
8713
|
...options
|
|
8624
8714
|
});
|
|
8625
8715
|
}
|
|
@@ -8644,7 +8734,7 @@ var Invoices = class {
|
|
|
8644
8734
|
*/
|
|
8645
8735
|
async listForProduct(productId, params, options) {
|
|
8646
8736
|
return this.request("GET", `/products/${encodeURIComponent(productId)}/invoices`, {
|
|
8647
|
-
query: params
|
|
8737
|
+
query: csvQuery(params, INVOICE_CSV_KEYS),
|
|
8648
8738
|
...options
|
|
8649
8739
|
});
|
|
8650
8740
|
}
|
|
@@ -8662,7 +8752,7 @@ var Invoices = class {
|
|
|
8662
8752
|
*/
|
|
8663
8753
|
async export(params, options) {
|
|
8664
8754
|
return this.request("GET", "/invoices/export", {
|
|
8665
|
-
query:
|
|
8755
|
+
query: csvQuery(params, INVOICE_CSV_KEYS),
|
|
8666
8756
|
responseType: "blob",
|
|
8667
8757
|
...options
|
|
8668
8758
|
});
|
|
@@ -9357,7 +9447,10 @@ var Subscriptions = class {
|
|
|
9357
9447
|
...options
|
|
9358
9448
|
});
|
|
9359
9449
|
}
|
|
9360
|
-
/**
|
|
9450
|
+
/**
|
|
9451
|
+
* List subscriptions for the profile, or one customer's with `customer_id`.
|
|
9452
|
+
* `GET /subscriptions/list`
|
|
9453
|
+
*/
|
|
9361
9454
|
async list(params, options) {
|
|
9362
9455
|
return this.request("GET", "/subscriptions/list", {
|
|
9363
9456
|
query: params,
|
|
@@ -10153,13 +10246,19 @@ var BuyerPortal = class {
|
|
|
10153
10246
|
};
|
|
10154
10247
|
|
|
10155
10248
|
// src/resources/audit.ts
|
|
10249
|
+
var MERCHANT_AUDIT_CSV_KEYS = ["profile_id", "action", "entity_type"];
|
|
10156
10250
|
var Audit = class {
|
|
10157
10251
|
constructor(request) {
|
|
10158
10252
|
this.request = request;
|
|
10159
10253
|
}
|
|
10254
|
+
/**
|
|
10255
|
+
* One page of the merchant's audit log, the newest entry first unless
|
|
10256
|
+
* `sort_by` says otherwise. Several `profile_id`, `action` or `entity_type`
|
|
10257
|
+
* values match an entry with any of them. `GET /audit`
|
|
10258
|
+
*/
|
|
10160
10259
|
async list(params) {
|
|
10161
10260
|
return this.request("GET", "/audit", {
|
|
10162
|
-
query: params
|
|
10261
|
+
query: csvQuery(params, MERCHANT_AUDIT_CSV_KEYS)
|
|
10163
10262
|
});
|
|
10164
10263
|
}
|
|
10165
10264
|
/**
|
|
@@ -10172,6 +10271,33 @@ var Audit = class {
|
|
|
10172
10271
|
};
|
|
10173
10272
|
|
|
10174
10273
|
// src/resources/settlement.ts
|
|
10274
|
+
function statementListQuery(params) {
|
|
10275
|
+
return csvQuery(
|
|
10276
|
+
{
|
|
10277
|
+
test_mode: params.test_mode,
|
|
10278
|
+
profile_id: params.profile_id,
|
|
10279
|
+
limit: params.limit,
|
|
10280
|
+
offset: params.offset,
|
|
10281
|
+
payout_status: params.payout_status,
|
|
10282
|
+
period_from: params.period_from,
|
|
10283
|
+
period_to: params.period_to,
|
|
10284
|
+
sort_by: params.sort_by,
|
|
10285
|
+
sort_order: params.sort_order
|
|
10286
|
+
},
|
|
10287
|
+
["payout_status"]
|
|
10288
|
+
);
|
|
10289
|
+
}
|
|
10290
|
+
function nativeListQuery(params) {
|
|
10291
|
+
return {
|
|
10292
|
+
profile_id: params.profile_id,
|
|
10293
|
+
currency: params.currency,
|
|
10294
|
+
test_mode: params.test_mode,
|
|
10295
|
+
limit: params.limit,
|
|
10296
|
+
offset: params.offset,
|
|
10297
|
+
sort_by: params.sort_by,
|
|
10298
|
+
sort_order: params.sort_order
|
|
10299
|
+
};
|
|
10300
|
+
}
|
|
10175
10301
|
function exportHeaders(options, accept) {
|
|
10176
10302
|
const headers = new Headers(options?.headers);
|
|
10177
10303
|
headers.set("Accept", accept);
|
|
@@ -10335,18 +10461,15 @@ var Settlement = class {
|
|
|
10335
10461
|
});
|
|
10336
10462
|
}
|
|
10337
10463
|
/**
|
|
10338
|
-
* List generated settlement statements, newest first
|
|
10464
|
+
* List generated settlement statements, the newest period first unless
|
|
10465
|
+
* `sort_by` says otherwise. Several `payout_status` values match a
|
|
10466
|
+
* statement in any of them.
|
|
10339
10467
|
*
|
|
10340
10468
|
* `GET /settlement/statements`
|
|
10341
10469
|
*/
|
|
10342
10470
|
async listStatements(params, options) {
|
|
10343
10471
|
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
|
-
},
|
|
10472
|
+
query: statementListQuery(params),
|
|
10350
10473
|
...options
|
|
10351
10474
|
});
|
|
10352
10475
|
}
|
|
@@ -10603,16 +10726,14 @@ var Settlement = class {
|
|
|
10603
10726
|
options
|
|
10604
10727
|
);
|
|
10605
10728
|
}
|
|
10606
|
-
/**
|
|
10729
|
+
/**
|
|
10730
|
+
* List report summaries without fetching every source row in each saved
|
|
10731
|
+
* snapshot, the newest first. `sort_by` takes `period` here; another value
|
|
10732
|
+
* is refused.
|
|
10733
|
+
*/
|
|
10607
10734
|
async listNativeReports(params, options) {
|
|
10608
10735
|
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
|
-
},
|
|
10736
|
+
query: nativeListQuery(params),
|
|
10616
10737
|
...options
|
|
10617
10738
|
});
|
|
10618
10739
|
}
|
|
@@ -10630,15 +10751,13 @@ var Settlement = class {
|
|
|
10630
10751
|
bodyIdempotencyKey: params.idempotency_key
|
|
10631
10752
|
});
|
|
10632
10753
|
}
|
|
10754
|
+
/**
|
|
10755
|
+
* List recorded payouts, the earliest value date first. `sort_by` takes
|
|
10756
|
+
* `value_date` or `amount` here; another value is refused.
|
|
10757
|
+
*/
|
|
10633
10758
|
async listNativePayouts(params, options) {
|
|
10634
10759
|
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
|
-
},
|
|
10760
|
+
query: nativeListQuery(params),
|
|
10642
10761
|
...options
|
|
10643
10762
|
});
|
|
10644
10763
|
}
|
|
@@ -11592,6 +11711,7 @@ var Delopay = class {
|
|
|
11592
11711
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
11593
11712
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
11594
11713
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
11714
|
+
this.persons = new Persons(request);
|
|
11595
11715
|
this.shopLabels = new ShopLabels(request);
|
|
11596
11716
|
this.industries = new Industries(request);
|
|
11597
11717
|
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
@@ -17670,12 +17790,15 @@ var AdminFileScans = class {
|
|
|
17670
17790
|
return this.request("POST", "/admin-portal/file-scans/test", { body });
|
|
17671
17791
|
}
|
|
17672
17792
|
/**
|
|
17673
|
-
* Uploaded files their scan blocked, of every kind, latest result first
|
|
17674
|
-
* with what the scanner found.
|
|
17675
|
-
*
|
|
17793
|
+
* Uploaded files their scan blocked, of every kind, latest result first
|
|
17794
|
+
* unless `sort_by` says otherwise, with what the scanner found. Several
|
|
17795
|
+
* `kind` or `side` values match a file with any of them. A blocked file's
|
|
17796
|
+
* content is never handed out. `GET /admin-portal/file-scans/blocked`
|
|
17676
17797
|
*/
|
|
17677
17798
|
async blocked(query = {}) {
|
|
17678
|
-
return this.request("GET", "/admin-portal/file-scans/blocked", {
|
|
17799
|
+
return this.request("GET", "/admin-portal/file-scans/blocked", {
|
|
17800
|
+
query: csvQuery(query, ["kind", "side"])
|
|
17801
|
+
});
|
|
17679
17802
|
}
|
|
17680
17803
|
};
|
|
17681
17804
|
|
|
@@ -17899,9 +18022,14 @@ var AdminPortal = class {
|
|
|
17899
18022
|
{ body }
|
|
17900
18023
|
);
|
|
17901
18024
|
}
|
|
18025
|
+
/**
|
|
18026
|
+
* One page of merchants. Without `sort_by` the caller's favorite merchants
|
|
18027
|
+
* come first; with one, favorites are not moved. Several `billing_status`
|
|
18028
|
+
* values match a merchant in any of them. `GET /admin-portal/customers`
|
|
18029
|
+
*/
|
|
17902
18030
|
async listCustomers(params) {
|
|
17903
18031
|
return this.request("GET", "/admin-portal/customers", {
|
|
17904
|
-
query: params
|
|
18032
|
+
query: csvQuery(params, ["billing_status"])
|
|
17905
18033
|
});
|
|
17906
18034
|
}
|
|
17907
18035
|
async getCustomer(customerId) {
|
|
@@ -17913,6 +18041,55 @@ var AdminPortal = class {
|
|
|
17913
18041
|
query
|
|
17914
18042
|
});
|
|
17915
18043
|
}
|
|
18044
|
+
/**
|
|
18045
|
+
* One page of ONE merchant's persons: the same query and response as the
|
|
18046
|
+
* merchant-facing `persons.list`, admin-authenticated. Persons are never
|
|
18047
|
+
* read across merchants.
|
|
18048
|
+
*
|
|
18049
|
+
* `GET /admin-portal/persons/{merchantId}`
|
|
18050
|
+
*/
|
|
18051
|
+
async listPersons(merchantId, params) {
|
|
18052
|
+
return this.request("GET", adminPersons(merchantId), {
|
|
18053
|
+
query: params
|
|
18054
|
+
});
|
|
18055
|
+
}
|
|
18056
|
+
/**
|
|
18057
|
+
* One person of a merchant, as the merchant-facing `persons.retrieve`
|
|
18058
|
+
* returns it.
|
|
18059
|
+
*
|
|
18060
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}`
|
|
18061
|
+
*/
|
|
18062
|
+
async getPerson(merchantId, personId, params) {
|
|
18063
|
+
return this.request("GET", `${adminPersons(merchantId)}/${encodeURIComponent(personId)}`, {
|
|
18064
|
+
query: params
|
|
18065
|
+
});
|
|
18066
|
+
}
|
|
18067
|
+
/**
|
|
18068
|
+
* The persons of a merchant that may be the same person as this one, as
|
|
18069
|
+
* the merchant-facing `persons.related` returns them.
|
|
18070
|
+
*
|
|
18071
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/related`
|
|
18072
|
+
*/
|
|
18073
|
+
async listRelatedPersons(merchantId, personId, params) {
|
|
18074
|
+
return this.request(
|
|
18075
|
+
"GET",
|
|
18076
|
+
`${adminPersons(merchantId)}/${encodeURIComponent(personId)}/related`,
|
|
18077
|
+
{ query: params }
|
|
18078
|
+
);
|
|
18079
|
+
}
|
|
18080
|
+
/**
|
|
18081
|
+
* The person of one payment of a merchant, as the merchant-facing
|
|
18082
|
+
* `persons.ofPayment` returns it.
|
|
18083
|
+
*
|
|
18084
|
+
* `GET /admin-portal/persons/{merchantId}/payment/{paymentId}`
|
|
18085
|
+
*/
|
|
18086
|
+
async getPaymentPerson(merchantId, paymentId, params) {
|
|
18087
|
+
return this.request(
|
|
18088
|
+
"GET",
|
|
18089
|
+
`${adminPersons(merchantId)}/payment/${encodeURIComponent(paymentId)}`,
|
|
18090
|
+
{ query: params }
|
|
18091
|
+
);
|
|
18092
|
+
}
|
|
17916
18093
|
async exportTransactions(params, options) {
|
|
17917
18094
|
return runExport(
|
|
17918
18095
|
this.request,
|
|
@@ -18078,21 +18255,25 @@ var AdminPortal = class {
|
|
|
18078
18255
|
}
|
|
18079
18256
|
/**
|
|
18080
18257
|
* Refunds of ANY merchant mirrored from a connector webhook at a
|
|
18081
|
-
* non-terminal status that no sync can advance. Newest first
|
|
18258
|
+
* non-terminal status that no sync can advance. Newest first unless
|
|
18259
|
+
* `sort_by` says otherwise. Several `connector`, `status` or `sync_reason`
|
|
18260
|
+
* values match a refund with any of them.
|
|
18082
18261
|
*/
|
|
18083
18262
|
async listUnresolvedRefunds(params) {
|
|
18084
18263
|
return this.request("GET", "/admin-portal/refunds/unresolved", {
|
|
18085
|
-
query: params
|
|
18264
|
+
query: csvQuery(params, ["connector", "status", "sync_reason"])
|
|
18086
18265
|
});
|
|
18087
18266
|
}
|
|
18088
18267
|
// --- Buyer evidence review --------------------------------------------------
|
|
18089
18268
|
/**
|
|
18090
|
-
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
18091
|
-
* across merchants unless `merchant_id`
|
|
18269
|
+
* DeloPay's review queue of buyers' evidence, the nearest target first
|
|
18270
|
+
* unless `sort_by` says otherwise, across merchants unless `merchant_id` or
|
|
18271
|
+
* `profile_id` narrows it. Several `state` values match a case in any of
|
|
18272
|
+
* them.
|
|
18092
18273
|
*/
|
|
18093
18274
|
async listBuyerEvidence(params) {
|
|
18094
18275
|
return this.request("GET", "/admin-portal/buyer-evidence", {
|
|
18095
|
-
query: params
|
|
18276
|
+
query: csvQuery(params, ["state"])
|
|
18096
18277
|
});
|
|
18097
18278
|
}
|
|
18098
18279
|
/** Chargeback prevention connections across merchants, or of one merchant. */
|
|
@@ -18763,14 +18944,7 @@ var AdminPortal = class {
|
|
|
18763
18944
|
return this.request(
|
|
18764
18945
|
"GET",
|
|
18765
18946
|
`/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
|
-
}
|
|
18947
|
+
{ query: statementListQuery(params) }
|
|
18774
18948
|
);
|
|
18775
18949
|
}
|
|
18776
18950
|
/**
|
|
@@ -19117,6 +19291,7 @@ function transactionListQuery(params) {
|
|
|
19117
19291
|
failure_substatuses,
|
|
19118
19292
|
product_ids,
|
|
19119
19293
|
buyer_risk_band,
|
|
19294
|
+
merchant_ids,
|
|
19120
19295
|
...query
|
|
19121
19296
|
} = params;
|
|
19122
19297
|
return {
|
|
@@ -19131,9 +19306,13 @@ function transactionListQuery(params) {
|
|
|
19131
19306
|
...routing_approaches?.length ? { routing_approaches: routing_approaches.join(",") } : {},
|
|
19132
19307
|
...failure_substatuses?.length ? { failure_substatuses: failure_substatuses.join(",") } : {},
|
|
19133
19308
|
...product_ids?.length ? { product_ids: product_ids.join(",") } : {},
|
|
19134
|
-
...buyer_risk_band?.length ? { buyer_risk_band: buyer_risk_band.join(",") } : {}
|
|
19309
|
+
...buyer_risk_band?.length ? { buyer_risk_band: buyer_risk_band.join(",") } : {},
|
|
19310
|
+
...merchant_ids?.length ? { merchant_ids: merchant_ids.join(",") } : {}
|
|
19135
19311
|
};
|
|
19136
19312
|
}
|
|
19313
|
+
function adminPersons(merchantId) {
|
|
19314
|
+
return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
|
|
19315
|
+
}
|
|
19137
19316
|
function adminAccount(merchantId) {
|
|
19138
19317
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
19139
19318
|
}
|
|
@@ -19144,10 +19323,14 @@ var AdminSupport = class {
|
|
|
19144
19323
|
constructor(request) {
|
|
19145
19324
|
this.request = request;
|
|
19146
19325
|
}
|
|
19147
|
-
/**
|
|
19326
|
+
/**
|
|
19327
|
+
* The queue, the latest message first unless `sort_by` says otherwise.
|
|
19328
|
+
* Several `kind`, `category` or `status` values match a conversation with
|
|
19329
|
+
* any of them. `GET /admin-portal/support/conversations`
|
|
19330
|
+
*/
|
|
19148
19331
|
async list(query) {
|
|
19149
19332
|
return this.request("GET", "/admin-portal/support/conversations", {
|
|
19150
|
-
query: query
|
|
19333
|
+
query: csvQuery(query, ["kind", "category", "status"])
|
|
19151
19334
|
});
|
|
19152
19335
|
}
|
|
19153
19336
|
/**
|
|
@@ -19216,9 +19399,14 @@ var AuditLogs = class {
|
|
|
19216
19399
|
constructor(request) {
|
|
19217
19400
|
this.request = request;
|
|
19218
19401
|
}
|
|
19402
|
+
/**
|
|
19403
|
+
* One page of the platform audit log, the newest entry first unless
|
|
19404
|
+
* `sort_by` says otherwise. Several `action` or `entity_type` values match
|
|
19405
|
+
* an entry with any of them.
|
|
19406
|
+
*/
|
|
19219
19407
|
async list(params) {
|
|
19220
19408
|
return this.request("GET", "/admin-portal/audit", {
|
|
19221
|
-
query: params
|
|
19409
|
+
query: csvQuery(params, ["action", "entity_type"])
|
|
19222
19410
|
});
|
|
19223
19411
|
}
|
|
19224
19412
|
async retrieve(logId) {
|
|
@@ -19232,7 +19420,7 @@ var AuditLogs = class {
|
|
|
19232
19420
|
// The format is negotiated by `Accept`, never a query field: the query
|
|
19233
19421
|
// here is the list's own filter model, and adding a key to it would fork
|
|
19234
19422
|
// the filter vocabulary the export exists to reuse.
|
|
19235
|
-
{ query: params },
|
|
19423
|
+
{ query: csvQuery(params, ["action", "entity_type"]) },
|
|
19236
19424
|
options
|
|
19237
19425
|
);
|
|
19238
19426
|
}
|
|
@@ -20148,6 +20336,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
20148
20336
|
PAYPAL_LABEL_STYLES,
|
|
20149
20337
|
PRESENTATION_CONTRACT_VERSION,
|
|
20150
20338
|
PaypalDisputes,
|
|
20339
|
+
Persons,
|
|
20151
20340
|
PlatformBilling,
|
|
20152
20341
|
PlatformFees,
|
|
20153
20342
|
PlatformMessageTemplates,
|