latitudesh-typescript-sdk 0.8.2 → 0.8.3

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 (115) hide show
  1. package/bin/mcp-server.js +709 -500
  2. package/bin/mcp-server.js.map +16 -15
  3. package/dist/commonjs/funcs/plansListStorage.d.ts +2 -1
  4. package/dist/commonjs/funcs/plansListStorage.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/plansListStorage.js +18 -3
  6. package/dist/commonjs/funcs/plansListStorage.js.map +1 -1
  7. package/dist/commonjs/lib/config.d.ts +2 -2
  8. package/dist/commonjs/lib/config.js +2 -2
  9. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  10. package/dist/commonjs/mcp-server/server.js +1 -1
  11. package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts +6 -1
  12. package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts.map +1 -1
  13. package/dist/commonjs/mcp-server/tools/plansListStorage.js +40 -2
  14. package/dist/commonjs/mcp-server/tools/plansListStorage.js.map +1 -1
  15. package/dist/commonjs/models/operations/getstorageplans.d.ts +25 -0
  16. package/dist/commonjs/models/operations/getstorageplans.d.ts.map +1 -0
  17. package/dist/commonjs/models/operations/getstorageplans.js +71 -0
  18. package/dist/commonjs/models/operations/getstorageplans.js.map +1 -0
  19. package/dist/commonjs/models/operations/index.d.ts +1 -0
  20. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  21. package/dist/commonjs/models/operations/index.js +1 -0
  22. package/dist/commonjs/models/operations/index.js.map +1 -1
  23. package/dist/commonjs/models/operations/updateproject.d.ts +4 -4
  24. package/dist/commonjs/models/operations/updateproject.d.ts.map +1 -1
  25. package/dist/commonjs/models/operations/updateproject.js +8 -8
  26. package/dist/commonjs/models/operations/updateproject.js.map +1 -1
  27. package/dist/commonjs/models/outofbandconnection.d.ts +8 -8
  28. package/dist/commonjs/models/outofbandconnection.d.ts.map +1 -1
  29. package/dist/commonjs/models/outofbandconnection.js +11 -12
  30. package/dist/commonjs/models/outofbandconnection.js.map +1 -1
  31. package/dist/commonjs/models/storageplandata.d.ts +70 -5
  32. package/dist/commonjs/models/storageplandata.d.ts.map +1 -1
  33. package/dist/commonjs/models/storageplandata.js +101 -5
  34. package/dist/commonjs/models/storageplandata.js.map +1 -1
  35. package/dist/commonjs/models/userteam.d.ts +53 -0
  36. package/dist/commonjs/models/userteam.d.ts.map +1 -1
  37. package/dist/commonjs/models/userteam.js +79 -1
  38. package/dist/commonjs/models/userteam.js.map +1 -1
  39. package/dist/commonjs/models/virtualmachineattributes.d.ts +32 -9
  40. package/dist/commonjs/models/virtualmachineattributes.d.ts.map +1 -1
  41. package/dist/commonjs/models/virtualmachineattributes.js +47 -9
  42. package/dist/commonjs/models/virtualmachineattributes.js.map +1 -1
  43. package/dist/commonjs/models/volumedata.d.ts +15 -0
  44. package/dist/commonjs/models/volumedata.d.ts.map +1 -1
  45. package/dist/commonjs/models/volumedata.js +10 -0
  46. package/dist/commonjs/models/volumedata.js.map +1 -1
  47. package/dist/commonjs/sdk/plans.d.ts +1 -1
  48. package/dist/commonjs/sdk/plans.d.ts.map +1 -1
  49. package/dist/commonjs/sdk/plans.js +2 -2
  50. package/dist/commonjs/sdk/plans.js.map +1 -1
  51. package/dist/esm/funcs/plansListStorage.d.ts +2 -1
  52. package/dist/esm/funcs/plansListStorage.d.ts.map +1 -1
  53. package/dist/esm/funcs/plansListStorage.js +18 -3
  54. package/dist/esm/funcs/plansListStorage.js.map +1 -1
  55. package/dist/esm/lib/config.d.ts +2 -2
  56. package/dist/esm/lib/config.js +2 -2
  57. package/dist/esm/mcp-server/mcp-server.js +1 -1
  58. package/dist/esm/mcp-server/server.js +1 -1
  59. package/dist/esm/mcp-server/tools/plansListStorage.d.ts +6 -1
  60. package/dist/esm/mcp-server/tools/plansListStorage.d.ts.map +1 -1
  61. package/dist/esm/mcp-server/tools/plansListStorage.js +7 -2
  62. package/dist/esm/mcp-server/tools/plansListStorage.js.map +1 -1
  63. package/dist/esm/models/operations/getstorageplans.d.ts +25 -0
  64. package/dist/esm/models/operations/getstorageplans.d.ts.map +1 -0
  65. package/dist/esm/models/operations/getstorageplans.js +33 -0
  66. package/dist/esm/models/operations/getstorageplans.js.map +1 -0
  67. package/dist/esm/models/operations/index.d.ts +1 -0
  68. package/dist/esm/models/operations/index.d.ts.map +1 -1
  69. package/dist/esm/models/operations/index.js +1 -0
  70. package/dist/esm/models/operations/index.js.map +1 -1
  71. package/dist/esm/models/operations/updateproject.d.ts +4 -4
  72. package/dist/esm/models/operations/updateproject.d.ts.map +1 -1
  73. package/dist/esm/models/operations/updateproject.js +8 -8
  74. package/dist/esm/models/operations/updateproject.js.map +1 -1
  75. package/dist/esm/models/outofbandconnection.d.ts +8 -8
  76. package/dist/esm/models/outofbandconnection.d.ts.map +1 -1
  77. package/dist/esm/models/outofbandconnection.js +8 -9
  78. package/dist/esm/models/outofbandconnection.js.map +1 -1
  79. package/dist/esm/models/storageplandata.d.ts +70 -5
  80. package/dist/esm/models/storageplandata.d.ts.map +1 -1
  81. package/dist/esm/models/storageplandata.js +94 -4
  82. package/dist/esm/models/storageplandata.js.map +1 -1
  83. package/dist/esm/models/userteam.d.ts +53 -0
  84. package/dist/esm/models/userteam.d.ts.map +1 -1
  85. package/dist/esm/models/userteam.js +76 -0
  86. package/dist/esm/models/userteam.js.map +1 -1
  87. package/dist/esm/models/virtualmachineattributes.d.ts +32 -9
  88. package/dist/esm/models/virtualmachineattributes.d.ts.map +1 -1
  89. package/dist/esm/models/virtualmachineattributes.js +44 -8
  90. package/dist/esm/models/virtualmachineattributes.js.map +1 -1
  91. package/dist/esm/models/volumedata.d.ts +15 -0
  92. package/dist/esm/models/volumedata.d.ts.map +1 -1
  93. package/dist/esm/models/volumedata.js +10 -0
  94. package/dist/esm/models/volumedata.js.map +1 -1
  95. package/dist/esm/sdk/plans.d.ts +1 -1
  96. package/dist/esm/sdk/plans.d.ts.map +1 -1
  97. package/dist/esm/sdk/plans.js +2 -2
  98. package/dist/esm/sdk/plans.js.map +1 -1
  99. package/jsr.json +1 -1
  100. package/package.json +1 -1
  101. package/src/funcs/plansListStorage.ts +25 -0
  102. package/src/lib/config.ts +2 -2
  103. package/src/mcp-server/mcp-server.ts +1 -1
  104. package/src/mcp-server/server.ts +1 -1
  105. package/src/mcp-server/tools/plansListStorage.ts +9 -2
  106. package/src/models/operations/getstorageplans.ts +72 -0
  107. package/src/models/operations/index.ts +1 -0
  108. package/src/models/operations/updateproject.ts +12 -16
  109. package/src/models/outofbandconnection.ts +28 -21
  110. package/src/models/storageplandata.ts +211 -10
  111. package/src/models/userteam.ts +142 -0
  112. package/src/models/virtualmachineattributes.ts +98 -17
  113. package/src/models/volumedata.ts +25 -0
  114. package/src/sdk/plans.ts +2 -0
  115. package/tests/integration/projects.test.ts +3 -0
