@nirvana-labs/nirvana 1.22.0 → 1.23.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 (56) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +9 -10
  11. package/resources/index.d.mts +1 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/networking/connect/connections.d.mts +2 -2
  20. package/resources/networking/connect/connections.d.ts +2 -2
  21. package/resources/networking/firewall-rules.d.mts +5 -4
  22. package/resources/networking/firewall-rules.d.mts.map +1 -1
  23. package/resources/networking/firewall-rules.d.ts +5 -4
  24. package/resources/networking/firewall-rules.d.ts.map +1 -1
  25. package/resources/projects.d.mts +120 -0
  26. package/resources/projects.d.mts.map +1 -0
  27. package/resources/projects.d.ts +120 -0
  28. package/resources/projects.d.ts.map +1 -0
  29. package/resources/projects.js +75 -0
  30. package/resources/projects.js.map +1 -0
  31. package/resources/projects.mjs +71 -0
  32. package/resources/projects.mjs.map +1 -0
  33. package/resources/rpc-nodes/dedicated/dedicated.d.mts +8 -0
  34. package/resources/rpc-nodes/dedicated/dedicated.d.mts.map +1 -1
  35. package/resources/rpc-nodes/dedicated/dedicated.d.ts +8 -0
  36. package/resources/rpc-nodes/dedicated/dedicated.d.ts.map +1 -1
  37. package/resources/rpc-nodes/dedicated/dedicated.js.map +1 -1
  38. package/resources/rpc-nodes/dedicated/dedicated.mjs.map +1 -1
  39. package/resources/rpc-nodes/flex/flex.d.mts +8 -0
  40. package/resources/rpc-nodes/flex/flex.d.mts.map +1 -1
  41. package/resources/rpc-nodes/flex/flex.d.ts +8 -0
  42. package/resources/rpc-nodes/flex/flex.d.ts.map +1 -1
  43. package/resources/rpc-nodes/flex/flex.js.map +1 -1
  44. package/resources/rpc-nodes/flex/flex.mjs.map +1 -1
  45. package/src/client.ts +5 -0
  46. package/src/resources/index.ts +1 -0
  47. package/src/resources/networking/connect/connections.ts +2 -2
  48. package/src/resources/networking/firewall-rules.ts +5 -4
  49. package/src/resources/projects.ts +165 -0
  50. package/src/resources/rpc-nodes/dedicated/dedicated.ts +11 -1
  51. package/src/resources/rpc-nodes/flex/flex.ts +11 -1
  52. package/src/version.ts +1 -1
  53. package/version.d.mts +1 -1
  54. package/version.d.ts +1 -1
  55. package/version.js +1 -1
  56. package/version.mjs +1 -1
