@delopay/sdk 0.398.0 → 0.400.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-BI74VQSZ.js → chunk-AZRXI3FB.js} +147 -1
- package/dist/chunk-AZRXI3FB.js.map +1 -0
- package/dist/{index-BH8F0vge.d.cts → index-SqGJT_8j.d.cts} +270 -2
- package/dist/{index-BH8F0vge.d.ts → index-SqGJT_8j.d.ts} +270 -2
- package/dist/index.cjs +147 -0
- 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 +243 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +241 -8
- package/dist/internal.d.ts +241 -8
- package/dist/internal.js +99 -2
- package/dist/internal.js.map +1 -1
- package/package.json +19 -17
- package/dist/chunk-BI74VQSZ.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -154,6 +154,7 @@ __export(internal_exports, {
|
|
|
154
154
|
PAYPAL_CARD_LAYOUTS: () => PAYPAL_CARD_LAYOUTS,
|
|
155
155
|
PAYPAL_LABEL_STYLES: () => PAYPAL_LABEL_STYLES,
|
|
156
156
|
PRESENTATION_CONTRACT_VERSION: () => PRESENTATION_CONTRACT_VERSION,
|
|
157
|
+
PayoutDestinations: () => PayoutDestinations,
|
|
157
158
|
PaypalDisputes: () => PaypalDisputes,
|
|
158
159
|
Persons: () => Persons,
|
|
159
160
|
PlatformBilling: () => PlatformBilling,
|
|
@@ -7766,6 +7767,150 @@ function shopPath(profileId) {
|
|
|
7766
7767
|
return `/industries/shops/${encodeURIComponent(profileId)}`;
|
|
7767
7768
|
}
|
|
7768
7769
|
|
|
7770
|
+
// src/resources/payoutDestinations.ts
|
|
7771
|
+
var PayoutDestinations = class {
|
|
7772
|
+
constructor(request) {
|
|
7773
|
+
this.request = request;
|
|
7774
|
+
}
|
|
7775
|
+
/**
|
|
7776
|
+
* The caller's own destinations, masked, and the methods offered to them.
|
|
7777
|
+
*
|
|
7778
|
+
* `GET /payout-destinations/me`
|
|
7779
|
+
*/
|
|
7780
|
+
async listMine() {
|
|
7781
|
+
return this.request("GET", "/payout-destinations/me");
|
|
7782
|
+
}
|
|
7783
|
+
/**
|
|
7784
|
+
* Save a destination. The method must be offered; at most 20 per member.
|
|
7785
|
+
*
|
|
7786
|
+
* `POST /payout-destinations/me`
|
|
7787
|
+
*/
|
|
7788
|
+
async createMine(params) {
|
|
7789
|
+
return this.request("POST", "/payout-destinations/me", { body: params });
|
|
7790
|
+
}
|
|
7791
|
+
/**
|
|
7792
|
+
* Replace a destination's details at the version read.
|
|
7793
|
+
*
|
|
7794
|
+
* `PUT /payout-destinations/me/{destinationId}`
|
|
7795
|
+
*/
|
|
7796
|
+
async updateMine(destinationId, params) {
|
|
7797
|
+
return this.request("PUT", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
|
|
7798
|
+
body: params
|
|
7799
|
+
});
|
|
7800
|
+
}
|
|
7801
|
+
/**
|
|
7802
|
+
* Make a destination the preferred one; the others lose it.
|
|
7803
|
+
*
|
|
7804
|
+
* `POST /payout-destinations/me/{destinationId}/preferred`
|
|
7805
|
+
*/
|
|
7806
|
+
async preferMine(destinationId, version) {
|
|
7807
|
+
return this.request(
|
|
7808
|
+
"POST",
|
|
7809
|
+
`/payout-destinations/me/${encodeURIComponent(destinationId)}/preferred`,
|
|
7810
|
+
{ body: { version } }
|
|
7811
|
+
);
|
|
7812
|
+
}
|
|
7813
|
+
/**
|
|
7814
|
+
* Delete a destination. Final: the history keeps who, when and which
|
|
7815
|
+
* fields, never a value.
|
|
7816
|
+
*
|
|
7817
|
+
* `DELETE /payout-destinations/me/{destinationId}?version=`
|
|
7818
|
+
*/
|
|
7819
|
+
async deleteMine(destinationId, version) {
|
|
7820
|
+
await this.request("DELETE", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
|
|
7821
|
+
query: { version }
|
|
7822
|
+
});
|
|
7823
|
+
}
|
|
7824
|
+
/**
|
|
7825
|
+
* One's own destination in plain text. Recorded in the history first.
|
|
7826
|
+
*
|
|
7827
|
+
* `POST /payout-destinations/me/{destinationId}/reveal`
|
|
7828
|
+
*/
|
|
7829
|
+
async revealMine(destinationId) {
|
|
7830
|
+
return this.request(
|
|
7831
|
+
"POST",
|
|
7832
|
+
`/payout-destinations/me/${encodeURIComponent(destinationId)}/reveal`
|
|
7833
|
+
);
|
|
7834
|
+
}
|
|
7835
|
+
/**
|
|
7836
|
+
* The methods offered to the caller.
|
|
7837
|
+
*
|
|
7838
|
+
* `GET /payout-destinations/methods`
|
|
7839
|
+
*/
|
|
7840
|
+
async offeredMethods() {
|
|
7841
|
+
return this.request("GET", "/payout-destinations/methods");
|
|
7842
|
+
}
|
|
7843
|
+
/**
|
|
7844
|
+
* The merchant's list and, with `shop_id`, one shop's. A shop role reads
|
|
7845
|
+
* its own shop only.
|
|
7846
|
+
*
|
|
7847
|
+
* `GET /payout-destinations/methods/settings`
|
|
7848
|
+
*/
|
|
7849
|
+
async retrieveMethodsSettings(params) {
|
|
7850
|
+
return this.request("GET", "/payout-destinations/methods/settings", {
|
|
7851
|
+
query: params
|
|
7852
|
+
});
|
|
7853
|
+
}
|
|
7854
|
+
/**
|
|
7855
|
+
* Set the methods offered at the merchant or at one shop.
|
|
7856
|
+
*
|
|
7857
|
+
* `PUT /payout-destinations/methods/settings`
|
|
7858
|
+
*/
|
|
7859
|
+
async updateMethodsSettings(params) {
|
|
7860
|
+
return this.request("PUT", "/payout-destinations/methods/settings", { body: params });
|
|
7861
|
+
}
|
|
7862
|
+
/**
|
|
7863
|
+
* The team's destinations the caller manages, masked: every member for a
|
|
7864
|
+
* merchant-level role, the members reaching the caller's shop for a shop
|
|
7865
|
+
* role.
|
|
7866
|
+
*
|
|
7867
|
+
* `GET /payout-destinations`
|
|
7868
|
+
*/
|
|
7869
|
+
async listTeam(params) {
|
|
7870
|
+
return this.request("GET", "/payout-destinations", { query: params });
|
|
7871
|
+
}
|
|
7872
|
+
/**
|
|
7873
|
+
* A managed member's destination in plain text. Recorded in the history
|
|
7874
|
+
* first.
|
|
7875
|
+
*
|
|
7876
|
+
* `POST /payout-destinations/{destinationId}/reveal`
|
|
7877
|
+
*/
|
|
7878
|
+
async revealTeam(destinationId) {
|
|
7879
|
+
return this.request("POST", `/payout-destinations/${encodeURIComponent(destinationId)}/reveal`);
|
|
7880
|
+
}
|
|
7881
|
+
/**
|
|
7882
|
+
* Confirm a changed destination was seen, at the version read.
|
|
7883
|
+
*
|
|
7884
|
+
* `POST /payout-destinations/{destinationId}/acknowledge`
|
|
7885
|
+
*/
|
|
7886
|
+
async acknowledgeTeam(destinationId, version) {
|
|
7887
|
+
return this.request(
|
|
7888
|
+
"POST",
|
|
7889
|
+
`/payout-destinations/${encodeURIComponent(destinationId)}/acknowledge`,
|
|
7890
|
+
{ body: { version } }
|
|
7891
|
+
);
|
|
7892
|
+
}
|
|
7893
|
+
/**
|
|
7894
|
+
* Link a revenue-share holder to a team member, or unlink it (`null`). The
|
|
7895
|
+
* member must be an active member of the merchant whose role reads Payouts.
|
|
7896
|
+
*
|
|
7897
|
+
* `PUT /revenue-shares/holders/{holderId}/member`
|
|
7898
|
+
*/
|
|
7899
|
+
async linkRevenueShareHolder(holderId, userId) {
|
|
7900
|
+
return this.request("PUT", `/revenue-shares/holders/${encodeURIComponent(holderId)}/member`, {
|
|
7901
|
+
body: { user_id: userId }
|
|
7902
|
+
});
|
|
7903
|
+
}
|
|
7904
|
+
/**
|
|
7905
|
+
* The share terms of the holders linked to the caller. Read-only.
|
|
7906
|
+
*
|
|
7907
|
+
* `GET /revenue-shares/mine`
|
|
7908
|
+
*/
|
|
7909
|
+
async listMyRevenueShares() {
|
|
7910
|
+
return this.request("GET", "/revenue-shares/mine");
|
|
7911
|
+
}
|
|
7912
|
+
};
|
|
7913
|
+
|
|
7769
7914
|
// src/resources/checkoutTemplates.ts
|
|
7770
7915
|
var CheckoutTemplates = class {
|
|
7771
7916
|
constructor(request) {
|
|
@@ -11863,6 +12008,7 @@ var Delopay = class {
|
|
|
11863
12008
|
this.persons = new Persons(request);
|
|
11864
12009
|
this.shopLabels = new ShopLabels(request);
|
|
11865
12010
|
this.industries = new Industries(request);
|
|
12011
|
+
this.payoutDestinations = new PayoutDestinations(request);
|
|
11866
12012
|
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
11867
12013
|
this.buyerConversations = new BuyerConversations(request);
|
|
11868
12014
|
this.buyerEvidence = new BuyerEvidenceReviews(request);
|
|
@@ -18258,6 +18404,97 @@ var AdminPortal = class {
|
|
|
18258
18404
|
{ query: params }
|
|
18259
18405
|
);
|
|
18260
18406
|
}
|
|
18407
|
+
/**
|
|
18408
|
+
* Every staff flag of a person, active and removed, newest first, with
|
|
18409
|
+
* those of the persons merged into it. A merged person reads as the person
|
|
18410
|
+
* it merged into. Staff only; a flag changes no payment.
|
|
18411
|
+
*
|
|
18412
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/flags`
|
|
18413
|
+
*/
|
|
18414
|
+
async listPersonFlags(merchantId, personId) {
|
|
18415
|
+
return this.request("GET", personFlags(merchantId, personId));
|
|
18416
|
+
}
|
|
18417
|
+
/**
|
|
18418
|
+
* Flags a person for staff. The flag changes no payment and the merchant
|
|
18419
|
+
* never sees it. A merged person's flag goes on the person it merged into.
|
|
18420
|
+
* A person already flagged is refused with `IR_38` (400); a staff role that
|
|
18421
|
+
* may not flag buyers gets a `403`.
|
|
18422
|
+
*
|
|
18423
|
+
* `POST /admin-portal/persons/{merchantId}/{personId}/flags`
|
|
18424
|
+
*/
|
|
18425
|
+
async flagPerson(merchantId, personId, body) {
|
|
18426
|
+
return this.request("POST", personFlags(merchantId, personId), { body });
|
|
18427
|
+
}
|
|
18428
|
+
/**
|
|
18429
|
+
* Replaces an active flag's reason and note at the `version` read. A
|
|
18430
|
+
* colleague's newer change, or a removal, since that read is refused with
|
|
18431
|
+
* `IR_16` (400) rather than overwritten.
|
|
18432
|
+
*
|
|
18433
|
+
* `PUT /admin-portal/persons/{merchantId}/{personId}/flags/{flagId}`
|
|
18434
|
+
*/
|
|
18435
|
+
async updatePersonFlag(merchantId, personId, flagId, body) {
|
|
18436
|
+
return this.request(
|
|
18437
|
+
"PUT",
|
|
18438
|
+
`${personFlags(merchantId, personId)}/${encodeURIComponent(flagId)}`,
|
|
18439
|
+
{ body }
|
|
18440
|
+
);
|
|
18441
|
+
}
|
|
18442
|
+
/**
|
|
18443
|
+
* Removes a flag at the `version` read: the flag stops and stays in the
|
|
18444
|
+
* history with who removed it and when, which is what this answers. A
|
|
18445
|
+
* colleague's change since that read is refused with `IR_16` (400).
|
|
18446
|
+
*
|
|
18447
|
+
* `DELETE /admin-portal/persons/{merchantId}/{personId}/flags/{flagId}?version=`
|
|
18448
|
+
*/
|
|
18449
|
+
async removePersonFlag(merchantId, personId, flagId, version) {
|
|
18450
|
+
return this.request(
|
|
18451
|
+
"DELETE",
|
|
18452
|
+
`${personFlags(merchantId, personId)}/${encodeURIComponent(flagId)}`,
|
|
18453
|
+
{ query: { version } }
|
|
18454
|
+
);
|
|
18455
|
+
}
|
|
18456
|
+
/**
|
|
18457
|
+
* One page of a merchant's persons with an active flag, newest flag first.
|
|
18458
|
+
* A flag on a merged person is listed under the person it merged into, and
|
|
18459
|
+
* a person with two active flags is listed once, with the newer one.
|
|
18460
|
+
*
|
|
18461
|
+
* `GET /admin-portal/persons/{merchantId}/flagged`
|
|
18462
|
+
*/
|
|
18463
|
+
async listFlaggedPersons(merchantId, params) {
|
|
18464
|
+
if (params === void 0) {
|
|
18465
|
+
return this.request("GET", `${adminPersons(merchantId)}/flagged`);
|
|
18466
|
+
}
|
|
18467
|
+
return this.request("GET", `${adminPersons(merchantId)}/flagged`, {
|
|
18468
|
+
query: params
|
|
18469
|
+
});
|
|
18470
|
+
}
|
|
18471
|
+
/**
|
|
18472
|
+
* Whether each of 1 to 100 persons of a merchant is flagged, one answer
|
|
18473
|
+
* per asked person in the order asked. A merged person answers for the
|
|
18474
|
+
* person it merged into; an unknown person is not flagged. No id, or more
|
|
18475
|
+
* than 100, is a `400`.
|
|
18476
|
+
*
|
|
18477
|
+
* `GET /admin-portal/persons/{merchantId}/flag-status?person_ids=`
|
|
18478
|
+
*/
|
|
18479
|
+
async personFlagStatus(merchantId, personIds) {
|
|
18480
|
+
return this.request("GET", `${adminPersons(merchantId)}/flag-status`, {
|
|
18481
|
+
query: { person_ids: personIds.join(",") }
|
|
18482
|
+
});
|
|
18483
|
+
}
|
|
18484
|
+
/**
|
|
18485
|
+
* Persons flagged by staff at other merchants who share an email address
|
|
18486
|
+
* or a device id with this person's 100 most recent payments, each once,
|
|
18487
|
+
* newest flag first. A card, an IP address or device traits never match.
|
|
18488
|
+
* A hint only: the persons stay separate and nothing is written.
|
|
18489
|
+
*
|
|
18490
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/flagged-elsewhere`
|
|
18491
|
+
*/
|
|
18492
|
+
async listFlaggedElsewhere(merchantId, personId) {
|
|
18493
|
+
return this.request(
|
|
18494
|
+
"GET",
|
|
18495
|
+
`${adminPersons(merchantId)}/${encodeURIComponent(personId)}/flagged-elsewhere`
|
|
18496
|
+
);
|
|
18497
|
+
}
|
|
18261
18498
|
async exportTransactions(params, options) {
|
|
18262
18499
|
return runExport(
|
|
18263
18500
|
this.request,
|
|
@@ -18278,7 +18515,8 @@ var AdminPortal = class {
|
|
|
18278
18515
|
}
|
|
18279
18516
|
/**
|
|
18280
18517
|
* Full detail for a single transaction of ANY merchant — the same
|
|
18281
|
-
* `PaymentResponse` the merchant `payments.retrieve` returns
|
|
18518
|
+
* `PaymentResponse` the merchant `payments.retrieve` returns, with what only
|
|
18519
|
+
* staff see beside it (`person_flagged`, `flagged_elsewhere`). Admin-scoped:
|
|
18282
18520
|
* the JWT (or admin API key) does not need to belong to the payment's
|
|
18283
18521
|
* merchant; the backend resolves the owning merchant and reads it read-only
|
|
18284
18522
|
* (no connector sync).
|
|
@@ -19570,6 +19808,9 @@ function transactionListQuery(params) {
|
|
|
19570
19808
|
function adminPersons(merchantId) {
|
|
19571
19809
|
return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
|
|
19572
19810
|
}
|
|
19811
|
+
function personFlags(merchantId, personId) {
|
|
19812
|
+
return `${adminPersons(merchantId)}/${encodeURIComponent(personId)}/flags`;
|
|
19813
|
+
}
|
|
19573
19814
|
function adminAccount(merchantId) {
|
|
19574
19815
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
19575
19816
|
}
|
|
@@ -20592,6 +20833,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
20592
20833
|
PAYPAL_CARD_LAYOUTS,
|
|
20593
20834
|
PAYPAL_LABEL_STYLES,
|
|
20594
20835
|
PRESENTATION_CONTRACT_VERSION,
|
|
20836
|
+
PayoutDestinations,
|
|
20595
20837
|
PaypalDisputes,
|
|
20596
20838
|
Persons,
|
|
20597
20839
|
PlatformBilling,
|