@nirvana-labs/nirvana-mcp 1.91.1 → 1.91.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.
Files changed (46) hide show
  1. package/code-tool.d.mts.map +1 -1
  2. package/code-tool.d.ts.map +1 -1
  3. package/code-tool.js +2 -53
  4. package/code-tool.js.map +1 -1
  5. package/code-tool.mjs +3 -54
  6. package/code-tool.mjs.map +1 -1
  7. package/docs-search-tool.d.mts.map +1 -1
  8. package/docs-search-tool.d.ts.map +1 -1
  9. package/docs-search-tool.js +1 -41
  10. package/docs-search-tool.js.map +1 -1
  11. package/docs-search-tool.mjs +1 -41
  12. package/docs-search-tool.mjs.map +1 -1
  13. package/instructions.d.mts.map +1 -1
  14. package/instructions.d.ts.map +1 -1
  15. package/instructions.js +2 -18
  16. package/instructions.js.map +1 -1
  17. package/instructions.mjs +2 -18
  18. package/instructions.mjs.map +1 -1
  19. package/local-docs-search.js +339 -339
  20. package/local-docs-search.js.map +1 -1
  21. package/local-docs-search.mjs +339 -339
  22. package/local-docs-search.mjs.map +1 -1
  23. package/methods.js +177 -177
  24. package/methods.js.map +1 -1
  25. package/methods.mjs +177 -177
  26. package/methods.mjs.map +1 -1
  27. package/options.d.mts +2 -2
  28. package/options.d.mts.map +1 -1
  29. package/options.d.ts +2 -2
  30. package/options.d.ts.map +1 -1
  31. package/options.js +6 -6
  32. package/options.js.map +1 -1
  33. package/options.mjs +6 -6
  34. package/options.mjs.map +1 -1
  35. package/package.json +2 -2
  36. package/server.js +1 -1
  37. package/server.js.map +1 -1
  38. package/server.mjs +1 -1
  39. package/server.mjs.map +1 -1
  40. package/src/code-tool.ts +4 -83
  41. package/src/docs-search-tool.ts +2 -61
  42. package/src/instructions.ts +2 -28
  43. package/src/local-docs-search.ts +450 -450
  44. package/src/methods.ts +177 -177
  45. package/src/options.ts +9 -9
  46. package/src/server.ts +1 -1
@@ -67,6 +67,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
67
67
  example:
68
68
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.user.get();\n\nconsole.log(user.id);",
69
69
  },
70
+ http: {
71
+ example:
72
+ 'curl https://api.nirvanalabs.io/v1/user \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
73
+ },
70
74
  go: {
71
75
  method: 'client.User.Get',
72
76
  example:
@@ -76,10 +80,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
76
80
  method: 'user get',
77
81
  example: "nirvana user get \\\n --api-key 'My API Key'",
78
82
  },
79
- http: {
80
- example:
81
- 'curl https://api.nirvanalabs.io/v1/user \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
82
- },
83
83
  },
84
84
  },
85
85
  {
@@ -100,6 +100,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
100
100
  example:
101
101
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.get();\n\nconsole.log(userSecurity.source_ip_rule);",
102
102
  },
103
+ http: {
104
+ example:
105
+ 'curl https://api.nirvanalabs.io/v1/user/security \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
106
+ },
103
107
  go: {
104
108
  method: 'client.User.Security.Get',
105
109
  example:
@@ -109,10 +113,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
109
113
  method: 'security get',
110
114
  example: "nirvana user:security get \\\n --api-key 'My API Key'",
111
115
  },
112
- http: {
113
- example:
114
- 'curl https://api.nirvanalabs.io/v1/user/security \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
115
- },
116
116
  },
117
117
  },
118
118
  {
@@ -134,6 +134,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
134
134
  example:
135
135
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.update();\n\nconsole.log(userSecurity.source_ip_rule);",
136
136
  },
137
+ http: {
138
+ example:
139
+ "curl https://api.nirvanalabs.io/v1/user/security \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $NIRVANA_LABS_API_KEY\" \\\n -d '{}'",
140
+ },
137
141
  go: {
138
142
  method: 'client.User.Security.Update',
139
143
  example:
@@ -143,10 +147,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
143
147
  method: 'security update',
144
148
  example: "nirvana user:security update \\\n --api-key 'My API Key'",
145
149
  },
146
- http: {
147
- example:
148
- "curl https://api.nirvanalabs.io/v1/user/security \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $NIRVANA_LABS_API_KEY\" \\\n -d '{}'",
149
- },
150
150
  },
151
151
  },
152
152
  {
@@ -176,6 +176,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
176
176
  example:
177
177
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.create({\n expires_at: '2025-12-31T23:59:59Z',\n name: 'My API Key',\n permissions: [{ permission: 'edit', resource_type: 'vm' }],\n project_ids: ['123e4567-e89b-12d3-a456-426614174000', '123e4567-e89b-12d3-a456-426614174001'],\n});\n\nconsole.log(apiKey.id);",
178
178
  },
179
+ http: {
180
+ example:
181
+ 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "expires_at": "2025-12-31T23:59:59Z",\n "name": "My API Key",\n "permissions": [\n {\n "permission": "edit",\n "resource_type": "vm"\n }\n ],\n "project_ids": [\n "123e4567-e89b-12d3-a456-426614174000",\n "123e4567-e89b-12d3-a456-426614174001"\n ],\n "starts_at": "2025-01-01T00:00:00Z",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
182
+ },
179
183
  go: {
180
184
  method: 'client.APIKeys.New',
181
185
  example:
@@ -186,10 +190,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
186
190
  example:
187
191
  "nirvana api-keys create \\\n --api-key 'My API Key' \\\n --expires-at \"'2025-12-31T23:59:59Z'\" \\\n --name 'My API Key' \\\n --permission '{permission: edit, resource_type: vm}' \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --project-id 123e4567-e89b-12d3-a456-426614174001",
188
192
  },
189
- http: {
190
- example:
191
- 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "expires_at": "2025-12-31T23:59:59Z",\n "name": "My API Key",\n "permissions": [\n {\n "permission": "edit",\n "resource_type": "vm"\n }\n ],\n "project_ids": [\n "123e4567-e89b-12d3-a456-426614174000",\n "123e4567-e89b-12d3-a456-426614174001"\n ],\n "starts_at": "2025-01-01T00:00:00Z",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
192
- },
193
193
  },
194
194
  },
195
195
  {
@@ -211,6 +211,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
211
211
  example:
212
212
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.get('api_key_id');\n\nconsole.log(apiKey.id);",
213
213
  },
214
+ http: {
215
+ example:
216
+ 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
217
+ },
214
218
  go: {
215
219
  method: 'client.APIKeys.Get',
216
220
  example:
@@ -220,10 +224,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
220
224
  method: 'api_keys get',
221
225
  example: "nirvana api-keys get \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
222
226
  },
223
- http: {
224
- example:
225
- 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
226
- },
227
227
  },
228
228
  },
229
229
  {
@@ -252,6 +252,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
252
252
  example:
253
253
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.update('api_key_id');\n\nconsole.log(apiKey.id);",
254
254
  },
255
+ http: {
256
+ example:
257
+ 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated API Key",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
258
+ },
255
259
  go: {
256
260
  method: 'client.APIKeys.Update',
257
261
  example:
@@ -261,10 +265,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
261
265
  method: 'api_keys update',
262
266
  example: "nirvana api-keys update \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
263
267
  },
264
- http: {
265
- example:
266
- 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated API Key",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
267
- },
268
268
  },
269
269
  },
270
270
  {
@@ -284,6 +284,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
284
284
  example:
285
285
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.apiKeys.delete('api_key_id');",
286
286
  },
287
+ http: {
288
+ example:
289
+ 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
290
+ },
287
291
  go: {
288
292
  method: 'client.APIKeys.Delete',
289
293
  example:
@@ -293,10 +297,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
293
297
  method: 'api_keys delete',
294
298
  example: "nirvana api-keys delete \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
295
299
  },
296
- http: {
297
- example:
298
- 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
299
- },
300
300
  },
301
301
  },
302
302
  {
@@ -318,6 +318,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
318
318
  example:
319
319
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const apiKey of client.apiKeys.list()) {\n console.log(apiKey.id);\n}",
320
320
  },
321
+ http: {
322
+ example:
323
+ 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
324
+ },
321
325
  go: {
322
326
  method: 'client.APIKeys.List',
323
327
  example:
@@ -327,10 +331,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
327
331
  method: 'api_keys list',
328
332
  example: "nirvana api-keys list \\\n --api-key 'My API Key'",
329
333
  },
330
- http: {
331
- example:
332
- 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
333
- },
334
334
  },
335
335
  },
336
336
  {
@@ -352,6 +352,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
352
352
  example:
353
353
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.operations.get('operation_id');\n\nconsole.log(operation.id);",
354
354
  },
355
+ http: {
356
+ example:
357
+ 'curl https://api.nirvanalabs.io/v1/operations/$OPERATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
358
+ },
355
359
  go: {
356
360
  method: 'client.Operations.Get',
357
361
  example:
@@ -361,10 +365,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
361
365
  method: 'operations get',
362
366
  example: "nirvana operations get \\\n --api-key 'My API Key' \\\n --operation-id operation_id",
363
367
  },
364
- http: {
365
- example:
366
- 'curl https://api.nirvanalabs.io/v1/operations/$OPERATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
367
- },
368
368
  },
369
369
  },
370
370
  {
@@ -386,6 +386,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
386
386
  example:
387
387
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const operation of client.operations.list({ project_id: 'project_id' })) {\n console.log(operation.id);\n}",
388
388
  },
389
+ http: {
390
+ example:
391
+ 'curl https://api.nirvanalabs.io/v1/operations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
392
+ },
389
393
  go: {
390
394
  method: 'client.Operations.List',
391
395
  example:
@@ -395,10 +399,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
395
399
  method: 'operations list',
396
400
  example: "nirvana operations list \\\n --api-key 'My API Key' \\\n --project-id project_id",
397
401
  },
398
- http: {
399
- example:
400
- 'curl https://api.nirvanalabs.io/v1/operations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
401
- },
402
402
  },
403
403
  },
404
404
  {
@@ -420,6 +420,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
420
420
  example:
421
421
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.create({ name: 'My Organization' });\n\nconsole.log(organization.id);",
422
422
  },
423
+ http: {
424
+ example:
425
+ 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Organization",\n "billing_email": "billing@example.com"\n }\'',
426
+ },
423
427
  go: {
424
428
  method: 'client.Organizations.New',
425
429
  example:
@@ -429,10 +433,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
429
433
  method: 'organizations create',
430
434
  example: "nirvana organizations create \\\n --api-key 'My API Key' \\\n --name 'My Organization'",
431
435
  },
432
- http: {
433
- example:
434
- 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Organization",\n "billing_email": "billing@example.com"\n }\'',
435
- },
436
436
  },
437
437
  },
438
438
  {
@@ -454,6 +454,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
454
454
  example:
455
455
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.get('organization_id');\n\nconsole.log(organization.id);",
456
456
  },
457
+ http: {
458
+ example:
459
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
460
+ },
457
461
  go: {
458
462
  method: 'client.Organizations.Get',
459
463
  example:
@@ -464,10 +468,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
464
468
  example:
465
469
  "nirvana organizations get \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
466
470
  },
467
- http: {
468
- example:
469
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
470
- },
471
471
  },
472
472
  },
473
473
  {
@@ -489,6 +489,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
489
489
  example:
490
490
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.update('organization_id');\n\nconsole.log(organization.id);",
491
491
  },