@@ -98,17 +98,26 @@ export type VirtualMachineAttributesOperatingSystem = {
98
98
  distro?: VirtualMachineAttributesDistro | undefined;
99
99
  };
100
100
 
101
+ export type VirtualMachineAttributesSshKey = {
102
+ id?: string | undefined;
103
+ name?: string | undefined;
104
+ fingerprint?: string | undefined;
105
+ publicKey?: string | undefined;
106
+ createdAt?: string | undefined;
107
+ updatedAt?: string | undefined;
108
+ };
109
+
101
110
  /**
102
111
  * SSH credentials for connecting to the virtual machine. Only available when the VM is running. Opt-in extra field: request via `extra_fields[virtual_machines]=credentials`.
103
112
  */
104
113
  export type VirtualMachineAttributesCredentials = {
105
114
  /**
106
- * The SSH username for the VM, determined by the operating system (e.g., ubuntu, centos, ec2-user). Defaults to ubuntu if not specified by the OS.
115
+ * The SSH username for the VM, determined by the operating system (e.g., ubuntu, centos, ec2-user). Defaults to ubuntu if not specified by the OS. Returns null when the VM is not running.
107
116
  */
108
- username?: string | undefined;
109
- host?: string | undefined;
110
- password?: string | undefined;
111
- sshKeys?: Array<string> | undefined;
117
+ username?: string | null | undefined;
118
+ host?: string | null | undefined;
119
+ password?: string | null | undefined;
120
+ sshKeys?: Array<VirtualMachineAttributesSshKey> | null | undefined;
112
121
  };
