@smithery/api 0.64.1 → 0.64.2

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 (70) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +0 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +0 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +0 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/connections/connections.d.mts +2 -6
  12. package/resources/connections/connections.d.mts.map +1 -1
  13. package/resources/connections/connections.d.ts +2 -6
  14. package/resources/connections/connections.d.ts.map +1 -1
  15. package/resources/connections/connections.js +0 -4
  16. package/resources/connections/connections.js.map +1 -1
  17. package/resources/connections/connections.mjs +0 -4
  18. package/resources/connections/connections.mjs.map +1 -1
  19. package/resources/connections/index.d.mts +1 -2
  20. package/resources/connections/index.d.mts.map +1 -1
  21. package/resources/connections/index.d.ts +1 -2
  22. package/resources/connections/index.d.ts.map +1 -1
  23. package/resources/connections/index.js +1 -3
  24. package/resources/connections/index.js.map +1 -1
  25. package/resources/connections/index.mjs +0 -1
  26. package/resources/connections/index.mjs.map +1 -1
  27. package/resources/connections/triggers.d.mts +92 -65
  28. package/resources/connections/triggers.d.mts.map +1 -1
  29. package/resources/connections/triggers.d.ts +92 -65
  30. package/resources/connections/triggers.d.ts.map +1 -1
  31. package/resources/connections/triggers.js +40 -48
  32. package/resources/connections/triggers.js.map +1 -1
  33. package/resources/connections/triggers.mjs +40 -48
  34. package/resources/connections/triggers.mjs.map +1 -1
  35. package/resources/index.d.mts +0 -1
  36. package/resources/index.d.mts.map +1 -1
  37. package/resources/index.d.ts +0 -1
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +1 -3
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +0 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/src/client.ts +0 -23
  44. package/src/resources/connections/connections.ts +14 -28
  45. package/src/resources/connections/index.ts +7 -12
  46. package/src/resources/connections/triggers.ts +117 -98
  47. package/src/resources/index.ts +0 -10
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
  53. package/resources/connections/subscriptions.d.mts +0 -83
  54. package/resources/connections/subscriptions.d.mts.map +0 -1
  55. package/resources/connections/subscriptions.d.ts +0 -83
  56. package/resources/connections/subscriptions.d.ts.map +0 -1
  57. package/resources/connections/subscriptions.js +0 -77
  58. package/resources/connections/subscriptions.js.map +0 -1
  59. package/resources/connections/subscriptions.mjs +0 -73
  60. package/resources/connections/subscriptions.mjs.map +0 -1
  61. package/resources/subscriptions.d.mts +0 -113
  62. package/resources/subscriptions.d.mts.map +0 -1
  63. package/resources/subscriptions.d.ts +0 -113
  64. package/resources/subscriptions.d.ts.map +0 -1
  65. package/resources/subscriptions.js +0 -68
  66. package/resources/subscriptions.js.map +0 -1
  67. package/resources/subscriptions.mjs +0 -64
  68. package/resources/subscriptions.mjs.map +0 -1
  69. package/src/resources/connections/subscriptions.ts +0 -132
  70. package/src/resources/subscriptions.ts +0 -167