492
+ http: {
493
+ example:
494
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "billing_email": "billing@example.com",\n "name": "My Updated Organization"\n }\'',
495
+ },
492
496
  go: {
493
497
  method: 'client.Organizations.Update',
494
498
  example:
@@ -499,10 +503,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
499
503
  example:
500
504
  "nirvana organizations update \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
501
505
  },
502
- http: {
503
- example:
504
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "billing_email": "billing@example.com",\n "name": "My Updated Organization"\n }\'',
505
- },
506
506
  },
507
507
  },
508
508
  {
@@ -524,6 +524,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
524
524
  example:
525
525
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organization of client.organizations.list()) {\n console.log(organization.id);\n}",
526
526
  },
527
+ http: {
528
+ example:
529
+ 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
530
+ },
527
531
  go: {
528
532
  method: 'client.Organizations.List',
529
533
  example:
@@ -533,10 +537,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
533
537
  method: 'organizations list',
534
538
  example: "nirvana organizations list \\\n --api-key 'My API Key'",
535
539
  },
536
- http: {
537
- example:
538
- 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
539
- },
540
540
  },
541
541
  },
542
542
  {
@@ -556,6 +556,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
556
556
  example:
557
557
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.organizations.leave('organization_id');",
558
558
  },
559
+ http: {
560
+ example:
561
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/leave \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
562
+ },
559
563
  go: {
560
564
  method: 'client.Organizations.Leave',
561
565
  example:
@@ -566,10 +570,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
566
570
  example:
567
571
  "nirvana organizations leave \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
568
572
  },
569
- http: {
570
- example:
571
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/leave \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
572
- },
573
573
  },
574
574
  },
575
575
  {
@@ -591,6 +591,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
591
591
  example:
592
592
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationMembership = await client.organizations.memberships.get('membership_id', {\n organization_id: 'organization_id',\n});\n\nconsole.log(organizationMembership.id);",
593
593
  },
594
+ http: {
595
+ example:
596
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships/$MEMBERSHIP_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
597
+ },
594
598
  go: {
595
599
  method: 'client.Organizations.Memberships.Get',
596
600
  example:
@@ -601,10 +605,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
601
605
  example:
602
606
  "nirvana organizations:memberships get \\\n --api-key 'My API Key' \\\n --organization-id organization_id \\\n --membership-id membership_id",
603
607
  },
604
- http: {
605
- example:
606
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships/$MEMBERSHIP_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
607
- },
608
608
  },
609
609
  },
610
610
  {
@@ -626,6 +626,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
626
626
  example:
627
627
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organizationMembership of client.organizations.memberships.list(\n 'organization_id',\n)) {\n console.log(organizationMembership.id);\n}",
628
628
  },
629
+ http: {
630
+ example:
631
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
632
+ },
629
633
  go: {
630
634
  method: 'client.Organizations.Memberships.List',
631
635
  example:
@@ -636,10 +640,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
636
640
  example:
637
641
  "nirvana organizations:memberships list \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
638
642
  },
639
- http: {
640
- example:
641
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
642
- },
643
643
  },
644
644
  },
645
645
  {
@@ -671,6 +671,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
671
671
  example:
672
672
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationAddress = await client.organizations.address.create('organization_id', {\n city: 'San Francisco',\n country: 'US',\n line1: '123 Main St',\n postal_code: '94105',\n});\n\nconsole.log(organizationAddress.id);",
673
673
  },
674
+ http: {
675
+ example:
676
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "city": "San Francisco",\n "country": "US",\n "line1": "123 Main St",\n "postal_code": "94105",\n "line2": "Suite 400",\n "state": "CA",\n "tax_id": "EU372000000",\n "tax_id_type": "eu_vat"\n }\'',
677
+ },
674
678
  go: {
675
679
  method: 'client.Organizations.Address.New',
676
680
  example:
@@ -681,10 +685,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
681
685
  example:
682
686
  "nirvana organizations:address create \\\n --api-key 'My API Key' \\\n --organization-id organization_id \\\n --city 'San Francisco' \\\n --country US \\\n --line1 '123 Main St' \\\n --postal-code 94105",
683
687
  },
684
- http: {
685
- example:
686
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "city": "San Francisco",\n "country": "US",\n "line1": "123 Main St",\n "postal_code": "94105",\n "line2": "Suite 400",\n "state": "CA",\n "tax_id": "EU372000000",\n "tax_id_type": "eu_vat"\n }\'',
687
- },
688
688
  },
689
689
  },
690
690
  {
@@ -706,6 +706,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
706
706
  example:
707
707
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationAddress = await client.organizations.address.get('organization_id');\n\nconsole.log(organizationAddress.id);",
708
708
  },
709
+ http: {
710
+ example:
711
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
712
+ },
709
713
  go: {
710
714
  method: 'client.Organizations.Address.Get',
711
715
  example:
@@ -716,10 +720,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
716
720
  example:
717
721
  "nirvana organizations:address get \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
718
722
  },
719
- http: {
720
- example:
721
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
722
- },
723
723
  },
724
724
  },
725
725
  {
@@ -751,6 +751,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
751
751
  example:
752
752
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationAddress = await client.organizations.address.update('organization_id');\n\nconsole.log(organizationAddress.id);",
753
753
  },
754
+ http: {
755
+ example:
756
+ 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "city": "San Francisco",\n "country": "US",\n "line1": "123 Main St",\n "line2": "Suite 400",\n "postal_code": "94105",\n "state": "CA",\n "tax_id": "EU372000000",\n "tax_id_type": "eu_vat"\n }\'',
757
+ },
754
758
  go: {
755
759
  method: 'client.Organizations.Address.Update',
756
760
  example:
@@ -761,10 +765,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
761
765
  example:
762
766
  "nirvana organizations:address update \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
763
767
  },
764
- http: {
765
- example:
766
- 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "city": "San Francisco",\n "country": "US",\n "line1": "123 Main St",\n "line2": "Suite 400",\n "postal_code": "94105",\n "state": "CA",\n "tax_id": "EU372000000",\n "tax_id_type": "eu_vat"\n }\'',
767
- },
768
768
  },
769
769
  },
770
770
  {
@@ -786,6 +786,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
786
786
  example:
787
787
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst quota = await client.quotas.get('us-sva-2');\n\nconsole.log(quota.compute);",
788
788
  },
789
+ http: {
790
+ example:
791
+ 'curl https://api.nirvanalabs.io/v1/quotas/$REGION \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
792
+ },
789
793
  go: {
790
794
  method: 'client.Quotas.Get',
791
795
  example:
@@ -795,10 +799,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
795
799
  method: 'quotas get',
796
800
  example: "nirvana quotas get \\\n --api-key 'My API Key' \\\n --region us-sva-2",
797
801
  },
798
- http: {
799
- example:
800
- 'curl https://api.nirvanalabs.io/v1/quotas/$REGION \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
801
- },
802
802
  },
803
803
  },
804
804
  {
@@ -819,6 +819,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
819
819
  example:
820
820
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst quotaList = await client.quotas.list();\n\nconsole.log(quotaList.items);",
821
821
  },
822
+ http: {
823
+ example:
824
+ 'curl https://api.nirvanalabs.io/v1/quotas \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
825
+ },
822
826
  go: {
823
827
  method: 'client.Quotas.List',
824
828
  example:
@@ -828,10 +832,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
828
832
  method: 'quotas list',
829
833
  example: "nirvana quotas list \\\n --api-key 'My API Key'",
830
834
  },
831
- http: {
832
- example:
833
- 'curl https://api.nirvanalabs.io/v1/quotas \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
834
- },
835
835
  },
836
836
  },
837
837
  {
@@ -854,6 +854,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
854
854
  example:
855
855
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst usage = await client.usage.get('123e4567-e89b-12d3-a456-426614174000');\n\nconsole.log(usage.project_id);",
856
856
  },
857
+ http: {
858
+ example:
859
+ 'curl https://api.nirvanalabs.io/v1/usage/$RESOURCE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
860
+ },
857
861
  go: {
858
862
  method: 'client.Usage.Get',
859
863
  example:
@@ -864,10 +868,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
864
868
  example:
865
869
  "nirvana usage get \\\n --api-key 'My API Key' \\\n --resource-id 123e4567-e89b-12d3-a456-426614174000",
866
870
  },
867
- http: {
868
- example:
869
- 'curl https://api.nirvanalabs.io/v1/usage/$RESOURCE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
870
- },
871
871
  },
872
872
  },
873
873
  {
@@ -890,6 +890,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
890
890
  example:
891
891
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const usage of client.usage.list()) {\n console.log(usage.project_id);\n}",
892
892
  },
893
+ http: {
894
+ example:
895
+ 'curl https://api.nirvanalabs.io/v1/usage \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
896
+ },
893
897
  go: {
894
898
  method: 'client.Usage.List',
895
899
  example:
@@ -899,10 +903,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
899
903
  method: 'usage list',
900
904
  example: "nirvana usage list \\\n --api-key 'My API Key'",
901
905
  },
902
- http: {
903
- example:
904
- 'curl https://api.nirvanalabs.io/v1/usage \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
905
- },
906
906
  },
907
907
  },
908
908
  {
@@ -924,6 +924,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
924
924
  example:
925
925
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog.id);",
926
926
  },
927
+ http: {
928
+ example:
929
+ 'curl https://api.nirvanalabs.io/v1/audit_logs/$AUDIT_LOG_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
930
+ },
927
931
  go: {
928
932
  method: 'client.AuditLogs.Get',
929
933
  example:
@@ -933,10 +937,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
933
937
  method: 'audit_logs get',
934
938
  example: "nirvana audit-logs get \\\n --api-key 'My API Key' \\\n --audit-log-id audit_log_id",
935
939
  },
936
- http: {
937
- example:
938
- 'curl https://api.nirvanalabs.io/v1/audit_logs/$AUDIT_LOG_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
939
- },
940
940
  },
941
941
  },
942
942
  {
@@ -958,6 +958,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
958
958
  example:
959
959
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog.id);\n}",
960
960
  },
961
+ http: {
962
+ example:
963
+ 'curl https://api.nirvanalabs.io/v1/audit_logs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
964
+ },
961
965
  go: {
962
966
  method: 'client.AuditLogs.List',
963
967
  example:
@@ -967,10 +971,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
967
971
  method: 'audit_logs list',
968
972
  example: "nirvana audit-logs list \\\n --api-key 'My API Key'",
969
973
  },
970
- http: {
971
- example:
972
- 'curl https://api.nirvanalabs.io/v1/audit_logs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
973
- },
974
974
  },
975
975
  },
976
976
  {
@@ -992,6 +992,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
992
992
  example:
993
993
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project.id);",
994
994
  },
995
+ http: {
996
+ example:
997
+ 'curl https://api.nirvanalabs.io/v1/projects \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
998
+ },
995
999
  go: {
996
1000
  method: 'client.Projects.New',
997
1001
  example:
@@ -1001,10 +1005,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1001
1005
  method: 'projects create',
1002
1006
  example: "nirvana projects create \\\n --api-key 'My API Key' \\\n --name 'My Project'",
1003
1007
  },
1004
- http: {
1005
- example:
1006
- 'curl https://api.nirvanalabs.io/v1/projects \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1007
- },
1008
1008
  },
1009
1009
  },
1010
1010
  {
@@ -1026,6 +1026,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1026
1026
  example:
1027
1027
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.get('project_id');\n\nconsole.log(project.id);",
1028
1028
  },
