@smithery/api 0.60.1 → 0.62.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 (95) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/client.d.mts +3 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -6
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/connections/connections.d.mts +42 -17
  12. package/resources/connections/connections.d.mts.map +1 -1
  13. package/resources/connections/connections.d.ts +42 -17
  14. package/resources/connections/connections.d.ts.map +1 -1
  15. package/resources/connections/connections.js +32 -11
  16. package/resources/connections/connections.js.map +1 -1
  17. package/resources/connections/connections.mjs +32 -11
  18. package/resources/connections/connections.mjs.map +1 -1
  19. package/resources/connections/index.d.mts +2 -1
  20. package/resources/connections/index.d.mts.map +1 -1
  21. package/resources/connections/index.d.ts +2 -1
  22. package/resources/connections/index.d.ts.map +1 -1
  23. package/resources/connections/index.js +5 -3
  24. package/resources/connections/index.js.map +1 -1
  25. package/resources/connections/index.mjs +2 -1
  26. package/resources/connections/index.mjs.map +1 -1
  27. package/resources/connections/subscriptions.d.mts +66 -0
  28. package/resources/connections/subscriptions.d.mts.map +1 -0
  29. package/resources/connections/subscriptions.d.ts +66 -0
  30. package/resources/connections/subscriptions.d.ts.map +1 -0
  31. package/resources/connections/subscriptions.js +71 -0
  32. package/resources/connections/subscriptions.js.map +1 -0
  33. package/resources/connections/subscriptions.mjs +67 -0
  34. package/resources/connections/subscriptions.mjs.map +1 -0
  35. package/resources/connections/triggers.d.mts +160 -0
  36. package/resources/connections/triggers.d.mts.map +1 -0
  37. package/resources/connections/triggers.d.ts +160 -0
  38. package/resources/connections/triggers.d.ts.map +1 -0
  39. package/resources/connections/triggers.js +111 -0
  40. package/resources/connections/triggers.js.map +1 -0
  41. package/resources/connections/triggers.mjs +107 -0
  42. package/resources/connections/triggers.mjs.map +1 -0
  43. package/resources/index.d.mts +1 -1
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +1 -1
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +3 -3
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +1 -1
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/servers/servers.d.mts +2 -3
  52. package/resources/servers/servers.d.mts.map +1 -1
  53. package/resources/servers/servers.d.ts +2 -3
  54. package/resources/servers/servers.d.ts.map +1 -1
  55. package/resources/servers/servers.js.map +1 -1
  56. package/resources/servers/servers.mjs.map +1 -1
  57. package/resources/subscriptions.d.mts +76 -0
  58. package/resources/subscriptions.d.mts.map +1 -0
  59. package/resources/subscriptions.d.ts +76 -0
  60. package/resources/subscriptions.d.ts.map +1 -0
  61. package/resources/subscriptions.js +40 -0
  62. package/resources/subscriptions.js.map +1 -0
  63. package/resources/subscriptions.mjs +36 -0
  64. package/resources/subscriptions.mjs.map +1 -0
  65. package/src/client.ts +21 -8
  66. package/src/resources/connections/connections.ts +113 -27
  67. package/src/resources/connections/index.ts +20 -1
  68. package/src/resources/connections/subscriptions.ts +112 -0
  69. package/src/resources/connections/triggers.ts +245 -0
  70. package/src/resources/index.ts +9 -1
  71. package/src/resources/servers/servers.ts +4 -6
  72. package/src/resources/subscriptions.ts +122 -0
  73. package/src/version.ts +1 -1
  74. package/version.d.mts +1 -1
  75. package/version.d.ts +1 -1
  76. package/version.js +1 -1
  77. package/version.mjs +1 -1
  78. package/resources/connections/mcp.d.mts +0 -44
  79. package/resources/connections/mcp.d.mts.map +0 -1
  80. package/resources/connections/mcp.d.ts +0 -44
  81. package/resources/connections/mcp.d.ts.map +0 -1
  82. package/resources/connections/mcp.js +0 -28
  83. package/resources/connections/mcp.js.map +0 -1
  84. package/resources/connections/mcp.mjs +0 -24
  85. package/resources/connections/mcp.mjs.map +0 -1
  86. package/resources/uplink.d.mts +0 -20
  87. package/resources/uplink.d.mts.map +0 -1
  88. package/resources/uplink.d.ts +0 -20
  89. package/resources/uplink.d.ts.map +0 -1
  90. package/resources/uplink.js +0 -18
  91. package/resources/uplink.js.map +0 -1
  92. package/resources/uplink.mjs +0 -14
  93. package/resources/uplink.mjs.map +0 -1
  94. package/src/resources/connections/mcp.ts +0 -63
  95. package/src/resources/uplink.ts +0 -27
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Subscriptions = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ class Subscriptions extends resource_1.APIResource {
8
+ /**
9
+ * Create a namespace-scoped subscription that receives events from every
10
+ * connection in the namespace.
11
+ */
12
+ create(namespace, options) {
13
+ return this._client.post((0, path_1.path) `/${namespace}/.subscriptions`, {
14
+ defaultBaseURL: 'https://smithery.run',
15
+ ...options,
16
+ });
17
+ }
18
+ /**
19
+ * List namespace-scoped trigger subscriptions for all connections in the
20
+ * namespace.
21
+ */
22
+ list(namespace, options) {
23
+ return this._client.get((0, path_1.path) `/${namespace}/.subscriptions`, {
24
+ defaultBaseURL: 'https://smithery.run',
25
+ ...options,
26
+ });
27
+ }
28
+ /**
29
+ * Delete a namespace-scoped trigger subscription.
30
+ */
31
+ delete(subscriptionID, params, options) {
32
+ const { namespace } = params;
33
+ return this._client.delete((0, path_1.path) `/${namespace}/.subscriptions/${subscriptionID}`, {
34
+ defaultBaseURL: 'https://smithery.run',
35
+ ...options,
36
+ });
37
+ }
38
+ }
39
+ exports.Subscriptions = Subscriptions;
40
+ //# sourceMappingURL=subscriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;OAGG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,iBAAiB,EAAE;YAC3D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,SAAiB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,iBAAiB,EAAE;YAC1D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,cAAsB,EACtB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,mBAAmB,cAAc,EAAE,EAAE;YAC/E,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AArCD,sCAqCC"}
@@ -0,0 +1,36 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ export class Subscriptions extends APIResource {
5
+ /**
6
+ * Create a namespace-scoped subscription that receives events from every
7
+ * connection in the namespace.
8
+ */
9
+ create(namespace, options) {
10
+ return this._client.post(path `/${namespace}/.subscriptions`, {
11
+ defaultBaseURL: 'https://smithery.run',
12
+ ...options,
13
+ });
14
+ }
15
+ /**
16
+ * List namespace-scoped trigger subscriptions for all connections in the
17
+ * namespace.
18
+ */
19
+ list(namespace, options) {
20
+ return this._client.get(path `/${namespace}/.subscriptions`, {
21
+ defaultBaseURL: 'https://smithery.run',
22
+ ...options,
23
+ });
24
+ }
25
+ /**
26
+ * Delete a namespace-scoped trigger subscription.
27
+ */
28
+ delete(subscriptionID, params, options) {
29
+ const { namespace } = params;
30
+ return this._client.delete(path `/${namespace}/.subscriptions/${subscriptionID}`, {
31
+ defaultBaseURL: 'https://smithery.run',
32
+ ...options,
33
+ });
34
+ }
35
+ }
36
+ //# sourceMappingURL=subscriptions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,IAAI,SAAS,iBAAiB,EAAE;YAC3D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,SAAiB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,IAAI,SAAS,iBAAiB,EAAE;YAC1D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,cAAsB,EACtB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,IAAI,SAAS,mBAAmB,cAAc,EAAE,EAAE;YAC/E,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -49,6 +49,15 @@ import {
49
49
  SkillUploadResponse,
