@cadenya/cadenya 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/api.md +38 -38
  2. package/dist/client.d.ts +2 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +4 -4
  5. package/dist/client.js.map +1 -1
  6. package/dist/core/http.d.ts +6 -1
  7. package/dist/core/http.d.ts.map +1 -1
  8. package/dist/core/http.js +33 -6
  9. package/dist/core/http.js.map +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/resources/agents.d.ts +1 -1
  15. package/dist/resources/agents.js +1 -1
  16. package/dist/resources/agents.js.map +1 -1
  17. package/dist/resources/ai-provider-keys.d.ts +11 -1
  18. package/dist/resources/ai-provider-keys.d.ts.map +1 -1
  19. package/dist/resources/ai-provider-keys.js +2 -2
  20. package/dist/resources/ai-provider-keys.js.map +1 -1
  21. package/dist/resources/memory-layers.d.ts +1 -1
  22. package/dist/resources/memory-layers.js +1 -1
  23. package/dist/resources/memory-layers.js.map +1 -1
  24. package/dist/resources/models.d.ts +51 -1
  25. package/dist/resources/models.d.ts.map +1 -1
  26. package/dist/resources/models.js +32 -0
  27. package/dist/resources/models.js.map +1 -1
  28. package/dist/resources/objectives.d.ts +1 -46
  29. package/dist/resources/objectives.d.ts.map +1 -1
  30. package/dist/resources/objectives.js +0 -35
  31. package/dist/resources/objectives.js.map +1 -1
  32. package/dist/resources/tools.d.ts +1 -1
  33. package/dist/resources/tools.js +1 -1
  34. package/dist/resources/tools.js.map +1 -1
  35. package/dist/types.d.ts +241 -42
  36. package/dist/types.d.ts.map +1 -1
  37. package/dist/types.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/client.ts +4 -4
  40. package/src/core/http.ts +45 -6
  41. package/src/index.ts +1 -1
  42. package/src/resources/agents.ts +1 -1
  43. package/src/resources/ai-provider-keys.ts +13 -3
  44. package/src/resources/memory-layers.ts +1 -1
  45. package/src/resources/models.ts +67 -1
  46. package/src/resources/objectives.ts +1 -62
  47. package/src/resources/tools.ts +1 -1
  48. package/src/types.ts +262 -45
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cadenya/cadenya",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "The official TypeScript SDK for the Cadenya API",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/client.ts CHANGED
@@ -10,8 +10,8 @@ import { Profiles } from './resources/profiles.js';
10
10
  import { Workspaces } from './resources/workspaces.js';
11
11
  import { Agents } from './resources/agents.js';
12
12
  import { AiProviderKeys } from './resources/ai-provider-keys.js';
13
- import { MemoryLayers } from './resources/memory-layers.js';
14
13
  import { Models } from './resources/models.js';
14
+ import { MemoryLayers } from './resources/memory-layers.js';
15
15
  import { Objectives } from './resources/objectives.js';
16
16
  import { ToolSearch } from './resources/tool-search.js';
17
17
  import { Tenants } from './resources/tenants.js';