1029
+ http: {
1030
+ example:
1031
+ 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1032
+ },
1029
1033
  go: {
1030
1034
  method: 'client.Projects.Get',
1031
1035
  example:
@@ -1035,10 +1039,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1035
1039
  method: 'projects get',
1036
1040
  example: "nirvana projects get \\\n --api-key 'My API Key' \\\n --project-id project_id",
1037
1041
  },
1038
- http: {
1039
- example:
1040
- 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1041
- },
1042
1042
  },
1043
1043
  },
1044
1044
  {
@@ -1060,6 +1060,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1060
1060
  example:
1061
1061
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.update('project_id');\n\nconsole.log(project.id);",
1062
1062
  },
1063
+ http: {
1064
+ example:
1065
+ 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1066
+ },
1063
1067
  go: {
1064
1068
  method: 'client.Projects.Update',
1065
1069
  example:
@@ -1069,10 +1073,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1069
1073
  method: 'projects update',
1070
1074
  example: "nirvana projects update \\\n --api-key 'My API Key' \\\n --project-id project_id",
1071
1075
  },
1072
- http: {
1073
- example:
1074
- 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1075
- },
1076
1076
  },
1077
1077
  },
1078
1078
  {
@@ -1092,6 +1092,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1092
1092
  example:
1093
1093
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.projects.delete('project_id');",
1094
1094
  },
1095
+ http: {
1096
+ example:
1097
+ 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1098
+ },
1095
1099
  go: {
1096
1100
  method: 'client.Projects.Delete',
1097
1101
  example:
@@ -1101,10 +1105,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1101
1105
  method: 'projects delete',
1102
1106
  example: "nirvana projects delete \\\n --api-key 'My API Key' \\\n --project-id project_id",
1103
1107
  },
1104
- http: {
1105
- example:
1106
- 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1107
- },
1108
1108
  },
1109
1109
  },
1110
1110
  {
@@ -1126,6 +1126,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1126
1126
  example:
1127
1127
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const project of client.projects.list()) {\n console.log(project.id);\n}",
1128
1128
  },
1129
+ http: {
1130
+ example:
1131
+ 'curl https://api.nirvanalabs.io/v1/projects \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1132
+ },
1129
1133
  go: {
1130
1134
  method: 'client.Projects.List',
1131
1135
  example:
@@ -1135,10 +1139,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1135
1139
  method: 'projects list',
1136
1140
  example: "nirvana projects list \\\n --api-key 'My API Key'",
1137
1141
  },
1138
- http: {
1139
- example:
1140
- 'curl https://api.nirvanalabs.io/v1/projects \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1141
- },
1142
1142
  },
1143
1143
  },
1144
1144
  {
@@ -1160,6 +1160,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1160
1160
  example:
1161
1161
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst region = await client.regions.get('us-sva-2');\n\nconsole.log(region.availability);",
1162
1162
  },
1163
+ http: {
1164
+ example:
1165
+ 'curl https://api.nirvanalabs.io/v1/regions/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1166
+ },
1163
1167
  go: {
1164
1168
  method: 'client.Regions.Get',
1165
1169
  example:
@@ -1169,10 +1173,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1169
1173
  method: 'regions get',
1170
1174
  example: "nirvana regions get \\\n --api-key 'My API Key' \\\n --name us-sva-2",
1171
1175
  },
1172
- http: {
1173
- example:
1174
- 'curl https://api.nirvanalabs.io/v1/regions/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1175
- },
1176
1176
  },
1177
1177
  },
1178
1178
  {
@@ -1194,6 +1194,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1194
1194
  example:
1195
1195
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const region of client.regions.list()) {\n console.log(region.availability);\n}",
1196
1196
  },
1197
+ http: {
1198
+ example:
1199
+ 'curl https://api.nirvanalabs.io/v1/regions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1200
+ },
1197
1201
  go: {
1198
1202
  method: 'client.Regions.List',
1199
1203
  example:
@@ -1203,10 +1207,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1203
1207
  method: 'regions list',
1204
1208
  example: "nirvana regions list \\\n --api-key 'My API Key'",
1205
1209
  },
1206
- http: {
1207
- example:
1208
- 'curl https://api.nirvanalabs.io/v1/regions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1209
- },
1210
1210
  },
1211
1211
  },
1212
1212
  {
@@ -1228,6 +1228,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1228
1228
  example:
1229
1229
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType.network_bandwidth_gbps);",
1230
1230
  },
1231
+ http: {
1232
+ example:
1233
+ 'curl https://api.nirvanalabs.io/v1/instance_types/$REGION/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1234
+ },
1231
1235
  go: {
1232
1236
  method: 'client.InstanceTypes.Get',
1233
1237
  example:
@@ -1238,10 +1242,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1238
1242
  example:
1239
1243
  "nirvana instance-types get \\\n --api-key 'My API Key' \\\n --region us-sva-2 \\\n --name n1-standard-8",
1240
1244
  },
1241
- http: {
1242
- example:
1243
- 'curl https://api.nirvanalabs.io/v1/instance_types/$REGION/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1244
- },
1245
1245
  },
1246
1246
  },
1247
1247
  {
@@ -1263,6 +1263,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1263
1263
  example:
1264
1264
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType.network_bandwidth_gbps);\n}",
1265
1265
  },
1266
+ http: {
1267
+ example:
1268
+ 'curl https://api.nirvanalabs.io/v1/instance_types \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1269
+ },
1266
1270
  go: {
1267
1271
  method: 'client.InstanceTypes.List',
1268
1272
  example:
@@ -1272,10 +1276,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1272
1276
  method: 'instance_types list',
1273
1277
  example: "nirvana instance-types list \\\n --api-key 'My API Key'",
1274
1278
  },
1275
- http: {
1276
- example:
1277
- 'curl https://api.nirvanalabs.io/v1/instance_types \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1278
- },
1279
1279
  },
1280
1280
  },
1281
1281
  {
@@ -1309,6 +1309,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1309
1309
  example:
1310
1310
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
1311
1311
  },
1312
+ http: {
1313
+ example:
1314
+ 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1315
+ },
1312
1316
  go: {
1313
1317
  method: 'client.Compute.VMs.New',
1314
1318
  example:
@@ -1319,10 +1323,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1319
1323
  example:
1320
1324
  "nirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --instance-type n1-standard-8 \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
1321
1325
  },
1322
- http: {
1323
- example:
1324
- 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1325
- },
1326
1326
  },
1327
1327
  },
1328
1328
  {
@@ -1344,6 +1344,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1344
1344
  example:
1345
1345
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm.id);",
1346
1346
  },
1347
+ http: {
1348
+ example:
1349
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1350
+ },
1347
1351
  go: {
1348
1352
  method: 'client.Compute.VMs.Get',
1349
1353
  example:
@@ -1353,10 +1357,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1353
1357
  method: 'vms get',
1354
1358
  example: "nirvana compute:vms get \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
1355
1359
  },
1356
- http: {
1357
- example:
1358
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1359
- },
1360
1360
  },
1361
1361
  },
1362
1362
  {
@@ -1384,6 +1384,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1384
1384
  example:
1385
1385
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation.id);",
1386
1386
  },
1387
+ http: {
1388
+ example:
1389
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1390
+ },
1387
1391
  go: {
1388
1392
  method: 'client.Compute.VMs.Update',
1389
1393
  example:
@@ -1393,10 +1397,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1393
1397
  method: 'vms update',
1394
1398
  example: "nirvana compute:vms update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
1395
1399
  },
1396
- http: {
1397
- example:
1398
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1399
- },
1400
1400
  },
1401
1401
  },
1402
1402
  {
@@ -1418,6 +1418,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1418
1418
  example:
1419
1419
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.delete('vm_id');\n\nconsole.log(operation.id);",
1420
1420
  },
1421
+ http: {
1422
+ example:
1423
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1424
+ },
1421
1425
  go: {
1422
1426
  method: 'client.Compute.VMs.Delete',
1423
1427
  example:
@@ -1427,10 +1431,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1427
1431
  method: 'vms delete',
1428
1432
  example: "nirvana compute:vms delete \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
1429
1433
  },
1430
- http: {
1431
- example:
1432
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1433
- },
1434
1434
  },
1435
1435
  },
1436
1436
  {
@@ -1452,6 +1452,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1452
1452
  example:
1453
1453
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm.id);\n}",
1454
1454
  },
1455
+ http: {
1456
+ example:
1457
+ 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1458
+ },
1455
1459
  go: {
1456
1460
  method: 'client.Compute.VMs.List',
1457
1461
  example:
@@ -1461,10 +1465,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1461
1465
  method: 'vms list',
1462
1466
  example: "nirvana compute:vms list \\\n --api-key 'My API Key' \\\n --project-id project_id",
1463
1467
  },
1464
- http: {
1465
- example:
1466
- 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1467
- },
1468
1468
  },
1469
1469
  },
1470
1470
  {
@@ -1486,6 +1486,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1486
1486
  example:
1487
1487
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.restart('vm_id');\n\nconsole.log(operation.id);",
1488
1488
  },
1489
+ http: {
1490
+ example:
1491
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/restart \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1492
+ },
1489
1493
  go: {
1490
1494
  method: 'client.Compute.VMs.Restart',
1491
1495
  example:
@@ -1495,10 +1499,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1495
1499
  method: 'vms restart',
1496
1500
  example: "nirvana compute:vms restart \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
1497
1501
  },
1498
- http: {
1499
- example:
1500
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/restart \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1501
- },
1502
1502
  },
1503
1503
  },
1504
1504
  {
@@ -1530,6 +1530,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1530
1530
  example:
1531
1531
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
1532
1532
  },
1533
+ http: {
1534
+ example:
1535
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1536
+ },
1533
1537
  go: {
1534
1538
  method: 'client.Compute.VMs.Availability.New',
1535
1539
  example:
@@ -1540,10 +1544,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1540
1544
  example:
1541
1545
  "nirvana compute:vms:availability create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --instance-type n1-standard-8 \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
1542
1546
  },
1543
- http: {
1544
- example:
1545
- 'curl https://api.nirvanalabs.io/v1/compute/vms/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1546
- },
1547
1547
  },
1548
1548
  },
1549
1549
  {
@@ -1569,6 +1569,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1569
1569
  example:
1570
1570
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.update('vm_id');",
1571
1571
  },
1572
+ http: {
1573
+ example:
1574
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1575
+ },
1572
1576
  go: {
1573
1577
  method: 'client.Compute.VMs.Availability.Update',
1574
1578
  example:
@@ -1578,10 +1582,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1578
1582
  method: 'availability update',
1579
1583
  example: "nirvana compute:vms:availability update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
1580
1584
  },
1581
- http: {
1582
- example:
1583
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1584
- },
1585
1585
  },
1586
1586
  },
1587
1587
  {
@@ -1603,6 +1603,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1603
1603
  example:
1604
1604
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.vms.volumes.list('vm_id')) {\n console.log(volume.id);\n}",
1605
1605
  },
1606
+ http: {
1607
+ example:
1608
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1609
+ },
1606
1610
  go: {
1607
1611
  method: 'client.Compute.VMs.Volumes.List',
1608
1612
  example:
@@ -1612,10 +1616,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1612
1616
  method: 'volumes list',
1613
1617
  example: "nirvana compute:vms:volumes list \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
1614
1618
  },
1615
- http: {
1616
- example:
1617
- 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1618
- },
1619
1619
  },
1620
1620
  },
1621
1621
  {
@@ -1636,6 +1636,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1636
1636
  example:
1637
1637
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const osImage of client.compute.vms.osImages.list()) {\n console.log(osImage.created_at);\n}",
1638
1638
  },
