@delopay/sdk 0.398.0 → 0.403.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-JJE7PY3K.js} +175 -1
- package/dist/chunk-JJE7PY3K.js.map +1 -0
- package/dist/{index-BH8F0vge.d.cts → index-Dcy3Pwsx.d.cts} +391 -14
- package/dist/{index-BH8F0vge.d.ts → index-Dcy3Pwsx.d.ts} +391 -14
- package/dist/index.cjs +175 -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 +295 -6
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +375 -12
- package/dist/internal.d.ts +375 -12
- package/dist/internal.js +123 -7
- package/dist/internal.js.map +1 -1
- package/package.json +19 -17
- package/dist/chunk-BI74VQSZ.js.map +0 -1
|
@@ -217,6 +217,23 @@ var ApiKeys = class {
|
|
|
217
217
|
async list(merchantId) {
|
|
218
218
|
return this.request("GET", `/api-keys/${encodeURIComponent(merchantId)}/list`);
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* The key templates the caller may use, with the values each prefills.
|
|
222
|
+
* Create the key with `create`; the template itself is not sent.
|
|
223
|
+
* `GET /api-keys/{merchantId}/templates`
|
|
224
|
+
*
|
|
225
|
+
* @param merchantId - The merchant account ID.
|
|
226
|
+
* @returns The templates, each limited to what the caller may grant.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* const { templates } = await delopay.apiKeys.listTemplates('merch_123');
|
|
231
|
+
* const readOnly = templates.find((t) => t.id === 'ai_agent_read_only');
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
async listTemplates(merchantId) {
|
|
235
|
+
return this.request("GET", `/api-keys/${encodeURIComponent(merchantId)}/templates`);
|
|
236
|
+
}
|
|
220
237
|
// --- Profile-scoped (shop-level) API keys ---------------------------------
|
|
221
238
|
//
|
|
222
239
|
// JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.
|
|
@@ -7420,6 +7437,161 @@ function shopPath(profileId) {
|
|
|
7420
7437
|
return `/industries/shops/${encodeURIComponent(profileId)}`;
|
|
7421
7438
|
}
|
|
7422
7439
|
|
|
7440
|
+
// src/resources/payoutDestinations.ts
|
|
7441
|
+
var PayoutDestinations = class {
|
|
7442
|
+
constructor(request) {
|
|
7443
|
+
this.request = request;
|
|
7444
|
+
}
|
|
7445
|
+
/**
|
|
7446
|
+
* The caller's own destinations, masked, and the methods offered to them.
|
|
7447
|
+
*
|
|
7448
|
+
* `GET /payout-destinations/me`
|
|
7449
|
+
*/
|
|
7450
|
+
async listMine() {
|
|
7451
|
+
return this.request("GET", "/payout-destinations/me");
|
|
7452
|
+
}
|
|
7453
|
+
/**
|
|
7454
|
+
* Save a destination. The method must be offered; at most 20 per member.
|
|
7455
|
+
*
|
|
7456
|
+
* `POST /payout-destinations/me`
|
|
7457
|
+
*/
|
|
7458
|
+
async createMine(params) {
|
|
7459
|
+
return this.request("POST", "/payout-destinations/me", { body: params });
|
|
7460
|
+
}
|
|
7461
|
+
/**
|
|
7462
|
+
* Replace a destination's details at the version read.
|
|
7463
|
+
*
|
|
7464
|
+
* `PUT /payout-destinations/me/{destinationId}`
|
|
7465
|
+
*/
|
|
7466
|
+
async updateMine(destinationId, params) {
|
|
7467
|
+
return this.request("PUT", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
|
|
7468
|
+
body: params
|
|
7469
|
+
});
|
|
7470
|
+
}
|
|
7471
|
+
/**
|
|
7472
|
+
* Make a destination the preferred one; the others lose it.
|
|
7473
|
+
*
|
|
7474
|
+
* `POST /payout-destinations/me/{destinationId}/preferred`
|
|
7475
|
+
*/
|
|
7476
|
+
async preferMine(destinationId, version) {
|
|
7477
|
+
return this.request(
|
|
7478
|
+
"POST",
|
|
7479
|
+
`/payout-destinations/me/${encodeURIComponent(destinationId)}/preferred`,
|
|
7480
|
+
{ body: { version } }
|
|
7481
|
+
);
|
|
7482
|
+
}
|
|
7483
|
+
/**
|
|
7484
|
+
* Delete a destination. Final: the history keeps who, when and which
|
|
7485
|
+
* fields, never a value.
|
|
7486
|
+
*
|
|
7487
|
+
* `DELETE /payout-destinations/me/{destinationId}?version=`
|
|
7488
|
+
*/
|
|
7489
|
+
async deleteMine(destinationId, version) {
|
|
7490
|
+
await this.request("DELETE", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
|
|
7491
|
+
query: { version }
|
|
7492
|
+
});
|
|
7493
|
+
}
|
|
7494
|
+
/**
|
|
7495
|
+
* One's own destination in plain text. Recorded in the history first.
|
|
7496
|
+
*
|
|
7497
|
+
* `POST /payout-destinations/me/{destinationId}/reveal`
|
|
7498
|
+
*/
|
|
7499
|
+
async revealMine(destinationId) {
|
|
7500
|
+
return this.request(
|
|
7501
|
+
"POST",
|
|
7502
|
+
`/payout-destinations/me/${encodeURIComponent(destinationId)}/reveal`
|
|
7503
|
+
);
|
|
7504
|
+
}
|
|
7505
|
+
/**
|
|
7506
|
+
* The methods offered to the caller.
|
|
7507
|
+
*
|
|
7508
|
+
* `GET /payout-destinations/methods`
|
|
7509
|
+
*/
|
|
7510
|
+
async offeredMethods() {
|
|
7511
|
+
return this.request("GET", "/payout-destinations/methods");
|
|
7512
|
+
}
|
|
7513
|
+
/**
|
|
7514
|
+
* The merchant's list and, with `shop_id`, one shop's. A shop role reads
|
|
7515
|
+
* its own shop only.
|
|
7516
|
+
*
|
|
7517
|
+
* `GET /payout-destinations/methods/settings`
|
|
7518
|
+
*/
|
|
7519
|
+
async retrieveMethodsSettings(params) {
|
|
7520
|
+
return this.request("GET", "/payout-destinations/methods/settings", {
|
|
7521
|
+
query: params
|
|
7522
|
+
});
|
|
7523
|
+
}
|
|
7524
|
+
/**
|
|
7525
|
+
* Set the methods offered at the merchant or at one shop.
|
|
7526
|
+
*
|
|
7527
|
+
* `PUT /payout-destinations/methods/settings`
|
|
7528
|
+
*/
|
|
7529
|
+
async updateMethodsSettings(params) {
|
|
7530
|
+
return this.request("PUT", "/payout-destinations/methods/settings", { body: params });
|
|
7531
|
+
}
|
|
7532
|
+
/**
|
|
7533
|
+
* The team's destinations the caller manages, masked: every member for a
|
|
7534
|
+
* merchant-level role, the members reaching the caller's shop for a shop
|
|
7535
|
+
* role.
|
|
7536
|
+
*
|
|
7537
|
+
* `GET /payout-destinations`
|
|
7538
|
+
*/
|
|
7539
|
+
async listTeam(params) {
|
|
7540
|
+
return this.request("GET", "/payout-destinations", { query: params });
|
|
7541
|
+
}
|
|
7542
|
+
/**
|
|
7543
|
+
* A managed member's destination in plain text. Recorded in the history
|
|
7544
|
+
* first.
|
|
7545
|
+
*
|
|
7546
|
+
* `POST /payout-destinations/{destinationId}/reveal`
|
|
7547
|
+
*/
|
|
7548
|
+
async revealTeam(destinationId) {
|
|
7549
|
+
return this.request("POST", `/payout-destinations/${encodeURIComponent(destinationId)}/reveal`);
|
|
7550
|
+
}
|
|
7551
|
+
/**
|
|
7552
|
+
* Confirm a changed destination was seen, at the version read.
|
|
7553
|
+
*
|
|
7554
|
+
* `POST /payout-destinations/{destinationId}/acknowledge`
|
|
7555
|
+
*/
|
|
7556
|
+
async acknowledgeTeam(destinationId, version) {
|
|
7557
|
+
return this.request(
|
|
7558
|
+
"POST",
|
|
7559
|
+
`/payout-destinations/${encodeURIComponent(destinationId)}/acknowledge`,
|
|
7560
|
+
{ body: { version } }
|
|
7561
|
+
);
|
|
7562
|
+
}
|
|
7563
|
+
/**
|
|
7564
|
+
* Link a revenue-share holder to a team member, or unlink it (`null`). The
|
|
7565
|
+
* member must be an active member of the merchant whose role reads Payouts.
|
|
7566
|
+
*
|
|
7567
|
+
* `PUT /revenue-shares/holders/{holderId}/member`
|
|
7568
|
+
*/
|
|
7569
|
+
async linkRevenueShareHolder(holderId, userId) {
|
|
7570
|
+
return this.request("PUT", `/revenue-shares/holders/${encodeURIComponent(holderId)}/member`, {
|
|
7571
|
+
body: { user_id: userId }
|
|
7572
|
+
});
|
|
7573
|
+
}
|
|
7574
|
+
/**
|
|
7575
|
+
* The merchant's revenue-share holders, each with the team member it is
|
|
7576
|
+
* linked to, if any.
|
|
7577
|
+
*
|
|
7578
|
+
* `GET /revenue-shares/holders?merchant_id={merchantId}`
|
|
7579
|
+
*/
|
|
7580
|
+
async listRevenueShareHolders(merchantId) {
|
|
7581
|
+
return this.request("GET", "/revenue-shares/holders", {
|
|
7582
|
+
query: { merchant_id: merchantId }
|
|
7583
|
+
});
|
|
7584
|
+
}
|
|
7585
|
+
/**
|
|
7586
|
+
* The share terms of the holders linked to the caller. Read-only.
|
|
7587
|
+
*
|
|
7588
|
+
* `GET /revenue-shares/mine`
|
|
7589
|
+
*/
|
|
7590
|
+
async listMyRevenueShares() {
|
|
7591
|
+
return this.request("GET", "/revenue-shares/mine");
|
|
7592
|
+
}
|
|
7593
|
+
};
|
|
7594
|
+
|
|
7423
7595
|
// src/resources/checkoutTemplates.ts
|
|
7424
7596
|
var CheckoutTemplates = class {
|
|
7425
7597
|
constructor(request) {
|
|
@@ -11517,6 +11689,7 @@ var Delopay = class {
|
|
|
11517
11689
|
this.persons = new Persons(request);
|
|
11518
11690
|
this.shopLabels = new ShopLabels(request);
|
|
11519
11691
|
this.industries = new Industries(request);
|
|
11692
|
+
this.payoutDestinations = new PayoutDestinations(request);
|
|
11520
11693
|
this.checkoutTemplates = new CheckoutTemplates(request);
|
|
11521
11694
|
this.buyerConversations = new BuyerConversations(request);
|
|
11522
11695
|
this.buyerEvidence = new BuyerEvidenceReviews(request);
|
|
@@ -17530,6 +17703,7 @@ export {
|
|
|
17530
17703
|
Persons,
|
|
17531
17704
|
ShopLabels,
|
|
17532
17705
|
Industries,
|
|
17706
|
+
PayoutDestinations,
|
|
17533
17707
|
CheckoutTemplates,
|
|
17534
17708
|
BuyerConversations,
|
|
17535
17709
|
BuyerEvidenceReviews,
|
|
@@ -17810,4 +17984,4 @@ export {
|
|
|
17810
17984
|
decodeNativePanes,
|
|
17811
17985
|
encodeNativePanes
|
|
17812
17986
|
};
|
|
17813
|
-
//# sourceMappingURL=chunk-
|
|
17987
|
+
//# sourceMappingURL=chunk-JJE7PY3K.js.map
|