@@ -57,8 +57,8 @@ export class Cadenya {
57
57
  readonly workspaces: Workspaces;
58
58
  readonly agents: Agents;
59
59
  readonly aiProviderKeys: AiProviderKeys;
60
- readonly memoryLayers: MemoryLayers;
61
60
  readonly models: Models;
61
+ readonly memoryLayers: MemoryLayers;
62
62
  readonly objectives: Objectives;
63
63
  readonly toolSearch: ToolSearch;
64
64
  readonly tenants: Tenants;
@@ -85,7 +85,7 @@ export class Cadenya {
85
85
  authHeader: () => ({ Authorization: `Bearer ${apiKey}` }),
86
86
  maxRetries: options.maxRetries ?? 0,
87
87
  timeout: options.timeout,
88
- defaultHeaders: { 'User-Agent': 'cadenya-typescript/1.0.1 (api 1.0)', ...options.defaultHeaders },
88
+ defaultHeaders: { 'User-Agent': 'cadenya-typescript/1.0.2 (api 1.0)', ...options.defaultHeaders },
89
89
  fetch: options.fetch,
90
90
  logger: options.logger,
91
91
  logLevel: options.logLevel,
@@ -99,8 +99,8 @@ export class Cadenya {
99
99
  this.workspaces = new Workspaces(this._client);
100
100
  this.agents = new Agents(this._client);
101
101
  this.aiProviderKeys = new AiProviderKeys(this._client);
102
- this.memoryLayers = new MemoryLayers(this._client);
103
102
  this.models = new Models(this._client);
103
+ this.memoryLayers = new MemoryLayers(this._client);
104
104
  this.objectives = new Objectives(this._client);
105
105
  this.toolSearch = new ToolSearch(this._client);
106
106
  this.tenants = new Tenants(this._client);
package/src/core/http.ts CHANGED
@@ -38,7 +38,12 @@ export interface RequestOptions {
38
38
  }
39
39
 
40
40
  export type QueryPrimitive = string | number | boolean;
41
- export type QueryValue = QueryPrimitive | QueryPrimitive[] | undefined | null;
41
+ /**
42
+ * Query objects are flattened to dot-delimited paths. `object` is used here
43
+ * deliberately so generated named interfaces (which do not declare an index
44
+ * signature) remain assignable as query parameter values.
45
+ */
46
+ export type QueryValue = QueryPrimitive | readonly QueryPrimitive[] | object | undefined | null;
42
47
 
43
48
  export interface RequestSpec {
44
49
  method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
@@ -589,17 +594,51 @@ export class HttpClient {
589
594
 
590
595
  private buildURL(path: string, query?: Record<string, QueryValue>): string {
591
596
  const url = new URL(this.baseURL + path);
597
+ const ancestors = new Set<object>();
592
598
  for (const [key, value] of Object.entries(query ?? {})) {
593
- if (value === undefined || value === null) continue;
594
- // Arrays serialize as repeated params: ?state=a&state=b
595
- for (const item of Array.isArray(value) ? value : [value]) {
596
- url.searchParams.append(key, String(item));
597
- }
599
+ appendQueryValue(url.searchParams, key, value, ancestors);
598
600
  }
599
601
  return url.toString();
600
602
  }
601
603
  }
602
604
 
605
+ /**
606
+ * Flatten nested query objects to dot-delimited paths. Arrays retain the
607
+ * existing repeated-parameter behavior at whichever path they occur:
608
+ * `{ filters: { state: ['a', 'b'] } }` becomes
609
+ * `?filters.state=a&filters.state=b`.
610
+ */
611
+ function appendQueryValue(
612
+ searchParams: URLSearchParams,
613
+ key: string,
614
+ value: unknown,
615
+ ancestors: Set<object>,
616
+ ): void {
617
+ if (value === undefined || value === null) return;
618
+
619
+ if (typeof value !== 'object') {
620
+ searchParams.append(key, String(value));
621
+ return;
622
+ }
623
+
624
+ if (ancestors.has(value)) {
625
+ throw new APIRequestError('query parameters contain a circular reference', undefined);
626
+ }
627
+ ancestors.add(value);
628
+ try {
629
+ if (Array.isArray(value)) {
630
+ for (const item of value) appendQueryValue(searchParams, key, item, ancestors);
631
+ return;
632
+ }
633
+
634
+ for (const [childKey, childValue] of Object.entries(value)) {
635
+ appendQueryValue(searchParams, `${key}.${childKey}`, childValue, ancestors);
636
+ }
637
+ } finally {
638
+ ancestors.delete(value);
639
+ }
640
+ }
641
+
603
642
  /** Retry counts must be bounded non-negative integers; anything else (NaN,
604
643
  * Infinity, negatives, fractions) is treated as the nearest sane value. */
605
644
  function normalizeRetries(value: number): number {
package/src/index.ts CHANGED
@@ -21,9 +21,9 @@ export * from './resources/agents.js';
21
21
  export * from './resources/agent-schedules.js';
22
22
  export * from './resources/agent-variations.js';
23
23
  export * from './resources/ai-provider-keys.js';
24
+ export * from './resources/models.js';
24
25
  export * from './resources/memory-layers.js';
25
26
  export * from './resources/memory-entries.js';
26
- export * from './resources/models.js';
27
27
  export * from './resources/objectives.js';
28
28
  export * from './resources/tool-search.js';
29
29
  export * from './resources/tenants.js';
@@ -248,7 +248,7 @@ export class Agents {
248
248
  *
249
249
  * @example
250
250
  * ```ts
251
- * const agent = await client.agents.create({ metadata: { name: 'sample' }, spec: { variationSelectionMode: 'VARIATION_SELECTION_MODE_UNSPECIFIED' } });
251
+ * const agent = await client.agents.create({ metadata: { name: 'sample' }, spec: { } });
252
252
  * ```
253
253
  */
254
254
  create(params: AgentCreateParams, options?: RequestOptions): APIPromise<Agent> {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { HttpClient, RequestOptions, APIPromise, pathSegment, snapshotParams } from '../core/http.js';
4
4
  import { Page } from '../core/pagination.js';
5
- import type { AIProviderKey, AIProviderKeySpec, CreateResourceMetadata, ListAIProviderKeysResponse, UpdateResourceMetadata } from '../types.js';
5
+ import type { AIProviderCredentialPatch, AIProviderKey, AIProviderKeySpec, CreateResourceMetadata, ListAIProviderKeysResponse, UpdateResourceMetadata } from '../types.js';
6
6
 
7
7
  export interface AiProviderKeyListParams {
8
8
  /**
@@ -68,6 +68,11 @@ export interface AiProviderKeyRetrieveParams {
68
68
  * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
69
69
  */
70
70
  workspaceId?: string;
71
+ /**
72
+ * When true, populate info (model counts, promotional status, model
73
+ * management), at the cost of extra lookups.
74
+ */
75
+ includeInfo?: boolean;
71
76
  }
72
77
 
73
78
  export interface AiProviderKeyDeleteParams {
@@ -92,6 +97,11 @@ export interface AiProviderKeyUpdateParams {
92
97
  * Fields to update.
93
98
  */
94
99
  updateMask?: string;
100
+ /**
101
+ * Field-level credential changes. This is independent of update_mask;
102
+ * legacy clients may continue replacing spec.credentials atomically.
103
+ */
104
+ credentialPatch?: AIProviderCredentialPatch;
95
105
  }
96
106
 
97
107
  export class AiProviderKeys {
@@ -144,7 +154,7 @@ export class AiProviderKeys {
144
154
  return this._client.requestAPI<AIProviderKey>(() => {
145
155
  const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
146
156
  if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
147
- return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/ai_provider_keys/${pathSegment('id', id)}` };
157
+ return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/ai_provider_keys/${pathSegment('id', id)}`, query: { includeInfo: params?.includeInfo } };
148
158
  }, options);
149
159
  }
150
160
 
@@ -176,7 +186,7 @@ export class AiProviderKeys {
176
186
  return this._client.requestAPI<AIProviderKey>(() => {
177
187
  const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
178
188
  if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
179
- return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/ai_provider_keys/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };
189
+ return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/ai_provider_keys/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask, credentialPatch: params?.credentialPatch } };
180
190
  }, options);
181
191
  }
182
192
  }
@@ -120,7 +120,7 @@ export class MemoryLayers {
120
120
  *
121
121
  * @example
122
122
  * ```ts
123
- * const memoryLayer = await client.memoryLayers.create({ metadata: { name: 'sample' }, spec: { type: 'MEMORY_LAYER_TYPE_UNSPECIFIED' } });
123
+ * const memoryLayer = await client.memoryLayers.create({ metadata: { name: 'sample' }, spec: { type: 'MEMORY_LAYER_TYPE_EPISODIC' } });
124
124
  * ```
125
125
  */
126
126
  create(params: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
@@ -2,7 +2,18 @@
2
2
 
3
3
  import { HttpClient, RequestOptions, APIPromise, pathSegment, snapshotParams } from '../core/http.js';
4
4
  import { Page } from '../core/pagination.js';
5
- import type { ListModelsResponse, Model, ModelServiceListModelsState, SwapModelOnVariationsRequest_ModelSwap } from '../types.js';
5
+ import type { CreateResourceMetadata, ListModelsResponse, Model, ModelPricingOverride, ModelServiceListModelsState, ModelSpec, SwapModelOnVariationsRequest_ModelSwap, UpdateResourceMetadata } from '../types.js';
6
+
7
+ export interface ModelCreateParams {
8
+ metadata: CreateResourceMetadata;
9
+ spec: ModelSpec;
10
+ /**
11
+ * Workspace ID.
12
+ *
13
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
14
+ */
15
+ workspaceId?: string;
16
+ }
6
17
 
7
18
  export interface ModelListParams {
8
19
  /**
@@ -70,6 +81,29 @@ export interface ModelRetrieveParams {
70
81
  workspaceId?: string;
71
82
  }
72
83
 
84
+ export interface ModelUpdateParams {
85
+ /**
86
+ * Workspace ID.
87
+ *
88
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
89
+ */
90
+ workspaceId?: string;
91
+ metadata?: UpdateResourceMetadata;
92
+ /**
93
+ * When any spec.* path is masked, send the complete spec (current values
94
+ * plus edits); it is validated as a whole.
95
+ */
96
+ spec?: ModelSpec;
97
+ /**
98
+ * Customer price overrides, applied per masked path.
99
+ */
100
+ pricingOverride?: ModelPricingOverride;
101
+ /**
102
+ * Fields to update. Required; leaf paths only.
103
+ */
104
+ updateMask?: string;
105
+ }
106
+
73
107
  export interface ModelDisableParams {
74
108
  /**
75
109
  * Workspace ID.
@@ -104,6 +138,22 @@ export interface ModelSwapOnVariationsParams {
104
138
  export class Models {
105
139
  constructor(private readonly _client: HttpClient) {}
106
140
 
141
+ /**
142
+ * Create a model
143
+ *
144
+ * @example
145
+ * ```ts
146
+ * const model = await client.models.create('ai_provider_key_123', { metadata: { name: 'sample' }, spec: { capabilities: [{ temperature: { }, type: 'temperature' }], family: 'sample', inputPricePerMillionTokens: 'sample', maxInputTokens: 1, maxOutputTokens: 1, outputPricePerMillionTokens: 'sample', provider: 'sample', providerModelId: 'sample' } });
147
+ * ```
148
+ */
149
+ create(aiProviderKeyId: string, params: ModelCreateParams, options?: RequestOptions): APIPromise<Model> {
150
+ return this._client.requestAPI<Model>(() => {
151
+ const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
152
+ if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
153
+ return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/ai_provider_keys/${pathSegment('aiProviderKeyId', aiProviderKeyId)}/models`, body: { metadata: params.metadata, spec: params.spec } };
154
+ }, options);
155
+ }
156
+
107
157
  /**
108
158
  * List models
109
159
  *
@@ -139,6 +189,22 @@ export class Models {
139
189
  }, options);
140
190
  }
141
191
 
192
+ /**
193
+ * Update a model
194
+ *
195
+ * @example
196
+ * ```ts
197
+ * const model = await client.models.update('_123');
198
+ * ```
199
+ */
200
+ update(id: string, params?: ModelUpdateParams, options?: RequestOptions): APIPromise<Model> {
201
+ return this._client.requestAPI<Model>(() => {
202
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
203
+ if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
204
+ return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/models/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, pricingOverride: params?.pricingOverride, updateMask: params?.updateMask } };
205
+ }, options);
206
+ }
207
+
142
208
  /**
143
209
  * Disable a model
144
210
  *
@@ -3,7 +3,7 @@
3
3
  import { HttpClient, RequestOptions, RequestSpec, APIPromise, pathSegment, snapshotParams } from '../core/http.js';
4
4
  import { Page } from '../core/pagination.js';
5
5
  import { Stream } from '../core/sse.js';
6
- import type { AgentVariationSpec_CompactionConfig, CompactObjectiveResponse, CreateObjectiveRequest_Secret, CreateOperationMetadata, GetObjectiveDiagnosticsResponse, ListObjectiveContextWindowsResponse, ListObjectiveEventsResponse, ListObjectiveFeedbackResponse, ListObjectiveTasksResponse, ListObjectiveToolCallsResponse, ListObjectiveToolsResponse, ListObjectivesResponse, MemoryReference, Objective, ObjectiveContextWindow, ObjectiveEpisodicConfigParam, ObjectiveEvent, ObjectiveFeedback, ObjectiveFeedbackData, ObjectiveServiceListObjectiveToolCallsExecutionStatus, ObjectiveServiceListObjectiveToolCallsStatus, ObjectiveServiceListObjectivesState, ObjectiveTask, ObjectiveTool, ObjectiveToolCall, ObjectiveToolCallWithResult, SetToolCallContentRequest_ContentBlock, SubjectAssertion, TenantAssertion } from '../types.js';
6
+ import type { AgentVariationSpec_CompactionConfig, CompactObjectiveResponse, CreateObjectiveRequest_Secret, CreateOperationMetadata, GetObjectiveDiagnosticsResponse, ListObjectiveContextWindowsResponse, ListObjectiveEventsResponse, ListObjectiveFeedbackResponse, ListObjectiveToolCallsResponse, ListObjectiveToolsResponse, ListObjectivesResponse, MemoryReference, Objective, ObjectiveContextWindow, ObjectiveEpisodicConfigParam, ObjectiveEvent, ObjectiveFeedback, ObjectiveFeedbackData, ObjectiveServiceListObjectiveToolCallsExecutionStatus, ObjectiveServiceListObjectiveToolCallsStatus, ObjectiveServiceListObjectivesState, ObjectiveTool, ObjectiveToolCall, ObjectiveToolCallWithResult, SetToolCallContentRequest_ContentBlock, SubjectAssertion, TenantAssertion } from '../types.js';
7
7
  import { wireObjectiveEpisodicConfig } from '../types.js';
8
8
 
9
9
  export interface ObjectiveListParams {
@@ -267,32 +267,6 @@ export interface ObjectiveCreateFeedbackParams {
267
267
  workspaceId?: string;
268
268
  }
269
269
 
270
- export interface ObjectiveListTasksParams {
271
- /**
272
- * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
273
- */
274
- workspaceId?: string;
275
- /**
276
- * Maximum number of results to return
277
- */
278
- limit?: number;
279
- /**
280
- * Pagination cursor from previous response
281
- */
282
- cursor?: string;
283
- /**
284
- * Sort order for results
285
- */
286
- sortOrder?: string;
287
- }
288
-
289
- export interface ObjectiveRetrieveTaskParams {
290
- /**
291
- * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
292
- */
293
- workspaceId?: string;
294
- }
295
-
296
270
  export interface ObjectiveListToolCallsParams {
297
271
  /**
298
272
  * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
@@ -580,41 +554,6 @@ export class Objectives {
580
554
  }, options);
581
555
  }
582
556
 
583
- /**
584
- * List objective tasks
585
- *
586
- * @example
587
- * ```ts
588
- * const page = await client.objectives.listTasks('objective_123');
589
- * for await (const item of page) {
590
- * // auto-fetches every page
591
- * }
592
- * ```
593
- */
594
- async listTasks(objectiveId: string, params?: ObjectiveListTasksParams, options?: RequestOptions): Promise<Page<ObjectiveTask>> {
595
- const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
596
- if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
597
- const _base = snapshotParams(params);
598
- const response = await this._client.request<ListObjectiveTasksResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tasks`, query: { limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder } }, options);
599
- return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listTasks(objectiveId, { ..._base, cursor: cursor }, options));
600
- }
601
-
602
- /**
603
- * Get an objective task by ID
604
- *
605
- * @example
606
- * ```ts
607
- * const objectiveTask = await client.objectives.retrieveTask('objective_123', '_123');
608
- * ```
609
- */
610
- retrieveTask(objectiveId: string, id: string, params?: ObjectiveRetrieveTaskParams, options?: RequestOptions): APIPromise<ObjectiveTask> {
611
- return this._client.requestAPI<ObjectiveTask>(() => {
612
- const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
613
- if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
614
- return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tasks/${pathSegment('id', id)}` };
615
- }, options);
616
- }
617
-
618
557
  /**
619
558
  * List objective tool calls
620
559
  *
@@ -150,7 +150,7 @@ export class Tools {
150
150
  *
151
151
  * @example
152
152
  * ```ts
153
- * const tool = await client.toolSets.tools.create('tool_set_123', { metadata: { name: 'sample' }, spec: { config: { http: { requestMethod: 'HTTP_METHOD_UNSPECIFIED' }, type: 'http' }, description: 'sample', parameters: { }, requiresApproval: true } });
153
+ * const tool = await client.toolSets.tools.create('tool_set_123', { metadata: { name: 'sample' }, spec: { config: { http: { requestMethod: 'GET' }, type: 'http' }, description: 'sample', parameters: { }, requiresApproval: true } });
154
154
  * ```
155
155
  */
156
156
  create(toolSetId: string, params: ToolCreateParams, options?: RequestOptions): APIPromise<Tool> {