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.
- package/bin/mcp-server.js +709 -500
- package/bin/mcp-server.js.map +16 -15
- package/dist/commonjs/funcs/plansListStorage.d.ts +2 -1
- package/dist/commonjs/funcs/plansListStorage.d.ts.map +1 -1
- package/dist/commonjs/funcs/plansListStorage.js +18 -3
- package/dist/commonjs/funcs/plansListStorage.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts +6 -1
- package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/plansListStorage.js +40 -2
- package/dist/commonjs/mcp-server/tools/plansListStorage.js.map +1 -1
- package/dist/commonjs/models/operations/getstorageplans.d.ts +25 -0
- package/dist/commonjs/models/operations/getstorageplans.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getstorageplans.js +71 -0
- package/dist/commonjs/models/operations/getstorageplans.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updateproject.d.ts +4 -4
- package/dist/commonjs/models/operations/updateproject.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateproject.js +8 -8
- package/dist/commonjs/models/operations/updateproject.js.map +1 -1
- package/dist/commonjs/models/outofbandconnection.d.ts +8 -8
- package/dist/commonjs/models/outofbandconnection.d.ts.map +1 -1
- package/dist/commonjs/models/outofbandconnection.js +11 -12
- package/dist/commonjs/models/outofbandconnection.js.map +1 -1
- package/dist/commonjs/models/storageplandata.d.ts +70 -5
- package/dist/commonjs/models/storageplandata.d.ts.map +1 -1
- package/dist/commonjs/models/storageplandata.js +101 -5
- package/dist/commonjs/models/storageplandata.js.map +1 -1
- package/dist/commonjs/models/userteam.d.ts +53 -0
- package/dist/commonjs/models/userteam.d.ts.map +1 -1
- package/dist/commonjs/models/userteam.js +79 -1
- package/dist/commonjs/models/userteam.js.map +1 -1
- package/dist/commonjs/models/virtualmachineattributes.d.ts +32 -9
- package/dist/commonjs/models/virtualmachineattributes.d.ts.map +1 -1
- package/dist/commonjs/models/virtualmachineattributes.js +47 -9
- package/dist/commonjs/models/virtualmachineattributes.js.map +1 -1
- package/dist/commonjs/models/volumedata.d.ts +15 -0
- package/dist/commonjs/models/volumedata.d.ts.map +1 -1
- package/dist/commonjs/models/volumedata.js +10 -0
- package/dist/commonjs/models/volumedata.js.map +1 -1
- package/dist/commonjs/sdk/plans.d.ts +1 -1
- package/dist/commonjs/sdk/plans.d.ts.map +1 -1
- package/dist/commonjs/sdk/plans.js +2 -2
- package/dist/commonjs/sdk/plans.js.map +1 -1
- package/dist/esm/funcs/plansListStorage.d.ts +2 -1
- package/dist/esm/funcs/plansListStorage.d.ts.map +1 -1
- package/dist/esm/funcs/plansListStorage.js +18 -3
- package/dist/esm/funcs/plansListStorage.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/plansListStorage.d.ts +6 -1
- package/dist/esm/mcp-server/tools/plansListStorage.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/plansListStorage.js +7 -2
- package/dist/esm/mcp-server/tools/plansListStorage.js.map +1 -1
- package/dist/esm/models/operations/getstorageplans.d.ts +25 -0
- package/dist/esm/models/operations/getstorageplans.d.ts.map +1 -0
- package/dist/esm/models/operations/getstorageplans.js +33 -0
- package/dist/esm/models/operations/getstorageplans.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updateproject.d.ts +4 -4
- package/dist/esm/models/operations/updateproject.d.ts.map +1 -1
- package/dist/esm/models/operations/updateproject.js +8 -8
- package/dist/esm/models/operations/updateproject.js.map +1 -1
- package/dist/esm/models/outofbandconnection.d.ts +8 -8
- package/dist/esm/models/outofbandconnection.d.ts.map +1 -1
- package/dist/esm/models/outofbandconnection.js +8 -9
- package/dist/esm/models/outofbandconnection.js.map +1 -1
- package/dist/esm/models/storageplandata.d.ts +70 -5
- package/dist/esm/models/storageplandata.d.ts.map +1 -1
- package/dist/esm/models/storageplandata.js +94 -4
- package/dist/esm/models/storageplandata.js.map +1 -1
- package/dist/esm/models/userteam.d.ts +53 -0
- package/dist/esm/models/userteam.d.ts.map +1 -1
- package/dist/esm/models/userteam.js +76 -0
- package/dist/esm/models/userteam.js.map +1 -1
- package/dist/esm/models/virtualmachineattributes.d.ts +32 -9
- package/dist/esm/models/virtualmachineattributes.d.ts.map +1 -1
- package/dist/esm/models/virtualmachineattributes.js +44 -8
- package/dist/esm/models/virtualmachineattributes.js.map +1 -1
- package/dist/esm/models/volumedata.d.ts +15 -0
- package/dist/esm/models/volumedata.d.ts.map +1 -1
- package/dist/esm/models/volumedata.js +10 -0
- package/dist/esm/models/volumedata.js.map +1 -1
- package/dist/esm/sdk/plans.d.ts +1 -1
- package/dist/esm/sdk/plans.d.ts.map +1 -1
- package/dist/esm/sdk/plans.js +2 -2
- package/dist/esm/sdk/plans.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/plansListStorage.ts +25 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/plansListStorage.ts +9 -2
- package/src/models/operations/getstorageplans.ts +72 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/updateproject.ts +12 -16
- package/src/models/outofbandconnection.ts +28 -21
- package/src/models/storageplandata.ts +211 -10
- package/src/models/userteam.ts +142 -0
- package/src/models/virtualmachineattributes.ts +98 -17
- package/src/models/volumedata.ts +25 -0
- package/src/sdk/plans.ts +2 -0
- 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<
|
|
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.
|
|
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<
|
|
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.
|
|
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",
|
package/src/models/volumedata.ts
CHANGED
|
@@ -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',
|