dodopayments-mcp 1.34.2 → 1.37.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/README.md +2 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/server.ts +1 -1
- package/src/tools/customers/list-customers.ts +4 -0
- package/src/tools/discounts/create-discounts.ts +3 -2
- package/src/tools/discounts/delete-discounts.ts +2 -2
- package/src/tools/disputes/list-disputes.ts +10 -16
- package/src/tools/license-keys/list-license-keys.ts +1 -5
- package/src/tools/licenses/deactivate-licenses.ts +2 -2
- package/src/tools/payments/create-payments.ts +1 -0
- package/src/tools/payments/list-payments.ts +5 -9
- package/src/tools/products/create-products.ts +4 -0
- package/src/tools/products/delete-products.ts +2 -2
- package/src/tools/products/unarchive-products.ts +2 -2
- package/src/tools/products/update-products.ts +6 -2
- package/src/tools/refunds/list-refunds.ts +1 -5
- package/src/tools/subscriptions/change-plan-subscriptions.ts +3 -2
- package/src/tools/subscriptions/charge-subscriptions.ts +2 -0
- package/src/tools/subscriptions/create-subscriptions.ts +1 -0
- package/src/tools/subscriptions/list-subscriptions.ts +1 -5
- package/src/tools/webhook-events/list-webhook-events.ts +4 -0
- package/tools/customers/list-customers.d.mts.map +1 -1
- package/tools/customers/list-customers.d.ts.map +1 -1
- package/tools/customers/list-customers.js +4 -0
- package/tools/customers/list-customers.js.map +1 -1
- package/tools/customers/list-customers.mjs +4 -0
- package/tools/customers/list-customers.mjs.map +1 -1
- package/tools/discounts/create-discounts.d.mts.map +1 -1
- package/tools/discounts/create-discounts.d.ts.map +1 -1
- package/tools/discounts/create-discounts.js +2 -2
- package/tools/discounts/create-discounts.js.map +1 -1
- package/tools/discounts/create-discounts.mjs +2 -2
- package/tools/discounts/create-discounts.mjs.map +1 -1
- package/tools/discounts/delete-discounts.js +2 -2
- package/tools/discounts/delete-discounts.js.map +1 -1
- package/tools/discounts/delete-discounts.mjs +2 -2
- package/tools/discounts/delete-discounts.mjs.map +1 -1
- package/tools/disputes/list-disputes.d.mts.map +1 -1
- package/tools/disputes/list-disputes.d.ts.map +1 -1
- package/tools/disputes/list-disputes.js +10 -16
- package/tools/disputes/list-disputes.js.map +1 -1
- package/tools/disputes/list-disputes.mjs +10 -16
- package/tools/disputes/list-disputes.mjs.map +1 -1
- package/tools/license-keys/list-license-keys.d.mts.map +1 -1
- package/tools/license-keys/list-license-keys.d.ts.map +1 -1
- package/tools/license-keys/list-license-keys.js +1 -5
- package/tools/license-keys/list-license-keys.js.map +1 -1
- package/tools/license-keys/list-license-keys.mjs +1 -5
- package/tools/license-keys/list-license-keys.mjs.map +1 -1
- package/tools/licenses/deactivate-licenses.js +2 -2
- package/tools/licenses/deactivate-licenses.js.map +1 -1
- package/tools/licenses/deactivate-licenses.mjs +2 -2
- package/tools/licenses/deactivate-licenses.mjs.map +1 -1
- package/tools/payments/create-payments.d.mts.map +1 -1
- package/tools/payments/create-payments.d.ts.map +1 -1
- package/tools/payments/create-payments.js +1 -0
- package/tools/payments/create-payments.js.map +1 -1
- package/tools/payments/create-payments.mjs +1 -0
- package/tools/payments/create-payments.mjs.map +1 -1
- package/tools/payments/list-payments.d.mts.map +1 -1
- package/tools/payments/list-payments.d.ts.map +1 -1
- package/tools/payments/list-payments.js +5 -9
- package/tools/payments/list-payments.js.map +1 -1
- package/tools/payments/list-payments.mjs +5 -9
- package/tools/payments/list-payments.mjs.map +1 -1
- package/tools/products/create-products.d.mts.map +1 -1
- package/tools/products/create-products.d.ts.map +1 -1
- package/tools/products/create-products.js +4 -0
- package/tools/products/create-products.js.map +1 -1
- package/tools/products/create-products.mjs +4 -0
- package/tools/products/create-products.mjs.map +1 -1
- package/tools/products/delete-products.js +2 -2
- package/tools/products/delete-products.js.map +1 -1
- package/tools/products/delete-products.mjs +2 -2
- package/tools/products/delete-products.mjs.map +1 -1
- package/tools/products/unarchive-products.js +2 -2
- package/tools/products/unarchive-products.js.map +1 -1
- package/tools/products/unarchive-products.mjs +2 -2
- package/tools/products/unarchive-products.mjs.map +1 -1
- package/tools/products/update-products.d.mts.map +1 -1
- package/tools/products/update-products.d.ts.map +1 -1
- package/tools/products/update-products.js +6 -2
- package/tools/products/update-products.js.map +1 -1
- package/tools/products/update-products.mjs +6 -2
- package/tools/products/update-products.mjs.map +1 -1
- package/tools/refunds/list-refunds.d.mts.map +1 -1
- package/tools/refunds/list-refunds.d.ts.map +1 -1
- package/tools/refunds/list-refunds.js +1 -5
- package/tools/refunds/list-refunds.js.map +1 -1
- package/tools/refunds/list-refunds.mjs +1 -5
- package/tools/refunds/list-refunds.mjs.map +1 -1
- package/tools/subscriptions/change-plan-subscriptions.d.mts.map +1 -1
- package/tools/subscriptions/change-plan-subscriptions.d.ts.map +1 -1
- package/tools/subscriptions/change-plan-subscriptions.js +3 -2
- package/tools/subscriptions/change-plan-subscriptions.js.map +1 -1
- package/tools/subscriptions/change-plan-subscriptions.mjs +3 -2
- package/tools/subscriptions/change-plan-subscriptions.mjs.map +1 -1
- package/tools/subscriptions/charge-subscriptions.d.mts.map +1 -1
- package/tools/subscriptions/charge-subscriptions.d.ts.map +1 -1
- package/tools/subscriptions/charge-subscriptions.js +1 -0
- package/tools/subscriptions/charge-subscriptions.js.map +1 -1
- package/tools/subscriptions/charge-subscriptions.mjs +1 -0
- package/tools/subscriptions/charge-subscriptions.mjs.map +1 -1
- package/tools/subscriptions/create-subscriptions.d.mts.map +1 -1
- package/tools/subscriptions/create-subscriptions.d.ts.map +1 -1
- package/tools/subscriptions/create-subscriptions.js +1 -0
- package/tools/subscriptions/create-subscriptions.js.map +1 -1
- package/tools/subscriptions/create-subscriptions.mjs +1 -0
- package/tools/subscriptions/create-subscriptions.mjs.map +1 -1
- package/tools/subscriptions/list-subscriptions.d.mts.map +1 -1
- package/tools/subscriptions/list-subscriptions.d.ts.map +1 -1
- package/tools/subscriptions/list-subscriptions.js +1 -5
- package/tools/subscriptions/list-subscriptions.js.map +1 -1
- package/tools/subscriptions/list-subscriptions.mjs +1 -5
- package/tools/subscriptions/list-subscriptions.mjs.map +1 -1
- package/tools/webhook-events/list-webhook-events.d.mts.map +1 -1
- package/tools/webhook-events/list-webhook-events.d.ts.map +1 -1
- package/tools/webhook-events/list-webhook-events.js +4 -0
- package/tools/webhook-events/list-webhook-events.js.map +1 -1
- package/tools/webhook-events/list-webhook-events.mjs +4 -0
- package/tools/webhook-events/list-webhook-events.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -256,7 +256,8 @@ The following tools are available in this MCP server.
|
|
|
256
256
|
|
|
257
257
|
### Resource `discounts`:
|
|
258
258
|
|
|
259
|
-
- `create_discounts` (`write`):
|
|
259
|
+
- `create_discounts` (`write`): POST /discounts
|
|
260
|
+
If `code` is omitted or empty, a random 16-char uppercase code is generated.
|
|
260
261
|
- `retrieve_discounts` (`read`): GET /discounts/{discount_id}
|
|
261
262
|
- `update_discounts` (`write`): PATCH /discounts/{discount_id}
|
|
262
263
|
- `list_discounts` (`read`): GET /discounts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dodopayments-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"description": "The official MCP Server for the Dodo Payments API",
|
|
5
5
|
"author": "Dodo Payments <founders@dodopayments.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"fix": "eslint --fix --ext ts,js ."
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"dodopayments": "^1.
|
|
27
|
+
"dodopayments": "^1.37.0",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.11.5",
|
|
29
29
|
"yargs": "^17.7.2",
|
|
30
30
|
"@cloudflare/cabidela": "^0.2.4",
|
package/server.js
CHANGED
|
@@ -20,7 +20,7 @@ Object.defineProperty(exports, "endpoints", { enumerable: true, get: function ()
|
|
|
20
20
|
// Create server instance
|
|
21
21
|
exports.server = new mcp_js_1.McpServer({
|
|
22
22
|
name: 'dodopayments_api',
|
|
23
|
-
version: '1.
|
|
23
|
+
version: '1.37.0',
|
|
24
24
|
}, {
|
|
25
25
|
capabilities: {
|
|
26
26
|
tools: {},
|
package/server.mjs
CHANGED
package/src/server.ts
CHANGED
|
@@ -17,14 +17,15 @@ export const metadata: Metadata = {
|
|
|
17
17
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'create_discounts',
|
|
20
|
-
description:
|
|
20
|
+
description:
|
|
21
|
+
'POST /discounts\nIf `code` is omitted or empty, a random 16-char uppercase code is generated.',
|
|
21
22
|
inputSchema: {
|
|
22
23
|
type: 'object',
|
|
23
24
|
properties: {
|
|
24
25
|
amount: {
|
|
25
26
|
type: 'integer',
|
|
26
27
|
description:
|
|
27
|
-
'The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\
|
|
28
|
+
'The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\n Only USD is allowed.\n- If `discount_type` **is** `percentage`, `amount` is in **basis points**. For example, `540` means `5.4%`.\n\nMust be at least 1.',
|
|
28
29
|
},
|
|
29
30
|
type: {
|
|
30
31
|
$ref: '#/$defs/discount_type',
|
|
@@ -30,8 +30,8 @@ export const tool: Tool = {
|
|
|
30
30
|
|
|
31
31
|
export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
32
32
|
const { discount_id, ...body } = args as any;
|
|
33
|
-
await client.discounts.delete(discount_id);
|
|
34
|
-
return asTextContentResult(
|
|
33
|
+
const response = await client.discounts.delete(discount_id).asResponse();
|
|
34
|
+
return asTextContentResult(await response.text());
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export default { metadata, tool, handler };
|
|
@@ -35,28 +35,14 @@ export const tool: Tool = {
|
|
|
35
35
|
type: 'string',
|
|
36
36
|
description: 'Filter by customer_id',
|
|
37
37
|
},
|
|
38
|
-
dispute_stage: {
|
|
39
|
-
$ref: '#/$defs/dispute_stage',
|
|
40
|
-
},
|
|
41
|
-
dispute_status: {
|
|
42
|
-
$ref: '#/$defs/dispute_status',
|
|
43
|
-
},
|
|
44
|
-
page_number: {
|
|
45
|
-
type: 'integer',
|
|
46
|
-
description: 'Page number default is 0',
|
|
47
|
-
},
|
|
48
|
-
page_size: {
|
|
49
|
-
type: 'integer',
|
|
50
|
-
description: 'Page size default is 10 max is 100',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
$defs: {
|
|
54
38
|
dispute_stage: {
|
|
55
39
|
type: 'string',
|
|
40
|
+
description: 'Filter by dispute stage',
|
|
56
41
|
enum: ['pre_dispute', 'dispute', 'pre_arbitration'],
|
|
57
42
|
},
|
|
58
43
|
dispute_status: {
|
|
59
44
|
type: 'string',
|
|
45
|
+
description: 'Filter by dispute status',
|
|
60
46
|
enum: [
|
|
61
47
|
'dispute_opened',
|
|
62
48
|
'dispute_expired',
|
|
@@ -67,6 +53,14 @@ export const tool: Tool = {
|
|
|
67
53
|
'dispute_lost',
|
|
68
54
|
],
|
|
69
55
|
},
|
|
56
|
+
page_number: {
|
|
57
|
+
type: 'integer',
|
|
58
|
+
description: 'Page number default is 0',
|
|
59
|
+
},
|
|
60
|
+
page_size: {
|
|
61
|
+
type: 'integer',
|
|
62
|
+
description: 'Page size default is 10 max is 100',
|
|
63
|
+
},
|
|
70
64
|
},
|
|
71
65
|
},
|
|
72
66
|
};
|
|
@@ -38,12 +38,8 @@ export const tool: Tool = {
|
|
|
38
38
|
description: 'Filter by product ID',
|
|
39
39
|
},
|
|
40
40
|
status: {
|
|
41
|
-
$ref: '#/$defs/license_key_status',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
$defs: {
|
|
45
|
-
license_key_status: {
|
|
46
41
|
type: 'string',
|
|
42
|
+
description: 'Filter by license key status',
|
|
47
43
|
enum: ['active', 'expired', 'disabled'],
|
|
48
44
|
},
|
|
49
45
|
},
|
|
@@ -33,8 +33,8 @@ export const tool: Tool = {
|
|
|
33
33
|
|
|
34
34
|
export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
35
35
|
const body = args as any;
|
|
36
|
-
await client.licenses.deactivate(body);
|
|
37
|
-
return asTextContentResult(
|
|
36
|
+
const response = await client.licenses.deactivate(body).asResponse();
|
|
37
|
+
return asTextContentResult(await response.text());
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export default { metadata, tool, handler };
|
|
@@ -48,16 +48,8 @@ export const tool: Tool = {
|
|
|
48
48
|
description: 'Page size default is 10 max is 100',
|
|
49
49
|
},
|
|
50
50
|
status: {
|
|
51
|
-
$ref: '#/$defs/intent_status',
|
|
52
|
-
},
|
|
53
|
-
subscription_id: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
description: 'Filter by subscription id',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
$defs: {
|
|
59
|
-
intent_status: {
|
|
60
51
|
type: 'string',
|
|
52
|
+
description: 'Filter by status',
|
|
61
53
|
enum: [
|
|
62
54
|
'succeeded',
|
|
63
55
|
'failed',
|
|
@@ -72,6 +64,10 @@ export const tool: Tool = {
|
|
|
72
64
|
'partially_captured_and_capturable',
|
|
73
65
|
],
|
|
74
66
|
},
|
|
67
|
+
subscription_id: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description: 'Filter by subscription id',
|
|
70
|
+
},
|
|
75
71
|
},
|
|
76
72
|
},
|
|
77
73
|
};
|
|
@@ -44,6 +44,7 @@ export const tool: Tool = {
|
|
|
44
44
|
},
|
|
45
45
|
digital_product_delivery: {
|
|
46
46
|
type: 'object',
|
|
47
|
+
description: 'Choose how you would like you digital product delivered',
|
|
47
48
|
properties: {
|
|
48
49
|
external_url: {
|
|
49
50
|
type: 'string',
|
|
@@ -82,6 +83,7 @@ export const tool: Tool = {
|
|
|
82
83
|
{
|
|
83
84
|
type: 'object',
|
|
84
85
|
title: 'One Time Price',
|
|
86
|
+
description: 'One-time price details.',
|
|
85
87
|
properties: {
|
|
86
88
|
currency: {
|
|
87
89
|
$ref: '#/$defs/currency',
|
|
@@ -124,6 +126,7 @@ export const tool: Tool = {
|
|
|
124
126
|
{
|
|
125
127
|
type: 'object',
|
|
126
128
|
title: 'Recurring Price',
|
|
129
|
+
description: 'Recurring price details.',
|
|
127
130
|
properties: {
|
|
128
131
|
currency: {
|
|
129
132
|
$ref: '#/$defs/currency',
|
|
@@ -184,6 +187,7 @@ export const tool: Tool = {
|
|
|
184
187
|
],
|
|
185
188
|
},
|
|
186
189
|
],
|
|
190
|
+
description: 'One-time price details.',
|
|
187
191
|
},
|
|
188
192
|
currency: {
|
|
189
193
|
type: 'string',
|
|
@@ -30,8 +30,8 @@ export const tool: Tool = {
|
|
|
30
30
|
|
|
31
31
|
export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
32
32
|
const { id, ...body } = args as any;
|
|
33
|
-
await client.products.delete(id);
|
|
34
|
-
return asTextContentResult(
|
|
33
|
+
const response = await client.products.delete(id).asResponse();
|
|
34
|
+
return asTextContentResult(await response.text());
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export default { metadata, tool, handler };
|
|
@@ -30,8 +30,8 @@ export const tool: Tool = {
|
|
|
30
30
|
|
|
31
31
|
export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
32
32
|
const { id, ...body } = args as any;
|
|
33
|
-
await client.products.unarchive(id);
|
|
34
|
-
return asTextContentResult(
|
|
33
|
+
const response = await client.products.unarchive(id).asResponse();
|
|
34
|
+
return asTextContentResult(await response.text());
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export default { metadata, tool, handler };
|
|
@@ -40,6 +40,7 @@ export const tool: Tool = {
|
|
|
40
40
|
},
|
|
41
41
|
digital_product_delivery: {
|
|
42
42
|
type: 'object',
|
|
43
|
+
description: 'Choose how you would like you digital product delivered',
|
|
43
44
|
properties: {
|
|
44
45
|
external_url: {
|
|
45
46
|
type: 'string',
|
|
@@ -114,6 +115,7 @@ export const tool: Tool = {
|
|
|
114
115
|
{
|
|
115
116
|
type: 'object',
|
|
116
117
|
title: 'One Time Price',
|
|
118
|
+
description: 'One-time price details.',
|
|
117
119
|
properties: {
|
|
118
120
|
currency: {
|
|
119
121
|
$ref: '#/$defs/currency',
|
|
@@ -156,6 +158,7 @@ export const tool: Tool = {
|
|
|
156
158
|
{
|
|
157
159
|
type: 'object',
|
|
158
160
|
title: 'Recurring Price',
|
|
161
|
+
description: 'Recurring price details.',
|
|
159
162
|
properties: {
|
|
160
163
|
currency: {
|
|
161
164
|
$ref: '#/$defs/currency',
|
|
@@ -216,6 +219,7 @@ export const tool: Tool = {
|
|
|
216
219
|
],
|
|
217
220
|
},
|
|
218
221
|
],
|
|
222
|
+
description: 'One-time price details.',
|
|
219
223
|
},
|
|
220
224
|
currency: {
|
|
221
225
|
type: 'string',
|
|
@@ -379,8 +383,8 @@ export const tool: Tool = {
|
|
|
379
383
|
|
|
380
384
|
export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
381
385
|
const { id, ...body } = args as any;
|
|
382
|
-
await client.products.update(id, body);
|
|
383
|
-
return asTextContentResult(
|
|
386
|
+
const response = await client.products.update(id, body).asResponse();
|
|
387
|
+
return asTextContentResult(await response.text());
|
|
384
388
|
};
|
|
385
389
|
|
|
386
390
|
export default { metadata, tool, handler };
|
|
@@ -44,12 +44,8 @@ export const tool: Tool = {
|
|
|
44
44
|
description: 'Page size default is 10 max is 100',
|
|
45
45
|
},
|
|
46
46
|
status: {
|
|
47
|
-
$ref: '#/$defs/refund_status',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
$defs: {
|
|
51
|
-
refund_status: {
|
|
52
47
|
type: 'string',
|
|
48
|
+
description: 'Filter by status',
|
|
53
49
|
enum: ['succeeded', 'failed', 'pending', 'review'],
|
|
54
50
|
},
|
|
55
51
|
},
|
|
@@ -30,6 +30,7 @@ export const tool: Tool = {
|
|
|
30
30
|
},
|
|
31
31
|
proration_billing_mode: {
|
|
32
32
|
type: 'string',
|
|
33
|
+
description: 'Proration Billing Mode',
|
|
33
34
|
enum: ['prorated_immediately', 'full_immediately'],
|
|
34
35
|
},
|
|
35
36
|
quantity: {
|
|
@@ -58,8 +59,8 @@ export const tool: Tool = {
|
|
|
58
59
|
|
|
59
60
|
export const handler = async (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
60
61
|
const { subscription_id, ...body } = args as any;
|
|
61
|
-
await client.subscriptions.changePlan(subscription_id, body);
|
|
62
|
-
return asTextContentResult(
|
|
62
|
+
const response = await client.subscriptions.changePlan(subscription_id, body).asResponse();
|
|
63
|
+
return asTextContentResult(await response.text());
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
export default { metadata, tool, handler };
|
|
@@ -48,12 +48,8 @@ export const tool: Tool = {
|
|
|
48
48
|
description: 'Page size default is 10 max is 100',
|
|
49
49
|
},
|
|
50
50
|
status: {
|
|
51
|
-
$ref: '#/$defs/subscription_status',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
$defs: {
|
|
55
|
-
subscription_status: {
|
|
56
51
|
type: 'string',
|
|
52
|
+
description: 'Filter by status',
|
|
57
53
|
enum: ['pending', 'active', 'on_hold', 'paused', 'cancelled', 'failed', 'expired'],
|
|
58
54
|
},
|
|
59
55
|
},
|
|
@@ -47,6 +47,10 @@ export const tool: Tool = {
|
|
|
47
47
|
type: 'integer',
|
|
48
48
|
description: 'Page size default is 10 max is 100',
|
|
49
49
|
},
|
|
50
|
+
webhook_event_id: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Filter by webhook event id',
|
|
53
|
+
},
|
|
50
54
|
webhook_id: {
|
|
51
55
|
type: 'string',
|
|
52
56
|
description: 'Filter by webhook destination',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-customers.d.mts","sourceRoot":"","sources":["../../src/tools/customers/list-customers.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"list-customers.d.mts","sourceRoot":"","sources":["../../src/tools/customers/list-customers.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAoBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAG5F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK7F,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-customers.d.ts","sourceRoot":"","sources":["../../src/tools/customers/list-customers.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"list-customers.d.ts","sourceRoot":"","sources":["../../src/tools/customers/list-customers.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAA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AE,CAAC"}
|
|
1
|
+
{"version":3,"file":"list-customers.js","sourceRoot":"","sources":["../../src/tools/customers/list-customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,0BAA0B;aACxC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,oCAAoC;aAClD;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAoB,EAAE,IAAyC,EAAE,EAAE;IAC/F,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-customers.mjs","sourceRoot":"","sources":["../../src/tools/customers/list-customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM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AAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,0BAA0B;aACxC;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,oCAAoC;aAClD;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAoB,EAAE,IAAyC,EAAE,EAAE;IAC/F,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-discounts.d.mts","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"create-discounts.d.mts","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA+ClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAG5F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK7F,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-discounts.d.ts","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"create-discounts.d.ts","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA+ClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAG5F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK7F,wBAA2C"}
|
|
@@ -13,13 +13,13 @@ exports.metadata = {
|
|
|
13
13
|
};
|
|
14
14
|
exports.tool = {
|
|
15
15
|
name: 'create_discounts',
|
|
16
|
-
description: '
|
|
16
|
+
description: 'POST /discounts\nIf `code` is omitted or empty, a random 16-char uppercase code is generated.',
|
|
17
17
|
inputSchema: {
|
|
18
18
|
type: 'object',
|
|
19
19
|
properties: {
|
|
20
20
|
amount: {
|
|
21
21
|
type: 'integer',
|
|
22
|
-
description: 'The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\
|
|
22
|
+
description: 'The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\n Only USD is allowed.\n- If `discount_type` **is** `percentage`, `amount` is in **basis points**. For example, `540` means `5.4%`.\n\nMust be at least 1.',
|
|
23
23
|
},
|
|
24
24
|
type: {
|
|
25
25
|
$ref: '#/$defs/discount_type',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-discounts.js","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,yBAAyB;CACvC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,
|
|
1
|
+
{"version":3,"file":"create-discounts.js","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,yBAAyB;CACvC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,+FAA+F;IACjG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,mSAAmS;aACtS;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,uBAAuB;aAC9B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,sJAAsJ;aACzJ;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;gBAClD,MAAM,EAAE,WAAW;aACpB;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACf;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;gBAC9D,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,+EAA+E;aAC7F;SACF;QACD,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,YAAY,CAAC;aACrB;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAoB,EAAE,IAAyC,EAAE,EAAE;IAC/F,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -10,13 +10,13 @@ export const metadata = {
|
|
|
10
10
|
};
|
|
11
11
|
export const tool = {
|
|
12
12
|
name: 'create_discounts',
|
|
13
|
-
description: '
|
|
13
|
+
description: 'POST /discounts\nIf `code` is omitted or empty, a random 16-char uppercase code is generated.',
|
|
14
14
|
inputSchema: {
|
|
15
15
|
type: 'object',
|
|
16
16
|
properties: {
|
|
17
17
|
amount: {
|
|
18
18
|
type: 'integer',
|
|
19
|
-
description: 'The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\
|
|
19
|
+
description: 'The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\n Only USD is allowed.\n- If `discount_type` **is** `percentage`, `amount` is in **basis points**. For example, `540` means `5.4%`.\n\nMust be at least 1.',
|
|
20
20
|
},
|
|
21
21
|
type: {
|
|
22
22
|
$ref: '#/$defs/discount_type',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-discounts.mjs","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,yBAAyB;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,
|
|
1
|
+
{"version":3,"file":"create-discounts.mjs","sourceRoot":"","sources":["../../src/tools/discounts/create-discounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,yBAAyB;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,+FAA+F;IACjG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,mSAAmS;aACtS;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,uBAAuB;aAC9B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,sJAAsJ;aACzJ;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;gBAClD,MAAM,EAAE,WAAW;aACpB;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACf;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;gBAC9D,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,+EAA+E;aAC7F;SACF;QACD,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,YAAY,CAAC;aACrB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAoB,EAAE,IAAyC,EAAE,EAAE;IAC/F,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -25,8 +25,8 @@ exports.tool = {
|
|
|
25
25
|
};
|
|
26
26
|
const handler = async (client, args) => {
|
|
27
27
|
const { discount_id, ...body } = args;
|
|
28
|
-
await client.discounts.delete(discount_id);
|
|
29
|
-
return (0, types_1.asTextContentResult)(
|
|
28
|
+
const response = await client.discounts.delete(discount_id).asResponse();
|
|
29
|
+
return (0, types_1.asTextContentResult)(await response.text());
|
|
30
30
|
};
|
|
31
31
|
exports.handler = handler;
|
|
32
32
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-discounts.js","sourceRoot":"","sources":["../../src/tools/discounts/delete-discounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,yBAAyB;CACvC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAoB,EAAE,IAAyC,EAAE,EAAE;IAC/F,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC7C,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-discounts.js","sourceRoot":"","sources":["../../src/tools/discounts/delete-discounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,yBAAyB;CACvC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAoB,EAAE,IAAyC,EAAE,EAAE;IAC/F,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,UAAU,EAAE,CAAC;IACzE,OAAO,IAAA,2BAAmB,EAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -22,8 +22,8 @@ export const tool = {
|
|
|
22
22
|
};
|
|
23
23
|
export const handler = async (client, args) => {
|
|
24
24
|
const { discount_id, ...body } = args;
|
|
25
|
-
await client.discounts.delete(discount_id);
|
|
26
|
-
return asTextContentResult(
|
|
25
|
+
const response = await client.discounts.delete(discount_id).asResponse();
|
|
26
|
+
return asTextContentResult(await response.text());
|
|
27
27
|
};
|
|
28
28
|
export default { metadata, tool, handler };
|
|
29
29
|
//# sourceMappingURL=delete-discounts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-discounts.mjs","sourceRoot":"","sources":["../../src/tools/discounts/delete-discounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;AAMlE,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,0BAA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AC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,UAAU,EAAE,CAAC;IACzE,OAAO,mBAAmB,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-disputes.d.mts","sourceRoot":"","sources":["../../src/tools/disputes/list-disputes.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"list-disputes.d.mts","sourceRoot":"","sources":["../../src/tools/disputes/list-disputes.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAgDlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAG5F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK7F,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-disputes.d.ts","sourceRoot":"","sources":["../../src/tools/disputes/list-disputes.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"list-disputes.d.ts","sourceRoot":"","sources":["../../src/tools/disputes/list-disputes.ts"],"names":[],"mappings":"OAIO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,KAAK,EAAE,QAAQ,EAAE;OACjB,YAAY,MAAM,cAAc;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAgDlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAG5F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAK7F,wBAA2C"}
|
|
@@ -31,28 +31,14 @@ exports.tool = {
|
|
|
31
31
|
type: 'string',
|
|
32
32
|
description: 'Filter by customer_id',
|
|
33
33
|
},
|
|
34
|
-
dispute_stage: {
|
|
35
|
-
$ref: '#/$defs/dispute_stage',
|
|
36
|
-
},
|
|
37
|
-
dispute_status: {
|
|
38
|
-
$ref: '#/$defs/dispute_status',
|
|
39
|
-
},
|
|
40
|
-
page_number: {
|
|
41
|
-
type: 'integer',
|
|
42
|
-
description: 'Page number default is 0',
|
|
43
|
-
},
|
|
44
|
-
page_size: {
|
|
45
|
-
type: 'integer',
|
|
46
|
-
description: 'Page size default is 10 max is 100',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
$defs: {
|
|
50
34
|
dispute_stage: {
|
|
51
35
|
type: 'string',
|
|
36
|
+
description: 'Filter by dispute stage',
|
|
52
37
|
enum: ['pre_dispute', 'dispute', 'pre_arbitration'],
|
|
53
38
|
},
|
|
54
39
|
dispute_status: {
|
|
55
40
|
type: 'string',
|
|
41
|
+
description: 'Filter by dispute status',
|
|
56
42
|
enum: [
|
|
57
43
|
'dispute_opened',
|
|
58
44
|
'dispute_expired',
|
|
@@ -63,6 +49,14 @@ exports.tool = {
|
|
|
63
49
|
'dispute_lost',
|
|
64
50
|
],
|
|
65
51
|
},
|
|
52
|
+
page_number: {
|
|
53
|
+
type: 'integer',
|
|
54
|
+
description: 'Page number default is 0',
|
|
55
|
+
},
|
|
56
|
+
page_size: {
|
|
57
|
+
type: 'integer',
|
|
58
|
+
description: 'Page size default is 10 max is 100',
|
|
59
|
+
},
|
|
66
60
|
},
|
|
67
61
|
},
|
|
68
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-disputes.js","sourceRoot":"","sources":["../../src/tools/disputes/list-disputes.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAmE;AAMtD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oCAAoC;gBACjD,MAAM,EAAE,WAAW;aACpB;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;gBAClD,MAAM,EAAE,WAAW;aACpB;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"list-disputes.js","sourceRoot":"","sources":["../../src/tools/disputes/list-disputes.ts"],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