@smithery/api 0.63.1 → 0.64.1

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 (99) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +11 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +11 -0
  9. package/client.mjs.map +1 -1
  10. package/internal/types.d.mts +6 -6
  11. package/internal/types.d.mts.map +1 -1
  12. package/internal/types.d.ts +6 -6
  13. package/internal/types.d.ts.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/connections/connections.d.mts +4 -0
  16. package/resources/connections/connections.d.mts.map +1 -1
  17. package/resources/connections/connections.d.ts +4 -0
  18. package/resources/connections/connections.d.ts.map +1 -1
  19. package/resources/connections/connections.js +4 -0
  20. package/resources/connections/connections.js.map +1 -1
  21. package/resources/connections/connections.mjs +4 -0
  22. package/resources/connections/connections.mjs.map +1 -1
  23. package/resources/connections/index.d.mts +1 -0
  24. package/resources/connections/index.d.mts.map +1 -1
  25. package/resources/connections/index.d.ts +1 -0
  26. package/resources/connections/index.d.ts.map +1 -1
  27. package/resources/connections/index.js +3 -1
  28. package/resources/connections/index.js.map +1 -1
  29. package/resources/connections/index.mjs +1 -0
  30. package/resources/connections/index.mjs.map +1 -1
  31. package/resources/connections/subscriptions.d.mts +20 -3
  32. package/resources/connections/subscriptions.d.mts.map +1 -1
  33. package/resources/connections/subscriptions.d.ts +20 -3
  34. package/resources/connections/subscriptions.d.ts.map +1 -1
  35. package/resources/connections/subscriptions.js +9 -3
  36. package/resources/connections/subscriptions.js.map +1 -1
  37. package/resources/connections/subscriptions.mjs +9 -3
  38. package/resources/connections/subscriptions.mjs.map +1 -1
  39. package/resources/connections/tools.d.mts +126 -0
  40. package/resources/connections/tools.d.mts.map +1 -0
  41. package/resources/connections/tools.d.ts +126 -0
  42. package/resources/connections/tools.d.ts.map +1 -0
  43. package/resources/connections/tools.js +69 -0
  44. package/resources/connections/tools.js.map +1 -0
  45. package/resources/connections/tools.mjs +65 -0
  46. package/resources/connections/tools.mjs.map +1 -0
  47. package/resources/connections/triggers.d.mts +13 -0
  48. package/resources/connections/triggers.d.mts.map +1 -1
  49. package/resources/connections/triggers.d.ts +13 -0
  50. package/resources/connections/triggers.d.ts.map +1 -1
  51. package/resources/connections/triggers.js +3 -1
  52. package/resources/connections/triggers.js.map +1 -1
  53. package/resources/connections/triggers.mjs +3 -1
  54. package/resources/connections/triggers.mjs.map +1 -1
  55. package/resources/index.d.mts +1 -1
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +1 -1
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js.map +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/organizations/api-keys.d.mts +8 -1
  62. package/resources/organizations/api-keys.d.mts.map +1 -1
  63. package/resources/organizations/api-keys.d.ts +8 -1
  64. package/resources/organizations/api-keys.d.ts.map +1 -1
  65. package/resources/servers/releases.d.mts +2 -1
  66. package/resources/servers/releases.d.mts.map +1 -1
  67. package/resources/servers/releases.d.ts +2 -1
  68. package/resources/servers/releases.d.ts.map +1 -1
  69. package/resources/servers/servers.d.mts +8 -0
  70. package/resources/servers/servers.d.mts.map +1 -1
  71. package/resources/servers/servers.d.ts +8 -0
  72. package/resources/servers/servers.d.ts.map +1 -1
  73. package/resources/servers/servers.js.map +1 -1
  74. package/resources/servers/servers.mjs.map +1 -1
  75. package/resources/subscriptions.d.mts +43 -6
  76. package/resources/subscriptions.d.mts.map +1 -1
  77. package/resources/subscriptions.d.ts +43 -6
  78. package/resources/subscriptions.d.ts.map +1 -1
  79. package/resources/subscriptions.js +29 -1
  80. package/resources/subscriptions.js.map +1 -1
  81. package/resources/subscriptions.mjs +29 -1
  82. package/resources/subscriptions.mjs.map +1 -1
  83. package/src/client.ts +14 -0
  84. package/src/internal/types.ts +6 -8
  85. package/src/resources/connections/connections.ts +24 -0
  86. package/src/resources/connections/index.ts +10 -0
  87. package/src/resources/connections/subscriptions.ts +24 -4
  88. package/src/resources/connections/tools.ts +185 -0
  89. package/src/resources/connections/triggers.ts +14 -1
  90. package/src/resources/index.ts +1 -0
  91. package/src/resources/organizations/api-keys.ts +11 -1
  92. package/src/resources/servers/releases.ts +3 -1
  93. package/src/resources/servers/servers.ts +10 -0
  94. package/src/resources/subscriptions.ts +51 -6
  95. package/src/version.ts +1 -1
  96. package/version.d.mts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. package/version.mjs +1 -1