@@ -109,7 +109,7 @@ export interface ConnectionCreateParams {
109
109
  bandwidth_mbps: ConnectAPI.ConnectBandwidthMbps;
110
110
 
111
111
  /**
112
- * CIDRs for the Connect Connection
112
+ * CIDRs for the Connect Connection. Must be in network-aligned/canonical form.
113
113
  */
114
114
  cidrs: Array<string>;
115
115
 
@@ -119,7 +119,7 @@ export interface ConnectionCreateParams {
119
119
  name: string;
120
120
 
121
121
  /**
122
- * Provider CIDRs
122
+ * Provider CIDRs. Must be in network-aligned/canonical form.
123
123
  */
124
124
  provider_cidrs: Array<string>;
125
125
 
@@ -197,7 +197,8 @@ export interface FirewallRuleList {
197
197
 
198
198
  export interface FirewallRuleCreateParams {
199
199
  /**
200
- * Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC.
200
+ * Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC. Must be
201
+ * in network-aligned/canonical form.
201
202
  */
202
203
  destination_address: string;
203
204
 
@@ -218,7 +219,7 @@ export interface FirewallRuleCreateParams {
218
219
 
219
220
  /**
220
221
  * Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask
221
- * of 0.
222
+ * of 0. Must be in network-aligned/canonical form.
222
223
  */
223
224
  source_address: string;
224
225
 
@@ -236,7 +237,7 @@ export interface FirewallRuleUpdateParams {
236
237
 
237
238
  /**
238
239
  * Body param: Destination address of the Firewall Rule. Either VPC CIDR or VM in
239
- * VPC.
240
+ * VPC. Must be in network-aligned/canonical form.
240
241
  */
241
242
  destination_address?: string;
242
243
 
@@ -257,7 +258,7 @@ export interface FirewallRuleUpdateParams {
257
258
 
258
259
  /**
259
260
  * Body param: Source address of the Firewall Rule. Address of 0.0.0.0 requires a
260
- * CIDR mask of 0.
261
+ * CIDR mask of 0. Must be in network-aligned/canonical form.
261
262
  */
262
263
  source_address?: string;
263
264
 
@@ -0,0 +1,165 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as Shared from './shared';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
7
+ import { buildHeaders } from '../internal/headers';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ export class Projects extends APIResource {
12
+ /**
13
+ * Create a new project
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const project = await client.projects.create({
18
+ * name: 'My Project',
19
+ * });
20
+ * ```
21
+ */
22
+ create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<Project> {
23
+ return this._client.post('/v1/projects', { body, ...options });
24
+ }
25
+
26
+ /**
27
+ * Update an existing project
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const project = await client.projects.update('project_id');
32
+ * ```
33
+ */
34
+ update(projectID: string, body: ProjectUpdateParams, options?: RequestOptions): APIPromise<Project> {
35
+ return this._client.patch(path`/v1/projects/${projectID}`, { body, ...options });
36
+ }
37
+
38
+ /**
39
+ * List all projects for the authenticated user
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * // Automatically fetches more pages as needed.
44
+ * for await (const project of client.projects.list()) {
45
+ * // ...
46
+ * }
47
+ * ```
48
+ */
49
+ list(
50
+ query: ProjectListParams | null | undefined = {},
51
+ options?: RequestOptions,
52
+ ): PagePromise<ProjectsCursor, Project> {
53
+ return this._client.getAPIList('/v1/projects', Cursor<Project>, { query, ...options });
54
+ }
55
+
56
+ /**
57
+ * Delete a project
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * await client.projects.delete('project_id');
62
+ * ```
63
+ */
64
+ delete(projectID: string, options?: RequestOptions): APIPromise<void> {
65
+ return this._client.delete(path`/v1/projects/${projectID}`, {
66
+ ...options,
67
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
68
+ });
69
+ }
70
+
71
+ /**
72
+ * Get details about a project
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const project = await client.projects.get('project_id');
77
+ * ```
78
+ */
79
+ get(projectID: string, options?: RequestOptions): APIPromise<Project> {
80
+ return this._client.get(path`/v1/projects/${projectID}`, options);
81
+ }
82
+ }
83
+
84
+ export type ProjectsCursor = Cursor<Project>;
85
+
86
+ /**
87
+ * Project response.
88
+ */
89
+ export interface Project {
90
+ /**
91
+ * Project ID.
92
+ */
93
+ id: string;
94
+
95
+ /**
96
+ * When the Project was created.
97
+ */
98
+ created_at: string;
99
+
100
+ /**
101
+ * Project name.
102
+ */
103
+ name: string;
104
+
105
+ /**
106
+ * Tags attached to the Project.
107
+ */
108
+ tags: Array<string>;
109
+
110
+ /**
111
+ * When the Project was updated.
112
+ */
113
+ updated_at: string;
114
+
115
+ /**
116
+ * User ID that owns the project.
117
+ */
118
+ user_id: string;
119
+ }
120
+
121
+ export interface ProjectList {
122
+ items: Array<Project>;
123
+
124
+ /**
125
+ * Pagination response details.
126
+ */
127
+ pagination: Shared.Pagination;
128
+ }
129
+
130
+ export interface ProjectCreateParams {
131
+ /**
132
+ * Project name.
133
+ */
134
+ name: string;
135
+
136
+ /**
137
+ * Tags to attach to the Project.
138
+ */
139
+ tags?: Array<string>;
140
+ }
141
+
142
+ export interface ProjectUpdateParams {
143
+ /**
144
+ * Project name.
145
+ */
146
+ name?: string;
147
+
148
+ /**
149
+ * Tags to attach to the Project.
150
+ */
151
+ tags?: Array<string>;
152
+ }
153
+
154
+ export interface ProjectListParams extends CursorParams {}
155
+
156
+ export declare namespace Projects {
157
+ export {
158
+ type Project as Project,
159
+ type ProjectList as ProjectList,
160
+ type ProjectsCursor as ProjectsCursor,
161
+ type ProjectCreateParams as ProjectCreateParams,
162
+ type ProjectUpdateParams as ProjectUpdateParams,
163
+ type ProjectListParams as ProjectListParams,
164
+ };
165
+ }
@@ -83,6 +83,11 @@ export interface Dedicated {
83
83
  */
84
84
  network: string;
85
85
 
86
+ /**
87
+ * Project identifier associated with the RPC Node Dedicated.
88
+ */
89
+ project_id: string | null;
90
+
86
91
  /**
87
92
  * Tags to attach to the RPC Node Dedicated.
88
93
  */
@@ -127,7 +132,12 @@ export interface DedicatedList {
127
132
  pagination: Shared.Pagination;
128
133
  }
129
134
 
130
- export interface DedicatedListParams extends CursorParams {}
135
+ export interface DedicatedListParams extends CursorParams {
136
+ /**
137
+ * Project ID of resources to request
138
+ */
139
+ project_id?: string;
140
+ }
131
141
 
132
142
  DedicatedResource.Blockchains = Blockchains;
133
143
 
@@ -125,6 +125,11 @@ export interface Flex {
125
125
  */
126
126
  network: string;
127
127
 
128
+ /**
129
+ * Project identifier associated with the RPC Node Flex.
130
+ */
131
+ project_id: string | null;
132
+
128
133
  /**
129
134
  * Tags to attach to the RPC Node Flex.
130
135
  */
@@ -203,7 +208,12 @@ export interface FlexUpdateParams {
203
208
  tags?: Array<string>;
204
209
  }
205
210
 
206
- export interface FlexListParams extends CursorParams {}
211
+ export interface FlexListParams extends CursorParams {
212
+ /**
213
+ * Project ID of resources to request
214
+ */
215
+ project_id?: string;
216
+ }
207
217
 
208
218
  FlexResource.Blockchains = Blockchains;
209
219
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.22.0'; // x-release-please-version
1
+ export const VERSION = '1.23.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.22.0";
1
+ export declare const VERSION = "1.23.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.22.0";
1
+ export declare const VERSION = "1.23.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.22.0'; // x-release-please-version
4
+ exports.VERSION = '1.23.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.22.0'; // x-release-please-version
1
+ export const VERSION = '1.23.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map