@cloudfleet/sdk 0.0.1-2791829 → 0.0.1-2bacf54

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.
@@ -286,7 +286,8 @@ export const ClusterCreateInputSchema = {
286
286
  pattern: '^(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
287
287
  description: 'Version of the kubernetes cluster.',
288
288
  default: '1.x.x-cfke.x',
289
- example: '1.29.x-cfke.x'
289
+ example: '1.x.x-cfke.x',
290
+ enum: ['1.x.x-cfke.x', '1.31.x-cfke.x', '1.32.x-cfke.x', '1.33.x-cfke.x']
290
291
  }
291
292
  },
292
293
  required: ['name', 'tier'],
@@ -323,7 +324,7 @@ MIIC0DCCAbigAwIBAgI...`
323
324
  kubernetes: {
324
325
  type: 'string',
325
326
  description: 'Kubernetes version of the cluster.',
326
- example: '1.29.3'
327
+ example: '1.33.7'
327
328
  },
328
329
  tailscale: {
329
330
  type: 'string',
@@ -396,13 +397,6 @@ export const ClusterSchema = {
396
397
  example: 'northamerica-central-1a',
397
398
  enum: ['staging', 'northamerica-central-1', 'europe-central-1a', 'northamerica-central-1a']
398
399
  },
399
- version_channel: {
400
- type: 'string',
401
- pattern: '^(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
402
- description: 'Version of the kubernetes cluster.',
403
- default: '1.x.x-cfke.x',
404
- example: '1.29.x-cfke.x'
405
- },
406
400
  id: {
407
401
  type: 'string',
408
402
  format: 'uuid',
@@ -438,7 +432,7 @@ MIIC0DCCAbigAwIBAgI...`
438
432
  version_current: {
439
433
  type: 'string',
440
434
  description: 'Current version of the cluster.',
441
- example: '1.29.3-cfke.52'
435
+ example: '1.33.7-cfke.264'
442
436
  },
