dodopayments-mcp 1.30.0 → 1.30.2
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/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/server.ts +1 -1
- package/src/tools/customers/update-customers.ts +7 -1
- package/src/tools/subscriptions/change-plan-subscriptions.ts +29 -1
- package/tools/customers/update-customers.d.mts.map +1 -1
- package/tools/customers/update-customers.d.ts.map +1 -1
- package/tools/customers/update-customers.js +7 -1
- package/tools/customers/update-customers.js.map +1 -1
- package/tools/customers/update-customers.mjs +7 -1
- package/tools/customers/update-customers.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 +29 -1
- package/tools/subscriptions/change-plan-subscriptions.js.map +1 -1
- package/tools/subscriptions/change-plan-subscriptions.mjs +29 -1
- package/tools/subscriptions/change-plan-subscriptions.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dodopayments-mcp",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.2",
|
|
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.30.
|
|
27
|
+
"dodopayments": "^1.30.2",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
29
29
|
"yargs": "^17.7.2",
|
|
30
30
|
"@cloudflare/cabidela": "^0.2.4",
|
package/server.js
CHANGED
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "endpoints", { enumerable: true, get: function ()
|
|
|
19
19
|
// Create server instance
|
|
20
20
|
exports.server = new mcp_js_1.McpServer({
|
|
21
21
|
name: 'dodopayments_api',
|
|
22
|
-
version: '1.30.
|
|
22
|
+
version: '1.30.2',
|
|
23
23
|
}, {
|
|
24
24
|
capabilities: {
|
|
25
25
|
tools: {},
|
package/server.mjs
CHANGED
package/src/server.ts
CHANGED
|
@@ -22,13 +22,19 @@ export const tool: Tool = {
|
|
|
22
22
|
customer_id: {
|
|
23
23
|
type: 'string',
|
|
24
24
|
},
|
|
25
|
+
name: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
28
|
+
phone_number: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
25
31
|
},
|
|
26
32
|
},
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
export const handler = (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
30
36
|
const { customer_id, ...body } = args as any;
|
|
31
|
-
return client.customers.update(customer_id);
|
|
37
|
+
return client.customers.update(customer_id, body);
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
export default { metadata, tool, handler };
|
|
@@ -22,13 +22,41 @@ export const tool: Tool = {
|
|
|
22
22
|
subscription_id: {
|
|
23
23
|
type: 'string',
|
|
24
24
|
},
|
|
25
|
+
product_id: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Unique identifier of the product to subscribe to',
|
|
28
|
+
},
|
|
29
|
+
proration_billing_mode: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
enum: ['prorated_immediately'],
|
|
32
|
+
},
|
|
33
|
+
quantity: {
|
|
34
|
+
type: 'integer',
|
|
35
|
+
description: 'Number of units to subscribe for. Must be at least 1.',
|
|
36
|
+
},
|
|
37
|
+
addons: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
description: 'Addons for the new plan.\nNote : Leaving this empty would remove any existing addons',
|
|
40
|
+
items: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
addon_id: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
},
|
|
46
|
+
quantity: {
|
|
47
|
+
type: 'integer',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
required: ['addon_id', 'quantity'],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
25
53
|
},
|
|
26
54
|
},
|
|
27
55
|
};
|
|
28
56
|
|
|
29
57
|
export const handler = (client: DodoPayments, args: Record<string, unknown> | undefined) => {
|
|
30
58
|
const { subscription_id, ...body } = args as any;
|
|
31
|
-
return client.subscriptions.changePlan(subscription_id);
|
|
59
|
+
return client.subscriptions.changePlan(subscription_id, body);
|
|
32
60
|
};
|
|
33
61
|
|
|
34
62
|
export default { metadata, tool, handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-customers.d.mts","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":"OAEO,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":"update-customers.d.mts","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":"OAEO,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,IAiBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,4EAGtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;sBAH8B,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKvF,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-customers.d.ts","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":"OAEO,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":"update-customers.d.ts","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":"OAEO,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,IAiBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,4EAGtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;sBAH8B,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKvF,wBAA2C"}
|
|
@@ -19,12 +19,18 @@ exports.tool = {
|
|
|
19
19
|
customer_id: {
|
|
20
20
|
type: 'string',
|
|
21
21
|
},
|
|
22
|
+
name: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
},
|
|
25
|
+
phone_number: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
22
28
|
},
|
|
23
29
|
},
|
|
24
30
|
};
|
|
25
31
|
const handler = (client, args) => {
|
|
26
32
|
const { customer_id, ...body } = args;
|
|
27
|
-
return client.customers.update(customer_id);
|
|
33
|
+
return client.customers.update(customer_id, body);
|
|
28
34
|
};
|
|
29
35
|
exports.handler = handler;
|
|
30
36
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-customers.js","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAMzE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,EAAE;IACf,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,CAAC,MAAoB,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC7C,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"update-customers.js","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAMzE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACf;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,CAAC,MAAoB,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC7C,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -16,12 +16,18 @@ export const tool = {
|
|
|
16
16
|
customer_id: {
|
|
17
17
|
type: 'string',
|
|
18
18
|
},
|
|
19
|
+
name: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
},
|
|
22
|
+
phone_number: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
},
|
|
19
25
|
},
|
|
20
26
|
},
|
|
21
27
|
};
|
|
22
28
|
export const handler = (client, args) => {
|
|
23
29
|
const { customer_id, ...body } = args;
|
|
24
|
-
return client.customers.update(customer_id);
|
|
30
|
+
return client.customers.update(customer_id, body);
|
|
25
31
|
};
|
|
26
32
|
export default { metadata, tool, handler };
|
|
27
33
|
//# sourceMappingURL=update-customers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-customers.mjs","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAMtF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAoB,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC7C,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"update-customers.mjs","sourceRoot":"","sources":["../../src/tools/customers/update-customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAMtF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,0BAA0B;IACpC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACf;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAoB,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC7C,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-plan-subscriptions.d.mts","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":"OAEO,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":"change-plan-subscriptions.d.mts","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":"OAEO,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,IAuClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iDAGtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;sBAH8B,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKvF,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-plan-subscriptions.d.ts","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":"OAEO,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":"change-plan-subscriptions.d.ts","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":"OAEO,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,IAuClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iDAGtF,CAAC;;;;;;;;;;;;;;;;;;;;;;;sBAH8B,YAAY,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKvF,wBAA2C"}
|
|
@@ -19,12 +19,40 @@ exports.tool = {
|
|
|
19
19
|
subscription_id: {
|
|
20
20
|
type: 'string',
|
|
21
21
|
},
|
|
22
|
+
product_id: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'Unique identifier of the product to subscribe to',
|
|
25
|
+
},
|
|
26
|
+
proration_billing_mode: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: ['prorated_immediately'],
|
|
29
|
+
},
|
|
30
|
+
quantity: {
|
|
31
|
+
type: 'integer',
|
|
32
|
+
description: 'Number of units to subscribe for. Must be at least 1.',
|
|
33
|
+
},
|
|
34
|
+
addons: {
|
|
35
|
+
type: 'array',
|
|
36
|
+
description: 'Addons for the new plan.\nNote : Leaving this empty would remove any existing addons',
|
|
37
|
+
items: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
addon_id: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
},
|
|
43
|
+
quantity: {
|
|
44
|
+
type: 'integer',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: ['addon_id', 'quantity'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
22
50
|
},
|
|
23
51
|
},
|
|
24
52
|
};
|
|
25
53
|
const handler = (client, args) => {
|
|
26
54
|
const { subscription_id, ...body } = args;
|
|
27
|
-
return client.subscriptions.changePlan(subscription_id);
|
|
55
|
+
return client.subscriptions.changePlan(subscription_id, body);
|
|
28
56
|
};
|
|
29
57
|
exports.handler = handler;
|
|
30
58
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-plan-subscriptions.js","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAMzE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8CAA8C;IACxD,WAAW,EAAE,kCAAkC;CAChD,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,CAAC,MAAoB,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACjD,OAAO,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"change-plan-subscriptions.js","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAMzE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8CAA8C;IACxD,WAAW,EAAE,kC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+
type: 'string',
|
|
21
|
+
description: 'Unique identifier of the product to subscribe to',
|
|
22
|
+
},
|
|
23
|
+
proration_billing_mode: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
enum: ['prorated_immediately'],
|
|
26
|
+
},
|
|
27
|
+
quantity: {
|
|
28
|
+
type: 'integer',
|
|
29
|
+
description: 'Number of units to subscribe for. Must be at least 1.',
|
|
30
|
+
},
|
|
31
|
+
addons: {
|
|
32
|
+
type: 'array',
|
|
33
|
+
description: 'Addons for the new plan.\nNote : Leaving this empty would remove any existing addons',
|
|
34
|
+
items: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
addon_id: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
},
|
|
40
|
+
quantity: {
|
|
41
|
+
type: 'integer',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['addon_id', 'quantity'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
19
47
|
},
|
|
20
48
|
},
|
|
21
49
|
};
|
|
22
50
|
export const handler = (client, args) => {
|
|
23
51
|
const { subscription_id, ...body } = args;
|
|
24
|
-
return client.subscriptions.changePlan(subscription_id);
|
|
52
|
+
return client.subscriptions.changePlan(subscription_id, body);
|
|
25
53
|
};
|
|
26
54
|
export default { metadata, tool, handler };
|
|
27
55
|
//# sourceMappingURL=change-plan-subscriptions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-plan-subscriptions.mjs","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAMtF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8CAA8C;IACxD,WAAW,EAAE,kCAAkC;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAoB,EAAE,IAAyC,EAAE,EAAE;IACzF,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACjD,OAAO,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"change-plan-subscriptions.mjs","sourceRoot":"","sources":["../../src/tools/subscriptions/change-plan-subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAMtF,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8CAA8C;IACxD,WAAW,EAAE,kCAAkC;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,EAAE;IACf,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;YACD,sBAAsB,EAAE;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,sBAAsB,CAAC;aAC/B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,uDAAuD;aACrE;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,sFAAsF;gBACnG,KAAK,EAAE;oBACL,IAAI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