@@ -10,18 +10,17 @@ using Http;
1010using OpenAPI ;
1111
1212namespace HyperFleet ;
13+
1314@ route ("/clusters/{cluster_id}/statuses" )
1415@ useAuth (HyperFleet .BearerAuth )
1516//@tag("Cluster statuses")
16- interface ClusterStatusesInternal {
17-
17+ interface ClusterStatusesInternal {
1818 /**
1919 * Adapter creates or updates its status report for this cluster.
2020 * If adapter already has a status, it will be updated (upsert by adapter name).
2121 *
2222 * Response includes the full adapter status with all conditions.
2323 * Adapter should call this endpoint every time it evaluates the cluster.
24- *
2524 */
2625 @ route ("" )
2726 @ post
@@ -31,29 +30,43 @@ interface ClusterStatusesInternal{
3130 /**
3231 * Cluster ID
3332 */
34- @ path cluster_id : string ,
33+ @ path cluster_id : string ,
3534
3635 @ body body : AdapterStatusCreateRequest ,
3736 ):
3837 | (CreatedResponse & AdapterStatus )
39- | BadRequestResponse
40- | NotFoundResponse
41- | ConflictResponse
42- | BadRequestResponse ;
38+ | BadRequestResponse
39+ | NotFoundResponse
40+ | ConflictResponse ;
41+
42+ @ route ("" )
43+ @ put
44+ @ summary ("Adapter creates or updates resource cluster status" )
45+ @ operationId ("putClusterStatuses" )
46+ putClusterStatuses (
47+ /**
48+ * Cluster ID
49+ */
50+ @ path cluster_id : string ,
4351
52+ @ body body : AdapterStatusCreateRequest ,
53+ ):
54+ | (CreatedResponse & AdapterStatus )
55+ | BadRequestResponse
56+ | NotFoundResponse
57+ | ConflictResponse ;
4458}
4559
4660//@tag("NodePool statuses")
4761@ route ("/clusters/{cluster_id}/nodepools/{nodepool_id}/statuses" )
48- interface NodePoolStatusesInternal {
49-
62+ @ useAuth ( HyperFleet . BearerAuth )
63+ interface NodePoolStatusesInternal {
5064 /**
5165 * Adapter creates or updates its status report for this nodepool.
5266 * If adapter already has a status, it will be updated (upsert by adapter name).
5367 *
5468 * Response includes the full adapter status with all conditions.
5569 * Adapter should call this endpoint every time it evaluates the nodepool.
56- *
5770 */
5871 @ route ("" )
5972 @ post
@@ -63,15 +76,39 @@ interface NodePoolStatusesInternal{
6376 /**
6477 * Cluster ID
6578 */
66- @ path cluster_id : string ,
67- @ path nodepool_id : string ,
79+ @ path cluster_id : string ,
80+
81+ /**
82+ * Nodepool ID
83+ */
84+ @ path nodepool_id : string ,
6885
6986 @ body body : AdapterStatusCreateRequest ,
7087 ):
7188 | (CreatedResponse & AdapterStatus )
72- | BadRequestResponse
73- | NotFoundResponse
74- | ConflictResponse
75- | BadRequestResponse ;
89+ | BadRequestResponse
90+ | NotFoundResponse
91+ | ConflictResponse ;
92+
93+ @ route ("" )
94+ @ put
95+ @ summary ("Adapter creates or updates resource nodepool status" )
96+ @ operationId ("putNodePoolStatuses" )
97+ putNodePoolStatuses (
98+ /**
99+ * Cluster ID
100+ */
101+ @ path cluster_id : string ,
102+
103+ /**
104+ * Nodepool ID
105+ */
106+ @ path nodepool_id : string ,
76107
108+ @ body body : AdapterStatusCreateRequest ,
109+ ):
110+ | (CreatedResponse & AdapterStatus )
111+ | BadRequestResponse
112+ | NotFoundResponse
113+ | ConflictResponse ;
77114}
0 commit comments