1639
+ http: {
1640
+ example:
1641
+ 'curl https://api.nirvanalabs.io/v1/compute/vms/os_images \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1642
+ },
1639
1643
  go: {
1640
1644
  method: 'client.Compute.VMs.OSImages.List',
1641
1645
  example:
@@ -1645,10 +1649,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1645
1649
  method: 'os_images list',
1646
1650
  example: "nirvana compute:vms:os-images list \\\n --api-key 'My API Key'",
1647
1651
  },
1648
- http: {
1649
- example:
1650
- 'curl https://api.nirvanalabs.io/v1/compute/vms/os_images \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1651
- },
1652
1652
  },
1653
1653
  },
1654
1654
  {
@@ -1678,6 +1678,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1678
1678
  example:
1679
1679
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation.id);",
1680
1680
  },
1681
+ http: {
1682
+ example:
1683
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
1684
+ },
1681
1685
  go: {
1682
1686
  method: 'client.Compute.Volumes.New',
1683
1687
  example:
@@ -1688,10 +1692,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1688
1692
  example:
1689
1693
  "nirvana compute:volumes create \\\n --api-key 'My API Key' \\\n --name my-data-volume \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --size 100 \\\n --type abs",
1690
1694
  },
1691
- http: {
1692
- example:
1693
- 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
1694
- },
1695
1695
  },
1696
1696
  },
1697
1697
  {
@@ -1713,6 +1713,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1713
1713
  example:
1714
1714
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst volume = await client.compute.volumes.get('volume_id');\n\nconsole.log(volume.id);",
1715
1715
  },
1716
+ http: {
1717
+ example:
1718
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1719
+ },
1716
1720
  go: {
1717
1721
  method: 'client.Compute.Volumes.Get',
1718
1722
  example:
@@ -1722,10 +1726,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1722
1726
  method: 'volumes get',
1723
1727
  example: "nirvana compute:volumes get \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
1724
1728
  },
1725
- http: {
1726
- example:
1727
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1728
- },
1729
1729
  },
1730
1730
  },
1731
1731
  {
@@ -1747,6 +1747,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1747
1747
  example:
1748
1748
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.update('volume_id');\n\nconsole.log(operation.id);",
1749
1749
  },
1750
+ http: {
1751
+ example:
1752
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1753
+ },
1750
1754
  go: {
1751
1755
  method: 'client.Compute.Volumes.Update',
1752
1756
  example:
@@ -1756,10 +1760,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1756
1760
  method: 'volumes update',
1757
1761
  example: "nirvana compute:volumes update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
1758
1762
  },
1759
- http: {
1760
- example:
1761
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1762
- },
1763
1763
  },
1764
1764
  },
1765
1765
  {
@@ -1781,6 +1781,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1781
1781
  example:
1782
1782
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.delete('volume_id');\n\nconsole.log(operation.id);",
1783
1783
  },
1784
+ http: {
1785
+ example:
1786
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1787
+ },
1784
1788
  go: {
1785
1789
  method: 'client.Compute.Volumes.Delete',
1786
1790
  example:
@@ -1790,10 +1794,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1790
1794
  method: 'volumes delete',
1791
1795
  example: "nirvana compute:volumes delete \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
1792
1796
  },
1793
- http: {
1794
- example:
1795
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1796
- },
1797
1797
  },
1798
1798
  },
1799
1799
  {
@@ -1815,6 +1815,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1815
1815
  example:
1816
1816
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.volumes.list({ project_id: 'project_id' })) {\n console.log(volume.id);\n}",
1817
1817
  },
1818
+ http: {
1819
+ example:
1820
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1821
+ },
1818
1822
  go: {
1819
1823
  method: 'client.Compute.Volumes.List',
1820
1824
  example:
@@ -1824,10 +1828,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1824
1828
  method: 'volumes list',
1825
1829
  example: "nirvana compute:volumes list \\\n --api-key 'My API Key' \\\n --project-id project_id",
1826
1830
  },
1827
- http: {
1828
- example:
1829
- 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1830
- },
1831
1831
  },
1832
1832
  },
1833
1833
  {
@@ -1849,6 +1849,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1849
1849
  example:
1850
1850
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.attach('volume_id', {\n vm_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
1851
1851
  },
1852
+ http: {
1853
+ example:
1854
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/attach \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
1855
+ },
1852
1856
  go: {
1853
1857
  method: 'client.Compute.Volumes.Attach',
1854
1858
  example:
@@ -1859,10 +1863,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1859
1863
  example:
1860
1864
  "nirvana compute:volumes attach \\\n --api-key 'My API Key' \\\n --volume-id volume_id \\\n --vm-id 123e4567-e89b-12d3-a456-426614174000",
1861
1865
  },
1862
- http: {
1863
- example:
1864
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/attach \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
1865
- },
1866
1866
  },
1867
1867
  },
1868
1868
  {
@@ -1884,6 +1884,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1884
1884
  example:
1885
1885
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.detach('volume_id');\n\nconsole.log(operation.id);",
1886
1886
  },
1887
+ http: {
1888
+ example:
1889
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/detach \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1890
+ },
1887
1891
  go: {
1888
1892
  method: 'client.Compute.Volumes.Detach',
1889
1893
  example:
@@ -1893,10 +1897,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1893
1897
  method: 'volumes detach',
1894
1898
  example: "nirvana compute:volumes detach \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
1895
1899
  },
1896
- http: {
1897
- example:
1898
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/detach \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1899
- },
1900
1900
  },
1901
1901
  },
1902
1902
  {
@@ -1924,6 +1924,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1924
1924
  example:
1925
1925
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n size: 100,\n type: 'abs',\n});",
1926
1926
  },
1927
+ http: {
1928
+ example:
1929
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
1930
+ },
1927
1931
  go: {
1928
1932
  method: 'client.Compute.Volumes.Availability.New',
1929
1933
  example:
@@ -1934,10 +1938,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1934
1938
  example:
1935
1939
  "nirvana compute:volumes:availability create \\\n --api-key 'My API Key' \\\n --name my-data-volume \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --size 100 \\\n --type abs",
1936
1940
  },
1937
- http: {
1938
- example:
1939
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
1940
- },
1941
1941
  },
1942
1942
  },
1943
1943
  {
@@ -1957,6 +1957,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1957
1957
  example:
1958
1958
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.update('volume_id');",
1959
1959
  },
1960
+ http: {
1961
+ example:
1962
+ 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1963
+ },
1960
1964
  go: {
1961
1965
  method: 'client.Compute.Volumes.Availability.Update',
1962
1966
  example:
@@ -1967,10 +1971,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1967
1971
  example:
1968
1972
  "nirvana compute:volumes:availability update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
1969
1973
  },
1970
- http: {
1971
- example:
1972
- 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
1973
- },
1974
1974
  },
1975
1975
  },
1976
1976
  {
@@ -1998,6 +1998,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1998
1998
  example:
1999
1999
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation.id);",
2000
2000
  },
2001
+ http: {
2002
+ example:
2003
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2004
+ },
2001
2005
  go: {
2002
2006
  method: 'client.Networking.VPCs.New',
2003
2007
  example:
@@ -2008,10 +2012,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2008
2012
  example:
2009
2013
  "nirvana networking:vpcs create \\\n --api-key 'My API Key' \\\n --name my-vpc \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --subnet-name my-subnet",
2010
2014
  },
2011
- http: {
2012
- example:
2013
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2014
- },
2015
2015
  },
2016
2016
  },
2017
2017
  {
@@ -2033,6 +2033,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2033
2033
  example:
2034
2034
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vpc = await client.networking.vpcs.get('vpc_id');\n\nconsole.log(vpc.id);",
2035
2035
  },
2036
+ http: {
2037
+ example:
2038
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2039
+ },
2036
2040
  go: {
2037
2041
  method: 'client.Networking.VPCs.Get',
2038
2042
  example:
@@ -2042,10 +2046,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2042
2046
  method: 'vpcs get',
2043
2047
  example: "nirvana networking:vpcs get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
2044
2048
  },
2045
- http: {
2046
- example:
2047
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2048
- },
2049
2049
  },
2050
2050
  },
2051
2051
  {
@@ -2067,6 +2067,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2067
2067
  example:
2068
2068
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.update('vpc_id');\n\nconsole.log(operation.id);",
2069
2069
  },
2070
+ http: {
2071
+ example:
2072
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2073
+ },
2070
2074
  go: {
2071
2075
  method: 'client.Networking.VPCs.Update',
2072
2076
  example:
@@ -2076,10 +2080,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2076
2080
  method: 'vpcs update',
2077
2081
  example: "nirvana networking:vpcs update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
2078
2082
  },
2079
- http: {
2080
- example:
2081
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2082
- },
2083
2083
  },
2084
2084
  },
2085
2085
  {
@@ -2101,6 +2101,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2101
2101
  example:
2102
2102
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.delete('vpc_id');\n\nconsole.log(operation.id);",
2103
2103
  },
2104
+ http: {
2105
+ example:
2106
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2107
+ },
2104
2108
  go: {
2105
2109
  method: 'client.Networking.VPCs.Delete',
2106
2110
  example:
@@ -2110,10 +2114,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2110
2114
  method: 'vpcs delete',
2111
2115
  example: "nirvana networking:vpcs delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
2112
2116
  },
2113
- http: {
2114
- example:
2115
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2116
- },
2117
2117
  },
2118
2118
  },
2119
2119
  {
@@ -2135,6 +2135,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2135
2135
  example:
2136
2136
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vpc of client.networking.vpcs.list({ project_id: 'project_id' })) {\n console.log(vpc.id);\n}",
2137
2137
  },
2138
+ http: {
2139
+ example:
2140
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2141
+ },
2138
2142
  go: {
2139
2143
  method: 'client.Networking.VPCs.List',
2140
2144
  example:
@@ -2144,10 +2148,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2144
2148
  method: 'vpcs list',
2145
2149
  example: "nirvana networking:vpcs list \\\n --api-key 'My API Key' \\\n --project-id project_id",
2146
2150
  },
2147
- http: {
2148
- example:
2149
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2150
- },
2151
2151
  },
2152
2152
  },
2153
2153
  {
@@ -2173,6 +2173,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2173
2173
  example:
2174
2174
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n subnet_name: 'my-subnet',\n});",
2175
2175
  },
2176
+ http: {
2177
+ example:
2178
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2179
+ },
2176
2180
  go: {
2177
2181
  method: 'client.Networking.VPCs.Availability.New',
2178
2182
  example:
@@ -2183,10 +2187,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2183
2187
  example:
2184
2188
  "nirvana networking:vpcs:availability create \\\n --api-key 'My API Key' \\\n --name my-vpc \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --subnet-name my-subnet",
2185
2189
  },
2186
- http: {
2187
- example:
2188
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2189
- },
2190
2190
  },
2191
2191
  },
2192
2192
  {
@@ -2206,6 +2206,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2206
2206
  example:
2207
2207
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.update('vpc_id');",
2208
2208
  },
2209
+ http: {
2210
+ example:
2211
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2212
+ },
2209
2213
  go: {
2210
2214
  method: 'client.Networking.VPCs.Availability.Update',
2211
2215
  example:
@@ -2216,10 +2220,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2216
2220
  example:
2217
2221
  "nirvana networking:vpcs:availability update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
2218
2222
  },
2219
- http: {
2220
- example:
2221
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2222
- },
2223
2223
  },
2224
2224
  },
