@stigg/typescript-mcp 0.1.0-beta.25 → 0.1.0-beta.27
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/local-docs-search.js +12 -12
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +12 -12
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +12 -12
- package/src/server.ts +1 -1
package/local-docs-search.js
CHANGED
|
@@ -2343,8 +2343,8 @@ const EMBEDDED_METHODS = [
|
|
|
2343
2343
|
'X-ACCOUNT-ID?: string;',
|
|
2344
2344
|
'X-ENVIRONMENT-ID?: string;',
|
|
2345
2345
|
],
|
|
2346
|
-
response:
|
|
2347
|
-
markdown: "## retrieve_governance\n\n`client.v1.events.beta.customers.retrieveGovernance(id: string, after?: string, currencyIds?: string[], entityIdSearch?: string, entityTypeIds?: string[], featureIds?: string[], limit?: number, minUtilization?: number, order?: 'asc' | 'desc', scope?: 'all' | 'nodeWide' | 'scoped', sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; pagination: object; }`\n\n**get** `/api/v1-beta/customers/{id}/governance`\n\nQueries the customer's governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries `parentId` so the tree can be rebuilt client-side. Usage is read from a periodically-refreshed read model and never gates access.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `currencyIds?: string[]`\n Currency ids to include, repeated per value (e.g. `?currencyIds=credits`). Omit both featureIds and currencyIds for tree mode.\n\n- `entityIdSearch?: string`\n Case-insensitive substring match on the entity id (`%`/`_` matched literally).\n\n- `entityTypeIds?: string[]`\n Filter to one or more entity types, repeated per value (e.g. `?entityTypeIds=team&entityTypeIds=user`).\n\n- `featureIds?: string[]`\n Feature ids to include, repeated per value (e.g. `?featureIds=ai-tokens&featureIds=seats`). Omit both featureIds and currencyIds for tree mode — every node in the hierarchy with no usage configuration attached.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `minUtilization?: number`\n Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over limit).\n\n- `order?: 'asc' | 'desc'`\n Sort direction: `asc` or `desc` (default `desc`).\n\n- `scope?: 'all' | 'nodeWide' | 'scoped'`\n Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or `scoped` (non-empty only).\n\n- `sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt'`\n Sort key: `utilization` (default, cross-capability-safe), `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { cadence:
|
|
2346
|
+
response: '{ data: { cadence: string; currentUsage: number; entityId: string; entityType: string; parentId: string; scopeEntityIds: string[]; usageLimit: number; usagePeriodEnd: string; usagePeriodStart: string; utilization: number; currencyId?: string; featureId?: string; }[]; pagination: { next: string; }; }',
|
|
2347
|
+
markdown: "## retrieve_governance\n\n`client.v1.events.beta.customers.retrieveGovernance(id: string, after?: string, currencyIds?: string[], entityIdSearch?: string, entityTypeIds?: string[], featureIds?: string[], limit?: number, minUtilization?: number, order?: 'asc' | 'desc', scope?: 'all' | 'nodeWide' | 'scoped', sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; pagination: object; }`\n\n**get** `/api/v1-beta/customers/{id}/governance`\n\nQueries the customer's governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries `parentId` so the tree can be rebuilt client-side. Usage is read from a periodically-refreshed read model and never gates access.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `currencyIds?: string[]`\n Currency ids to include, repeated per value (e.g. `?currencyIds=credits`). Omit both featureIds and currencyIds for tree mode.\n\n- `entityIdSearch?: string`\n Case-insensitive substring match on the entity id (`%`/`_` matched literally).\n\n- `entityTypeIds?: string[]`\n Filter to one or more entity types, repeated per value (e.g. `?entityTypeIds=team&entityTypeIds=user`).\n\n- `featureIds?: string[]`\n Feature ids to include, repeated per value (e.g. `?featureIds=ai-tokens&featureIds=seats`). Omit both featureIds and currencyIds for tree mode — every node in the hierarchy with no usage configuration attached.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `minUtilization?: number`\n Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over limit).\n\n- `order?: 'asc' | 'desc'`\n Sort direction: `asc` or `desc` (default `desc`).\n\n- `scope?: 'all' | 'nodeWide' | 'scoped'`\n Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or `scoped` (non-empty only).\n\n- `sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt'`\n Sort key: `utilization` (default, cross-capability-safe), `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { cadence: string; currentUsage: number; entityId: string; entityType: string; parentId: string; scopeEntityIds: string[]; usageLimit: number; usagePeriodEnd: string; usagePeriodStart: string; utilization: number; currencyId?: string; featureId?: string; }[]; pagination: { next: string; }; }`\n Paginated list of governance tree nodes, each with its usage configuration and current usage.\n\n - `data: { cadence: string; currentUsage: number; entityId: string; entityType: string; parentId: string; scopeEntityIds: string[]; usageLimit: number; usagePeriodEnd: string; usagePeriodStart: string; utilization: number; currencyId?: string; featureId?: string; }[]`\n - `pagination: { next: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.retrieveGovernance('id');\n\nconsole.log(response);\n```",
|
|
2348
2348
|
perLanguage: {
|
|
2349
2349
|
typescript: {
|
|
2350
2350
|
method: 'client.v1.events.beta.customers.retrieveGovernance',
|
|
@@ -5358,8 +5358,8 @@ const EMBEDDED_METHODS = [
|
|
|
5358
5358
|
'X-ACCOUNT-ID?: string;',
|
|
5359
5359
|
'X-ENVIRONMENT-ID?: string;',
|
|
5360
5360
|
],
|
|
5361
|
-
response:
|
|
5362
|
-
markdown: "## list\n\n`client.v1Beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; cadence:
|
|
5361
|
+
response: '{ id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }',
|
|
5362
|
+
markdown: "## list\n\n`client.v1Beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }`\n\n**get** `/api/v1-beta/customers/{id}/assignments`\n\nReturns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.\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- `capabilityId?: string`\n Filter assignments to a specific capability refId\n\n- `entityId?: string`\n Filter assignments to a specific entity refId\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }`\n A capability assignment for an entity belonging to a customer. Defines how much of the capability the entity may consume (`usageLimit`) and how often the counter resets (`cadence`).\n\n - `id: string`\n - `cadence: string`\n - `createdAt: string`\n - `entityId: string`\n - `parentId: string`\n - `scopeEntityIds: string[]`\n - `updatedAt: string`\n - `usageLimit: number`\n - `currencyId?: string`\n - `featureId?: string`\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 assignmentListResponse of client.v1Beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse);\n}\n```",
|
|
5363
5363
|
perLanguage: {
|
|
5364
5364
|
typescript: {
|
|
5365
5365
|
method: 'client.v1Beta.customers.assignments.list',
|
|
@@ -5404,20 +5404,20 @@ const EMBEDDED_METHODS = [
|
|
|
5404
5404
|
qualified: 'client.v1Beta.customers.assignments.upsert',
|
|
5405
5405
|
params: [
|
|
5406
5406
|
'id: string;',
|
|
5407
|
-
|
|
5407
|
+
'assignments: { entityId: string; cadence?: string; currencyId?: string; featureId?: string; parentId?: string; scopeEntityIds?: string[]; usageLimit?: number; }[];',
|
|
5408
5408
|
'X-ACCOUNT-ID?: string;',
|
|
5409
5409
|
'X-ENVIRONMENT-ID?: string;',
|
|
5410
5410
|
],
|
|
5411
|
-
response:
|
|
5412
|
-
markdown: "## upsert\n\n`client.v1Beta.customers.assignments.upsert(id: string, assignments: { entityId: string; cadence?:
|
|
5411
|
+
response: '{ data: { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }[]; }',
|
|
5412
|
+
markdown: "## upsert\n\n`client.v1Beta.customers.assignments.upsert(id: string, assignments: { entityId: string; cadence?: string; currencyId?: string; featureId?: string; parentId?: string; scopeEntityIds?: string[]; usageLimit?: number; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/assignments`\n\nBatched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service.\n\n### Parameters\n\n- `id: string`\n\n- `assignments: { entityId: string; cadence?: string; currencyId?: string; featureId?: string; parentId?: string; scopeEntityIds?: string[]; usageLimit?: number; }[]`\n Assignments to upsert (1–100 per request)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }[]; }`\n Assignments after upsert.\n\n - `data: { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1Beta.customers.assignments.upsert('id', { assignments: [{ entityId: 'workspace-001' }, { entityId: 'workspace-002' }] });\n\nconsole.log(response);\n```",
|
|
5413
5413
|
perLanguage: {
|
|
5414
5414
|
typescript: {
|
|
5415
5415
|
method: 'client.v1Beta.customers.assignments.upsert',
|
|
5416
|
-
example: "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\nconst response = await client.v1Beta.customers.assignments.upsert('id', {\n assignments: [\n {\n entityId: 'workspace-001',\n featureId: 'compute-minutes',\n usageLimit: 1000,\n cadence: '
|
|
5416
|
+
example: "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\nconst response = await client.v1Beta.customers.assignments.upsert('id', {\n assignments: [\n {\n entityId: 'workspace-001',\n featureId: 'compute-minutes',\n usageLimit: 1000,\n cadence: 'P1M',\n },\n {\n entityId: 'workspace-002',\n currencyId: 'cred-type-tokens',\n usageLimit: 2000,\n cadence: 'P1M',\n parentId: 'workspace-001',\n scopeEntityIds: ['user-1'],\n },\n ],\n});\n\nconsole.log(response.data);",
|
|
5417
5417
|
},
|
|
5418
5418
|
python: {
|
|
5419
5419
|
method: 'v1_beta.customers.assignments.upsert',
|
|
5420
|
-
example: '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)\nresponse = client.v1_beta.customers.assignments.upsert(\n id="id",\n assignments=[{\n "entity_id": "workspace-001",\n "feature_id": "compute-minutes",\n "usage_limit": 1000,\n "cadence": "
|
|
5420
|
+
example: '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)\nresponse = client.v1_beta.customers.assignments.upsert(\n id="id",\n assignments=[{\n "entity_id": "workspace-001",\n "feature_id": "compute-minutes",\n "usage_limit": 1000,\n "cadence": "P1M",\n }, {\n "entity_id": "workspace-002",\n "currency_id": "cred-type-tokens",\n "usage_limit": 2000,\n "cadence": "P1M",\n "parent_id": "workspace-001",\n "scope_entity_ids": ["user-1"],\n }],\n)\nprint(response.data)',
|
|
5421
5421
|
},
|
|
5422
5422
|
java: {
|
|
5423
5423
|
method: 'v1Beta().customers().assignments().upsert',
|
|
@@ -5425,7 +5425,7 @@ const EMBEDDED_METHODS = [
|
|
|
5425
5425
|
},
|
|
5426
5426
|
go: {
|
|
5427
5427
|
method: 'client.V1Beta.Customers.Assignments.Upsert',
|
|
5428
|
-
example: '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\tresponse, err := client.V1Beta.Customers.Assignments.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerAssignmentUpsertParams{\n\t\t\tAssignments: []stigg.V1BetaCustomerAssignmentUpsertParamsAssignment{{\n\t\t\t\tEntityID: "workspace-001",\n\t\t\t\tFeatureID: stigg.String("compute-minutes"),\n\t\t\t\tUsageLimit: stigg.Float(1000),\n\t\t\t\tCadence: "
|
|
5428
|
+
example: '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\tresponse, err := client.V1Beta.Customers.Assignments.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerAssignmentUpsertParams{\n\t\t\tAssignments: []stigg.V1BetaCustomerAssignmentUpsertParamsAssignment{{\n\t\t\t\tEntityID: "workspace-001",\n\t\t\t\tFeatureID: stigg.String("compute-minutes"),\n\t\t\t\tUsageLimit: stigg.Float(1000),\n\t\t\t\tCadence: stigg.String("P1M"),\n\t\t\t}, {\n\t\t\t\tEntityID: "workspace-002",\n\t\t\t\tCurrencyID: stigg.String("cred-type-tokens"),\n\t\t\t\tUsageLimit: stigg.Float(2000),\n\t\t\t\tCadence: stigg.String("P1M"),\n\t\t\t\tParentID: stigg.String("workspace-001"),\n\t\t\t\tScopeEntityIDs: []string{"user-1"},\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
5429
5429
|
},
|
|
5430
5430
|
ruby: {
|
|
5431
5431
|
method: 'v1_beta.customers.assignments.upsert',
|
|
@@ -5437,10 +5437,10 @@ const EMBEDDED_METHODS = [
|
|
|
5437
5437
|
},
|
|
5438
5438
|
csharp: {
|
|
5439
5439
|
method: 'V1Beta.Customers.Assignments.Upsert',
|
|
5440
|
-
example: 'AssignmentUpsertParams parameters = new()\n{\n ID = "id",\n Assignments =\n [\n new()\n {\n EntityID = "workspace-001",\n Cadence =
|
|
5440
|
+
example: 'AssignmentUpsertParams parameters = new()\n{\n ID = "id",\n Assignments =\n [\n new()\n {\n EntityID = "workspace-001",\n Cadence = "P1M",\n CurrencyID = "currencyId",\n FeatureID = "compute-minutes",\n ParentID = "parentId",\n ScopeEntityIds =\n [\n "NxI"\n ],\n UsageLimit = 1000,\n },\n new()\n {\n EntityID = "workspace-002",\n Cadence = "P1M",\n CurrencyID = "cred-type-tokens",\n FeatureID = "featureId",\n ParentID = "workspace-001",\n ScopeEntityIds =\n [\n "user-1"\n ],\n UsageLimit = 2000,\n },\n ],\n};\n\nvar response = await client.V1Beta.Customers.Assignments.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
5441
5441
|
},
|
|
5442
5442
|
http: {
|
|
5443
|
-
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "entityId": "workspace-001",\n "cadence": "
|
|
5443
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "entityId": "workspace-001",\n "cadence": "P1M",\n "featureId": "compute-minutes",\n "usageLimit": 1000\n },\n {\n "entityId": "workspace-002",\n "cadence": "P1M",\n "currencyId": "cred-type-tokens",\n "parentId": "workspace-001",\n "scopeEntityIds": [\n "user-1"\n ],\n "usageLimit": 2000\n }\n ]\n }\'',
|
|
5444
5444
|
},
|
|
5445
5445
|
},
|
|
5446
5446
|
},
|