@smithery/api 0.61.0 → 0.63.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.
- package/CHANGELOG.md +37 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/connections/connections.d.mts +8 -4
- package/resources/connections/connections.d.mts.map +1 -1
- package/resources/connections/connections.d.ts +8 -4
- package/resources/connections/connections.d.ts.map +1 -1
- package/resources/connections/connections.js +31 -9
- package/resources/connections/connections.js.map +1 -1
- package/resources/connections/connections.mjs +31 -9
- package/resources/connections/connections.mjs.map +1 -1
- package/resources/connections/index.d.mts +2 -1
- package/resources/connections/index.d.mts.map +1 -1
- package/resources/connections/index.d.ts +2 -1
- package/resources/connections/index.d.ts.map +1 -1
- package/resources/connections/index.js +5 -3
- package/resources/connections/index.js.map +1 -1
- package/resources/connections/index.mjs +2 -1
- package/resources/connections/index.mjs.map +1 -1
- package/resources/connections/subscriptions.d.mts +66 -0
- package/resources/connections/subscriptions.d.mts.map +1 -0
- package/resources/connections/subscriptions.d.ts +66 -0
- package/resources/connections/subscriptions.d.ts.map +1 -0
- package/resources/connections/subscriptions.js +71 -0
- package/resources/connections/subscriptions.js.map +1 -0
- package/resources/connections/subscriptions.mjs +67 -0
- package/resources/connections/subscriptions.mjs.map +1 -0
- package/resources/connections/triggers.d.mts +160 -0
- package/resources/connections/triggers.d.mts.map +1 -0
- package/resources/connections/triggers.d.ts +160 -0
- package/resources/connections/triggers.d.ts.map +1 -0
- package/resources/connections/triggers.js +111 -0
- package/resources/connections/triggers.js.map +1 -0
- package/resources/connections/triggers.mjs +107 -0
- package/resources/connections/triggers.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/servers/index.d.mts +0 -1
- package/resources/servers/index.d.mts.map +1 -1
- package/resources/servers/index.d.ts +0 -1
- package/resources/servers/index.d.ts.map +1 -1
- package/resources/servers/index.js +1 -3
- package/resources/servers/index.js.map +1 -1
- package/resources/servers/index.mjs +0 -1
- package/resources/servers/index.mjs.map +1 -1
- package/resources/servers/releases.d.mts +10 -8
- package/resources/servers/releases.d.mts.map +1 -1
- package/resources/servers/releases.d.ts +10 -8
- package/resources/servers/releases.d.ts.map +1 -1
- package/resources/servers/releases.js +1 -1
- package/resources/servers/releases.js.map +1 -1
- package/resources/servers/releases.mjs +1 -1
- package/resources/servers/releases.mjs.map +1 -1
- package/resources/servers/servers.d.mts +7 -10
- package/resources/servers/servers.d.mts.map +1 -1
- package/resources/servers/servers.d.ts +7 -10
- package/resources/servers/servers.d.ts.map +1 -1
- package/resources/servers/servers.js +2 -5
- package/resources/servers/servers.js.map +1 -1
- package/resources/servers/servers.mjs +2 -5
- package/resources/servers/servers.mjs.map +1 -1
- package/resources/subscriptions.d.mts +76 -0
- package/resources/subscriptions.d.mts.map +1 -0
- package/resources/subscriptions.d.ts +76 -0
- package/resources/subscriptions.d.ts.map +1 -0
- package/resources/subscriptions.js +40 -0
- package/resources/subscriptions.js.map +1 -0
- package/resources/subscriptions.mjs +36 -0
- package/resources/subscriptions.mjs.map +1 -0
- package/src/client.ts +21 -0
- package/src/resources/connections/connections.ts +68 -13
- package/src/resources/connections/index.ts +20 -1
- package/src/resources/connections/subscriptions.ts +112 -0
- package/src/resources/connections/triggers.ts +245 -0
- package/src/resources/index.ts +9 -0
- package/src/resources/servers/index.ts +0 -9
- package/src/resources/servers/releases.ts +8 -9
- package/src/resources/servers/servers.ts +10 -31
- package/src/resources/subscriptions.ts +122 -0
- 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/mcp.d.mts +0 -44
- package/resources/connections/mcp.d.mts.map +0 -1
- package/resources/connections/mcp.d.ts +0 -44
- package/resources/connections/mcp.d.ts.map +0 -1
- package/resources/connections/mcp.js +0 -28
- package/resources/connections/mcp.js.map +0 -1
- package/resources/connections/mcp.mjs +0 -24
- package/resources/connections/mcp.mjs.map +0 -1
- package/resources/servers/repo.d.mts +0 -99
- package/resources/servers/repo.d.mts.map +0 -1
- package/resources/servers/repo.d.ts +0 -99
- package/resources/servers/repo.d.ts.map +0 -1
- package/resources/servers/repo.js +0 -66
- package/resources/servers/repo.js.map +0 -1
- package/resources/servers/repo.mjs +0 -62
- package/resources/servers/repo.mjs.map +0 -1
- package/src/resources/connections/mcp.ts +0 -63
- package/src/resources/servers/repo.ts +0 -155
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
create(namespace: string, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* List namespace-scoped trigger subscriptions for all connections in the
|
|
12
|
+
* namespace.
|
|
13
|
+
*/
|
|
14
|
+
list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete a namespace-scoped trigger subscription.
|
|
17
|
+
*/
|
|
18
|
+
delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateSubscriptionRequest {
|
|
21
|
+
/**
|
|
22
|
+
* HTTPS webhook destination
|
|
23
|
+
*/
|
|
24
|
+
url: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateSubscriptionResponse {
|
|
27
|
+
/**
|
|
28
|
+
* Stable subscription id generated by Smithery
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Connection scope. Null for namespace-wide subscriptions.
|
|
33
|
+
*/
|
|
34
|
+
connection_id: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* ISO 8601 timestamp
|
|
37
|
+
*/
|
|
38
|
+
created_at: string;
|
|
39
|
+
/**
|
|
40
|
+
* Webhook signing secret. Returned only once at creation time.
|
|
41
|
+
*/
|
|
42
|
+
secret: string;
|
|
43
|
+
/**
|
|
44
|
+
* Destination URL for webhook deliveries
|
|
45
|
+
*/
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
48
|
+
export interface Subscription {
|
|
49
|
+
/**
|
|
50
|
+
* Stable subscription id generated by Smithery
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Connection scope. Null for namespace-wide subscriptions.
|
|
55
|
+
*/
|
|
56
|
+
connection_id: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* ISO 8601 timestamp
|
|
59
|
+
*/
|
|
60
|
+
created_at: string;
|
|
61
|
+
/**
|
|
62
|
+
* Destination URL for webhook deliveries
|
|
63
|
+
*/
|
|
64
|
+
url: string;
|
|
65
|
+
}
|
|
66
|
+
export type SubscriptionList = Array<Subscription>;
|
|
67
|
+
export interface SubscriptionDeleteResponse {
|
|
68
|
+
success: true;
|
|
69
|
+
}
|
|
70
|
+
export interface SubscriptionDeleteParams {
|
|
71
|
+
namespace: string;
|
|
72
|
+
}
|
|
73
|
+
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, };
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=subscriptions.d.mts.map
|
|
@@ -0,0 +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;;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,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,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
create(namespace: string, options?: RequestOptions): APIPromise<CreateSubscriptionResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* List namespace-scoped trigger subscriptions for all connections in the
|
|
12
|
+
* namespace.
|
|
13
|
+
*/
|
|
14
|
+
list(namespace: string, options?: RequestOptions): APIPromise<SubscriptionList>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete a namespace-scoped trigger subscription.
|
|
17
|
+
*/
|
|
18
|
+
delete(subscriptionID: string, params: SubscriptionDeleteParams, options?: RequestOptions): APIPromise<SubscriptionDeleteResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateSubscriptionRequest {
|
|
21
|
+
/**
|
|
22
|
+
* HTTPS webhook destination
|
|
23
|
+
*/
|
|
24
|
+
url: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateSubscriptionResponse {
|
|
27
|
+
/**
|
|
28
|
+
* Stable subscription id generated by Smithery
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Connection scope. Null for namespace-wide subscriptions.
|
|
33
|
+
*/
|
|
34
|
+
connection_id: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* ISO 8601 timestamp
|
|
37
|
+
*/
|
|
38
|
+
created_at: string;
|
|
39
|
+
/**
|
|
40
|
+
* Webhook signing secret. Returned only once at creation time.
|
|
41
|
+
*/
|
|
42
|
+
secret: string;
|
|
43
|
+
/**
|
|
44
|
+
* Destination URL for webhook deliveries
|
|
45
|
+
*/
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
48
|
+
export interface Subscription {
|
|
49
|
+
/**
|
|
50
|
+
* Stable subscription id generated by Smithery
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Connection scope. Null for namespace-wide subscriptions.
|
|
55
|
+
*/
|
|
56
|
+
connection_id: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* ISO 8601 timestamp
|
|
59
|
+
*/
|
|
60
|
+
created_at: string;
|
|
61
|
+
/**
|
|
62
|
+
* Destination URL for webhook deliveries
|
|
63
|
+
*/
|
|
64
|
+
url: string;
|
|
65
|
+
}
|
|
66
|
+
export type SubscriptionList = Array<Subscription>;
|
|
67
|
+
export interface SubscriptionDeleteResponse {
|
|
68
|
+
success: true;
|
|
69
|
+
}
|
|
70
|
+
export interface SubscriptionDeleteParams {
|
|
71
|
+
namespace: string;
|
|
72
|
+
}
|
|
73
|
+
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, };
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=subscriptions.d.ts.map
|
|
@@ -0,0 +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,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,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,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Subscriptions = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
class Subscriptions extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a namespace-scoped subscription that receives events from every
|
|
10
|
+
* connection in the namespace.
|
|
11
|
+
*/
|
|
12
|
+
create(namespace, options) {
|
|
13
|
+
return this._client.post((0, path_1.path) `/${namespace}/.subscriptions`, {
|
|
14
|
+
defaultBaseURL: 'https://smithery.run',
|
|
15
|
+
...options,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List namespace-scoped trigger subscriptions for all connections in the
|
|
20
|
+
* namespace.
|
|
21
|
+
*/
|
|
22
|
+
list(namespace, options) {
|
|
23
|
+
return this._client.get((0, path_1.path) `/${namespace}/.subscriptions`, {
|
|
24
|
+
defaultBaseURL: 'https://smithery.run',
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Delete a namespace-scoped trigger subscription.
|
|
30
|
+
*/
|
|
31
|
+
delete(subscriptionID, params, options) {
|
|
32
|
+
const { namespace } = params;
|
|
33
|
+
return this._client.delete((0, path_1.path) `/${namespace}/.subscriptions/${subscriptionID}`, {
|
|
34
|
+
defaultBaseURL: 'https://smithery.run',
|
|
35
|
+
...options,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Subscriptions = Subscriptions;
|
|
40
|
+
//# sourceMappingURL=subscriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;OAGG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,iBAAiB,EAAE;YAC3D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,SAAiB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,iBAAiB,EAAE;YAC1D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,cAAsB,EACtB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,IAAI,SAAS,mBAAmB,cAAc,EAAE,EAAE;YAC/E,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AArCD,sCAqCC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
export class Subscriptions extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a namespace-scoped subscription that receives events from every
|
|
7
|
+
* connection in the namespace.
|
|
8
|
+
*/
|
|
9
|
+
create(namespace, options) {
|
|
10
|
+
return this._client.post(path `/${namespace}/.subscriptions`, {
|
|
11
|
+
defaultBaseURL: 'https://smithery.run',
|
|
12
|
+
...options,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* List namespace-scoped trigger subscriptions for all connections in the
|
|
17
|
+
* namespace.
|
|
18
|
+
*/
|
|
19
|
+
list(namespace, options) {
|
|
20
|
+
return this._client.get(path `/${namespace}/.subscriptions`, {
|
|
21
|
+
defaultBaseURL: 'https://smithery.run',
|
|
22
|
+
...options,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Delete a namespace-scoped trigger subscription.
|
|
27
|
+
*/
|
|
28
|
+
delete(subscriptionID, params, options) {
|
|
29
|
+
const { namespace } = params;
|
|
30
|
+
return this._client.delete(path `/${namespace}/.subscriptions/${subscriptionID}`, {
|
|
31
|
+
defaultBaseURL: 'https://smithery.run',
|
|
32
|
+
...options,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=subscriptions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,IAAI,SAAS,iBAAiB,EAAE;YAC3D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,SAAiB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,IAAI,SAAS,iBAAiB,EAAE;YAC1D,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,cAAsB,EACtB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,IAAI,SAAS,mBAAmB,cAAc,EAAE,EAAE;YAC/E,cAAc,EAAE,sBAAsB;YACtC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -49,6 +49,15 @@ import {
|
|
|
49
49
|
SkillUploadResponse,
|
|
50
50
|
Skills,
|
|
51
51
|
} from './resources/skills';
|
|
52
|
+
import {
|
|
53
|
+
CreateSubscriptionRequest,
|
|
54
|
+
CreateSubscriptionResponse,
|
|
55
|
+
Subscription,
|
|
56
|
+
SubscriptionDeleteParams,
|
|
57
|
+
SubscriptionDeleteResponse,
|
|
58
|
+
SubscriptionList,
|
|
59
|
+
Subscriptions,
|
|
60
|
+
} from './resources/subscriptions';
|
|
52
61
|
import {
|
|
53
62
|
Constraint,
|
|
54
63
|
CreateTokenRequest,
|
|
@@ -826,6 +835,7 @@ export class Smithery {
|
|
|
826
835
|
namespaces: API.Namespaces = new API.Namespaces(this);
|
|
827
836
|
organizations: API.Organizations = new API.Organizations(this);
|
|
828
837
|
tokens: API.Tokens = new API.Tokens(this);
|
|
838
|
+
subscriptions: API.Subscriptions = new API.Subscriptions(this);
|
|
829
839
|
connections: API.Connections = new API.Connections(this);
|
|
830
840
|
}
|
|
831
841
|
|
|
@@ -835,6 +845,7 @@ Smithery.Skills = Skills;
|
|
|
835
845
|
Smithery.Namespaces = Namespaces;
|
|
836
846
|
Smithery.Organizations = Organizations;
|
|
837
847
|
Smithery.Tokens = Tokens;
|
|
848
|
+
Smithery.Subscriptions = Subscriptions;
|
|
838
849
|
Smithery.Connections = Connections;
|
|
839
850
|
|
|
840
851
|
export declare namespace Smithery {
|
|
@@ -913,6 +924,16 @@ export declare namespace Smithery {
|
|
|
913
924
|
type TokenCreateParams as TokenCreateParams,
|
|
914
925
|
};
|
|
915
926
|
|
|
927
|
+
export {
|
|
928
|
+
Subscriptions as Subscriptions,
|
|
929
|
+
type CreateSubscriptionRequest as CreateSubscriptionRequest,
|
|
930
|
+
type CreateSubscriptionResponse as CreateSubscriptionResponse,
|
|
931
|
+
type Subscription as Subscription,
|
|
932
|
+
type SubscriptionList as SubscriptionList,
|
|
933
|
+
type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
|
|
934
|
+
type SubscriptionDeleteParams as SubscriptionDeleteParams,
|
|
935
|
+
};
|
|
936
|
+
|
|
916
937
|
export {
|
|
917
938
|
Connections as Connections,
|
|
918
939
|
type Connection as Connection,
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
4
|
+
import * as SubscriptionsAPI from './subscriptions';
|
|
5
|
+
import {
|
|
6
|
+
SubscriptionCreateParams,
|
|
7
|
+
SubscriptionDeleteParams,
|
|
8
|
+
SubscriptionDeleteResponse,
|
|
9
|
+
SubscriptionListParams,
|
|
10
|
+
Subscriptions,
|
|
11
|
+
} from './subscriptions';
|
|
12
|
+
import * as TriggersAPI from './triggers';
|
|
13
|
+
import {
|
|
14
|
+
CreateTriggerRequest,
|
|
15
|
+
TriggerCreateParams,
|
|
16
|
+
TriggerDefinition,
|
|
17
|
+
TriggerDefinitionList,
|
|
18
|
+
TriggerDeleteParams,
|
|
19
|
+
TriggerDeleteResponse,
|
|
20
|
+
TriggerGetInstanceParams,
|
|
21
|
+
TriggerGetParams,
|
|
22
|
+
TriggerInstance,
|
|
23
|
+
TriggerListParams,
|
|
24
|
+
Triggers,
|
|
25
|
+
} from './triggers';
|
|
6
26
|
import { APIPromise } from '../../core/api-promise';
|
|
7
27
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
28
|
import { path } from '../../internal/utils/path';
|
|
9
29
|
|
|
10
30
|
export class Connections extends APIResource {
|
|
11
|
-
|
|
31
|
+
subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
|
|
32
|
+
triggers: TriggersAPI.Triggers = new TriggersAPI.Triggers(this._client);
|
|
12
33
|
|
|
13
34
|
/**
|
|
14
35
|
* Create a new MCP connection with an auto-generated ID. Requires API key and
|
|
@@ -26,7 +47,11 @@ export class Connections extends APIResource {
|
|
|
26
47
|
body: ConnectionCreateParams | null | undefined = {},
|
|
27
48
|
options?: RequestOptions,
|
|
28
49
|
): APIPromise<Connection> {
|
|
29
|
-
return this._client.post(path
|
|
50
|
+
return this._client.post(path`/${namespace}`, {
|
|
51
|
+
body,
|
|
52
|
+
defaultBaseURL: 'https://smithery.run',
|
|
53
|
+
...options,
|
|
54
|
+
});
|
|
30
55
|
}
|
|
31
56
|
|
|
32
57
|
/**
|
|
@@ -44,7 +69,11 @@ export class Connections extends APIResource {
|
|
|
44
69
|
query: ConnectionListParams | null | undefined = {},
|
|
45
70
|
options?: RequestOptions,
|
|
46
71
|
): APIPromise<ConnectionsListResponse> {
|
|
47
|
-
return this._client.get(path
|
|
72
|
+
return this._client.get(path`/${namespace}`, {
|
|
73
|
+
query,
|
|
74
|
+
defaultBaseURL: 'https://smithery.run',
|
|
75
|
+
...options,
|
|
76
|
+
});
|
|
48
77
|
}
|
|
49
78
|
|
|
50
79
|
/**
|
|
@@ -65,7 +94,10 @@ export class Connections extends APIResource {
|
|
|
65
94
|
options?: RequestOptions,
|
|
66
95
|
): APIPromise<ConnectionDeleteResponse> {
|
|
67
96
|
const { namespace } = params;
|
|
68
|
-
return this._client.delete(path
|
|
97
|
+
return this._client.delete(path`/${namespace}/${connectionID}`, {
|
|
98
|
+
defaultBaseURL: 'https://smithery.run',
|
|
99
|
+
...options,
|
|
100
|
+
});
|
|
69
101
|
}
|
|
70
102
|
|
|
71
103
|
/**
|
|
@@ -82,7 +114,10 @@ export class Connections extends APIResource {
|
|
|
82
114
|
*/
|
|
83
115
|
get(connectionID: string, params: ConnectionGetParams, options?: RequestOptions): APIPromise<Connection> {
|
|
84
116
|
const { namespace } = params;
|
|
85
|
-
return this._client.get(path
|
|
117
|
+
return this._client.get(path`/${namespace}/${connectionID}`, {
|
|
118
|
+
defaultBaseURL: 'https://smithery.run',
|
|
119
|
+
...options,
|
|
120
|
+
});
|
|
86
121
|
}
|
|
87
122
|
|
|
88
123
|
/**
|
|
@@ -101,7 +136,11 @@ export class Connections extends APIResource {
|
|
|
101
136
|
*/
|
|
102
137
|
set(connectionID: string, params: ConnectionSetParams, options?: RequestOptions): APIPromise<Connection> {
|
|
103
138
|
const { namespace, ...body } = params;
|
|
104
|
-
return this._client.put(path
|
|
139
|
+
return this._client.put(path`/${namespace}/${connectionID}`, {
|
|
140
|
+
body,
|
|
141
|
+
defaultBaseURL: 'https://smithery.run',
|
|
142
|
+
...options,
|
|
143
|
+
});
|
|
105
144
|
}
|
|
106
145
|
}
|
|
107
146
|
|
|
@@ -500,7 +539,8 @@ export namespace ConnectionSetParams {
|
|
|
500
539
|
}
|
|
501
540
|
}
|
|
502
541
|
|
|
503
|
-
Connections.
|
|
542
|
+
Connections.Subscriptions = Subscriptions;
|
|
543
|
+
Connections.Triggers = Triggers;
|
|
504
544
|
|
|
505
545
|
export declare namespace Connections {
|
|
506
546
|
export {
|
|
@@ -516,9 +556,24 @@ export declare namespace Connections {
|
|
|
516
556
|
};
|
|
517
557
|
|
|
518
558
|
export {
|
|
519
|
-
|
|
520
|
-
type
|
|
521
|
-
type
|
|
522
|
-
type
|
|
559
|
+
Subscriptions as Subscriptions,
|
|
560
|
+
type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
|
|
561
|
+
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
562
|
+
type SubscriptionListParams as SubscriptionListParams,
|
|
563
|
+
type SubscriptionDeleteParams as SubscriptionDeleteParams,
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
export {
|
|
567
|
+
Triggers as Triggers,
|
|
568
|
+
type CreateTriggerRequest as CreateTriggerRequest,
|
|
569
|
+
type TriggerDefinition as TriggerDefinition,
|
|
570
|
+
type TriggerDefinitionList as TriggerDefinitionList,
|
|
571
|
+
type TriggerInstance as TriggerInstance,
|
|
572
|
+
type TriggerDeleteResponse as TriggerDeleteResponse,
|
|
573
|
+
type TriggerCreateParams as TriggerCreateParams,
|
|
574
|
+
type TriggerListParams as TriggerListParams,
|
|
575
|
+
type TriggerDeleteParams as TriggerDeleteParams,
|
|
576
|
+
type TriggerGetParams as TriggerGetParams,
|
|
577
|
+
type TriggerGetInstanceParams as TriggerGetInstanceParams,
|
|
523
578
|
};
|
|
524
579
|
}
|
|
@@ -12,4 +12,23 @@ export {
|
|
|
12
12
|
type ConnectionGetParams,
|
|
13
13
|
type ConnectionSetParams,
|
|
14
14
|
} from './connections';
|
|
15
|
-
export {
|
|
15
|
+
export {
|
|
16
|
+
Subscriptions,
|
|
17
|
+
type SubscriptionDeleteResponse,
|
|
18
|
+
type SubscriptionCreateParams,
|
|
19
|
+
type SubscriptionListParams,
|
|
20
|
+
type SubscriptionDeleteParams,
|
|
21
|
+
} from './subscriptions';
|
|
22
|
+
export {
|
|
23
|
+
Triggers,
|
|
24
|
+
type CreateTriggerRequest,
|
|
25
|
+
type TriggerDefinition,
|
|
26
|
+
type TriggerDefinitionList,
|
|
27
|
+
type TriggerInstance,
|
|
28
|
+
type TriggerDeleteResponse,
|
|
29
|
+
type TriggerCreateParams,
|
|
30
|
+
type TriggerListParams,
|
|
31
|
+
type TriggerDeleteParams,
|
|
32
|
+
type TriggerGetParams,
|
|
33
|
+
type TriggerGetInstanceParams,
|
|
34
|
+
} from './triggers';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as SubscriptionsAPI from '../subscriptions';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Subscriptions extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a connection-scoped subscription that receives events from one
|
|
12
|
+
* connection.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const createSubscriptionResponse =
|
|
17
|
+
* await client.connections.subscriptions.create(
|
|
18
|
+
* 'connectionId',
|
|
19
|
+
* { namespace: 'namespace' },
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(
|
|
24
|
+
connectionID: string,
|
|
25
|
+
params: SubscriptionCreateParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): APIPromise<SubscriptionsAPI.CreateSubscriptionResponse> {
|
|
28
|
+
const { namespace } = params;
|
|
29
|
+
return this._client.post(path`/${namespace}/${connectionID}/.subscriptions`, {
|
|
30
|
+
defaultBaseURL: 'https://smithery.run',
|
|
31
|
+
...options,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* List trigger subscriptions scoped to a single connection.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const subscriptionList =
|
|
41
|
+
* await client.connections.subscriptions.list(
|
|
42
|
+
* 'connectionId',
|
|
43
|
+
* { namespace: 'namespace' },
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
list(
|
|
48
|
+
connectionID: string,
|
|
49
|
+
params: SubscriptionListParams,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): APIPromise<SubscriptionsAPI.SubscriptionList> {
|
|
52
|
+
const { namespace } = params;
|
|
53
|
+
return this._client.get(path`/${namespace}/${connectionID}/.subscriptions`, {
|
|
54
|
+
defaultBaseURL: 'https://smithery.run',
|
|
55
|
+
...options,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Delete a connection-scoped trigger subscription.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const subscription =
|
|
65
|
+
* await client.connections.subscriptions.delete(
|
|
66
|
+
* 'subscriptionId',
|
|
67
|
+
* {
|
|
68
|
+
* namespace: 'namespace',
|
|
69
|
+
* connectionId: 'connectionId',
|
|
70
|
+
* },
|
|
71
|
+
* );
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
delete(
|
|
75
|
+
subscriptionID: string,
|
|
76
|
+
params: SubscriptionDeleteParams,
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): APIPromise<SubscriptionDeleteResponse> {
|
|
79
|
+
const { namespace, connectionId } = params;
|
|
80
|
+
return this._client.delete(path`/${namespace}/${connectionId}/.subscriptions/${subscriptionID}`, {
|
|
81
|
+
defaultBaseURL: 'https://smithery.run',
|
|
82
|
+
...options,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface SubscriptionDeleteResponse {
|
|
88
|
+
success: true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface SubscriptionCreateParams {
|
|
92
|
+
namespace: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface SubscriptionListParams {
|
|
96
|
+
namespace: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface SubscriptionDeleteParams {
|
|
100
|
+
namespace: string;
|
|
101
|
+
|
|
102
|
+
connectionId: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export declare namespace Subscriptions {
|
|
106
|
+
export {
|
|
107
|
+
type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
|
|
108
|
+
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
109
|
+
type SubscriptionListParams as SubscriptionListParams,
|
|
110
|
+
type SubscriptionDeleteParams as SubscriptionDeleteParams,
|
|
111
|
+
};
|
|
112
|
+
}
|