@smithery/api 0.56.1 → 0.58.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 (176) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/client.d.mts +5 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +4 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +4 -1
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +0 -23
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +0 -23
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +1 -23
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +0 -21
  17. package/core/pagination.mjs.map +1 -1
  18. package/internal/utils/env.js +2 -2
  19. package/internal/utils/env.js.map +1 -1
  20. package/internal/utils/env.mjs +2 -2
  21. package/internal/utils/env.mjs.map +1 -1
  22. package/package.json +1 -1
  23. package/resources/connections/connections.d.mts +35 -22
  24. package/resources/connections/connections.d.mts.map +1 -1
  25. package/resources/connections/connections.d.ts +35 -22
  26. package/resources/connections/connections.d.ts.map +1 -1
  27. package/resources/connections/connections.js +3 -2
  28. package/resources/connections/connections.js.map +1 -1
  29. package/resources/connections/connections.mjs +3 -2
  30. package/resources/connections/connections.mjs.map +1 -1
  31. package/resources/index.d.mts +2 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +2 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +4 -2
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +2 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/namespaces/namespaces.d.mts +4 -3
  40. package/resources/namespaces/namespaces.d.mts.map +1 -1
  41. package/resources/namespaces/namespaces.d.ts +4 -3
  42. package/resources/namespaces/namespaces.d.ts.map +1 -1
  43. package/resources/namespaces/namespaces.js +4 -3
  44. package/resources/namespaces/namespaces.js.map +1 -1
  45. package/resources/namespaces/namespaces.mjs +4 -3
  46. package/resources/namespaces/namespaces.mjs.map +1 -1
  47. package/resources/organizations/api-keys.d.mts +43 -0
  48. package/resources/organizations/api-keys.d.mts.map +1 -0
  49. package/resources/organizations/api-keys.d.ts +43 -0
  50. package/resources/organizations/api-keys.d.ts.map +1 -0
  51. package/resources/organizations/api-keys.js +30 -0
  52. package/resources/organizations/api-keys.js.map +1 -0
  53. package/resources/organizations/api-keys.mjs +26 -0
  54. package/resources/organizations/api-keys.mjs.map +1 -0
  55. package/resources/organizations/index.d.mts +3 -0
  56. package/resources/organizations/index.d.mts.map +1 -0
  57. package/resources/organizations/index.d.ts +3 -0
  58. package/resources/organizations/index.d.ts.map +1 -0
  59. package/resources/organizations/index.js +9 -0
  60. package/resources/organizations/index.js.map +1 -0
  61. package/resources/organizations/index.mjs +4 -0
  62. package/resources/organizations/index.mjs.map +1 -0
  63. package/resources/organizations/organizations.d.mts +10 -0
  64. package/resources/organizations/organizations.d.mts.map +1 -0
  65. package/resources/organizations/organizations.d.ts +10 -0
  66. package/resources/organizations/organizations.d.ts.map +1 -0
  67. package/resources/organizations/organizations.js +17 -0
  68. package/resources/organizations/organizations.js.map +1 -0
  69. package/resources/organizations/organizations.mjs +12 -0
  70. package/resources/organizations/organizations.mjs.map +1 -0
  71. package/resources/organizations.d.mts +2 -0
  72. package/resources/organizations.d.mts.map +1 -0
  73. package/resources/organizations.d.ts +2 -0
  74. package/resources/organizations.d.ts.map +1 -0
  75. package/resources/organizations.js +6 -0
  76. package/resources/organizations.js.map +1 -0
  77. package/resources/organizations.mjs +3 -0
  78. package/resources/organizations.mjs.map +1 -0
  79. package/resources/servers/domains.d.mts +13 -122
  80. package/resources/servers/domains.d.mts.map +1 -1
  81. package/resources/servers/domains.d.ts +13 -122
  82. package/resources/servers/domains.d.ts.map +1 -1
  83. package/resources/servers/domains.js +6 -32
  84. package/resources/servers/domains.js.map +1 -1
  85. package/resources/servers/domains.mjs +6 -32
  86. package/resources/servers/domains.mjs.map +1 -1
  87. package/resources/servers/index.d.mts +1 -1
  88. package/resources/servers/index.d.mts.map +1 -1
  89. package/resources/servers/index.d.ts +1 -1
  90. package/resources/servers/index.d.ts.map +1 -1
  91. package/resources/servers/index.js.map +1 -1
  92. package/resources/servers/index.mjs.map +1 -1
  93. package/resources/servers/releases.d.mts +0 -12
  94. package/resources/servers/releases.d.mts.map +1 -1
  95. package/resources/servers/releases.d.ts +0 -12
  96. package/resources/servers/releases.d.ts.map +1 -1
  97. package/resources/servers/servers.d.mts +4 -15
  98. package/resources/servers/servers.d.mts.map +1 -1
  99. package/resources/servers/servers.d.ts +4 -15
  100. package/resources/servers/servers.d.ts.map +1 -1
  101. package/resources/servers/servers.js.map +1 -1
  102. package/resources/servers/servers.mjs +1 -1
  103. package/resources/servers/servers.mjs.map +1 -1
  104. package/resources/skills.d.mts +273 -1
  105. package/resources/skills.d.mts.map +1 -1
  106. package/resources/skills.d.ts +273 -1
  107. package/resources/skills.d.ts.map +1 -1
  108. package/resources/skills.js +78 -2
  109. package/resources/skills.js.map +1 -1
  110. package/resources/skills.mjs +76 -1
  111. package/resources/skills.mjs.map +1 -1
  112. package/resources/tokens.d.mts +17 -0
  113. package/resources/tokens.d.mts.map +1 -1
  114. package/resources/tokens.d.ts +17 -0
  115. package/resources/tokens.d.ts.map +1 -1
  116. package/resources/tokens.js +5 -0
  117. package/resources/tokens.js.map +1 -1
  118. package/resources/tokens.mjs +5 -0
  119. package/resources/tokens.mjs.map +1 -1
  120. package/src/client.ts +24 -24
  121. package/src/core/pagination.ts +0 -59
  122. package/src/internal/utils/env.ts +2 -2
  123. package/src/resources/connections/connections.ts +44 -24
  124. package/src/resources/index.ts +2 -1
  125. package/src/resources/namespaces/namespaces.ts +4 -3
  126. package/src/resources/organizations/api-keys.ts +78 -0
  127. package/src/resources/organizations/index.ts +11 -0
  128. package/src/resources/organizations/organizations.ts +29 -0
  129. package/src/resources/organizations.ts +3 -0
  130. package/src/resources/servers/domains.ts +12 -182
  131. package/src/resources/servers/index.ts +0 -4
  132. package/src/resources/servers/releases.ts +0 -14
  133. package/src/resources/servers/servers.ts +3 -29
  134. package/src/resources/skills.ts +427 -1
  135. package/src/resources/tokens.ts +19 -0
  136. package/src/version.ts +1 -1
  137. package/version.d.mts +1 -1
  138. package/version.d.ts +1 -1
  139. package/version.js +1 -1
  140. package/version.mjs +1 -1
  141. package/resources/skills/index.d.mts +0 -4
  142. package/resources/skills/index.d.mts.map +0 -1
  143. package/resources/skills/index.d.ts +0 -4
  144. package/resources/skills/index.d.ts.map +0 -1
  145. package/resources/skills/index.js +0 -11
  146. package/resources/skills/index.js.map +0 -1
  147. package/resources/skills/index.mjs +0 -5
  148. package/resources/skills/index.mjs.map +0 -1
  149. package/resources/skills/reviews.d.mts +0 -160
  150. package/resources/skills/reviews.d.mts.map +0 -1
  151. package/resources/skills/reviews.d.ts +0 -160
  152. package/resources/skills/reviews.d.ts.map +0 -1
  153. package/resources/skills/reviews.js +0 -74
  154. package/resources/skills/reviews.js.map +0 -1
  155. package/resources/skills/reviews.mjs +0 -70
  156. package/resources/skills/reviews.mjs.map +0 -1
  157. package/resources/skills/skills.d.mts +0 -297
  158. package/resources/skills/skills.d.mts.map +0 -1
  159. package/resources/skills/skills.d.ts +0 -297
  160. package/resources/skills/skills.d.ts.map +0 -1
  161. package/resources/skills/skills.js +0 -94
  162. package/resources/skills/skills.js.map +0 -1
  163. package/resources/skills/skills.mjs +0 -89
  164. package/resources/skills/skills.mjs.map +0 -1
  165. package/resources/skills/votes.d.mts +0 -72
  166. package/resources/skills/votes.d.mts.map +0 -1
  167. package/resources/skills/votes.d.ts +0 -72
  168. package/resources/skills/votes.d.ts.map +0 -1
  169. package/resources/skills/votes.js +0 -46
  170. package/resources/skills/votes.js.map +0 -1
  171. package/resources/skills/votes.mjs +0 -42
  172. package/resources/skills/votes.mjs.map +0 -1
  173. package/src/resources/skills/index.ts +0 -47
  174. package/src/resources/skills/reviews.ts +0 -254
  175. package/src/resources/skills/skills.ts +0 -512
  176. package/src/resources/skills/votes.ts +0 -110
