@7k-inari/api-client 0.6.0 → 0.7.0-ace8d88

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.
@@ -1,10 +1,18 @@
1
- // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=ts"
2
2
  // @generated from file inari/agent/v1/registration.proto (package inari.agent.v1, syntax proto3)
3
3
  /* eslint-disable */
4
- // @ts-nocheck
5
4
 
6
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7
- import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { Message } from "@bufbuild/protobuf";
10
+
11
+ /**
12
+ * Describes the file inari/agent/v1/registration.proto.
13
+ */
14
+ export const file_inari_agent_v1_registration: GenFile = /*@__PURE__*/
15
+ fileDesc("CiFpbmFyaS9hZ2VudC92MS9yZWdpc3RyYXRpb24ucHJvdG8SDmluYXJpLmFnZW50LnYxIpECChZSZWdpc3RlckNsdXN0ZXJSZXF1ZXN0EhoKEnJlZ2lzdHJhdGlvbl90b2tlbhgBIAEoCRIVCg1hZ2VudF92ZXJzaW9uGAIgASgJEhgKEGNvbnRyYWN0X3ZlcnNpb24YAyABKAkSUQoOY2x1c3Rlcl9sYWJlbHMYBCADKAsyOS5pbmFyaS5hZ2VudC52MS5SZWdpc3RlckNsdXN0ZXJSZXF1ZXN0LkNsdXN0ZXJMYWJlbHNFbnRyeRIaChJrdWJlcm5ldGVzX3ZlcnNpb24YBSABKAkaNAoSQ2x1c3RlckxhYmVsc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAFKBQhkEMgBIn0KF1NlY3JldERlbGl2ZXJ5UmVmZXJlbmNlEhgKEGVzb19zZWNyZXRfc3RvcmUYASABKAkSEwoLc2VjcmV0X25hbWUYAiABKAkSGAoQc2VjcmV0X25hbWVzcGFjZRgDIAEoCRISCgpzZWNyZXRfa2V5GAQgASgJSgUIZBDIASLQAgoXUmVnaXN0ZXJDbHVzdGVyUmVzcG9uc2USEgoKY2x1c3Rlcl9pZBgBIAEoCRIXCg9vaWRjX2lzc3Vlcl91cmwYAiABKAkSEQoJY2xpZW50X2lkGAMgASgJEkcKFmNsaWVudF9zZWNyZXRfZGVsaXZlcnkYBCABKAsyJy5pbmFyaS5hZ2VudC52MS5TZWNyZXREZWxpdmVyeVJlZmVyZW5jZRI7ChdjcmVkZW50aWFsc19leHBpcmVfaGludBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASGAoQdHVubmVsX2NsaWVudF9pZBgGIAEoCRJOCh10dW5uZWxfY2xpZW50X3NlY3JldF9kZWxpdmVyeRgHIAEoCzInLmluYXJpLmFnZW50LnYxLlNlY3JldERlbGl2ZXJ5UmVmZXJlbmNlSgUIZBDIATJ5ChNSZWdpc3RyYXRpb25TZXJ2aWNlEmIKD1JlZ2lzdGVyQ2x1c3RlchImLmluYXJpLmFnZW50LnYxLlJlZ2lzdGVyQ2x1c3RlclJlcXVlc3QaJy5pbmFyaS5hZ2VudC52MS5SZWdpc3RlckNsdXN0ZXJSZXNwb25zZUI9WjtnaXRodWIuY29tLzdLLUluYXJpL2luYXJpLWFwaS9nZW4vZ28vaW5hcmkvYWdlbnQvdjE7YWdlbnR2MWIGcHJvdG8z", [file_google_protobuf_timestamp]);
8
16
 
9
17
  /**
10
18
  * RegisterClusterRequest exchanges a one-time, TTL'd registration token for
@@ -13,23 +21,23 @@ import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
13
21
  *
14
22
  * @generated from message inari.agent.v1.RegisterClusterRequest
15
23
  */
16
- export class RegisterClusterRequest extends Message<RegisterClusterRequest> {
24
+ export type RegisterClusterRequest = Message<"inari.agent.v1.RegisterClusterRequest"> & {
17
25
  /**
18
26
  * @generated from field: string registration_token = 1;
19
27
  */
20
- registrationToken = "";
28
+ registrationToken: string;
21
29
 
22
30
  /**
23
31
  * @generated from field: string agent_version = 2;
24
32
  */
25
- agentVersion = "";
33
+ agentVersion: string;
26
34
 
27
35
  /**
28
36
  * Contract package this agent implements, e.g. "inari.agent.v1".
29
37
  *
30
38
  * @generated from field: string contract_version = 3;
31
39
  */
32
- contractVersion = "";
40
+ contractVersion: string;
33
41
 
34
42
  /**
35
43
  * Cluster labels reported at registration (env, region, ...); feeds
@@ -37,44 +45,20 @@ export class RegisterClusterRequest extends Message<RegisterClusterRequest> {
37
45
  *
38
46
  * @generated from field: map<string, string> cluster_labels = 4;
39
47
  */
40
- clusterLabels: { [key: string]: string } = {};
48
+ clusterLabels: { [key: string]: string };
41
49
 
42
50
  /**
43
51
  * @generated from field: string kubernetes_version = 5;
44
52
  */
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
- ]);
53
+ kubernetesVersion: string;
54
+ };
61
55
 
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
- }
56
+ /**
57
+ * Describes the message inari.agent.v1.RegisterClusterRequest.
58
+ * Use `create(RegisterClusterRequestSchema)` to create a new message.
59
+ */
60
+ export const RegisterClusterRequestSchema: GenMessage<RegisterClusterRequest> = /*@__PURE__*/
61
+ messageDesc(file_inari_agent_v1_registration, 0);
78
62
 
