@stigg/typescript-mcp 0.1.0-beta.3 → 0.1.0-beta.4
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/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +3 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +3 -0
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +135 -0
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +135 -0
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +18 -0
- package/methods.js.map +1 -1
- package/methods.mjs +18 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +3 -0
- package/src/local-docs-search.ts +160 -0
- package/src/methods.ts +18 -0
- package/src/server.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigg/typescript-mcp",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.4",
|
|
4
4
|
"description": "The official MCP Server for the Stigg API",
|
|
5
5
|
"author": "Stigg <>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"fix": "eslint --fix ."
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@stigg/typescript": "^0.1.0-beta.
|
|
30
|
+
"@stigg/typescript": "^0.1.0-beta.4",
|
|
31
31
|
"ajv": "^8.18.0",
|
|
32
32
|
"@cloudflare/cabidela": "^0.2.4",
|
|
33
33
|
"@hono/node-server": "^1.19.10",
|
package/server.js
CHANGED
|
@@ -19,7 +19,7 @@ const instructions_1 = require("./instructions.js");
|
|
|
19
19
|
const methods_1 = require("./methods.js");
|
|
20
20
|
const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new mcp_js_1.McpServer({
|
|
21
21
|
name: 'stigg_typescript_api',
|
|
22
|
-
version: '0.1.0-beta.
|
|
22
|
+
version: '0.1.0-beta.4',
|
|
23
23
|
}, {
|
|
24
24
|
instructions: await (0, instructions_1.getInstructions)({ stainlessApiKey, customInstructionsPath }),
|
|
25
25
|
capabilities: { tools: {}, logging: {} },
|
package/server.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { getInstructions } from "./instructions.mjs";
|
|
|
10
10
|
import { blockedMethodsForCodeTool } from "./methods.mjs";
|
|
11
11
|
export const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new McpServer({
|
|
12
12
|
name: 'stigg_typescript_api',
|
|
13
|
-
version: '0.1.0-beta.
|
|
13
|
+
version: '0.1.0-beta.4',
|
|
14
14
|
}, {
|
|
15
15
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
16
16
|
capabilities: { tools: {}, logging: {} },
|
package/src/code-tool-worker.ts
CHANGED
|
@@ -171,6 +171,7 @@ const fuse = new Fuse(
|
|
|
171
171
|
'client.v1.addons.create',
|
|
172
172
|
'client.v1.addons.createDraft',
|
|
173
173
|
'client.v1.addons.list',
|
|
174
|
+
'client.v1.addons.listCharges',
|
|
174
175
|
'client.v1.addons.publish',
|
|
175
176
|
'client.v1.addons.removeDraft',
|
|
176
177
|
'client.v1.addons.retrieve',
|
|
@@ -183,6 +184,8 @@ const fuse = new Fuse(
|
|
|
183
184
|
'client.v1.plans.create',
|
|
184
185
|
'client.v1.plans.createDraft',
|
|
185
186
|
'client.v1.plans.list',
|
|
187
|
+
'client.v1.plans.listCharges',
|
|
188
|
+
'client.v1.plans.listOverageCharges',
|
|
186
189
|
'client.v1.plans.publish',
|
|
187
190
|
'client.v1.plans.removeDraft',
|
|
188
191
|
'client.v1.plans.retrieve',
|
package/src/local-docs-search.ts
CHANGED
|
@@ -3976,6 +3976,59 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3976
3976
|
},
|
|
3977
3977
|
},
|
|
3978
3978
|
},
|
|
3979
|
+
{
|
|
3980
|
+
name: 'list_charges',
|
|
3981
|
+
endpoint: '/api/v1/addons/{id}/charges',
|
|
3982
|
+
httpMethod: 'get',
|
|
3983
|
+
summary: 'List addon charges',
|
|
3984
|
+
description: 'Retrieves the list of charges configured on an addon.',
|
|
3985
|
+
stainlessPath: '(resource) v1.addons > (method) list_charges',
|
|
3986
|
+
qualified: 'client.v1.addons.listCharges',
|
|
3987
|
+
params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
|
|
3988
|
+
response:
|
|
3989
|
+
"{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
3990
|
+
markdown:
|
|
3991
|
+
"## list_charges\n\n`client.v1.addons.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/addons/{id}/charges`\n\nRetrieves the list of charges configured on an addon.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const addonListChargesResponse of client.v1.addons.listCharges('x')) {\n console.log(addonListChargesResponse);\n}\n```",
|
|
3992
|
+
perLanguage: {
|
|
3993
|
+
typescript: {
|
|
3994
|
+
method: 'client.v1.addons.listCharges',
|
|
3995
|
+
example:
|
|
3996
|
+
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const addonListChargesResponse of client.v1.addons.listCharges('x')) {\n console.log(addonListChargesResponse.id);\n}",
|
|
3997
|
+
},
|
|
3998
|
+
python: {
|
|
3999
|
+
method: 'v1.addons.list_charges',
|
|
4000
|
+
example:
|
|
4001
|
+
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.addons.list_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
|
|
4002
|
+
},
|
|
4003
|
+
java: {
|
|
4004
|
+
method: 'v1().addons().listCharges',
|
|
4005
|
+
example:
|
|
4006
|
+
'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.addons.AddonListChargesPage;\nimport io.stigg.models.v1.addons.AddonListChargesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n AddonListChargesPage page = client.v1().addons().listCharges("x");\n }\n}',
|
|
4007
|
+
},
|
|
4008
|
+
go: {
|
|
4009
|
+
method: 'client.V1.Addons.ListCharges',
|
|
4010
|
+
example:
|
|
4011
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Addons.ListCharges(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1AddonListChargesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
4012
|
+
},
|
|
4013
|
+
ruby: {
|
|
4014
|
+
method: 'v1.addons.list_charges',
|
|
4015
|
+
example:
|
|
4016
|
+
'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.addons.list_charges("x")\n\nputs(page)',
|
|
4017
|
+
},
|
|
4018
|
+
cli: {
|
|
4019
|
+
method: 'addons list_charges',
|
|
4020
|
+
example: "stigg v1:addons list-charges \\\n --api-key 'My API Key' \\\n --id x",
|
|
4021
|
+
},
|
|
4022
|
+
csharp: {
|
|
4023
|
+
method: 'V1.Addons.ListCharges',
|
|
4024
|
+
example:
|
|
4025
|
+
'AddonListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Addons.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4026
|
+
},
|
|
4027
|
+
http: {
|
|
4028
|
+
example: 'curl https://api.stigg.io/api/v1/addons/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4029
|
+
},
|
|
4030
|
+
},
|
|
4031
|
+
},
|
|
3979
4032
|
{
|
|
3980
4033
|
name: 'list',
|
|
3981
4034
|
endpoint: '/api/v1/addons/{addonId}/entitlements',
|
|
@@ -4658,6 +4711,113 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4658
4711
|
},
|
|
4659
4712
|
},
|
|
4660
4713
|
},
|
|
4714
|
+
{
|
|
4715
|
+
name: 'list_charges',
|
|
4716
|
+
endpoint: '/api/v1/plans/{id}/charges',
|
|
4717
|
+
httpMethod: 'get',
|
|
4718
|
+
summary: 'List plan charges',
|
|
4719
|
+
description: 'Retrieves the list of charges configured on a plan.',
|
|
4720
|
+
stainlessPath: '(resource) v1.plans > (method) list_charges',
|
|
4721
|
+
qualified: 'client.v1.plans.listCharges',
|
|
4722
|
+
params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
|
|
4723
|
+
response:
|
|
4724
|
+
"{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
4725
|
+
markdown:
|
|
4726
|
+
"## list_charges\n\n`client.v1.plans.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/charges`\n\nRetrieves the list of charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListChargesResponse of client.v1.plans.listCharges('x')) {\n console.log(planListChargesResponse);\n}\n```",
|
|
4727
|
+
perLanguage: {
|
|
4728
|
+
typescript: {
|
|
4729
|
+
method: 'client.v1.plans.listCharges',
|
|
4730
|
+
example:
|
|
4731
|
+
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const planListChargesResponse of client.v1.plans.listCharges('x')) {\n console.log(planListChargesResponse.id);\n}",
|
|
4732
|
+
},
|
|
4733
|
+
python: {
|
|
4734
|
+
method: 'v1.plans.list_charges',
|
|
4735
|
+
example:
|
|
4736
|
+
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.plans.list_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
|
|
4737
|
+
},
|
|
4738
|
+
java: {
|
|
4739
|
+
method: 'v1().plans().listCharges',
|
|
4740
|
+
example:
|
|
4741
|
+
'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.plans.PlanListChargesPage;\nimport io.stigg.models.v1.plans.PlanListChargesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n PlanListChargesPage page = client.v1().plans().listCharges("x");\n }\n}',
|
|
4742
|
+
},
|
|
4743
|
+
go: {
|
|
4744
|
+
method: 'client.V1.Plans.ListCharges',
|
|
4745
|
+
example:
|
|
4746
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Plans.ListCharges(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanListChargesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
4747
|
+
},
|
|
4748
|
+
ruby: {
|
|
4749
|
+
method: 'v1.plans.list_charges',
|
|
4750
|
+
example:
|
|
4751
|
+
'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.plans.list_charges("x")\n\nputs(page)',
|
|
4752
|
+
},
|
|
4753
|
+
cli: {
|
|
4754
|
+
method: 'plans list_charges',
|
|
4755
|
+
example: "stigg v1:plans list-charges \\\n --api-key 'My API Key' \\\n --id x",
|
|
4756
|
+
},
|
|
4757
|
+
csharp: {
|
|
4758
|
+
method: 'V1.Plans.ListCharges',
|
|
4759
|
+
example:
|
|
4760
|
+
'PlanListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4761
|
+
},
|
|
4762
|
+
http: {
|
|
4763
|
+
example: 'curl https://api.stigg.io/api/v1/plans/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4764
|
+
},
|
|
4765
|
+
},
|
|
4766
|
+
},
|
|
4767
|
+
{
|
|
4768
|
+
name: 'list_overage_charges',
|
|
4769
|
+
endpoint: '/api/v1/plans/{id}/overage-charges',
|
|
4770
|
+
httpMethod: 'get',
|
|
4771
|
+
summary: 'List plan overage charges',
|
|
4772
|
+
description: 'Retrieves the list of overage charges configured on a plan.',
|
|
4773
|
+
stainlessPath: '(resource) v1.plans > (method) list_overage_charges',
|
|
4774
|
+
qualified: 'client.v1.plans.listOverageCharges',
|
|
4775
|
+
params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
|
|
4776
|
+
response:
|
|
4777
|
+
"{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
4778
|
+
markdown:
|
|
4779
|
+
"## list_overage_charges\n\n`client.v1.plans.listOverageCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: object; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: object; tiers?: object[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n\n**get** `/api/v1/plans/{id}/overage-charges`\n\nRetrieves the list of overage charges configured on a plan.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }`\n A single pricing row on a plan or addon. Each charge encodes one (billingPeriod, billingModel, billingCadence, billingCountryCode) combination. Plans and addons own many of these — one per currency / billing period / feature.\n\n - `id: string`\n - `billingCadence: 'RECURRING' | 'ONE_OFF'`\n - `billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'`\n - `billingPeriod: 'MONTHLY' | 'ANNUALLY'`\n - `createdAt: string`\n - `billingCountryCode?: string`\n - `billingId?: string`\n - `blockSize?: number`\n - `creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'`\n - `creditRate?: { amount: number; currencyId: string; costFormula?: string; }`\n - `crmId?: string`\n - `crmLinkUrl?: string`\n - `featureId?: string`\n - `maxUnitQuantity?: number`\n - `minUnitQuantity?: number`\n - `price?: { amount: number; currency: string; }`\n - `tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]`\n - `tiersMode?: 'VOLUME' | 'GRADUATED'`\n - `topUpCustomCurrencyId?: string`\n - `usedInSubscriptions?: boolean`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges('x')) {\n console.log(planListOverageChargesResponse);\n}\n```",
|
|
4780
|
+
perLanguage: {
|
|
4781
|
+
typescript: {
|
|
4782
|
+
method: 'client.v1.plans.listOverageCharges',
|
|
4783
|
+
example:
|
|
4784
|
+
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges('x')) {\n console.log(planListOverageChargesResponse.id);\n}",
|
|
4785
|
+
},
|
|
4786
|
+
python: {
|
|
4787
|
+
method: 'v1.plans.list_overage_charges',
|
|
4788
|
+
example:
|
|
4789
|
+
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.plans.list_overage_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
|
|
4790
|
+
},
|
|
4791
|
+
java: {
|
|
4792
|
+
method: 'v1().plans().listOverageCharges',
|
|
4793
|
+
example:
|
|
4794
|
+
'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.plans.PlanListOverageChargesPage;\nimport io.stigg.models.v1.plans.PlanListOverageChargesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n PlanListOverageChargesPage page = client.v1().plans().listOverageCharges("x");\n }\n}',
|
|
4795
|
+
},
|
|
4796
|
+
go: {
|
|
4797
|
+
method: 'client.V1.Plans.ListOverageCharges',
|
|
4798
|
+
example:
|
|
4799
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Plans.ListOverageCharges(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1PlanListOverageChargesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
4800
|
+
},
|
|
4801
|
+
ruby: {
|
|
4802
|
+
method: 'v1.plans.list_overage_charges',
|
|
4803
|
+
example:
|
|
4804
|
+
'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.plans.list_overage_charges("x")\n\nputs(page)',
|
|
4805
|
+
},
|
|
4806
|
+
cli: {
|
|
4807
|
+
method: 'plans list_overage_charges',
|
|
4808
|
+
example: "stigg v1:plans list-overage-charges \\\n --api-key 'My API Key' \\\n --id x",
|
|
4809
|
+
},
|
|
4810
|
+
csharp: {
|
|
4811
|
+
method: 'V1.Plans.ListOverageCharges',
|
|
4812
|
+
example:
|
|
4813
|
+
'PlanListOverageChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListOverageCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4814
|
+
},
|
|
4815
|
+
http: {
|
|
4816
|
+
example:
|
|
4817
|
+
'curl https://api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4818
|
+
},
|
|
4819
|
+
},
|
|
4820
|
+
},
|
|
4661
4821
|
{
|
|
4662
4822
|
name: 'list',
|
|
4663
4823
|
endpoint: '/api/v1/plans/{planId}/entitlements',
|
package/src/methods.ts
CHANGED
|
@@ -400,6 +400,12 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
400
400
|
httpMethod: 'post',
|
|
401
401
|
httpPath: '/api/v1/addons/{id}/draft',
|
|
402
402
|
},
|
|
403
|
+
{
|
|
404
|
+
clientCallName: 'client.v1.addons.listCharges',
|
|
405
|
+
fullyQualifiedName: 'v1.addons.listCharges',
|
|
406
|
+
httpMethod: 'get',
|
|
407
|
+
httpPath: '/api/v1/addons/{id}/charges',
|
|
408
|
+
},
|
|
403
409
|
{
|
|
404
410
|
clientCallName: 'client.v1.addons.publish',
|
|
405
411
|
fullyQualifiedName: 'v1.addons.publish',
|
|
@@ -472,6 +478,18 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
472
478
|
httpMethod: 'post',
|
|
473
479
|
httpPath: '/api/v1/plans/{id}/draft',
|
|
474
480
|
},
|
|
481
|
+
{
|
|
482
|
+
clientCallName: 'client.v1.plans.listCharges',
|
|
483
|
+
fullyQualifiedName: 'v1.plans.listCharges',
|
|
484
|
+
httpMethod: 'get',
|
|
485
|
+
httpPath: '/api/v1/plans/{id}/charges',
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
clientCallName: 'client.v1.plans.listOverageCharges',
|
|
489
|
+
fullyQualifiedName: 'v1.plans.listOverageCharges',
|
|
490
|
+
httpMethod: 'get',
|
|
491
|
+
httpPath: '/api/v1/plans/{id}/overage-charges',
|
|
492
|
+
},
|
|
475
493
|
{
|
|
476
494
|
clientCallName: 'client.v1.plans.publish',
|
|
477
495
|
fullyQualifiedName: 'v1.plans.publish',
|
package/src/server.ts
CHANGED