2225
2225
  {
@@ -2249,6 +2249,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2249
2249
  example:
2250
2250
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.create('vpc_id', {\n destination_address: '10.0.0.0/25',\n destination_ports: ['22', '80', '443'],\n name: 'my-firewall-rule',\n protocol: 'tcp',\n source_address: '0.0.0.0/0',\n});\n\nconsole.log(operation.id);",
2251
2251
  },
2252
+ http: {
2253
+ example:
2254
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2255
+ },
2252
2256
  go: {
2253
2257
  method: 'client.Networking.FirewallRules.New',
2254
2258
  example:
@@ -2259,10 +2263,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2259
2263
  example:
2260
2264
  "nirvana networking:firewall-rules create \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --destination-address 10.0.0.0/25 \\\n --destination-port \"'22'\" \\\n --destination-port \"'80'\" \\\n --destination-port \"'443'\" \\\n --name my-firewall-rule \\\n --protocol tcp \\\n --source-address 0.0.0.0/0",
2261
2265
  },
2262
- http: {
2263
- example:
2264
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2265
- },
2266
2266
  },
2267
2267
  },
2268
2268
  {
@@ -2284,6 +2284,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2284
2284
  example:
2285
2285
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst firewallRule = await client.networking.firewallRules.get('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(firewallRule.id);",
2286
2286
  },
2287
+ http: {
2288
+ example:
2289
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2290
+ },
2287
2291
  go: {
2288
2292
  method: 'client.Networking.FirewallRules.Get',
2289
2293
  example:
@@ -2294,10 +2298,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2294
2298
  example:
2295
2299
  "nirvana networking:firewall-rules get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
2296
2300
  },
2297
- http: {
2298
- example:
2299
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2300
- },
2301
2301
  },
2302
2302
  },
2303
2303
  {
@@ -2328,6 +2328,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2328
2328
  example:
2329
2329
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.update('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
2330
2330
  },
2331
+ http: {
2332
+ example:
2333
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2334
+ },
2331
2335
  go: {
2332
2336
  method: 'client.Networking.FirewallRules.Update',
2333
2337
  example:
@@ -2338,10 +2342,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2338
2342
  example:
2339
2343
  "nirvana networking:firewall-rules update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
2340
2344
  },
2341
- http: {
2342
- example:
2343
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2344
- },
2345
2345
  },
2346
2346
  },
2347
2347
  {
@@ -2363,6 +2363,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2363
2363
  example:
2364
2364
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.delete('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
2365
2365
  },
2366
+ http: {
2367
+ example:
2368
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2369
+ },
2366
2370
  go: {
2367
2371
  method: 'client.Networking.FirewallRules.Delete',
2368
2372
  example:
@@ -2373,10 +2377,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2373
2377
  example:
2374
2378
  "nirvana networking:firewall-rules delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
2375
2379
  },
2376
- http: {
2377
- example:
2378
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2379
- },
2380
2380
  },
2381
2381
  },
2382
2382
  {
@@ -2398,6 +2398,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2398
2398
  example:
2399
2399
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const firewallRule of client.networking.firewallRules.list('vpc_id')) {\n console.log(firewallRule.id);\n}",
2400
2400
  },
2401
+ http: {
2402
+ example:
2403
+ 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2404
+ },
2401
2405
  go: {
2402
2406
  method: 'client.Networking.FirewallRules.List',
2403
2407
  example:
@@ -2407,10 +2411,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2407
2411
  method: 'firewall_rules list',
2408
2412
  example: "nirvana networking:firewall-rules list \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
2409
2413
  },
2410
- http: {
2411
- example:
2412
- 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2413
- },
2414
2414
  },
2415
2415
  },
2416
2416
  {
@@ -2441,6 +2441,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2441
2441
  example:
2442
2442
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.create({\n bandwidth_mbps: 50,\n cidrs: ['10.0.0.0/16'],\n name: 'my-connect-connection',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n provider_cidrs: ['172.16.0.0/16'],\n region: 'us-sva-2',\n});\n\nconsole.log(operation.id);",
2443
2443
  },
2444
+ http: {
2445
+ example:
2446
+ 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "bandwidth_mbps": 50,\n "cidrs": [\n "10.0.0.0/16"\n ],\n "name": "my-connect-connection",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "provider_cidrs": [\n "172.16.0.0/16"\n ],\n "region": "us-sva-2",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2447
+ },
2444
2448
  go: {
2445
2449
  method: 'client.Networking.Connect.Connections.New',
2446
2450
  example:
@@ -2451,10 +2455,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2451
2455
  example:
2452
2456
  "nirvana networking:connect:connections create \\\n --api-key 'My API Key' \\\n --bandwidth-mbps 50 \\\n --cidr 10.0.0.0/16 \\\n --name my-connect-connection \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --provider-cidr 172.16.0.0/16 \\\n --region us-sva-2",
2453
2457
  },
2454
- http: {
2455
- example:
2456
- 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "bandwidth_mbps": 50,\n "cidrs": [\n "10.0.0.0/16"\n ],\n "name": "my-connect-connection",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "provider_cidrs": [\n "172.16.0.0/16"\n ],\n "region": "us-sva-2",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2457
- },
2458
2458
  },
2459
2459
  },
2460
2460
  {
@@ -2476,6 +2476,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2476
2476
  example:
2477
2477
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst connectConnection = await client.networking.connect.connections.get('connection_id');\n\nconsole.log(connectConnection.id);",
2478
2478
  },
2479
+ http: {
2480
+ example:
2481
+ 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2482
+ },
2479
2483
  go: {
2480
2484
  method: 'client.Networking.Connect.Connections.Get',
2481
2485
  example:
@@ -2486,10 +2490,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2486
2490
  example:
2487
2491
  "nirvana networking:connect:connections get \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
2488
2492
  },
2489
- http: {
2490
- example:
2491
- 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2492
- },
2493
2493
  },
2494
2494
  },
2495
2495
  {
@@ -2511,6 +2511,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2511
2511
  example:
2512
2512
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.update('connection_id');\n\nconsole.log(operation.id);",
2513
2513
  },
2514
+ http: {
2515
+ example:
2516
+ 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-connect-connection",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2517
+ },
2514
2518
  go: {
2515
2519
  method: 'client.Networking.Connect.Connections.Update',
2516
2520
  example:
@@ -2521,10 +2525,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2521
2525
  example:
2522
2526
  "nirvana networking:connect:connections update \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
2523
2527
  },
2524
- http: {
2525
- example:
2526
- 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-connect-connection",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2527
- },
2528
2528
  },
2529
2529
  },
2530
2530
  {
@@ -2546,6 +2546,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2546
2546
  example:
2547
2547
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.delete('connection_id');\n\nconsole.log(operation.id);",
2548
2548
  },
2549
+ http: {
2550
+ example:
2551
+ 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2552
+ },
2549
2553
  go: {
2550
2554
  method: 'client.Networking.Connect.Connections.Delete',
2551
2555
  example:
@@ -2556,10 +2560,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2556
2560
  example:
2557
2561
  "nirvana networking:connect:connections delete \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
2558
2562
  },
2559
- http: {
2560
- example:
2561
- 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2562
- },
2563
2563
  },
2564
2564
  },
2565
2565
  {
@@ -2581,6 +2581,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2581
2581
  example:
2582
2582
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectConnection of client.networking.connect.connections.list({\n project_id: 'project_id',\n})) {\n console.log(connectConnection.id);\n}",
2583
2583
  },
2584
+ http: {
2585
+ example:
2586
+ 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2587
+ },
2584
2588
  go: {
2585
2589
  method: 'client.Networking.Connect.Connections.List',
2586
2590
  example:
@@ -2591,10 +2595,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2591
2595
  example:
2592
2596
  "nirvana networking:connect:connections list \\\n --api-key 'My API Key' \\\n --project-id project_id",
2593
2597
  },
2594
- http: {
2595
- example:
2596
- 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2597
- },
2598
2598
  },
2599
2599
  },
2600
2600
  {
@@ -2615,6 +2615,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2615
2615
  example:
2616
2616
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectRoute of client.networking.connect.routes.list()) {\n console.log(connectRoute.provider);\n}",
2617
2617
  },
2618
+ http: {
2619
+ example:
2620
+ 'curl https://api.nirvanalabs.io/v1/networking/connect/routes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2621
+ },
2618
2622
  go: {
2619
2623
  method: 'client.Networking.Connect.Routes.List',
2620
2624
  example:
@@ -2624,10 +2628,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2624
2628
  method: 'routes list',
2625
2629
  example: "nirvana networking:connect:routes list \\\n --api-key 'My API Key'",
2626
2630
  },
2627
- http: {
2628
- example:
2629
- 'curl https://api.nirvanalabs.io/v1/networking/connect/routes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2630
- },
2631
2631
  },
2632
2632
  },
2633
2633
  {
@@ -2655,6 +2655,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2655
2655
  example:
2656
2656
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.create({\n blockchain: 'ethereum',\n name: 'my-ethereum-node',\n network: 'mainnet',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(flex.id);",
2657
2657
  },
2658
+ http: {
2659
+ example:
2660
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "blockchain": "ethereum",\n "name": "my-ethereum-node",\n "network": "mainnet",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2661
+ },
2658
2662
  go: {
2659
2663
  method: 'client.RPCNodes.Flex.New',
2660
2664
  example:
@@ -2665,10 +2669,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2665
2669
  example:
2666
2670
  "nirvana rpc-nodes:flex create \\\n --api-key 'My API Key' \\\n --blockchain ethereum \\\n --name my-ethereum-node \\\n --network mainnet \\\n --project-id 123e4567-e89b-12d3-a456-426614174000",
2667
2671
  },
2668
- http: {
2669
- example:
2670
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "blockchain": "ethereum",\n "name": "my-ethereum-node",\n "network": "mainnet",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2671
- },
2672
2672
  },
2673
2673
  },
2674
2674
  {
@@ -2690,6 +2690,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2690
2690
  example:
2691
2691
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.get('node_id');\n\nconsole.log(flex.id);",
2692
2692
  },
2693
+ http: {
2694
+ example:
2695
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2696
+ },
2693
2697
  go: {
2694
2698
  method: 'client.RPCNodes.Flex.Get',
2695
2699
  example:
@@ -2699,10 +2703,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2699
2703
  method: 'flex get',
2700
2704
  example: "nirvana rpc-nodes:flex get \\\n --api-key 'My API Key' \\\n --node-id node_id",
2701
2705
  },
2702
- http: {
2703
- example:
2704
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2705
- },
2706
2706
  },
2707
2707
  },
2708
2708
  {
@@ -2724,6 +2724,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2724
2724
  example:
2725
2725
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.update('node_id');\n\nconsole.log(flex.id);",
2726
2726
  },
2727
+ http: {
2728
+ example:
2729
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-ethereum-node",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2730
+ },
2727
2731
  go: {
2728
2732
  method: 'client.RPCNodes.Flex.Update',
2729
2733
  example:
@@ -2733,10 +2737,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2733
2737
  method: 'flex update',
2734
2738
  example: "nirvana rpc-nodes:flex update \\\n --api-key 'My API Key' \\\n --node-id node_id",
2735
2739
  },
2736
- http: {
2737
- example:
2738
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-ethereum-node",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
2739
- },
2740
2740
  },
2741
2741
  },
2742
2742
  {
@@ -2756,6 +2756,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2756
2756
  example:
2757
2757
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.rpcNodes.flex.delete('node_id');",
2758
2758
  },