@@ -0,0 +1,185 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Tools extends APIResource {
9
+ /**
10
+ * List tools exposed by a connection.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const toolList = await client.connections.tools.list(
15
+ * 'connectionId',
16
+ * { namespace: 'namespace' },
17
+ * );
18
+ * ```
19
+ */
20
+ list(connectionID: string, params: ToolListParams, options?: RequestOptions): APIPromise<ToolList> {
21
+ const { namespace } = params;
22
+ return this._client.get(path`/${namespace}/${connectionID}/.tools`, {
23
+ defaultBaseURL: 'https://smithery.run',
24
+ ...options,
25
+ });
26
+ }
27
+
28
+ /**
29
+ * Invoke a tool with JSON arguments.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const response = await client.connections.tools.call(
34
+ * 'toolPath',
35
+ * {
36
+ * namespace: 'namespace',
37
+ * connectionId: 'connectionId',
38
+ * body: { foo: 'bar' },
39
+ * },
40
+ * );
41
+ * ```
42
+ */
43
+ call(toolPath: string, params: ToolCallParams, options?: RequestOptions): APIPromise<ToolCallResponse> {
44
+ const { namespace, connectionId, body } = params;
45
+ return this._client.post(path`/${namespace}/${connectionId}/.tools/${toolPath}`, {
46
+ body: body,
47
+ defaultBaseURL: 'https://smithery.run',
48
+ ...options,
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Get one tool or list tools under a slash-separated category.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const toolResponse = await client.connections.tools.get(
58
+ * 'toolPath',
59
+ * { namespace: 'namespace', connectionId: 'connectionId' },
60
+ * );
61
+ * ```
62
+ */
63
+ get(toolPath: string, params: ToolGetParams, options?: RequestOptions): APIPromise<ToolResponse> {
64
+ const { namespace, connectionId } = params;
65
+ return this._client.get(path`/${namespace}/${connectionId}/.tools/${toolPath}`, {
66
+ defaultBaseURL: 'https://smithery.run',
67
+ ...options,
68
+ });
69
+ }
70
+ }
71
+
72
+ export interface Tool {
73
+ inputSchema: Tool.InputSchema;
74
+
75
+ name: string;
76
+
77
+ _meta?: { [key: string]: unknown };
78
+
79
+ annotations?: Tool.Annotations;
80
+
81
+ description?: string;
82
+
83
+ execution?: Tool.Execution;
84
+
85
+ icons?: Array<Tool.Icon>;
86
+
87
+ outputSchema?: Tool.OutputSchema;
88
+
89
+ title?: string;
90
+ }
91
+
92
+ export namespace Tool {
93
+ export interface InputSchema {
94
+ type: 'object';
95
+
96
+ properties?: { [key: string]: unknown };
97
+
98
+ required?: Array<string>;
99
+
100
+ [k: string]: unknown;
101
+ }
102
+
103
+ export interface Annotations {
104
+ destructiveHint?: boolean;
105
+
106
+ idempotentHint?: boolean;
107
+
108
+ openWorldHint?: boolean;
109
+
110
+ readOnlyHint?: boolean;
111
+
112
+ title?: string;
113
+ }
114
+
115
+ export interface Execution {
116
+ taskSupport?: 'required' | 'optional' | 'forbidden';
117
+ }
118
+
119
+ export interface Icon {
120
+ src: string;
121
+
122
+ mimeType?: string;
123
+
124
+ sizes?: Array<string>;
125
+
126
+ theme?: 'light' | 'dark';
127
+ }
128
+
129
+ export interface OutputSchema {
130
+ type: 'object';
131
+
132
+ properties?: { [key: string]: unknown };
133
+
134
+ required?: Array<string>;
135
+
136
+ [k: string]: unknown;
137
+ }
138
+ }
139
+
140
+ export interface ToolList {
141
+ tools: Array<Tool>;
142
+ }
143
+
144
+ export type ToolResponse = Tool | ToolList;
145
+
146
+ export type ToolCallResponse = { [key: string]: unknown };
147
+
148
+ export interface ToolListParams {
149
+ namespace: string;
150
+ }
151
+
152
+ export interface ToolCallParams {
153
+ /**
154
+ * Path param
155
+ */
156
+ namespace: string;
157
+
158
+ /**
159
+ * Path param
160
+ */
161
+ connectionId: string;
162
+
163
+ /**
164
+ * Body param
165
+ */
166
+ body: { [key: string]: unknown };
167
+ }
168
+
169
+ export interface ToolGetParams {
170
+ namespace: string;
171
+
172
+ connectionId: string;
173
+ }
174
+
175
+ export declare namespace Tools {
176
+ export {
177
+ type Tool as Tool,
178
+ type ToolList as ToolList,
179
+ type ToolResponse as ToolResponse,
180
+ type ToolCallResponse as ToolCallResponse,
181
+ type ToolListParams as ToolListParams,
182
+ type ToolCallParams as ToolCallParams,
183
+ type ToolGetParams as ToolGetParams,
184
+ };
185
+ }
@@ -15,6 +15,7 @@ export class Triggers extends APIResource {
15
15
  * await client.connections.triggers.create('triggerName', {
16
16
  * namespace: 'namespace',
17
17
  * connectionId: 'connectionId',
18
+ * params: { foo: 'bar' },
18
19
  * });
19
20
  * ```
20
21
  */
@@ -23,8 +24,9 @@ export class Triggers extends APIResource {
23
24
  params: TriggerCreateParams,
24
25
  options?: RequestOptions,
25
26
  ): APIPromise<TriggerInstance> {
26
- const { namespace, connectionId } = params;
27
+ const { namespace, connectionId, ...body } = params;
27
28
  return this._client.post(path`/${namespace}/${connectionId}/.triggers/${triggerName}`, {
29
+ body,
28
30
  defaultBaseURL: 'https://smithery.run',
29
31
  ...options,
30
32
  });
@@ -198,9 +200,20 @@ export interface TriggerDeleteResponse {
198
200
  }
199
201
 
200
202
  export interface TriggerCreateParams {
203
+ /**
204
+ * Path param
205
+ */
201
206
  namespace: string;
202
207
 
208
+ /**
209
+ * Path param
210
+ */
203
211
  connectionId: string;
212
+
213
+ /**
214
+ * Body param: Trigger-specific parameters defined by the trigger inputSchema
215
+ */
216
+ params: { [key: string]: unknown };
204
217
  }
205
218
 
206
219
  export interface TriggerListParams {
@@ -64,6 +64,7 @@ export {
64
64
  type Subscription,
65
65
  type SubscriptionList,
66
66
  type SubscriptionDeleteResponse,
67
+ type SubscriptionCreateParams,
67
68
  type SubscriptionDeleteParams,
68
69
  } from './subscriptions';
69
70
  export {
@@ -49,7 +49,17 @@ export interface APIKeyCreateResponse {
49
49
  }
50
50
 
51
51
  export interface APIKeyListResponse {
52
- apiKeys: Array<unknown>;
52
+ apiKeys: Array<APIKeyListResponse.APIKey>;
53
+ }
54
+
55
+ export namespace APIKeyListResponse {
56
+ export interface APIKey {
57
+ id: string;
58
+
59
+ createdAt: string;
60
+
61
+ name: string;
62
+ }
53
63
  }
54
64
 
55
65
  export interface APIKeyDeleteResponse {
@@ -161,6 +161,8 @@ export interface HostedDeployPayload {
161
161
 
162
162
  configSchema?: { [key: string]: unknown };
163
163
 
164
+ secretNames?: Array<string>;
165
+
164
166
  serverCard?: ServerCard;
165
167
 
166
168
  source?: HostedDeployPayload.Source;
@@ -497,7 +499,7 @@ export namespace ReleaseGetResponse {
497
499
 
498
500
  /**
499
501
  * Pipeline stage: deploy (bundle upload), scan (security/OAuth check), metadata
500
- * (tool discovery), publish (making the server live).
502
+ * (tool discovery), publish (generated artifacts).
501
503
  */
502
504
  stage: 'deploy' | 'scan' | 'metadata' | 'publish';
503
505
 
@@ -392,6 +392,8 @@ export namespace ServerGetResponse {
392
392
  inputSchema: Tool.InputSchema;
393
393
 
394
394
  name: string;
395
+
396
+ outputSchema?: Tool.OutputSchema;
395
397
  }
396
398
 
397
399
  export namespace Tool {
@@ -400,6 +402,14 @@ export namespace ServerGetResponse {
400
402
 
401
403
  properties?: { [key: string]: unknown };
402
404
  }
405
+
406
+ export interface OutputSchema {
407
+ type: 'object';
408
+
409
+ properties?: { [key: string]: unknown };
410
+
411
+ required?: Array<string>;
412
+ }
403
413
  }
404
414
  }
405
415
 
@@ -9,9 +9,26 @@ export class Subscriptions extends APIResource {
9
9
  /**
10
10
  * Create a namespace-scoped subscription that receives events from every
11
11
  * connection in the namespace.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const subscription = await client.subscriptions.create(
16
+ * 'namespace',
17
+ * {
18
+ * secret:
19
+ * 'whsec_dGVzdF9zZWNyZXRfMjRfYnl0ZXNfbWluaW11bSE=',
20
+ * url: 'https://my-app.example.com/events',
21
+ * },
22
+ * );
23
+ * ```
12
24
  */
13
- create(namespace: string, options?: RequestOptions): APIPromise<CreateSubscriptionResponse> {
25
+ create(
26
+ namespace: string,
27
+ body: SubscriptionCreateParams,
28
+ options?: RequestOptions,
29
+ ): APIPromise<Subscription> {
14
30
  return this._client.post(path`/${namespace}/.subscriptions`, {
31
+ body,
15
32
  defaultBaseURL: 'https://smithery.run',
16
33
  ...options,
17
34
  });
@@ -20,6 +37,13 @@ export class Subscriptions extends APIResource {
20
37
  /**
21
38
  * List namespace-scoped trigger subscriptions for all connections in the
22
39
  * namespace.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const subscriptionList = await client.subscriptions.list(
44
+ * 'namespace',
45
+ * );
46
+ * ```
23
47
  */
24
48
  list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList> {
25
49
  return this._client.get(path`/${namespace}/.subscriptions`, {
@@ -30,6 +54,14 @@ export class Subscriptions extends APIResource {
30
54
 
31
55
  /**
32
56
  * Delete a namespace-scoped trigger subscription.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const subscription = await client.subscriptions.delete(
61
+ * 'subscriptionId',
62
+ * { namespace: 'namespace' },
63
+ * );
64
+ * ```
33
65
  */
34
66
  delete(
35
67
  subscriptionID: string,
@@ -45,6 +77,11 @@ export class Subscriptions extends APIResource {
45
77
  }
46
78
 
47
79
  export interface CreateSubscriptionRequest {
80
+ /**
81
+ * Standard Webhooks signing secret generated and stored by the receiver
82
+ */
83
+ secret: string;
84
+
48
85
  /**
49
86
  * HTTPS webhook destination
50
87
  */
@@ -67,11 +104,6 @@ export interface CreateSubscriptionResponse {
67
104
  */
68
105
  created_at: string;
69
106
 
70
- /**
71
- * Webhook signing secret. Returned only once at creation time.
72
- */
73
- secret: string;
74
-
75
107
  /**
76
108
  * Destination URL for webhook deliveries
77
109
  */
@@ -106,6 +138,18 @@ export interface SubscriptionDeleteResponse {
106
138
  success: true;
107
139
  }
108
140
 
141
+ export interface SubscriptionCreateParams {
142
+ /**
143
+ * Standard Webhooks signing secret generated and stored by the receiver
144
+ */
145
+ secret: string;
146
+
147
+ /**
148
+ * HTTPS webhook destination
149
+ */
150
+ url: string;
151
+ }
152
+
109
153
  export interface SubscriptionDeleteParams {
110
154
  namespace: string;
111
155
  }
@@ -117,6 +161,7 @@ export declare namespace Subscriptions {
117
161
  type Subscription as Subscription,
118
162
  type SubscriptionList as SubscriptionList,
119
163
  type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
164
+ type SubscriptionCreateParams as SubscriptionCreateParams,
120
165
  type SubscriptionDeleteParams as SubscriptionDeleteParams,
121
166
  };
122
167
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.63.1'; // x-release-please-version
1
+ export const VERSION = '0.64.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.63.1";
1
+ export declare const VERSION = "0.64.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.63.1";
1
+ export declare const VERSION = "0.64.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.63.1'; // x-release-please-version
4
+ exports.VERSION = '0.64.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.63.1'; // x-release-please-version
1
+ export const VERSION = '0.64.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map