@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
|
@@ -1,71 +0,0 @@
|
|
|
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 connection-scoped subscription that receives events from one
|
|
7
|
-
* connection.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const createSubscriptionResponse =
|
|
12
|
-
* await client.connections.subscriptions.create(
|
|
13
|
-
* 'connectionId',
|
|
14
|
-
* {
|
|
15
|
-
* namespace: 'namespace',
|
|
16
|
-
* url: 'https://my-app.example.com/events',
|
|
17
|
-
* },
|
|
18
|
-
* );
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
create(connectionID, params, options) {
|
|
22
|
-
const { namespace, ...body } = params;
|
|
23
|
-
return this._client.post(path `/${namespace}/${connectionID}/.subscriptions`, {
|
|
24
|
-
body,
|
|
25
|
-
defaultBaseURL: 'https://smithery.run',
|
|
26
|
-
...options,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* List trigger subscriptions scoped to a single connection.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* const subscriptionList =
|
|
35
|
-
* await client.connections.subscriptions.list(
|
|
36
|
-
* 'connectionId',
|
|
37
|
-
* { namespace: 'namespace' },
|
|
38
|
-
* );
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
list(connectionID, params, options) {
|
|
42
|
-
const { namespace } = params;
|
|
43
|
-
return this._client.get(path `/${namespace}/${connectionID}/.subscriptions`, {
|
|
44
|
-
defaultBaseURL: 'https://smithery.run',
|
|
45
|
-
...options,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Delete a connection-scoped trigger subscription.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* const subscription =
|
|
54
|
-
* await client.connections.subscriptions.delete(
|
|
55
|
-
* 'subscriptionId',
|
|
56
|
-
* {
|
|
57
|
-
* namespace: 'namespace',
|
|
58
|
-
* connectionId: 'connectionId',
|
|
59
|
-
* },
|
|
60
|
-
* );
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
delete(subscriptionID, params, options) {
|
|
64
|
-
const { namespace, connectionId } = params;
|
|
65
|
-
return this._client.delete(path `/${namespace}/${connectionId}/.subscriptions/${subscriptionID}`, {
|
|
66
|
-
defaultBaseURL: 'https://smithery.run',
|
|
67
|
-
...options,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=subscriptions.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../../src/resources/connections/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;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,IAAI,CAAA,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,IAAI,CAAA,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,IAAI,CAAA,IAAI,SAAS,IAAI,YAAY,mBAAmB,cAAc,EAAE,EAAE;YAC/F,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
export declare class Subscriptions extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Create a namespace-scoped subscription that receives events from every
|
|
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
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(namespace: string, body: SubscriptionCreateParams, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
|
|
18
|
-
/**
|
|
19
|
-
* List namespace-scoped trigger subscriptions for all connections in the
|
|
20
|
-
* namespace.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const subscriptionList = await client.subscriptions.list(
|
|
25
|
-
* 'namespace',
|
|
26
|
-
* );
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList>;
|
|
30
|
-
/**
|
|
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
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
|
|
42
|
-
}
|
|
43
|
-
export interface CreateSubscriptionRequest {
|
|
44
|
-
/**
|
|
45
|
-
* HTTPS webhook destination
|
|
46
|
-
*/
|
|
47
|
-
url: string;
|
|
48
|
-
}
|
|
49
|
-
export interface CreateSubscriptionResponse {
|
|
50
|
-
/**
|
|
51
|
-
* Stable subscription id generated by Smithery
|
|
52
|
-
*/
|
|
53
|
-
id: string;
|
|
54
|
-
/**
|
|
55
|
-
* Connection scope. Null for namespace-wide subscriptions.
|
|
56
|
-
*/
|
|
57
|
-
connection_id: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* ISO 8601 timestamp
|
|
60
|
-
*/
|
|
61
|
-
created_at: string;
|
|
62
|
-
/**
|
|
63
|
-
* Webhook signing secret. Returned only once at creation time.
|
|
64
|
-
*/
|
|
65
|
-
secret: string;
|
|
66
|
-
/**
|
|
67
|
-
* Destination URL for webhook deliveries
|
|
68
|
-
*/
|
|
69
|
-
url: string;
|
|
70
|
-
}
|
|
71
|
-
export interface Subscription {
|
|
72
|
-
/**
|
|
73
|
-
* Stable subscription id generated by Smithery
|
|
74
|
-
*/
|
|
75
|
-
id: string;
|
|
76
|
-
/**
|
|
77
|
-
* Connection scope. Null for namespace-wide subscriptions.
|
|
78
|
-
*/
|
|
79
|
-
connection_id: string | null;
|
|
80
|
-
/**
|
|
81
|
-
* ISO 8601 timestamp
|
|
82
|
-
*/
|
|
83
|
-
created_at: string;
|
|
84
|
-
/**
|
|
85
|
-
* Destination URL for webhook deliveries
|
|
86
|
-
*/
|
|
87
|
-
url: string;
|
|
88
|
-
}
|
|
89
|
-
export type SubscriptionList = Array<Subscription>;
|
|
90
|
-
export interface SubscriptionDeleteResponse {
|
|
91
|
-
success: true;
|
|
92
|
-
}
|
|
93
|
-
export interface SubscriptionCreateParams {
|
|
94
|
-
/**
|
|
95
|
-
* HTTPS webhook destination
|
|
96
|
-
*/
|
|
97
|
-
url: string;
|
|
98
|
-
}
|
|
99
|
-
export interface SubscriptionDeleteParams {
|
|
100
|
-
namespace: string;
|
|
101
|
-
}
|
|
102
|
-
export declare namespace Subscriptions {
|
|
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, };
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=subscriptions.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAQzC;;;;;;;;;;OAUG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAO/E;;;;;;;;;;OAUG;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,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"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
export declare class Subscriptions extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Create a namespace-scoped subscription that receives events from every
|
|
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
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(namespace: string, body: SubscriptionCreateParams, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
|
|
18
|
-
/**
|
|
19
|
-
* List namespace-scoped trigger subscriptions for all connections in the
|
|
20
|
-
* namespace.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const subscriptionList = await client.subscriptions.list(
|
|
25
|
-
* 'namespace',
|
|
26
|
-
* );
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList>;
|
|
30
|
-
/**
|
|
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
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
|
|
42
|
-
}
|
|
43
|
-
export interface CreateSubscriptionRequest {
|
|
44
|
-
/**
|
|
45
|
-
* HTTPS webhook destination
|
|
46
|
-
*/
|
|
47
|
-
url: string;
|
|
48
|
-
}
|
|
49
|
-
export interface CreateSubscriptionResponse {
|
|
50
|
-
/**
|
|
51
|
-
* Stable subscription id generated by Smithery
|
|
52
|
-
*/
|
|
53
|
-
id: string;
|
|
54
|
-
/**
|
|
55
|
-
* Connection scope. Null for namespace-wide subscriptions.
|
|
56
|
-
*/
|
|
57
|
-
connection_id: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* ISO 8601 timestamp
|
|
60
|
-
*/
|
|
61
|
-
created_at: string;
|
|
62
|
-
/**
|
|
63
|
-
* Webhook signing secret. Returned only once at creation time.
|
|
64
|
-
*/
|
|
65
|
-
secret: string;
|
|
66
|
-
/**
|
|
67
|
-
* Destination URL for webhook deliveries
|
|
68
|
-
*/
|
|
69
|
-
url: string;
|
|
70
|
-
}
|
|
71
|
-
export interface Subscription {
|
|
72
|
-
/**
|
|
73
|
-
* Stable subscription id generated by Smithery
|
|
74
|
-
*/
|
|
75
|
-
id: string;
|
|
76
|
-
/**
|
|
77
|
-
* Connection scope. Null for namespace-wide subscriptions.
|
|
78
|
-
*/
|
|
79
|
-
connection_id: string | null;
|
|
80
|
-
/**
|
|
81
|
-
* ISO 8601 timestamp
|
|
82
|
-
*/
|
|
83
|
-
created_at: string;
|
|
84
|
-
/**
|
|
85
|
-
* Destination URL for webhook deliveries
|
|
86
|
-
*/
|
|
87
|
-
url: string;
|
|
88
|
-
}
|
|
89
|
-
export type SubscriptionList = Array<Subscription>;
|
|
90
|
-
export interface SubscriptionDeleteResponse {
|
|
91
|
-
success: true;
|
|
92
|
-
}
|
|
93
|
-
export interface SubscriptionCreateParams {
|
|
94
|
-
/**
|
|
95
|
-
* HTTPS webhook destination
|
|
96
|
-
*/
|
|
97
|
-
url: string;
|
|
98
|
-
}
|
|
99
|
-
export interface SubscriptionDeleteParams {
|
|
100
|
-
namespace: string;
|
|
101
|
-
}
|
|
102
|
-
export declare namespace Subscriptions {
|
|
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, };
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=subscriptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAQzC;;;;;;;;;;OAUG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAO/E;;;;;;;;;;OAUG;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,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"}
|
|
@@ -1,64 +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 namespace-scoped subscription that receives events from every
|
|
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
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
create(namespace, body, options) {
|
|
21
|
-
return this._client.post((0, path_1.path) `/${namespace}/.subscriptions`, {
|
|
22
|
-
body,
|
|
23
|
-
defaultBaseURL: 'https://smithery.run',
|
|
24
|
-
...options,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* List namespace-scoped trigger subscriptions for all connections in the
|
|
29
|
-
* namespace.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const subscriptionList = await client.subscriptions.list(
|
|
34
|
-
* 'namespace',
|
|
35
|
-
* );
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
list(namespace, options) {
|
|
39
|
-
return this._client.get((0, path_1.path) `/${namespace}/.subscriptions`, {
|
|
40
|
-
defaultBaseURL: 'https://smithery.run',
|
|
41
|
-
...options,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
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
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
delete(subscriptionID, params, options) {
|
|
56
|
-
const { namespace } = params;
|
|
57
|
-
return this._client.delete((0, path_1.path) `/${namespace}/.subscriptions/${subscriptionID}`, {
|
|
58
|
-
defaultBaseURL: 'https://smithery.run',
|
|
59
|
-
...options,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.Subscriptions = Subscriptions;
|
|
64
|
-
//# sourceMappingURL=subscriptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAiB,EACjB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,iBAAiB,EAAE;YAC3D,IAAI;YACJ,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;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;;;;;;;;;;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,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"}
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const createSubscriptionResponse =
|
|
12
|
-
* await client.subscriptions.create('namespace', {
|
|
13
|
-
* url: 'https://my-app.example.com/events',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(namespace, body, options) {
|
|
18
|
-
return this._client.post(path `/${namespace}/.subscriptions`, {
|
|
19
|
-
body,
|
|
20
|
-
defaultBaseURL: 'https://smithery.run',
|
|
21
|
-
...options,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* List namespace-scoped trigger subscriptions for all connections in the
|
|
26
|
-
* namespace.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const subscriptionList = await client.subscriptions.list(
|
|
31
|
-
* 'namespace',
|
|
32
|
-
* );
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
list(namespace, options) {
|
|
36
|
-
return this._client.get(path `/${namespace}/.subscriptions`, {
|
|
37
|
-
defaultBaseURL: 'https://smithery.run',
|
|
38
|
-
...options,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
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
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
delete(subscriptionID, params, options) {
|
|
53
|
-
const { namespace } = params;
|
|
54
|
-
return this._client.delete(path `/${namespace}/.subscriptions/${subscriptionID}`, {
|
|
55
|
-
defaultBaseURL: 'https://smithery.run',
|
|
56
|
-
...options,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=subscriptions.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,SAAiB,EACjB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,IAAI,SAAS,iBAAiB,EAAE;YAC3D,IAAI;YACJ,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;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;;;;;;;;;;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"}
|
|
@@ -1,124 +0,0 @@
|
|
|
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
|
-
* {
|
|
20
|
-
* namespace: 'namespace',
|
|
21
|
-
* url: 'https://my-app.example.com/events',
|
|
22
|
-
* },
|
|
23
|
-
* );
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
create(
|
|
27
|
-
connectionID: string,
|
|
28
|
-
params: SubscriptionCreateParams,
|
|
29
|
-
options?: RequestOptions,
|
|
30
|
-
): APIPromise<SubscriptionsAPI.CreateSubscriptionResponse> {
|
|
31
|
-
const { namespace, ...body } = params;
|
|
32
|
-
return this._client.post(path`/${namespace}/${connectionID}/.subscriptions`, {
|
|
33
|
-
body,
|
|
34
|
-
defaultBaseURL: 'https://smithery.run',
|
|
35
|
-
...options,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* List trigger subscriptions scoped to a single connection.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const subscriptionList =
|
|
45
|
-
* await client.connections.subscriptions.list(
|
|
46
|
-
* 'connectionId',
|
|
47
|
-
* { namespace: 'namespace' },
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
list(
|
|
52
|
-
connectionID: string,
|
|
53
|
-
params: SubscriptionListParams,
|
|
54
|
-
options?: RequestOptions,
|
|
55
|
-
): APIPromise<SubscriptionsAPI.SubscriptionList> {
|
|
56
|
-
const { namespace } = params;
|
|
57
|
-
return this._client.get(path`/${namespace}/${connectionID}/.subscriptions`, {
|
|
58
|
-
defaultBaseURL: 'https://smithery.run',
|
|
59
|
-
...options,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Delete a connection-scoped trigger subscription.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```ts
|
|
68
|
-
* const subscription =
|
|
69
|
-
* await client.connections.subscriptions.delete(
|
|
70
|
-
* 'subscriptionId',
|
|
71
|
-
* {
|
|
72
|
-
* namespace: 'namespace',
|
|
73
|
-
* connectionId: 'connectionId',
|
|
74
|
-
* },
|
|
75
|
-
* );
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
delete(
|
|
79
|
-
subscriptionID: string,
|
|
80
|
-
params: SubscriptionDeleteParams,
|
|
81
|
-
options?: RequestOptions,
|
|
82
|
-
): APIPromise<SubscriptionDeleteResponse> {
|
|
83
|
-
const { namespace, connectionId } = params;
|
|
84
|
-
return this._client.delete(path`/${namespace}/${connectionId}/.subscriptions/${subscriptionID}`, {
|
|
85
|
-
defaultBaseURL: 'https://smithery.run',
|
|
86
|
-
...options,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface SubscriptionDeleteResponse {
|
|
92
|
-
success: true;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface SubscriptionCreateParams {
|
|
96
|
-
/**
|
|
97
|
-
* Path param
|
|
98
|
-
*/
|
|
99
|
-
namespace: string;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Body param: HTTPS webhook destination
|
|
103
|
-
*/
|
|
104
|
-
url: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface SubscriptionListParams {
|
|
108
|
-
namespace: string;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface SubscriptionDeleteParams {
|
|
112
|
-
namespace: string;
|
|
113
|
-
|
|
114
|
-
connectionId: string;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export declare namespace Subscriptions {
|
|
118
|
-
export {
|
|
119
|
-
type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
|
|
120
|
-
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
121
|
-
type SubscriptionListParams as SubscriptionListParams,
|
|
122
|
-
type SubscriptionDeleteParams as SubscriptionDeleteParams,
|
|
123
|
-
};
|
|
124
|
-
}
|