latitudesh-typescript-sdk 0.3.3 → 0.3.4

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 (37) hide show
  1. package/bin/mcp-server.js +62 -12
  2. package/bin/mcp-server.js.map +8 -8
  3. package/dist/commonjs/funcs/kubernetesClustersGetKubernetesCluster.d.ts +1 -1
  4. package/dist/commonjs/funcs/kubernetesClustersGetKubernetesCluster.js +1 -1
  5. package/dist/commonjs/lib/config.d.ts +2 -2
  6. package/dist/commonjs/lib/config.js +2 -2
  7. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  8. package/dist/commonjs/mcp-server/server.js +1 -1
  9. package/dist/commonjs/mcp-server/tools/kubernetesClustersGetKubernetesCluster.js +1 -1
  10. package/dist/commonjs/models/kubernetesclusterdata.d.ts +98 -5
  11. package/dist/commonjs/models/kubernetesclusterdata.d.ts.map +1 -1
  12. package/dist/commonjs/models/kubernetesclusterdata.js +78 -6
  13. package/dist/commonjs/models/kubernetesclusterdata.js.map +1 -1
  14. package/dist/commonjs/sdk/kubernetesclusters.d.ts +1 -1
  15. package/dist/commonjs/sdk/kubernetesclusters.js +1 -1
  16. package/dist/esm/funcs/kubernetesClustersGetKubernetesCluster.d.ts +1 -1
  17. package/dist/esm/funcs/kubernetesClustersGetKubernetesCluster.js +1 -1
  18. package/dist/esm/lib/config.d.ts +2 -2
  19. package/dist/esm/lib/config.js +2 -2
  20. package/dist/esm/mcp-server/mcp-server.js +1 -1
  21. package/dist/esm/mcp-server/server.js +1 -1
  22. package/dist/esm/mcp-server/tools/kubernetesClustersGetKubernetesCluster.js +1 -1
  23. package/dist/esm/models/kubernetesclusterdata.d.ts +98 -5
  24. package/dist/esm/models/kubernetesclusterdata.d.ts.map +1 -1
  25. package/dist/esm/models/kubernetesclusterdata.js +75 -5
  26. package/dist/esm/models/kubernetesclusterdata.js.map +1 -1
  27. package/dist/esm/sdk/kubernetesclusters.d.ts +1 -1
  28. package/dist/esm/sdk/kubernetesclusters.js +1 -1
  29. package/jsr.json +1 -1
  30. package/package.json +3 -3
  31. package/src/funcs/kubernetesClustersGetKubernetesCluster.ts +1 -1
  32. package/src/lib/config.ts +2 -2
  33. package/src/mcp-server/mcp-server.ts +1 -1
  34. package/src/mcp-server/server.ts +1 -1
  35. package/src/mcp-server/tools/kubernetesClustersGetKubernetesCluster.ts +1 -1
  36. package/src/models/kubernetesclusterdata.ts +167 -12
  37. package/src/sdk/kubernetesclusters.ts +1 -1
@@ -62,7 +62,7 @@ export type KubernetesClusterDataName = ClosedEnum<
62
62
  /**
63
63
  * Current status of this step
64
64
  */