443
437
  created_at: {
444
438
  type: 'string',
@@ -454,6 +448,12 @@ MIIC0DCCAbigAwIBAgI...`
454
448
  type: 'boolean',
455
449
  description: 'Indicates if the cluster is ready to be used.',
456
450
  example: true
451
+ },
452
+ version_channel: {
453
+ type: 'string',
454
+ pattern: '^(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
455
+ description: 'Version of the kubernetes cluster.',
456
+ example: '1.x.x-cfke.x'
457
457
  }
458
458
  },
459
459
  required: ['name', 'tier', 'id', 'status'],
@@ -480,7 +480,7 @@ export const ClusterUpdateInputSchema = {
480
480
  type: 'string',
481
481
  pattern: '^(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
482
482
  description: 'Version of the kubernetes cluster.',
483
- example: '1.29.x-cfke.x'
483
+ example: '1.x.x-cfke.x'
484
484
  }
485
485
  },
486
486
  required: ['tier'],
@@ -739,9 +739,8 @@ export const InvoiceSchema = {
739
739
  properties: {
740
740
  id: {
741
741
  type: 'string',
742
- format: 'uuid',
743
- description: 'Unique identifier of the invoice. UUID v4 string in canonical form',
744
- example: '415026b6-f00f-44f8-968d-fc6ef4d0fc6d'
742
+ description: 'Unique identifier of the invoice.',
743
+ example: 'in_1234567890xCrwxghOTj1234'
745
744
  },
746
745
  number: {
747
746
  type: 'string'
@@ -787,87 +786,143 @@ export const InvoiceSchema = {
787
786
  required: ['created', 'period_start', 'period_end'],
788
787
  additionalProperties: false
789
788
  };
790
- export const MarketplaceListingSchema = {
789
+ export const MarketplaceListingFilesSchema = {
791
790
  type: 'object',
792
791
  properties: {
793
- id: {
792
+ chartYaml: {
794
793
  type: 'string',
795
- maxLength: 63,
796
- minLength: 1,
797
- pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$',
798
- description: 'Id of the chart listing',
799
- example: 'portworx-enterprise-disaster-recovery-baremetal'
794
+ description: 'Raw Chart.yaml content from the Helm chart',
795
+ example: `apiVersion: v2
796
+ name: nginx-ingress
797
+ version: 1.18.2-cfke.45
798
+ appVersion: 1.9.4`
800
799
  },
801
- name: {
800
+ valuesYaml: {
802
801
  type: 'string',
803
- description: 'Name of the chart listing',
804
- example: 'Portworx Enterprise + Disaster Recovery - Baremetal'
802
+ description: 'Raw values.yaml content from the Helm chart',
803
+ example: `replicaCount: 1
804
+ image:
805
+ repository: nginx
806
+ tag: latest`
805
807
  },
806
- developer: {
807
- type: 'string',
808
- description: 'Author of the chart listing',
809
- example: 'Portworx'
810
- },
811
- description: {
808
+ valuesSchemaJson: {
812
809
  type: 'string',
813
- description: 'Short description of the chart listing',
814
- example: 'Run Kubernetes with unmatched scalability, availability, and self-service access to any storage'
815
- },
816
- logoUrl: {
817
- type: 'string',
818
- description: 'Logo of the chart listing',
819
- example: 'https://portworx.com/wp-content/themes/portworx/assets/images/header/portworx-logo.png'
820
- },
821
- longDescription: {
810
+ description: 'JSON schema for values.yaml as a string',
811
+ example: '{"type":"object","properties":{"replicaCount":{"type":"number"}}}'
812
+ }
813
+ },
814
+ additionalProperties: false
815
+ };
816
+ export const MarketplaceListingSchema = {
817
+ type: 'object',
818
+ properties: {
819
+ name: {
822
820
  type: 'string',
823
- description: 'Long description of the chart listing',
824
- example: 'Portworx-Enterprise is the complete multi-cloud ready Kubernetes storage platform for running mission-critical apps in production....'
821
+ description: 'Name of the chart',
822
+ example: 'nginx-ingress'
825
823
  },
826
- categories: {
824
+ versions: {
827
825
  type: 'array',
828
826
  items: {
829
827
  type: 'string',
830
- example: 'AI & Machine Learning'
828
+ pattern: '^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
829
+ description: 'Specific version of the chart',
830
+ example: '1.18.2-cfke.45'
831
831
  },
832
- description: 'Tags of the chart'
832
+ description: 'Available versions of the chart'
833
833
  },
834
834
  version_channels: {
835
835
  type: 'array',
836
836
  items: {
837
837
  type: 'string',
838
838
  pattern: '^(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
839
- description: 'Version of the chart.',
840
- example: '2.x.x-cfke.x'
841
- }
839
+ description: 'Version channel pattern',
840
+ example: '1.18.x-cfke.x'
841
+ },
842
+ description: 'Version channels for the chart'
842
843
  },
843
- value_schemas: {
844
- type: 'array',
845
- items: {
846
- type: 'object',
847
- properties: {
848
- version: {
849
- type: 'string',
850
- pattern: '^(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)\\.(x|X|0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$',
851
- description: 'Version of the chart.',
852
- example: '2.1.1-cfke.123'
844
+ latestVersion: {
845
+ type: 'string',
846
+ description: 'Latest version of the chart',
847
+ example: '1.18.2-cfke.45'
848
+ },
849
+ metadata: {
850
+ type: 'object',
851
+ properties: {
852
+ name: {
853
+ type: 'string',
854
+ description: 'Chart name from metadata',
855
+ example: 'nginx-ingress'
856
+ },
857
+ version: {
858
+ type: 'string',
859
+ description: 'Chart version from metadata',
860
+ example: '1.18.2-cfke.45'
861
+ },
862
+ description: {
863
+ type: 'string',
864
+ description: 'Chart description',
865
+ example: 'NGINX Ingress Controller for Kubernetes'
866
+ },
867
+ appVersion: {
868
+ type: 'string',
869
+ description: 'Application version',
870
+ example: '1.9.4'
871
+ },
872
+ apiVersion: {
873
+ type: 'string',
874
+ description: 'Helm API version',
875
+ example: 'v2'
876
+ },
877
+ keywords: {
878
+ type: 'array',
879
+ items: {
880
+ type: 'string'
853
881
  },
854
- schema: {
855
- type: 'string',
856
- description: 'Schema of the chart values. JSON Schema as string'
882
+ description: 'Chart keywords',
883
+ example: ['ingress', 'nginx', 'load-balancer']
884
+ },
885
+ home: {
886
+ type: 'string',
887
+ description: 'Chart home URL',
888
+ example: 'https://kubernetes.github.io/ingress-nginx/'
889
+ },
890
+ sources: {
891
+ type: 'array',
892
+ items: {
893
+ type: 'string'
857
894
  },
858
- placeholder: {
859
- type: 'string',
860
- description: 'Schema of the chart values',
861
- example: `foo: 1
862
- bar: example`
863
- }
895
+ description: 'Chart source URLs',
896
+ example: ['https://github.com/kubernetes/ingress-nginx']
864
897
  },
865
- required: ['version', 'schema', 'placeholder'],
866
- additionalProperties: false
867
- }
898
+ maintainers: {
899
+ type: 'array',
900
+ items: {
901
+ type: 'object',
902
+ properties: {
903
+ name: {
904
+ type: 'string',
905
+ description: 'Maintainer name',
906
+ example: 'NGINX Team'
907
+ },
908
+ email: {
909
+ type: 'string',
910
+ description: 'Maintainer email',
911
+ example: 'support@nginx.org'
912
+ }
913
+ },
914
+ required: ['name'],
915
+ additionalProperties: false
916
+ },
917
+ description: 'Chart maintainers'
918
+ }
919
+ },
920
+ required: ['name', 'version'],
921
+ additionalProperties: false,
922
+ description: 'Chart metadata'
868
923
  }
869
924
  },
870
- required: ['id', 'name', 'developer', 'description', 'logoUrl', 'longDescription', 'categories', 'version_channels', 'value_schemas'],
925
+ required: ['name', 'versions', 'version_channels', 'latestVersion'],
871
926
  additionalProperties: false
872
927
  };
873
928
  export const OrganizationCreateInputSchema = {
@@ -985,12 +1040,12 @@ export const OrganizationSchema = {
985
1040
  id: {
986
1041
  type: 'string',
987
1042
  description: 'Id of the control plane version. Used in API calls.',
988
- example: '1.29.x-cfke.x'
1043
+ example: '1.33.x-cfke.x'
989
1044
  },
990
1045
  label: {
991
1046
  type: 'string',
992
1047
  description: 'Label of the control plane version. Used in frontent UI.',
993
- example: '1.29.x (Always latest 1.29 patch version)'
1048
+ example: '1.33.x (Always latest 1.33 patch version)'
994
1049
  }
995
1050
  },
996
1051
  required: ['id', 'label'],
@@ -998,9 +1053,21 @@ export const OrganizationSchema = {
998
1053
  },
999
1054
  minItems: 1,
1000
1055
  description: 'List of CFKE control plane versions available for the organization.'
1056
+ },
1057
+ copilot_user_hourly_tokens: {
1058
+ type: 'integer',
1059
+ minimum: 0,
1060
+ description: 'User-level maximum number of tokens Cloudfleet Copilot can process per hour.',
1061
+ example: 42000
1062
+ },
1063
+ copilot_organization_hourly_tokens: {
1064
+ type: 'integer',
1065
+ minimum: 0,
1066
+ description: 'Organization-level maximum number of tokens Cloudfleet Copilot can process per hour.',
1067
+ example: 242000
1001
1068
  }
1002
1069
  },
1003
- required: ['basic_clusters_max', 'basic_clusters_available', 'pro_clusters_max', 'pro_clusters_available', 'fleets_max', 'cluster_tiers', 'regions', 'versions'],
1070
+ required: ['basic_clusters_max', 'basic_clusters_available', 'pro_clusters_max', 'pro_clusters_available', 'fleets_max', 'cluster_tiers', 'regions', 'versions', 'copilot_user_hourly_tokens', 'copilot_organization_hourly_tokens'],
1004
1071
  additionalProperties: false,
1005
1072
  description: 'For security reasons, platform quota is controlled by Cloudfleet and can be updated only by Cloudfleet administrators. Please open a support ticket if you need to change the platform quota.'
1006
1073
  },
@@ -1066,6 +1133,324 @@ export const PaymentMethodSchema = {
1066
1133
  required: ['id', 'setup', 'type', 'last4', 'exp_month', 'exp_year', 'brand'],
1067
1134
  additionalProperties: false
1068
1135
  };
1136
+ export const PlatformQuotaSchema = {
1137
+ type: 'object',
1138
+ properties: {
1139
+ basic_clusters_max: {
1140
+ type: 'integer',
1141
+ minimum: 0,
1142
+ description: 'Maximum number of Basic clusters that can be created.',
1143
+ example: 999
1144
+ },
1145
+ basic_clusters_available: {
1146
+ type: 'integer',
1147
+ description: 'Available number of Basic clusters that can be created.',
1148
+ example: 999
1149
+ },
1150
+ pro_clusters_max: {
1151
+ type: 'integer',
1152
+ minimum: 0,
1153
+ description: 'Maximum number of Pro clusters that can be created.',
1154
+ example: 999
1155
+ },
1156
+ pro_clusters_available: {
1157
+ type: 'integer',
1158
+ description: 'Available number of Pro clusters that can be created.',
1159
+ example: 999
1160
+ },
1161
+ fleets_max: {
1162
+ type: 'integer',
1163
+ minimum: 0,
1164
+ description: 'Maximum number of fleets that can be created per cluster.',
1165
+ example: 999
1166
+ },
1167
+ cluster_tiers: {
1168
+ type: 'array',
1169
+ items: {
1170
+ type: 'string',
1171
+ example: 'basic'
1172
+ },
1173
+ minItems: 0,
1174
+ description: 'List of Cloudfleet cluster tiers available for the organization.'
1175
+ },
1176
+ regions: {
1177
+ type: 'array',
1178
+ items: {
1179
+ type: 'string',
1180
+ example: 'northamerica-central-1'
1181
+ },
1182
+ minItems: 1,
1183
+ description: 'List of Cloudfleet control plane regions available for the organization.'
1184
+ },
1185
+ versions: {
1186
+ type: 'array',
1187
+ items: {
1188
+ type: 'object',
1189
+ properties: {
1190
+ id: {
1191
+ type: 'string',
1192
+ description: 'Id of the control plane version. Used in API calls.',
1193
+ example: '1.33.x-cfke.x'
1194
+ },
1195
+ label: {
1196
+ type: 'string',
1197
+ description: 'Label of the control plane version. Used in frontent UI.',
1198
+ example: '1.33.x (Always latest 1.33 patch version)'
1199
+ }
1200
+ },
1201
+ required: ['id', 'label'],
1202
+ additionalProperties: false
1203
+ },
1204
+ minItems: 1,
1205
+ description: 'List of CFKE control plane versions available for the organization.'
1206
+ },
1207
+ copilot_user_hourly_tokens: {
1208
+ type: 'integer',
1209
+ minimum: 0,
1210
+ description: 'User-level maximum number of tokens Cloudfleet Copilot can process per hour.',
1211
+ example: 42000
1212
+ },
1213
+ copilot_organization_hourly_tokens: {
1214
+ type: 'integer',
1215
+ minimum: 0,
1216
+ description: 'Organization-level maximum number of tokens Cloudfleet Copilot can process per hour.',
1217
+ example: 242000
1218
+ }
1219
+ },
1220
+ required: ['basic_clusters_max', 'basic_clusters_available', 'pro_clusters_max', 'pro_clusters_available', 'fleets_max', 'cluster_tiers', 'regions', 'versions', 'copilot_user_hourly_tokens', 'copilot_organization_hourly_tokens'],
1221
+ additionalProperties: false
1222
+ };
1223
+ export const RegistryRepositorySchema = {
1224
+ type: 'object',
1225
+ properties: {
1226
+ name: {
1227
+ type: 'string',
1228
+ description: 'Repository name.',
1229
+ example: 'my-app'
1230
+ },
1231
+ region: {
1232
+ type: 'string',
1233
+ description: 'Registry region.',
1234
+ example: 'northamerica'
1235
+ },
1236
+ uri: {
1237
+ type: 'string',
1238
+ description: 'Full URI of the repository.',
1239
+ example: 'ssds123e-6651-4e5d-9c04-079f6532989b.northamerica.registry.cloudfleet.dev/my-app'
1240
+ }
1241
+ },
1242
+ required: ['name', 'region', 'uri'],
1243
+ additionalProperties: false
1244
+ };
1245
+ export const RegistryRepositoryWithTagsSchema = {
1246
+ type: 'object',
1247
+ properties: {
1248
+ name: {
1249
+ type: 'string',
1250
+ description: 'Repository name.',
1251
+ example: 'my-app'
1252
+ },
1253
+ region: {
1254
+ type: 'string',
1255
+ description: 'Registry region.',
1256
+ example: 'northamerica'
1257
+ },
1258
+ uri: {
1259
+ type: 'string',
1260
+ description: 'Full URI of the repository.',
1261
+ example: 'ssds123e-6651-4e5d-9c04-079f6532989b.northamerica.registry.cloudfleet.dev/my-app'
1262
+ },
1263
+ tags: {
1264
+ type: 'array',
1265
+ items: {
1266
+ type: 'object',
1267
+ properties: {
1268
+ name: {
1269
+ type: 'string',
1270
+ description: 'Tag name.',
1271
+ example: 'latest'
1272
+ },
1273
+ size: {
1274
+ type: 'number',
1275
+ format: 'float',
1276
+ description: 'Size of the tag in bytes.',
1277
+ example: 123456789
1278
+ },
1279
+ mediaType: {
1280
+ type: 'string',
1281
+ description: 'Media type of the manifest.',
1282
+ example: 'application/vnd.docker.distribution.manifest.v2+json'
1283
+ },
1284
+ platforms: {
1285
+ type: 'array',
1286
+ items: {
1287
+ type: 'string'
1288
+ },
1289
+ description: 'Array of platform strings for multi-arch images (e.g., linux/amd64, linux/arm64).',
1290
+ example: ['linux/amd64', 'linux/arm64']
1291
+ }
1292
+ },
1293
+ required: ['name', 'size'],
1294
+ additionalProperties: false
1295
+ },
1296
+ description: 'Array of tags in the repository.'
1297
+ },
1298
+ totalSize: {
1299
+ type: 'number',
1300
+ format: 'float',
1301
+ description: 'Total size of all tags in the repository in bytes.',
1302
+ example: 987654321
1303
+ }
1304
+ },
1305
+ required: ['name', 'region', 'uri', 'tags', 'totalSize'],
1306
+ additionalProperties: false
1307
+ };
1308
+ export const RegistryTagSchema = {
1309
+ type: 'object',
1310
+ properties: {
1311
+ name: {
1312
+ type: 'string',
1313
+ description: 'Tag name.',
1314
+ example: 'latest'
1315
+ },
1316
+ digest: {
1317
+ type: 'string',
1318
+ description: 'Manifest digest for pulling by digest.',
1319
+ example: 'sha256:abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef567890'
1320
+ },
1321
+ mediaType: {
1322
+ type: 'string',
1323
+ description: 'Media type of the manifest.',
1324
+ example: 'application/vnd.docker.distribution.manifest.v2+json'
1325
+ },
1326
+ config: {
1327
+ type: 'object',
1328
+ properties: {
1329
+ size: {
1330
+ type: 'number',
1331
+ format: 'float',
1332
+ description: 'Size of the config in bytes.',
1333
+ example: 1234
1334
+ }
1335
+ },
1336
+ required: ['size'],
1337
+ additionalProperties: false,
1338
+ description: 'Manifest config metadata.'
1339
+ },
1340
+ layers: {
1341
+ type: 'array',
1342
+ items: {
1343
+ type: 'object',
1344
+ properties: {
1345
+ digest: {
1346
+ type: 'string',
1347
+ description: 'Digest of the layer.',
1348
+ example: 'sha256:abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef567890'
1349
+ },
1350
+ size: {
1351
+ type: 'number',
1352
+ format: 'float',
1353
+ description: 'Size of the layer in bytes.',
1354
+ example: 5678
1355
+ }
1356
+ },
1357
+ required: ['size'],
1358
+ additionalProperties: false
1359
+ },
1360
+ description: 'Array of layer metadata.'
1361
+ },
1362
+ manifests: {
1363
+ type: 'array',
1364
+ items: {
1365
+ type: 'object',
1366
+ properties: {
1367
+ digest: {
1368
+ type: 'string',
1369
+ description: 'Digest of the manifest.',
1370
+ example: 'sha256:abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef567890'
1371
+ },
1372
+ platform: {
1373
+ type: 'object',
1374
+ properties: {
1375
+ architecture: {
1376
+ type: 'string',
1377
+ description: 'Architecture of the platform.',
1378
+ example: 'amd64'
1379
+ },
1380
+ os: {
1381
+ type: 'string',
1382
+ description: 'Operating system of the platform.',
1383
+ example: 'linux'
1384
+ },
1385
+ variant: {
1386
+ type: 'string',
1387
+ description: 'Variant of the platform (e.g., v7, v8 for ARM).',
1388
+ example: 'v8'
1389
+ }
1390
+ },
1391
+ required: ['architecture', 'os'],
1392
+ additionalProperties: false,
1393
+ description: 'Platform information for the manifest.'
1394
+ },
1395
+ layers: {
1396
+ type: 'array',
1397
+ items: {
1398
+ type: 'object',
1399
+ properties: {
1400
+ digest: {
1401
+ type: 'string',
1402
+ description: 'Digest of the layer.',
1403
+ example: 'sha256:abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef567890'
1404
+ },
1405
+ size: {
1406
+ type: 'number',
1407
+ format: 'float',
1408
+ description: 'Size of the layer in bytes.',
1409
+ example: 5678
1410
+ }
1411
+ },
1412
+ required: ['size'],
1413
+ additionalProperties: false
1414
+ },
1415
+ description: 'Layers for this platform.'
1416
+ },
1417
+ size: {
1418
+ type: 'number',
1419
+ format: 'float',
1420
+ description: 'Total size of this platform manifest in bytes.',
1421
+ example: 12345678
1422
+ }
1423
+ },
1424
+ required: ['digest'],
1425
+ additionalProperties: false
1426
+ },
1427
+ description: 'Array of manifests for multi-arch images.'
1428
+ },
1429
+ size: {
1430
+ type: 'number',
1431
+ format: 'float',
1432
+ description: 'Total size of the tag in bytes.',
1433
+ example: 123456789
1434
+ },
1435
+ region: {
1436
+ type: 'string',
1437
+ description: 'Registry region.',
1438
+ example: 'northamerica'
1439
+ },
1440
+ repository: {
1441
+ type: 'string',
1442
+ description: 'Repository name.',
1443
+ example: 'my-app'
1444
+ },
1445
+ uri: {
1446
+ type: 'string',
1447
+ description: 'Full URI of the tag.',
1448
+ example: 'ssds123e-6651-4e5d-9c04-079f6532989b.northamerica.registry.cloudfleet.dev/my-app:latest'
1449
+ }
1450
+ },
1451
+ required: ['name', 'digest', 'size', 'region', 'repository', 'uri'],
1452
+ additionalProperties: false
1453
+ };
1069
1454
  export const TokenCreateInputSchema = {
1070
1455
  type: 'object',
1071
1456
  properties: {
@@ -1144,6 +1529,101 @@ export const TokenUpdateInputSchema = {
1144
1529
  },
1145
1530
  additionalProperties: false
1146
1531
  };
1532
+ export const UsageFacetsSchema = {
1533
+ type: 'object',
1534
+ properties: {
1535
+ cluster_id: {
1536
+ type: 'array',
1537
+ items: {
1538
+ type: 'string'
1539
+ },
1540
+ description: 'List of unique cluster IDs',
1541
+ example: ['6b5439b1-923a-4f2b-a371-d554e5ea23fa']
1542
+ },
1543
+ product: {
1544
+ type: 'array',
1545
+ items: {
1546
+ type: 'string'
1547
+ },
1548
+ description: 'List of unique products',
1549
+ example: ['cfke_controlplane', 'cfke_connected_nodes']
1550
+ }
1551
+ },
1552
+ additionalProperties: false
1553
+ };
1554
+ export const UsageResponseSchema = {
1555
+ type: 'object',
1556
+ properties: {
1557
+ data: {
1558
+ type: 'array',
1559
+ items: {
1560
+ type: 'object',
1561
+ properties: {
1562
+ hour: {
1563
+ type: 'string',
1564
+ description: 'Hour of the usage',
1565
+ example: '2019-01-01T00:00:00.000Z'
1566
+ },
1567
+ cluster_id: {
1568
+ type: 'string',
1569
+ description: 'Unique identifier of the kubernetes cluster. UUID v4 string in canonical form',
1570
+ example: '6b5439b1-923a-4f2b-a371-d554e5ea23fa'
1571
+ },
1572
+ product: {
1573
+ type: 'string',
1574
+ description: 'The product the usage is associated with',
1575
+ example: 'cfke_controlplane'
1576
+ },
1577
+ value: {
1578
+ type: 'number',
1579
+ format: 'float',
1580
+ description: 'Consumption',
1581
+ example: 4
1582
+ },
1583
+ price: {
1584
+ type: 'number',
1585
+ format: 'float',
1586
+ description: 'Price per unit',
1587
+ example: 0.01
1588
+ },
1589
+ total: {
1590
+ type: 'number',
1591
+ format: 'float',
1592
+ description: 'Total cost'
1593
+ }
1594
+ },
1595
+ required: ['hour', 'cluster_id', 'product', 'value', 'price', 'total'],
1596
+ additionalProperties: false
1597
+ },
1598
+ description: 'Usage data'
1599
+ },
1600
+ facets: {
1601
+ type: 'object',
1602
+ properties: {
1603
+ cluster_id: {
1604
+ type: 'array',
1605
+ items: {
1606
+ type: 'string'
1607
+ },
1608
+ description: 'List of unique cluster IDs',
1609
+ example: ['6b5439b1-923a-4f2b-a371-d554e5ea23fa']
1610
+ },
1611
+ product: {
1612
+ type: 'array',
1613
+ items: {
1614
+ type: 'string'
1615
+ },
1616
+ description: 'List of unique products',
1617
+ example: ['cfke_controlplane', 'cfke_connected_nodes']
1618
+ }
1619
+ },
1620
+ additionalProperties: false,
1621
+ description: 'Facets for filtering'
1622
+ }
1623
+ },
1624
+ required: ['data', 'facets'],
1625
+ additionalProperties: false
1626
+ };
1147
1627
  export const UsageSchema = {
1148
1628
  type: 'object',
1149
1629
  properties: {
@@ -1154,90 +1634,33 @@ export const UsageSchema = {
1154
1634
  },
1155
1635
  cluster_id: {
1156
1636
  type: 'string',
1157
- format: 'uuid',
1158
1637
  description: 'Unique identifier of the kubernetes cluster. UUID v4 string in canonical form',
1159
1638
  example: '6b5439b1-923a-4f2b-a371-d554e5ea23fa'
1160
1639
  },
1161
- cluster_tier: {
1162
- type: 'string',
1163
- description: 'Tier of the cluster.',
1164
- example: 'pro',
1165
- enum: ['basic', 'pro', '']
1166
- },
1167
1640
  product: {
1168
1641
  type: 'string',
1169
1642
  description: 'The product the usage is associated with',
1170
- example: 'cfke_controlplane',
1171
- enum: ['cfke_controlplane', 'cfke_connected_nodes', 'infra_compute', 'infra_storage', 'infra_loadbalancing', 'infra_traffic', 'cfcr_storage']
1643
+ example: 'cfke_controlplane'
1172
1644
  },
1173
- node_name: {
1174
- type: 'string',
1175
- description: 'Name of the Kubernetes node',
1176
- example: 'flexible-moth-956037384'
1177
- },
1178
- sku: {
1179
- type: 'string',
1180
- description: 'SKU of the Kubernetes node',
1181
- example: 'GCP-NORTHAMERICA-NORTHEAST1-A-G1-SMALL-SPOT'
1182
- },
1183
- cpu: {
1184
- anyOf: [
1185
- {
1186
- type: 'number',
1187
- format: 'float',
1188
- description: 'CPU core count of the node',
1189
- example: 4
1190
- },
1191
- {
1192
- type: 'string',
1193
- enum: ['']
1194
- }
1195
- ]
1645
+ value: {
1646
+ type: 'number',
1647
+ format: 'float',
1648
+ description: 'Consumption',
1649
+ example: 4
1196
1650
  },
1197
1651
  price: {
1198
- anyOf: [
1199
- {
1200
- type: 'number',
1201
- format: 'float',
1202
- description: 'Price',
1203
- example: 4
1204
- },
1205
- {
1206
- type: 'string',
1207
- enum: ['']
1208
- }
1209
- ]
1210
- },
1211
- value: {
1212
- anyOf: [
1213
- {
1214
- type: 'number',
1215
- format: 'float',
1216
- description: 'Value',
1217
- example: 4
1218
- },
1219
- {
1220
- type: 'string',
1221
- enum: ['']
1222
- }
1223
- ]
1652
+ type: 'number',
1653
+ format: 'float',
1654
+ description: 'Price per unit',
1655
+ example: 0.01
1224
1656
  },
1225
1657
  total: {
1226
- anyOf: [
1227
- {
1228
- type: 'number',
1229
- format: 'float',
1230
- description: 'Total',
1231
- example: 4
1232
- },
1233
- {
1234
- type: 'string',
1235
- enum: ['']
1236
- }
1237
- ]
1658
+ type: 'number',
1659
+ format: 'float',
1660
+ description: 'Total cost'
1238
1661
  }
1239
1662
  },
1240
- required: ['cluster_id', 'cluster_tier', 'product', 'node_name', 'sku', 'cpu', 'price', 'value', 'total'],
1663
+ required: ['hour', 'cluster_id', 'product', 'value', 'price', 'total'],
1241
1664
  additionalProperties: false
1242
1665
  };
1243
1666
  export const UserCreateInputSchema = {