@7k-inari/api-client 0.3.0
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/README.md +60 -0
- package/gen/ts/proto/inari/agent/v1/agent_connect.ts +30 -0
- package/gen/ts/proto/inari/agent/v1/agent_pb.ts +396 -0
- package/gen/ts/proto/inari/agent/v1/commands_pb.ts +599 -0
- package/gen/ts/proto/inari/agent/v1/events_pb.ts +681 -0
- package/gen/ts/proto/inari/agent/v1/registration_connect.ts +30 -0
- package/gen/ts/proto/inari/agent/v1/registration_pb.ts +209 -0
- package/gen/ts/proto/inari/plugin/v1/plugin_connect.ts +56 -0
- package/gen/ts/proto/inari/plugin/v1/plugin_pb.ts +714 -0
- package/gen/ts/rest/client.ts +4692 -0
- package/gen/ts/smoke.ts +89 -0
- package/package.json +25 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file inari/agent/v1/registration.proto (package inari.agent.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
+
import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* RegisterClusterRequest exchanges a one-time, TTL'd registration token for
|
|
11
|
+
* per-cluster identity. The token is forgotten after use; replay is rejected
|
|
12
|
+
* server-side.
|
|
13
|
+
*
|
|
14
|
+
* @generated from message inari.agent.v1.RegisterClusterRequest
|
|
15
|
+
*/
|
|
16
|
+
export class RegisterClusterRequest extends Message<RegisterClusterRequest> {
|
|
17
|
+
/**
|
|
18
|
+
* @generated from field: string registration_token = 1;
|
|
19
|
+
*/
|
|
20
|
+
registrationToken = "";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @generated from field: string agent_version = 2;
|
|
24
|
+
*/
|
|
25
|
+
agentVersion = "";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Contract package this agent implements, e.g. "inari.agent.v1".
|
|
29
|
+
*
|
|
30
|
+
* @generated from field: string contract_version = 3;
|
|
31
|
+
*/
|
|
32
|
+
contractVersion = "";
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Cluster labels reported at registration (env, region, ...); feeds
|
|
36
|
+
* ClusterSet targeting (plan §5.11).
|
|
37
|
+
*
|
|
38
|
+
* @generated from field: map<string, string> cluster_labels = 4;
|
|
39
|
+
*/
|
|
40
|
+
clusterLabels: { [key: string]: string } = {};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @generated from field: string kubernetes_version = 5;
|
|
44
|
+
*/
|
|
45
|
+
kubernetesVersion = "";
|
|
46
|
+
|
|
47
|
+
constructor(data?: PartialMessage<RegisterClusterRequest>) {
|
|
48
|
+
super();
|
|
49
|
+
proto3.util.initPartial(data, this);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
53
|
+
static readonly typeName = "inari.agent.v1.RegisterClusterRequest";
|
|
54
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
55
|
+
{ no: 1, name: "registration_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
56
|
+
{ no: 2, name: "agent_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
57
|
+
{ no: 3, name: "contract_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
58
|
+
{ no: 4, name: "cluster_labels", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
59
|
+
{ no: 5, name: "kubernetes_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RegisterClusterRequest {
|
|
63
|
+
return new RegisterClusterRequest().fromBinary(bytes, options);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RegisterClusterRequest {
|
|
67
|
+
return new RegisterClusterRequest().fromJson(jsonValue, options);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RegisterClusterRequest {
|
|
71
|
+
return new RegisterClusterRequest().fromJsonString(jsonString, options);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static equals(a: RegisterClusterRequest | PlainMessage<RegisterClusterRequest> | undefined, b: RegisterClusterRequest | PlainMessage<RegisterClusterRequest> | undefined): boolean {
|
|
75
|
+
return proto3.util.equals(RegisterClusterRequest, a, b);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* SecretDeliveryReference points at the in-cluster location where the OIDC
|
|
81
|
+
* client secret is delivered via External Secrets Operator. The secret VALUE
|
|
82
|
+
* is never present in this API and never committed to git (plan §5.3, §5.10)
|
|
83
|
+
* — this message is only a pointer.
|
|
84
|
+
*
|
|
85
|
+
* @generated from message inari.agent.v1.SecretDeliveryReference
|
|
86
|
+
*/
|
|
87
|
+
export class SecretDeliveryReference extends Message<SecretDeliveryReference> {
|
|
88
|
+
/**
|
|
89
|
+
* @generated from field: string eso_secret_store = 1;
|
|
90
|
+
*/
|
|
91
|
+
esoSecretStore = "";
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @generated from field: string secret_name = 2;
|
|
95
|
+
*/
|
|
96
|
+
secretName = "";
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @generated from field: string secret_namespace = 3;
|
|
100
|
+
*/
|
|
101
|
+
secretNamespace = "";
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @generated from field: string secret_key = 4;
|
|
105
|
+
*/
|
|
106
|
+
secretKey = "";
|
|
107
|
+
|
|
108
|
+
constructor(data?: PartialMessage<SecretDeliveryReference>) {
|
|
109
|
+
super();
|
|
110
|
+
proto3.util.initPartial(data, this);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
114
|
+
static readonly typeName = "inari.agent.v1.SecretDeliveryReference";
|
|
115
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
116
|
+
{ no: 1, name: "eso_secret_store", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
117
|
+
{ no: 2, name: "secret_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
118
|
+
{ no: 3, name: "secret_namespace", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
119
|
+
{ no: 4, name: "secret_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
120
|
+
]);
|
|
121
|
+
|
|
122
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SecretDeliveryReference {
|
|
123
|
+
return new SecretDeliveryReference().fromBinary(bytes, options);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SecretDeliveryReference {
|
|
127
|
+
return new SecretDeliveryReference().fromJson(jsonValue, options);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SecretDeliveryReference {
|
|
131
|
+
return new SecretDeliveryReference().fromJsonString(jsonString, options);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
static equals(a: SecretDeliveryReference | PlainMessage<SecretDeliveryReference> | undefined, b: SecretDeliveryReference | PlainMessage<SecretDeliveryReference> | undefined): boolean {
|
|
135
|
+
return proto3.util.equals(SecretDeliveryReference, a, b);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* RegisterClusterResponse returns the per-cluster Keycloak OIDC client
|
|
141
|
+
* credentials: client_id plus the ESO delivery reference for the secret
|
|
142
|
+
* (plan §5.3). Revocation = disabling the client in Keycloak.
|
|
143
|
+
*
|
|
144
|
+
* @generated from message inari.agent.v1.RegisterClusterResponse
|
|
145
|
+
*/
|
|
146
|
+
export class RegisterClusterResponse extends Message<RegisterClusterResponse> {
|
|
147
|
+
/**
|
|
148
|
+
* @generated from field: string cluster_id = 1;
|
|
149
|
+
*/
|
|
150
|
+
clusterId = "";
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Keycloak issuer URL, e.g. https://keycloak.example/realms/inari.
|
|
154
|
+
*
|
|
155
|
+
* @generated from field: string oidc_issuer_url = 2;
|
|
156
|
+
*/
|
|
157
|
+
oidcIssuerUrl = "";
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Per-cluster OIDC client_id, conventionally "cluster-<cluster_id>".
|
|
161
|
+
*
|
|
162
|
+
* @generated from field: string client_id = 3;
|
|
163
|
+
*/
|
|
164
|
+
clientId = "";
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @generated from field: inari.agent.v1.SecretDeliveryReference client_secret_delivery = 4;
|
|
168
|
+
*/
|
|
169
|
+
clientSecretDelivery?: SecretDeliveryReference;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Hint for when issued credentials expire; tokens are short-lived JWTs.
|
|
173
|
+
*
|
|
174
|
+
* @generated from field: google.protobuf.Timestamp credentials_expire_hint = 5;
|
|
175
|
+
*/
|
|
176
|
+
credentialsExpireHint?: Timestamp;
|
|
177
|
+
|
|
178
|
+
constructor(data?: PartialMessage<RegisterClusterResponse>) {
|
|
179
|
+
super();
|
|
180
|
+
proto3.util.initPartial(data, this);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
184
|
+
static readonly typeName = "inari.agent.v1.RegisterClusterResponse";
|
|
185
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
186
|
+
{ no: 1, name: "cluster_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
187
|
+
{ no: 2, name: "oidc_issuer_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
188
|
+
{ no: 3, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
189
|
+
{ no: 4, name: "client_secret_delivery", kind: "message", T: SecretDeliveryReference },
|
|
190
|
+
{ no: 5, name: "credentials_expire_hint", kind: "message", T: Timestamp },
|
|
191
|
+
]);
|
|
192
|
+
|
|
193
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RegisterClusterResponse {
|
|
194
|
+
return new RegisterClusterResponse().fromBinary(bytes, options);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RegisterClusterResponse {
|
|
198
|
+
return new RegisterClusterResponse().fromJson(jsonValue, options);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RegisterClusterResponse {
|
|
202
|
+
return new RegisterClusterResponse().fromJsonString(jsonString, options);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
static equals(a: RegisterClusterResponse | PlainMessage<RegisterClusterResponse> | undefined, b: RegisterClusterResponse | PlainMessage<RegisterClusterResponse> | undefined): boolean {
|
|
206
|
+
return proto3.util.equals(RegisterClusterResponse, a, b);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file inari/plugin/v1/plugin.proto (package inari.plugin.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import { GetCapabilitiesRequest, GetCapabilitiesResponse, GetInfoRequest, GetInfoResponse, HealthCheckRequest, HealthCheckResponse, InvokeRequest, InvokeResponse } from "./plugin_pb.js";
|
|
7
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* PluginContractService is the versioned gRPC surface every plugin serves
|
|
11
|
+
* (platform plan §5.8). Changes are additive within inari.plugin.v1.
|
|
12
|
+
*
|
|
13
|
+
* @generated from service inari.plugin.v1.PluginContractService
|
|
14
|
+
*/
|
|
15
|
+
export const PluginContractService = {
|
|
16
|
+
typeName: "inari.plugin.v1.PluginContractService",
|
|
17
|
+
methods: {
|
|
18
|
+
/**
|
|
19
|
+
* @generated from rpc inari.plugin.v1.PluginContractService.GetInfo
|
|
20
|
+
*/
|
|
21
|
+
getInfo: {
|
|
22
|
+
name: "GetInfo",
|
|
23
|
+
I: GetInfoRequest,
|
|
24
|
+
O: GetInfoResponse,
|
|
25
|
+
kind: MethodKind.Unary,
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* @generated from rpc inari.plugin.v1.PluginContractService.GetCapabilities
|
|
29
|
+
*/
|
|
30
|
+
getCapabilities: {
|
|
31
|
+
name: "GetCapabilities",
|
|
32
|
+
I: GetCapabilitiesRequest,
|
|
33
|
+
O: GetCapabilitiesResponse,
|
|
34
|
+
kind: MethodKind.Unary,
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @generated from rpc inari.plugin.v1.PluginContractService.Invoke
|
|
38
|
+
*/
|
|
39
|
+
invoke: {
|
|
40
|
+
name: "Invoke",
|
|
41
|
+
I: InvokeRequest,
|
|
42
|
+
O: InvokeResponse,
|
|
43
|
+
kind: MethodKind.Unary,
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* @generated from rpc inari.plugin.v1.PluginContractService.HealthCheck
|
|
47
|
+
*/
|
|
48
|
+
healthCheck: {
|
|
49
|
+
name: "HealthCheck",
|
|
50
|
+
I: HealthCheckRequest,
|
|
51
|
+
O: HealthCheckResponse,
|
|
52
|
+
kind: MethodKind.Unary,
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
} as const;
|
|
56
|
+
|