50
50
  Skills,
51
51
  } from './resources/skills';
52
+ import {
53
+ CreateSubscriptionRequest,
54
+ CreateSubscriptionResponse,
55
+ Subscription,
56
+ SubscriptionDeleteParams,
57
+ SubscriptionDeleteResponse,
58
+ SubscriptionList,
59
+ Subscriptions,
60
+ } from './resources/subscriptions';
52
61
  import {
53
62
  Constraint,
54
63
  CreateTokenRequest,
@@ -56,7 +65,6 @@ import {
56
65
  TokenCreateParams,
57
66
  Tokens,
58
67
  } from './resources/tokens';
59
- import { Uplink, UplinkCreateTokenResponse } from './resources/uplink';
60
68
  import {
61
69
  Connection,
62
70
  ConnectionCreateParams,
@@ -820,10 +828,6 @@ export class Smithery {
820
828
  * Browse the MCP server registry, manage server configuration, and handle deployments
821
829
  */
822
830
  servers: API.Servers = new API.Servers(this);
823
- /**
824
- * Manage uplink tokens for connecting locally-running MCP servers to Smithery
825
- */
826
- uplink: API.Uplink = new API.Uplink(this);
827
831
  /**
828
832
  * Discover and search reusable prompt-based skills for MCP servers
829
833
  */
@@ -831,16 +835,17 @@ export class Smithery {
831
835
  namespaces: API.Namespaces = new API.Namespaces(this);
832
836
  organizations: API.Organizations = new API.Organizations(this);
833
837
  tokens: API.Tokens = new API.Tokens(this);
838
+ subscriptions: API.Subscriptions = new API.Subscriptions(this);
834
839
  connections: API.Connections = new API.Connections(this);
835
840
  }
836
841
 
837
842
  Smithery.Health = Health;
838
843
  Smithery.Servers = Servers;
839
- Smithery.Uplink = Uplink;
840
844
  Smithery.Skills = Skills;
841
845
  Smithery.Namespaces = Namespaces;
842
846
  Smithery.Organizations = Organizations;
843
847
  Smithery.Tokens = Tokens;
848
+ Smithery.Subscriptions = Subscriptions;
844
849
  Smithery.Connections = Connections;
845
850
 
846
851
  export declare namespace Smithery {
@@ -879,8 +884,6 @@ export declare namespace Smithery {
879
884
  type ServerListParams as ServerListParams,
880
885
  };
881
886
 
882
- export { Uplink as Uplink, type UplinkCreateTokenResponse as UplinkCreateTokenResponse };
883
-
884
887
  export {
885
888
  Skills as Skills,
886
889
  type SkillCreateResponse as SkillCreateResponse,
@@ -921,6 +924,16 @@ export declare namespace Smithery {
921
924
  type TokenCreateParams as TokenCreateParams,
922
925
  };
923
926
 
927
+ export {
928
+ Subscriptions as Subscriptions,
929
+ type CreateSubscriptionRequest as CreateSubscriptionRequest,
930
+ type CreateSubscriptionResponse as CreateSubscriptionResponse,
931
+ type Subscription as Subscription,
932
+ type SubscriptionList as SubscriptionList,
933
+ type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
934
+ type SubscriptionDeleteParams as SubscriptionDeleteParams,
935
+ };
936
+
924
937
  export {
925
938
  Connections as Connections,
926
939
  type Connection as Connection,
@@ -1,14 +1,35 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as McpAPI from './mcp';
5
- import { JsonRpcRequest, JsonRpcResponse, Mcp, McpCallParams } from './mcp';
4
+ import * as SubscriptionsAPI from './subscriptions';
5
+ import {
6
+ SubscriptionCreateParams,
7
+ SubscriptionDeleteParams,
8
+ SubscriptionDeleteResponse,
9
+ SubscriptionListParams,
10
+ Subscriptions,
11
+ } from './subscriptions';
12
+ import * as TriggersAPI from './triggers';
13
+ import {
14
+ CreateTriggerRequest,
15
+ TriggerCreateParams,
16
+ TriggerDefinition,
17
+ TriggerDefinitionList,
18
+ TriggerDeleteParams,
19
+ TriggerDeleteResponse,
20
+ TriggerGetInstanceParams,
21
+ TriggerGetParams,
22
+ TriggerInstance,
23
+ TriggerListParams,
24
+ Triggers,
25
+ } from './triggers';
6
26
  import { APIPromise } from '../../core/api-promise';
7
27
  import { RequestOptions } from '../../internal/request-options';
8
28
  import { path } from '../../internal/utils/path';
9
29
 
10
30
  export class Connections extends APIResource {
11
- mcp: McpAPI.Mcp = new McpAPI.Mcp(this._client);
31
+ subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
32
+ triggers: TriggersAPI.Triggers = new TriggersAPI.Triggers(this._client);
12
33
 
13
34
  /**
14
35
  * Create a new MCP connection with an auto-generated ID. Requires API key and
@@ -18,12 +39,19 @@ export class Connections extends APIResource {
18
39
  * ```ts
19
40
  * const connection = await client.connections.create(
20
41
  * 'namespace',
21
- * { mcpUrl: 'https://mcp.example.com/sse' },
22
42
  * );
23
43
  * ```
24
44
  */
25
- create(namespace: string, body: ConnectionCreateParams, options?: RequestOptions): APIPromise<Connection> {
26
- return this._client.post(path`/connect/${namespace}`, { body, ...options });
45
+ create(
46
+ namespace: string,
47
+ body: ConnectionCreateParams | null | undefined = {},
48
+ options?: RequestOptions,
49
+ ): APIPromise<Connection> {
50
+ return this._client.post(path`/${namespace}`, {
51
+ body,
52
+ defaultBaseURL: 'https://smithery.run',
53
+ ...options,
54
+ });
27
55
  }
28
56
 
29
57
  /**
@@ -41,7 +69,11 @@ export class Connections extends APIResource {
41
69
  query: ConnectionListParams | null | undefined = {},
42
70
  options?: RequestOptions,
43
71
  ): APIPromise<ConnectionsListResponse> {
44
- return this._client.get(path`/connect/${namespace}`, { query, ...options });
72
+ return this._client.get(path`/${namespace}`, {
73
+ query,
74
+ defaultBaseURL: 'https://smithery.run',
75
+ ...options,
76
+ });
45
77
  }
46
78
 
47
79
  /**
@@ -62,7 +94,10 @@ export class Connections extends APIResource {
62
94
  options?: RequestOptions,
63
95
  ): APIPromise<ConnectionDeleteResponse> {
64
96
  const { namespace } = params;
65
- return this._client.delete(path`/connect/${namespace}/${connectionID}`, options);
97
+ return this._client.delete(path`/${namespace}/${connectionID}`, {
98
+ defaultBaseURL: 'https://smithery.run',
99
+ ...options,
100
+ });
66
101
  }
67
102
 
68
103
  /**
@@ -79,7 +114,10 @@ export class Connections extends APIResource {
79
114
  */
80
115
  get(connectionID: string, params: ConnectionGetParams, options?: RequestOptions): APIPromise<Connection> {
81
116
  const { namespace } = params;
82
- return this._client.get(path`/connect/${namespace}/${connectionID}`, options);
117
+ return this._client.get(path`/${namespace}/${connectionID}`, {
118
+ defaultBaseURL: 'https://smithery.run',
119
+ ...options,
120
+ });
83
121
  }
84
122
 
85
123
  /**
@@ -98,7 +136,11 @@ export class Connections extends APIResource {
98
136
  */
99
137
  set(connectionID: string, params: ConnectionSetParams, options?: RequestOptions): APIPromise<Connection> {
100
138
  const { namespace, ...body } = params;
101
- return this._client.put(path`/connect/${namespace}/${connectionID}`, { body, ...options });
139
+ return this._client.put(path`/${namespace}/${connectionID}`, {
140
+ body,
141
+ defaultBaseURL: 'https://smithery.run',
142
+ ...options,
143
+ });
102
144
  }
103
145
  }
104
146
 
@@ -109,9 +151,9 @@ export interface Connection {
109
151
  connectionId: string;
110
152
 
111
153
  /**
112
- * MCP server URL
154
+ * MCP server URL. Null for uplink connections.
113
155
  */
114
- mcpUrl: string;
156
+ mcpUrl: string | null;
115
157
 
116
158
  metadata: { [key: string]: unknown } | null;
117
159
 
@@ -143,9 +185,15 @@ export interface Connection {
143
185
  */
144
186
  status?:
145
187
  | Connection.ConnectionStatusConnected
188
+ | Connection.ConnectionStatusDisconnected
146
189
  | Connection.ConnectionStatusAuthRequired
147
190
  | Connection.ConnectionStatusInputRequired
148
191
  | Connection.ConnectionStatusError;
192
+
193
+ /**
194
+ * Connection transport
195
+ */
196
+ transport?: 'http' | 'uplink';
149
197
  }
150
198
 
151
199
  export namespace Connection {
@@ -199,6 +247,10 @@ export namespace Connection {
199
247
  state: 'connected';
200
248
  }
201
249
 
250
+ export interface ConnectionStatusDisconnected {
251
+ state: 'disconnected';
252
+ }
253
+
202
254
  export interface ConnectionStatusAuthRequired {
203
255
  state: 'auth_required';
204
256
 
@@ -278,17 +330,18 @@ export interface ConnectionsListResponse {
278
330
  }
279
331
 
280
332
  export interface CreateConnectionRequest {
281
- /**
282
- * URL of the MCP server
283
- */
284
- mcpUrl: string;
285
-
286
333
  /**
287
334
  * Custom headers to send with MCP requests (stored securely, not returned in
288
335
  * responses)
289
336
  */
290
337
  headers?: { [key: string]: string };
291
338
 
339
+ /**
340
+ * URL of the MCP server. Required for HTTP connections. Omit for uplink
341
+ * connections.
342
+ */
343
+ mcpUrl?: string;
344
+
292
345
  /**
293
346
  * Custom metadata for filtering connections
294
347
  */
@@ -306,6 +359,11 @@ export interface CreateConnectionRequest {
306
359
  * Human-readable name (optional, defaults to connection ID)
307
360
  */
308
361
  name?: string;
362
+
363
+ /**
364
+ * Connection transport. Use `uplink` for a local server paired over Smithery CLI.
365
+ */
366
+ transport?: 'http' | 'uplink';
309
367
  }
310
368
 
311
369
  export namespace CreateConnectionRequest {
@@ -334,17 +392,18 @@ export interface ConnectionDeleteResponse {
334
392
  }
335
393
 
336
394
  export interface ConnectionCreateParams {
337
- /**
338
- * URL of the MCP server
339
- */
340
- mcpUrl: string;
341
-
342
395
  /**
343
396
  * Custom headers to send with MCP requests (stored securely, not returned in
344
397
  * responses)
345
398
  */
346
399
  headers?: { [key: string]: string };
347
400
 
401
+ /**
402
+ * URL of the MCP server. Required for HTTP connections. Omit for uplink
403
+ * connections.
404
+ */
405
+ mcpUrl?: string;
406
+
348
407
  /**
349
408
  * Custom metadata for filtering connections
350
409
  */
@@ -362,6 +421,11 @@ export interface ConnectionCreateParams {
362
421
  * Human-readable name (optional, defaults to connection ID)
363
422
  */
364
423
  name?: string;
424
+
425
+ /**
426
+ * Connection transport. Use `uplink` for a local server paired over Smithery CLI.
427
+ */
428
+ transport?: 'http' | 'uplink';
365
429
  }
366
430
 
367
431
  export namespace ConnectionCreateParams {
@@ -448,6 +512,12 @@ export interface ConnectionSetParams {
448
512
  * Body param: Human-readable name (optional, defaults to connection ID)
449
513
  */
450
514
  name?: string;
515
+
516
+ /**
517
+ * Body param: Connection transport. Defaults to the existing connection transport
518
+ * when updating.
519
+ */
520
+ transport?: 'http' | 'uplink';
451
521
  }
452
522
 
453
523
  export namespace ConnectionSetParams {
@@ -469,7 +539,8 @@ export namespace ConnectionSetParams {
469
539
  }
470
540
  }
471
541
 
472
- Connections.Mcp = Mcp;
542
+ Connections.Subscriptions = Subscriptions;
543
+ Connections.Triggers = Triggers;
473
544
 
474
545
  export declare namespace Connections {
475
546
  export {
@@ -485,9 +556,24 @@ export declare namespace Connections {
485
556
  };
486
557
 
487
558
  export {
488
- Mcp as Mcp,
489
- type JsonRpcRequest as JsonRpcRequest,
490
- type JsonRpcResponse as JsonRpcResponse,
491
- type McpCallParams as McpCallParams,
559
+ Subscriptions as Subscriptions,
560
+ type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
561
+ type SubscriptionCreateParams as SubscriptionCreateParams,
562
+ type SubscriptionListParams as SubscriptionListParams,
563
+ type SubscriptionDeleteParams as SubscriptionDeleteParams,
564
+ };
565
+
566
+ export {
567
+ Triggers as Triggers,
568
+ type CreateTriggerRequest as CreateTriggerRequest,
569
+ type TriggerDefinition as TriggerDefinition,
570
+ type TriggerDefinitionList as TriggerDefinitionList,
571
+ type TriggerInstance as TriggerInstance,
572
+ type TriggerDeleteResponse as TriggerDeleteResponse,
573
+ type TriggerCreateParams as TriggerCreateParams,
574
+ type TriggerListParams as TriggerListParams,
575
+ type TriggerDeleteParams as TriggerDeleteParams,
576
+ type TriggerGetParams as TriggerGetParams,
577
+ type TriggerGetInstanceParams as TriggerGetInstanceParams,
492
578
  };
493
579
  }
@@ -12,4 +12,23 @@ export {
12
12
  type ConnectionGetParams,
13
13
  type ConnectionSetParams,
14
14
  } from './connections';
15
- export { Mcp, type JsonRpcRequest, type JsonRpcResponse, type McpCallParams } from './mcp';
15
+ export {
16
+ Subscriptions,
17
+ type SubscriptionDeleteResponse,
18
+ type SubscriptionCreateParams,
19
+ type SubscriptionListParams,
20
+ type SubscriptionDeleteParams,
21
+ } from './subscriptions';
22
+ export {
23
+ Triggers,
24
+ type CreateTriggerRequest,
25
+ type TriggerDefinition,
26
+ type TriggerDefinitionList,
27
+ type TriggerInstance,
28
+ type TriggerDeleteResponse,
29
+ type TriggerCreateParams,
30
+ type TriggerListParams,
31
+ type TriggerDeleteParams,
32
+ type TriggerGetParams,
33
+ type TriggerGetInstanceParams,
34
+ } from './triggers';
@@ -0,0 +1,112 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as SubscriptionsAPI from '../subscriptions';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Subscriptions extends APIResource {
10
+ /**
11
+ * Create a connection-scoped subscription that receives events from one
12
+ * connection.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const createSubscriptionResponse =
17
+ * await client.connections.subscriptions.create(
18
+ * 'connectionId',
19
+ * { namespace: 'namespace' },
20
+ * );
21
+ * ```
22
+ */
23
+ create(
24
+ connectionID: string,
25
+ params: SubscriptionCreateParams,
26
+ options?: RequestOptions,
27
+ ): APIPromise<SubscriptionsAPI.CreateSubscriptionResponse> {
28
+ const { namespace } = params;
29
+ return this._client.post(path`/${namespace}/${connectionID}/.subscriptions`, {
30
+ defaultBaseURL: 'https://smithery.run',
31
+ ...options,
32
+ });
33
+ }
34
+
35
+ /**
36
+ * List trigger subscriptions scoped to a single connection.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const subscriptionList =
41
+ * await client.connections.subscriptions.list(
42
+ * 'connectionId',
43
+ * { namespace: 'namespace' },
44
+ * );
45
+ * ```
46
+ */
47
+ list(
48
+ connectionID: string,
49
+ params: SubscriptionListParams,
50
+ options?: RequestOptions,
51
+ ): APIPromise<SubscriptionsAPI.SubscriptionList> {
52
+ const { namespace } = params;
53
+ return this._client.get(path`/${namespace}/${connectionID}/.subscriptions`, {
54
+ defaultBaseURL: 'https://smithery.run',
55
+ ...options,
56
+ });
57
+ }
58
+
59
+ /**
60
+ * Delete a connection-scoped trigger subscription.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const subscription =
65
+ * await client.connections.subscriptions.delete(
66
+ * 'subscriptionId',
67
+ * {
68
+ * namespace: 'namespace',
69
+ * connectionId: 'connectionId',
70
+ * },
71
+ * );
72
+ * ```
73
+ */
74
+ delete(
75
+ subscriptionID: string,
76
+ params: SubscriptionDeleteParams,
77
+ options?: RequestOptions,
78
+ ): APIPromise<SubscriptionDeleteResponse> {
79
+ const { namespace, connectionId } = params;
80
+ return this._client.delete(path`/${namespace}/${connectionId}/.subscriptions/${subscriptionID}`, {
81
+ defaultBaseURL: 'https://smithery.run',
82
+ ...options,
83
+ });
84
+ }
85
+ }
86
+
87
+ export interface SubscriptionDeleteResponse {
88
+ success: true;
89
+ }
90
+
91
+ export interface SubscriptionCreateParams {
92
+ namespace: string;
93
+ }
94
+
95
+ export interface SubscriptionListParams {
96
+ namespace: string;
97
+ }
98
+
99
+ export interface SubscriptionDeleteParams {
100
+ namespace: string;
101
+
102
+ connectionId: string;
103
+ }
104
+
105
+ export declare namespace Subscriptions {
106
+ export {
107
+ type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
108
+ type SubscriptionCreateParams as SubscriptionCreateParams,
109
+ type SubscriptionListParams as SubscriptionListParams,
110
+ type SubscriptionDeleteParams as SubscriptionDeleteParams,
111
+ };
112
+ }