79
63
  /**
80
64
  * SecretDeliveryReference points at the in-cluster location where the OIDC
@@ -84,57 +68,34 @@ export class RegisterClusterRequest extends Message<RegisterClusterRequest> {
84
68
  *
85
69
  * @generated from message inari.agent.v1.SecretDeliveryReference
86
70
  */
87
- export class SecretDeliveryReference extends Message<SecretDeliveryReference> {
71
+ export type SecretDeliveryReference = Message<"inari.agent.v1.SecretDeliveryReference"> & {
88
72
  /**
89
73
  * @generated from field: string eso_secret_store = 1;
90
74
  */
91
- esoSecretStore = "";
75
+ esoSecretStore: string;
92
76
 
93
77
  /**
94
78
  * @generated from field: string secret_name = 2;
95
79
  */
96
- secretName = "";
80
+ secretName: string;
97
81
 
98
82
  /**
99
83
  * @generated from field: string secret_namespace = 3;
100
84
  */
101
- secretNamespace = "";
85
+ secretNamespace: string;
102
86
 
103
87
  /**
104
88
  * @generated from field: string secret_key = 4;
105
89
  */
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
- }
90
+ secretKey: string;
91
+ };
125
92
 
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
- }
93
+ /**
94
+ * Describes the message inari.agent.v1.SecretDeliveryReference.
95
+ * Use `create(SecretDeliveryReferenceSchema)` to create a new message.
96
+ */
97
+ export const SecretDeliveryReferenceSchema: GenMessage<SecretDeliveryReference> = /*@__PURE__*/
98
+ messageDesc(file_inari_agent_v1_registration, 1);
138
99
 
139
100
  /**
140
101
  * RegisterClusterResponse returns the per-cluster Keycloak OIDC client
@@ -143,67 +104,79 @@ export class SecretDeliveryReference extends Message<SecretDeliveryReference> {
143
104
  *
144
105
  * @generated from message inari.agent.v1.RegisterClusterResponse
145
106
  */
146
- export class RegisterClusterResponse extends Message<RegisterClusterResponse> {
107
+ export type RegisterClusterResponse = Message<"inari.agent.v1.RegisterClusterResponse"> & {
147
108
  /**
148
109
  * @generated from field: string cluster_id = 1;
149
110
  */
150
- clusterId = "";
111
+ clusterId: string;
151
112
 
152
113
  /**
153
114
  * Keycloak issuer URL, e.g. https://keycloak.example/realms/inari.
154
115
  *
155
116
  * @generated from field: string oidc_issuer_url = 2;
156
117
  */
157
- oidcIssuerUrl = "";
118
+ oidcIssuerUrl: string;
158
119
 
159
120
  /**
160
121
  * Per-cluster OIDC client_id, conventionally "cluster-<cluster_id>".
161
122
  *
162
123
  * @generated from field: string client_id = 3;
163
124
  */
164
- clientId = "";
125
+ clientId: string;
165
126
 
166
127
  /**
167
128
  * @generated from field: inari.agent.v1.SecretDeliveryReference client_secret_delivery = 4;
168
129
  */
169
- clientSecretDelivery?: SecretDeliveryReference;
130
+ clientSecretDelivery?: SecretDeliveryReference | undefined;
170
131
 
171
132
  /**
172
133
  * Hint for when issued credentials expire; tokens are short-lived JWTs.
173
134
  *
174
135
  * @generated from field: google.protobuf.Timestamp credentials_expire_hint = 5;
175
136
  */
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
- }
137
+ credentialsExpireHint?: Timestamp | undefined;
138
+
139
+ /**
140
+ * Second OIDC client credential pair for the kubectl gateway tunnel agent
141
+ * (plan §3.2): client-credentials only, client "tunnel-<cluster_id>",
142
+ * audience inari-kubeproxy, hardcoded cluster_id claim. Delivered via the
143
+ * same ESO secret-delivery mechanism as client_secret_delivery. Additive:
144
+ * old servers simply don't return it (tunnel agent stays unconfigured);
145
+ * old agents ignore it.
146
+ *
147
+ * @generated from field: string tunnel_client_id = 6;
148
+ */
149
+ tunnelClientId: string;
150
+
151
+ /**
152
+ * @generated from field: inari.agent.v1.SecretDeliveryReference tunnel_client_secret_delivery = 7;
153
+ */
154
+ tunnelClientSecretDelivery?: SecretDeliveryReference | undefined;
155
+ };
156
+
157
+ /**
158
+ * Describes the message inari.agent.v1.RegisterClusterResponse.
159
+ * Use `create(RegisterClusterResponseSchema)` to create a new message.
160
+ */
161
+ export const RegisterClusterResponseSchema: GenMessage<RegisterClusterResponse> = /*@__PURE__*/
162
+ messageDesc(file_inari_agent_v1_registration, 2);
163
+
164
+ /**
165
+ * RegistrationService is the one-time bootstrap RPC an agent calls before it
166
+ * can open the EventStream (plan §5.3). It is unauthenticated except for the
167
+ * registration token itself.
168
+ *
169
+ * @generated from service inari.agent.v1.RegistrationService
170
+ */
171
+ export const RegistrationService: GenService<{
172
+ /**
173
+ * @generated from rpc inari.agent.v1.RegistrationService.RegisterCluster
174
+ */
175
+ registerCluster: {
176
+ methodKind: "unary";
177
+ input: typeof RegisterClusterRequestSchema;
178
+ output: typeof RegisterClusterResponseSchema;
179
+ },
180
+ }> = /*@__PURE__*/
181
+ serviceDesc(file_inari_agent_v1_registration, 0);
209
182