@kohost/api-client 6.4.0 → 6.4.1
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/dist/schemas/server.d.ts +6 -12
- package/dist/schemas/server.js +6 -11
- package/dist/schemas/server.js.map +1 -1
- package/package.json +1 -1
package/dist/schemas/server.d.ts
CHANGED
|
@@ -73,8 +73,7 @@ declare const serverSchema: {
|
|
|
73
73
|
readonly type: "integer";
|
|
74
74
|
};
|
|
75
75
|
readonly startedAt: {
|
|
76
|
-
readonly
|
|
77
|
-
readonly format: "date-time";
|
|
76
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
78
77
|
};
|
|
79
78
|
};
|
|
80
79
|
};
|
|
@@ -127,8 +126,7 @@ declare const serverSchema: {
|
|
|
127
126
|
readonly type: "number";
|
|
128
127
|
};
|
|
129
128
|
readonly lastHeartbeatAt: {
|
|
130
|
-
readonly
|
|
131
|
-
readonly format: "date-time";
|
|
129
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
132
130
|
};
|
|
133
131
|
};
|
|
134
132
|
};
|
|
@@ -139,20 +137,16 @@ declare const serverSchema: {
|
|
|
139
137
|
readonly type: "string";
|
|
140
138
|
};
|
|
141
139
|
readonly bootedAt: {
|
|
142
|
-
readonly
|
|
143
|
-
readonly format: "date-time";
|
|
140
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
144
141
|
};
|
|
145
142
|
readonly createdAt: {
|
|
146
|
-
readonly
|
|
147
|
-
readonly format: "date-time";
|
|
143
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
148
144
|
};
|
|
149
145
|
readonly updatedAt: {
|
|
150
|
-
readonly
|
|
151
|
-
readonly format: "date-time";
|
|
146
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
152
147
|
};
|
|
153
148
|
readonly deletedAt: {
|
|
154
|
-
readonly
|
|
155
|
-
readonly format: "date-time";
|
|
149
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
156
150
|
};
|
|
157
151
|
readonly architecture: {
|
|
158
152
|
readonly type: "string";
|
package/dist/schemas/server.js
CHANGED
|
@@ -48,7 +48,7 @@ const serverSchema = {
|
|
|
48
48
|
state: { type: "string" },
|
|
49
49
|
// healthy, unhealthy, none
|
|
50
50
|
restartCount: { type: "integer" },
|
|
51
|
-
startedAt: {
|
|
51
|
+
startedAt: { $ref: "definitions.json#/definitions/date" }
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
},
|
|
@@ -97,8 +97,7 @@ const serverSchema = {
|
|
|
97
97
|
type: "number"
|
|
98
98
|
},
|
|
99
99
|
lastHeartbeatAt: {
|
|
100
|
-
|
|
101
|
-
format: "date-time"
|
|
100
|
+
$ref: "definitions.json#/definitions/date"
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
},
|
|
@@ -109,20 +108,16 @@ const serverSchema = {
|
|
|
109
108
|
type: "string"
|
|
110
109
|
},
|
|
111
110
|
bootedAt: {
|
|
112
|
-
|
|
113
|
-
format: "date-time"
|
|
111
|
+
$ref: "definitions.json#/definitions/date"
|
|
114
112
|
},
|
|
115
113
|
createdAt: {
|
|
116
|
-
|
|
117
|
-
format: "date-time"
|
|
114
|
+
$ref: "definitions.json#/definitions/date"
|
|
118
115
|
},
|
|
119
116
|
updatedAt: {
|
|
120
|
-
|
|
121
|
-
format: "date-time"
|
|
117
|
+
$ref: "definitions.json#/definitions/date"
|
|
122
118
|
},
|
|
123
119
|
deletedAt: {
|
|
124
|
-
|
|
125
|
-
format: "date-time"
|
|
120
|
+
$ref: "definitions.json#/definitions/date"
|
|
126
121
|
},
|
|
127
122
|
architecture: {
|
|
128
123
|
type: "string"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../.generated/schemas/server.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const serverSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"server.json\",\n title: \"Server\",\n description:\n \"A server is a physical or virtual machine that runs the Kohost software\",\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\"server\"],\n default: \"server\",\n },\n networkInterfaces: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n name: { type: \"string\" }, // eth0, eno1, etc.\n mac: { type: \"string\" },\n ipv4: { type: \"array\", items: { type: \"string\" } },\n ipv6: { type: \"array\", items: { type: \"string\" } },\n state: { type: \"string\" }, // up, down\n },\n },\n },\n containers: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: { type: \"string\" }, // container ID\n name: { type: \"string\" }, // container name\n image: { type: \"string\" }, // image:tag\n status: { type: \"string\" }, // running, exited, restarting\n state: { type: \"string\" }, // healthy, unhealthy, none\n restartCount: { type: \"integer\" },\n startedAt: {
|
|
1
|
+
{"version":3,"sources":["../../.generated/schemas/server.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\n\nexport const serverSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"server.json\",\n title: \"Server\",\n description:\n \"A server is a physical or virtual machine that runs the Kohost software\",\n type: \"object\",\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n name: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n enum: [\"server\"],\n default: \"server\",\n },\n networkInterfaces: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n name: { type: \"string\" }, // eth0, eno1, etc.\n mac: { type: \"string\" },\n ipv4: { type: \"array\", items: { type: \"string\" } },\n ipv6: { type: \"array\", items: { type: \"string\" } },\n state: { type: \"string\" }, // up, down\n },\n },\n },\n containers: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n id: { type: \"string\" }, // container ID\n name: { type: \"string\" }, // container name\n image: { type: \"string\" }, // image:tag\n status: { type: \"string\" }, // running, exited, restarting\n state: { type: \"string\" }, // healthy, unhealthy, none\n restartCount: { type: \"integer\" },\n startedAt: { $ref: \"definitions.json#/definitions/date\" },\n },\n },\n },\n software: {\n type: \"object\",\n properties: {\n dockerVersion: { type: \"string\" },\n kernelVersion: { type: \"string\" },\n // other host-level software versions\n },\n },\n hostname: {\n type: \"string\",\n },\n organizationId: {\n type: \"string\",\n },\n propertyId: {\n type: \"string\",\n },\n manufacturer: {\n type: \"string\",\n },\n modelNumber: {\n type: \"string\",\n },\n serialNumber: {\n type: \"string\",\n },\n operatingSystem: {\n type: \"string\",\n },\n health: {\n type: \"object\",\n properties: {\n offline: {\n type: \"boolean\",\n },\n cpuUsage: {\n type: \"number\",\n },\n memoryUsage: {\n type: \"number\",\n },\n diskUsage: {\n type: \"number\",\n },\n lastHeartbeatAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n },\n watts: {\n $ref: \"definitions.json#/definitions/watts\",\n },\n virtualization: {\n type: \"string\",\n },\n bootedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n architecture: {\n type: \"string\",\n },\n resources: {\n type: \"object\",\n properties: {\n cpuCores: { type: \"integer\" },\n memoryTotal: { type: \"integer\" }, // bytes\n diskTotal: { type: \"integer\" }, // bytes\n },\n },\n timezone: {\n type: \"string\", // America/New_York, etc.\n },\n },\n required: [\"id\", \"type\"],\n} as const;\n\nexport type ServerSchema = FromSchema<\n typeof serverSchema,\n {\n references: [typeof defs];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"AAGO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aACE;AAAA,EACF,MAAM;AA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