@smithery/api 0.63.0 → 0.64.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 (94) hide show
  1. package/CHANGELOG.md +34 -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 +11 -1
  32. package/resources/connections/subscriptions.d.mts.map +1 -1
  33. package/resources/connections/subscriptions.d.ts +11 -1
  34. package/resources/connections/subscriptions.d.ts.map +1 -1
  35. package/resources/connections/subscriptions.js +6 -2
  36. package/resources/connections/subscriptions.js.map +1 -1
  37. package/resources/connections/subscriptions.mjs +6 -2
  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/servers/releases.d.mts +2 -1
  62. package/resources/servers/releases.d.mts.map +1 -1
  63. package/resources/servers/releases.d.ts +2 -1
  64. package/resources/servers/releases.d.ts.map +1 -1
  65. package/resources/servers/servers.d.mts +14 -0
  66. package/resources/servers/servers.d.mts.map +1 -1
  67. package/resources/servers/servers.d.ts +14 -0
  68. package/resources/servers/servers.d.ts.map +1 -1
  69. package/resources/servers/servers.js.map +1 -1
  70. package/resources/servers/servers.mjs.map +1 -1
  71. package/resources/subscriptions.d.mts +31 -2
  72. package/resources/subscriptions.d.mts.map +1 -1
  73. package/resources/subscriptions.d.ts +31 -2
  74. package/resources/subscriptions.d.ts.map +1 -1
  75. package/resources/subscriptions.js +25 -1
  76. package/resources/subscriptions.js.map +1 -1
  77. package/resources/subscriptions.mjs +25 -1
  78. package/resources/subscriptions.mjs.map +1 -1
  79. package/src/client.ts +14 -0
  80. package/src/internal/types.ts +6 -8
  81. package/src/resources/connections/connections.ts +24 -0
  82. package/src/resources/connections/index.ts +10 -0
  83. package/src/resources/connections/subscriptions.ts +14 -2
  84. package/src/resources/connections/tools.ts +185 -0
  85. package/src/resources/connections/triggers.ts +14 -1
  86. package/src/resources/index.ts +1 -0
  87. package/src/resources/servers/releases.ts +3 -1
  88. package/src/resources/servers/servers.ts +18 -0
  89. package/src/resources/subscriptions.ts +37 -1
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
@@ -5,15 +5,38 @@ export declare class Subscriptions extends APIResource {
5
5
  /**
6
6
  * Create a namespace-scoped subscription that receives events from every
7
7
  * connection in the namespace.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const createSubscriptionResponse =
12
+ * await client.subscriptions.create('namespace', {
13
+ * url: 'https://my-app.example.com/events',
14
+ * });
15
+ * ```
8
16
  */
9
- create(namespace: string, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
17
+ create(namespace: string, body: SubscriptionCreateParams, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
10
18
  /**
11
19
  * List namespace-scoped trigger subscriptions for all connections in the
12
20
  * namespace.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const subscriptionList = await client.subscriptions.list(
25
+ * 'namespace',
26
+ * );
27
+ * ```
13
28
  */
14
29
  list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList>;
15
30
  /**
16
31
  * Delete a namespace-scoped trigger subscription.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const subscription = await client.subscriptions.delete(
36
+ * 'subscriptionId',
37
+ * { namespace: 'namespace' },
38
+ * );
39
+ * ```
17
40
  */
18
41
  delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
19
42
  }
@@ -67,10 +90,16 @@ export type SubscriptionList = Array<Subscription>;
67
90
  export interface SubscriptionDeleteResponse {
68
91
  success: true;
69
92
  }
93
+ export interface SubscriptionCreateParams {
94
+ /**
95
+ * HTTPS webhook destination
96
+ */
97
+ url: string;
98
+ }
70
99
  export interface SubscriptionDeleteParams {
71
100
  namespace: string;
72
101
  }
73
102
  export declare namespace Subscriptions {
74
- export { type CreateSubscriptionRequest as CreateSubscriptionRequest, type CreateSubscriptionResponse as CreateSubscriptionResponse, type Subscription as Subscription, type SubscriptionList as SubscriptionList, type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
103
+ export { type CreateSubscriptionRequest as CreateSubscriptionRequest, type CreateSubscriptionResponse as CreateSubscriptionResponse, type Subscription as Subscription, type SubscriptionList as SubscriptionList, type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
75
104
  }
76
105
  //# sourceMappingURL=subscriptions.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.d.mts","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAO3F;;;OAGG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAO/E;;OAEG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAO1C;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAE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EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -5,15 +5,38 @@ export declare class Subscriptions extends APIResource {
5
5
  /**
6
6
  * Create a namespace-scoped subscription that receives events from every
7
7
  * connection in the namespace.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const createSubscriptionResponse =
12
+ * await client.subscriptions.create('namespace', {
13
+ * url: 'https://my-app.example.com/events',
14
+ * });
15
+ * ```
8
16
  */
9
- create(namespace: string, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
17
+ create(namespace: string, body: SubscriptionCreateParams, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
10
18
  /**
11
19
  * List namespace-scoped trigger subscriptions for all connections in the
12
20
  * namespace.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const subscriptionList = await client.subscriptions.list(
25
+ * 'namespace',
26
+ * );
27
+ * ```
13
28
  */
14
29
  list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList>;
15
30
  /**
16
31
  * Delete a namespace-scoped trigger subscription.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const subscription = await client.subscriptions.delete(
36
+ * 'subscriptionId',
37
+ * { namespace: 'namespace' },
38
+ * );
39
+ * ```
17
40
  */
18
41
  delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
19
42
  }
@@ -67,10 +90,16 @@ export type SubscriptionList = Array<Subscription>;
67
90
  export interface SubscriptionDeleteResponse {
68
91
  success: true;
69
92
  }
93
+ export interface SubscriptionCreateParams {
94
+ /**
95
+ * HTTPS webhook destination
96
+ */
97
+ url: string;
98
+ }
70
99
  export interface SubscriptionDeleteParams {
71
100
  namespace: string;
72
101
  }
73
102
  export declare namespace Subscriptions {
74
- export { type CreateSubscriptionRequest as CreateSubscriptionRequest, type CreateSubscriptionResponse as CreateSubscriptionResponse, type Subscription as Subscription, type SubscriptionList as SubscriptionList, type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
103
+ export { type CreateSubscriptionRequest as CreateSubscriptionRequest, type CreateSubscriptionResponse as CreateSubscriptionResponse, type Subscription as Subscription, type SubscriptionList as SubscriptionList, type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
75
104
  }
76
105
  //# sourceMappingURL=subscriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAO3F;;;OAGG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAO/E;;OAEG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAO1C;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,E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O1C;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;AAEnD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -8,9 +8,18 @@ class Subscriptions extends resource_1.APIResource {
8
8
  /**
9
9
  * Create a namespace-scoped subscription that receives events from every
10
10
  * connection in the namespace.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const createSubscriptionResponse =
15
+ * await client.subscriptions.create('namespace', {
16
+ * url: 'https://my-app.example.com/events',
17
+ * });
18
+ * ```
11
19
  */
12
- create(namespace, options) {
20
+ create(namespace, body, options) {
13
21
  return this._client.post((0, path_1.path) `/${namespace}/.subscriptions`, {
22
+ body,
14
23
  defaultBaseURL: 'https://smithery.run',
15
24
  ...options,
16
25
  });
@@ -18,6 +27,13 @@ class Subscriptions extends resource_1.APIResource {
18
27
  /**
19
28
  * List namespace-scoped trigger subscriptions for all connections in the
20
29
  * namespace.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const subscriptionList = await client.subscriptions.list(
34
+ * 'namespace',
35
+ * );
36
+ * ```
21
37
  */
22
38
  list(namespace, options) {
23
39
  return this._client.get((0, path_1.path) `/${namespace}/.subscriptions`, {
@@ -27,6 +43,14 @@ class Subscriptions extends resource_1.APIResource {
27
43
  }
28
44
  /**
29
45
  * Delete a namespace-scoped trigger subscription.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const subscription = await client.subscriptions.delete(
50
+ * 'subscriptionId',
51
+ * { namespace: 'namespace' },
52
+ * );
53
+ * ```
30
54
  */
31
55
  delete(subscriptionID, params, options) {
32
56
  const { namespace } = params;
@@ -1 +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,I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AO,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;AAjED,sCAiEC"}
@@ -5,9 +5,18 @@ export class Subscriptions extends APIResource {
5
5
  /**
6
6
  * Create a namespace-scoped subscription that receives events from every
7
7
  * connection in the namespace.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const createSubscriptionResponse =
12
+ * await client.subscriptions.create('namespace', {
13
+ * url: 'https://my-app.example.com/events',
14
+ * });
15
+ * ```
8
16
  */
9
- create(namespace, options) {
17
+ create(namespace, body, options) {
10
18
  return this._client.post(path `/${namespace}/.subscriptions`, {
19
+ body,
11
20
  defaultBaseURL: 'https://smithery.run',
12
21
  ...options,
13
22
  });
@@ -15,6 +24,13 @@ export class Subscriptions extends APIResource {
15
24
  /**
16
25
  * List namespace-scoped trigger subscriptions for all connections in the
17
26
  * namespace.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const subscriptionList = await client.subscriptions.list(
31
+ * 'namespace',
32
+ * );
33
+ * ```
18
34
  */
19
35
  list(namespace, options) {
20
36
  return this._client.get(path `/${namespace}/.subscriptions`, {
@@ -24,6 +40,14 @@ export class Subscriptions extends APIResource {
24
40
  }
25
41
  /**
26
42
  * Delete a namespace-scoped trigger subscription.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const subscription = await client.subscriptions.delete(
47
+ * 'subscriptionId',
48
+ * { namespace: 'namespace' },
49
+ * );
50
+ * ```
27
51
  */
28
52
  delete(subscriptionID, params, options) {
29
53
  const { namespace } = params;
@@ -1 +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,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I,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,IAAI,SAAS,iBAAiB,EAAE;YAC1D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;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
@@ -53,6 +53,7 @@ import {
53
53
  CreateSubscriptionRequest,
54
54
  CreateSubscriptionResponse,
55
55
  Subscription,
56
+ SubscriptionCreateParams,
56
57
  SubscriptionDeleteParams,
57
58
  SubscriptionDeleteResponse,
58
59
  SubscriptionList,
@@ -252,6 +253,18 @@ export class Smithery {
252
253
  this.fetch = options.fetch ?? Shims.getDefaultFetch();
253
254
  this.#encoder = Opts.FallbackEncoder;
254
255
 
256
+ const customHeadersEnv = readEnv('SMITHERY_CUSTOM_HEADERS');
257
+ if (customHeadersEnv) {
258
+ const parsed: Record<string, string> = {};
259
+ for (const line of customHeadersEnv.split('\n')) {
260
+ const colon = line.indexOf(':');
261
+ if (colon >= 0) {
262
+ parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
263
+ }
264
+ }
265
+ options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
266
+ }
267
+
255
268
  this._options = options;
256
269
 
257
270
  this.apiKey = apiKey;
@@ -931,6 +944,7 @@ export declare namespace Smithery {
931
944
  type Subscription as Subscription,
932
945
  type SubscriptionList as SubscriptionList,
933
946
  type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
947
+ type SubscriptionCreateParams as SubscriptionCreateParams,
934
948
  type SubscriptionDeleteParams as SubscriptionDeleteParams,
935
949
  };
936
950
 
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
40
40
  : T extends (...args: infer A) => unknown ? A
41
41
  : never;
42
42
 
43
- /* eslint-disable */
44
43
  /**
45
44
  * These imports attempt to get types from a parent package's dependencies.
46
45
  * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
63
62
  *
64
63
  * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
65
64
  */
66
- /** @ts-ignore For users with \@types/node */
65
+ /** @ts-ignore For users with \@types/node */ /* prettier-ignore */
67
66
  type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
68
- /** @ts-ignore For users with undici */
67
+ /** @ts-ignore For users with undici */ /* prettier-ignore */
69
68
  type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
70
- /** @ts-ignore For users with \@types/bun */
69
+ /** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
71
70
  type BunRequestInit = globalThis.FetchRequestInit;
72
- /** @ts-ignore For users with node-fetch@2 */
71
+ /** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
73
72
  type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
74
- /** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
73
+ /** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
75
74
  type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
76
- /** @ts-ignore For users who use Deno */
75
+ /** @ts-ignore For users who use Deno */ /* prettier-ignore */
77
76
  type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
78
- /* eslint-enable */
79
77
 
80
78
  type RequestInits =
81
79
  | NotAny<UndiciTypesRequestInit>
@@ -9,6 +9,17 @@ import {
9
9
  SubscriptionListParams,
10
10
  Subscriptions,
11
11
  } from './subscriptions';
12
+ import * as ToolsAPI from './tools';
13
+ import {
14
+ Tool,
15
+ ToolCallParams,
16
+ ToolCallResponse,
17
+ ToolGetParams,
18
+ ToolList,
19
+ ToolListParams,
20
+ ToolResponse,
21
+ Tools,
22
+ } from './tools';
12
23
  import * as TriggersAPI from './triggers';
13
24
  import {
14
25
  CreateTriggerRequest,
@@ -28,6 +39,7 @@ import { RequestOptions } from '../../internal/request-options';
28
39
  import { path } from '../../internal/utils/path';
29
40
 
30
41
  export class Connections extends APIResource {
42
+ tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
31
43
  subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
32
44
  triggers: TriggersAPI.Triggers = new TriggersAPI.Triggers(this._client);
33
45
 
@@ -539,6 +551,7 @@ export namespace ConnectionSetParams {
539
551
  }
540
552
  }
541
553
 
554
+ Connections.Tools = Tools;
542
555
  Connections.Subscriptions = Subscriptions;
543
556
  Connections.Triggers = Triggers;
544
557
 
@@ -555,6 +568,17 @@ export declare namespace Connections {
555
568
  type ConnectionSetParams as ConnectionSetParams,
556
569
  };
557
570
 
571
+ export {
572
+ Tools as Tools,
573
+ type Tool as Tool,
574
+ type ToolList as ToolList,
575
+ type ToolResponse as ToolResponse,
576
+ type ToolCallResponse as ToolCallResponse,
577
+ type ToolListParams as ToolListParams,
578
+ type ToolCallParams as ToolCallParams,
579
+ type ToolGetParams as ToolGetParams,
580
+ };
581
+
558
582
  export {
559
583
  Subscriptions as Subscriptions,
560
584
  type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
@@ -19,6 +19,16 @@ export {
19
19
  type SubscriptionListParams,
20
20
  type SubscriptionDeleteParams,
21
21
  } from './subscriptions';
22
+ export {
23
+ Tools,
24
+ type Tool,
25
+ type ToolList,
26
+ type ToolResponse,
27
+ type ToolCallResponse,
28
+ type ToolListParams,
29
+ type ToolCallParams,
30
+ type ToolGetParams,
31
+ } from './tools';
22
32
  export {
23
33
  Triggers,
24
34
  type CreateTriggerRequest,
@@ -16,7 +16,10 @@ export class Subscriptions extends APIResource {
16
16
  * const createSubscriptionResponse =
17
17
  * await client.connections.subscriptions.create(
18
18
  * 'connectionId',
19
- * { namespace: 'namespace' },
19
+ * {
20
+ * namespace: 'namespace',
21
+ * url: 'https://my-app.example.com/events',
22
+ * },
20
23
  * );
21
24
  * ```
22
25
  */
@@ -25,8 +28,9 @@ export class Subscriptions extends APIResource {
25
28
  params: SubscriptionCreateParams,
26
29
  options?: RequestOptions,
27
30
  ): APIPromise<SubscriptionsAPI.CreateSubscriptionResponse> {
28
- const { namespace } = params;
31
+ const { namespace, ...body } = params;
29
32
  return this._client.post(path`/${namespace}/${connectionID}/.subscriptions`, {
33
+ body,
30
34
  defaultBaseURL: 'https://smithery.run',
31
35
  ...options,
32
36
  });
@@ -89,7 +93,15 @@ export interface SubscriptionDeleteResponse {
89
93
  }
90
94
 
91
95
  export interface SubscriptionCreateParams {
96
+ /**
97
+ * Path param
98
+ */
92
99
  namespace: string;
100
+
101
+ /**
102
+ * Body param: HTTPS webhook destination
103
+ */
104
+ url: string;
93
105
  }
94
106
 
95
107
  export interface SubscriptionListParams {
@@ -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 {