@toshicloud/sdk 0.0.0-stage → 0.2.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.
Files changed (39) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +201 -2
  3. package/dist/client.d.ts +78 -0
  4. package/dist/client.js +42 -0
  5. package/dist/errors.d.ts +20 -0
  6. package/dist/errors.js +55 -0
  7. package/dist/execute.d.ts +6 -0
  8. package/dist/execute.js +380 -0
  9. package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +841 -0
  10. package/dist/gen/toshi/workspace/v1/artifacts_pb.js +96 -0
  11. package/dist/gen/toshi/workspace/v1/display_pb.d.ts +1142 -0
  12. package/dist/gen/toshi/workspace/v1/display_pb.js +214 -0
  13. package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1386 -0
  14. package/dist/gen/toshi/workspace/v1/projects_pb.js +207 -0
  15. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +948 -0
  16. package/dist/gen/toshi/workspace/v1/recordings_pb.js +201 -0
  17. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +1062 -0
  18. package/dist/gen/toshi/workspace/v1/secrets_pb.js +182 -0
  19. package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +406 -0
  20. package/dist/gen/toshi/workspace/v1/volumes_pb.js +107 -0
  21. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +974 -0
  22. package/dist/gen/toshi/workspace/v1/webhook_pb.js +153 -0
  23. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6133 -0
  24. package/dist/gen/toshi/workspace/v1/workspace_pb.js +892 -0
  25. package/dist/index.d.ts +10 -0
  26. package/dist/index.js +9 -0
  27. package/dist/interceptors.d.ts +10 -0
  28. package/dist/interceptors.js +159 -0
  29. package/dist/output.d.ts +6 -0
  30. package/dist/output.js +77 -0
  31. package/dist/retry.d.ts +42 -0
  32. package/dist/retry.js +213 -0
  33. package/dist/stream.d.ts +21 -0
  34. package/dist/stream.js +84 -0
  35. package/dist/wait.d.ts +8 -0
  36. package/dist/wait.js +29 -0
  37. package/dist/watch.d.ts +8 -0
  38. package/dist/watch.js +224 -0
  39. package/package.json +47 -4