113
122
 
114
123
  export type VirtualMachineAttributesPlan = {
@@ -352,16 +361,86 @@ export function virtualMachineAttributesOperatingSystemFromJSON(
352
361
  );
353
362
  }
354
363
 
364
+ /** @internal */
365
+ export const VirtualMachineAttributesSshKey$inboundSchema: z.ZodType<
366
+ VirtualMachineAttributesSshKey,
367
+ z.ZodTypeDef,
368
+ unknown
369
+ > = z.object({
370
+ id: z.string().optional(),
371
+ name: z.string().optional(),
372
+ fingerprint: z.string().optional(),
373
+ public_key: z.string().optional(),
374
+ created_at: z.string().optional(),
375
+ updated_at: z.string().optional(),
376
+ }).transform((v) => {
377
+ return remap$(v, {
378
+ "public_key": "publicKey",
379
+ "created_at": "createdAt",
380
+ "updated_at": "updatedAt",
381
+ });
382
+ });
383
+ /** @internal */
384
+ export type VirtualMachineAttributesSshKey$Outbound = {
385
+ id?: string | undefined;
386
+ name?: string | undefined;
387
+ fingerprint?: string | undefined;
388
+ public_key?: string | undefined;
389
+ created_at?: string | undefined;
390
+ updated_at?: string | undefined;
391
+ };
392
+
393
+ /** @internal */
394
+ export const VirtualMachineAttributesSshKey$outboundSchema: z.ZodType<
395
+ VirtualMachineAttributesSshKey$Outbound,
396
+ z.ZodTypeDef,
397
+ VirtualMachineAttributesSshKey
398
+ > = z.object({
399
+ id: z.string().optional(),
400
+ name: z.string().optional(),
401
+ fingerprint: z.string().optional(),
402
+ publicKey: z.string().optional(),
403
+ createdAt: z.string().optional(),
404
+ updatedAt: z.string().optional(),
405
+ }).transform((v) => {
406
+ return remap$(v, {
407
+ publicKey: "public_key",
408
+ createdAt: "created_at",
409
+ updatedAt: "updated_at",
410
+ });
411
+ });
412
+
413
+ export function virtualMachineAttributesSshKeyToJSON(
414
+ virtualMachineAttributesSshKey: VirtualMachineAttributesSshKey,
415
+ ): string {
416
+ return JSON.stringify(
417
+ VirtualMachineAttributesSshKey$outboundSchema.parse(
418
+ virtualMachineAttributesSshKey,
419
+ ),
420
+ );
421
+ }
422
+ export function virtualMachineAttributesSshKeyFromJSON(
423
+ jsonString: string,
424
+ ): SafeParseResult<VirtualMachineAttributesSshKey, SDKValidationError> {
425
+ return safeParse(
426
+ jsonString,
427
+ (x) => VirtualMachineAttributesSshKey$inboundSchema.parse(JSON.parse(x)),
428
+ `Failed to parse 'VirtualMachineAttributesSshKey' from JSON`,
429
+ );
430
+ }
431
+
355
432
  /** @internal */
