@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,714 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.0 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 type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* ErrorCode classifies plugin errors so hosts and clients can react
|
|
11
|
+
* programmatically. Values mirror common gRPC/HTTP semantics.
|
|
12
|
+
*
|
|
13
|
+
* @generated from enum inari.plugin.v1.ErrorCode
|
|
14
|
+
*/
|
|
15
|
+
export enum ErrorCode {
|
|
16
|
+
/**
|
|
17
|
+
* @generated from enum value: ERROR_CODE_UNSPECIFIED = 0;
|
|
18
|
+
*/
|
|
19
|
+
UNSPECIFIED = 0,
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @generated from enum value: ERROR_CODE_INVALID_ARGUMENT = 1;
|
|
23
|
+
*/
|
|
24
|
+
INVALID_ARGUMENT = 1,
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @generated from enum value: ERROR_CODE_UNAUTHENTICATED = 2;
|
|
28
|
+
*/
|
|
29
|
+
UNAUTHENTICATED = 2,
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @generated from enum value: ERROR_CODE_PERMISSION_DENIED = 3;
|
|
33
|
+
*/
|
|
34
|
+
PERMISSION_DENIED = 3,
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @generated from enum value: ERROR_CODE_NOT_FOUND = 4;
|
|
38
|
+
*/
|
|
39
|
+
NOT_FOUND = 4,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @generated from enum value: ERROR_CODE_FAILED_PRECONDITION = 5;
|
|
43
|
+
*/
|
|
44
|
+
FAILED_PRECONDITION = 5,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @generated from enum value: ERROR_CODE_INTERNAL = 6;
|
|
48
|
+
*/
|
|
49
|
+
INTERNAL = 6,
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @generated from enum value: ERROR_CODE_UNAVAILABLE = 7;
|
|
53
|
+
*/
|
|
54
|
+
UNAVAILABLE = 7,
|
|
55
|
+
}
|
|
56
|
+
// Retrieve enum metadata with: proto3.getEnumType(ErrorCode)
|
|
57
|
+
proto3.util.setEnumType(ErrorCode, "inari.plugin.v1.ErrorCode", [
|
|
58
|
+
{ no: 0, name: "ERROR_CODE_UNSPECIFIED" },
|
|
59
|
+
{ no: 1, name: "ERROR_CODE_INVALID_ARGUMENT" },
|
|
60
|
+
{ no: 2, name: "ERROR_CODE_UNAUTHENTICATED" },
|
|
61
|
+
{ no: 3, name: "ERROR_CODE_PERMISSION_DENIED" },
|
|
62
|
+
{ no: 4, name: "ERROR_CODE_NOT_FOUND" },
|
|
63
|
+
{ no: 5, name: "ERROR_CODE_FAILED_PRECONDITION" },
|
|
64
|
+
{ no: 6, name: "ERROR_CODE_INTERNAL" },
|
|
65
|
+
{ no: 7, name: "ERROR_CODE_UNAVAILABLE" },
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* HandshakeConfig mirrors the hashicorp go-plugin handshake model
|
|
70
|
+
* (platform plan §5.8): a magic cookie and protocol version guard plugin
|
|
71
|
+
* startup before any RPC traffic flows.
|
|
72
|
+
*
|
|
73
|
+
* @generated from message inari.plugin.v1.HandshakeConfig
|
|
74
|
+
*/
|
|
75
|
+
export class HandshakeConfig extends Message<HandshakeConfig> {
|
|
76
|
+
/**
|
|
77
|
+
* @generated from field: string protocol_version = 1;
|
|
78
|
+
*/
|
|
79
|
+
protocolVersion = "";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @generated from field: string magic_cookie_key = 2;
|
|
83
|
+
*/
|
|
84
|
+
magicCookieKey = "";
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @generated from field: string magic_cookie_value = 3;
|
|
88
|
+
*/
|
|
89
|
+
magicCookieValue = "";
|
|
90
|
+
|
|
91
|
+
constructor(data?: PartialMessage<HandshakeConfig>) {
|
|
92
|
+
super();
|
|
93
|
+
proto3.util.initPartial(data, this);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
97
|
+
static readonly typeName = "inari.plugin.v1.HandshakeConfig";
|
|
98
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
99
|
+
{ no: 1, name: "protocol_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
100
|
+
{ no: 2, name: "magic_cookie_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
101
|
+
{ no: 3, name: "magic_cookie_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
102
|
+
]);
|
|
103
|
+
|
|
104
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HandshakeConfig {
|
|
105
|
+
return new HandshakeConfig().fromBinary(bytes, options);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HandshakeConfig {
|
|
109
|
+
return new HandshakeConfig().fromJson(jsonValue, options);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HandshakeConfig {
|
|
113
|
+
return new HandshakeConfig().fromJsonString(jsonString, options);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static equals(a: HandshakeConfig | PlainMessage<HandshakeConfig> | undefined, b: HandshakeConfig | PlainMessage<HandshakeConfig> | undefined): boolean {
|
|
117
|
+
return proto3.util.equals(HandshakeConfig, a, b);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* PluginInfo describes a plugin's identity and the contract version it serves.
|
|
123
|
+
*
|
|
124
|
+
* @generated from message inari.plugin.v1.PluginInfo
|
|
125
|
+
*/
|
|
126
|
+
export class PluginInfo extends Message<PluginInfo> {
|
|
127
|
+
/**
|
|
128
|
+
* @generated from field: string name = 1;
|
|
129
|
+
*/
|
|
130
|
+
name = "";
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @generated from field: string version = 2;
|
|
134
|
+
*/
|
|
135
|
+
version = "";
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Contract version implemented by the plugin, e.g. "inari.plugin.v1".
|
|
139
|
+
*
|
|
140
|
+
* @generated from field: string api_version = 3;
|
|
141
|
+
*/
|
|
142
|
+
apiVersion = "";
|
|
143
|
+
|
|
144
|
+
constructor(data?: PartialMessage<PluginInfo>) {
|
|
145
|
+
super();
|
|
146
|
+
proto3.util.initPartial(data, this);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
150
|
+
static readonly typeName = "inari.plugin.v1.PluginInfo";
|
|
151
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
152
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
153
|
+
{ no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
154
|
+
{ no: 3, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
155
|
+
]);
|
|
156
|
+
|
|
157
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PluginInfo {
|
|
158
|
+
return new PluginInfo().fromBinary(bytes, options);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PluginInfo {
|
|
162
|
+
return new PluginInfo().fromJson(jsonValue, options);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PluginInfo {
|
|
166
|
+
return new PluginInfo().fromJsonString(jsonString, options);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
static equals(a: PluginInfo | PlainMessage<PluginInfo> | undefined, b: PluginInfo | PlainMessage<PluginInfo> | undefined): boolean {
|
|
170
|
+
return proto3.util.equals(PluginInfo, a, b);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @generated from message inari.plugin.v1.GetInfoRequest
|
|
176
|
+
*/
|
|
177
|
+
export class GetInfoRequest extends Message<GetInfoRequest> {
|
|
178
|
+
constructor(data?: PartialMessage<GetInfoRequest>) {
|
|
179
|
+
super();
|
|
180
|
+
proto3.util.initPartial(data, this);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
184
|
+
static readonly typeName = "inari.plugin.v1.GetInfoRequest";
|
|
185
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
186
|
+
]);
|
|
187
|
+
|
|
188
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetInfoRequest {
|
|
189
|
+
return new GetInfoRequest().fromBinary(bytes, options);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetInfoRequest {
|
|
193
|
+
return new GetInfoRequest().fromJson(jsonValue, options);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetInfoRequest {
|
|
197
|
+
return new GetInfoRequest().fromJsonString(jsonString, options);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
static equals(a: GetInfoRequest | PlainMessage<GetInfoRequest> | undefined, b: GetInfoRequest | PlainMessage<GetInfoRequest> | undefined): boolean {
|
|
201
|
+
return proto3.util.equals(GetInfoRequest, a, b);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @generated from message inari.plugin.v1.GetInfoResponse
|
|
207
|
+
*/
|
|
208
|
+
export class GetInfoResponse extends Message<GetInfoResponse> {
|
|
209
|
+
/**
|
|
210
|
+
* @generated from field: inari.plugin.v1.PluginInfo info = 1;
|
|
211
|
+
*/
|
|
212
|
+
info?: PluginInfo;
|
|
213
|
+
|
|
214
|
+
constructor(data?: PartialMessage<GetInfoResponse>) {
|
|
215
|
+
super();
|
|
216
|
+
proto3.util.initPartial(data, this);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
220
|
+
static readonly typeName = "inari.plugin.v1.GetInfoResponse";
|
|
221
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
222
|
+
{ no: 1, name: "info", kind: "message", T: PluginInfo },
|
|
223
|
+
]);
|
|
224
|
+
|
|
225
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetInfoResponse {
|
|
226
|
+
return new GetInfoResponse().fromBinary(bytes, options);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetInfoResponse {
|
|
230
|
+
return new GetInfoResponse().fromJson(jsonValue, options);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetInfoResponse {
|
|
234
|
+
return new GetInfoResponse().fromJsonString(jsonString, options);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
static equals(a: GetInfoResponse | PlainMessage<GetInfoResponse> | undefined, b: GetInfoResponse | PlainMessage<GetInfoResponse> | undefined): boolean {
|
|
238
|
+
return proto3.util.equals(GetInfoResponse, a, b);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* AuthContext carries the authenticated principal and tenant identity from the
|
|
244
|
+
* control plane to the plugin (platform plan §5.8): the control plane
|
|
245
|
+
* authenticates at /api/extensions/<name>/*, enforces RBAC, strips sensitive
|
|
246
|
+
* headers, and forwards this identity. Plugins never see raw credentials.
|
|
247
|
+
*
|
|
248
|
+
* @generated from message inari.plugin.v1.AuthContext
|
|
249
|
+
*/
|
|
250
|
+
export class AuthContext extends Message<AuthContext> {
|
|
251
|
+
/**
|
|
252
|
+
* Stable authenticated principal identifier (subject claim).
|
|
253
|
+
*
|
|
254
|
+
* @generated from field: string principal_id = 1;
|
|
255
|
+
*/
|
|
256
|
+
principalId = "";
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Tenant the call is scoped to (Keycloak Organization id, "org:<id>").
|
|
260
|
+
*
|
|
261
|
+
* @generated from field: string tenant_id = 2;
|
|
262
|
+
*/
|
|
263
|
+
tenantId = "";
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Human-readable principal name for display/audit.
|
|
267
|
+
*
|
|
268
|
+
* @generated from field: string display_name = 3;
|
|
269
|
+
*/
|
|
270
|
+
displayName = "";
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Group memberships (e.g. "tenant-acme/platform-team").
|
|
274
|
+
*
|
|
275
|
+
* @generated from field: repeated string groups = 4;
|
|
276
|
+
*/
|
|
277
|
+
groups: string[] = [];
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Additional verified claims the control plane chooses to forward.
|
|
281
|
+
*
|
|
282
|
+
* @generated from field: map<string, string> claims = 5;
|
|
283
|
+
*/
|
|
284
|
+
claims: { [key: string]: string } = {};
|
|
285
|
+
|
|
286
|
+
constructor(data?: PartialMessage<AuthContext>) {
|
|
287
|
+
super();
|
|
288
|
+
proto3.util.initPartial(data, this);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
292
|
+
static readonly typeName = "inari.plugin.v1.AuthContext";
|
|
293
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
294
|
+
{ no: 1, name: "principal_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
295
|
+
{ no: 2, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
296
|
+
{ no: 3, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
297
|
+
{ no: 4, name: "groups", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
298
|
+
{ no: 5, name: "claims", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
299
|
+
]);
|
|
300
|
+
|
|
301
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AuthContext {
|
|
302
|
+
return new AuthContext().fromBinary(bytes, options);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AuthContext {
|
|
306
|
+
return new AuthContext().fromJson(jsonValue, options);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AuthContext {
|
|
310
|
+
return new AuthContext().fromJsonString(jsonString, options);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
static equals(a: AuthContext | PlainMessage<AuthContext> | undefined, b: AuthContext | PlainMessage<AuthContext> | undefined): boolean {
|
|
314
|
+
return proto3.util.equals(AuthContext, a, b);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Action describes a single invocable capability of a plugin.
|
|
320
|
+
*
|
|
321
|
+
* @generated from message inari.plugin.v1.Action
|
|
322
|
+
*/
|
|
323
|
+
export class Action extends Message<Action> {
|
|
324
|
+
/**
|
|
325
|
+
* @generated from field: string name = 1;
|
|
326
|
+
*/
|
|
327
|
+
name = "";
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @generated from field: string description = 2;
|
|
331
|
+
*/
|
|
332
|
+
description = "";
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Optional JSON Schema (OpenAPI v3 subset) documents for the payload and
|
|
336
|
+
* result, serialized as JSON bytes. Used by the control plane to validate
|
|
337
|
+
* and render forms before dispatching.
|
|
338
|
+
*
|
|
339
|
+
* @generated from field: bytes input_schema = 3;
|
|
340
|
+
*/
|
|
341
|
+
inputSchema = new Uint8Array(0);
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @generated from field: bytes output_schema = 4;
|
|
345
|
+
*/
|
|
346
|
+
outputSchema = new Uint8Array(0);
|
|
347
|
+
|
|
348
|
+
constructor(data?: PartialMessage<Action>) {
|
|
349
|
+
super();
|
|
350
|
+
proto3.util.initPartial(data, this);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
354
|
+
static readonly typeName = "inari.plugin.v1.Action";
|
|
355
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
356
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
357
|
+
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
358
|
+
{ no: 3, name: "input_schema", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
359
|
+
{ no: 4, name: "output_schema", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
360
|
+
]);
|
|
361
|
+
|
|
362
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Action {
|
|
363
|
+
return new Action().fromBinary(bytes, options);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Action {
|
|
367
|
+
return new Action().fromJson(jsonValue, options);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Action {
|
|
371
|
+
return new Action().fromJsonString(jsonString, options);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
static equals(a: Action | PlainMessage<Action> | undefined, b: Action | PlainMessage<Action> | undefined): boolean {
|
|
375
|
+
return proto3.util.equals(Action, a, b);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* @generated from message inari.plugin.v1.GetCapabilitiesRequest
|
|
381
|
+
*/
|
|
382
|
+
export class GetCapabilitiesRequest extends Message<GetCapabilitiesRequest> {
|
|
383
|
+
constructor(data?: PartialMessage<GetCapabilitiesRequest>) {
|
|
384
|
+
super();
|
|
385
|
+
proto3.util.initPartial(data, this);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
389
|
+
static readonly typeName = "inari.plugin.v1.GetCapabilitiesRequest";
|
|
390
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
391
|
+
]);
|
|
392
|
+
|
|
393
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetCapabilitiesRequest {
|
|
394
|
+
return new GetCapabilitiesRequest().fromBinary(bytes, options);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetCapabilitiesRequest {
|
|
398
|
+
return new GetCapabilitiesRequest().fromJson(jsonValue, options);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetCapabilitiesRequest {
|
|
402
|
+
return new GetCapabilitiesRequest().fromJsonString(jsonString, options);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
static equals(a: GetCapabilitiesRequest | PlainMessage<GetCapabilitiesRequest> | undefined, b: GetCapabilitiesRequest | PlainMessage<GetCapabilitiesRequest> | undefined): boolean {
|
|
406
|
+
return proto3.util.equals(GetCapabilitiesRequest, a, b);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @generated from message inari.plugin.v1.GetCapabilitiesResponse
|
|
412
|
+
*/
|
|
413
|
+
export class GetCapabilitiesResponse extends Message<GetCapabilitiesResponse> {
|
|
414
|
+
/**
|
|
415
|
+
* @generated from field: repeated inari.plugin.v1.Action actions = 1;
|
|
416
|
+
*/
|
|
417
|
+
actions: Action[] = [];
|
|
418
|
+
|
|
419
|
+
constructor(data?: PartialMessage<GetCapabilitiesResponse>) {
|
|
420
|
+
super();
|
|
421
|
+
proto3.util.initPartial(data, this);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
425
|
+
static readonly typeName = "inari.plugin.v1.GetCapabilitiesResponse";
|
|
426
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
427
|
+
{ no: 1, name: "actions", kind: "message", T: Action, repeated: true },
|
|
428
|
+
]);
|
|
429
|
+
|
|
430
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetCapabilitiesResponse {
|
|
431
|
+
return new GetCapabilitiesResponse().fromBinary(bytes, options);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetCapabilitiesResponse {
|
|
435
|
+
return new GetCapabilitiesResponse().fromJson(jsonValue, options);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetCapabilitiesResponse {
|
|
439
|
+
return new GetCapabilitiesResponse().fromJsonString(jsonString, options);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
static equals(a: GetCapabilitiesResponse | PlainMessage<GetCapabilitiesResponse> | undefined, b: GetCapabilitiesResponse | PlainMessage<GetCapabilitiesResponse> | undefined): boolean {
|
|
443
|
+
return proto3.util.equals(GetCapabilitiesResponse, a, b);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* PluginError is the structured error carried in an InvokeResponse. Handlers
|
|
449
|
+
* return domain errors; the SDK maps them to a PluginError on the wire.
|
|
450
|
+
*
|
|
451
|
+
* @generated from message inari.plugin.v1.PluginError
|
|
452
|
+
*/
|
|
453
|
+
export class PluginError extends Message<PluginError> {
|
|
454
|
+
/**
|
|
455
|
+
* @generated from field: inari.plugin.v1.ErrorCode code = 1;
|
|
456
|
+
*/
|
|
457
|
+
code = ErrorCode.UNSPECIFIED;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* @generated from field: string message = 2;
|
|
461
|
+
*/
|
|
462
|
+
message = "";
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Optional machine-readable details (e.g. field violations).
|
|
466
|
+
*
|
|
467
|
+
* @generated from field: map<string, string> details = 3;
|
|
468
|
+
*/
|
|
469
|
+
details: { [key: string]: string } = {};
|
|
470
|
+
|
|
471
|
+
constructor(data?: PartialMessage<PluginError>) {
|
|
472
|
+
super();
|
|
473
|
+
proto3.util.initPartial(data, this);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
477
|
+
static readonly typeName = "inari.plugin.v1.PluginError";
|
|
478
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
479
|
+
{ no: 1, name: "code", kind: "enum", T: proto3.getEnumType(ErrorCode) },
|
|
480
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
481
|
+
{ no: 3, name: "details", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
482
|
+
]);
|
|
483
|
+
|
|
484
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PluginError {
|
|
485
|
+
return new PluginError().fromBinary(bytes, options);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PluginError {
|
|
489
|
+
return new PluginError().fromJson(jsonValue, options);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PluginError {
|
|
493
|
+
return new PluginError().fromJsonString(jsonString, options);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
static equals(a: PluginError | PlainMessage<PluginError> | undefined, b: PluginError | PlainMessage<PluginError> | undefined): boolean {
|
|
497
|
+
return proto3.util.equals(PluginError, a, b);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* InvokeRequest is the request envelope for a single action call.
|
|
503
|
+
*
|
|
504
|
+
* @generated from message inari.plugin.v1.InvokeRequest
|
|
505
|
+
*/
|
|
506
|
+
export class InvokeRequest extends Message<InvokeRequest> {
|
|
507
|
+
/**
|
|
508
|
+
* Name of the action to invoke (from GetCapabilities).
|
|
509
|
+
*
|
|
510
|
+
* @generated from field: string action = 1;
|
|
511
|
+
*/
|
|
512
|
+
action = "";
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Authenticated identity forwarded by the control plane.
|
|
516
|
+
*
|
|
517
|
+
* @generated from field: inari.plugin.v1.AuthContext auth_context = 2;
|
|
518
|
+
*/
|
|
519
|
+
authContext?: AuthContext;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Action payload, JSON-encoded per the action's input schema.
|
|
523
|
+
*
|
|
524
|
+
* @generated from field: bytes payload = 3;
|
|
525
|
+
*/
|
|
526
|
+
payload = new Uint8Array(0);
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Host-assigned idempotency/correlation id; echoed in logs and audit.
|
|
530
|
+
*
|
|
531
|
+
* @generated from field: string request_id = 4;
|
|
532
|
+
*/
|
|
533
|
+
requestId = "";
|
|
534
|
+
|
|
535
|
+
constructor(data?: PartialMessage<InvokeRequest>) {
|
|
536
|
+
super();
|
|
537
|
+
proto3.util.initPartial(data, this);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
541
|
+
static readonly typeName = "inari.plugin.v1.InvokeRequest";
|
|
542
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
543
|
+
{ no: 1, name: "action", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
544
|
+
{ no: 2, name: "auth_context", kind: "message", T: AuthContext },
|
|
545
|
+
{ no: 3, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
546
|
+
{ no: 4, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
547
|
+
]);
|
|
548
|
+
|
|
549
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InvokeRequest {
|
|
550
|
+
return new InvokeRequest().fromBinary(bytes, options);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InvokeRequest {
|
|
554
|
+
return new InvokeRequest().fromJson(jsonValue, options);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InvokeRequest {
|
|
558
|
+
return new InvokeRequest().fromJsonString(jsonString, options);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
static equals(a: InvokeRequest | PlainMessage<InvokeRequest> | undefined, b: InvokeRequest | PlainMessage<InvokeRequest> | undefined): boolean {
|
|
562
|
+
return proto3.util.equals(InvokeRequest, a, b);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* InvokeResponse is the response envelope: exactly one of result or error.
|
|
568
|
+
*
|
|
569
|
+
* @generated from message inari.plugin.v1.InvokeResponse
|
|
570
|
+
*/
|
|
571
|
+
export class InvokeResponse extends Message<InvokeResponse> {
|
|
572
|
+
/**
|
|
573
|
+
* Action result, JSON-encoded per the action's output schema.
|
|
574
|
+
*
|
|
575
|
+
* @generated from field: bytes result = 1;
|
|
576
|
+
*/
|
|
577
|
+
result = new Uint8Array(0);
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* @generated from field: inari.plugin.v1.PluginError error = 2;
|
|
581
|
+
*/
|
|
582
|
+
error?: PluginError;
|
|
583
|
+
|
|
584
|
+
constructor(data?: PartialMessage<InvokeResponse>) {
|
|
585
|
+
super();
|
|
586
|
+
proto3.util.initPartial(data, this);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
590
|
+
static readonly typeName = "inari.plugin.v1.InvokeResponse";
|
|
591
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
592
|
+
{ no: 1, name: "result", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
593
|
+
{ no: 2, name: "error", kind: "message", T: PluginError },
|
|
594
|
+
]);
|
|
595
|
+
|
|
596
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InvokeResponse {
|
|
597
|
+
return new InvokeResponse().fromBinary(bytes, options);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InvokeResponse {
|
|
601
|
+
return new InvokeResponse().fromJson(jsonValue, options);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InvokeResponse {
|
|
605
|
+
return new InvokeResponse().fromJsonString(jsonString, options);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
static equals(a: InvokeResponse | PlainMessage<InvokeResponse> | undefined, b: InvokeResponse | PlainMessage<InvokeResponse> | undefined): boolean {
|
|
609
|
+
return proto3.util.equals(InvokeResponse, a, b);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* @generated from message inari.plugin.v1.HealthCheckRequest
|
|
615
|
+
*/
|
|
616
|
+
export class HealthCheckRequest extends Message<HealthCheckRequest> {
|
|
617
|
+
constructor(data?: PartialMessage<HealthCheckRequest>) {
|
|
618
|
+
super();
|
|
619
|
+
proto3.util.initPartial(data, this);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
623
|
+
static readonly typeName = "inari.plugin.v1.HealthCheckRequest";
|
|
624
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
625
|
+
]);
|
|
626
|
+
|
|
627
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HealthCheckRequest {
|
|
628
|
+
return new HealthCheckRequest().fromBinary(bytes, options);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HealthCheckRequest {
|
|
632
|
+
return new HealthCheckRequest().fromJson(jsonValue, options);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HealthCheckRequest {
|
|
636
|
+
return new HealthCheckRequest().fromJsonString(jsonString, options);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
static equals(a: HealthCheckRequest | PlainMessage<HealthCheckRequest> | undefined, b: HealthCheckRequest | PlainMessage<HealthCheckRequest> | undefined): boolean {
|
|
640
|
+
return proto3.util.equals(HealthCheckRequest, a, b);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @generated from message inari.plugin.v1.HealthCheckResponse
|
|
646
|
+
*/
|
|
647
|
+
export class HealthCheckResponse extends Message<HealthCheckResponse> {
|
|
648
|
+
/**
|
|
649
|
+
* @generated from field: inari.plugin.v1.HealthCheckResponse.ServingStatus status = 1;
|
|
650
|
+
*/
|
|
651
|
+
status = HealthCheckResponse_ServingStatus.UNSPECIFIED;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Optional human-readable detail (e.g. degraded dependency).
|
|
655
|
+
*
|
|
656
|
+
* @generated from field: string message = 2;
|
|
657
|
+
*/
|
|
658
|
+
message = "";
|
|
659
|
+
|
|
660
|
+
constructor(data?: PartialMessage<HealthCheckResponse>) {
|
|
661
|
+
super();
|
|
662
|
+
proto3.util.initPartial(data, this);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
666
|
+
static readonly typeName = "inari.plugin.v1.HealthCheckResponse";
|
|
667
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
668
|
+
{ no: 1, name: "status", kind: "enum", T: proto3.getEnumType(HealthCheckResponse_ServingStatus) },
|
|
669
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
670
|
+
]);
|
|
671
|
+
|
|
672
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HealthCheckResponse {
|
|
673
|
+
return new HealthCheckResponse().fromBinary(bytes, options);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HealthCheckResponse {
|
|
677
|
+
return new HealthCheckResponse().fromJson(jsonValue, options);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HealthCheckResponse {
|
|
681
|
+
return new HealthCheckResponse().fromJsonString(jsonString, options);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
static equals(a: HealthCheckResponse | PlainMessage<HealthCheckResponse> | undefined, b: HealthCheckResponse | PlainMessage<HealthCheckResponse> | undefined): boolean {
|
|
685
|
+
return proto3.util.equals(HealthCheckResponse, a, b);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* @generated from enum inari.plugin.v1.HealthCheckResponse.ServingStatus
|
|
691
|
+
*/
|
|
692
|
+
export enum HealthCheckResponse_ServingStatus {
|
|
693
|
+
/**
|
|
694
|
+
* @generated from enum value: SERVING_STATUS_UNSPECIFIED = 0;
|
|
695
|
+
*/
|
|
696
|
+
UNSPECIFIED = 0,
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* @generated from enum value: SERVING_STATUS_SERVING = 1;
|
|
700
|
+
*/
|
|
701
|
+
SERVING = 1,
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @generated from enum value: SERVING_STATUS_NOT_SERVING = 2;
|
|
705
|
+
*/
|
|
706
|
+
NOT_SERVING = 2,
|
|
707
|
+
}
|
|
708
|
+
// Retrieve enum metadata with: proto3.getEnumType(HealthCheckResponse_ServingStatus)
|
|
709
|
+
proto3.util.setEnumType(HealthCheckResponse_ServingStatus, "inari.plugin.v1.HealthCheckResponse.ServingStatus", [
|
|
710
|
+
{ no: 0, name: "SERVING_STATUS_UNSPECIFIED" },
|
|
711
|
+
{ no: 1, name: "SERVING_STATUS_SERVING" },
|
|
712
|
+
{ no: 2, name: "SERVING_STATUS_NOT_SERVING" },
|
|
713
|
+
]);
|
|
714
|
+
|