@smithery/api 0.64.0 → 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.
- package/CHANGELOG.md +17 -0
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/connections/connections.d.mts +2 -6
- package/resources/connections/connections.d.mts.map +1 -1
- package/resources/connections/connections.d.ts +2 -6
- package/resources/connections/connections.d.ts.map +1 -1
- package/resources/connections/connections.js +0 -4
- package/resources/connections/connections.js.map +1 -1
- package/resources/connections/connections.mjs +0 -4
- package/resources/connections/connections.mjs.map +1 -1
- package/resources/connections/index.d.mts +1 -2
- package/resources/connections/index.d.mts.map +1 -1
- package/resources/connections/index.d.ts +1 -2
- package/resources/connections/index.d.ts.map +1 -1
- package/resources/connections/index.js +1 -3
- package/resources/connections/index.js.map +1 -1
- package/resources/connections/index.mjs +0 -1
- package/resources/connections/index.mjs.map +1 -1
- package/resources/connections/triggers.d.mts +92 -65
- package/resources/connections/triggers.d.mts.map +1 -1
- package/resources/connections/triggers.d.ts +92 -65
- package/resources/connections/triggers.d.ts.map +1 -1
- package/resources/connections/triggers.js +40 -48
- package/resources/connections/triggers.js.map +1 -1
- package/resources/connections/triggers.mjs +40 -48
- package/resources/connections/triggers.mjs.map +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/organizations/api-keys.d.mts +8 -1
- package/resources/organizations/api-keys.d.mts.map +1 -1
- package/resources/organizations/api-keys.d.ts +8 -1
- package/resources/organizations/api-keys.d.ts.map +1 -1
- package/src/client.ts +0 -23
- package/src/resources/connections/connections.ts +14 -28
- package/src/resources/connections/index.ts +7 -12
- package/src/resources/connections/triggers.ts +117 -98
- package/src/resources/index.ts +0 -10
- package/src/resources/organizations/api-keys.ts +11 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/connections/subscriptions.d.mts +0 -76
- package/resources/connections/subscriptions.d.mts.map +0 -1
- package/resources/connections/subscriptions.d.ts +0 -76
- package/resources/connections/subscriptions.d.ts.map +0 -1
- package/resources/connections/subscriptions.js +0 -75
- package/resources/connections/subscriptions.js.map +0 -1
- package/resources/connections/subscriptions.mjs +0 -71
- package/resources/connections/subscriptions.mjs.map +0 -1
- package/resources/subscriptions.d.mts +0 -105
- package/resources/subscriptions.d.mts.map +0 -1
- package/resources/subscriptions.d.ts +0 -105
- package/resources/subscriptions.d.ts.map +0 -1
- package/resources/subscriptions.js +0 -64
- package/resources/subscriptions.js.map +0 -1
- package/resources/subscriptions.mjs +0 -60
- package/resources/subscriptions.mjs.map +0 -1
- package/src/resources/connections/subscriptions.ts +0 -124
- package/src/resources/subscriptions.ts +0 -158
|
@@ -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
|
-
*
|
|
33
|
+
* Get the schema for a single trigger type.
|
|
60
34
|
*
|
|
61
35
|
* @example
|
|
62
36
|
* ```ts
|
|
63
|
-
* const
|
|
64
|
-
* '
|
|
65
|
-
* {
|
|
37
|
+
* const triggerDefinition =
|
|
38
|
+
* await client.connections.triggers.get('triggerName', {
|
|
66
39
|
* namespace: 'namespace',
|
|
67
40
|
* connectionId: 'connectionId',
|
|
68
|
-
*
|
|
69
|
-
* },
|
|
70
|
-
* );
|
|
41
|
+
* });
|
|
71
42
|
* ```
|
|
72
43
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
params:
|
|
44
|
+
get(
|
|
45
|
+
triggerName: string,
|
|
46
|
+
params: TriggerGetParams,
|
|
76
47
|
options?: RequestOptions,
|
|
77
|
-
): APIPromise<
|
|
78
|
-
const { namespace, connectionId
|
|
79
|
-
return this._client.
|
|
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
|
-
*
|
|
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
|
|
91
|
-
* await client.connections.triggers.
|
|
92
|
-
*
|
|
93
|
-
*
|
|
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
|
-
|
|
78
|
+
subscribe(
|
|
98
79
|
triggerName: string,
|
|
99
|
-
params:
|
|
80
|
+
params: TriggerSubscribeParams,
|
|
100
81
|
options?: RequestOptions,
|
|
101
|
-
): APIPromise<
|
|
102
|
-
const { namespace, connectionId } = params;
|
|
103
|
-
return this._client.
|
|
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
|
-
*
|
|
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
|
|
115
|
-
* await client.connections.triggers.
|
|
116
|
-
* '
|
|
97
|
+
* const response =
|
|
98
|
+
* await client.connections.triggers.unsubscribe(
|
|
99
|
+
* 'triggerName',
|
|
117
100
|
* {
|
|
118
101
|
* namespace: 'namespace',
|
|
119
102
|
* connectionId: 'connectionId',
|
|
120
|
-
*
|
|
103
|
+
* delivery: {
|
|
104
|
+
* url: 'https://my-app.example.com/events',
|
|
105
|
+
* },
|
|
106
|
+
* params: { foo: 'bar' },
|
|
121
107
|
* },
|
|
122
108
|
* );
|
|
123
109
|
* ```
|
|
124
110
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
params:
|
|
111
|
+
unsubscribe(
|
|
112
|
+
triggerName: string,
|
|
113
|
+
params: TriggerUnsubscribeParams,
|
|
128
114
|
options?: RequestOptions,
|
|
129
|
-
): APIPromise<
|
|
130
|
-
const { namespace, connectionId,
|
|
131
|
-
return this._client.
|
|
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
|
|
169
|
+
export interface TriggerDelivery {
|
|
172
170
|
/**
|
|
173
|
-
*
|
|
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
|
-
|
|
174
|
+
secret: string;
|
|
176
175
|
|
|
177
176
|
/**
|
|
178
|
-
*
|
|
177
|
+
* HTTPS webhook destination where the upstream MCP server delivers events.
|
|
179
178
|
*/
|
|
180
|
-
|
|
179
|
+
url: string;
|
|
180
|
+
}
|
|
181
181
|
|
|
182
|
+
export interface TriggerSubscription {
|
|
182
183
|
/**
|
|
183
|
-
*
|
|
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
|
-
|
|
187
|
+
id: string;
|
|
186
188
|
|
|
187
189
|
/**
|
|
188
|
-
*
|
|
190
|
+
* ISO 8601 timestamp at which the subscription expires unless refreshed.
|
|
189
191
|
*/
|
|
190
|
-
|
|
192
|
+
refreshBefore: string;
|
|
193
|
+
}
|
|
191
194
|
|
|
195
|
+
export interface UnsubscribeDelivery {
|
|
192
196
|
/**
|
|
193
|
-
*
|
|
197
|
+
* The delivery URL of the subscription to remove. Together with name+params it
|
|
198
|
+
* forms the subscription key.
|
|
194
199
|
*/
|
|
195
|
-
|
|
200
|
+
url: string;
|
|
196
201
|
}
|
|
197
202
|
|
|
198
|
-
export interface
|
|
203
|
+
export interface TriggerUnsubscribeResponse {
|
|
199
204
|
success: true;
|
|
200
205
|
}
|
|
201
206
|
|
|
202
|
-
export interface
|
|
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
|
|
220
|
-
|
|
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
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Body param
|
|
252
|
+
*/
|
|
253
|
+
delivery: UnsubscribeDelivery;
|
|
241
254
|
|
|
242
|
-
|
|
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
|
|
251
|
-
type
|
|
252
|
-
type
|
|
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
|
|
274
|
+
type TriggerSubscribeParams as TriggerSubscribeParams,
|
|
275
|
+
type TriggerUnsubscribeParams as TriggerUnsubscribeParams,
|
|
257
276
|
};
|
|
258
277
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -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,
|
|
@@ -49,7 +49,17 @@ export interface APIKeyCreateResponse {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export interface APIKeyListResponse {
|
|
52
|
-
apiKeys: Array<
|
|
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 {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.64.
|
|
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
|
+
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
|
+
export declare const VERSION = "0.64.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.64.
|
|
1
|
+
export const VERSION = '0.64.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,76 +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 createSubscriptionResponse =
|
|
13
|
-
* await client.connections.subscriptions.create(
|
|
14
|
-
* 'connectionId',
|
|
15
|
-
* {
|
|
16
|
-
* namespace: 'namespace',
|
|
17
|
-
* url: 'https://my-app.example.com/events',
|
|
18
|
-
* },
|
|
19
|
-
* );
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(connectionID: string, params: SubscriptionCreateParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.CreateSubscriptionResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* List trigger subscriptions scoped to a single connection.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const subscriptionList =
|
|
29
|
-
* await client.connections.subscriptions.list(
|
|
30
|
-
* 'connectionId',
|
|
31
|
-
* { namespace: 'namespace' },
|
|
32
|
-
* );
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
list(connectionID: string, params: SubscriptionListParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.SubscriptionList>;
|
|
36
|
-
/**
|
|
37
|
-
* Delete a connection-scoped trigger subscription.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const subscription =
|
|
42
|
-
* await client.connections.subscriptions.delete(
|
|
43
|
-
* 'subscriptionId',
|
|
44
|
-
* {
|
|
45
|
-
* namespace: 'namespace',
|
|
46
|
-
* connectionId: 'connectionId',
|
|
47
|
-
* },
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
|
|
52
|
-
}
|
|
53
|
-
export interface SubscriptionDeleteResponse {
|
|
54
|
-
success: true;
|
|
55
|
-
}
|
|
56
|
-
export interface SubscriptionCreateParams {
|
|
57
|
-
/**
|
|
58
|
-
* Path param
|
|
59
|
-
*/
|
|
60
|
-
namespace: string;
|
|
61
|
-
/**
|
|
62
|
-
* Body param: HTTPS webhook destination
|
|
63
|
-
*/
|
|
64
|
-
url: string;
|
|
65
|
-
}
|
|
66
|
-
export interface SubscriptionListParams {
|
|
67
|
-
namespace: string;
|
|
68
|
-
}
|
|
69
|
-
export interface SubscriptionDeleteParams {
|
|
70
|
-
namespace: string;
|
|
71
|
-
connectionId: string;
|
|
72
|
-
}
|
|
73
|
-
export declare namespace Subscriptions {
|
|
74
|
-
export { type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
|
|
75
|
-
}
|
|
76
|
-
//# 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;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,0BAA0B,CAAC;IAS1D;;;;;;;;;;;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;;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,76 +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 createSubscriptionResponse =
|
|
13
|
-
* await client.connections.subscriptions.create(
|
|
14
|
-
* 'connectionId',
|
|
15
|
-
* {
|
|
16
|
-
* namespace: 'namespace',
|
|
17
|
-
* url: 'https://my-app.example.com/events',
|
|
18
|
-
* },
|
|
19
|
-
* );
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(connectionID: string, params: SubscriptionCreateParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.CreateSubscriptionResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* List trigger subscriptions scoped to a single connection.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const subscriptionList =
|
|
29
|
-
* await client.connections.subscriptions.list(
|
|
30
|
-
* 'connectionId',
|
|
31
|
-
* { namespace: 'namespace' },
|
|
32
|
-
* );
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
list(connectionID: string, params: SubscriptionListParams, options?: RequestOptions): APIPromise<SubscriptionsAPI.SubscriptionList>;
|
|
36
|
-
/**
|
|
37
|
-
* Delete a connection-scoped trigger subscription.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const subscription =
|
|
42
|
-
* await client.connections.subscriptions.delete(
|
|
43
|
-
* 'subscriptionId',
|
|
44
|
-
* {
|
|
45
|
-
* namespace: 'namespace',
|
|
46
|
-
* connectionId: 'connectionId',
|
|
47
|
-
* },
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
|
|
52
|
-
}
|
|
53
|
-
export interface SubscriptionDeleteResponse {
|
|
54
|
-
success: true;
|
|
55
|
-
}
|
|
56
|
-
export interface SubscriptionCreateParams {
|
|
57
|
-
/**
|
|
58
|
-
* Path param
|
|
59
|
-
*/
|
|
60
|
-
namespace: string;
|
|
61
|
-
/**
|
|
62
|
-
* Body param: HTTPS webhook destination
|
|
63
|
-
*/
|
|
64
|
-
url: string;
|
|
65
|
-
}
|
|
66
|
-
export interface SubscriptionListParams {
|
|
67
|
-
namespace: string;
|
|
68
|
-
}
|
|
69
|
-
export interface SubscriptionDeleteParams {
|
|
70
|
-
namespace: string;
|
|
71
|
-
connectionId: string;
|
|
72
|
-
}
|
|
73
|
-
export declare namespace Subscriptions {
|
|
74
|
-
export { type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, };
|
|
75
|
-
}
|
|
76
|
-
//# 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;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,0BAA0B,CAAC;IAS1D;;;;;;;;;;;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;;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,75 +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 createSubscriptionResponse =
|
|
15
|
-
* await client.connections.subscriptions.create(
|
|
16
|
-
* 'connectionId',
|
|
17
|
-
* {
|
|
18
|
-
* namespace: 'namespace',
|
|
19
|
-
* url: 'https://my-app.example.com/events',
|
|
20
|
-
* },
|
|
21
|
-
* );
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
create(connectionID, params, options) {
|
|
25
|
-
const { namespace, ...body } = params;
|
|
26
|
-
return this._client.post((0, path_1.path) `/${namespace}/${connectionID}/.subscriptions`, {
|
|
27
|
-
body,
|
|
28
|
-
defaultBaseURL: 'https://smithery.run',
|
|
29
|
-
...options,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* List trigger subscriptions scoped to a single connection.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* const subscriptionList =
|
|
38
|
-
* await client.connections.subscriptions.list(
|
|
39
|
-
* 'connectionId',
|
|
40
|
-
* { namespace: 'namespace' },
|
|
41
|
-
* );
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
list(connectionID, params, options) {
|
|
45
|
-
const { namespace } = params;
|
|
46
|
-
return this._client.get((0, path_1.path) `/${namespace}/${connectionID}/.subscriptions`, {
|
|
47
|
-
defaultBaseURL: 'https://smithery.run',
|
|
48
|
-
...options,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Delete a connection-scoped trigger subscription.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* const subscription =
|
|
57
|
-
* await client.connections.subscriptions.delete(
|
|
58
|
-
* 'subscriptionId',
|
|
59
|
-
* {
|
|
60
|
-
* namespace: 'namespace',
|
|
61
|
-
* connectionId: 'connectionId',
|
|
62
|
-
* },
|
|
63
|
-
* );
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
delete(subscriptionID, params, options) {
|
|
67
|
-
const { namespace, connectionId } = params;
|
|
68
|
-
return this._client.delete((0, path_1.path) `/${namespace}/${connectionId}/.subscriptions/${subscriptionID}`, {
|
|
69
|
-
defaultBaseURL: 'https://smithery.run',
|
|
70
|
-
...options,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.Subscriptions = Subscriptions;
|
|
75
|
-
//# 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;;;;;;;;;;;;;;;OAeG;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;AAhFD,sCAgFC"}
|