@@ -6,32 +6,6 @@ import { RequestOptions } from '../../internal/request-options';
6
6
  import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Triggers extends APIResource {
9
- /**
10
- * Create a trigger instance for a connection using the trigger's declared params.
11
- *
12
- * @example
13
- * ```ts
14
- * const triggerInstance =
15
- * await client.connections.triggers.create('triggerName', {
16
- * namespace: 'namespace',
17
- * connectionId: 'connectionId',
18
- * params: { foo: 'bar' },
19
- * });
20
- * ```
21
- */
22
- create(
23
- triggerName: string,
24
- params: TriggerCreateParams,
25
- options?: RequestOptions,
26
- ): APIPromise<TriggerInstance> {
27
- const { namespace, connectionId, ...body } = params;
28
- return this._client.post(path`/${namespace}/${connectionId}/.triggers/${triggerName}`, {
29
- body,
30
- defaultBaseURL: 'https://smithery.run',
31
- ...options,
32
- });
33
- }
34
-
35
9
  /**
36
10
  * List trigger types exposed by a connection.
37
11
  *
@@ -56,79 +30,92 @@ export class Triggers extends APIResource {
56
30
  }
57
31
 
58
32
  /**
59
- * Delete a trigger instance and deregister its upstream webhook.
33
+ * Get the schema for a single trigger type.
60
34
  *
61
35
  * @example
62
36
  * ```ts
63
- * const trigger = await client.connections.triggers.delete(
64
- * 'triggerId',
65
- * {
37
+ * const triggerDefinition =
38
+ * await client.connections.triggers.get('triggerName', {
66
39
  * namespace: 'namespace',
67
40
  * connectionId: 'connectionId',
68
- * triggerName: 'triggerName',
69
- * },
70
- * );
41
+ * });
71
42
  * ```
72
43
  */
73
- delete(
74
- triggerID: string,
75
- params: TriggerDeleteParams,
44
+ get(
45
+ triggerName: string,
46
+ params: TriggerGetParams,
76
47
  options?: RequestOptions,
77
- ): APIPromise<TriggerDeleteResponse> {
78
- const { namespace, connectionId, triggerName } = params;
79
- return this._client.delete(path`/${namespace}/${connectionId}/.triggers/${triggerName}/${triggerID}`, {
48
+ ): APIPromise<TriggerDefinition> {
49
+ const { namespace, connectionId } = params;
50
+ return this._client.get(path`/${namespace}/${connectionId}/.triggers/${triggerName}`, {
80
51
  defaultBaseURL: 'https://smithery.run',
81
52
  ...options,
82
53
  });
83
54
  }
84
55
 
85
56
  /**
86
- * Get the schema for a single trigger type.
57
+ * Subscribe to (or refresh) a trigger. Supplying the same (params, delivery.url)
58
+ * refreshes the TTL and may rotate the secret.
87
59
  *
88
60
  * @example
89
61
  * ```ts
90
- * const triggerDefinition =
91
- * await client.connections.triggers.get('triggerName', {
92
- * namespace: 'namespace',
93
- * connectionId: 'connectionId',
94
- * });
62
+ * const triggerSubscription =
63
+ * await client.connections.triggers.subscribe(
64
+ * 'triggerName',
65
+ * {
66
+ * namespace: 'namespace',
67
+ * connectionId: 'connectionId',
68
+ * delivery: {
69
+ * secret:
70
+ * 'whsec_dGVzdF9zZWNyZXRfMjRfYnl0ZXNfbWluaW11bSE=',
71
+ * url: 'https://my-app.example.com/events',
72
+ * },
73
+ * params: { foo: 'bar' },
74
+ * },
75
+ * );
95
76
  * ```
96
77
  */
97
- get(
78
+ subscribe(
98
79
  triggerName: string,
99
- params: TriggerGetParams,
80
+ params: TriggerSubscribeParams,
100
81
  options?: RequestOptions,
101
- ): APIPromise<TriggerDefinition> {
102
- const { namespace, connectionId } = params;
103
- return this._client.get(path`/${namespace}/${connectionId}/.triggers/${triggerName}`, {
82
+ ): APIPromise<TriggerSubscription> {
83
+ const { namespace, connectionId, ...body } = params;
84
+ return this._client.post(path`/${namespace}/${connectionId}/.triggers/${triggerName}`, {
85
+ body,
104
86
  defaultBaseURL: 'https://smithery.run',
105
87
  ...options,
106
88
  });
107
89
  }
108
90
 
109
91
  /**
110
- * Get a specific trigger instance for a connection.
92
+ * Unsubscribe by subscription key (params + delivery.url). Eager teardown —
93
+ * subscriptions also expire naturally on TTL.
111
94
  *
112
95
  * @example
113
96
  * ```ts
114
- * const triggerInstance =
115
- * await client.connections.triggers.getInstance(
116
- * 'triggerId',
97
+ * const response =
98
+ * await client.connections.triggers.unsubscribe(
99
+ * 'triggerName',
117
100
  * {
118
101
  * namespace: 'namespace',
119
102
  * connectionId: 'connectionId',
120
- * triggerName: 'triggerName',
103
+ * delivery: {
104
+ * url: 'https://my-app.example.com/events',
105
+ * },
106
+ * params: { foo: 'bar' },
121
107
  * },
122
108
  * );
123
109
  * ```
124
110
  */
125
- getInstance(
126
- triggerID: string,
127
- params: TriggerGetInstanceParams,
111
+ unsubscribe(
112
+ triggerName: string,
113
+ params: TriggerUnsubscribeParams,
128
114
  options?: RequestOptions,
129
- ): APIPromise<TriggerInstance> {
130
- const { namespace, connectionId, triggerName } = params;
131
- return this._client.get(path`/${namespace}/${connectionId}/.triggers/${triggerName}/${triggerID}`, {
115
+ ): APIPromise<TriggerUnsubscribeResponse> {
116
+ const { namespace, connectionId, ...body } = params;
117
+ return this._client.delete(path`/${namespace}/${connectionId}/.triggers/${triggerName}`, {
118
+ body,
132
119
  defaultBaseURL: 'https://smithery.run',
133
120
  ...options,
134
121
  });
@@ -136,12 +123,23 @@ export class Triggers extends APIResource {
136
123
  }
137
124
 
138
125
  export interface CreateTriggerRequest {
126
+ delivery: TriggerDelivery;
127
+
139
128
  /**
140
129
  * Trigger-specific parameters defined by the trigger inputSchema
141
130
  */
142
131
  params: { [key: string]: unknown };
143
132
  }
144
133
 
134
+ export interface DeleteTriggerRequest {
135
+ delivery: UnsubscribeDelivery;
136
+
137
+ /**
138
+ * The same params used at subscribe time. Forms part of the subscription key.
139
+ */
140
+ params: { [key: string]: unknown };
141
+ }
142
+
145
143
  export interface TriggerDefinition {
146
144
  /**
147
145
  * Supported delivery modes
@@ -168,38 +166,55 @@ export interface TriggerDefinition {
168
166
 
169
167
  export type TriggerDefinitionList = Array<TriggerDefinition>;
170
168
 
171
- export interface TriggerInstance {
169
+ export interface TriggerDelivery {
172
170
  /**
173
- * Stable trigger instance id generated by Smithery
171
+ * Standard Webhooks signing secret (whsec\_<base64 of 24-64 random bytes>). The
172
+ * upstream MCP server signs each delivery with this.
174
173
  */
175
- id: string;
174
+ secret: string;
176
175
 
177
176
  /**
178
- * Connection id the trigger belongs to
177
+ * HTTPS webhook destination where the upstream MCP server delivers events.
179
178
  */
180
- connection_id: string;
179
+ url: string;
180
+ }
181
181
 
182
+ export interface TriggerSubscription {
182
183
  /**
183
- * ISO 8601 timestamp
184
+ * Stable subscription id derived from (namespace, connection, name, params,
185
+ * delivery.url). Used by the receiver to route via X-MCP-Subscription-Id.
184
186
  */
185
- created_at: string;
187
+ id: string;
186
188
 
187
189
  /**
188
- * Trigger name
190
+ * ISO 8601 timestamp at which the subscription expires unless refreshed.
189
191
  */
190
- name: string;
192
+ refreshBefore: string;
193
+ }
191
194
 
195
+ export interface UnsubscribeDelivery {
192
196
  /**
193
- * Trigger instance parameters
197
+ * The delivery URL of the subscription to remove. Together with name+params it
198
+ * forms the subscription key.
194
199
  */
195
- params: { [key: string]: unknown };
200
+ url: string;
196
201
  }
197
202
 
198
- export interface TriggerDeleteResponse {
203
+ export interface TriggerUnsubscribeResponse {
199
204
  success: true;
200
205
  }
201
206
 
202
- export interface TriggerCreateParams {
207
+ export interface TriggerListParams {
208
+ namespace: string;
209
+ }
210
+
211
+ export interface TriggerGetParams {
212
+ namespace: string;
213
+
214
+ connectionId: string;
215
+ }
216
+
217
+ export interface TriggerSubscribeParams {
203
218
  /**
204
219
  * Path param
205
220
  */
@@ -210,49 +225,53 @@ export interface TriggerCreateParams {
210
225
  */
211
226
  connectionId: string;
212
227
 
228
+ /**
229
+ * Body param
230
+ */
231
+ delivery: TriggerDelivery;
232
+
213
233
  /**
214
234
  * Body param: Trigger-specific parameters defined by the trigger inputSchema
215
235
  */
216
236
  params: { [key: string]: unknown };
217
237
  }
218
238
 
219
- export interface TriggerListParams {
220
- namespace: string;
221
- }
222
-
223
- export interface TriggerDeleteParams {
224
- namespace: string;
225
-
226
- connectionId: string;
227
-
228
- triggerName: string;
229
- }
230
-
231
- export interface TriggerGetParams {
239
+ export interface TriggerUnsubscribeParams {
240
+ /**
241
+ * Path param
242
+ */
232
243
  namespace: string;
233
244
 
245
+ /**
246
+ * Path param
247
+ */
234
248
  connectionId: string;
235
- }
236
-
237
- export interface TriggerGetInstanceParams {
238
- namespace: string;
239
249
 
240
- connectionId: string;
250
+ /**
251
+ * Body param
252
+ */
253
+ delivery: UnsubscribeDelivery;
241
254
 
242
- triggerName: string;
255
+ /**
256
+ * Body param: The same params used at subscribe time. Forms part of the
257
+ * subscription key.
258
+ */
259
+ params: { [key: string]: unknown };
243
260
  }
244
261
 
245
262
  export declare namespace Triggers {
246
263
  export {
247
264
  type CreateTriggerRequest as CreateTriggerRequest,
265
+ type DeleteTriggerRequest as DeleteTriggerRequest,
248
266
  type TriggerDefinition as TriggerDefinition,
249
267
  type TriggerDefinitionList as TriggerDefinitionList,
250
- type TriggerInstance as TriggerInstance,
251
- type TriggerDeleteResponse as TriggerDeleteResponse,
252
- type TriggerCreateParams as TriggerCreateParams,
268
+ type TriggerDelivery as TriggerDelivery,
269
+ type TriggerSubscription as TriggerSubscription,
270
+ type UnsubscribeDelivery as UnsubscribeDelivery,
271
+ type TriggerUnsubscribeResponse as TriggerUnsubscribeResponse,
253
272
  type TriggerListParams as TriggerListParams,
254
- type TriggerDeleteParams as TriggerDeleteParams,
255
273
  type TriggerGetParams as TriggerGetParams,
256
- type TriggerGetInstanceParams as TriggerGetInstanceParams,
274
+ type TriggerSubscribeParams as TriggerSubscribeParams,
275
+ type TriggerUnsubscribeParams as TriggerUnsubscribeParams,
257
276
  };
258
277
  }
@@ -57,16 +57,6 @@ export {
57
57
  type SkillUploadParams,
58
58
  type SkillListResponsesSkillsPage,
59
59
  } from './skills';
60
- export {
61
- Subscriptions,
62
- type CreateSubscriptionRequest,
63
- type CreateSubscriptionResponse,
64
- type Subscription,
65
- type SubscriptionList,
66
- type SubscriptionDeleteResponse,
67
- type SubscriptionCreateParams,
68
- type SubscriptionDeleteParams,
69
- } from './subscriptions';
70
60
  export {
71
61
  Tokens,
72
62
  type Constraint,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.64.1'; // x-release-please-version
1
+ export const VERSION = '0.64.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.64.1";
1
+ export declare const VERSION = "0.64.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.64.1";
1
+ export declare const VERSION = "0.64.2";
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.64.1'; // x-release-please-version
4
+ exports.VERSION = '0.64.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.64.1'; // x-release-please-version
1
+ export const VERSION = '0.64.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,83 +0,0 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import * as SubscriptionsAPI from "../subscriptions.mjs";
3
- import { APIPromise } from "../../core/api-promise.mjs";
4
- import { RequestOptions } from "../../internal/request-options.mjs";
5
- export declare class Subscriptions extends APIResource {
6
- /**
7
- * Create a connection-scoped subscription that receives events from one
8
- * connection.
9
- *
10
- * @example
11
- * ```ts
12
- * const subscription =
13
- * await client.connections.subscriptions.create(
14
- * 'connectionId',
15
- * {
16
- * namespace: 'namespace',
17
- * secret:
18
- * 'whsec_dGVzdF9zZWNyZXRfMjRfYnl0ZXNfbWluaW11bSE=',
19
- * url: 'https://my-app.example.com/events',
20
- * },
21
- * );
22
- * ```
23
- */
24
- create(connectionID: string, params: SubscriptionCreateParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.Subscription>;
25
- /**
26
- * List trigger subscriptions scoped to a single connection.
27
- *
28
- * @example
29
- * ```ts
30
- * const subscriptionList =
31
- * await client.connections.subscriptions.list(
32
- * 'connectionId',
33
- * { namespace: 'namespace' },
34
- * );
35
- * ```
36
- */
37
- list(connectionID: string, params: SubscriptionListParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.SubscriptionList>;
38
- /**
39
- * Delete a connection-scoped trigger subscription.
40
- *
41
- * @example
42
- * ```ts
43
- * const subscription =
44
- * await client.connections.subscriptions.delete(
45
- * 'subscriptionId',
46
- * {
47
- * namespace: 'namespace',
48
- * connectionId: 'connectionId',
49
- * },
50
- * );
51
- * ```
52
- */
53
- delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
54
- }
55
- export interface SubscriptionDeleteResponse {
56
- success: true;
57
- }
58
- export interface SubscriptionCreateParams {
59
- /**
60
- * Path param
61
- */
62
- namespace: string;
63
- /**
64
- * Body param: Standard Webhooks signing secret generated and stored by the
65
- * receiver
66
- */
67
- secret: string;
68
- /**
69
- * Body param: HTTPS webhook destination
70
- */
71
- url: string;
72
- }
73
- export interface SubscriptionListParams {
74
- namespace: string;
75
- }
76
- export interface SubscriptionDeleteParams {
77
- namespace: string;
78
- connectionId: string;
79
- }
80
- export declare namespace Subscriptions {
81
- export { type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
82
- }
83
- //# sourceMappingURL=subscriptions.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscriptions.d.mts","sourceRoot":"","sources":["../../src/resources/connections/subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAS5C;;;;;;;;;;;OAWG;IACH,IAAI,CACF,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,gBAAgB,CAAC;IAQhD;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAO1C;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -1,83 +0,0 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import * as SubscriptionsAPI from "../subscriptions.js";
3
- import { APIPromise } from "../../core/api-promise.js";
4
- import { RequestOptions } from "../../internal/request-options.js";
5
- export declare class Subscriptions extends APIResource {
6
- /**
7
- * Create a connection-scoped subscription that receives events from one
8
- * connection.
9
- *
10
- * @example
11
- * ```ts
12
- * const subscription =
13
- * await client.connections.subscriptions.create(
14
- * 'connectionId',
15
- * {
16
- * namespace: 'namespace',
17
- * secret:
18
- * 'whsec_dGVzdF9zZWNyZXRfMjRfYnl0ZXNfbWluaW11bSE=',
19
- * url: 'https://my-app.example.com/events',
20
- * },
21
- * );
22
- * ```
23
- */
24
- create(connectionID: string, params: SubscriptionCreateParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.Subscription>;
25
- /**
26
- * List trigger subscriptions scoped to a single connection.
27
- *
28
- * @example
29
- * ```ts
30
- * const subscriptionList =
31
- * await client.connections.subscriptions.list(
32
- * 'connectionId',
33
- * { namespace: 'namespace' },
34
- * );
35
- * ```
36
- */
37
- list(connectionID: string, params: SubscriptionListParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.SubscriptionList>;
38
- /**
39
- * Delete a connection-scoped trigger subscription.
40
- *
41
- * @example
42
- * ```ts
43
- * const subscription =
44
- * await client.connections.subscriptions.delete(
45
- * 'subscriptionId',
46
- * {
47
- * namespace: 'namespace',
48
- * connectionId: 'connectionId',
49
- * },
50
- * );
51
- * ```
52
- */
53
- delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
54
- }
55
- export interface SubscriptionDeleteResponse {
56
- success: true;
57
- }
58
- export interface SubscriptionCreateParams {
59
- /**
60
- * Path param
61
- */
62
- namespace: string;
63
- /**
64
- * Body param: Standard Webhooks signing secret generated and stored by the
65
- * receiver
66
- */
67
- secret: string;
68
- /**
69
- * Body param: HTTPS webhook destination
70
- */
71
- url: string;
72
- }
73
- export interface SubscriptionListParams {
74
- namespace: string;
75
- }
76
- export interface SubscriptionDeleteParams {
77
- namespace: string;
78
- connectionId: string;
79
- }
80
- export declare namespace Subscriptions {
81
- export { type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
82
- }
83
- //# sourceMappingURL=subscriptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/resources/connections/subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAS5C;;;;;;;;;;;OAWG;IACH,IAAI,CACF,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,gBAAgB,CAAC;IAQhD;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAO1C;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -1,77 +0,0 @@
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 connection-scoped subscription that receives events from one
10
- * connection.
11
- *
12
- * @example
13
- * ```ts
14
- * const subscription =
15
- * await client.connections.subscriptions.create(
16
- * 'connectionId',
17
- * {
18
- * namespace: 'namespace',
19
- * secret:
20
- * 'whsec_dGVzdF9zZWNyZXRfMjRfYnl0ZXNfbWluaW11bSE=',
21
- * url: 'https://my-app.example.com/events',
22
- * },
23
- * );
24
- * ```
25
- */
26
- create(connectionID, params, options) {
27
- const { namespace, ...body } = params;
28
- return this._client.post((0, path_1.path) `/${namespace}/${connectionID}/.subscriptions`, {
29
- body,
30
- defaultBaseURL: 'https://smithery.run',
31
- ...options,
32
- });
33
- }
34
- /**
35
- * List trigger subscriptions scoped to a single connection.
36
- *
37
- * @example
38
- * ```ts
39
- * const subscriptionList =
40
- * await client.connections.subscriptions.list(
41
- * 'connectionId',
42
- * { namespace: 'namespace' },
43
- * );
44
- * ```
45
- */
46
- list(connectionID, params, options) {
47
- const { namespace } = params;
48
- return this._client.get((0, path_1.path) `/${namespace}/${connectionID}/.subscriptions`, {
49
- defaultBaseURL: 'https://smithery.run',
50
- ...options,
51
- });
52
- }
53
- /**
54
- * Delete a connection-scoped trigger subscription.
55
- *
56
- * @example
57
- * ```ts
58
- * const subscription =
59
- * await client.connections.subscriptions.delete(
60
- * 'subscriptionId',
61
- * {
62
- * namespace: 'namespace',
63
- * connectionId: 'connectionId',
64
- * },
65
- * );
66
- * ```
67
- */
68
- delete(subscriptionID, params, options) {
69
- const { namespace, connectionId } = params;
70
- return this._client.delete((0, path_1.path) `/${namespace}/${connectionId}/.subscriptions/${subscriptionID}`, {
71
- defaultBaseURL: 'https://smithery.run',
72
- ...options,
73
- });
74
- }
75
- }
76
- exports.Subscriptions = Subscriptions;
77
- //# sourceMappingURL=subscriptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/resources/connections/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,YAAoB,EACpB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,IAAI,YAAY,iBAAiB,EAAE;YAC3E,IAAI;YACJ,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,YAAoB,EACpB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,IAAI,YAAY,iBAAiB,EAAE;YAC1E,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAsB,EACtB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,IAAI,YAAY,mBAAmB,cAAc,EAAE,EAAE;YAC/F,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAlFD,sCAkFC"}