@smithery/api 0.46.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +5 -10
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.mts +1 -1
  11. package/resources/index.d.mts.map +1 -1
  12. package/resources/index.d.ts +1 -1
  13. package/resources/index.d.ts.map +1 -1
  14. package/resources/index.js.map +1 -1
  15. package/resources/index.mjs.map +1 -1
  16. package/resources/servers/deployments.d.mts +61 -309
  17. package/resources/servers/deployments.d.mts.map +1 -1
  18. package/resources/servers/deployments.d.ts +61 -309
  19. package/resources/servers/deployments.d.ts.map +1 -1
  20. package/resources/servers/deployments.js +25 -112
  21. package/resources/servers/deployments.js.map +1 -1
  22. package/resources/servers/deployments.mjs +25 -112
  23. package/resources/servers/deployments.mjs.map +1 -1
  24. package/resources/servers/domains.d.mts +176 -0
  25. package/resources/servers/domains.d.mts.map +1 -0
  26. package/resources/servers/domains.d.ts +176 -0
  27. package/resources/servers/domains.d.ts.map +1 -0
  28. package/resources/servers/domains.js +67 -0
  29. package/resources/servers/domains.js.map +1 -0
  30. package/resources/servers/domains.mjs +63 -0
  31. package/resources/servers/domains.mjs.map +1 -0
  32. package/resources/servers/index.d.mts +6 -5
  33. package/resources/servers/index.d.mts.map +1 -1
  34. package/resources/servers/index.d.ts +6 -5
  35. package/resources/servers/index.d.ts.map +1 -1
  36. package/resources/servers/index.js +3 -1
  37. package/resources/servers/index.js.map +1 -1
  38. package/resources/servers/index.mjs +2 -1
  39. package/resources/servers/index.mjs.map +1 -1
  40. package/resources/servers/logs.d.mts +5 -79
  41. package/resources/servers/logs.d.mts.map +1 -1
  42. package/resources/servers/logs.d.ts +5 -79
  43. package/resources/servers/logs.d.ts.map +1 -1
  44. package/resources/servers/logs.js +5 -21
  45. package/resources/servers/logs.js.map +1 -1
  46. package/resources/servers/logs.mjs +5 -21
  47. package/resources/servers/logs.mjs.map +1 -1
  48. package/resources/servers/repo.d.mts +13 -103
  49. package/resources/servers/repo.d.mts.map +1 -1
  50. package/resources/servers/repo.d.ts +13 -103
  51. package/resources/servers/repo.d.ts.map +1 -1
  52. package/resources/servers/repo.js +15 -61
  53. package/resources/servers/repo.js.map +1 -1
  54. package/resources/servers/repo.mjs +15 -61
  55. package/resources/servers/repo.mjs.map +1 -1
  56. package/resources/servers/secrets.d.mts +14 -85
  57. package/resources/servers/secrets.d.mts.map +1 -1
  58. package/resources/servers/secrets.d.ts +14 -85
  59. package/resources/servers/secrets.d.ts.map +1 -1
  60. package/resources/servers/secrets.js +13 -63
  61. package/resources/servers/secrets.js.map +1 -1
  62. package/resources/servers/secrets.mjs +13 -63
  63. package/resources/servers/secrets.mjs.map +1 -1
  64. package/resources/servers/servers.d.mts +30 -182
  65. package/resources/servers/servers.d.mts.map +1 -1
  66. package/resources/servers/servers.d.ts +30 -182
  67. package/resources/servers/servers.d.ts.map +1 -1
  68. package/resources/servers/servers.js +26 -79
  69. package/resources/servers/servers.js.map +1 -1
  70. package/resources/servers/servers.mjs +28 -81
  71. package/resources/servers/servers.mjs.map +1 -1
  72. package/src/client.ts +0 -16
  73. package/src/resources/index.ts +0 -8
  74. package/src/resources/servers/deployments.ts +69 -425
  75. package/src/resources/servers/domains.ts +270 -0
  76. package/src/resources/servers/index.ts +10 -36
  77. package/src/resources/servers/logs.ts +9 -118
  78. package/src/resources/servers/repo.ts +15 -150
  79. package/src/resources/servers/secrets.ts +17 -126
  80. package/src/resources/servers/servers.ts +51 -319
  81. package/src/version.ts +1 -1
  82. package/version.d.mts +1 -1
  83. package/version.d.ts +1 -1
  84. package/version.js +1 -1
  85. package/version.mjs +1 -1
