@toshicloud/sdk 0.5.0 → 0.5.1
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 +82 -40
- package/dist/client.d.ts +33 -2
- package/dist/client.js +28 -3
- package/dist/errors.d.ts +74 -22
- package/dist/errors.js +99 -27
- package/dist/gen/toshi/permission_pb.d.ts +207 -2
- package/dist/gen/toshi/permission_pb.js +54 -2
- package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
- package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
- package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
- package/dist/gen/toshi/workspace/v1/artifacts_pb.js +9 -7
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +11 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
- package/dist/gen/toshi/workspace/v1/channels_pb.js +185 -39
- package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1481 -0
- package/dist/gen/toshi/workspace/v1/connections_pb.js +208 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +291 -43
- package/dist/gen/toshi/workspace/v1/discovery_pb.js +79 -30
- package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
- package/dist/gen/toshi/workspace/v1/display_pb.js +52 -2
- package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
- package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
- package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +315 -15
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +10 -5
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +12 -7
- package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
- package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
- package/dist/gen/toshi/workspace/v1/products_pb.d.ts +99 -296
- package/dist/gen/toshi/workspace/v1/products_pb.js +7 -53
- package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
- package/dist/gen/toshi/workspace/v1/projects_pb.js +150 -33
- package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +54 -14
- package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
- package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
- package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
- package/dist/gen/toshi/workspace/v1/secrets_pb.js +42 -18
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +65 -8
- package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
- package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
- package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
- package/dist/gen/toshi/workspace/v1/volumes_pb.js +169 -11
- package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +4 -4
- package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6290 -937
- package/dist/gen/toshi/workspace/v1/workspace_pb.js +801 -88
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +2176 -630
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +191 -74
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -1
- package/dist/interceptors.d.ts +6 -2
- package/dist/interceptors.js +13 -8
- package/dist/retry.d.ts +18 -0
- package/dist/retry.js +225 -23
- package/dist/test/procedures.js +100 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wait.d.ts +4 -0
- package/dist/wait.js +24 -1
- package/package.json +3 -2
|
@@ -16,6 +16,9 @@ export type Channel = Message<"toshi.workspace.v1.Channel"> & {
|
|
|
16
16
|
*/
|
|
17
17
|
id: string;
|
|
18
18
|
/**
|
|
19
|
+
* The job whose guest holds the channel; an event channel's is its
|
|
20
|
+
* service's live run, empty while the service has none.
|
|
21
|
+
*
|
|
19
22
|
* @generated from field: string job_id = 2;
|
|
20
23
|
*/
|
|
21
24
|
jobId: string;
|
|
@@ -28,7 +31,7 @@ export type Channel = Message<"toshi.workspace.v1.Channel"> & {
|
|
|
28
31
|
*/
|
|
29
32
|
shape: ChannelShape;
|
|
30
33
|
/**
|
|
31
|
-
* An http channel's port in the guest.
|
|
34
|
+
* An http or event channel's port in the guest.
|
|
32
35
|
*
|
|
33
36
|
* @generated from field: int32 port = 5;
|
|
34
37
|
*/
|
|
@@ -116,6 +119,42 @@ export type Channel = Message<"toshi.workspace.v1.Channel"> & {
|
|
|
116
119
|
* @generated from field: repeated toshi.workspace.v1.ChannelClient clients = 20;
|
|
117
120
|
*/
|
|
118
121
|
clients: ChannelClient[];
|
|
122
|
+
/**
|
|
123
|
+
* An event channel's service, by its ID.
|
|
124
|
+
*
|
|
125
|
+
* @generated from field: string service = 21;
|
|
126
|
+
*/
|
|
127
|
+
service: string;
|
|
128
|
+
/**
|
|
129
|
+
* Where an event channel posts in the guest.
|
|
130
|
+
*
|
|
131
|
+
* @generated from field: string path = 22;
|
|
132
|
+
*/
|
|
133
|
+
path: string;
|
|
134
|
+
/**
|
|
135
|
+
* An event channel's messages counted by state.
|
|
136
|
+
*
|
|
137
|
+
* @generated from field: toshi.workspace.v1.ChannelEventCounts events = 23;
|
|
138
|
+
*/
|
|
139
|
+
events?: ChannelEventCounts | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* The grant through which another workspace exposed the channel, or
|
|
142
|
+
* empty for one the job's own workspace exposed.
|
|
143
|
+
*
|
|
144
|
+
* @generated from field: string grant_id = 24;
|
|
145
|
+
*/
|
|
146
|
+
grantId: string;
|
|
147
|
+
/**
|
|
148
|
+
* The policy version the channel's process of the control plane applies.
|
|
149
|
+
* A stream channel's owner records it as it applies each version, so a
|
|
150
|
+
* value below policy.version is a change its attached clients are not
|
|
151
|
+
* yet held to; 0 until an owner applied one. An http channel's process
|
|
152
|
+
* reads the policy at each request: its value is policy.version. An
|
|
153
|
+
* event channel's is 0.
|
|
154
|
+
*
|
|
155
|
+
* @generated from field: int64 applied_policy_version = 25;
|
|
156
|
+
*/
|
|
157
|
+
appliedPolicyVersion: bigint;
|
|
119
158
|
};
|
|
120
159
|
/**
|
|
121
160
|
* @generated from message toshi.workspace.v1.Channel
|
|
@@ -128,6 +167,9 @@ export type ChannelJson = {
|
|
|
128
167
|
*/
|
|
129
168
|
id?: string;
|
|
130
169
|
/**
|
|
170
|
+
* The job whose guest holds the channel; an event channel's is its
|
|
171
|
+
* service's live run, empty while the service has none.
|
|
172
|
+
*
|
|
131
173
|
* @generated from field: string job_id = 2;
|
|
132
174
|
*/
|
|
133
175
|
jobId?: string;
|
|
@@ -140,7 +182,7 @@ export type ChannelJson = {
|
|
|
140
182
|
*/
|
|
141
183
|
shape?: ChannelShapeJson;
|
|
142
184
|
/**
|
|
143
|
-
* An http channel's port in the guest.
|
|
185
|
+
* An http or event channel's port in the guest.
|
|
144
186
|
*
|
|
145
187
|
* @generated from field: int32 port = 5;
|
|
146
188
|
*/
|
|
@@ -228,6 +270,42 @@ export type ChannelJson = {
|
|
|
228
270
|
* @generated from field: repeated toshi.workspace.v1.ChannelClient clients = 20;
|
|
229
271
|
*/
|
|
230
272
|
clients?: ChannelClientJson[];
|
|
273
|
+
/**
|
|
274
|
+
* An event channel's service, by its ID.
|
|
275
|
+
*
|
|
276
|
+
* @generated from field: string service = 21;
|
|
277
|
+
*/
|
|
278
|
+
service?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Where an event channel posts in the guest.
|
|
281
|
+
*
|
|
282
|
+
* @generated from field: string path = 22;
|
|
283
|
+
*/
|
|
284
|
+
path?: string;
|
|
285
|
+
/**
|
|
286
|
+
* An event channel's messages counted by state.
|
|
287
|
+
*
|
|
288
|
+
* @generated from field: toshi.workspace.v1.ChannelEventCounts events = 23;
|
|
289
|
+
*/
|
|
290
|
+
events?: ChannelEventCountsJson;
|
|
291
|
+
/**
|
|
292
|
+
* The grant through which another workspace exposed the channel, or
|
|
293
|
+
* empty for one the job's own workspace exposed.
|
|
294
|
+
*
|
|
295
|
+
* @generated from field: string grant_id = 24;
|
|
296
|
+
*/
|
|
297
|
+
grantId?: string;
|
|
298
|
+
/**
|
|
299
|
+
* The policy version the channel's process of the control plane applies.
|
|
300
|
+
* A stream channel's owner records it as it applies each version, so a
|
|
301
|
+
* value below policy.version is a change its attached clients are not
|
|
302
|
+
* yet held to; 0 until an owner applied one. An http channel's process
|
|
303
|
+
* reads the policy at each request: its value is policy.version. An
|
|
304
|
+
* event channel's is 0.
|
|
305
|
+
*
|
|
306
|
+
* @generated from field: int64 applied_policy_version = 25;
|
|
307
|
+
*/
|
|
308
|
+
appliedPolicyVersion?: string;
|
|
231
309
|
};
|
|
232
310
|
/**
|
|
233
311
|
* Describes the message toshi.workspace.v1.Channel.
|
|
@@ -236,6 +314,295 @@ export type ChannelJson = {
|
|
|
236
314
|
export declare const ChannelSchema: GenMessage<Channel, {
|
|
237
315
|
jsonType: ChannelJson;
|
|
238
316
|
}>;
|
|
317
|
+
/**
|
|
318
|
+
* ChannelEventCounts counts an event channel's messages by state.
|
|
319
|
+
*
|
|
320
|
+
* @generated from message toshi.workspace.v1.ChannelEventCounts
|
|
321
|
+
*/
|
|
322
|
+
export type ChannelEventCounts = Message<"toshi.workspace.v1.ChannelEventCounts"> & {
|
|
323
|
+
/**
|
|
324
|
+
* @generated from field: int64 pending = 1;
|
|
325
|
+
*/
|
|
326
|
+
pending: bigint;
|
|
327
|
+
/**
|
|
328
|
+
* @generated from field: int64 in_flight = 2;
|
|
329
|
+
*/
|
|
330
|
+
inFlight: bigint;
|
|
331
|
+
/**
|
|
332
|
+
* @generated from field: int64 delivered = 3;
|
|
333
|
+
*/
|
|
334
|
+
delivered: bigint;
|
|
335
|
+
/**
|
|
336
|
+
* @generated from field: int64 failed = 4;
|
|
337
|
+
*/
|
|
338
|
+
failed: bigint;
|
|
339
|
+
/**
|
|
340
|
+
* @generated from field: int64 expired = 5;
|
|
341
|
+
*/
|
|
342
|
+
expired: bigint;
|
|
343
|
+
/**
|
|
344
|
+
* The last delivery's time; unset before the first.
|
|
345
|
+
*
|
|
346
|
+
* @generated from field: google.protobuf.Timestamp last_delivery_at = 6;
|
|
347
|
+
*/
|
|
348
|
+
lastDeliveryAt?: Timestamp | undefined;
|
|
349
|
+
/**
|
|
350
|
+
* Why the last failed attempt failed; empty when none has.
|
|
351
|
+
*
|
|
352
|
+
* @generated from field: string last_failure = 7;
|
|
353
|
+
*/
|
|
354
|
+
lastFailure: string;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* ChannelEventCounts counts an event channel's messages by state.
|
|
358
|
+
*
|
|
359
|
+
* @generated from message toshi.workspace.v1.ChannelEventCounts
|
|
360
|
+
*/
|
|
361
|
+
export type ChannelEventCountsJson = {
|
|
362
|
+
/**
|
|
363
|
+
* @generated from field: int64 pending = 1;
|
|
364
|
+
*/
|
|
365
|
+
pending?: string;
|
|
366
|
+
/**
|
|
367
|
+
* @generated from field: int64 in_flight = 2;
|
|
368
|
+
*/
|
|
369
|
+
inFlight?: string;
|
|
370
|
+
/**
|
|
371
|
+
* @generated from field: int64 delivered = 3;
|
|
372
|
+
*/
|
|
373
|
+
delivered?: string;
|
|
374
|
+
/**
|
|
375
|
+
* @generated from field: int64 failed = 4;
|
|
376
|
+
*/
|
|
377
|
+
failed?: string;
|
|
378
|
+
/**
|
|
379
|
+
* @generated from field: int64 expired = 5;
|
|
380
|
+
*/
|
|
381
|
+
expired?: string;
|
|
382
|
+
/**
|
|
383
|
+
* The last delivery's time; unset before the first.
|
|
384
|
+
*
|
|
385
|
+
* @generated from field: google.protobuf.Timestamp last_delivery_at = 6;
|
|
386
|
+
*/
|
|
387
|
+
lastDeliveryAt?: TimestampJson;
|
|
388
|
+
/**
|
|
389
|
+
* Why the last failed attempt failed; empty when none has.
|
|
390
|
+
*
|
|
391
|
+
* @generated from field: string last_failure = 7;
|
|
392
|
+
*/
|
|
393
|
+
lastFailure?: string;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Describes the message toshi.workspace.v1.ChannelEventCounts.
|
|
397
|
+
* Use `create(ChannelEventCountsSchema)` to create a new message.
|
|
398
|
+
*/
|
|
399
|
+
export declare const ChannelEventCountsSchema: GenMessage<ChannelEventCounts, {
|
|
400
|
+
jsonType: ChannelEventCountsJson;
|
|
401
|
+
}>;
|
|
402
|
+
/**
|
|
403
|
+
* ChannelMessageSource is who sent a message; Toshi stamps it.
|
|
404
|
+
*
|
|
405
|
+
* @generated from message toshi.workspace.v1.ChannelMessageSource
|
|
406
|
+
*/
|
|
407
|
+
export type ChannelMessageSource = Message<"toshi.workspace.v1.ChannelMessageSource"> & {
|
|
408
|
+
/**
|
|
409
|
+
* principal (a person or token), workload, trigger, mail or alarm.
|
|
410
|
+
*
|
|
411
|
+
* @generated from field: string kind = 1;
|
|
412
|
+
*/
|
|
413
|
+
kind: string;
|
|
414
|
+
/**
|
|
415
|
+
* A principal as the audit log names an actor, or the workload's or
|
|
416
|
+
* trigger's ID.
|
|
417
|
+
*
|
|
418
|
+
* @generated from field: string id = 2;
|
|
419
|
+
*/
|
|
420
|
+
id: string;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* ChannelMessageSource is who sent a message; Toshi stamps it.
|
|
424
|
+
*
|
|
425
|
+
* @generated from message toshi.workspace.v1.ChannelMessageSource
|
|
426
|
+
*/
|
|
427
|
+
export type ChannelMessageSourceJson = {
|
|
428
|
+
/**
|
|
429
|
+
* principal (a person or token), workload, trigger, mail or alarm.
|
|
430
|
+
*
|
|
431
|
+
* @generated from field: string kind = 1;
|
|
432
|
+
*/
|
|
433
|
+
kind?: string;
|
|
434
|
+
/**
|
|
435
|
+
* A principal as the audit log names an actor, or the workload's or
|
|
436
|
+
* trigger's ID.
|
|
437
|
+
*
|
|
438
|
+
* @generated from field: string id = 2;
|
|
439
|
+
*/
|
|
440
|
+
id?: string;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* Describes the message toshi.workspace.v1.ChannelMessageSource.
|
|
444
|
+
* Use `create(ChannelMessageSourceSchema)` to create a new message.
|
|
445
|
+
*/
|
|
446
|
+
export declare const ChannelMessageSourceSchema: GenMessage<ChannelMessageSource, {
|
|
447
|
+
jsonType: ChannelMessageSourceJson;
|
|
448
|
+
}>;
|
|
449
|
+
/**
|
|
450
|
+
* ChannelMessage is one message of an event channel.
|
|
451
|
+
*
|
|
452
|
+
* @generated from message toshi.workspace.v1.ChannelMessage
|
|
453
|
+
*/
|
|
454
|
+
export type ChannelMessage = Message<"toshi.workspace.v1.ChannelMessage"> & {
|
|
455
|
+
/**
|
|
456
|
+
* The webhook-id of each of its posts, the same on every attempt and
|
|
457
|
+
* after a replay.
|
|
458
|
+
*
|
|
459
|
+
* @generated from field: string id = 1;
|
|
460
|
+
*/
|
|
461
|
+
id: string;
|
|
462
|
+
/**
|
|
463
|
+
* Its place in the channel's queue, from 1.
|
|
464
|
+
*
|
|
465
|
+
* @generated from field: int64 seq = 2;
|
|
466
|
+
*/
|
|
467
|
+
seq: bigint;
|
|
468
|
+
/**
|
|
469
|
+
* @generated from field: string name = 3;
|
|
470
|
+
*/
|
|
471
|
+
name: string;
|
|
472
|
+
/**
|
|
473
|
+
* @generated from field: google.protobuf.Timestamp time = 4;
|
|
474
|
+
*/
|
|
475
|
+
time?: Timestamp | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* @generated from field: toshi.workspace.v1.ChannelMessageSource source = 5;
|
|
478
|
+
*/
|
|
479
|
+
source?: ChannelMessageSource | undefined;
|
|
480
|
+
/**
|
|
481
|
+
* The message's JSON.
|
|
482
|
+
*
|
|
483
|
+
* @generated from field: bytes data = 6;
|
|
484
|
+
*/
|
|
485
|
+
data: Uint8Array;
|
|
486
|
+
/**
|
|
487
|
+
* @generated from field: toshi.workspace.v1.ChannelMessageState state = 7;
|
|
488
|
+
*/
|
|
489
|
+
state: ChannelMessageState;
|
|
490
|
+
/**
|
|
491
|
+
* @generated from field: int32 attempts = 8;
|
|
492
|
+
*/
|
|
493
|
+
attempts: number;
|
|
494
|
+
/**
|
|
495
|
+
* When a pending message is next posted.
|
|
496
|
+
*
|
|
497
|
+
* @generated from field: google.protobuf.Timestamp next_attempt_at = 9;
|
|
498
|
+
*/
|
|
499
|
+
nextAttemptAt?: Timestamp | undefined;
|
|
500
|
+
/**
|
|
501
|
+
* Why its last attempt failed; empty when none has.
|
|
502
|
+
*
|
|
503
|
+
* @generated from field: string last_error = 10;
|
|
504
|
+
*/
|
|
505
|
+
lastError: string;
|
|
506
|
+
/**
|
|
507
|
+
* @generated from field: google.protobuf.Timestamp delivered_at = 11;
|
|
508
|
+
*/
|
|
509
|
+
deliveredAt?: Timestamp | undefined;
|
|
510
|
+
/**
|
|
511
|
+
* When the message was last replayed, unset for never.
|
|
512
|
+
*
|
|
513
|
+
* @generated from field: google.protobuf.Timestamp replayed_at = 12;
|
|
514
|
+
*/
|
|
515
|
+
replayedAt?: Timestamp | undefined;
|
|
516
|
+
/**
|
|
517
|
+
* The instant an alarm published this message for; unset for other
|
|
518
|
+
* sources.
|
|
519
|
+
*
|
|
520
|
+
* @generated from field: google.protobuf.Timestamp scheduled_for = 13;
|
|
521
|
+
*/
|
|
522
|
+
scheduledFor?: Timestamp | undefined;
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* ChannelMessage is one message of an event channel.
|
|
526
|
+
*
|
|
527
|
+
* @generated from message toshi.workspace.v1.ChannelMessage
|
|
528
|
+
*/
|
|
529
|
+
export type ChannelMessageJson = {
|
|
530
|
+
/**
|
|
531
|
+
* The webhook-id of each of its posts, the same on every attempt and
|
|
532
|
+
* after a replay.
|
|
533
|
+
*
|
|
534
|
+
* @generated from field: string id = 1;
|
|
535
|
+
*/
|
|
536
|
+
id?: string;
|
|
537
|
+
/**
|
|
538
|
+
* Its place in the channel's queue, from 1.
|
|
539
|
+
*
|
|
540
|
+
* @generated from field: int64 seq = 2;
|
|
541
|
+
*/
|
|
542
|
+
seq?: string;
|
|
543
|
+
/**
|
|
544
|
+
* @generated from field: string name = 3;
|
|
545
|
+
*/
|
|
546
|
+
name?: string;
|
|
547
|
+
/**
|
|
548
|
+
* @generated from field: google.protobuf.Timestamp time = 4;
|
|
549
|
+
*/
|
|
550
|
+
time?: TimestampJson;
|
|
551
|
+
/**
|
|
552
|
+
* @generated from field: toshi.workspace.v1.ChannelMessageSource source = 5;
|
|
553
|
+
*/
|
|
554
|
+
source?: ChannelMessageSourceJson;
|
|
555
|
+
/**
|
|
556
|
+
* The message's JSON.
|
|
557
|
+
*
|
|
558
|
+
* @generated from field: bytes data = 6;
|
|
559
|
+
*/
|
|
560
|
+
data?: string;
|
|
561
|
+
/**
|
|
562
|
+
* @generated from field: toshi.workspace.v1.ChannelMessageState state = 7;
|
|
563
|
+
*/
|
|
564
|
+
state?: ChannelMessageStateJson;
|
|
565
|
+
/**
|
|
566
|
+
* @generated from field: int32 attempts = 8;
|
|
567
|
+
*/
|
|
568
|
+
attempts?: number;
|
|
569
|
+
/**
|
|
570
|
+
* When a pending message is next posted.
|
|
571
|
+
*
|
|
572
|
+
* @generated from field: google.protobuf.Timestamp next_attempt_at = 9;
|
|
573
|
+
*/
|
|
574
|
+
nextAttemptAt?: TimestampJson;
|
|
575
|
+
/**
|
|
576
|
+
* Why its last attempt failed; empty when none has.
|
|
577
|
+
*
|
|
578
|
+
* @generated from field: string last_error = 10;
|
|
579
|
+
*/
|
|
580
|
+
lastError?: string;
|
|
581
|
+
/**
|
|
582
|
+
* @generated from field: google.protobuf.Timestamp delivered_at = 11;
|
|
583
|
+
*/
|
|
584
|
+
deliveredAt?: TimestampJson;
|
|
585
|
+
/**
|
|
586
|
+
* When the message was last replayed, unset for never.
|
|
587
|
+
*
|
|
588
|
+
* @generated from field: google.protobuf.Timestamp replayed_at = 12;
|
|
589
|
+
*/
|
|
590
|
+
replayedAt?: TimestampJson;
|
|
591
|
+
/**
|
|
592
|
+
* The instant an alarm published this message for; unset for other
|
|
593
|
+
* sources.
|
|
594
|
+
*
|
|
595
|
+
* @generated from field: google.protobuf.Timestamp scheduled_for = 13;
|
|
596
|
+
*/
|
|
597
|
+
scheduledFor?: TimestampJson;
|
|
598
|
+
};
|
|
599
|
+
/**
|
|
600
|
+
* Describes the message toshi.workspace.v1.ChannelMessage.
|
|
601
|
+
* Use `create(ChannelMessageSchema)` to create a new message.
|
|
602
|
+
*/
|
|
603
|
+
export declare const ChannelMessageSchema: GenMessage<ChannelMessage, {
|
|
604
|
+
jsonType: ChannelMessageJson;
|
|
605
|
+
}>;
|
|
239
606
|
/**
|
|
240
607
|
* ChannelClient is one client of a stream channel: its last attach, who
|
|
241
608
|
* made it, and how far it has acknowledged the output, which it goes on
|
|
@@ -391,25 +758,47 @@ export type ChannelPolicy = Message<"toshi.workspace.v1.ChannelPolicy"> & {
|
|
|
391
758
|
*/
|
|
392
759
|
maxClients?: number | undefined;
|
|
393
760
|
/**
|
|
394
|
-
* Who may send input to a stream channel
|
|
761
|
+
* Who may send input to a stream channel, or messages to an event
|
|
762
|
+
* channel: any, creator or none.
|
|
395
763
|
*
|
|
396
764
|
* @generated from field: string input = 4;
|
|
397
765
|
*/
|
|
398
766
|
input: string;
|
|
399
767
|
/**
|
|
400
768
|
* How much output or how many records are kept: buffer, at least the
|
|
401
|
-
* newest 8 MiB, or channel, as long as the channel's record lasts.
|
|
769
|
+
* newest 8 MiB, or channel, as long as the channel's record lasts. An
|
|
770
|
+
* event channel's is a duration, how long a message waits to be
|
|
771
|
+
* delivered before it expires: 24h unless set, and at most the
|
|
772
|
+
* workspace's plan allows, which is never less than 24h.
|
|
402
773
|
*
|
|
403
774
|
* @generated from field: string keep = 5;
|
|
404
775
|
*/
|
|
405
776
|
keep: string;
|
|
406
777
|
/**
|
|
407
778
|
* The ordered module list. Unset takes the shape's defaults; an empty
|
|
408
|
-
* list means no modules.
|
|
779
|
+
* list means no modules. An event channel takes none.
|
|
409
780
|
*
|
|
410
781
|
* @generated from field: toshi.workspace.v1.ChannelModuleList modules = 6;
|
|
411
782
|
*/
|
|
412
783
|
modules?: ChannelModuleList | undefined;
|
|
784
|
+
/**
|
|
785
|
+
* How long an event channel's post may take to be answered 2xx, a
|
|
786
|
+
* duration from 1s to 10m: 30s unless set. It is the same for every
|
|
787
|
+
* message; a later answer is a failed attempt.
|
|
788
|
+
*
|
|
789
|
+
* @generated from field: string ack_deadline = 7;
|
|
790
|
+
*/
|
|
791
|
+
ackDeadline: string;
|
|
792
|
+
/**
|
|
793
|
+
* How many of an event channel's posts may be in flight at once, from 1
|
|
794
|
+
* to 64: 1 unless set. At 1, messages are posted one at a time in the
|
|
795
|
+
* order they were sent, and none passes one waiting to be tried again;
|
|
796
|
+
* above 1, order is not kept. Either way a parked message holds up none
|
|
797
|
+
* after it, so order is promised among the messages delivered.
|
|
798
|
+
*
|
|
799
|
+
* @generated from field: optional int32 concurrency = 8;
|
|
800
|
+
*/
|
|
801
|
+
concurrency?: number | undefined;
|
|
413
802
|
};
|
|
414
803
|
/**
|
|
415
804
|
* ChannelPolicy is a channel's policy document, with the words a recipe's
|
|
@@ -439,25 +828,47 @@ export type ChannelPolicyJson = {
|
|
|
439
828
|
*/
|
|
440
829
|
maxClients?: number;
|
|
441
830
|
/**
|
|
442
|
-
* Who may send input to a stream channel
|
|
831
|
+
* Who may send input to a stream channel, or messages to an event
|
|
832
|
+
* channel: any, creator or none.
|
|
443
833
|
*
|
|
444
834
|
* @generated from field: string input = 4;
|
|
445
835
|
*/
|
|
446
836
|
input?: string;
|
|
447
837
|
/**
|
|
448
838
|
* How much output or how many records are kept: buffer, at least the
|
|
449
|
-
* newest 8 MiB, or channel, as long as the channel's record lasts.
|
|
839
|
+
* newest 8 MiB, or channel, as long as the channel's record lasts. An
|
|
840
|
+
* event channel's is a duration, how long a message waits to be
|
|
841
|
+
* delivered before it expires: 24h unless set, and at most the
|
|
842
|
+
* workspace's plan allows, which is never less than 24h.
|
|
450
843
|
*
|
|
451
844
|
* @generated from field: string keep = 5;
|
|
452
845
|
*/
|
|
453
846
|
keep?: string;
|
|
454
847
|
/**
|
|
455
848
|
* The ordered module list. Unset takes the shape's defaults; an empty
|
|
456
|
-
* list means no modules.
|
|
849
|
+
* list means no modules. An event channel takes none.
|
|
457
850
|
*
|
|
458
851
|
* @generated from field: toshi.workspace.v1.ChannelModuleList modules = 6;
|
|
459
852
|
*/
|
|
460
853
|
modules?: ChannelModuleListJson;
|
|
854
|
+
/**
|
|
855
|
+
* How long an event channel's post may take to be answered 2xx, a
|
|
856
|
+
* duration from 1s to 10m: 30s unless set. It is the same for every
|
|
857
|
+
* message; a later answer is a failed attempt.
|
|
858
|
+
*
|
|
859
|
+
* @generated from field: string ack_deadline = 7;
|
|
860
|
+
*/
|
|
861
|
+
ackDeadline?: string;
|
|
862
|
+
/**
|
|
863
|
+
* How many of an event channel's posts may be in flight at once, from 1
|
|
864
|
+
* to 64: 1 unless set. At 1, messages are posted one at a time in the
|
|
865
|
+
* order they were sent, and none passes one waiting to be tried again;
|
|
866
|
+
* above 1, order is not kept. Either way a parked message holds up none
|
|
867
|
+
* after it, so order is promised among the messages delivered.
|
|
868
|
+
*
|
|
869
|
+
* @generated from field: optional int32 concurrency = 8;
|
|
870
|
+
*/
|
|
871
|
+
concurrency?: number;
|
|
461
872
|
};
|
|
462
873
|
/**
|
|
463
874
|
* Describes the message toshi.workspace.v1.ChannelPolicy.
|
|
@@ -499,7 +910,9 @@ export declare const ChannelModuleListSchema: GenMessage<ChannelModuleList, {
|
|
|
499
910
|
*/
|
|
500
911
|
export type ChannelModule = Message<"toshi.workspace.v1.ChannelModule"> & {
|
|
501
912
|
/**
|
|
502
|
-
*
|
|
913
|
+
* redirect, rewrite, ip_allowlist, client_certificate_required,
|
|
914
|
+
* sign_in_required, rate_limit, wake_page, identity_headers or
|
|
915
|
+
* record_requests, listed in that order.
|
|
503
916
|
*
|
|
504
917
|
* @generated from field: string kind = 1;
|
|
505
918
|
*/
|
|
@@ -530,6 +943,75 @@ export type ChannelModule = Message<"toshi.workspace.v1.ChannelModule"> & {
|
|
|
530
943
|
* @generated from field: int64 body_cap = 5;
|
|
531
944
|
*/
|
|
532
945
|
bodyCap: bigint;
|
|
946
|
+
/**
|
|
947
|
+
* A redirect's status: 301, 302 or 308; zero takes 302.
|
|
948
|
+
*
|
|
949
|
+
* @generated from field: int32 status = 6;
|
|
950
|
+
*/
|
|
951
|
+
status: number;
|
|
952
|
+
/**
|
|
953
|
+
* A redirect's target: an http or https URL or a path. $1 to $9 take
|
|
954
|
+
* what the stars of the match's path matched.
|
|
955
|
+
*
|
|
956
|
+
* @generated from field: string target = 7;
|
|
957
|
+
*/
|
|
958
|
+
target: string;
|
|
959
|
+
/**
|
|
960
|
+
* The path a rewrite serves the request at; $1 to $9 as in target.
|
|
961
|
+
*
|
|
962
|
+
* @generated from field: string path = 8;
|
|
963
|
+
*/
|
|
964
|
+
path: string;
|
|
965
|
+
/**
|
|
966
|
+
* The provided name, of the same workspace, a rewrite serves the request
|
|
967
|
+
* from; a service's channel only.
|
|
968
|
+
*
|
|
969
|
+
* @generated from field: string host = 9;
|
|
970
|
+
*/
|
|
971
|
+
host: string;
|
|
972
|
+
/**
|
|
973
|
+
* What a rate_limit counts requests by: identity (the signed-in caller,
|
|
974
|
+
* else the address) or address.
|
|
975
|
+
*
|
|
976
|
+
* @generated from field: string key = 10;
|
|
977
|
+
*/
|
|
978
|
+
key: string;
|
|
979
|
+
/**
|
|
980
|
+
* The most requests a rate_limit admits per key in one window.
|
|
981
|
+
*
|
|
982
|
+
* @generated from field: int32 count = 11;
|
|
983
|
+
*/
|
|
984
|
+
count: number;
|
|
985
|
+
/**
|
|
986
|
+
* A rate_limit's window, as a duration such as 1m.
|
|
987
|
+
*
|
|
988
|
+
* @generated from field: string window = 12;
|
|
989
|
+
*/
|
|
990
|
+
window: string;
|
|
991
|
+
/**
|
|
992
|
+
* The page a wake_page answers with while the service wakes; empty takes
|
|
993
|
+
* the default page. A service's channel only.
|
|
994
|
+
*
|
|
995
|
+
* @generated from field: string html = 13;
|
|
996
|
+
*/
|
|
997
|
+
html: string;
|
|
998
|
+
/**
|
|
999
|
+
* The PEM certificates of the CAs, at most 64 KiB, whose client
|
|
1000
|
+
* certificates a client_certificate_required admits besides the
|
|
1001
|
+
* workloads'. Such a certificate is checked for its chain and its expiry
|
|
1002
|
+
* only.
|
|
1003
|
+
*
|
|
1004
|
+
* @generated from field: string ca_bundle = 14;
|
|
1005
|
+
*/
|
|
1006
|
+
caBundle: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* Whether a client_certificate_required admits a workload of another
|
|
1009
|
+
* workspace that an active grant, of connect or more, on the channel's
|
|
1010
|
+
* environment admits.
|
|
1011
|
+
*
|
|
1012
|
+
* @generated from field: bool grants = 15;
|
|
1013
|
+
*/
|
|
1014
|
+
grants: boolean;
|
|
533
1015
|
};
|
|
534
1016
|
/**
|
|
535
1017
|
* ChannelModule is one entry of a policy's module list. Each kind takes
|
|
@@ -539,7 +1021,9 @@ export type ChannelModule = Message<"toshi.workspace.v1.ChannelModule"> & {
|
|
|
539
1021
|
*/
|
|
540
1022
|
export type ChannelModuleJson = {
|
|
541
1023
|
/**
|
|
542
|
-
*
|
|
1024
|
+
* redirect, rewrite, ip_allowlist, client_certificate_required,
|
|
1025
|
+
* sign_in_required, rate_limit, wake_page, identity_headers or
|
|
1026
|
+
* record_requests, listed in that order.
|
|
543
1027
|
*
|
|
544
1028
|
* @generated from field: string kind = 1;
|
|
545
1029
|
*/
|
|
@@ -570,6 +1054,75 @@ export type ChannelModuleJson = {
|
|
|
570
1054
|
* @generated from field: int64 body_cap = 5;
|
|
571
1055
|
*/
|
|
572
1056
|
bodyCap?: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* A redirect's status: 301, 302 or 308; zero takes 302.
|
|
1059
|
+
*
|
|
1060
|
+
* @generated from field: int32 status = 6;
|
|
1061
|
+
*/
|
|
1062
|
+
status?: number;
|
|
1063
|
+
/**
|
|
1064
|
+
* A redirect's target: an http or https URL or a path. $1 to $9 take
|
|
1065
|
+
* what the stars of the match's path matched.
|
|
1066
|
+
*
|
|
1067
|
+
* @generated from field: string target = 7;
|
|
1068
|
+
*/
|
|
1069
|
+
target?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* The path a rewrite serves the request at; $1 to $9 as in target.
|
|
1072
|
+
*
|
|
1073
|
+
* @generated from field: string path = 8;
|
|
1074
|
+
*/
|
|
1075
|
+
path?: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* The provided name, of the same workspace, a rewrite serves the request
|
|
1078
|
+
* from; a service's channel only.
|
|
1079
|
+
*
|
|
1080
|
+
* @generated from field: string host = 9;
|
|
1081
|
+
*/
|
|
1082
|
+
host?: string;
|
|
1083
|
+
/**
|
|
1084
|
+
* What a rate_limit counts requests by: identity (the signed-in caller,
|
|
1085
|
+
* else the address) or address.
|
|
1086
|
+
*
|
|
1087
|
+
* @generated from field: string key = 10;
|
|
1088
|
+
*/
|
|
1089
|
+
key?: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* The most requests a rate_limit admits per key in one window.
|
|
1092
|
+
*
|
|
1093
|
+
* @generated from field: int32 count = 11;
|
|
1094
|
+
*/
|
|
1095
|
+
count?: number;
|
|
1096
|
+
/**
|
|
1097
|
+
* A rate_limit's window, as a duration such as 1m.
|
|
1098
|
+
*
|
|
1099
|
+
* @generated from field: string window = 12;
|
|
1100
|
+
*/
|
|
1101
|
+
window?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* The page a wake_page answers with while the service wakes; empty takes
|
|
1104
|
+
* the default page. A service's channel only.
|
|
1105
|
+
*
|
|
1106
|
+
* @generated from field: string html = 13;
|
|
1107
|
+
*/
|
|
1108
|
+
html?: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* The PEM certificates of the CAs, at most 64 KiB, whose client
|
|
1111
|
+
* certificates a client_certificate_required admits besides the
|
|
1112
|
+
* workloads'. Such a certificate is checked for its chain and its expiry
|
|
1113
|
+
* only.
|
|
1114
|
+
*
|
|
1115
|
+
* @generated from field: string ca_bundle = 14;
|
|
1116
|
+
*/
|
|
1117
|
+
caBundle?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* Whether a client_certificate_required admits a workload of another
|
|
1120
|
+
* workspace that an active grant, of connect or more, on the channel's
|
|
1121
|
+
* environment admits.
|
|
1122
|
+
*
|
|
1123
|
+
* @generated from field: bool grants = 15;
|
|
1124
|
+
*/
|
|
1125
|
+
grants?: boolean;
|
|
573
1126
|
};
|
|
574
1127
|
/**
|
|
575
1128
|
* Describes the message toshi.workspace.v1.ChannelModule.
|
|
@@ -1005,7 +1558,8 @@ export declare const ChannelBodySchema: GenMessage<ChannelBody, {
|
|
|
1005
1558
|
* Forward is one open Forward: what it reaches in the guest, named as the
|
|
1006
1559
|
* audit log names it (a command by its first word only), who opened it,
|
|
1007
1560
|
* with the device of the connect token that admitted them, and the http
|
|
1008
|
-
* channel whose connection carries it, if one does
|
|
1561
|
+
* channel whose connection carries it, if one does, and the grant it was
|
|
1562
|
+
* opened through, if one was.
|
|
1009
1563
|
*
|
|
1010
1564
|
* @generated from message toshi.workspace.v1.Forward
|
|
1011
1565
|
*/
|
|
@@ -1030,12 +1584,20 @@ export type Forward = Message<"toshi.workspace.v1.Forward"> & {
|
|
|
1030
1584
|
* @generated from field: google.protobuf.Timestamp opened_at = 5;
|
|
1031
1585
|
*/
|
|
1032
1586
|
openedAt?: Timestamp | undefined;
|
|
1587
|
+
/**
|
|
1588
|
+
* The grant through which another workspace's caller opened it, or
|
|
1589
|
+
* empty for one the job's own workspace opened.
|
|
1590
|
+
*
|
|
1591
|
+
* @generated from field: string grant_id = 6;
|
|
1592
|
+
*/
|
|
1593
|
+
grantId: string;
|
|
1033
1594
|
};
|
|
1034
1595
|
/**
|
|
1035
1596
|
* Forward is one open Forward: what it reaches in the guest, named as the
|
|
1036
1597
|
* audit log names it (a command by its first word only), who opened it,
|
|
1037
1598
|
* with the device of the connect token that admitted them, and the http
|
|
1038
|
-
* channel whose connection carries it, if one does
|
|
1599
|
+
* channel whose connection carries it, if one does, and the grant it was
|
|
1600
|
+
* opened through, if one was.
|
|
1039
1601
|
*
|
|
1040
1602
|
* @generated from message toshi.workspace.v1.Forward
|
|
1041
1603
|
*/
|
|
@@ -1060,6 +1622,13 @@ export type ForwardJson = {
|
|
|
1060
1622
|
* @generated from field: google.protobuf.Timestamp opened_at = 5;
|
|
1061
1623
|
*/
|
|
1062
1624
|
openedAt?: TimestampJson;
|
|
1625
|
+
/**
|
|
1626
|
+
* The grant through which another workspace's caller opened it, or
|
|
1627
|
+
* empty for one the job's own workspace opened.
|
|
1628
|
+
*
|
|
1629
|
+
* @generated from field: string grant_id = 6;
|
|
1630
|
+
*/
|
|
1631
|
+
grantId?: string;
|
|
1063
1632
|
};
|
|
1064
1633
|
/**
|
|
1065
1634
|
* Describes the message toshi.workspace.v1.Forward.
|
|
@@ -1080,7 +1649,8 @@ export type Link = Message<"toshi.workspace.v1.Link"> & {
|
|
|
1080
1649
|
*/
|
|
1081
1650
|
connected: boolean;
|
|
1082
1651
|
/**
|
|
1083
|
-
* Since when it has been connected; unset while it is not
|
|
1652
|
+
* Since when it has been connected; unset while it is not, and while
|
|
1653
|
+
* another process of the control plane holds the link.
|
|
1084
1654
|
*
|
|
1085
1655
|
* @generated from field: google.protobuf.Timestamp since = 2;
|
|
1086
1656
|
*/
|
|
@@ -1132,7 +1702,8 @@ export type LinkJson = {
|
|
|
1132
1702
|
*/
|
|
1133
1703
|
connected?: boolean;
|
|
1134
1704
|
/**
|
|
1135
|
-
* Since when it has been connected; unset while it is not
|
|
1705
|
+
* Since when it has been connected; unset while it is not, and while
|
|
1706
|
+
* another process of the control plane holds the link.
|
|
1136
1707
|
*
|
|
1137
1708
|
* @generated from field: google.protobuf.Timestamp since = 2;
|
|
1138
1709
|
*/
|
|
@@ -1214,6 +1785,20 @@ export type CreateChannelRequest = Message<"toshi.workspace.v1.CreateChannelRequ
|
|
|
1214
1785
|
* @generated from field: toshi.workspace.v1.ChannelPolicy policy = 5;
|
|
1215
1786
|
*/
|
|
1216
1787
|
policy?: ChannelPolicy | undefined;
|
|
1788
|
+
/**
|
|
1789
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
1790
|
+
* sandbox's job through it (docs/grants.md).
|
|
1791
|
+
*
|
|
1792
|
+
* @generated from field: string grant = 6;
|
|
1793
|
+
*/
|
|
1794
|
+
grant: string;
|
|
1795
|
+
/**
|
|
1796
|
+
* A key that makes the call safe to retry: a retry with the same key and
|
|
1797
|
+
* the same request answers with the channel the first call made.
|
|
1798
|
+
*
|
|
1799
|
+
* @generated from field: string request_key = 7;
|
|
1800
|
+
*/
|
|
1801
|
+
requestKey: string;
|
|
1217
1802
|
};
|
|
1218
1803
|
/**
|
|
1219
1804
|
* @generated from message toshi.workspace.v1.CreateChannelRequest
|
|
@@ -1250,6 +1835,20 @@ export type CreateChannelRequestJson = {
|
|
|
1250
1835
|
* @generated from field: toshi.workspace.v1.ChannelPolicy policy = 5;
|
|
1251
1836
|
*/
|
|
1252
1837
|
policy?: ChannelPolicyJson;
|
|
1838
|
+
/**
|
|
1839
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
1840
|
+
* sandbox's job through it (docs/grants.md).
|
|
1841
|
+
*
|
|
1842
|
+
* @generated from field: string grant = 6;
|
|
1843
|
+
*/
|
|
1844
|
+
grant?: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* A key that makes the call safe to retry: a retry with the same key and
|
|
1847
|
+
* the same request answers with the channel the first call made.
|
|
1848
|
+
*
|
|
1849
|
+
* @generated from field: string request_key = 7;
|
|
1850
|
+
*/
|
|
1851
|
+
requestKey?: string;
|
|
1253
1852
|
};
|
|
1254
1853
|
/**
|
|
1255
1854
|
* Describes the message toshi.workspace.v1.CreateChannelRequest.
|
|
@@ -1288,7 +1887,8 @@ export declare const CreateChannelResponseSchema: GenMessage<CreateChannelRespon
|
|
|
1288
1887
|
*/
|
|
1289
1888
|
export type ListChannelsRequest = Message<"toshi.workspace.v1.ListChannelsRequest"> & {
|
|
1290
1889
|
/**
|
|
1291
|
-
* Only this job's channels; empty lists every job's
|
|
1890
|
+
* Only this job's channels; empty lists every job's, and every
|
|
1891
|
+
* service's event channels.
|
|
1292
1892
|
*
|
|
1293
1893
|
* @generated from field: string job_id = 1;
|
|
1294
1894
|
*/
|
|
@@ -1305,13 +1905,27 @@ export type ListChannelsRequest = Message<"toshi.workspace.v1.ListChannelsReques
|
|
|
1305
1905
|
* @generated from field: string page_token = 3;
|
|
1306
1906
|
*/
|
|
1307
1907
|
pageToken: string;
|
|
1908
|
+
/**
|
|
1909
|
+
* Only this service's event channels, by its ID; not with job_id.
|
|
1910
|
+
*
|
|
1911
|
+
* @generated from field: string service = 4;
|
|
1912
|
+
*/
|
|
1913
|
+
service: string;
|
|
1914
|
+
/**
|
|
1915
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
1916
|
+
* sandbox's job through it (docs/grants.md).
|
|
1917
|
+
*
|
|
1918
|
+
* @generated from field: string grant = 5;
|
|
1919
|
+
*/
|
|
1920
|
+
grant: string;
|
|
1308
1921
|
};
|
|
1309
1922
|
/**
|
|
1310
1923
|
* @generated from message toshi.workspace.v1.ListChannelsRequest
|
|
1311
1924
|
*/
|
|
1312
1925
|
export type ListChannelsRequestJson = {
|
|
1313
1926
|
/**
|
|
1314
|
-
* Only this job's channels; empty lists every job's
|
|
1927
|
+
* Only this job's channels; empty lists every job's, and every
|
|
1928
|
+
* service's event channels.
|
|
1315
1929
|
*
|
|
1316
1930
|
* @generated from field: string job_id = 1;
|
|
1317
1931
|
*/
|
|
@@ -1328,6 +1942,19 @@ export type ListChannelsRequestJson = {
|
|
|
1328
1942
|
* @generated from field: string page_token = 3;
|
|
1329
1943
|
*/
|
|
1330
1944
|
pageToken?: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* Only this service's event channels, by its ID; not with job_id.
|
|
1947
|
+
*
|
|
1948
|
+
* @generated from field: string service = 4;
|
|
1949
|
+
*/
|
|
1950
|
+
service?: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
1953
|
+
* sandbox's job through it (docs/grants.md).
|
|
1954
|
+
*
|
|
1955
|
+
* @generated from field: string grant = 5;
|
|
1956
|
+
*/
|
|
1957
|
+
grant?: string;
|
|
1331
1958
|
};
|
|
1332
1959
|
/**
|
|
1333
1960
|
* Describes the message toshi.workspace.v1.ListChannelsRequest.
|
|
@@ -1385,6 +2012,19 @@ export type GetChannelRequest = Message<"toshi.workspace.v1.GetChannelRequest">
|
|
|
1385
2012
|
* @generated from field: string name = 2;
|
|
1386
2013
|
*/
|
|
1387
2014
|
name: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* An event channel's service, by its ID, in place of job_id.
|
|
2017
|
+
*
|
|
2018
|
+
* @generated from field: string service = 3;
|
|
2019
|
+
*/
|
|
2020
|
+
service: string;
|
|
2021
|
+
/**
|
|
2022
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
2023
|
+
* sandbox's job through it (docs/grants.md).
|
|
2024
|
+
*
|
|
2025
|
+
* @generated from field: string grant = 4;
|
|
2026
|
+
*/
|
|
2027
|
+
grant: string;
|
|
1388
2028
|
};
|
|
1389
2029
|
/**
|
|
1390
2030
|
* @generated from message toshi.workspace.v1.GetChannelRequest
|
|
@@ -1395,9 +2035,22 @@ export type GetChannelRequestJson = {
|
|
|
1395
2035
|
*/
|
|
1396
2036
|
jobId?: string;
|
|
1397
2037
|
/**
|
|
1398
|
-
* @generated from field: string name = 2;
|
|
2038
|
+
* @generated from field: string name = 2;
|
|
2039
|
+
*/
|
|
2040
|
+
name?: string;
|
|
2041
|
+
/**
|
|
2042
|
+
* An event channel's service, by its ID, in place of job_id.
|
|
2043
|
+
*
|
|
2044
|
+
* @generated from field: string service = 3;
|
|
2045
|
+
*/
|
|
2046
|
+
service?: string;
|
|
2047
|
+
/**
|
|
2048
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
2049
|
+
* sandbox's job through it (docs/grants.md).
|
|
2050
|
+
*
|
|
2051
|
+
* @generated from field: string grant = 4;
|
|
1399
2052
|
*/
|
|
1400
|
-
|
|
2053
|
+
grant?: string;
|
|
1401
2054
|
};
|
|
1402
2055
|
/**
|
|
1403
2056
|
* Describes the message toshi.workspace.v1.GetChannelRequest.
|
|
@@ -1443,6 +2096,12 @@ export type GetChannelPolicyRequest = Message<"toshi.workspace.v1.GetChannelPoli
|
|
|
1443
2096
|
* @generated from field: string name = 2;
|
|
1444
2097
|
*/
|
|
1445
2098
|
name: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* An event channel's service, by its ID, in place of job_id.
|
|
2101
|
+
*
|
|
2102
|
+
* @generated from field: string service = 3;
|
|
2103
|
+
*/
|
|
2104
|
+
service: string;
|
|
1446
2105
|
};
|
|
1447
2106
|
/**
|
|
1448
2107
|
* @generated from message toshi.workspace.v1.GetChannelPolicyRequest
|
|
@@ -1456,6 +2115,12 @@ export type GetChannelPolicyRequestJson = {
|
|
|
1456
2115
|
* @generated from field: string name = 2;
|
|
1457
2116
|
*/
|
|
1458
2117
|
name?: string;
|
|
2118
|
+
/**
|
|
2119
|
+
* An event channel's service, by its ID, in place of job_id.
|
|
2120
|
+
*
|
|
2121
|
+
* @generated from field: string service = 3;
|
|
2122
|
+
*/
|
|
2123
|
+
service?: string;
|
|
1459
2124
|
};
|
|
1460
2125
|
/**
|
|
1461
2126
|
* Describes the message toshi.workspace.v1.GetChannelPolicyRequest.
|
|
@@ -1507,6 +2172,20 @@ export type SetChannelPolicyRequest = Message<"toshi.workspace.v1.SetChannelPoli
|
|
|
1507
2172
|
* @generated from field: toshi.workspace.v1.ChannelPolicy policy = 3;
|
|
1508
2173
|
*/
|
|
1509
2174
|
policy?: ChannelPolicy | undefined;
|
|
2175
|
+
/**
|
|
2176
|
+
* An event channel's service, by its ID, in place of job_id.
|
|
2177
|
+
*
|
|
2178
|
+
* @generated from field: string service = 4;
|
|
2179
|
+
*/
|
|
2180
|
+
service: string;
|
|
2181
|
+
/**
|
|
2182
|
+
* What the change does to a stream channel's attached clients; unset
|
|
2183
|
+
* keeps them. DRAIN and END on an http or an event channel are
|
|
2184
|
+
* INVALID_ARGUMENT.
|
|
2185
|
+
*
|
|
2186
|
+
* @generated from field: toshi.workspace.v1.ChannelStreams streams = 5;
|
|
2187
|
+
*/
|
|
2188
|
+
streams: ChannelStreams;
|
|
1510
2189
|
};
|
|
1511
2190
|
/**
|
|
1512
2191
|
* @generated from message toshi.workspace.v1.SetChannelPolicyRequest
|
|
@@ -1526,6 +2205,20 @@ export type SetChannelPolicyRequestJson = {
|
|
|
1526
2205
|
* @generated from field: toshi.workspace.v1.ChannelPolicy policy = 3;
|
|
1527
2206
|
*/
|
|
1528
2207
|
policy?: ChannelPolicyJson;
|
|
2208
|
+
/**
|
|
2209
|
+
* An event channel's service, by its ID, in place of job_id.
|
|
2210
|
+
*
|
|
2211
|
+
* @generated from field: string service = 4;
|
|
2212
|
+
*/
|
|
2213
|
+
service?: string;
|
|
2214
|
+
/**
|
|
2215
|
+
* What the change does to a stream channel's attached clients; unset
|
|
2216
|
+
* keeps them. DRAIN and END on an http or an event channel are
|
|
2217
|
+
* INVALID_ARGUMENT.
|
|
2218
|
+
*
|
|
2219
|
+
* @generated from field: toshi.workspace.v1.ChannelStreams streams = 5;
|
|
2220
|
+
*/
|
|
2221
|
+
streams?: ChannelStreamsJson;
|
|
1529
2222
|
};
|
|
1530
2223
|
/**
|
|
1531
2224
|
* Describes the message toshi.workspace.v1.SetChannelPolicyRequest.
|
|
@@ -2028,6 +2721,13 @@ export type CreateChannelConnectTokenRequest = Message<"toshi.workspace.v1.Creat
|
|
|
2028
2721
|
* @generated from field: toshi.workspace.v1.ChannelAttachMode mode = 4;
|
|
2029
2722
|
*/
|
|
2030
2723
|
mode: ChannelAttachMode;
|
|
2724
|
+
/**
|
|
2725
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
2726
|
+
* sandbox's job through it (docs/grants.md).
|
|
2727
|
+
*
|
|
2728
|
+
* @generated from field: string grant = 5;
|
|
2729
|
+
*/
|
|
2730
|
+
grant: string;
|
|
2031
2731
|
};
|
|
2032
2732
|
/**
|
|
2033
2733
|
* @generated from message toshi.workspace.v1.CreateChannelConnectTokenRequest
|
|
@@ -2054,6 +2754,13 @@ export type CreateChannelConnectTokenRequestJson = {
|
|
|
2054
2754
|
* @generated from field: toshi.workspace.v1.ChannelAttachMode mode = 4;
|
|
2055
2755
|
*/
|
|
2056
2756
|
mode?: ChannelAttachModeJson;
|
|
2757
|
+
/**
|
|
2758
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
2759
|
+
* sandbox's job through it (docs/grants.md).
|
|
2760
|
+
*
|
|
2761
|
+
* @generated from field: string grant = 5;
|
|
2762
|
+
*/
|
|
2763
|
+
grant?: string;
|
|
2057
2764
|
};
|
|
2058
2765
|
/**
|
|
2059
2766
|
* Describes the message toshi.workspace.v1.CreateChannelConnectTokenRequest.
|
|
@@ -2213,6 +2920,13 @@ export type DeleteChannelRequest = Message<"toshi.workspace.v1.DeleteChannelRequ
|
|
|
2213
2920
|
* @generated from field: string name = 2;
|
|
2214
2921
|
*/
|
|
2215
2922
|
name: string;
|
|
2923
|
+
/**
|
|
2924
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
2925
|
+
* sandbox's job through it (docs/grants.md).
|
|
2926
|
+
*
|
|
2927
|
+
* @generated from field: string grant = 3;
|
|
2928
|
+
*/
|
|
2929
|
+
grant: string;
|
|
2216
2930
|
};
|
|
2217
2931
|
/**
|
|
2218
2932
|
* @generated from message toshi.workspace.v1.DeleteChannelRequest
|
|
@@ -2226,6 +2940,13 @@ export type DeleteChannelRequestJson = {
|
|
|
2226
2940
|
* @generated from field: string name = 2;
|
|
2227
2941
|
*/
|
|
2228
2942
|
name?: string;
|
|
2943
|
+
/**
|
|
2944
|
+
* A grant the caller's workspace received, to act on the owner's
|
|
2945
|
+
* sandbox's job through it (docs/grants.md).
|
|
2946
|
+
*
|
|
2947
|
+
* @generated from field: string grant = 3;
|
|
2948
|
+
*/
|
|
2949
|
+
grant?: string;
|
|
2229
2950
|
};
|
|
2230
2951
|
/**
|
|
2231
2952
|
* Describes the message toshi.workspace.v1.DeleteChannelRequest.
|
|
@@ -2385,6 +3106,294 @@ export type GetLinkResponseJson = {
|
|
|
2385
3106
|
export declare const GetLinkResponseSchema: GenMessage<GetLinkResponse, {
|
|
2386
3107
|
jsonType: GetLinkResponseJson;
|
|
2387
3108
|
}>;
|
|
3109
|
+
/**
|
|
3110
|
+
* @generated from message toshi.workspace.v1.SendChannelMessageRequest
|
|
3111
|
+
*/
|
|
3112
|
+
export type SendChannelMessageRequest = Message<"toshi.workspace.v1.SendChannelMessageRequest"> & {
|
|
3113
|
+
/**
|
|
3114
|
+
* The event channel's service, by its ID, and the channel's name.
|
|
3115
|
+
*
|
|
3116
|
+
* @generated from field: string service = 1;
|
|
3117
|
+
*/
|
|
3118
|
+
service: string;
|
|
3119
|
+
/**
|
|
3120
|
+
* @generated from field: string channel = 2;
|
|
3121
|
+
*/
|
|
3122
|
+
channel: string;
|
|
3123
|
+
/**
|
|
3124
|
+
* The message's name, such as order.paid: up to 200 bytes with no space
|
|
3125
|
+
* or control character.
|
|
3126
|
+
*
|
|
3127
|
+
* @generated from field: string name = 3;
|
|
3128
|
+
*/
|
|
3129
|
+
name: string;
|
|
3130
|
+
/**
|
|
3131
|
+
* The message's JSON, at most 256 KiB.
|
|
3132
|
+
*
|
|
3133
|
+
* @generated from field: bytes data = 4;
|
|
3134
|
+
*/
|
|
3135
|
+
data: Uint8Array;
|
|
3136
|
+
/**
|
|
3137
|
+
* Makes the send safe to repeat: a key the channel holds returns that
|
|
3138
|
+
* message.
|
|
3139
|
+
*
|
|
3140
|
+
* @generated from field: string request_key = 5;
|
|
3141
|
+
*/
|
|
3142
|
+
requestKey: string;
|
|
3143
|
+
};
|
|
3144
|
+
/**
|
|
3145
|
+
* @generated from message toshi.workspace.v1.SendChannelMessageRequest
|
|
3146
|
+
*/
|
|
3147
|
+
export type SendChannelMessageRequestJson = {
|
|
3148
|
+
/**
|
|
3149
|
+
* The event channel's service, by its ID, and the channel's name.
|
|
3150
|
+
*
|
|
3151
|
+
* @generated from field: string service = 1;
|
|
3152
|
+
*/
|
|
3153
|
+
service?: string;
|
|
3154
|
+
/**
|
|
3155
|
+
* @generated from field: string channel = 2;
|
|
3156
|
+
*/
|
|
3157
|
+
channel?: string;
|
|
3158
|
+
/**
|
|
3159
|
+
* The message's name, such as order.paid: up to 200 bytes with no space
|
|
3160
|
+
* or control character.
|
|
3161
|
+
*
|
|
3162
|
+
* @generated from field: string name = 3;
|
|
3163
|
+
*/
|
|
3164
|
+
name?: string;
|
|
3165
|
+
/**
|
|
3166
|
+
* The message's JSON, at most 256 KiB.
|
|
3167
|
+
*
|
|
3168
|
+
* @generated from field: bytes data = 4;
|
|
3169
|
+
*/
|
|
3170
|
+
data?: string;
|
|
3171
|
+
/**
|
|
3172
|
+
* Makes the send safe to repeat: a key the channel holds returns that
|
|
3173
|
+
* message.
|
|
3174
|
+
*
|
|
3175
|
+
* @generated from field: string request_key = 5;
|
|
3176
|
+
*/
|
|
3177
|
+
requestKey?: string;
|
|
3178
|
+
};
|
|
3179
|
+
/**
|
|
3180
|
+
* Describes the message toshi.workspace.v1.SendChannelMessageRequest.
|
|
3181
|
+
* Use `create(SendChannelMessageRequestSchema)` to create a new message.
|
|
3182
|
+
*/
|
|
3183
|
+
export declare const SendChannelMessageRequestSchema: GenMessage<SendChannelMessageRequest, {
|
|
3184
|
+
jsonType: SendChannelMessageRequestJson;
|
|
3185
|
+
}>;
|
|
3186
|
+
/**
|
|
3187
|
+
* @generated from message toshi.workspace.v1.SendChannelMessageResponse
|
|
3188
|
+
*/
|
|
3189
|
+
export type SendChannelMessageResponse = Message<"toshi.workspace.v1.SendChannelMessageResponse"> & {
|
|
3190
|
+
/**
|
|
3191
|
+
* @generated from field: string message_id = 1;
|
|
3192
|
+
*/
|
|
3193
|
+
messageId: string;
|
|
3194
|
+
/**
|
|
3195
|
+
* Set when request_key named a message sent before.
|
|
3196
|
+
*
|
|
3197
|
+
* @generated from field: bool duplicate = 2;
|
|
3198
|
+
*/
|
|
3199
|
+
duplicate: boolean;
|
|
3200
|
+
};
|
|
3201
|
+
/**
|
|
3202
|
+
* @generated from message toshi.workspace.v1.SendChannelMessageResponse
|
|
3203
|
+
*/
|
|
3204
|
+
export type SendChannelMessageResponseJson = {
|
|
3205
|
+
/**
|
|
3206
|
+
* @generated from field: string message_id = 1;
|
|
3207
|
+
*/
|
|
3208
|
+
messageId?: string;
|
|
3209
|
+
/**
|
|
3210
|
+
* Set when request_key named a message sent before.
|
|
3211
|
+
*
|
|
3212
|
+
* @generated from field: bool duplicate = 2;
|
|
3213
|
+
*/
|
|
3214
|
+
duplicate?: boolean;
|
|
3215
|
+
};
|
|
3216
|
+
/**
|
|
3217
|
+
* Describes the message toshi.workspace.v1.SendChannelMessageResponse.
|
|
3218
|
+
* Use `create(SendChannelMessageResponseSchema)` to create a new message.
|
|
3219
|
+
*/
|
|
3220
|
+
export declare const SendChannelMessageResponseSchema: GenMessage<SendChannelMessageResponse, {
|
|
3221
|
+
jsonType: SendChannelMessageResponseJson;
|
|
3222
|
+
}>;
|
|
3223
|
+
/**
|
|
3224
|
+
* @generated from message toshi.workspace.v1.TailChannelMessagesRequest
|
|
3225
|
+
*/
|
|
3226
|
+
export type TailChannelMessagesRequest = Message<"toshi.workspace.v1.TailChannelMessagesRequest"> & {
|
|
3227
|
+
/**
|
|
3228
|
+
* The event channel's service, by its ID, and the channel's name.
|
|
3229
|
+
*
|
|
3230
|
+
* @generated from field: string service = 1;
|
|
3231
|
+
*/
|
|
3232
|
+
service: string;
|
|
3233
|
+
/**
|
|
3234
|
+
* @generated from field: string channel = 2;
|
|
3235
|
+
*/
|
|
3236
|
+
channel: string;
|
|
3237
|
+
/**
|
|
3238
|
+
* Only messages in these states; empty is every state.
|
|
3239
|
+
*
|
|
3240
|
+
* @generated from field: repeated toshi.workspace.v1.ChannelMessageState states = 3;
|
|
3241
|
+
*/
|
|
3242
|
+
states: ChannelMessageState[];
|
|
3243
|
+
/**
|
|
3244
|
+
* A next_cursor from an earlier response; empty starts at the first
|
|
3245
|
+
* message kept.
|
|
3246
|
+
*
|
|
3247
|
+
* @generated from field: string cursor = 4;
|
|
3248
|
+
*/
|
|
3249
|
+
cursor: string;
|
|
3250
|
+
};
|
|
3251
|
+
/**
|
|
3252
|
+
* @generated from message toshi.workspace.v1.TailChannelMessagesRequest
|
|
3253
|
+
*/
|
|
3254
|
+
export type TailChannelMessagesRequestJson = {
|
|
3255
|
+
/**
|
|
3256
|
+
* The event channel's service, by its ID, and the channel's name.
|
|
3257
|
+
*
|
|
3258
|
+
* @generated from field: string service = 1;
|
|
3259
|
+
*/
|
|
3260
|
+
service?: string;
|
|
3261
|
+
/**
|
|
3262
|
+
* @generated from field: string channel = 2;
|
|
3263
|
+
*/
|
|
3264
|
+
channel?: string;
|
|
3265
|
+
/**
|
|
3266
|
+
* Only messages in these states; empty is every state.
|
|
3267
|
+
*
|
|
3268
|
+
* @generated from field: repeated toshi.workspace.v1.ChannelMessageState states = 3;
|
|
3269
|
+
*/
|
|
3270
|
+
states?: ChannelMessageStateJson[];
|
|
3271
|
+
/**
|
|
3272
|
+
* A next_cursor from an earlier response; empty starts at the first
|
|
3273
|
+
* message kept.
|
|
3274
|
+
*
|
|
3275
|
+
* @generated from field: string cursor = 4;
|
|
3276
|
+
*/
|
|
3277
|
+
cursor?: string;
|
|
3278
|
+
};
|
|
3279
|
+
/**
|
|
3280
|
+
* Describes the message toshi.workspace.v1.TailChannelMessagesRequest.
|
|
3281
|
+
* Use `create(TailChannelMessagesRequestSchema)` to create a new message.
|
|
3282
|
+
*/
|
|
3283
|
+
export declare const TailChannelMessagesRequestSchema: GenMessage<TailChannelMessagesRequest, {
|
|
3284
|
+
jsonType: TailChannelMessagesRequestJson;
|
|
3285
|
+
}>;
|
|
3286
|
+
/**
|
|
3287
|
+
* @generated from message toshi.workspace.v1.TailChannelMessagesResponse
|
|
3288
|
+
*/
|
|
3289
|
+
export type TailChannelMessagesResponse = Message<"toshi.workspace.v1.TailChannelMessagesResponse"> & {
|
|
3290
|
+
/**
|
|
3291
|
+
* @generated from field: toshi.workspace.v1.ChannelMessage message = 1;
|
|
3292
|
+
*/
|
|
3293
|
+
message?: ChannelMessage | undefined;
|
|
3294
|
+
/**
|
|
3295
|
+
* Where a later call goes on from, after this message.
|
|
3296
|
+
*
|
|
3297
|
+
* @generated from field: string next_cursor = 2;
|
|
3298
|
+
*/
|
|
3299
|
+
nextCursor: string;
|
|
3300
|
+
};
|
|
3301
|
+
/**
|
|
3302
|
+
* @generated from message toshi.workspace.v1.TailChannelMessagesResponse
|
|
3303
|
+
*/
|
|
3304
|
+
export type TailChannelMessagesResponseJson = {
|
|
3305
|
+
/**
|
|
3306
|
+
* @generated from field: toshi.workspace.v1.ChannelMessage message = 1;
|
|
3307
|
+
*/
|
|
3308
|
+
message?: ChannelMessageJson;
|
|
3309
|
+
/**
|
|
3310
|
+
* Where a later call goes on from, after this message.
|
|
3311
|
+
*
|
|
3312
|
+
* @generated from field: string next_cursor = 2;
|
|
3313
|
+
*/
|
|
3314
|
+
nextCursor?: string;
|
|
3315
|
+
};
|
|
3316
|
+
/**
|
|
3317
|
+
* Describes the message toshi.workspace.v1.TailChannelMessagesResponse.
|
|
3318
|
+
* Use `create(TailChannelMessagesResponseSchema)` to create a new message.
|
|
3319
|
+
*/
|
|
3320
|
+
export declare const TailChannelMessagesResponseSchema: GenMessage<TailChannelMessagesResponse, {
|
|
3321
|
+
jsonType: TailChannelMessagesResponseJson;
|
|
3322
|
+
}>;
|
|
3323
|
+
/**
|
|
3324
|
+
* @generated from message toshi.workspace.v1.ReplayChannelMessageRequest
|
|
3325
|
+
*/
|
|
3326
|
+
export type ReplayChannelMessageRequest = Message<"toshi.workspace.v1.ReplayChannelMessageRequest"> & {
|
|
3327
|
+
/**
|
|
3328
|
+
* The event channel's service, by its ID, and the channel's name.
|
|
3329
|
+
*
|
|
3330
|
+
* @generated from field: string service = 1;
|
|
3331
|
+
*/
|
|
3332
|
+
service: string;
|
|
3333
|
+
/**
|
|
3334
|
+
* @generated from field: string channel = 2;
|
|
3335
|
+
*/
|
|
3336
|
+
channel: string;
|
|
3337
|
+
/**
|
|
3338
|
+
* @generated from field: string message_id = 3;
|
|
3339
|
+
*/
|
|
3340
|
+
messageId: string;
|
|
3341
|
+
};
|
|
3342
|
+
/**
|
|
3343
|
+
* @generated from message toshi.workspace.v1.ReplayChannelMessageRequest
|
|
3344
|
+
*/
|
|
3345
|
+
export type ReplayChannelMessageRequestJson = {
|
|
3346
|
+
/**
|
|
3347
|
+
* The event channel's service, by its ID, and the channel's name.
|
|
3348
|
+
*
|
|
3349
|
+
* @generated from field: string service = 1;
|
|
3350
|
+
*/
|
|
3351
|
+
service?: string;
|
|
3352
|
+
/**
|
|
3353
|
+
* @generated from field: string channel = 2;
|
|
3354
|
+
*/
|
|
3355
|
+
channel?: string;
|
|
3356
|
+
/**
|
|
3357
|
+
* @generated from field: string message_id = 3;
|
|
3358
|
+
*/
|
|
3359
|
+
messageId?: string;
|
|
3360
|
+
};
|
|
3361
|
+
/**
|
|
3362
|
+
* Describes the message toshi.workspace.v1.ReplayChannelMessageRequest.
|
|
3363
|
+
* Use `create(ReplayChannelMessageRequestSchema)` to create a new message.
|
|
3364
|
+
*/
|
|
3365
|
+
export declare const ReplayChannelMessageRequestSchema: GenMessage<ReplayChannelMessageRequest, {
|
|
3366
|
+
jsonType: ReplayChannelMessageRequestJson;
|
|
3367
|
+
}>;
|
|
3368
|
+
/**
|
|
3369
|
+
* @generated from message toshi.workspace.v1.ReplayChannelMessageResponse
|
|
3370
|
+
*/
|
|
3371
|
+
export type ReplayChannelMessageResponse = Message<"toshi.workspace.v1.ReplayChannelMessageResponse"> & {
|
|
3372
|
+
/**
|
|
3373
|
+
* The message as it now is: pending.
|
|
3374
|
+
*
|
|
3375
|
+
* @generated from field: toshi.workspace.v1.ChannelMessage message = 1;
|
|
3376
|
+
*/
|
|
3377
|
+
message?: ChannelMessage | undefined;
|
|
3378
|
+
};
|
|
3379
|
+
/**
|
|
3380
|
+
* @generated from message toshi.workspace.v1.ReplayChannelMessageResponse
|
|
3381
|
+
*/
|
|
3382
|
+
export type ReplayChannelMessageResponseJson = {
|
|
3383
|
+
/**
|
|
3384
|
+
* The message as it now is: pending.
|
|
3385
|
+
*
|
|
3386
|
+
* @generated from field: toshi.workspace.v1.ChannelMessage message = 1;
|
|
3387
|
+
*/
|
|
3388
|
+
message?: ChannelMessageJson;
|
|
3389
|
+
};
|
|
3390
|
+
/**
|
|
3391
|
+
* Describes the message toshi.workspace.v1.ReplayChannelMessageResponse.
|
|
3392
|
+
* Use `create(ReplayChannelMessageResponseSchema)` to create a new message.
|
|
3393
|
+
*/
|
|
3394
|
+
export declare const ReplayChannelMessageResponseSchema: GenMessage<ReplayChannelMessageResponse, {
|
|
3395
|
+
jsonType: ReplayChannelMessageResponseJson;
|
|
3396
|
+
}>;
|
|
2388
3397
|
/**
|
|
2389
3398
|
* ChannelShape is how a channel carries its bytes.
|
|
2390
3399
|
*
|
|
@@ -2406,14 +3415,21 @@ export declare enum ChannelShape {
|
|
|
2406
3415
|
*
|
|
2407
3416
|
* @generated from enum value: CHANNEL_SHAPE_STREAM = 2;
|
|
2408
3417
|
*/
|
|
2409
|
-
STREAM = 2
|
|
3418
|
+
STREAM = 2,
|
|
3419
|
+
/**
|
|
3420
|
+
* A service's queue of messages, posted to a port and path in its
|
|
3421
|
+
* guest, signed with the Standard Webhooks headers, at least once.
|
|
3422
|
+
*
|
|
3423
|
+
* @generated from enum value: CHANNEL_SHAPE_EVENT = 3;
|
|
3424
|
+
*/
|
|
3425
|
+
EVENT = 3
|
|
2410
3426
|
}
|
|
2411
3427
|
/**
|
|
2412
3428
|
* ChannelShape is how a channel carries its bytes.
|
|
2413
3429
|
*
|
|
2414
3430
|
* @generated from enum toshi.workspace.v1.ChannelShape
|
|
2415
3431
|
*/
|
|
2416
|
-
export type ChannelShapeJson = "CHANNEL_SHAPE_UNSPECIFIED" | "CHANNEL_SHAPE_HTTP" | "CHANNEL_SHAPE_STREAM";
|
|
3432
|
+
export type ChannelShapeJson = "CHANNEL_SHAPE_UNSPECIFIED" | "CHANNEL_SHAPE_HTTP" | "CHANNEL_SHAPE_STREAM" | "CHANNEL_SHAPE_EVENT";
|
|
2417
3433
|
/**
|
|
2418
3434
|
* Describes the enum toshi.workspace.v1.ChannelShape.
|
|
2419
3435
|
*/
|
|
@@ -2492,6 +3508,51 @@ export type ChannelAttachModeJson = "CHANNEL_ATTACH_MODE_UNSPECIFIED" | "CHANNEL
|
|
|
2492
3508
|
* Describes the enum toshi.workspace.v1.ChannelAttachMode.
|
|
2493
3509
|
*/
|
|
2494
3510
|
export declare const ChannelAttachModeSchema: GenEnum<ChannelAttachMode, ChannelAttachModeJson>;
|
|
3511
|
+
/**
|
|
3512
|
+
* ChannelStreams is what a policy change does to a stream channel's
|
|
3513
|
+
* clients attached under the policy it replaces.
|
|
3514
|
+
*
|
|
3515
|
+
* @generated from enum toshi.workspace.v1.ChannelStreams
|
|
3516
|
+
*/
|
|
3517
|
+
export declare enum ChannelStreams {
|
|
3518
|
+
/**
|
|
3519
|
+
* As KEEP.
|
|
3520
|
+
*
|
|
3521
|
+
* @generated from enum value: CHANNEL_STREAMS_UNSPECIFIED = 0;
|
|
3522
|
+
*/
|
|
3523
|
+
UNSPECIFIED = 0,
|
|
3524
|
+
/**
|
|
3525
|
+
* They stay attached; only those the new policy no longer admits, or now
|
|
3526
|
+
* grants read_only while they hold input, end.
|
|
3527
|
+
*
|
|
3528
|
+
* @generated from enum value: CHANNEL_STREAMS_KEEP = 1;
|
|
3529
|
+
*/
|
|
3530
|
+
KEEP = 1,
|
|
3531
|
+
/**
|
|
3532
|
+
* They stay attached for up to 30 seconds, then end with the reason
|
|
3533
|
+
* "reconnect", so each client attaches again under the new policy.
|
|
3534
|
+
*
|
|
3535
|
+
* @generated from enum value: CHANNEL_STREAMS_DRAIN = 2;
|
|
3536
|
+
*/
|
|
3537
|
+
DRAIN = 2,
|
|
3538
|
+
/**
|
|
3539
|
+
* They end now with the reason "policy_changed".
|
|
3540
|
+
*
|
|
3541
|
+
* @generated from enum value: CHANNEL_STREAMS_END = 3;
|
|
3542
|
+
*/
|
|
3543
|
+
END = 3
|
|
3544
|
+
}
|
|
3545
|
+
/**
|
|
3546
|
+
* ChannelStreams is what a policy change does to a stream channel's
|
|
3547
|
+
* clients attached under the policy it replaces.
|
|
3548
|
+
*
|
|
3549
|
+
* @generated from enum toshi.workspace.v1.ChannelStreams
|
|
3550
|
+
*/
|
|
3551
|
+
export type ChannelStreamsJson = "CHANNEL_STREAMS_UNSPECIFIED" | "CHANNEL_STREAMS_KEEP" | "CHANNEL_STREAMS_DRAIN" | "CHANNEL_STREAMS_END";
|
|
3552
|
+
/**
|
|
3553
|
+
* Describes the enum toshi.workspace.v1.ChannelStreams.
|
|
3554
|
+
*/
|
|
3555
|
+
export declare const ChannelStreamsSchema: GenEnum<ChannelStreams, ChannelStreamsJson>;
|
|
2495
3556
|
/**
|
|
2496
3557
|
* ChannelLog names the log of a channel an export carries.
|
|
2497
3558
|
*
|
|
@@ -2525,6 +3586,61 @@ export type ChannelLogJson = "CHANNEL_LOG_UNSPECIFIED" | "CHANNEL_LOG_OUTPUT" |
|
|
|
2525
3586
|
* Describes the enum toshi.workspace.v1.ChannelLog.
|
|
2526
3587
|
*/
|
|
2527
3588
|
export declare const ChannelLogSchema: GenEnum<ChannelLog, ChannelLogJson>;
|
|
3589
|
+
/**
|
|
3590
|
+
* ChannelMessageState is where an event channel's message is in its
|
|
3591
|
+
* delivery.
|
|
3592
|
+
*
|
|
3593
|
+
* @generated from enum toshi.workspace.v1.ChannelMessageState
|
|
3594
|
+
*/
|
|
3595
|
+
export declare enum ChannelMessageState {
|
|
3596
|
+
/**
|
|
3597
|
+
* @generated from enum value: CHANNEL_MESSAGE_STATE_UNSPECIFIED = 0;
|
|
3598
|
+
*/
|
|
3599
|
+
UNSPECIFIED = 0,
|
|
3600
|
+
/**
|
|
3601
|
+
* Waiting for its next attempt.
|
|
3602
|
+
*
|
|
3603
|
+
* @generated from enum value: CHANNEL_MESSAGE_STATE_PENDING = 1;
|
|
3604
|
+
*/
|
|
3605
|
+
PENDING = 1,
|
|
3606
|
+
/**
|
|
3607
|
+
* Posted, and not yet answered.
|
|
3608
|
+
*
|
|
3609
|
+
* @generated from enum value: CHANNEL_MESSAGE_STATE_IN_FLIGHT = 2;
|
|
3610
|
+
*/
|
|
3611
|
+
IN_FLIGHT = 2,
|
|
3612
|
+
/**
|
|
3613
|
+
* Answered 2xx.
|
|
3614
|
+
*
|
|
3615
|
+
* @generated from enum value: CHANNEL_MESSAGE_STATE_DELIVERED = 3;
|
|
3616
|
+
*/
|
|
3617
|
+
DELIVERED = 3,
|
|
3618
|
+
/**
|
|
3619
|
+
* Parked after an hour of failed attempts from its send or replay. The
|
|
3620
|
+
* messages after it are still delivered; ReplayChannelMessage puts it
|
|
3621
|
+
* back.
|
|
3622
|
+
*
|
|
3623
|
+
* @generated from enum value: CHANNEL_MESSAGE_STATE_FAILED = 4;
|
|
3624
|
+
*/
|
|
3625
|
+
FAILED = 4,
|
|
3626
|
+
/**
|
|
3627
|
+
* Its channel's keep passed before it was delivered.
|
|
3628
|
+
*
|
|
3629
|
+
* @generated from enum value: CHANNEL_MESSAGE_STATE_EXPIRED = 5;
|
|
3630
|
+
*/
|
|
3631
|
+
EXPIRED = 5
|
|
3632
|
+
}
|
|
3633
|
+
/**
|
|
3634
|
+
* ChannelMessageState is where an event channel's message is in its
|
|
3635
|
+
* delivery.
|
|
3636
|
+
*
|
|
3637
|
+
* @generated from enum toshi.workspace.v1.ChannelMessageState
|
|
3638
|
+
*/
|
|
3639
|
+
export type ChannelMessageStateJson = "CHANNEL_MESSAGE_STATE_UNSPECIFIED" | "CHANNEL_MESSAGE_STATE_PENDING" | "CHANNEL_MESSAGE_STATE_IN_FLIGHT" | "CHANNEL_MESSAGE_STATE_DELIVERED" | "CHANNEL_MESSAGE_STATE_FAILED" | "CHANNEL_MESSAGE_STATE_EXPIRED";
|
|
3640
|
+
/**
|
|
3641
|
+
* Describes the enum toshi.workspace.v1.ChannelMessageState.
|
|
3642
|
+
*/
|
|
3643
|
+
export declare const ChannelMessageStateSchema: GenEnum<ChannelMessageState, ChannelMessageStateJson>;
|
|
2528
3644
|
/**
|
|
2529
3645
|
* ChannelService manages the channels of the workspace's jobs, lists a
|
|
2530
3646
|
* job's Forwards and reads its Link. A channel is a port in the job's
|
|
@@ -2534,6 +3650,12 @@ export declare const ChannelLogSchema: GenEnum<ChannelLog, ChannelLogJson>;
|
|
|
2534
3650
|
* is NOT_FOUND. Every call names the job by its ID as the jobs API and
|
|
2535
3651
|
* `toshi host-job list` show it, and a channel by its name on that job.
|
|
2536
3652
|
*
|
|
3653
|
+
* An event channel is a service's queue of messages, which Toshi posts to
|
|
3654
|
+
* a port and path in the service's guest, in order and at least once: the
|
|
3655
|
+
* service's recipe declares it, and it lasts while the service does,
|
|
3656
|
+
* across its runs. A call names it by its service's ID and its name, in
|
|
3657
|
+
* service, never by a job.
|
|
3658
|
+
*
|
|
2537
3659
|
* What carries a stream is not a call: a client attaches to a stream
|
|
2538
3660
|
* channel, and a Forward opens, on an upgrade of the control plane's
|
|
2539
3661
|
* connection, with a token from CreateChannelConnectToken. A control
|
|
@@ -2598,7 +3720,11 @@ export declare const ChannelService: GenService<{
|
|
|
2598
3720
|
* changed since that version fails with ABORTED: read it again. A
|
|
2599
3721
|
* malformed policy fails with INVALID_ARGUMENT, and one the channel
|
|
2600
3722
|
* refuses, such as a list without a module that may not be removed,
|
|
2601
|
-
* with FAILED_PRECONDITION.
|
|
3723
|
+
* with FAILED_PRECONDITION. A service's event channel, named by service
|
|
3724
|
+
* in place of job_id, takes what its recipe's policy takes, a keep the
|
|
3725
|
+
* plan allows among it, and keeps the policy set until a deploy whose
|
|
3726
|
+
* recipe changes the channel's policy; its set is recorded as
|
|
3727
|
+
* service.channel_policy_set on the service.
|
|
2602
3728
|
*
|
|
2603
3729
|
* @generated from rpc toshi.workspace.v1.ChannelService.SetChannelPolicy
|
|
2604
3730
|
*/
|
|
@@ -2710,4 +3836,51 @@ export declare const ChannelService: GenService<{
|
|
|
2710
3836
|
input: typeof GetLinkRequestSchema;
|
|
2711
3837
|
output: typeof GetLinkResponseSchema;
|
|
2712
3838
|
};
|
|
3839
|
+
/**
|
|
3840
|
+
* SendChannelMessage adds a message to the end of an event channel's
|
|
3841
|
+
* queue and returns its ID at once; the message waits there until it is
|
|
3842
|
+
* delivered, parked failed, or kept past the channel's keep. A sleeping
|
|
3843
|
+
* on-demand service is woken. A message sent again with the same
|
|
3844
|
+
* request_key is not stored again: its ID is returned, with duplicate
|
|
3845
|
+
* set. A caller the channel's input rule does not admit fails with
|
|
3846
|
+
* PERMISSION_DENIED; a name under a segment Toshi keeps for its own
|
|
3847
|
+
* events, data that is not JSON or past 256 KiB with INVALID_ARGUMENT.
|
|
3848
|
+
* Delivery is at least once: a post whose answer is lost is posted
|
|
3849
|
+
* again with the same webhook-id, the message ID, so a handler drops
|
|
3850
|
+
* repeats by it.
|
|
3851
|
+
*
|
|
3852
|
+
* @generated from rpc toshi.workspace.v1.ChannelService.SendChannelMessage
|
|
3853
|
+
*/
|
|
3854
|
+
sendChannelMessage: {
|
|
3855
|
+
methodKind: "unary";
|
|
3856
|
+
input: typeof SendChannelMessageRequestSchema;
|
|
3857
|
+
output: typeof SendChannelMessageResponseSchema;
|
|
3858
|
+
};
|
|
3859
|
+
/**
|
|
3860
|
+
* TailChannelMessages streams an event channel's messages after the
|
|
3861
|
+
* cursor, oldest first, then each message added after them as it is
|
|
3862
|
+
* added, until the caller ends the call. States narrows the stream to
|
|
3863
|
+
* messages in those states when it is read.
|
|
3864
|
+
*
|
|
3865
|
+
* @generated from rpc toshi.workspace.v1.ChannelService.TailChannelMessages
|
|
3866
|
+
*/
|
|
3867
|
+
tailChannelMessages: {
|
|
3868
|
+
methodKind: "server_streaming";
|
|
3869
|
+
input: typeof TailChannelMessagesRequestSchema;
|
|
3870
|
+
output: typeof TailChannelMessagesResponseSchema;
|
|
3871
|
+
};
|
|
3872
|
+
/**
|
|
3873
|
+
* ReplayChannelMessage puts a failed, expired or delivered message of an
|
|
3874
|
+
* event channel back in its queue under its own ID, so its webhook-id is
|
|
3875
|
+
* the same: its attempts start again from 0, and its keep runs from the
|
|
3876
|
+
* replay. A message pending or in flight fails with
|
|
3877
|
+
* FAILED_PRECONDITION.
|
|
3878
|
+
*
|
|
3879
|
+
* @generated from rpc toshi.workspace.v1.ChannelService.ReplayChannelMessage
|
|
3880
|
+
*/
|
|
3881
|
+
replayChannelMessage: {
|
|
3882
|
+
methodKind: "unary";
|
|
3883
|
+
input: typeof ReplayChannelMessageRequestSchema;
|
|
3884
|
+
output: typeof ReplayChannelMessageResponseSchema;
|
|
3885
|
+
};
|
|
2713
3886
|
}>;
|