@@ -0,0 +1,974 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { FieldMask, FieldMaskJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file toshi/workspace/v1/webhook.proto.
6
+ */
7
+ export declare const file_toshi_workspace_v1_webhook: GenFile;
8
+ /**
9
+ * @generated from message toshi.workspace.v1.WebhookEndpoint
10
+ */
11
+ export type WebhookEndpoint = Message<"toshi.workspace.v1.WebhookEndpoint"> & {
12
+ /**
13
+ * Assigned by the server; unique within the workspace.
14
+ *
15
+ * @generated from field: string id = 1;
16
+ */
17
+ id: string;
18
+ /**
19
+ * An https URL with a host and no user or password, at most 2048 bytes.
20
+ *
21
+ * @generated from field: string url = 2;
22
+ */
23
+ url: string;
24
+ /**
25
+ * The event names the endpoint is owed, each a name (job.state_changed)
26
+ * or a prefix ending in ".*" (job.*); at most 64. Empty keeps every
27
+ * event.
28
+ *
29
+ * @generated from field: repeated string events = 3;
30
+ */
31
+ events: string[];
32
+ /**
33
+ * @generated from field: bool enabled = 4;
34
+ */
35
+ enabled: boolean;
36
+ /**
37
+ * The position in the workspace's event log the endpoint has read up to,
38
+ * an Event's cursor.
39
+ *
40
+ * @generated from field: string cursor = 5;
41
+ */
42
+ cursor: string;
43
+ /**
44
+ * When the secret the last rotation replaced stops signing; unset when
45
+ * no such secret signs.
46
+ *
47
+ * @generated from field: google.protobuf.Timestamp previous_secret_expires_at = 6;
48
+ */
49
+ previousSecretExpiresAt?: Timestamp | undefined;
50
+ /**
51
+ * @generated from field: google.protobuf.Timestamp created_at = 7;
52
+ */
53
+ createdAt?: Timestamp | undefined;
54
+ /**
55
+ * @generated from field: google.protobuf.Timestamp updated_at = 8;
56
+ */
57
+ updatedAt?: Timestamp | undefined;
58
+ };
59
+ /**
60
+ * @generated from message toshi.workspace.v1.WebhookEndpoint
61
+ */
62
+ export type WebhookEndpointJson = {
63
+ /**
64
+ * Assigned by the server; unique within the workspace.
65
+ *
66
+ * @generated from field: string id = 1;
67
+ */
68
+ id?: string;
69
+ /**
70
+ * An https URL with a host and no user or password, at most 2048 bytes.
71
+ *
72
+ * @generated from field: string url = 2;
73
+ */
74
+ url?: string;
75
+ /**
76
+ * The event names the endpoint is owed, each a name (job.state_changed)
77
+ * or a prefix ending in ".*" (job.*); at most 64. Empty keeps every
78
+ * event.
79
+ *
80
+ * @generated from field: repeated string events = 3;
81
+ */
82
+ events?: string[];
83
+ /**
84
+ * @generated from field: bool enabled = 4;
85
+ */
86
+ enabled?: boolean;
87
+ /**
88
+ * The position in the workspace's event log the endpoint has read up to,
89
+ * an Event's cursor.
90
+ *
91
+ * @generated from field: string cursor = 5;
92
+ */
93
+ cursor?: string;
94
+ /**
95
+ * When the secret the last rotation replaced stops signing; unset when
96
+ * no such secret signs.
97
+ *
98
+ * @generated from field: google.protobuf.Timestamp previous_secret_expires_at = 6;
99
+ */
100
+ previousSecretExpiresAt?: TimestampJson;
101
+ /**
102
+ * @generated from field: google.protobuf.Timestamp created_at = 7;
103
+ */
104
+ createdAt?: TimestampJson;
105
+ /**
106
+ * @generated from field: google.protobuf.Timestamp updated_at = 8;
107
+ */
108
+ updatedAt?: TimestampJson;
109
+ };
110
+ /**
111
+ * Describes the message toshi.workspace.v1.WebhookEndpoint.
112
+ * Use `create(WebhookEndpointSchema)` to create a new message.
113
+ */
114
+ export declare const WebhookEndpointSchema: GenMessage<WebhookEndpoint, {
115
+ jsonType: WebhookEndpointJson;
116
+ }>;
117
+ /**
118
+ * WebhookDelivery is one event owed to one endpoint.
119
+ *
120
+ * @generated from message toshi.workspace.v1.WebhookDelivery
121
+ */
122
+ export type WebhookDelivery = Message<"toshi.workspace.v1.WebhookDelivery"> & {
123
+ /**
124
+ * @generated from field: string event_id = 1;
125
+ */
126
+ eventId: string;
127
+ /**
128
+ * The event's cursor.
129
+ *
130
+ * @generated from field: string cursor = 2;
131
+ */
132
+ cursor: string;
133
+ /**
134
+ * @generated from field: string workload_id = 3;
135
+ */
136
+ workloadId: string;
137
+ /**
138
+ * @generated from field: toshi.workspace.v1.WebhookDeliveryState state = 4;
139
+ */
140
+ state: WebhookDeliveryState;
141
+ /**
142
+ * Tries since the delivery was last due.
143
+ *
144
+ * @generated from field: int32 tries = 5;
145
+ */
146
+ tries: number;
147
+ /**
148
+ * When it may next be tried; set while it is pending.
149
+ *
150
+ * @generated from field: google.protobuf.Timestamp next_try_at = 6;
151
+ */
152
+ nextTryAt?: Timestamp | undefined;
153
+ /**
154
+ * The last try's HTTP status; 0 when no answer came or none was tried.
155
+ *
156
+ * @generated from field: int32 last_status = 7;
157
+ */
158
+ lastStatus: number;
159
+ /**
160
+ * The last try's error, which never carries the URL.
161
+ *
162
+ * @generated from field: string last_error = 8;
163
+ */
164
+ lastError: string;
165
+ /**
166
+ * @generated from field: google.protobuf.Timestamp due_at = 9;
167
+ */
168
+ dueAt?: Timestamp | undefined;
169
+ /**
170
+ * When it was delivered or given up.
171
+ *
172
+ * @generated from field: google.protobuf.Timestamp done_at = 10;
173
+ */
174
+ doneAt?: Timestamp | undefined;
175
+ };
176
+ /**
177
+ * WebhookDelivery is one event owed to one endpoint.
178
+ *
179
+ * @generated from message toshi.workspace.v1.WebhookDelivery
180
+ */
181
+ export type WebhookDeliveryJson = {
182
+ /**
183
+ * @generated from field: string event_id = 1;
184
+ */
185
+ eventId?: string;
186
+ /**
187
+ * The event's cursor.
188
+ *
189
+ * @generated from field: string cursor = 2;
190
+ */
191
+ cursor?: string;
192
+ /**
193
+ * @generated from field: string workload_id = 3;
194
+ */
195
+ workloadId?: string;
196
+ /**
197
+ * @generated from field: toshi.workspace.v1.WebhookDeliveryState state = 4;
198
+ */
199
+ state?: WebhookDeliveryStateJson;
200
+ /**
201
+ * Tries since the delivery was last due.
202
+ *
203
+ * @generated from field: int32 tries = 5;
204
+ */
205
+ tries?: number;
206
+ /**
207
+ * When it may next be tried; set while it is pending.
208
+ *
209
+ * @generated from field: google.protobuf.Timestamp next_try_at = 6;
210
+ */
211
+ nextTryAt?: TimestampJson;
212
+ /**
213
+ * The last try's HTTP status; 0 when no answer came or none was tried.
214
+ *
215
+ * @generated from field: int32 last_status = 7;
216
+ */
217
+ lastStatus?: number;
218
+ /**
219
+ * The last try's error, which never carries the URL.
220
+ *
221
+ * @generated from field: string last_error = 8;
222
+ */
223
+ lastError?: string;
224
+ /**
225
+ * @generated from field: google.protobuf.Timestamp due_at = 9;
226
+ */
227
+ dueAt?: TimestampJson;
228
+ /**
229
+ * When it was delivered or given up.
230
+ *
231
+ * @generated from field: google.protobuf.Timestamp done_at = 10;
232
+ */
233
+ doneAt?: TimestampJson;
234
+ };
235
+ /**
236
+ * Describes the message toshi.workspace.v1.WebhookDelivery.
237
+ * Use `create(WebhookDeliverySchema)` to create a new message.
238
+ */
239
+ export declare const WebhookDeliverySchema: GenMessage<WebhookDelivery, {
240
+ jsonType: WebhookDeliveryJson;
241
+ }>;
242
+ /**
243
+ * @generated from message toshi.workspace.v1.CreateWebhookEndpointRequest
244
+ */
245
+ export type CreateWebhookEndpointRequest = Message<"toshi.workspace.v1.CreateWebhookEndpointRequest"> & {
246
+ /**
247
+ * @generated from field: string url = 1;
248
+ */
249
+ url: string;
250
+ /**
251
+ * @generated from field: repeated string events = 2;
252
+ */
253
+ events: string[];
254
+ /**
255
+ * Set to make the endpoint disabled.
256
+ *
257
+ * @generated from field: bool disabled = 3;
258
+ */
259
+ disabled: boolean;
260
+ /**
261
+ * @generated from field: string request_key = 4;
262
+ */
263
+ requestKey: string;
264
+ };
265
+ /**
266
+ * @generated from message toshi.workspace.v1.CreateWebhookEndpointRequest
267
+ */
268
+ export type CreateWebhookEndpointRequestJson = {
269
+ /**
270
+ * @generated from field: string url = 1;
271
+ */
272
+ url?: string;
273
+ /**
274
+ * @generated from field: repeated string events = 2;
275
+ */
276
+ events?: string[];
277
+ /**
278
+ * Set to make the endpoint disabled.
279
+ *
280
+ * @generated from field: bool disabled = 3;
281
+ */
282
+ disabled?: boolean;
283
+ /**
284
+ * @generated from field: string request_key = 4;
285
+ */
286
+ requestKey?: string;
287
+ };
288
+ /**
289
+ * Describes the message toshi.workspace.v1.CreateWebhookEndpointRequest.
290
+ * Use `create(CreateWebhookEndpointRequestSchema)` to create a new message.
291
+ */
292
+ export declare const CreateWebhookEndpointRequestSchema: GenMessage<CreateWebhookEndpointRequest, {
293
+ jsonType: CreateWebhookEndpointRequestJson;
294
+ }>;
295
+ /**
296
+ * @generated from message toshi.workspace.v1.CreateWebhookEndpointResponse
297
+ */
298
+ export type CreateWebhookEndpointResponse = Message<"toshi.workspace.v1.CreateWebhookEndpointResponse"> & {
299
+ /**
300
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
301
+ */
302
+ endpoint?: WebhookEndpoint | undefined;
303
+ /**
304
+ * whsec_ and the base64 of 32 random bytes. No other answer carries it.
305
+ *
306
+ * @generated from field: string secret = 2;
307
+ */
308
+ secret: string;
309
+ };
310
+ /**
311
+ * @generated from message toshi.workspace.v1.CreateWebhookEndpointResponse
312
+ */
313
+ export type CreateWebhookEndpointResponseJson = {
314
+ /**
315
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
316
+ */
317
+ endpoint?: WebhookEndpointJson;
318
+ /**
319
+ * whsec_ and the base64 of 32 random bytes. No other answer carries it.
320
+ *
321
+ * @generated from field: string secret = 2;
322
+ */
323
+ secret?: string;
324
+ };
325
+ /**
326
+ * Describes the message toshi.workspace.v1.CreateWebhookEndpointResponse.
327
+ * Use `create(CreateWebhookEndpointResponseSchema)` to create a new message.
328
+ */
329
+ export declare const CreateWebhookEndpointResponseSchema: GenMessage<CreateWebhookEndpointResponse, {
330
+ jsonType: CreateWebhookEndpointResponseJson;
331
+ }>;
332
+ /**
333
+ * @generated from message toshi.workspace.v1.GetWebhookEndpointRequest
334
+ */
335
+ export type GetWebhookEndpointRequest = Message<"toshi.workspace.v1.GetWebhookEndpointRequest"> & {
336
+ /**
337
+ * @generated from field: string id = 1;
338
+ */
339
+ id: string;
340
+ };
341
+ /**
342
+ * @generated from message toshi.workspace.v1.GetWebhookEndpointRequest
343
+ */
344
+ export type GetWebhookEndpointRequestJson = {
345
+ /**
346
+ * @generated from field: string id = 1;
347
+ */
348
+ id?: string;
349
+ };
350
+ /**
351
+ * Describes the message toshi.workspace.v1.GetWebhookEndpointRequest.
352
+ * Use `create(GetWebhookEndpointRequestSchema)` to create a new message.
353
+ */
354
+ export declare const GetWebhookEndpointRequestSchema: GenMessage<GetWebhookEndpointRequest, {
355
+ jsonType: GetWebhookEndpointRequestJson;
356
+ }>;
357
+ /**
358
+ * @generated from message toshi.workspace.v1.GetWebhookEndpointResponse
359
+ */
360
+ export type GetWebhookEndpointResponse = Message<"toshi.workspace.v1.GetWebhookEndpointResponse"> & {
361
+ /**
362
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
363
+ */
364
+ endpoint?: WebhookEndpoint | undefined;
365
+ };
366
+ /**
367
+ * @generated from message toshi.workspace.v1.GetWebhookEndpointResponse
368
+ */
369
+ export type GetWebhookEndpointResponseJson = {
370
+ /**
371
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
372
+ */
373
+ endpoint?: WebhookEndpointJson;
374
+ };
375
+ /**
376
+ * Describes the message toshi.workspace.v1.GetWebhookEndpointResponse.
377
+ * Use `create(GetWebhookEndpointResponseSchema)` to create a new message.
378
+ */
379
+ export declare const GetWebhookEndpointResponseSchema: GenMessage<GetWebhookEndpointResponse, {
380
+ jsonType: GetWebhookEndpointResponseJson;
381
+ }>;
382
+ /**
383
+ * @generated from message toshi.workspace.v1.ListWebhookEndpointsRequest
384
+ */
385
+ export type ListWebhookEndpointsRequest = Message<"toshi.workspace.v1.ListWebhookEndpointsRequest"> & {};
386
+ /**
387
+ * @generated from message toshi.workspace.v1.ListWebhookEndpointsRequest
388
+ */
389
+ export type ListWebhookEndpointsRequestJson = {};
390
+ /**
391
+ * Describes the message toshi.workspace.v1.ListWebhookEndpointsRequest.
392
+ * Use `create(ListWebhookEndpointsRequestSchema)` to create a new message.
393
+ */
394
+ export declare const ListWebhookEndpointsRequestSchema: GenMessage<ListWebhookEndpointsRequest, {
395
+ jsonType: ListWebhookEndpointsRequestJson;
396
+ }>;
397
+ /**
398
+ * @generated from message toshi.workspace.v1.ListWebhookEndpointsResponse
399
+ */
400
+ export type ListWebhookEndpointsResponse = Message<"toshi.workspace.v1.ListWebhookEndpointsResponse"> & {
401
+ /**
402
+ * @generated from field: repeated toshi.workspace.v1.WebhookEndpoint endpoints = 1;
403
+ */
404
+ endpoints: WebhookEndpoint[];
405
+ };
406
+ /**
407
+ * @generated from message toshi.workspace.v1.ListWebhookEndpointsResponse
408
+ */
409
+ export type ListWebhookEndpointsResponseJson = {
410
+ /**
411
+ * @generated from field: repeated toshi.workspace.v1.WebhookEndpoint endpoints = 1;
412
+ */
413
+ endpoints?: WebhookEndpointJson[];
414
+ };
415
+ /**
416
+ * Describes the message toshi.workspace.v1.ListWebhookEndpointsResponse.
417
+ * Use `create(ListWebhookEndpointsResponseSchema)` to create a new message.
418
+ */
419
+ export declare const ListWebhookEndpointsResponseSchema: GenMessage<ListWebhookEndpointsResponse, {
420
+ jsonType: ListWebhookEndpointsResponseJson;
421
+ }>;
422
+ /**
423
+ * @generated from message toshi.workspace.v1.UpdateWebhookEndpointRequest
424
+ */
425
+ export type UpdateWebhookEndpointRequest = Message<"toshi.workspace.v1.UpdateWebhookEndpointRequest"> & {
426
+ /**
427
+ * @generated from field: string id = 1;
428
+ */
429
+ id: string;
430
+ /**
431
+ * Carries the new values of the fields update_mask names.
432
+ *
433
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 2;
434
+ */
435
+ endpoint?: WebhookEndpoint | undefined;
436
+ /**
437
+ * One or more of url, events and enabled.
438
+ *
439
+ * @generated from field: google.protobuf.FieldMask update_mask = 3;
440
+ */
441
+ updateMask?: FieldMask | undefined;
442
+ /**
443
+ * @generated from field: string request_key = 4;
444
+ */
445
+ requestKey: string;
446
+ };
447
+ /**
448
+ * @generated from message toshi.workspace.v1.UpdateWebhookEndpointRequest
449
+ */
450
+ export type UpdateWebhookEndpointRequestJson = {
451
+ /**
452
+ * @generated from field: string id = 1;
453
+ */
454
+ id?: string;
455
+ /**
456
+ * Carries the new values of the fields update_mask names.
457
+ *
458
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 2;
459
+ */
460
+ endpoint?: WebhookEndpointJson;
461
+ /**
462
+ * One or more of url, events and enabled.
463
+ *
464
+ * @generated from field: google.protobuf.FieldMask update_mask = 3;
465
+ */
466
+ updateMask?: FieldMaskJson;
467
+ /**
468
+ * @generated from field: string request_key = 4;
469
+ */
470
+ requestKey?: string;
471
+ };
472
+ /**
473
+ * Describes the message toshi.workspace.v1.UpdateWebhookEndpointRequest.
474
+ * Use `create(UpdateWebhookEndpointRequestSchema)` to create a new message.
475
+ */
476
+ export declare const UpdateWebhookEndpointRequestSchema: GenMessage<UpdateWebhookEndpointRequest, {
477
+ jsonType: UpdateWebhookEndpointRequestJson;
478
+ }>;
479
+ /**
480
+ * @generated from message toshi.workspace.v1.UpdateWebhookEndpointResponse
481
+ */
482
+ export type UpdateWebhookEndpointResponse = Message<"toshi.workspace.v1.UpdateWebhookEndpointResponse"> & {
483
+ /**
484
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
485
+ */
486
+ endpoint?: WebhookEndpoint | undefined;
487
+ };
488
+ /**
489
+ * @generated from message toshi.workspace.v1.UpdateWebhookEndpointResponse
490
+ */
491
+ export type UpdateWebhookEndpointResponseJson = {
492
+ /**
493
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
494
+ */
495
+ endpoint?: WebhookEndpointJson;
496
+ };
497
+ /**
498
+ * Describes the message toshi.workspace.v1.UpdateWebhookEndpointResponse.
499
+ * Use `create(UpdateWebhookEndpointResponseSchema)` to create a new message.
500
+ */
501
+ export declare const UpdateWebhookEndpointResponseSchema: GenMessage<UpdateWebhookEndpointResponse, {
502
+ jsonType: UpdateWebhookEndpointResponseJson;
503
+ }>;
504
+ /**
505
+ * @generated from message toshi.workspace.v1.DeleteWebhookEndpointRequest
506
+ */
507
+ export type DeleteWebhookEndpointRequest = Message<"toshi.workspace.v1.DeleteWebhookEndpointRequest"> & {
508
+ /**
509
+ * @generated from field: string id = 1;
510
+ */
511
+ id: string;
512
+ /**
513
+ * @generated from field: string request_key = 2;
514
+ */
515
+ requestKey: string;
516
+ };
517
+ /**
518
+ * @generated from message toshi.workspace.v1.DeleteWebhookEndpointRequest
519
+ */
520
+ export type DeleteWebhookEndpointRequestJson = {
521
+ /**
522
+ * @generated from field: string id = 1;
523
+ */
524
+ id?: string;
525
+ /**
526
+ * @generated from field: string request_key = 2;
527
+ */
528
+ requestKey?: string;
529
+ };
530
+ /**
531
+ * Describes the message toshi.workspace.v1.DeleteWebhookEndpointRequest.
532
+ * Use `create(DeleteWebhookEndpointRequestSchema)` to create a new message.
533
+ */
534
+ export declare const DeleteWebhookEndpointRequestSchema: GenMessage<DeleteWebhookEndpointRequest, {
535
+ jsonType: DeleteWebhookEndpointRequestJson;
536
+ }>;
537
+ /**
538
+ * @generated from message toshi.workspace.v1.DeleteWebhookEndpointResponse
539
+ */
540
+ export type DeleteWebhookEndpointResponse = Message<"toshi.workspace.v1.DeleteWebhookEndpointResponse"> & {};
541
+ /**
542
+ * @generated from message toshi.workspace.v1.DeleteWebhookEndpointResponse
543
+ */
544
+ export type DeleteWebhookEndpointResponseJson = {};
545
+ /**
546
+ * Describes the message toshi.workspace.v1.DeleteWebhookEndpointResponse.
547
+ * Use `create(DeleteWebhookEndpointResponseSchema)` to create a new message.
548
+ */
549
+ export declare const DeleteWebhookEndpointResponseSchema: GenMessage<DeleteWebhookEndpointResponse, {
550
+ jsonType: DeleteWebhookEndpointResponseJson;
551
+ }>;
552
+ /**
553
+ * @generated from message toshi.workspace.v1.RotateWebhookEndpointSecretRequest
554
+ */
555
+ export type RotateWebhookEndpointSecretRequest = Message<"toshi.workspace.v1.RotateWebhookEndpointSecretRequest"> & {
556
+ /**
557
+ * @generated from field: string id = 1;
558
+ */
559
+ id: string;
560
+ /**
561
+ * @generated from field: string request_key = 2;
562
+ */
563
+ requestKey: string;
564
+ };
565
+ /**
566
+ * @generated from message toshi.workspace.v1.RotateWebhookEndpointSecretRequest
567
+ */
568
+ export type RotateWebhookEndpointSecretRequestJson = {
569
+ /**
570
+ * @generated from field: string id = 1;
571
+ */
572
+ id?: string;
573
+ /**
574
+ * @generated from field: string request_key = 2;
575
+ */
576
+ requestKey?: string;
577
+ };
578
+ /**
579
+ * Describes the message toshi.workspace.v1.RotateWebhookEndpointSecretRequest.
580
+ * Use `create(RotateWebhookEndpointSecretRequestSchema)` to create a new message.
581
+ */
582
+ export declare const RotateWebhookEndpointSecretRequestSchema: GenMessage<RotateWebhookEndpointSecretRequest, {
583
+ jsonType: RotateWebhookEndpointSecretRequestJson;
584
+ }>;
585
+ /**
586
+ * @generated from message toshi.workspace.v1.RotateWebhookEndpointSecretResponse
587
+ */
588
+ export type RotateWebhookEndpointSecretResponse = Message<"toshi.workspace.v1.RotateWebhookEndpointSecretResponse"> & {
589
+ /**
590
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
591
+ */
592
+ endpoint?: WebhookEndpoint | undefined;
593
+ /**
594
+ * The new secret, as CreateWebhookEndpointResponse's.
595
+ *
596
+ * @generated from field: string secret = 2;
597
+ */
598
+ secret: string;
599
+ };
600
+ /**
601
+ * @generated from message toshi.workspace.v1.RotateWebhookEndpointSecretResponse
602
+ */
603
+ export type RotateWebhookEndpointSecretResponseJson = {
604
+ /**
605
+ * @generated from field: toshi.workspace.v1.WebhookEndpoint endpoint = 1;
606
+ */
607
+ endpoint?: WebhookEndpointJson;
608
+ /**
609
+ * The new secret, as CreateWebhookEndpointResponse's.
610
+ *
611
+ * @generated from field: string secret = 2;
612
+ */
613
+ secret?: string;
614
+ };
615
+ /**
616
+ * Describes the message toshi.workspace.v1.RotateWebhookEndpointSecretResponse.
617
+ * Use `create(RotateWebhookEndpointSecretResponseSchema)` to create a new message.
618
+ */
619
+ export declare const RotateWebhookEndpointSecretResponseSchema: GenMessage<RotateWebhookEndpointSecretResponse, {
620
+ jsonType: RotateWebhookEndpointSecretResponseJson;
621
+ }>;
622
+ /**
623
+ * @generated from message toshi.workspace.v1.ListWebhookDeliveriesRequest
624
+ */
625
+ export type ListWebhookDeliveriesRequest = Message<"toshi.workspace.v1.ListWebhookDeliveriesRequest"> & {
626
+ /**
627
+ * @generated from field: string endpoint_id = 1;
628
+ */
629
+ endpointId: string;
630
+ /**
631
+ * Deliveries of events after this cursor; empty starts at the oldest.
632
+ *
633
+ * @generated from field: string cursor = 2;
634
+ */
635
+ cursor: string;
636
+ /**
637
+ * The most deliveries in one page; zero lets the server choose.
638
+ *
639
+ * @generated from field: int32 page_size = 3;
640
+ */
641
+ pageSize: number;
642
+ };
643
+ /**
644
+ * @generated from message toshi.workspace.v1.ListWebhookDeliveriesRequest
645
+ */
646
+ export type ListWebhookDeliveriesRequestJson = {
647
+ /**
648
+ * @generated from field: string endpoint_id = 1;
649
+ */
650
+ endpointId?: string;
651
+ /**
652
+ * Deliveries of events after this cursor; empty starts at the oldest.
653
+ *
654
+ * @generated from field: string cursor = 2;
655
+ */
656
+ cursor?: string;
657
+ /**
658
+ * The most deliveries in one page; zero lets the server choose.
659
+ *
660
+ * @generated from field: int32 page_size = 3;
661
+ */
662
+ pageSize?: number;
663
+ };
664
+ /**
665
+ * Describes the message toshi.workspace.v1.ListWebhookDeliveriesRequest.
666
+ * Use `create(ListWebhookDeliveriesRequestSchema)` to create a new message.
667
+ */
668
+ export declare const ListWebhookDeliveriesRequestSchema: GenMessage<ListWebhookDeliveriesRequest, {
669
+ jsonType: ListWebhookDeliveriesRequestJson;
670
+ }>;
671
+ /**
672
+ * @generated from message toshi.workspace.v1.ListWebhookDeliveriesResponse
673
+ */
674
+ export type ListWebhookDeliveriesResponse = Message<"toshi.workspace.v1.ListWebhookDeliveriesResponse"> & {
675
+ /**
676
+ * @generated from field: repeated toshi.workspace.v1.WebhookDelivery deliveries = 1;
677
+ */
678
+ deliveries: WebhookDelivery[];
679
+ /**
680
+ * The cursor of the last delivery returned, or the cursor asked for when
681
+ * there were none: pass it to the next call.
682
+ *
683
+ * @generated from field: string cursor = 2;
684
+ */
685
+ cursor: string;
686
+ };
687
+ /**
688
+ * @generated from message toshi.workspace.v1.ListWebhookDeliveriesResponse
689
+ */
690
+ export type ListWebhookDeliveriesResponseJson = {
691
+ /**
692
+ * @generated from field: repeated toshi.workspace.v1.WebhookDelivery deliveries = 1;
693
+ */
694
+ deliveries?: WebhookDeliveryJson[];
695
+ /**
696
+ * The cursor of the last delivery returned, or the cursor asked for when
697
+ * there were none: pass it to the next call.
698
+ *
699
+ * @generated from field: string cursor = 2;
700
+ */
701
+ cursor?: string;
702
+ };
703
+ /**
704
+ * Describes the message toshi.workspace.v1.ListWebhookDeliveriesResponse.
705
+ * Use `create(ListWebhookDeliveriesResponseSchema)` to create a new message.
706
+ */
707
+ export declare const ListWebhookDeliveriesResponseSchema: GenMessage<ListWebhookDeliveriesResponse, {
708
+ jsonType: ListWebhookDeliveriesResponseJson;
709
+ }>;
710
+ /**
711
+ * @generated from message toshi.workspace.v1.ReplayWebhookEventsRequest
712
+ */
713
+ export type ReplayWebhookEventsRequest = Message<"toshi.workspace.v1.ReplayWebhookEventsRequest"> & {
714
+ /**
715
+ * @generated from field: string endpoint_id = 1;
716
+ */
717
+ endpointId: string;
718
+ /**
719
+ * Events after this cursor; empty starts at the oldest event the log
720
+ * keeps. A cursor older than that event fails with OUT_OF_RANGE.
721
+ *
722
+ * @generated from field: string cursor = 2;
723
+ */
724
+ cursor: string;
725
+ /**
726
+ * @generated from field: string request_key = 3;
727
+ */
728
+ requestKey: string;
729
+ };
730
+ /**
731
+ * @generated from message toshi.workspace.v1.ReplayWebhookEventsRequest
732
+ */
733
+ export type ReplayWebhookEventsRequestJson = {
734
+ /**
735
+ * @generated from field: string endpoint_id = 1;
736
+ */
737
+ endpointId?: string;
738
+ /**
739
+ * Events after this cursor; empty starts at the oldest event the log
740
+ * keeps. A cursor older than that event fails with OUT_OF_RANGE.
741
+ *
742
+ * @generated from field: string cursor = 2;
743
+ */
744
+ cursor?: string;
745
+ /**
746
+ * @generated from field: string request_key = 3;
747
+ */
748
+ requestKey?: string;
749
+ };
750
+ /**
751
+ * Describes the message toshi.workspace.v1.ReplayWebhookEventsRequest.
752
+ * Use `create(ReplayWebhookEventsRequestSchema)` to create a new message.
753
+ */
754
+ export declare const ReplayWebhookEventsRequestSchema: GenMessage<ReplayWebhookEventsRequest, {
755
+ jsonType: ReplayWebhookEventsRequestJson;
756
+ }>;
757
+ /**
758
+ * @generated from message toshi.workspace.v1.ReplayWebhookEventsResponse
759
+ */
760
+ export type ReplayWebhookEventsResponse = Message<"toshi.workspace.v1.ReplayWebhookEventsResponse"> & {
761
+ /**
762
+ * How many deliveries were made due again.
763
+ *
764
+ * @generated from field: int32 replayed = 1;
765
+ */
766
+ replayed: number;
767
+ /**
768
+ * The cursor of the last event looked at, or the cursor asked for when
769
+ * there were none: pass it to the next call while more is set.
770
+ *
771
+ * @generated from field: string cursor = 2;
772
+ */
773
+ cursor: string;
774
+ /**
775
+ * Set when events up to the endpoint's own cursor remain after cursor.
776
+ *
777
+ * @generated from field: bool more = 3;
778
+ */
779
+ more: boolean;
780
+ };
781
+ /**
782
+ * @generated from message toshi.workspace.v1.ReplayWebhookEventsResponse
783
+ */
784
+ export type ReplayWebhookEventsResponseJson = {
785
+ /**
786
+ * How many deliveries were made due again.
787
+ *
788
+ * @generated from field: int32 replayed = 1;
789
+ */
790
+ replayed?: number;
791
+ /**
792
+ * The cursor of the last event looked at, or the cursor asked for when
793
+ * there were none: pass it to the next call while more is set.
794
+ *
795
+ * @generated from field: string cursor = 2;
796
+ */
797
+ cursor?: string;
798
+ /**
799
+ * Set when events up to the endpoint's own cursor remain after cursor.
800
+ *
801
+ * @generated from field: bool more = 3;
802
+ */
803
+ more?: boolean;
804
+ };
805
+ /**
806
+ * Describes the message toshi.workspace.v1.ReplayWebhookEventsResponse.
807
+ * Use `create(ReplayWebhookEventsResponseSchema)` to create a new message.
808
+ */
809
+ export declare const ReplayWebhookEventsResponseSchema: GenMessage<ReplayWebhookEventsResponse, {
810
+ jsonType: ReplayWebhookEventsResponseJson;
811
+ }>;
812
+ /**
813
+ * @generated from enum toshi.workspace.v1.WebhookDeliveryState
814
+ */
815
+ export declare enum WebhookDeliveryState {
816
+ /**
817
+ * @generated from enum value: WEBHOOK_DELIVERY_STATE_UNSPECIFIED = 0;
818
+ */
819
+ UNSPECIFIED = 0,
820
+ /**
821
+ * Owed: waiting for its next try, or being tried.
822
+ *
823
+ * @generated from enum value: WEBHOOK_DELIVERY_STATE_PENDING = 1;
824
+ */
825
+ PENDING = 1,
826
+ /**
827
+ * A try had a 2xx answer.
828
+ *
829
+ * @generated from enum value: WEBHOOK_DELIVERY_STATE_DELIVERED = 2;
830
+ */
831
+ DELIVERED = 2,
832
+ /**
833
+ * Every try failed until the sender gave up.
834
+ *
835
+ * @generated from enum value: WEBHOOK_DELIVERY_STATE_DEAD = 3;
836
+ */
837
+ DEAD = 3
838
+ }
839
+ /**
840
+ * @generated from enum toshi.workspace.v1.WebhookDeliveryState
841
+ */
842
+ export type WebhookDeliveryStateJson = "WEBHOOK_DELIVERY_STATE_UNSPECIFIED" | "WEBHOOK_DELIVERY_STATE_PENDING" | "WEBHOOK_DELIVERY_STATE_DELIVERED" | "WEBHOOK_DELIVERY_STATE_DEAD";
843
+ /**
844
+ * Describes the enum toshi.workspace.v1.WebhookDeliveryState.
845
+ */
846
+ export declare const WebhookDeliveryStateSchema: GenEnum<WebhookDeliveryState, WebhookDeliveryStateJson>;
847
+ /**
848
+ * WebhookService manages a workspace's webhook endpoints: the URLs its
849
+ * events are POSTed to, signed per Standard Webhooks. The caller's credential
850
+ * names the workspace, as for WorkspaceService. An endpoint belongs to the
851
+ * workspace, not to a project or environment, and is owed the events of all
852
+ * of them; no request names either. An endpoint of another workspace is
853
+ * NOT_FOUND.
854
+ *
855
+ * Every mutating call takes a request_key, with WorkspaceService's rule: a
856
+ * retry with the same key and the same payload returns what the first
857
+ * call returned and changes nothing; the same key with a different payload
858
+ * fails with FAILED_PRECONDITION; an empty key means no retry protection.
859
+ *
860
+ * An endpoint's signing secret is in the answer to the call that made it,
861
+ * CreateWebhookEndpoint or RotateWebhookEndpointSecret, and in no other
862
+ * answer. A retry of that call returns the same secret while it is the
863
+ * endpoint's newest; once the endpoint is rotated again or deleted, the
864
+ * retry fails with FAILED_PRECONDITION and changes nothing.
865
+ *
866
+ * @generated from service toshi.workspace.v1.WebhookService
867
+ */
868
+ export declare const WebhookService: GenService<{
869
+ /**
870
+ * CreateWebhookEndpoint makes an endpoint and its signing secret. The
871
+ * endpoint is owed the events written after it, from its cursor on. The
872
+ * control plane must hold a keyring to seal the secret; without one the
873
+ * call fails with FAILED_PRECONDITION.
874
+ *
875
+ * @generated from rpc toshi.workspace.v1.WebhookService.CreateWebhookEndpoint
876
+ */
877
+ createWebhookEndpoint: {
878
+ methodKind: "unary";
879
+ input: typeof CreateWebhookEndpointRequestSchema;
880
+ output: typeof CreateWebhookEndpointResponseSchema;
881
+ };
882
+ /**
883
+ * GetWebhookEndpoint returns one endpoint. An unknown ID fails with
884
+ * NOT_FOUND.
885
+ *
886
+ * @generated from rpc toshi.workspace.v1.WebhookService.GetWebhookEndpoint
887
+ */
888
+ getWebhookEndpoint: {
889
+ methodKind: "unary";
890
+ input: typeof GetWebhookEndpointRequestSchema;
891
+ output: typeof GetWebhookEndpointResponseSchema;
892
+ };
893
+ /**
894
+ * ListWebhookEndpoints returns the workspace's endpoints in ID order.
895
+ *
896
+ * @generated from rpc toshi.workspace.v1.WebhookService.ListWebhookEndpoints
897
+ */
898
+ listWebhookEndpoints: {
899
+ methodKind: "unary";
900
+ input: typeof ListWebhookEndpointsRequestSchema;
901
+ output: typeof ListWebhookEndpointsResponseSchema;
902
+ };
903
+ /**
904
+ * UpdateWebhookEndpoint sets the fields update_mask names: url, events,
905
+ * enabled. A disabled endpoint is owed no new event and no try starts;
906
+ * the events written before the disable stay owed, enabling it again
907
+ * owes none written while it was disabled, and a try already under way
908
+ * finishes within its claim, which holds a delivery for one minute.
909
+ *
910
+ * @generated from rpc toshi.workspace.v1.WebhookService.UpdateWebhookEndpoint
911
+ */
912
+ updateWebhookEndpoint: {
913
+ methodKind: "unary";
914
+ input: typeof UpdateWebhookEndpointRequestSchema;
915
+ output: typeof UpdateWebhookEndpointResponseSchema;
916
+ };
917
+ /**
918
+ * DeleteWebhookEndpoint deletes an endpoint and its deliveries.
919
+ *
920
+ * @generated from rpc toshi.workspace.v1.WebhookService.DeleteWebhookEndpoint
921
+ */
922
+ deleteWebhookEndpoint: {
923
+ methodKind: "unary";
924
+ input: typeof DeleteWebhookEndpointRequestSchema;
925
+ output: typeof DeleteWebhookEndpointResponseSchema;
926
+ };
927
+ /**
928
+ * RotateWebhookEndpointSecret makes the endpoint a new signing secret and
929
+ * returns it. For the next 24 hours each try that starts after the
930
+ * rotation is signed with the new secret and the one it replaced, so a
931
+ * receiver can move to the new one in that window; after it, with the
932
+ * new one only. A try under way when the rotation is made is signed with
933
+ * the replaced secret alone. A rotation while the
934
+ * previous secret's window is still open fails with FAILED_PRECONDITION.
935
+ *
936
+ * @generated from rpc toshi.workspace.v1.WebhookService.RotateWebhookEndpointSecret
937
+ */
938
+ rotateWebhookEndpointSecret: {
939
+ methodKind: "unary";
940
+ input: typeof RotateWebhookEndpointSecretRequestSchema;
941
+ output: typeof RotateWebhookEndpointSecretResponseSchema;
942
+ };
943
+ /**
944
+ * ListWebhookDeliveries returns an endpoint's deliveries in event order,
945
+ * a page at a time.
946
+ *
947
+ * @generated from rpc toshi.workspace.v1.WebhookService.ListWebhookDeliveries
948
+ */
949
+ listWebhookDeliveries: {
950
+ methodKind: "unary";
951
+ input: typeof ListWebhookDeliveriesRequestSchema;
952
+ output: typeof ListWebhookDeliveriesResponseSchema;
953
+ };
954
+ /**
955
+ * ReplayWebhookEvents makes the endpoint owed again the events after
956
+ * cursor that its filter keeps now, up to its own cursor, at most 500 per
957
+ * call. That includes events delivered or given up before, events written
958
+ * while it was disabled and events written before it was made. Each is
959
+ * due now and tried on the retry schedule from its first try; an event
960
+ * still pending at the endpoint is left as it is. A workload's events stay
961
+ * one at a time at the endpoint: an older event sent again is not due
962
+ * before the latest next try among the newer ones that have been tried
963
+ * and are still pending, the end of that try under way or backoff, and
964
+ * then goes before it; it does not wait for the newer ones to be
965
+ * delivered. A disabled endpoint fails with FAILED_PRECONDITION.
966
+ *
967
+ * @generated from rpc toshi.workspace.v1.WebhookService.ReplayWebhookEvents
968
+ */
969
+ replayWebhookEvents: {
970
+ methodKind: "unary";
971
+ input: typeof ReplayWebhookEventsRequestSchema;
972
+ output: typeof ReplayWebhookEventsResponseSchema;
973
+ };
974
+ }>;