2759
+ http: {
2760
+ example:
2761
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2762
+ },
2759
2763
  go: {
2760
2764
  method: 'client.RPCNodes.Flex.Delete',
2761
2765
  example:
@@ -2765,10 +2769,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2765
2769
  method: 'flex delete',
2766
2770
  example: "nirvana rpc-nodes:flex delete \\\n --api-key 'My API Key' \\\n --node-id node_id",
2767
2771
  },
2768
- http: {
2769
- example:
2770
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2771
- },
2772
2772
  },
2773
2773
  },
2774
2774
  {
@@ -2790,6 +2790,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2790
2790
  example:
2791
2791
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flex of client.rpcNodes.flex.list({ project_id: 'project_id' })) {\n console.log(flex.id);\n}",
2792
2792
  },
2793
+ http: {
2794
+ example:
2795
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2796
+ },
2793
2797
  go: {
2794
2798
  method: 'client.RPCNodes.Flex.List',
2795
2799
  example:
@@ -2799,10 +2803,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2799
2803
  method: 'flex list',
2800
2804
  example: "nirvana rpc-nodes:flex list \\\n --api-key 'My API Key' \\\n --project-id project_id",
2801
2805
  },
2802
- http: {
2803
- example:
2804
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2805
- },
2806
2806
  },
2807
2807
  },
2808
2808
  {
@@ -2823,6 +2823,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2823
2823
  example:
2824
2824
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flexBlockchain of client.rpcNodes.flex.blockchains.list()) {\n console.log(flexBlockchain.blockchain);\n}",
2825
2825
  },
2826
+ http: {
2827
+ example:
2828
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2829
+ },
2826
2830
  go: {
2827
2831
  method: 'client.RPCNodes.Flex.Blockchains.List',
2828
2832
  example:
@@ -2832,10 +2836,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2832
2836
  method: 'blockchains list',
2833
2837
  example: "nirvana rpc-nodes:flex:blockchains list \\\n --api-key 'My API Key'",
2834
2838
  },
2835
- http: {
2836
- example:
2837
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2838
- },
2839
2839
  },
2840
2840
  },
2841
2841
  {
@@ -2857,6 +2857,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2857
2857
  example:
2858
2858
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst dedicated = await client.rpcNodes.dedicated.get('node_id');\n\nconsole.log(dedicated.id);",
2859
2859
  },
2860
+ http: {
2861
+ example:
2862
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2863
+ },
2860
2864
  go: {
2861
2865
  method: 'client.RPCNodes.Dedicated.Get',
2862
2866
  example:
@@ -2866,10 +2870,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2866
2870
  method: 'dedicated get',
2867
2871
  example: "nirvana rpc-nodes:dedicated get \\\n --api-key 'My API Key' \\\n --node-id node_id",
2868
2872
  },
2869
- http: {
2870
- example:
2871
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2872
- },
2873
2873
  },
2874
2874
  },
2875
2875
  {
@@ -2891,6 +2891,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2891
2891
  example:
2892
2892
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicated of client.rpcNodes.dedicated.list({ project_id: 'project_id' })) {\n console.log(dedicated.id);\n}",
2893
2893
  },
2894
+ http: {
2895
+ example:
2896
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2897
+ },
2894
2898
  go: {
2895
2899
  method: 'client.RPCNodes.Dedicated.List',
2896
2900
  example:
@@ -2901,10 +2905,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2901
2905
  example:
2902
2906
  "nirvana rpc-nodes:dedicated list \\\n --api-key 'My API Key' \\\n --project-id project_id",
2903
2907
  },
2904
- http: {
2905
- example:
2906
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2907
- },
2908
2908
  },
2909
2909
  },
2910
2910
  {
@@ -2925,6 +2925,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2925
2925
  example:
2926
2926
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicatedBlockchain of client.rpcNodes.dedicated.blockchains.list()) {\n console.log(dedicatedBlockchain.blockchain);\n}",
2927
2927
  },
2928
+ http: {
2929
+ example:
2930
+ 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2931
+ },
2928
2932
  go: {
2929
2933
  method: 'client.RPCNodes.Dedicated.Blockchains.List',
2930
2934
  example:
@@ -2934,10 +2938,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2934
2938
  method: 'blockchains list',
2935
2939
  example: "nirvana rpc-nodes:dedicated:blockchains list \\\n --api-key 'My API Key'",
2936
2940
  },
2937
- http: {
2938
- example:
2939
- 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2940
- },
2941
2941
  },
2942
2942
  },
2943
2943
  {
@@ -2958,6 +2958,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2958
2958
  example:
2959
2959
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const kubernetesVersion of client.nks.kubernetesVersions.list()) {\n console.log(kubernetesVersion.created_at);\n}",
2960
2960
  },
2961
+ http: {
2962
+ example:
2963
+ 'curl https://api.nirvanalabs.io/v1/nks/kubernetes_versions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2964
+ },
2961
2965
  go: {
2962
2966
  method: 'client.NKS.KubernetesVersions.List',
2963
2967
  example:
@@ -2967,10 +2971,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2967
2971
  method: 'kubernetes_versions list',
2968
2972
  example: "nirvana nks:kubernetes-versions list \\\n --api-key 'My API Key'",
2969
2973
  },
2970
- http: {
2971
- example:
2972
- 'curl https://api.nirvanalabs.io/v1/nks/kubernetes_versions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
2973
- },
2974
2974
  },
2975
2975
  },
2976
2976
  {
@@ -3000,6 +3000,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3000
3000
  example:
3001
3001
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.create({\n autoscaling: true,\n kubernetes_version: 'v1.34.4',\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
3002
3002
  },
3003
+ http: {
3004
+ example:
3005
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "kubernetes_version": "v1.34.4",\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3006
+ },
3003
3007
  go: {
3004
3008
  method: 'client.NKS.Clusters.New',
3005
3009
  example:
@@ -3010,10 +3014,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3010
3014
  example:
3011
3015
  "nirvana nks:clusters create \\\n --api-key 'My API Key' \\\n --autoscaling \\\n --kubernetes-version v1.34.4 \\\n --name my-cluster \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
3012
3016
  },
3013
- http: {
3014
- example:
3015
- 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "kubernetes_version": "v1.34.4",\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3016
- },
3017
3017
  },
3018
3018
  },
3019
3019
  {
@@ -3035,6 +3035,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3035
3035
  example:
3036
3036
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.get('cluster_id');\n\nconsole.log(nksCluster.id);",
3037
3037
  },
3038
+ http: {
3039
+ example:
3040
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3041
+ },
3038
3042
  go: {
3039
3043
  method: 'client.NKS.Clusters.Get',
3040
3044
  example:
@@ -3044,10 +3048,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3044
3048
  method: 'clusters get',
3045
3049
  example: "nirvana nks:clusters get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3046
3050
  },
3047
- http: {
3048
- example:
3049
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3050
- },
3051
3051
  },
3052
3052
  },
3053
3053
  {
@@ -3069,6 +3069,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3069
3069
  example:
3070
3070
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.update('cluster_id');\n\nconsole.log(operation.id);",
3071
3071
  },
3072
+ http: {
3073
+ example:
3074
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3075
+ },
3072
3076
  go: {
3073
3077
  method: 'client.NKS.Clusters.Update',
3074
3078
  example:
@@ -3078,10 +3082,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3078
3082
  method: 'clusters update',
3079
3083
  example: "nirvana nks:clusters update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3080
3084
  },
3081
- http: {
3082
- example:
3083
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3084
- },
3085
3085
  },
3086
3086
  },
3087
3087
  {
@@ -3103,6 +3103,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3103
3103
  example:
3104
3104
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.delete('cluster_id');\n\nconsole.log(operation.id);",
3105
3105
  },
3106
+ http: {
3107
+ example:
3108
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3109
+ },
3106
3110
  go: {
3107
3111
  method: 'client.NKS.Clusters.Delete',
3108
3112
  example:
@@ -3112,10 +3116,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3112
3116
  method: 'clusters delete',
3113
3117
  example: "nirvana nks:clusters delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3114
3118
  },
3115
- http: {
3116
- example:
3117
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3118
- },
3119
3119
  },
3120
3120
  },
3121
3121
  {
@@ -3137,6 +3137,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3137
3137
  example:
3138
3138
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {\n console.log(nksCluster.id);\n}",
3139
3139
  },
3140
+ http: {
3141
+ example:
3142
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3143
+ },
3140
3144
  go: {
3141
3145
  method: 'client.NKS.Clusters.List',
3142
3146
  example:
@@ -3146,10 +3150,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3146
3150
  method: 'clusters list',
3147
3151
  example: "nirvana nks:clusters list \\\n --api-key 'My API Key' \\\n --project-id project_id",
3148
3152
  },
3149
- http: {
3150
- example:
3151
- 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3152
- },
3153
3153
  },
3154
3154
  },
3155
3155
  {
@@ -3177,6 +3177,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3177
3177
  example:
3178
3178
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.create({\n autoscaling: true,\n kubernetes_version: 'v1.34.4',\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
3179
3179
  },
3180
+ http: {
3181
+ example:
3182
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "kubernetes_version": "v1.34.4",\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3183
+ },
3180
3184
  go: {
3181
3185
  method: 'client.NKS.Clusters.Availability.New',
3182
3186
  example:
@@ -3187,10 +3191,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3187
3191
  example:
3188
3192
  "nirvana nks:clusters:availability create \\\n --api-key 'My API Key' \\\n --autoscaling \\\n --kubernetes-version v1.34.4 \\\n --name my-cluster \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
3189
3193
  },
3190
- http: {
3191
- example:
3192
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "kubernetes_version": "v1.34.4",\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3193
- },
3194
3194
  },
3195
3195
  },
3196
3196
  {
@@ -3210,6 +3210,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3210
3210
  example:
3211
3211
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.update('cluster_id');",
3212
3212
  },
3213
+ http: {
3214
+ example:
3215
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3216
+ },
3213
3217
  go: {
3214
3218
  method: 'client.NKS.Clusters.Availability.Update',
3215
3219
  example:
@@ -3220,10 +3224,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3220
3224
  example:
3221
3225
  "nirvana nks:clusters:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3222
3226
  },
3223
- http: {
3224
- example:
3225
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "autoscaling": true,\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3226
- },
3227
3227
  },
3228
3228
  },
3229
3229
  {
@@ -3245,6 +3245,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3245
3245
  example:
3246
3246
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get(\n 'persistent_volume_claim_id',\n { cluster_id: 'cluster_id' },\n);\n\nconsole.log(persistentVolumeClaim.id);",
3247
3247
  },
3248
+ http: {
3249
+ example:
3250
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims/$PERSISTENT_VOLUME_CLAIM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3251
+ },
3248
3252
  go: {
3249
3253
  method: 'client.NKS.Clusters.PersistentVolumeClaims.Get',
3250
3254
  example:
@@ -3255,10 +3259,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3255
3259
  example:
3256
3260
  "nirvana nks:clusters:persistent-volume-claims get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --persistent-volume-claim-id persistent_volume_claim_id",
3257
3261
  },
3258
- http: {
3259
- example:
3260
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims/$PERSISTENT_VOLUME_CLAIM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3261
- },
3262
3262
  },
3263
3263
  },
3264
3264
  {
@@ -3280,6 +3280,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3280
3280
  example:
3281
3281
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list(\n 'cluster_id',\n)) {\n console.log(persistentVolumeClaim.id);\n}",
3282
3282
  },
3283
+ http: {
3284
+ example:
3285
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3286
+ },
3283
3287
  go: {
3284
3288
  method: 'client.NKS.Clusters.PersistentVolumeClaims.List',
3285
3289
  example:
@@ -3290,10 +3294,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3290
3294
  example:
3291
3295
  "nirvana nks:clusters:persistent-volume-claims list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3292
3296
  },
