@stigg/typescript-mcp 0.1.0-beta.26 → 0.1.0-beta.28
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 +1 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +1 -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 +64 -17
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +64 -17
- 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 +6 -0
- package/methods.js.map +1 -1
- package/methods.mjs +6 -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 +1 -0
- package/src/local-docs-search.ts +72 -17
- package/src/methods.ts +6 -0
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -2147,11 +2147,12 @@ const EMBEDDED_METHODS = [
|
|
|
2147
2147
|
params: [
|
|
2148
2148
|
'applicationOrigin: string;',
|
|
2149
2149
|
'destinationType?: string;',
|
|
2150
|
+
'enabledModels?: string[];',
|
|
2150
2151
|
'X-ACCOUNT-ID?: string;',
|
|
2151
2152
|
'X-ENVIRONMENT-ID?: string;',
|
|
2152
2153
|
],
|
|
2153
2154
|
response: '{ data: { token: string; expiresAt: string; providerMetadata: object; }; }',
|
|
2154
|
-
markdown: "## mint_scoped_token\n\n`client.v1.events.dataExport.mintScopedToken(applicationOrigin: string, destinationType?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/data-export/scoped-token`\n\nMint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT integration if needed.\n\n### Parameters\n\n- `applicationOrigin: string`\n FE origin the resulting JWT is bound to (provider-side anti-fraud)\n\n- `destinationType?: string`\n Pin the token to a specific warehouse connect flow\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { token: string; expiresAt: string; providerMetadata: object; }; }`\n Response object\n\n - `data: { token: string; expiresAt: string; providerMetadata: object; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.dataExport.mintScopedToken({ applicationOrigin: 'x' });\n\nconsole.log(response);\n```",
|
|
2155
|
+
markdown: "## mint_scoped_token\n\n`client.v1.events.dataExport.mintScopedToken(applicationOrigin: string, destinationType?: string, enabledModels?: string[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/data-export/scoped-token`\n\nMint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT integration if needed.\n\n### Parameters\n\n- `applicationOrigin: string`\n FE origin the resulting JWT is bound to (provider-side anti-fraud)\n\n- `destinationType?: string`\n Pin the token to a specific warehouse connect flow\n\n- `enabledModels?: string[]`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { token: string; expiresAt: string; providerMetadata: object; }; }`\n Response object\n\n - `data: { token: string; expiresAt: string; providerMetadata: object; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.dataExport.mintScopedToken({ applicationOrigin: 'x' });\n\nconsole.log(response);\n```",
|
|
2155
2156
|
perLanguage: {
|
|
2156
2157
|
typescript: {
|
|
2157
2158
|
method: 'client.v1.events.dataExport.mintScopedToken',
|
|
@@ -2186,6 +2187,51 @@ const EMBEDDED_METHODS = [
|
|
|
2186
2187
|
},
|
|
2187
2188
|
},
|
|
2188
2189
|
},
|
|
2190
|
+
{
|
|
2191
|
+
name: 'list_models',
|
|
2192
|
+
endpoint: '/api/v1/data-export/models',
|
|
2193
|
+
httpMethod: 'get',
|
|
2194
|
+
summary: 'List data-export models',
|
|
2195
|
+
description: 'List the catalog of data-export models the customer can opt into when connecting a destination.',
|
|
2196
|
+
stainlessPath: '(resource) v1.events.data_export > (method) list_models',
|
|
2197
|
+
qualified: 'client.v1.events.dataExport.listModels',
|
|
2198
|
+
params: ['X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
2199
|
+
response: '{ data: { groups: { id: string; displayName: string; models: object[]; }[]; }; }',
|
|
2200
|
+
markdown: "## list_models\n\n`client.v1.events.dataExport.listModels(X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1/data-export/models`\n\nList the catalog of data-export models the customer can opt into when connecting a destination.\n\n### Parameters\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { groups: { id: string; displayName: string; models: object[]; }[]; }; }`\n Response object\n\n - `data: { groups: { id: string; displayName: string; models: { id: string; displayName: string; }[]; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.dataExport.listModels();\n\nconsole.log(response);\n```",
|
|
2201
|
+
perLanguage: {
|
|
2202
|
+
typescript: {
|
|
2203
|
+
method: 'client.v1.events.dataExport.listModels',
|
|
2204
|
+
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.v1.events.dataExport.listModels();\n\nconsole.log(response.data);",
|
|
2205
|
+
},
|
|
2206
|
+
python: {
|
|
2207
|
+
method: 'v1.events.data_export.list_models',
|
|
2208
|
+
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.events.data_export.list_models()\nprint(response.data)',
|
|
2209
|
+
},
|
|
2210
|
+
java: {
|
|
2211
|
+
method: 'v1().events().dataExport().listModels',
|
|
2212
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.events.dataexport.DataExportListModelsParams;\nimport io.stigg.models.v1.events.dataexport.DataExportListModelsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n DataExportListModelsResponse response = client.v1().events().dataExport().listModels();\n }\n}',
|
|
2213
|
+
},
|
|
2214
|
+
go: {
|
|
2215
|
+
method: 'client.V1.Events.DataExport.ListModels',
|
|
2216
|
+
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.V1.Events.DataExport.ListModels(context.TODO(), stigg.V1EventDataExportListModelsParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2217
|
+
},
|
|
2218
|
+
ruby: {
|
|
2219
|
+
method: 'v1.events.data_export.list_models',
|
|
2220
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.events.data_export.list_models\n\nputs(response)',
|
|
2221
|
+
},
|
|
2222
|
+
cli: {
|
|
2223
|
+
method: 'data_export list_models',
|
|
2224
|
+
example: "stigg v1:events:data-export list-models \\\n --api-key 'My API Key'",
|
|
2225
|
+
},
|
|
2226
|
+
csharp: {
|
|
2227
|
+
method: 'V1.Events.DataExport.ListModels',
|
|
2228
|
+
example: 'DataExportListModelsParams parameters = new();\n\nvar response = await client.V1.Events.DataExport.ListModels(parameters);\n\nConsole.WriteLine(response);',
|
|
2229
|
+
},
|
|
2230
|
+
http: {
|
|
2231
|
+
example: 'curl https://api.stigg.io/api/v1/data-export/models \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2232
|
+
},
|
|
2233
|
+
},
|
|
2234
|
+
},
|
|
2189
2235
|
{
|
|
2190
2236
|
name: 'create',
|
|
2191
2237
|
endpoint: '/api/v1/data-export/destinations',
|
|
@@ -2197,11 +2243,12 @@ const EMBEDDED_METHODS = [
|
|
|
2197
2243
|
params: [
|
|
2198
2244
|
'destinationId: string;',
|
|
2199
2245
|
'destinationType: string;',
|
|
2246
|
+
'enabledModels?: string[];',
|
|
2200
2247
|
'X-ACCOUNT-ID?: string;',
|
|
2201
2248
|
'X-ENVIRONMENT-ID?: string;',
|
|
2202
2249
|
],
|
|
2203
|
-
response: '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }',
|
|
2204
|
-
markdown: "## create\n\n`client.v1.events.dataExport.destinations.create(destinationId: string, destinationType: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/data-export/destinations`\n\nRegister a destination on the environment's DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId.\n\n### Parameters\n\n- `destinationId: string`\n The provider destination ID returned by the embedded SDK on connect\n\n- `destinationType: string`\n The destination type (e.g. snowflake, bigquery)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.create({ destinationId: 'x', destinationType: 'x' });\n\nconsole.log(destination);\n```",
|
|
2250
|
+
response: '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: object; }[]; }; }',
|
|
2251
|
+
markdown: "## create\n\n`client.v1.events.dataExport.destinations.create(destinationId: string, destinationType: string, enabledModels?: string[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/data-export/destinations`\n\nRegister a destination on the environment's DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId.\n\n### Parameters\n\n- `destinationId: string`\n The provider destination ID returned by the embedded SDK on connect\n\n- `destinationType: string`\n The destination type (e.g. snowflake, bigquery)\n\n- `enabledModels?: string[]`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.create({ destinationId: 'x', destinationType: 'x' });\n\nconsole.log(destination);\n```",
|
|
2205
2252
|
perLanguage: {
|
|
2206
2253
|
typescript: {
|
|
2207
2254
|
method: 'client.v1.events.dataExport.destinations.create',
|
|
@@ -2245,8 +2292,8 @@ const EMBEDDED_METHODS = [
|
|
|
2245
2292
|
stainlessPath: '(resource) v1.events.data_export.destinations > (method) delete',
|
|
2246
2293
|
qualified: 'client.v1.events.dataExport.destinations.delete',
|
|
2247
2294
|
params: ['destinationId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
2248
|
-
response: '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }',
|
|
2249
|
-
markdown: "## delete\n\n`client.v1.events.dataExport.destinations.delete(destinationId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/data-export/destinations/{destinationId}`\n\nRemove a destination from the DATA_EXPORT integration metadata. Idempotent.\n\n### Parameters\n\n- `destinationId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.delete('x');\n\nconsole.log(destination);\n```",
|
|
2295
|
+
response: '{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: object; }[]; }; }',
|
|
2296
|
+
markdown: "## delete\n\n`client.v1.events.dataExport.destinations.delete(destinationId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**delete** `/api/v1/data-export/destinations/{destinationId}`\n\nRemove a destination from the DATA_EXPORT integration metadata. Idempotent.\n\n### Parameters\n\n- `destinationId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: object; }[]; }; }`\n Response object\n\n - `data: { destinations: { connectedAt: string; destinationId: string; type: string; connectionStatus?: string; enabledModels?: string[]; lastSyncStatus?: { finishedAt: string; status: string; transferId: string; blamedParty?: string; failureMessage?: string; rowsTransferred?: number; }; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst destination = await client.v1.events.dataExport.destinations.delete('x');\n\nconsole.log(destination);\n```",
|
|
2250
2297
|
perLanguage: {
|
|
2251
2298
|
typescript: {
|
|
2252
2299
|
method: 'client.v1.events.dataExport.destinations.delete',
|
|
@@ -2304,8 +2351,8 @@ const EMBEDDED_METHODS = [
|
|
|
2304
2351
|
'X-ACCOUNT-ID?: string;',
|
|
2305
2352
|
'X-ENVIRONMENT-ID?: string;',
|
|
2306
2353
|
],
|
|
2307
|
-
response:
|
|
2308
|
-
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:
|
|
2354
|
+
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; }; }',
|
|
2355
|
+
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```",
|
|
2309
2356
|
perLanguage: {
|
|
2310
2357
|
typescript: {
|
|
2311
2358
|
method: 'client.v1.events.beta.customers.retrieveGovernance',
|
|
@@ -5319,8 +5366,8 @@ const EMBEDDED_METHODS = [
|
|
|
5319
5366
|
'X-ACCOUNT-ID?: string;',
|
|
5320
5367
|
'X-ENVIRONMENT-ID?: string;',
|
|
5321
5368
|
],
|
|
5322
|
-
response:
|
|
5323
|
-
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:
|
|
5369
|
+
response: '{ id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }',
|
|
5370
|
+
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```",
|
|
5324
5371
|
perLanguage: {
|
|
5325
5372
|
typescript: {
|
|
5326
5373
|
method: 'client.v1Beta.customers.assignments.list',
|
|
@@ -5365,20 +5412,20 @@ const EMBEDDED_METHODS = [
|
|
|
5365
5412
|
qualified: 'client.v1Beta.customers.assignments.upsert',
|
|
5366
5413
|
params: [
|
|
5367
5414
|
'id: string;',
|
|
5368
|
-
|
|
5415
|
+
'assignments: { entityId: string; cadence?: string; currencyId?: string; featureId?: string; parentId?: string; scopeEntityIds?: string[]; usageLimit?: number; }[];',
|
|
5369
5416
|
'X-ACCOUNT-ID?: string;',
|
|
5370
5417
|
'X-ENVIRONMENT-ID?: string;',
|
|
5371
5418
|
],
|
|
5372
|
-
response:
|
|
5373
|
-
markdown: "## upsert\n\n`client.v1Beta.customers.assignments.upsert(id: string, assignments: { entityId: string; cadence?:
|
|
5419
|
+
response: '{ data: { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }[]; }',
|
|
5420
|
+
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```",
|
|
5374
5421
|
perLanguage: {
|
|
5375
5422
|
typescript: {
|
|
5376
5423
|
method: 'client.v1Beta.customers.assignments.upsert',
|
|
5377
|
-
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: '
|
|
5424
|
+
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);",
|
|
5378
5425
|
},
|
|
5379
5426
|
python: {
|
|
5380
5427
|
method: 'v1_beta.customers.assignments.upsert',
|
|
5381
|
-
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": "
|
|
5428
|
+
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)',
|
|
5382
5429
|
},
|
|
5383
5430
|
java: {
|
|
5384
5431
|
method: 'v1Beta().customers().assignments().upsert',
|
|
@@ -5386,7 +5433,7 @@ const EMBEDDED_METHODS = [
|
|
|
5386
5433
|
},
|
|
5387
5434
|
go: {
|
|
5388
5435
|
method: 'client.V1Beta.Customers.Assignments.Upsert',
|
|
5389
|
-
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: "
|
|
5436
|
+
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',
|
|
5390
5437
|
},
|
|
5391
5438
|
ruby: {
|
|
5392
5439
|
method: 'v1_beta.customers.assignments.upsert',
|
|
@@ -5398,10 +5445,10 @@ const EMBEDDED_METHODS = [
|
|
|
5398
5445
|
},
|
|
5399
5446
|
csharp: {
|
|
5400
5447
|
method: 'V1Beta.Customers.Assignments.Upsert',
|
|
5401
|
-
example: 'AssignmentUpsertParams parameters = new()\n{\n ID = "id",\n Assignments =\n [\n new()\n {\n EntityID = "workspace-001",\n Cadence =
|
|
5448
|
+
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);',
|
|
5402
5449
|
},
|
|
5403
5450
|
http: {
|
|
5404
|
-
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": "
|
|
5451
|
+
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 }\'',
|
|
5405
5452
|
},
|
|
5406
5453
|
},
|
|
5407
5454
|
},
|