65
- export const KubernetesClusterDataStatus = {
65
+ export const KubernetesClusterDataStepStatus = {
66
66
  Pending: "pending",
67
67
  InProgress: "in_progress",
68
68
  Completed: "completed",
@@ -70,8 +70,8 @@ export const KubernetesClusterDataStatus = {
70
70
  /**
71
71
  * Current status of this step
72
72
  */
73
- export type KubernetesClusterDataStatus = ClosedEnum<
74
- typeof KubernetesClusterDataStatus
73
+ export type KubernetesClusterDataStepStatus = ClosedEnum<
74
+ typeof KubernetesClusterDataStepStatus
75
75
  >;
76
76
 
77
77
  export type KubernetesClusterDataStep = {
@@ -82,7 +82,74 @@ export type KubernetesClusterDataStep = {
82
82
  /**
83
83
  * Current status of this step
84
84
  */
85
- status?: KubernetesClusterDataStatus | undefined;
85
+ status?: KubernetesClusterDataStepStatus | undefined;
86
+ };
87
+
88
+ /**
89
+ * The role of this node in the cluster
90
+ */
91
+ export const KubernetesClusterDataType = {
92
+ ControlPlane: "control_plane",
93
+ Worker: "worker",
94
+ } as const;
95
+ /**
96
+ * The role of this node in the cluster
97
+ */
98
+ export type KubernetesClusterDataType = ClosedEnum<
99
+ typeof KubernetesClusterDataType
100
+ >;
101
+
102
+ /**
103
+ * Current status of the node
104
+ */
105
+ export const NodeStatus = {
106
+ Ready: "ready",
107
+ Pending: "pending",
108
+ Failed: "failed",
109
+ Deleting: "deleting",
110
+ } as const;
111
+ /**
112
+ * Current status of the node
113
+ */
114
+ export type NodeStatus = ClosedEnum<typeof NodeStatus>;
115
+
116
+ export type Node = {
117
+ /**
118
+ * Unique identifier for the node (machine name)
119
+ */
120
+ id?: string | undefined;
121
+ /**
122
+ * Name of the node
123
+ */
124
+ name?: string | undefined;
125
+ /**
126
+ * Hostname of the node
127
+ */
128
+ hostname?: string | null | undefined;
129
+ /**
130
+ * The Latitude server ID associated with this node
131
+ */
132
+ serverId?: string | null | undefined;
133
+ /**
134
+ * The role of this node in the cluster
135
+ */
136
+ type?: KubernetesClusterDataType | undefined;
137
+ /**
138
+ * Current status of the node
139
+ */
140
+ status?: NodeStatus | undefined;
141
+ /**
142
+ * Primary IP address (external if available, otherwise internal)
143
+ */
144
+ ip?: string | null | undefined;
145
+ /**
146
+ * Internal/private IP address
147
+ */
148
+ internalIp?: string | null | undefined;
149
+ /**
150
+ * External/public IP address
151
+ */
152
+ externalIp?: string | null | undefined;
86
153
  };
87
154
 
88
155
  /**
@@ -192,6 +259,10 @@ export type KubernetesClusterDataAttributes = {
192
259
  * Reason code for cluster failure
193
260
  */
194
261
  failureReason?: string | null | undefined;
262
+ /**
263
+ * List of nodes (servers) in the cluster
264
+ */
265
+ nodes?: Array<Node> | undefined;
195
266
  /**
196
267
  * The project this cluster belongs to
197
268
  */
@@ -323,13 +394,13 @@ export const KubernetesClusterDataName$outboundSchema: z.ZodNativeEnum<
323
394
  > = KubernetesClusterDataName$inboundSchema;
324
395
 
325
396
  /** @internal */
326
- export const KubernetesClusterDataStatus$inboundSchema: z.ZodNativeEnum<
327
- typeof KubernetesClusterDataStatus
328
- > = z.nativeEnum(KubernetesClusterDataStatus);
397
+ export const KubernetesClusterDataStepStatus$inboundSchema: z.ZodNativeEnum<
398
+ typeof KubernetesClusterDataStepStatus
399
+ > = z.nativeEnum(KubernetesClusterDataStepStatus);
329
400
  /** @internal */
330
- export const KubernetesClusterDataStatus$outboundSchema: z.ZodNativeEnum<
331
- typeof KubernetesClusterDataStatus
332
- > = KubernetesClusterDataStatus$inboundSchema;
401
+ export const KubernetesClusterDataStepStatus$outboundSchema: z.ZodNativeEnum<
402
+ typeof KubernetesClusterDataStepStatus
403
+ > = KubernetesClusterDataStepStatus$inboundSchema;
333
404
 
334
405
  /** @internal */
335
406
  export const KubernetesClusterDataStep$inboundSchema: z.ZodType<
@@ -338,7 +409,7 @@ export const KubernetesClusterDataStep$inboundSchema: z.ZodType<
338
409
  unknown
339
410
  > = z.object({
340
411
  name: KubernetesClusterDataName$inboundSchema.optional(),
341
- status: KubernetesClusterDataStatus$inboundSchema.optional(),
412
+ status: KubernetesClusterDataStepStatus$inboundSchema.optional(),
342
413
  });
343
414
  /** @internal */
344
415
  export type KubernetesClusterDataStep$Outbound = {
@@ -353,7 +424,7 @@ export const KubernetesClusterDataStep$outboundSchema: z.ZodType<
353
424
  KubernetesClusterDataStep
354
425
  > = z.object({
355
426
  name: KubernetesClusterDataName$outboundSchema.optional(),
356
- status: KubernetesClusterDataStatus$outboundSchema.optional(),
427
+ status: KubernetesClusterDataStepStatus$outboundSchema.optional(),
357
428
  });
358
429
 
359
430
  export function kubernetesClusterDataStepToJSON(
@@ -373,6 +444,87 @@ export function kubernetesClusterDataStepFromJSON(
373
444
  );
374
445
  }
375
446
 
447
+ /** @internal */
448
+ export const KubernetesClusterDataType$inboundSchema: z.ZodNativeEnum<
449
+ typeof KubernetesClusterDataType
450
+ > = z.nativeEnum(KubernetesClusterDataType);
451
+ /** @internal */
452
+ export const KubernetesClusterDataType$outboundSchema: z.ZodNativeEnum<
453
+ typeof KubernetesClusterDataType
454
+ > = KubernetesClusterDataType$inboundSchema;
455
+
456
+ /** @internal */
457
+ export const NodeStatus$inboundSchema: z.ZodNativeEnum<typeof NodeStatus> = z
458
+ .nativeEnum(NodeStatus);
459
+ /** @internal */
460
+ export const NodeStatus$outboundSchema: z.ZodNativeEnum<typeof NodeStatus> =
461
+ NodeStatus$inboundSchema;
462
+
463
+ /** @internal */
464
+ export const Node$inboundSchema: z.ZodType<Node, z.ZodTypeDef, unknown> = z
465
+ .object({
466
+ id: z.string().optional(),
467
+ name: z.string().optional(),
468
+ hostname: z.nullable(z.string()).optional(),
469
+ server_id: z.nullable(z.string()).optional(),
470
+ type: KubernetesClusterDataType$inboundSchema.optional(),
471
+ status: NodeStatus$inboundSchema.optional(),
472
+ ip: z.nullable(z.string()).optional(),
473
+ internal_ip: z.nullable(z.string()).optional(),
474
+ external_ip: z.nullable(z.string()).optional(),
475
+ }).transform((v) => {
476
+ return remap$(v, {
477
+ "server_id": "serverId",
478
+ "internal_ip": "internalIp",
479
+ "external_ip": "externalIp",
480
+ });
481
+ });
482
+ /** @internal */
483
+ export type Node$Outbound = {
484
+ id?: string | undefined;
485
+ name?: string | undefined;
486
+ hostname?: string | null | undefined;
487
+ server_id?: string | null | undefined;
488
+ type?: string | undefined;
489
+ status?: string | undefined;
490
+ ip?: string | null | undefined;
491
+ internal_ip?: string | null | undefined;
492
+ external_ip?: string | null | undefined;
493
+ };
494
+
495
+ /** @internal */
496
+ export const Node$outboundSchema: z.ZodType<Node$Outbound, z.ZodTypeDef, Node> =
497
+ z.object({
498
+ id: z.string().optional(),
499
+ name: z.string().optional(),
500
+ hostname: z.nullable(z.string()).optional(),
501
+ serverId: z.nullable(z.string()).optional(),
502
+ type: KubernetesClusterDataType$outboundSchema.optional(),
503
+ status: NodeStatus$outboundSchema.optional(),
504
+ ip: z.nullable(z.string()).optional(),
505
+ internalIp: z.nullable(z.string()).optional(),
506
+ externalIp: z.nullable(z.string()).optional(),
507
+ }).transform((v) => {
508
+ return remap$(v, {
509
+ serverId: "server_id",
510
+ internalIp: "internal_ip",
511
+ externalIp: "external_ip",
512
+ });
513
+ });
514
+
515
+ export function nodeToJSON(node: Node): string {
516
+ return JSON.stringify(Node$outboundSchema.parse(node));
517
+ }
518
+ export function nodeFromJSON(
519
+ jsonString: string,
520
+ ): SafeParseResult<Node, SDKValidationError> {
521
+ return safeParse(
522
+ jsonString,
523
+ (x) => Node$inboundSchema.parse(JSON.parse(x)),
524
+ `Failed to parse 'Node' from JSON`,
525
+ );
526
+ }
527
+
376
528
  /** @internal */
377
529
  export const KubernetesClusterDataProject$inboundSchema: z.ZodType<
378
530
  KubernetesClusterDataProject,
@@ -453,6 +605,7 @@ export const KubernetesClusterDataAttributes$inboundSchema: z.ZodType<
453
605
  ).optional(),
454
606
  failure_message: z.nullable(z.string()).optional(),
455
607
  failure_reason: z.nullable(z.string()).optional(),
608
+ nodes: z.array(z.lazy(() => Node$inboundSchema)).optional(),
456
609
  project: z.lazy(() => KubernetesClusterDataProject$inboundSchema).optional(),
457
610
  }).transform((v) => {
458
611
  return remap$(v, {
@@ -496,6 +649,7 @@ export type KubernetesClusterDataAttributes$Outbound = {
496
649
  last_status_change?: string | null | undefined;
497
650
  failure_message?: string | null | undefined;
498
651
  failure_reason?: string | null | undefined;
652
+ nodes?: Array<Node$Outbound> | undefined;
499
653
  project?: KubernetesClusterDataProject$Outbound | undefined;
500
654
  };
501
655
 
@@ -530,6 +684,7 @@ export const KubernetesClusterDataAttributes$outboundSchema: z.ZodType<
530
684
  .optional(),
531
685
  failureMessage: z.nullable(z.string()).optional(),
532
686
  failureReason: z.nullable(z.string()).optional(),
687
+ nodes: z.array(z.lazy(() => Node$outboundSchema)).optional(),
533
688
  project: z.lazy(() => KubernetesClusterDataProject$outboundSchema).optional(),
534
689
  }).transform((v) => {
535
690
  return remap$(v, {
@@ -55,7 +55,7 @@ export class KubernetesClusters extends ClientSDK {
55
55
  * Get a Kubernetes Cluster
56
56
  *
57
57
  * @remarks
58
- * Retrieves detailed information about a Kubernetes cluster including its status, control plane, and worker node details.
58
+ * Retrieves detailed information about a Kubernetes cluster including its status, control plane, worker node details, and individual node information.
59
59
  */
60
60
  async getKubernetesCluster(
61
61
  request: operations.GetKubernetesClusterRequest,