3293
- http: {
3294
- example:
3295
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3296
- },
3297
3297
  },
3298
3298
  },
3299
3299
  {
@@ -3314,6 +3314,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3314
3314
  example:
3315
3315
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');\n\nconsole.log(kubeconfig.kubeconfig);",
3316
3316
  },
3317
+ http: {
3318
+ example:
3319
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/kubeconfig \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3320
+ },
3317
3321
  go: {
3318
3322
  method: 'client.NKS.Clusters.Kubeconfig.Get',
3319
3323
  example:
@@ -3324,10 +3328,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3324
3328
  example:
3325
3329
  "nirvana nks:clusters:kubeconfig get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3326
3330
  },
3327
- http: {
3328
- example:
3329
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/kubeconfig \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3330
- },
3331
3331
  },
3332
3332
  },
3333
3333
  {
@@ -3349,6 +3349,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3349
3349
  example:
3350
3350
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksController.id);",
3351
3351
  },
3352
+ http: {
3353
+ example:
3354
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3355
+ },
3352
3356
  go: {
3353
3357
  method: 'client.NKS.Clusters.Controllers.Get',
3354
3358
  example:
@@ -3359,10 +3363,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3359
3363
  example:
3360
3364
  "nirvana nks:clusters:controllers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
3361
3365
  },
3362
- http: {
3363
- example:
3364
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3365
- },
3366
3366
  },
3367
3367
  },
3368
3368
  {
@@ -3384,6 +3384,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3384
3384
  example:
3385
3385
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController.id);\n}",
3386
3386
  },
3387
+ http: {
3388
+ example:
3389
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3390
+ },
3387
3391
  go: {
3388
3392
  method: 'client.NKS.Clusters.Controllers.List',
3389
3393
  example:
@@ -3394,10 +3398,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3394
3398
  example:
3395
3399
  "nirvana nks:clusters:controllers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3396
3400
  },
3397
- http: {
3398
- example:
3399
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3400
- },
3401
3401
  },
3402
3402
  },
3403
3403
  {
@@ -3419,6 +3419,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3419
3419
  example:
3420
3420
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n controller_id: 'controller_id',\n});\n\nconsole.log(nksControllerVolume.id);",
3421
3421
  },
3422
+ http: {
3423
+ example:
3424
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3425
+ },
3422
3426
  go: {
3423
3427
  method: 'client.NKS.Clusters.Controllers.Volumes.Get',
3424
3428
  example:
@@ -3429,10 +3433,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3429
3433
  example:
3430
3434
  "nirvana nks:clusters:controllers:volumes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id \\\n --volume-id volume_id",
3431
3435
  },
3432
- http: {
3433
- example:
3434
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3435
- },
3436
3436
  },
3437
3437
  },
3438
3438
  {
@@ -3454,6 +3454,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3454
3454
  example:
3455
3455
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list(\n 'controller_id',\n { cluster_id: 'cluster_id' },\n)) {\n console.log(nksControllerVolume.id);\n}",
3456
3456
  },
3457
+ http: {
3458
+ example:
3459
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3460
+ },
3457
3461
  go: {
3458
3462
  method: 'client.NKS.Clusters.Controllers.Volumes.List',
3459
3463
  example:
@@ -3464,10 +3468,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3464
3468
  example:
3465
3469
  "nirvana nks:clusters:controllers:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
3466
3470
  },
3467
- http: {
3468
- example:
3469
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3470
- },
3471
3471
  },
3472
3472
  },
3473
3473
  {
@@ -3489,6 +3489,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3489
3489
  example:
3490
3490
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksLoadBalancer.id);",
3491
3491
  },
3492
+ http: {
3493
+ example:
3494
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3495
+ },
3492
3496
  go: {
3493
3497
  method: 'client.NKS.Clusters.LoadBalancers.Get',
3494
3498
  example:
@@ -3499,10 +3503,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3499
3503
  example:
3500
3504
  "nirvana nks:clusters:load-balancers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --load-balancer-id load_balancer_id",
3501
3505
  },
3502
- http: {
3503
- example:
3504
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3505
- },
3506
3506
  },
3507
3507
  },
3508
3508
  {
@@ -3524,6 +3524,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3524
3524
  example:
3525
3525
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.loadBalancers.update('load_balancer_id', {\n cluster_id: 'cluster_id',\n public_ip_enabled: true,\n});\n\nconsole.log(operation.id);",
3526
3526
  },
3527
+ http: {
3528
+ example:
3529
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "public_ip_enabled": true\n }\'',
3530
+ },
3527
3531
  go: {
3528
3532
  method: 'client.NKS.Clusters.LoadBalancers.Update',
3529
3533
  example:
@@ -3534,10 +3538,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3534
3538
  example:
3535
3539
  "nirvana nks:clusters:load-balancers update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --load-balancer-id load_balancer_id \\\n --public-ip-enabled",
3536
3540
  },
3537
- http: {
3538
- example:
3539
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "public_ip_enabled": true\n }\'',
3540
- },
3541
3541
  },
3542
3542
  },
3543
3543
  {
@@ -3559,6 +3559,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3559
3559
  example:
3560
3560
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {\n console.log(nksLoadBalancer.id);\n}",
3561
3561
  },
3562
+ http: {
3563
+ example:
3564
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3565
+ },
3562
3566
  go: {
3563
3567
  method: 'client.NKS.Clusters.LoadBalancers.List',
3564
3568
  example:
@@ -3569,10 +3573,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3569
3573
  example:
3570
3574
  "nirvana nks:clusters:load-balancers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3571
3575
  },
3572
- http: {
3573
- example:
3574
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3575
- },
3576
3576
  },
3577
3577
  },
3578
3578
  {
@@ -3600,6 +3600,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3600
3600
  example:
3601
3601
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});\n\nconsole.log(operation.id);",
3602
3602
  },
3603
+ http: {
3604
+ example:
3605
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3606
+ },
3603
3607
  go: {
3604
3608
  method: 'client.NKS.Clusters.Pools.New',
3605
3609
  example:
@@ -3610,10 +3614,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3610
3614
  example:
3611
3615
  "nirvana nks:clusters:pools create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
3612
3616
  },
3613
- http: {
3614
- example:
3615
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3616
- },
3617
3617
  },
3618
3618
  },
3619
3619
  {
@@ -3635,6 +3635,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3635
3635
  example:
3636
3636
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksNodePool.id);",
3637
3637
  },
3638
+ http: {
3639
+ example:
3640
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3641
+ },
3638
3642
  go: {
3639
3643
  method: 'client.NKS.Clusters.Pools.Get',
3640
3644
  example:
@@ -3645,10 +3649,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3645
3649
  example:
3646
3650
  "nirvana nks:clusters:pools get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
3647
3651
  },
3648
- http: {
3649
- example:
3650
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3651
- },
3652
3652
  },
3653
3653
  },
3654
3654
  {
@@ -3677,6 +3677,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3677
3677
  example:
3678
3678
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.update('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
3679
3679
  },
3680
+ http: {
3681
+ example:
3682
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3683
+ },
3680
3684
  go: {
3681
3685
  method: 'client.NKS.Clusters.Pools.Update',
3682
3686
  example:
@@ -3687,10 +3691,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3687
3691
  example:
3688
3692
  "nirvana nks:clusters:pools update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
3689
3693
  },
3690
- http: {
3691
- example:
3692
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3693
- },
3694
3694
  },
3695
3695
  },
3696
3696
  {
@@ -3712,6 +3712,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3712
3712
  example:
3713
3713
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
3714
3714
  },
3715
+ http: {
3716
+ example:
3717
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3718
+ },
3715
3719
  go: {
3716
3720
  method: 'client.NKS.Clusters.Pools.Delete',
3717
3721
  example:
@@ -3722,10 +3726,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3722
3726
  example:
3723
3727
  "nirvana nks:clusters:pools delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
3724
3728
  },
3725
- http: {
3726
- example:
3727
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3728
- },
3729
3729
  },
3730
3730
  },
3731
3731
  {
@@ -3747,6 +3747,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3747
3747
  example:
3748
3748
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodePool of client.nks.clusters.pools.list('cluster_id')) {\n console.log(nksNodePool.id);\n}",
3749
3749
  },
3750
+ http: {
3751
+ example:
3752
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3753
+ },
3750
3754
  go: {
3751
3755
  method: 'client.NKS.Clusters.Pools.List',
3752
3756
  example:
@@ -3756,10 +3760,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3756
3760
  method: 'pools list',
3757
3761
  example: "nirvana nks:clusters:pools list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
3758
3762
  },
3759
- http: {
3760
- example:
3761
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3762
- },
3763
3763
  },
3764
3764
  },
3765
3765
  {
@@ -3785,6 +3785,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3785
3785
  example:
3786
3786
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});",
3787
3787
  },
3788
+ http: {
3789
+ example:
3790
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3791
+ },
3788
3792
  go: {
3789
3793
  method: 'client.NKS.Clusters.Pools.Availability.New',
3790
3794
  example:
@@ -3795,10 +3799,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3795
3799
  example:
3796
3800
  "nirvana nks:clusters:pools:availability create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
3797
3801
  },
3798
- http: {
3799
- example:
3800
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3801
- },
3802
3802
  },
3803
3803
  },
3804
3804
  {
@@ -3825,6 +3825,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3825
3825
  example:
3826
3826
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.update('pool_id', { cluster_id: 'cluster_id' });",
3827
3827
  },
3828
+ http: {
3829
+ example:
3830
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3831
+ },
3828
3832
  go: {
3829
3833
  method: 'client.NKS.Clusters.Pools.Availability.Update',
3830
3834
  example:
@@ -3835,10 +3839,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3835
3839
  example:
3836
3840
  "nirvana nks:clusters:pools:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
3837
3841
  },
3838
- http: {
3839
- example:
3840
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
3841
- },
3842
3842
  },
3843
3843
  },
3844
3844
  {
@@ -3860,6 +3860,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3860
3860
  example:
3861
3861
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNode = await client.nks.clusters.pools.nodes.get('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(nksNode.id);",
3862
3862
  },
3863
+ http: {
3864
+ example:
3865
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3866
+ },
3863
3867
  go: {
3864
3868
  method: 'client.NKS.Clusters.Pools.Nodes.Get',
3865
3869
  example:
@@ -3870,10 +3874,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3870
3874
  example:
3871
3875
  "nirvana nks:clusters:pools:nodes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
3872
3876
  },
3873
- http: {
3874
- example:
3875
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3876
- },
3877
3877
  },
3878
3878
  },
3879
3879
  {
@@ -3895,6 +3895,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3895
3895
  example:
3896
3896
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.nodes.delete('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(operation.id);",
3897
3897
  },
3898
+ http: {
3899
+ example:
3900
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3901
+ },
3898
3902
  go: {
3899
3903
  method: 'client.NKS.Clusters.Pools.Nodes.Delete',
3900
3904
  example:
@@ -3905,10 +3909,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3905
3909
  example:
3906
3910
  "nirvana nks:clusters:pools:nodes delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
3907
3911
  },
3908
- http: {
3909
- example:
3910
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3911
- },
3912
3912
  },
3913
3913
  },
3914
3914
  {
@@ -3930,6 +3930,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3930
3930
  example:
3931
3931
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', {\n cluster_id: 'cluster_id',\n})) {\n console.log(nksNode.id);\n}",
3932
3932
  },