package/src/client.ts CHANGED
@@ -21,8 +21,6 @@ import {
21
21
  NamespacesPageResponse,
22
22
  type ReleasesPageParams,
23
23
  ReleasesPageResponse,
24
- type ReviewsPageParams,
25
- ReviewsPageResponse,
26
24
  type SkillsPageParams,
27
25
  SkillsPageResponse,
28
26
  type SmitheryPageParams,
@@ -32,6 +30,25 @@ import * as Uploads from './core/uploads';
32
30
  import * as API from './resources/index';
33
31
  import { APIPromise } from './core/api-promise';
34
32
  import { Health, HealthCheckResponse } from './resources/health';
33
+ import {
34
+ SkillCreateParams,
35
+ SkillCreateResponse,
36
+ SkillDeleteParams,
37
+ SkillDeleteResponse,
38
+ SkillDownloadParams,
39
+ SkillGetParams,
40
+ SkillGetResponse,
41
+ SkillListParams,
42
+ SkillListResponse,
43
+ SkillListResponsesSkillsPage,
44
+ SkillSetParams,
45
+ SkillSetResponse,
46
+ SkillSyncParams,
47
+ SkillSyncResponse,
48
+ SkillUploadParams,
49
+ SkillUploadResponse,
50
+ Skills,
51
+ } from './resources/skills';
35
52
  import {
36
53
  Constraint,
37
54
  CreateTokenRequest,
@@ -61,6 +78,7 @@ import {
61
78
  NamespaceSetResponse,
62
79
  Namespaces,
63
80
  } from './resources/namespaces/namespaces';
81
+ import { Organizations } from './resources/organizations/organizations';
64
82
  import {
65
83
  BuildConfig,
66
84
  DeploymentTarget,
@@ -76,25 +94,6 @@ import {
76
94
  ServerUpdateResponse,
77
95
  Servers,
78
96
  } from './resources/servers/servers';
79
- import {
80
- SkillCreateParams,
81
- SkillCreateResponse,
82
- SkillDeleteParams,
83
- SkillDeleteResponse,
84
- SkillDownloadParams,
85
- SkillGetParams,
86
- SkillGetResponse,
87
- SkillListParams,
88
- SkillListResponse,
89
- SkillListResponsesSkillsPage,
90
- SkillSetParams,
91
- SkillSetResponse,
92
- SkillSyncParams,
93
- SkillSyncResponse,
94
- SkillUploadParams,
95
- SkillUploadResponse,
96
- Skills,
97
- } from './resources/skills/skills';
98
97
  import { type Fetch } from './internal/builtin-types';
99
98
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
100
99
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -830,6 +829,7 @@ export class Smithery {
830
829
  */
831
830
  skills: API.Skills = new API.Skills(this);
832
831
  namespaces: API.Namespaces = new API.Namespaces(this);
832
+ organizations: API.Organizations = new API.Organizations(this);
833
833
  tokens: API.Tokens = new API.Tokens(this);
834
834
  connections: API.Connections = new API.Connections(this);
835
835
  }
@@ -839,6 +839,7 @@ Smithery.Servers = Servers;
839
839
  Smithery.Uplink = Uplink;
840
840
  Smithery.Skills = Skills;
841
841
  Smithery.Namespaces = Namespaces;
842
+ Smithery.Organizations = Organizations;
842
843
  Smithery.Tokens = Tokens;
843
844
  Smithery.Connections = Connections;
844
845
 
@@ -857,9 +858,6 @@ export declare namespace Smithery {
857
858
  type NamespacesPageResponse as NamespacesPageResponse,
858
859
  };
859
860
 
860
- export import ReviewsPage = Pagination.ReviewsPage;
861
- export { type ReviewsPageParams as ReviewsPageParams, type ReviewsPageResponse as ReviewsPageResponse };
862
-
863
861
  export import ReleasesPage = Pagination.ReleasesPage;
864
862
  export { type ReleasesPageParams as ReleasesPageParams, type ReleasesPageResponse as ReleasesPageResponse };
865
863
 
@@ -913,6 +911,8 @@ export declare namespace Smithery {
913
911
  type NamespaceListParams as NamespaceListParams,
914
912
  };
915
913
 
914
+ export { Organizations as Organizations };
915
+
916
916
  export {
917
917
  Tokens as Tokens,
918
918
  type Constraint as Constraint,
@@ -284,65 +284,6 @@ export class NamespacesPage<Item> extends AbstractPage<Item> implements Namespac
284
284
  }
285
285
  }
286
286
 
287
- export interface ReviewsPageResponse<Item> {
288
- reviews: Array<Item>;
289
-
290
- pagination: ReviewsPageResponse.Pagination;
291
- }
292
-
293
- export namespace ReviewsPageResponse {
294
- export interface Pagination {
295
- currentPage?: number;
296
-
297
- pageSize?: number;
298
-
299
- totalCount?: number;
300
-
301
- totalPages?: number;
302
- }
303
- }
304
-
305
- export interface ReviewsPageParams {
306
- page?: number;
307
-
308
- limit?: number;
309
- }
310
-
311
- export class ReviewsPage<Item> extends AbstractPage<Item> implements ReviewsPageResponse<Item> {
312
- reviews: Array<Item>;
313
-
314
- pagination: ReviewsPageResponse.Pagination;
315
-
316
- constructor(
317
- client: Smithery,
318
- response: Response,
319
- body: ReviewsPageResponse<Item>,
320
- options: FinalRequestOptions,
321
- ) {
322
- super(client, response, body, options);
323
-
324
- this.reviews = body.reviews || [];
325
- this.pagination = body.pagination || {};
326
- }
327
-
328
- getPaginatedItems(): Item[] {
329
- return this.reviews ?? [];
330
- }
331
-
332
- nextPageRequestOptions(): PageRequestOptions | null {
333
- const query = this.options.query as ReviewsPageParams;
334
- const currentPage = query?.page ?? 1;
335
-
336
- return {
337
- ...this.options,
338
- query: {
339
- ...maybeObj(this.options.query),
340
- page: currentPage + 1,
341
- },
342
- };
343
- }
344
- }
345
-
346
287
  export interface ReleasesPageResponse<Item> {
347
288
  releases: Array<Item>;
348
289
 
@@ -9,10 +9,10 @@
9
9
  */
10
10
  export const readEnv = (env: string): string | undefined => {
11
11
  if (typeof (globalThis as any).process !== 'undefined') {
12
- return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
12
+ return (globalThis as any).process.env?.[env]?.trim() || undefined;
13
13
  }
14
14
  if (typeof (globalThis as any).Deno !== 'undefined') {
15
- return (globalThis as any).Deno.env?.get?.(env)?.trim();
15
+ return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
16
16
  }
17
17
  return undefined;
18
18
  };
@@ -85,8 +85,9 @@ export class Connections extends APIResource {
85
85
  /**
86
86
  * Create or update an MCP connection with the given ID. mcpUrl is required when
87
87
  * creating a new connection, but optional when updating (omit to keep the existing
88
- * URL). Returns 409 if a different mcpUrl is provided - delete and recreate to
89
- * change URL. Requires API key and namespace ownership.
88
+ * URL). Returns 409 if a different mcpUrl is provided, except while the connection
89
+ * is input_required and the new URL keeps the same host and path. Requires API key
90
+ * and namespace ownership.
90
91
  *
91
92
  * @example
92
93
  * ```ts
@@ -138,6 +139,7 @@ export interface Connection {
138
139
  status?:
139
140
  | Connection.ConnectionStatusConnected
140
141
  | Connection.ConnectionStatusAuthRequired
142
+ | Connection.ConnectionStatusInputRequired
141
143
  | Connection.ConnectionStatusError;
142
144
  }
143
145
 
@@ -184,6 +186,46 @@ export namespace Connection {
184
186
  authorizationUrl?: string;
185
187
  }
186
188
 
189
+ export interface ConnectionStatusInputRequired {
190
+ http: ConnectionStatusInputRequired.HTTP;
191
+
192
+ missing: ConnectionStatusInputRequired.Missing;
193
+
194
+ state: 'input_required';
195
+ }
196
+
197
+ export namespace ConnectionStatusInputRequired {
198
+ export interface HTTP {
199
+ headers?: { [key: string]: HTTP.Headers };
200
+
201
+ query?: { [key: string]: HTTP.Query };
202
+ }
203
+
204
+ export namespace HTTP {
205
+ export interface Headers {
206
+ label: string;
207
+
208
+ description?: string;
209
+
210
+ required?: boolean;
211
+ }
212
+
213
+ export interface Query {
214
+ label: string;
215
+
216
+ description?: string;
217
+
218
+ required?: boolean;
219
+ }
220
+ }
221
+
222
+ export interface Missing {
223
+ headers: Array<string>;
224
+
225
+ query: Array<string>;
226
+ }
227
+ }
228
+
187
229
  export interface ConnectionStatusError {
188
230
  /**
189
231
  * Error message
@@ -224,13 +266,6 @@ export interface CreateConnectionRequest {
224
266
  * Human-readable name (optional, defaults to connection ID)
225
267
  */
226
268
  name?: string;
227
-
228
- /**
229
- * Webhook callback URL for server-to-client messages (HTTPS). When set, the MCP
230
- * server will POST notifications and requests to this URL instead of Connect's
231
- * built-in event polling. This field is unstable and may change before GA.
232
- */
233
- unstableCallbackUrl?: string;
234
269
  }
235
270
 
236
271
  export interface ConnectionDeleteResponse {
@@ -258,13 +293,6 @@ export interface ConnectionCreateParams {
258
293
  * Human-readable name (optional, defaults to connection ID)
259
294
  */
260
295
  name?: string;
261
-
262
- /**
263
- * Webhook callback URL for server-to-client messages (HTTPS). When set, the MCP
264
- * server will POST notifications and requests to this URL instead of Connect's
265
- * built-in event polling. This field is unstable and may change before GA.
266
- */
267
- unstableCallbackUrl?: string;
268
296
  }
269
297
 
270
298
  export interface ConnectionListParams {
@@ -324,14 +352,6 @@ export interface ConnectionSetParams {
324
352
  * Body param: Human-readable name (optional, defaults to connection ID)
325
353
  */
326
354
  name?: string;
327
-
328
- /**
329
- * Body param: Webhook callback URL for server-to-client messages (HTTPS). When
330
- * set, the MCP server will POST notifications and requests to this URL instead of
331
- * Connect's built-in event polling. This field is unstable and may change before
332
- * GA.
333
- */
334
- unstableCallbackUrl?: string;
335
355
  }
336
356
 
337
357
  Connections.Mcp = Mcp;
@@ -22,6 +22,7 @@ export {
22
22
  type NamespaceListParams,
23
23
  type NamespaceListResponsesNamespacesPage,
24
24
  } from './namespaces/namespaces';
25
+ export { Organizations } from './organizations/organizations';
25
26
  export {
26
27
  Servers,
27
28
  type BuildConfig,
@@ -55,7 +56,7 @@ export {
55
56
  type SkillSyncParams,
56
57
  type SkillUploadParams,
57
58
  type SkillListResponsesSkillsPage,
58
- } from './skills/skills';
59
+ } from './skills';
59
60
  export {
60
61
  Tokens,
61
62
  type Constraint,
@@ -63,9 +63,10 @@ export class Namespaces extends APIResource {
63
63
  }
64
64
 
65
65
  /**
66
- * Create a new namespace owned by the authenticated user. This endpoint is
67
- * idempotent - if the namespace already exists and is owned by the user, returns
68
- * success.
66
+ * Create a new namespace owned by the authenticated user or an organization. This
67
+ * endpoint is idempotent - if the namespace already exists and is owned by the
68
+ * user/org, returns success. Pass organizationId in the request body to create an
69
+ * org-owned namespace.
69
70
  *
70
71
  * @example
71
72
  * ```ts
@@ -0,0 +1,78 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class APIKeys extends APIResource {
9
+ /**
10
+ * Creates an API key owned by the organization. Requires admin role.
11
+ */
12
+ create(
13
+ orgID: string,
14
+ body: APIKeyCreateParams,
15
+ options?: RequestOptions,
16
+ ): APIPromise<APIKeyCreateResponse> {
17
+ return this._client.post(path`/organizations/${orgID}/api-keys`, { body, ...options });
18
+ }
19
+
20
+ /**
21
+ * Returns all API keys belonging to the organization. Requires admin role. Key
22
+ * values are not included in the response.
23
+ */
24
+ list(orgID: string, options?: RequestOptions): APIPromise<APIKeyListResponse> {
25
+ return this._client.get(path`/organizations/${orgID}/api-keys`, options);
26
+ }
27
+
28
+ /**
29
+ * Deletes an API key belonging to the organization. Requires admin role.
30
+ */
31
+ delete(
32
+ keyID: string,
33
+ params: APIKeyDeleteParams,
34
+ options?: RequestOptions,
35
+ ): APIPromise<APIKeyDeleteResponse> {
36
+ const { orgId } = params;
37
+ return this._client.delete(path`/organizations/${orgId}/api-keys/${keyID}`, options);
38
+ }
39
+ }
40
+
41
+ export interface APIKeyCreateResponse {
42
+ id: string;
43
+
44
+ createdAt: string;
45
+
46
+ key: string;
47
+
48
+ name: string;
49
+ }
50
+
51
+ export interface APIKeyListResponse {
52
+ apiKeys: Array<unknown>;
53
+ }
54
+
55
+ export interface APIKeyDeleteResponse {
56
+ success: boolean;
57
+ }
58
+
59
+ export interface APIKeyCreateParams {
60
+ /**
61
+ * Name for the team API key
62
+ */
63
+ name: string;
64
+ }
65
+
66
+ export interface APIKeyDeleteParams {
67
+ orgId: string;
68
+ }
69
+
70
+ export declare namespace APIKeys {
71
+ export {
72
+ type APIKeyCreateResponse as APIKeyCreateResponse,
73
+ type APIKeyListResponse as APIKeyListResponse,
74
+ type APIKeyDeleteResponse as APIKeyDeleteResponse,
75
+ type APIKeyCreateParams as APIKeyCreateParams,
76
+ type APIKeyDeleteParams as APIKeyDeleteParams,
77
+ };
78
+ }
@@ -0,0 +1,11 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ APIKeys,
5
+ type APIKeyCreateResponse,
6
+ type APIKeyListResponse,
7
+ type APIKeyDeleteResponse,
8
+ type APIKeyCreateParams,
9
+ type APIKeyDeleteParams,
10
+ } from './api-keys';
11
+ export { Organizations } from './organizations';
@@ -0,0 +1,29 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as APIKeysAPI from './api-keys';
5
+ import {
6
+ APIKeyCreateParams,
7
+ APIKeyCreateResponse,
8
+ APIKeyDeleteParams,
9
+ APIKeyDeleteResponse,
10
+ APIKeyListResponse,
11
+ APIKeys,
12
+ } from './api-keys';
13
+
14
+ export class Organizations extends APIResource {
15
+ apiKeys: APIKeysAPI.APIKeys = new APIKeysAPI.APIKeys(this._client);
16
+ }
17
+
18
+ Organizations.APIKeys = APIKeys;
19
+
20
+ export declare namespace Organizations {
21
+ export {
22
+ APIKeys as APIKeys,
23
+ type APIKeyCreateResponse as APIKeyCreateResponse,
24
+ type APIKeyListResponse as APIKeyListResponse,
25
+ type APIKeyDeleteResponse as APIKeyDeleteResponse,
26
+ type APIKeyCreateParams as APIKeyCreateParams,
27
+ type APIKeyDeleteParams as APIKeyDeleteParams,
28
+ };
29
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './organizations/index';
@@ -7,32 +7,16 @@ import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Domains extends APIResource {
9
9
  /**
10
- * Add a managed run.tools or custom domain.
11
- *
12
- * @example
13
- * ```ts
14
- * const domain = await client.servers.domains.create(
15
- * 'qualifiedName',
16
- * { subdomain: 'subdomain', type: 'managed' },
17
- * );
18
- * ```
19
- */
20
- create(
21
- qualifiedName: string,
22
- body: DomainCreateParams,
23
- options?: RequestOptions,
24
- ): APIPromise<DomainCreateResponse> {
25
- return this._client.post(path`/servers/${qualifiedName}/domains`, { body, ...options });
26
- }
27
-
28
- /**
29
- * Update domain settings such as subdomain slug or authentication requirements.
10
+ * Update the managed run.tools slug for a server.
30
11
  *
31
12
  * @example
32
13
  * ```ts
33
14
  * const domain = await client.servers.domains.update(
34
15
  * 'domainId',
35
- * { qualifiedName: 'qualifiedName' },
16
+ * {
17
+ * qualifiedName: 'qualifiedName',
18
+ * subdomain: 'subdomain',
19
+ * },
36
20
  * );
37
21
  * ```
38
22
  */
@@ -46,7 +30,7 @@ export class Domains extends APIResource {
46
30
  }
47
31
 
48
32
  /**
49
- * List all domains, including managed run.tools and custom domains.
33
+ * List the domains for a server.
50
34
  *
51
35
  * @example
52
36
  * ```ts
@@ -58,106 +42,20 @@ export class Domains extends APIResource {
58
42
  list(qualifiedName: string, options?: RequestOptions): APIPromise<DomainListResponse> {
59
43
  return this._client.get(path`/servers/${qualifiedName}/domains`, options);
60
44
  }
61
-
62
- /**
63
- * Remove a domain and clean up associated DNS records.
64
- *
65
- * @example
66
- * ```ts
67
- * const domain = await client.servers.domains.delete(
68
- * 'domainId',
69
- * { qualifiedName: 'qualifiedName' },
70
- * );
71
- * ```
72
- */
73
- delete(
74
- domainID: string,
75
- params: DomainDeleteParams,
76
- options?: RequestOptions,
77
- ): APIPromise<DomainDeleteResponse> {
78
- const { qualifiedName } = params;
79
- return this._client.delete(path`/servers/${qualifiedName}/domains/${domainID}`, options);
80
- }
81
- }
82
-
83
- export interface DomainCreateResponse {
84
- id: string;
85
-
86
- allowUnauthenticated: boolean;
87
-
88
- cnameTarget: string | null;
89
-
90
- createdAt: string;
91
-
92
- hostname: string;
93
-
94
- requiresConfig: boolean;
95
-
96
- status: 'pending_validation' | 'pending' | 'active' | 'failed' | null;
97
-
98
- subdomain: string | null;
99
-
100
- type: 'managed' | 'custom';
101
-
102
- updatedAt: string;
103
-
104
- validation: DomainCreateResponse.Validation | null;
105
- }
106
-
107
- export namespace DomainCreateResponse {
108
- export interface Validation {
109
- records: Array<Validation.Record>;
110
-
111
- type: string;
112
- }
113
-
114
- export namespace Validation {
115
- export interface Record {
116
- name: string;
117
-
118
- value: string;
119
- }
120
- }
121
45
  }
122
46
 
123
47
  export interface DomainUpdateResponse {
124
- id: string;
125
-
126
- allowUnauthenticated: boolean;
127
-
128
- cnameTarget: string | null;
48
+ id: 'managed';
129
49
 
130
50
  createdAt: string;
131
51
 
132
52
  hostname: string;
133
53
 
134
- requiresConfig: boolean;
54
+ subdomain: string;
135
55
 
136
- status: 'pending_validation' | 'pending' | 'active' | 'failed' | null;
137
-
138
- subdomain: string | null;
139
-
140
- type: 'managed' | 'custom';
56
+ type: 'managed';
141
57
 
142
58
  updatedAt: string;
143
-
144
- validation: DomainUpdateResponse.Validation | null;
145
- }
146
-
147
- export namespace DomainUpdateResponse {
148
- export interface Validation {
149
- records: Array<Validation.Record>;
150
-
151
- type: string;
152
- }
153
-
154
- export namespace Validation {
155
- export interface Record {
156
- name: string;
157
-
158
- value: string;
159
- }
160
- }
161
59
  }
162
60
 
163
61
  export interface DomainListResponse {
@@ -166,63 +64,17 @@ export interface DomainListResponse {
166
64
 
167
65
  export namespace DomainListResponse {
168
66
  export interface Domain {
169
- id: string;
170
-
171
- allowUnauthenticated: boolean;
172
-
173
- cnameTarget: string | null;
67
+ id: 'managed';
174
68
 
175
69
  createdAt: string;
176
70
 
177
71
  hostname: string;
178
72
 
179
- requiresConfig: boolean;
180
-
181
- status: 'pending_validation' | 'pending' | 'active' | 'failed' | null;
182
-
183
- subdomain: string | null;
184
-
185
- type: 'managed' | 'custom';
186
-
187
- updatedAt: string;
188
-
189
- validation: Domain.Validation | null;
190
- }
191
-
192
- export namespace Domain {
193
- export interface Validation {
194
- records: Array<Validation.Record>;
195
-
196
- type: string;
197
- }
198
-
199
- export namespace Validation {
200
- export interface Record {
201
- name: string;
202
-
203
- value: string;
204
- }
205
- }
206
- }
207
- }
208
-
209
- export interface DomainDeleteResponse {
210
- success: boolean;
211
- }
212
-
213
- export type DomainCreateParams = DomainCreateParams.Variant0 | DomainCreateParams.Variant1;
214
-
215
- export declare namespace DomainCreateParams {
216
- export interface Variant0 {
217
73
  subdomain: string;
218
74
 
219
75
  type: 'managed';
220
- }
221
-
222
- export interface Variant1 {
223
- hostname: string;
224
76
 
225
- type: 'custom';
77
+ updatedAt: string;
226
78
  }
227
79
  }
228
80
 
@@ -236,35 +88,13 @@ export interface DomainUpdateParams {
236
88
  /**
237
89
  * Body param
238
90
  */
239
- allowUnauthenticated?: boolean;
240
-
241
- /**
242
- * Body param
243
- */
244
- requiresConfig?: boolean;
245
-
246
- /**
247
- * Body param
248
- */
249
- subdomain?: string;
250
- }
251
-
252
- export interface DomainDeleteParams {
253
- /**
254
- * The server's qualified name (e.g. 'namespace/server' or 'namespace' for
255
- * namespace-only servers). Use %2F to encode the slash.
256
- */
257
- qualifiedName: string;
91
+ subdomain: string;
258
92
  }
259
93
 
260
94
  export declare namespace Domains {
261
95
  export {
262
- type DomainCreateResponse as DomainCreateResponse,
263
96
  type DomainUpdateResponse as DomainUpdateResponse,
264
97
  type DomainListResponse as DomainListResponse,
265
- type DomainDeleteResponse as DomainDeleteResponse,
266
- type DomainCreateParams as DomainCreateParams,
267
98
  type DomainUpdateParams as DomainUpdateParams,
268
- type DomainDeleteParams as DomainDeleteParams,
269
99
  };
270
100
  }