@alienplatform/bindings 1.0.0 → 2.0.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/LICENSE.md +105 -0
- package/README.md +59 -0
- package/dist/errors.d.ts +56 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/factories.d.ts +26 -0
- package/dist/factories.d.ts.map +1 -0
- package/dist/index.d.ts +19 -1768
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -44772
- package/dist/loader.d.ts +171 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +3712 -0
- package/dist/native.d.ts +41 -0
- package/dist/native.d.ts.map +1 -0
- package/dist/native.js +46 -0
- package/dist/types.d.ts +150 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +39 -21
- package/AGENTS.md +0 -70
- package/dist/index.js.map +0 -1
- package/scripts/generate-proto.sh +0 -46
- package/src/bindings/AGENTS.md +0 -105
- package/src/bindings/artifact-registry.ts +0 -314
- package/src/bindings/build.ts +0 -195
- package/src/bindings/function.ts +0 -164
- package/src/bindings/index.ts +0 -12
- package/src/bindings/kv.ts +0 -240
- package/src/bindings/queue.ts +0 -191
- package/src/bindings/service-account.ts +0 -113
- package/src/bindings/storage.ts +0 -535
- package/src/bindings/vault.ts +0 -133
- package/src/channel.ts +0 -94
- package/src/commands.ts +0 -76
- package/src/context.ts +0 -368
- package/src/errors.ts +0 -259
- package/src/events.ts +0 -463
- package/src/generated/artifact_registry.ts +0 -1934
- package/src/generated/build.ts +0 -1263
- package/src/generated/container.ts +0 -485
- package/src/generated/control.ts +0 -1574
- package/src/generated/function.ts +0 -741
- package/src/generated/google/protobuf/duration.ts +0 -196
- package/src/generated/google/protobuf/timestamp.ts +0 -225
- package/src/generated/kv.ts +0 -1137
- package/src/generated/queue.ts +0 -729
- package/src/generated/service_account.ts +0 -766
- package/src/generated/storage.ts +0 -3653
- package/src/generated/vault.ts +0 -519
- package/src/generated/wait_until.ts +0 -781
- package/src/global.ts +0 -316
- package/src/grpc-utils.ts +0 -159
- package/src/index.ts +0 -156
- package/src/types.ts +0 -384
- package/src/wait-until.ts +0 -257
- package/tsconfig.json +0 -8
- package/tsdown.config.ts +0 -14
|
@@ -1,766 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.10.1
|
|
4
|
-
// protoc v5.29.3
|
|
5
|
-
// source: service_account.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
-
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
-
|
|
11
|
-
export const protobufPackage = "alien_bindings.service_account";
|
|
12
|
-
|
|
13
|
-
/** Messages for GetInfo */
|
|
14
|
-
export interface GetInfoRequest {
|
|
15
|
-
/** Name of the service account binding to use */
|
|
16
|
-
bindingName: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface AwsServiceAccountInfo {
|
|
20
|
-
/** The IAM role name */
|
|
21
|
-
roleName: string;
|
|
22
|
-
/** The IAM role ARN (for AssumeRole) */
|
|
23
|
-
roleArn: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface GcpServiceAccountInfo {
|
|
27
|
-
/** The service account email (for impersonation) */
|
|
28
|
-
email: string;
|
|
29
|
-
/** The service account unique ID */
|
|
30
|
-
uniqueId: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface AzureServiceAccountInfo {
|
|
34
|
-
/** The managed identity client ID (for authentication) */
|
|
35
|
-
clientId: string;
|
|
36
|
-
/** The managed identity resource ID (ARM ID) */
|
|
37
|
-
resourceId: string;
|
|
38
|
-
/** The managed identity principal ID */
|
|
39
|
-
principalId: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ServiceAccountInfo {
|
|
43
|
-
aws?: AwsServiceAccountInfo | undefined;
|
|
44
|
-
gcp?: GcpServiceAccountInfo | undefined;
|
|
45
|
-
azure?: AzureServiceAccountInfo | undefined;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface GetInfoResponse {
|
|
49
|
-
/** Platform-specific service account information */
|
|
50
|
-
info: ServiceAccountInfo | undefined;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** Messages for Impersonate */
|
|
54
|
-
export interface ImpersonateRequest {
|
|
55
|
-
/** Name of the service account binding to use */
|
|
56
|
-
bindingName: string;
|
|
57
|
-
/** Optional session name (AWS only) */
|
|
58
|
-
sessionName?:
|
|
59
|
-
| string
|
|
60
|
-
| undefined;
|
|
61
|
-
/** Optional session duration in seconds */
|
|
62
|
-
durationSeconds?:
|
|
63
|
-
| number
|
|
64
|
-
| undefined;
|
|
65
|
-
/** Optional scopes (GCP only) */
|
|
66
|
-
scopes: string[];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface ImpersonateResponse {
|
|
70
|
-
/** Serialized ClientConfig (JSON string) */
|
|
71
|
-
clientConfigJson: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function createBaseGetInfoRequest(): GetInfoRequest {
|
|
75
|
-
return { bindingName: "" };
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export const GetInfoRequest: MessageFns<GetInfoRequest> = {
|
|
79
|
-
encode(message: GetInfoRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
80
|
-
if (message.bindingName !== "") {
|
|
81
|
-
writer.uint32(10).string(message.bindingName);
|
|
82
|
-
}
|
|
83
|
-
return writer;
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GetInfoRequest {
|
|
87
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
88
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
89
|
-
const message = createBaseGetInfoRequest();
|
|
90
|
-
while (reader.pos < end) {
|
|
91
|
-
const tag = reader.uint32();
|
|
92
|
-
switch (tag >>> 3) {
|
|
93
|
-
case 1: {
|
|
94
|
-
if (tag !== 10) {
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
message.bindingName = reader.string();
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
reader.skip(tag & 7);
|
|
106
|
-
}
|
|
107
|
-
return message;
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
fromJSON(object: any): GetInfoRequest {
|
|
111
|
-
return { bindingName: isSet(object.bindingName) ? globalThis.String(object.bindingName) : "" };
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
toJSON(message: GetInfoRequest): unknown {
|
|
115
|
-
const obj: any = {};
|
|
116
|
-
if (message.bindingName !== "") {
|
|
117
|
-
obj.bindingName = message.bindingName;
|
|
118
|
-
}
|
|
119
|
-
return obj;
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
create(base?: DeepPartial<GetInfoRequest>): GetInfoRequest {
|
|
123
|
-
return GetInfoRequest.fromPartial(base ?? {});
|
|
124
|
-
},
|
|
125
|
-
fromPartial(object: DeepPartial<GetInfoRequest>): GetInfoRequest {
|
|
126
|
-
const message = createBaseGetInfoRequest();
|
|
127
|
-
message.bindingName = object.bindingName ?? "";
|
|
128
|
-
return message;
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
function createBaseAwsServiceAccountInfo(): AwsServiceAccountInfo {
|
|
133
|
-
return { roleName: "", roleArn: "" };
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export const AwsServiceAccountInfo: MessageFns<AwsServiceAccountInfo> = {
|
|
137
|
-
encode(message: AwsServiceAccountInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
138
|
-
if (message.roleName !== "") {
|
|
139
|
-
writer.uint32(10).string(message.roleName);
|
|
140
|
-
}
|
|
141
|
-
if (message.roleArn !== "") {
|
|
142
|
-
writer.uint32(18).string(message.roleArn);
|
|
143
|
-
}
|
|
144
|
-
return writer;
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AwsServiceAccountInfo {
|
|
148
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
149
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
150
|
-
const message = createBaseAwsServiceAccountInfo();
|
|
151
|
-
while (reader.pos < end) {
|
|
152
|
-
const tag = reader.uint32();
|
|
153
|
-
switch (tag >>> 3) {
|
|
154
|
-
case 1: {
|
|
155
|
-
if (tag !== 10) {
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
message.roleName = reader.string();
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
case 2: {
|
|
163
|
-
if (tag !== 18) {
|
|
164
|
-
break;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
message.roleArn = reader.string();
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
reader.skip(tag & 7);
|
|
175
|
-
}
|
|
176
|
-
return message;
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
fromJSON(object: any): AwsServiceAccountInfo {
|
|
180
|
-
return {
|
|
181
|
-
roleName: isSet(object.roleName) ? globalThis.String(object.roleName) : "",
|
|
182
|
-
roleArn: isSet(object.roleArn) ? globalThis.String(object.roleArn) : "",
|
|
183
|
-
};
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
toJSON(message: AwsServiceAccountInfo): unknown {
|
|
187
|
-
const obj: any = {};
|
|
188
|
-
if (message.roleName !== "") {
|
|
189
|
-
obj.roleName = message.roleName;
|
|
190
|
-
}
|
|
191
|
-
if (message.roleArn !== "") {
|
|
192
|
-
obj.roleArn = message.roleArn;
|
|
193
|
-
}
|
|
194
|
-
return obj;
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
create(base?: DeepPartial<AwsServiceAccountInfo>): AwsServiceAccountInfo {
|
|
198
|
-
return AwsServiceAccountInfo.fromPartial(base ?? {});
|
|
199
|
-
},
|
|
200
|
-
fromPartial(object: DeepPartial<AwsServiceAccountInfo>): AwsServiceAccountInfo {
|
|
201
|
-
const message = createBaseAwsServiceAccountInfo();
|
|
202
|
-
message.roleName = object.roleName ?? "";
|
|
203
|
-
message.roleArn = object.roleArn ?? "";
|
|
204
|
-
return message;
|
|
205
|
-
},
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
function createBaseGcpServiceAccountInfo(): GcpServiceAccountInfo {
|
|
209
|
-
return { email: "", uniqueId: "" };
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export const GcpServiceAccountInfo: MessageFns<GcpServiceAccountInfo> = {
|
|
213
|
-
encode(message: GcpServiceAccountInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
214
|
-
if (message.email !== "") {
|
|
215
|
-
writer.uint32(10).string(message.email);
|
|
216
|
-
}
|
|
217
|
-
if (message.uniqueId !== "") {
|
|
218
|
-
writer.uint32(18).string(message.uniqueId);
|
|
219
|
-
}
|
|
220
|
-
return writer;
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GcpServiceAccountInfo {
|
|
224
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
225
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
226
|
-
const message = createBaseGcpServiceAccountInfo();
|
|
227
|
-
while (reader.pos < end) {
|
|
228
|
-
const tag = reader.uint32();
|
|
229
|
-
switch (tag >>> 3) {
|
|
230
|
-
case 1: {
|
|
231
|
-
if (tag !== 10) {
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
message.email = reader.string();
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
238
|
-
case 2: {
|
|
239
|
-
if (tag !== 18) {
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
message.uniqueId = reader.string();
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
reader.skip(tag & 7);
|
|
251
|
-
}
|
|
252
|
-
return message;
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
fromJSON(object: any): GcpServiceAccountInfo {
|
|
256
|
-
return {
|
|
257
|
-
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
258
|
-
uniqueId: isSet(object.uniqueId) ? globalThis.String(object.uniqueId) : "",
|
|
259
|
-
};
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
toJSON(message: GcpServiceAccountInfo): unknown {
|
|
263
|
-
const obj: any = {};
|
|
264
|
-
if (message.email !== "") {
|
|
265
|
-
obj.email = message.email;
|
|
266
|
-
}
|
|
267
|
-
if (message.uniqueId !== "") {
|
|
268
|
-
obj.uniqueId = message.uniqueId;
|
|
269
|
-
}
|
|
270
|
-
return obj;
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
create(base?: DeepPartial<GcpServiceAccountInfo>): GcpServiceAccountInfo {
|
|
274
|
-
return GcpServiceAccountInfo.fromPartial(base ?? {});
|
|
275
|
-
},
|
|
276
|
-
fromPartial(object: DeepPartial<GcpServiceAccountInfo>): GcpServiceAccountInfo {
|
|
277
|
-
const message = createBaseGcpServiceAccountInfo();
|
|
278
|
-
message.email = object.email ?? "";
|
|
279
|
-
message.uniqueId = object.uniqueId ?? "";
|
|
280
|
-
return message;
|
|
281
|
-
},
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
function createBaseAzureServiceAccountInfo(): AzureServiceAccountInfo {
|
|
285
|
-
return { clientId: "", resourceId: "", principalId: "" };
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export const AzureServiceAccountInfo: MessageFns<AzureServiceAccountInfo> = {
|
|
289
|
-
encode(message: AzureServiceAccountInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
290
|
-
if (message.clientId !== "") {
|
|
291
|
-
writer.uint32(10).string(message.clientId);
|
|
292
|
-
}
|
|
293
|
-
if (message.resourceId !== "") {
|
|
294
|
-
writer.uint32(18).string(message.resourceId);
|
|
295
|
-
}
|
|
296
|
-
if (message.principalId !== "") {
|
|
297
|
-
writer.uint32(26).string(message.principalId);
|
|
298
|
-
}
|
|
299
|
-
return writer;
|
|
300
|
-
},
|
|
301
|
-
|
|
302
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AzureServiceAccountInfo {
|
|
303
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
304
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
305
|
-
const message = createBaseAzureServiceAccountInfo();
|
|
306
|
-
while (reader.pos < end) {
|
|
307
|
-
const tag = reader.uint32();
|
|
308
|
-
switch (tag >>> 3) {
|
|
309
|
-
case 1: {
|
|
310
|
-
if (tag !== 10) {
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
message.clientId = reader.string();
|
|
315
|
-
continue;
|
|
316
|
-
}
|
|
317
|
-
case 2: {
|
|
318
|
-
if (tag !== 18) {
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
message.resourceId = reader.string();
|
|
323
|
-
continue;
|
|
324
|
-
}
|
|
325
|
-
case 3: {
|
|
326
|
-
if (tag !== 26) {
|
|
327
|
-
break;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
message.principalId = reader.string();
|
|
331
|
-
continue;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
335
|
-
break;
|
|
336
|
-
}
|
|
337
|
-
reader.skip(tag & 7);
|
|
338
|
-
}
|
|
339
|
-
return message;
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
fromJSON(object: any): AzureServiceAccountInfo {
|
|
343
|
-
return {
|
|
344
|
-
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
345
|
-
resourceId: isSet(object.resourceId) ? globalThis.String(object.resourceId) : "",
|
|
346
|
-
principalId: isSet(object.principalId) ? globalThis.String(object.principalId) : "",
|
|
347
|
-
};
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
toJSON(message: AzureServiceAccountInfo): unknown {
|
|
351
|
-
const obj: any = {};
|
|
352
|
-
if (message.clientId !== "") {
|
|
353
|
-
obj.clientId = message.clientId;
|
|
354
|
-
}
|
|
355
|
-
if (message.resourceId !== "") {
|
|
356
|
-
obj.resourceId = message.resourceId;
|
|
357
|
-
}
|
|
358
|
-
if (message.principalId !== "") {
|
|
359
|
-
obj.principalId = message.principalId;
|
|
360
|
-
}
|
|
361
|
-
return obj;
|
|
362
|
-
},
|
|
363
|
-
|
|
364
|
-
create(base?: DeepPartial<AzureServiceAccountInfo>): AzureServiceAccountInfo {
|
|
365
|
-
return AzureServiceAccountInfo.fromPartial(base ?? {});
|
|
366
|
-
},
|
|
367
|
-
fromPartial(object: DeepPartial<AzureServiceAccountInfo>): AzureServiceAccountInfo {
|
|
368
|
-
const message = createBaseAzureServiceAccountInfo();
|
|
369
|
-
message.clientId = object.clientId ?? "";
|
|
370
|
-
message.resourceId = object.resourceId ?? "";
|
|
371
|
-
message.principalId = object.principalId ?? "";
|
|
372
|
-
return message;
|
|
373
|
-
},
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
function createBaseServiceAccountInfo(): ServiceAccountInfo {
|
|
377
|
-
return { aws: undefined, gcp: undefined, azure: undefined };
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export const ServiceAccountInfo: MessageFns<ServiceAccountInfo> = {
|
|
381
|
-
encode(message: ServiceAccountInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
382
|
-
if (message.aws !== undefined) {
|
|
383
|
-
AwsServiceAccountInfo.encode(message.aws, writer.uint32(10).fork()).join();
|
|
384
|
-
}
|
|
385
|
-
if (message.gcp !== undefined) {
|
|
386
|
-
GcpServiceAccountInfo.encode(message.gcp, writer.uint32(18).fork()).join();
|
|
387
|
-
}
|
|
388
|
-
if (message.azure !== undefined) {
|
|
389
|
-
AzureServiceAccountInfo.encode(message.azure, writer.uint32(26).fork()).join();
|
|
390
|
-
}
|
|
391
|
-
return writer;
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ServiceAccountInfo {
|
|
395
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
396
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
397
|
-
const message = createBaseServiceAccountInfo();
|
|
398
|
-
while (reader.pos < end) {
|
|
399
|
-
const tag = reader.uint32();
|
|
400
|
-
switch (tag >>> 3) {
|
|
401
|
-
case 1: {
|
|
402
|
-
if (tag !== 10) {
|
|
403
|
-
break;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
message.aws = AwsServiceAccountInfo.decode(reader, reader.uint32());
|
|
407
|
-
continue;
|
|
408
|
-
}
|
|
409
|
-
case 2: {
|
|
410
|
-
if (tag !== 18) {
|
|
411
|
-
break;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
message.gcp = GcpServiceAccountInfo.decode(reader, reader.uint32());
|
|
415
|
-
continue;
|
|
416
|
-
}
|
|
417
|
-
case 3: {
|
|
418
|
-
if (tag !== 26) {
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
message.azure = AzureServiceAccountInfo.decode(reader, reader.uint32());
|
|
423
|
-
continue;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
427
|
-
break;
|
|
428
|
-
}
|
|
429
|
-
reader.skip(tag & 7);
|
|
430
|
-
}
|
|
431
|
-
return message;
|
|
432
|
-
},
|
|
433
|
-
|
|
434
|
-
fromJSON(object: any): ServiceAccountInfo {
|
|
435
|
-
return {
|
|
436
|
-
aws: isSet(object.aws) ? AwsServiceAccountInfo.fromJSON(object.aws) : undefined,
|
|
437
|
-
gcp: isSet(object.gcp) ? GcpServiceAccountInfo.fromJSON(object.gcp) : undefined,
|
|
438
|
-
azure: isSet(object.azure) ? AzureServiceAccountInfo.fromJSON(object.azure) : undefined,
|
|
439
|
-
};
|
|
440
|
-
},
|
|
441
|
-
|
|
442
|
-
toJSON(message: ServiceAccountInfo): unknown {
|
|
443
|
-
const obj: any = {};
|
|
444
|
-
if (message.aws !== undefined) {
|
|
445
|
-
obj.aws = AwsServiceAccountInfo.toJSON(message.aws);
|
|
446
|
-
}
|
|
447
|
-
if (message.gcp !== undefined) {
|
|
448
|
-
obj.gcp = GcpServiceAccountInfo.toJSON(message.gcp);
|
|
449
|
-
}
|
|
450
|
-
if (message.azure !== undefined) {
|
|
451
|
-
obj.azure = AzureServiceAccountInfo.toJSON(message.azure);
|
|
452
|
-
}
|
|
453
|
-
return obj;
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
create(base?: DeepPartial<ServiceAccountInfo>): ServiceAccountInfo {
|
|
457
|
-
return ServiceAccountInfo.fromPartial(base ?? {});
|
|
458
|
-
},
|
|
459
|
-
fromPartial(object: DeepPartial<ServiceAccountInfo>): ServiceAccountInfo {
|
|
460
|
-
const message = createBaseServiceAccountInfo();
|
|
461
|
-
message.aws = (object.aws !== undefined && object.aws !== null)
|
|
462
|
-
? AwsServiceAccountInfo.fromPartial(object.aws)
|
|
463
|
-
: undefined;
|
|
464
|
-
message.gcp = (object.gcp !== undefined && object.gcp !== null)
|
|
465
|
-
? GcpServiceAccountInfo.fromPartial(object.gcp)
|
|
466
|
-
: undefined;
|
|
467
|
-
message.azure = (object.azure !== undefined && object.azure !== null)
|
|
468
|
-
? AzureServiceAccountInfo.fromPartial(object.azure)
|
|
469
|
-
: undefined;
|
|
470
|
-
return message;
|
|
471
|
-
},
|
|
472
|
-
};
|
|
473
|
-
|
|
474
|
-
function createBaseGetInfoResponse(): GetInfoResponse {
|
|
475
|
-
return { info: undefined };
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
export const GetInfoResponse: MessageFns<GetInfoResponse> = {
|
|
479
|
-
encode(message: GetInfoResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
480
|
-
if (message.info !== undefined) {
|
|
481
|
-
ServiceAccountInfo.encode(message.info, writer.uint32(10).fork()).join();
|
|
482
|
-
}
|
|
483
|
-
return writer;
|
|
484
|
-
},
|
|
485
|
-
|
|
486
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GetInfoResponse {
|
|
487
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
488
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
489
|
-
const message = createBaseGetInfoResponse();
|
|
490
|
-
while (reader.pos < end) {
|
|
491
|
-
const tag = reader.uint32();
|
|
492
|
-
switch (tag >>> 3) {
|
|
493
|
-
case 1: {
|
|
494
|
-
if (tag !== 10) {
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
message.info = ServiceAccountInfo.decode(reader, reader.uint32());
|
|
499
|
-
continue;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
503
|
-
break;
|
|
504
|
-
}
|
|
505
|
-
reader.skip(tag & 7);
|
|
506
|
-
}
|
|
507
|
-
return message;
|
|
508
|
-
},
|
|
509
|
-
|
|
510
|
-
fromJSON(object: any): GetInfoResponse {
|
|
511
|
-
return { info: isSet(object.info) ? ServiceAccountInfo.fromJSON(object.info) : undefined };
|
|
512
|
-
},
|
|
513
|
-
|
|
514
|
-
toJSON(message: GetInfoResponse): unknown {
|
|
515
|
-
const obj: any = {};
|
|
516
|
-
if (message.info !== undefined) {
|
|
517
|
-
obj.info = ServiceAccountInfo.toJSON(message.info);
|
|
518
|
-
}
|
|
519
|
-
return obj;
|
|
520
|
-
},
|
|
521
|
-
|
|
522
|
-
create(base?: DeepPartial<GetInfoResponse>): GetInfoResponse {
|
|
523
|
-
return GetInfoResponse.fromPartial(base ?? {});
|
|
524
|
-
},
|
|
525
|
-
fromPartial(object: DeepPartial<GetInfoResponse>): GetInfoResponse {
|
|
526
|
-
const message = createBaseGetInfoResponse();
|
|
527
|
-
message.info = (object.info !== undefined && object.info !== null)
|
|
528
|
-
? ServiceAccountInfo.fromPartial(object.info)
|
|
529
|
-
: undefined;
|
|
530
|
-
return message;
|
|
531
|
-
},
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
function createBaseImpersonateRequest(): ImpersonateRequest {
|
|
535
|
-
return { bindingName: "", sessionName: undefined, durationSeconds: undefined, scopes: [] };
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
export const ImpersonateRequest: MessageFns<ImpersonateRequest> = {
|
|
539
|
-
encode(message: ImpersonateRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
540
|
-
if (message.bindingName !== "") {
|
|
541
|
-
writer.uint32(10).string(message.bindingName);
|
|
542
|
-
}
|
|
543
|
-
if (message.sessionName !== undefined) {
|
|
544
|
-
writer.uint32(18).string(message.sessionName);
|
|
545
|
-
}
|
|
546
|
-
if (message.durationSeconds !== undefined) {
|
|
547
|
-
writer.uint32(24).int32(message.durationSeconds);
|
|
548
|
-
}
|
|
549
|
-
for (const v of message.scopes) {
|
|
550
|
-
writer.uint32(34).string(v!);
|
|
551
|
-
}
|
|
552
|
-
return writer;
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ImpersonateRequest {
|
|
556
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
557
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
558
|
-
const message = createBaseImpersonateRequest();
|
|
559
|
-
while (reader.pos < end) {
|
|
560
|
-
const tag = reader.uint32();
|
|
561
|
-
switch (tag >>> 3) {
|
|
562
|
-
case 1: {
|
|
563
|
-
if (tag !== 10) {
|
|
564
|
-
break;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
message.bindingName = reader.string();
|
|
568
|
-
continue;
|
|
569
|
-
}
|
|
570
|
-
case 2: {
|
|
571
|
-
if (tag !== 18) {
|
|
572
|
-
break;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
message.sessionName = reader.string();
|
|
576
|
-
continue;
|
|
577
|
-
}
|
|
578
|
-
case 3: {
|
|
579
|
-
if (tag !== 24) {
|
|
580
|
-
break;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
message.durationSeconds = reader.int32();
|
|
584
|
-
continue;
|
|
585
|
-
}
|
|
586
|
-
case 4: {
|
|
587
|
-
if (tag !== 34) {
|
|
588
|
-
break;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
message.scopes.push(reader.string());
|
|
592
|
-
continue;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
596
|
-
break;
|
|
597
|
-
}
|
|
598
|
-
reader.skip(tag & 7);
|
|
599
|
-
}
|
|
600
|
-
return message;
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
fromJSON(object: any): ImpersonateRequest {
|
|
604
|
-
return {
|
|
605
|
-
bindingName: isSet(object.bindingName) ? globalThis.String(object.bindingName) : "",
|
|
606
|
-
sessionName: isSet(object.sessionName) ? globalThis.String(object.sessionName) : undefined,
|
|
607
|
-
durationSeconds: isSet(object.durationSeconds) ? globalThis.Number(object.durationSeconds) : undefined,
|
|
608
|
-
scopes: globalThis.Array.isArray(object?.scopes) ? object.scopes.map((e: any) => globalThis.String(e)) : [],
|
|
609
|
-
};
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
-
toJSON(message: ImpersonateRequest): unknown {
|
|
613
|
-
const obj: any = {};
|
|
614
|
-
if (message.bindingName !== "") {
|
|
615
|
-
obj.bindingName = message.bindingName;
|
|
616
|
-
}
|
|
617
|
-
if (message.sessionName !== undefined) {
|
|
618
|
-
obj.sessionName = message.sessionName;
|
|
619
|
-
}
|
|
620
|
-
if (message.durationSeconds !== undefined) {
|
|
621
|
-
obj.durationSeconds = Math.round(message.durationSeconds);
|
|
622
|
-
}
|
|
623
|
-
if (message.scopes?.length) {
|
|
624
|
-
obj.scopes = message.scopes;
|
|
625
|
-
}
|
|
626
|
-
return obj;
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
create(base?: DeepPartial<ImpersonateRequest>): ImpersonateRequest {
|
|
630
|
-
return ImpersonateRequest.fromPartial(base ?? {});
|
|
631
|
-
},
|
|
632
|
-
fromPartial(object: DeepPartial<ImpersonateRequest>): ImpersonateRequest {
|
|
633
|
-
const message = createBaseImpersonateRequest();
|
|
634
|
-
message.bindingName = object.bindingName ?? "";
|
|
635
|
-
message.sessionName = object.sessionName ?? undefined;
|
|
636
|
-
message.durationSeconds = object.durationSeconds ?? undefined;
|
|
637
|
-
message.scopes = object.scopes?.map((e) => e) || [];
|
|
638
|
-
return message;
|
|
639
|
-
},
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
function createBaseImpersonateResponse(): ImpersonateResponse {
|
|
643
|
-
return { clientConfigJson: "" };
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
export const ImpersonateResponse: MessageFns<ImpersonateResponse> = {
|
|
647
|
-
encode(message: ImpersonateResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
648
|
-
if (message.clientConfigJson !== "") {
|
|
649
|
-
writer.uint32(10).string(message.clientConfigJson);
|
|
650
|
-
}
|
|
651
|
-
return writer;
|
|
652
|
-
},
|
|
653
|
-
|
|
654
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ImpersonateResponse {
|
|
655
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
656
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
657
|
-
const message = createBaseImpersonateResponse();
|
|
658
|
-
while (reader.pos < end) {
|
|
659
|
-
const tag = reader.uint32();
|
|
660
|
-
switch (tag >>> 3) {
|
|
661
|
-
case 1: {
|
|
662
|
-
if (tag !== 10) {
|
|
663
|
-
break;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
message.clientConfigJson = reader.string();
|
|
667
|
-
continue;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
671
|
-
break;
|
|
672
|
-
}
|
|
673
|
-
reader.skip(tag & 7);
|
|
674
|
-
}
|
|
675
|
-
return message;
|
|
676
|
-
},
|
|
677
|
-
|
|
678
|
-
fromJSON(object: any): ImpersonateResponse {
|
|
679
|
-
return { clientConfigJson: isSet(object.clientConfigJson) ? globalThis.String(object.clientConfigJson) : "" };
|
|
680
|
-
},
|
|
681
|
-
|
|
682
|
-
toJSON(message: ImpersonateResponse): unknown {
|
|
683
|
-
const obj: any = {};
|
|
684
|
-
if (message.clientConfigJson !== "") {
|
|
685
|
-
obj.clientConfigJson = message.clientConfigJson;
|
|
686
|
-
}
|
|
687
|
-
return obj;
|
|
688
|
-
},
|
|
689
|
-
|
|
690
|
-
create(base?: DeepPartial<ImpersonateResponse>): ImpersonateResponse {
|
|
691
|
-
return ImpersonateResponse.fromPartial(base ?? {});
|
|
692
|
-
},
|
|
693
|
-
fromPartial(object: DeepPartial<ImpersonateResponse>): ImpersonateResponse {
|
|
694
|
-
const message = createBaseImpersonateResponse();
|
|
695
|
-
message.clientConfigJson = object.clientConfigJson ?? "";
|
|
696
|
-
return message;
|
|
697
|
-
},
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
/** ServiceAccount service for managing identity and impersonation */
|
|
701
|
-
export type ServiceAccountServiceDefinition = typeof ServiceAccountServiceDefinition;
|
|
702
|
-
export const ServiceAccountServiceDefinition = {
|
|
703
|
-
name: "ServiceAccountService",
|
|
704
|
-
fullName: "alien_bindings.service_account.ServiceAccountService",
|
|
705
|
-
methods: {
|
|
706
|
-
/** Get information about the service account */
|
|
707
|
-
getInfo: {
|
|
708
|
-
name: "GetInfo",
|
|
709
|
-
requestType: GetInfoRequest,
|
|
710
|
-
requestStream: false,
|
|
711
|
-
responseType: GetInfoResponse,
|
|
712
|
-
responseStream: false,
|
|
713
|
-
options: {},
|
|
714
|
-
},
|
|
715
|
-
/** Impersonate the service account and returns credentials as a ClientConfig */
|
|
716
|
-
impersonate: {
|
|
717
|
-
name: "Impersonate",
|
|
718
|
-
requestType: ImpersonateRequest,
|
|
719
|
-
requestStream: false,
|
|
720
|
-
responseType: ImpersonateResponse,
|
|
721
|
-
responseStream: false,
|
|
722
|
-
options: {},
|
|
723
|
-
},
|
|
724
|
-
},
|
|
725
|
-
} as const;
|
|
726
|
-
|
|
727
|
-
export interface ServiceAccountServiceImplementation<CallContextExt = {}> {
|
|
728
|
-
/** Get information about the service account */
|
|
729
|
-
getInfo(request: GetInfoRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetInfoResponse>>;
|
|
730
|
-
/** Impersonate the service account and returns credentials as a ClientConfig */
|
|
731
|
-
impersonate(
|
|
732
|
-
request: ImpersonateRequest,
|
|
733
|
-
context: CallContext & CallContextExt,
|
|
734
|
-
): Promise<DeepPartial<ImpersonateResponse>>;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
export interface ServiceAccountServiceClient<CallOptionsExt = {}> {
|
|
738
|
-
/** Get information about the service account */
|
|
739
|
-
getInfo(request: DeepPartial<GetInfoRequest>, options?: CallOptions & CallOptionsExt): Promise<GetInfoResponse>;
|
|
740
|
-
/** Impersonate the service account and returns credentials as a ClientConfig */
|
|
741
|
-
impersonate(
|
|
742
|
-
request: DeepPartial<ImpersonateRequest>,
|
|
743
|
-
options?: CallOptions & CallOptionsExt,
|
|
744
|
-
): Promise<ImpersonateResponse>;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
748
|
-
|
|
749
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
750
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
751
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
752
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
753
|
-
: Partial<T>;
|
|
754
|
-
|
|
755
|
-
function isSet(value: any): boolean {
|
|
756
|
-
return value !== null && value !== undefined;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
export interface MessageFns<T> {
|
|
760
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
761
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
762
|
-
fromJSON(object: any): T;
|
|
763
|
-
toJSON(message: T): unknown;
|
|
764
|
-
create(base?: DeepPartial<T>): T;
|
|
765
|
-
fromPartial(object: DeepPartial<T>): T;
|
|
766
|
-
}
|