3933
+ http: {
3934
+ example:
3935
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3936
+ },
3933
3937
  go: {
3934
3938
  method: 'client.NKS.Clusters.Pools.Nodes.List',
3935
3939
  example:
@@ -3940,10 +3944,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3940
3944
  example:
3941
3945
  "nirvana nks:clusters:pools:nodes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
3942
3946
  },
3943
- http: {
3944
- example:
3945
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3946
- },
3947
3947
  },
3948
3948
  },
3949
3949
  {
@@ -3965,6 +3965,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3965
3965
  example:
3966
3966
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n node_id: 'node_id',\n});\n\nconsole.log(nksNodeVolume.id);",
3967
3967
  },
3968
+ http: {
3969
+ example:
3970
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3971
+ },
3968
3972
  go: {
3969
3973
  method: 'client.NKS.Clusters.Pools.Nodes.Volumes.Get',
3970
3974
  example:
@@ -3975,10 +3979,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3975
3979
  example:
3976
3980
  "nirvana nks:clusters:pools:nodes:volumes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id \\\n --volume-id volume_id",
3977
3981
  },
3978
- http: {
3979
- example:
3980
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
3981
- },
3982
3982
  },
3983
3983
  },
3984
3984
  {
@@ -4006,6 +4006,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4006
4006
  example:
4007
4007
  "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n})) {\n console.log(nksNodeVolume.id);\n}",
4008
4008
  },
4009
+ http: {
4010
+ example:
4011
+ 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
4012
+ },
4009
4013
  go: {
4010
4014
  method: 'client.NKS.Clusters.Pools.Nodes.Volumes.List',
4011
4015
  example:
@@ -4016,34 +4020,30 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4016
4020
  example:
4017
4021
  "nirvana nks:clusters:pools:nodes:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
4018
4022
  },
4019
- http: {
4020
- example:
4021
- 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
4022
- },
4023
4023
  },
4024
4024
  },
4025
4025
  ];
4026
4026
 
4027
4027
  const EMBEDDED_READMES: { language: string; content: string }[] = [
4028
4028
  {
4029
- language: 'cli',
4029
+ language: 'typescript',
4030
4030
  content:
4031
- "# Nirvana Labs CLI\n\nThe official CLI for the [Nirvana Labs REST API](https://docs.nirvanalabs.io).\n\n<!-- x-release-please-start-version -->\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install nirvana-labs/tap/nirvana\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/nirvana-labs/nirvana-cli/cmd/nirvana@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n<!-- x-release-please-end -->\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nnirvana [resource] <command> [flags...]\n~~~\n\n~~~sh\nnirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --instance-type n1-standard-2 \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| ---------------------- | -------- |\n| `NIRVANA_LABS_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `NIRVANA_LABS_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nnirvana <command> --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nnirvana <command> --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nnirvana <command> <<YAML\narg:\n image: \"@abe.jpg\"\nYAML\n~~~\n\nIf you need to pass a string literal that begins with an `@` sign, you can\nescape the `@` sign to avoid accidentally passing a file.\n\n~~~bash\nnirvana <command> --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nnirvana <command> --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Nirvana Labs Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/nirvana-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../nirvana-go`.\n",
4031
+ "# Nirvana Labs TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@nirvana-labs/nirvana.svg?label=npm%20(stable))](https://npmjs.org/package/@nirvana-labs/nirvana) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@nirvana-labs/nirvana)\n\nThis library provides convenient access to the Nirvana Labs REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.nirvanalabs.io](https://docs.nirvanalabs.io). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @nirvana-labs/nirvana\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: NirvanaLabs.Compute.VMCreateParams = {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n};\nconst operation: NirvanaLabs.Operation = await client.compute.vms.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst operation = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .catch(async (err) => {\n if (err instanceof NirvanaLabs.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the NirvanaLabs API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllVMs(params) {\n const allVMs = [];\n // Automatically fetches more pages as needed.\n for await (const vm of client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n })) {\n allVMs.push(vm);\n }\n return allVMs;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n});\nfor (const vm of page.items) {\n console.log(vm);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new NirvanaLabs();\n\nconst response = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: operation, response: raw } = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(operation.id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `NIRVANA_LABS_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new NirvanaLabs({\n logger: logger.child({ name: 'NirvanaLabs' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.compute.vms.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport fetch from 'my-fetch';\n\nconst client = new NirvanaLabs({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new NirvanaLabs({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport NirvanaLabs from 'npm:@nirvana-labs/nirvana';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new NirvanaLabs({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
4032
4032
  },
4033
4033
  {
4034
4034
  language: 'go',
4035
4035
  content:
4036
- '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v0.0.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("NIRVANA_LABS_API_KEY")\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Compute.VMs.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Compute.VMs.ListAutoPaging(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tvm := iter.Current()\n\tfmt.Printf("%+v\\n", vm)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\nfor page != nil {\n\tfor _, vm := range page.Items {\n\t\tfmt.Printf("%+v\\n", vm)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\tBootVolume: compute.VMNewParamsBootVolume{\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t},\n\tInstanceType: "n1-standard-2",\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsSva2,\n\tSSHKey: compute.SSHKeyRequestParam{\n\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t},\n\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n})\nif err != nil {\n\tvar apierr *nirvana.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v1/compute/vms": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Compute.VMs.New(\n\tctx,\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := nirvana.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\noperation, err := client.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", operation)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
4036
+ '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v1.91.1\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("NIRVANA_LABS_API_KEY")\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Compute.VMs.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Compute.VMs.ListAutoPaging(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tvm := iter.Current()\n\tfmt.Printf("%+v\\n", vm)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\nfor page != nil {\n\tfor _, vm := range page.Items {\n\t\tfmt.Printf("%+v\\n", vm)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\tBootVolume: compute.VMNewParamsBootVolume{\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t},\n\tInstanceType: "n1-standard-2",\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsSva2,\n\tSSHKey: compute.SSHKeyRequestParam{\n\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t},\n\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n})\nif err != nil {\n\tvar apierr *nirvana.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v1/compute/vms": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Compute.VMs.New(\n\tctx,\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := nirvana.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\noperation, err := client.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", operation)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
4037
4037
  },
4038
4038
  {
4039
4039
  language: 'terraform',
4040
4040
  content:
4041
- '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 0.0.1"\n }\n }\n}\n\n# Initialize the provider\nprovider "nirvana" {\n api_key = "My API Key" # or set NIRVANA_LABS_API_KEY env variable\n}\n\n# Configure a resource\nresource "nirvana_compute_vm" "example_compute_vm" {\n boot_volume = {\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }\n instance_type = "n1-standard-2"\n name = "my-vm"\n os_image_name = "ubuntu-noble-2025-10-01"\n project_id = "123e4567-e89b-12d3-a456-426614174000"\n public_ip_enabled = true\n region = "us-sva-2"\n ssh_key = {\n public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n }\n subnet_id = "123e4567-e89b-12d3-a456-426614174000"\n data_volumes = [{\n name = "my-data-volume"\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }]\n tags = ["production", "ethereum"]\n}\n```\n\n<!-- x-release-please-end -->\n\nInitialize your project by running `terraform init` in the directory.\n\nAdditional examples can be found in the [./examples](./examples) folder within this repository, and you can\nrefer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs).\n\n### Provider Options\nWhen you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.\nIf an environment variable is provided, then the option does not need to be set in the terraform source.\n\n| Property | Environment variable | Required | Default value |\n| -------- | ---------------------- | -------- | ------------- |\n| api_key | `NIRVANA_LABS_API_KEY` | true | — |\n\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/terraform-provider-nirvana/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
4041
+ '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 1.91.1"\n }\n }\n}\n\n# Initialize the provider\nprovider "nirvana" {\n api_key = "My API Key" # or set NIRVANA_LABS_API_KEY env variable\n}\n\n# Configure a resource\nresource "nirvana_compute_vm" "example_compute_vm" {\n boot_volume = {\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }\n instance_type = "n1-standard-2"\n name = "my-vm"\n os_image_name = "ubuntu-noble-2025-10-01"\n project_id = "123e4567-e89b-12d3-a456-426614174000"\n public_ip_enabled = true\n region = "us-sva-2"\n ssh_key = {\n public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n }\n subnet_id = "123e4567-e89b-12d3-a456-426614174000"\n data_volumes = [{\n name = "my-data-volume"\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }]\n tags = ["production", "ethereum"]\n}\n```\n\n<!-- x-release-please-end -->\n\nInitialize your project by running `terraform init` in the directory.\n\nAdditional examples can be found in the [./examples](./examples) folder within this repository, and you can\nrefer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs).\n\n### Provider Options\nWhen you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.\nIf an environment variable is provided, then the option does not need to be set in the terraform source.\n\n| Property | Environment variable | Required | Default value |\n| -------- | ---------------------- | -------- | ------------- |\n| api_key | `NIRVANA_LABS_API_KEY` | true | — |\n\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/terraform-provider-nirvana/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
4042
4042
  },
4043
4043
  {
4044
- language: 'typescript',
4044
+ language: 'cli',
4045
4045
  content:
4046
- "# Nirvana Labs TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@nirvana-labs/nirvana.svg?label=npm%20(stable))](https://npmjs.org/package/@nirvana-labs/nirvana) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@nirvana-labs/nirvana)\n\nThis library provides convenient access to the Nirvana Labs REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.nirvanalabs.io](https://docs.nirvanalabs.io). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @nirvana-labs/nirvana\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: NirvanaLabs.Compute.VMCreateParams = {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n};\nconst operation: NirvanaLabs.Operation = await client.compute.vms.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst operation = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .catch(async (err) => {\n if (err instanceof NirvanaLabs.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the NirvanaLabs API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllVMs(params) {\n const allVMs = [];\n // Automatically fetches more pages as needed.\n for await (const vm of client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n })) {\n allVMs.push(vm);\n }\n return allVMs;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n});\nfor (const vm of page.items) {\n console.log(vm);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new NirvanaLabs();\n\nconst response = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: operation, response: raw } = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-2',\n name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(operation.id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `NIRVANA_LABS_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new NirvanaLabs({\n logger: logger.child({ name: 'NirvanaLabs' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.compute.vms.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport fetch from 'my-fetch';\n\nconst client = new NirvanaLabs({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new NirvanaLabs({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport NirvanaLabs from 'npm:@nirvana-labs/nirvana';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new NirvanaLabs({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
4046
+ "# Nirvana Labs CLI\n\nThe official CLI for the [Nirvana Labs REST API](https://docs.nirvanalabs.io).\n\n<!-- x-release-please-start-version -->\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install nirvana-labs/tap/nirvana\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/nirvana-labs/nirvana-cli/cmd/nirvana@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n<!-- x-release-please-end -->\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nnirvana [resource] <command> [flags...]\n~~~\n\n~~~sh\nnirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --instance-type n1-standard-2 \\\n --name my-vm \\\n --os-image-name ubuntu-noble-2025-10-01 \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --public-ip-enabled \\\n --region us-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| ---------------------- | -------- |\n| `NIRVANA_LABS_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `NIRVANA_LABS_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nnirvana <command> --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nnirvana <command> --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nnirvana <command> <<YAML\narg:\n image: \"@abe.jpg\"\nYAML\n~~~\n\nIf you need to pass a string literal that begins with an `@` sign, you can\nescape the `@` sign to avoid accidentally passing a file.\n\n~~~bash\nnirvana <command> --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nnirvana <command> --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Nirvana Labs Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/nirvana-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../nirvana-go`.\n",
4047
4047
  },
4048
4048
  ];
4049
4049