@@ -7,98 +7,45 @@ import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Repo extends APIResource {
9
9
  /**
10
- * Disconnect the GitHub repository connection from a server.
10
+ * Remove the GitHub repository connection.
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
- * const repo = await client.servers.repo.delete('server', {
15
- * namespace: 'namespace',
16
- * });
17
- * ```
18
- */
19
- delete(server: string, params: RepoDeleteParams, options?: RequestOptions): APIPromise<RepoDeleteResponse> {
20
- const { namespace } = params;
21
- return this._client.delete(path`/servers/${namespace}/${server}/repo`, options);
22
- }
23
-
24
- /**
25
- * Disconnect the GitHub repository connection from a server.
26
- *
27
- * @example
28
- * ```ts
29
- * const response =
30
- * await client.servers.repo.deleteByNamespace('namespace');
31
- * ```
32
- */
33
- deleteByNamespace(namespace: string, options?: RequestOptions): APIPromise<RepoDeleteByNamespaceResponse> {
34
- return this._client.delete(path`/servers/${namespace}/repo`, options);
35
- }
36
-
37
- /**
38
- * Get the GitHub repository connection for a server, if one exists.
39
- *
40
- * @example
41
- * ```ts
42
- * const repo = await client.servers.repo.get('server', {
43
- * namespace: 'namespace',
44
- * });
45
- * ```
46
- */
47
- get(server: string, params: RepoGetParams, options?: RequestOptions): APIPromise<RepoGetResponse> {
48
- const { namespace } = params;
49
- return this._client.get(path`/servers/${namespace}/${server}/repo`, options);
50
- }
51
-
52
- /**
53
- * Get the GitHub repository connection for a server, if one exists.
54
- *
55
- * @example
56
- * ```ts
57
- * const response = await client.servers.repo.getByNamespace(
58
- * 'namespace',
14
+ * const repo = await client.servers.repo.delete(
15
+ * 'qualifiedName',
59
16
  * );
60
17
  * ```
61
18
  */
62
- getByNamespace(namespace: string, options?: RequestOptions): APIPromise<RepoGetByNamespaceResponse> {
63
- return this._client.get(path`/servers/${namespace}/repo`, options);
19
+ delete(qualifiedName: string, options?: RequestOptions): APIPromise<RepoDeleteResponse> {
20
+ return this._client.delete(path`/servers/${qualifiedName}/repo`, options);
64
21
  }
65
22
 
66
23
  /**
67
- * Upsert a GitHub repository connection for a server. Creates a new connection if
68
- * none exists, or updates the existing one.
24
+ * Get the connected GitHub repository, if one exists.
69
25
  *
70
26
  * @example
71
27
  * ```ts
72
- * const response = await client.servers.repo.set('server', {
73
- * namespace: 'namespace',
74
- * repoName: 'x',
75
- * repoOwner: 'x',
76
- * });
28
+ * const repo = await client.servers.repo.get('qualifiedName');
77
29
  * ```
78
30
  */
79
- set(server: string, params: RepoSetParams, options?: RequestOptions): APIPromise<RepoSetResponse> {
80
- const { namespace, ...body } = params;
81
- return this._client.put(path`/servers/${namespace}/${server}/repo`, { body, ...options });
31
+ get(qualifiedName: string, options?: RequestOptions): APIPromise<RepoGetResponse> {
32
+ return this._client.get(path`/servers/${qualifiedName}/repo`, options);
82
33
  }
83
34
 
84
35
  /**
85
- * Upsert a GitHub repository connection for a server. Creates a new connection if
86
- * none exists, or updates the existing one.
36
+ * Create or update the GitHub repository connection. Idempotent updates if a
37
+ * connection already exists.
87
38
  *
88
39
  * @example
89
40
  * ```ts
90
- * const response = await client.servers.repo.setByNamespace(
91
- * 'namespace',
41
+ * const response = await client.servers.repo.set(
42
+ * 'qualifiedName',
92
43
  * { repoName: 'x', repoOwner: 'x' },
93
44
  * );
94
45
  * ```
95
46
  */
96
- setByNamespace(
97
- namespace: string,
98
- body: RepoSetByNamespaceParams,
99
- options?: RequestOptions,
100
- ): APIPromise<RepoSetByNamespaceResponse> {
101
- return this._client.put(path`/servers/${namespace}/repo`, { body, ...options });
47
+ set(qualifiedName: string, body: RepoSetParams, options?: RequestOptions): APIPromise<RepoSetResponse> {
48
+ return this._client.put(path`/servers/${qualifiedName}/repo`, { body, ...options });
102
49
  }
103
50
  }
104
51
 
@@ -106,10 +53,6 @@ export interface RepoDeleteResponse {
106
53
  success: boolean;
107
54
  }
108
55
 
109
- export interface RepoDeleteByNamespaceResponse {
110
- success: boolean;
111
- }
112
-
113
56
  export interface RepoGetResponse {
114
57
  autoDeploy: boolean | null;
115
58
 
@@ -126,22 +69,6 @@ export interface RepoGetResponse {
126
69
  type: 'github';
127
70
  }
128
71
 
129
- export interface RepoGetByNamespaceResponse {
130
- autoDeploy: boolean | null;
131
-
132
- baseDirectory: string;
133
-
134
- branch: string | null;
135
-
136
- isPrivate: boolean;
137
-
138
- repoName: string;
139
-
140
- repoOwner: string;
141
-
142
- type: 'github';
143
- }
144
-
145
72
  export interface RepoSetResponse {
146
73
  autoDeploy: boolean | null;
147
74
 
@@ -158,63 +85,7 @@ export interface RepoSetResponse {
158
85
  type: 'github';
159
86
  }
160
87
 
161
- export interface RepoSetByNamespaceResponse {
162
- autoDeploy: boolean | null;
163
-
164
- baseDirectory: string;
165
-
166
- branch: string | null;
167
-
168
- isPrivate: boolean;
169
-
170
- repoName: string;
171
-
172
- repoOwner: string;
173
-
174
- type: 'github';
175
- }
176
-
177
- export interface RepoDeleteParams {
178
- namespace: string;
179
- }
180
-
181
- export interface RepoGetParams {
182
- namespace: string;
183
- }
184
-
185
88
  export interface RepoSetParams {
186
- /**
187
- * Path param
188
- */
189
- namespace: string;
190
-
191
- /**
192
- * Body param
193
- */
194
- repoName: string;
195
-
196
- /**
197
- * Body param
198
- */
199
- repoOwner: string;
200
-
201
- /**
202
- * Body param
203
- */
204
- autoDeploy?: boolean;
205
-
206
- /**
207
- * Body param
208
- */
209
- baseDirectory?: string;
210
-
211
- /**
212
- * Body param
213
- */
214
- branch?: string | null;
215
- }
216
-
217
- export interface RepoSetByNamespaceParams {
218
89
  repoName: string;
219
90
 
220
91
  repoOwner: string;
@@ -229,14 +100,8 @@ export interface RepoSetByNamespaceParams {
229
100
  export declare namespace Repo {
230
101
  export {
231
102
  type RepoDeleteResponse as RepoDeleteResponse,
232
- type RepoDeleteByNamespaceResponse as RepoDeleteByNamespaceResponse,
233
103
  type RepoGetResponse as RepoGetResponse,
234
- type RepoGetByNamespaceResponse as RepoGetByNamespaceResponse,
235
104
  type RepoSetResponse as RepoSetResponse,
236
- type RepoSetByNamespaceResponse as RepoSetByNamespaceResponse,
237
- type RepoDeleteParams as RepoDeleteParams,
238
- type RepoGetParams as RepoGetParams,
239
105
  type RepoSetParams as RepoSetParams,
240
- type RepoSetByNamespaceParams as RepoSetByNamespaceParams,
241
106
  };
242
107
  }
@@ -7,29 +7,27 @@ import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Secrets extends APIResource {
9
9
  /**
10
- * Fetch secret names for the server. Values are not returned.
10
+ * List secret names. Values are not returned.
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
14
  * const secrets = await client.servers.secrets.list(
15
- * 'server',
16
- * { namespace: 'namespace' },
15
+ * 'qualifiedName',
17
16
  * );
18
17
  * ```
19
18
  */
20
- list(server: string, params: SecretListParams, options?: RequestOptions): APIPromise<SecretListResponse> {
21
- const { namespace } = params;
22
- return this._client.get(path`/servers/${namespace}/${server}/secrets`, options);
19
+ list(qualifiedName: string, options?: RequestOptions): APIPromise<SecretListResponse> {
20
+ return this._client.get(path`/servers/${qualifiedName}/secrets`, options);
23
21
  }
24
22
 
25
23
  /**
26
- * Delete a secret by name from the server.
24
+ * Remove a secret by name.
27
25
  *
28
26
  * @example
29
27
  * ```ts
30
28
  * const secret = await client.servers.secrets.delete(
31
29
  * 'secretName',
32
- * { namespace: 'namespace', server: 'server' },
30
+ * { qualifiedName: 'qualifiedName' },
33
31
  * );
34
32
  * ```
35
33
  */
@@ -38,82 +36,23 @@ export class Secrets extends APIResource {
38
36
  params: SecretDeleteParams,
39
37
  options?: RequestOptions,
40
38
  ): APIPromise<SecretDeleteResponse> {
41
- const { namespace, server } = params;
42
- return this._client.delete(path`/servers/${namespace}/${server}/secrets/${secretName}`, options);
39
+ const { qualifiedName } = params;
40
+ return this._client.delete(path`/servers/${qualifiedName}/secrets/${secretName}`, options);
43
41
  }
44
42
 
45
43
  /**
46
- * Delete a secret by name from the server.
47
- *
48
- * @example
49
- * ```ts
50
- * const response =
51
- * await client.servers.secrets.deleteByNamespace(
52
- * 'secretName',
53
- * { namespace: 'namespace' },
54
- * );
55
- * ```
56
- */
57
- deleteByNamespace(
58
- secretName: string,
59
- params: SecretDeleteByNamespaceParams,
60
- options?: RequestOptions,
61
- ): APIPromise<SecretDeleteByNamespaceResponse> {
62
- const { namespace } = params;
63
- return this._client.delete(path`/servers/${namespace}/secrets/${secretName}`, options);
64
- }
65
-
66
- /**
67
- * Fetch secret names for the server. Values are not returned.
68
- *
69
- * @example
70
- * ```ts
71
- * const response =
72
- * await client.servers.secrets.listByNamespace('namespace');
73
- * ```
74
- */
75
- listByNamespace(namespace: string, options?: RequestOptions): APIPromise<SecretListByNamespaceResponse> {
76
- return this._client.get(path`/servers/${namespace}/secrets`, options);
77
- }
78
-
79
- /**
80
- * Set a secret value for the server.
44
+ * Create or update a secret value.
81
45
  *
82
46
  * @example
83
47
  * ```ts
84
48
  * const response = await client.servers.secrets.set(
85
- * 'server',
86
- * {
87
- * namespace: 'namespace',
88
- * name: 'x',
89
- * value: 'x',
90
- * },
49
+ * 'qualifiedName',
50
+ * { name: 'x', value: 'x' },
91
51
  * );
92
52
  * ```
93
53
  */
94
- set(server: string, params: SecretSetParams, options?: RequestOptions): APIPromise<SecretSetResponse> {
95
- const { namespace, ...body } = params;
96
- return this._client.put(path`/servers/${namespace}/${server}/secrets`, { body, ...options });
97
- }
98
-
99
- /**
100
- * Set a secret value for the server.
101
- *
102
- * @example
103
- * ```ts
104
- * const response =
105
- * await client.servers.secrets.setByNamespace('namespace', {
106
- * name: 'x',
107
- * value: 'x',
108
- * });
109
- * ```
110
- */
111
- setByNamespace(
112
- namespace: string,
113
- body: SecretSetByNamespaceParams,
114
- options?: RequestOptions,
115
- ): APIPromise<SecretSetByNamespaceResponse> {
116
- return this._client.put(path`/servers/${namespace}/secrets`, { body, ...options });
54
+ set(qualifiedName: string, body: SecretSetParams, options?: RequestOptions): APIPromise<SecretSetResponse> {
55
+ return this._client.put(path`/servers/${qualifiedName}/secrets`, { body, ...options });
117
56
  }
118
57
  }
119
58
 
@@ -131,61 +70,19 @@ export interface SecretDeleteResponse {
131
70
  success: boolean;
132
71
  }
133
72
 
134
- export interface SecretDeleteByNamespaceResponse {
135
- success: boolean;
136
- }
137
-
138
- export type SecretListByNamespaceResponse =
139
- Array<SecretListByNamespaceResponse.SecretListByNamespaceResponseItem>;
140
-
141
- export namespace SecretListByNamespaceResponse {
142
- export interface SecretListByNamespaceResponseItem {
143
- name: string;
144
-
145
- type: string;
146
- }
147
- }
148
-
149
73
  export interface SecretSetResponse {
150
74
  success: boolean;
151
75
  }
152
76
 
153
- export interface SecretSetByNamespaceResponse {
154
- success: boolean;
155
- }
156
-
157
- export interface SecretListParams {
158
- namespace: string;
159
- }
160
-
161
77
  export interface SecretDeleteParams {
162
- namespace: string;
163
-
164
- server: string;
165
- }
166
-
167
- export interface SecretDeleteByNamespaceParams {
168
- namespace: string;
169
- }
170
-
171
- export interface SecretSetParams {
172
- /**
173
- * Path param
174
- */
175
- namespace: string;
176
-
177
78
  /**
178
- * Body param
79
+ * The server's qualified name (e.g. 'namespace/server' or 'namespace' for
80
+ * namespace-only servers). Use %2F to encode the slash.
179
81
  */
180
- name: string;
181
-
182
- /**
183
- * Body param
184
- */
185
- value: string;
82
+ qualifiedName: string;
186
83
  }
187
84
 
188
- export interface SecretSetByNamespaceParams {
85
+ export interface SecretSetParams {
189
86
  name: string;
190
87
 
191
88
  value: string;
@@ -195,14 +92,8 @@ export declare namespace Secrets {
195
92
  export {
196
93
  type SecretListResponse as SecretListResponse,
197
94
  type SecretDeleteResponse as SecretDeleteResponse,
198
- type SecretDeleteByNamespaceResponse as SecretDeleteByNamespaceResponse,
199
- type SecretListByNamespaceResponse as SecretListByNamespaceResponse,
200
95
  type SecretSetResponse as SecretSetResponse,
201
- type SecretSetByNamespaceResponse as SecretSetByNamespaceResponse,
202
- type SecretListParams as SecretListParams,
203
96
  type SecretDeleteParams as SecretDeleteParams,
204
- type SecretDeleteByNamespaceParams as SecretDeleteByNamespaceParams,
205
97
  type SecretSetParams as SecretSetParams,
206
- type SecretSetByNamespaceParams as SecretSetByNamespaceParams,
207
98
  };
208
99
  }