356
433
  export const VirtualMachineAttributesCredentials$inboundSchema: z.ZodType<
357
434
  VirtualMachineAttributesCredentials,
358
435
  z.ZodTypeDef,
359
436
  unknown
360
437
  > = z.object({
361
- username: z.string().optional(),
362
- host: z.string().optional(),
363
- password: z.string().optional(),
364
- ssh_keys: z.array(z.string()).optional(),
438
+ username: z.nullable(z.string()).optional(),
439
+ host: z.nullable(z.string()).optional(),
440
+ password: z.nullable(z.string()).optional(),
441
+ ssh_keys: z.nullable(
442
+ z.array(z.lazy(() => VirtualMachineAttributesSshKey$inboundSchema)),
443
+ ).optional(),
365
444
  }).transform((v) => {
366
445
  return remap$(v, {
367
446
  "ssh_keys": "sshKeys",
@@ -369,10 +448,10 @@ export const VirtualMachineAttributesCredentials$inboundSchema: z.ZodType<
369
448
  });
370
449
  /** @internal */
371
450
  export type VirtualMachineAttributesCredentials$Outbound = {
372
- username?: string | undefined;
373
- host?: string | undefined;
374
- password?: string | undefined;
375
- ssh_keys?: Array<string> | undefined;
451
+ username?: string | null | undefined;
452
+ host?: string | null | undefined;
453
+ password?: string | null | undefined;
454
+ ssh_keys?: Array<VirtualMachineAttributesSshKey$Outbound> | null | undefined;
376
455
  };
377
456
 
378
457
  /** @internal */
@@ -381,10 +460,12 @@ export const VirtualMachineAttributesCredentials$outboundSchema: z.ZodType<
381
460
  z.ZodTypeDef,
382
461
  VirtualMachineAttributesCredentials
383
462
  > = z.object({
384
- username: z.string().optional(),
385
- host: z.string().optional(),
386
- password: z.string().optional(),
387
- sshKeys: z.array(z.string()).optional(),
463
+ username: z.nullable(z.string()).optional(),
464
+ host: z.nullable(z.string()).optional(),
465
+ password: z.nullable(z.string()).optional(),
466
+ sshKeys: z.nullable(
467
+ z.array(z.lazy(() => VirtualMachineAttributesSshKey$outboundSchema)),
468
+ ).optional(),
388
469
  }).transform((v) => {
389
470
  return remap$(v, {
390
471
  sshKeys: "ssh_keys",
@@ -37,6 +37,18 @@ export type VolumeDataAttributes = {
37
37
  namespaceId?: string | null | undefined;
38
38
  connectorId?: string | null | undefined;
39
39
  initiators?: Array<Initiator> | null | undefined;
40
+ /**
41
+ * Cephx keyring secret used to connect to the volume. Returned only for dashboard-origin requests; null until the volume is provisioned.
42
+ */
43
+ keyring?: string | null | undefined;
44
+ /**
45
+ * Ceph cluster user used to connect to the volume. Returned only for dashboard-origin requests; null until the volume is provisioned.
46
+ */
47
+ clusterUser?: string | null | undefined;
48
+ /**
49
+ * Path of the volume inside the cluster. Returned only for dashboard-origin requests; null until the volume is provisioned.
50
+ */
51
+ volumePath?: string | null | undefined;
40
52
  project?: ProjectInclude | undefined;
41
53
  team?: TeamInclude | undefined;
42
54
  };
@@ -106,6 +118,9 @@ export const VolumeDataAttributes$inboundSchema: z.ZodType<
106
118
  connector_id: z.nullable(z.string()).optional(),
107
119
  initiators: z.nullable(z.array(z.lazy(() => Initiator$inboundSchema)))
108
120
  .optional(),
121
+ keyring: z.nullable(z.string()).optional(),
122
+ cluster_user: z.nullable(z.string()).optional(),
123
+ volume_path: z.nullable(z.string()).optional(),
109
124
  project: ProjectInclude$inboundSchema.optional(),
110
125
  team: TeamInclude$inboundSchema.optional(),
111
126
  }).transform((v) => {
@@ -114,6 +129,8 @@ export const VolumeDataAttributes$inboundSchema: z.ZodType<
114
129
  "created_at": "createdAt",
115
130
  "namespace_id": "namespaceId",
116
131
  "connector_id": "connectorId",
132
+ "cluster_user": "clusterUser",
133
+ "volume_path": "volumePath",
117
134
  });
118
135
  });
119
136
  /** @internal */
@@ -124,6 +141,9 @@ export type VolumeDataAttributes$Outbound = {
124
141
  namespace_id?: string | null | undefined;
125
142
  connector_id?: string | null | undefined;
126
143
  initiators?: Array<Initiator$Outbound> | null | undefined;
144
+ keyring?: string | null | undefined;
145
+ cluster_user?: string | null | undefined;
146
+ volume_path?: string | null | undefined;
127
147
  project?: ProjectInclude$Outbound | undefined;
128
148
  team?: TeamInclude$Outbound | undefined;
129
149
  };
@@ -141,6 +161,9 @@ export const VolumeDataAttributes$outboundSchema: z.ZodType<
141
161
  connectorId: z.nullable(z.string()).optional(),
142
162
  initiators: z.nullable(z.array(z.lazy(() => Initiator$outboundSchema)))
143
163
  .optional(),
164
+ keyring: z.nullable(z.string()).optional(),
165
+ clusterUser: z.nullable(z.string()).optional(),
166
+ volumePath: z.nullable(z.string()).optional(),
144
167
  project: ProjectInclude$outboundSchema.optional(),
145
168
  team: TeamInclude$outboundSchema.optional(),
146
169
  }).transform((v) => {
@@ -149,6 +172,8 @@ export const VolumeDataAttributes$outboundSchema: z.ZodType<
149
172
  createdAt: "created_at",
150
173
  namespaceId: "namespace_id",
151
174
  connectorId: "connector_id",
175
+ clusterUser: "cluster_user",
176
+ volumePath: "volume_path",
152
177
  });
153
178
  });
154
179
 
package/src/sdk/plans.ts CHANGED
@@ -92,10 +92,12 @@ export class Plans extends ClientSDK {
92
92
  * List storage plans
93
93
  */
94
94
  async listStorage(
95
+ request?: operations.GetStoragePlansRequest | undefined,
95
96
  options?: RequestOptions,
96
97
  ): Promise<models.StoragePlans> {
97
98
  return unwrapAsync(plansListStorage(
98
99
  this,
100
+ request,
99
101
  options,
100
102
  ));
101
103
  }
@@ -293,6 +293,7 @@ describe('Projects - Core CRUD Operations', () => {
293
293
  projectId: 'proj_test123',
294
294
  requestBody: {
295
295
  data: {
296
+ id: 'proj_test123',
296
297
  type: 'projects',
297
298
  attributes: {
298
299
  name: 'Updated Project Name',
@@ -331,6 +332,7 @@ describe('Projects - Core CRUD Operations', () => {
331
332
  projectId: 'proj_test123',
332
333
  requestBody: {
333
334
  data: {
335
+ id: 'proj_test123',
334
336
  type: 'projects',
335
337
  attributes: {
336
338
  environment: 'Production',
@@ -364,6 +366,7 @@ describe('Projects - Core CRUD Operations', () => {
364
366
  projectId: 'proj_nonexistent',
365
367
  requestBody: {
366
368
  data: {
369
+ id: 'proj_nonexistent',
367
370
  type: 'projects',
368
371
  attributes: {
369
372
  name: 'Updated Name',