@toshicloud/sdk 0.5.0 → 0.6.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 (76) hide show
  1. package/README.md +138 -41
  2. package/dist/client.d.ts +103 -4
  3. package/dist/client.js +43 -4
  4. package/dist/errors.d.ts +74 -22
  5. package/dist/errors.js +99 -27
  6. package/dist/gen/toshi/permission_pb.d.ts +207 -2
  7. package/dist/gen/toshi/permission_pb.js +54 -2
  8. package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
  9. package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
  10. package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
  11. package/dist/gen/toshi/workspace/v1/artifacts_pb.js +9 -7
  12. package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
  13. package/dist/gen/toshi/workspace/v1/audit_events_pb.js +11 -1
  14. package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
  15. package/dist/gen/toshi/workspace/v1/channels_pb.js +185 -39
  16. package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1616 -0
  17. package/dist/gen/toshi/workspace/v1/connections_pb.js +224 -0
  18. package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +291 -43
  19. package/dist/gen/toshi/workspace/v1/discovery_pb.js +79 -30
  20. package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
  21. package/dist/gen/toshi/workspace/v1/display_pb.js +52 -2
  22. package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
  23. package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
  24. package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
  25. package/dist/gen/toshi/workspace/v1/fillers_pb.js +1 -1
  26. package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
  27. package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
  28. package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +329 -15
  29. package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +10 -5
  30. package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
  31. package/dist/gen/toshi/workspace/v1/hosts_pb.js +12 -7
  32. package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
  33. package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
  34. package/dist/gen/toshi/workspace/v1/products_pb.d.ts +99 -296
  35. package/dist/gen/toshi/workspace/v1/products_pb.js +7 -53
  36. package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
  37. package/dist/gen/toshi/workspace/v1/projects_pb.js +150 -33
  38. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
  39. package/dist/gen/toshi/workspace/v1/recordings_pb.js +54 -14
  40. package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
  41. package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
  42. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
  43. package/dist/gen/toshi/workspace/v1/secrets_pb.js +42 -18
  44. package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
  45. package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +1 -1
  46. package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
  47. package/dist/gen/toshi/workspace/v1/tokens_pb.js +65 -8
  48. package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
  49. package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
  50. package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
  51. package/dist/gen/toshi/workspace/v1/volumes_pb.js +169 -11
  52. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
  53. package/dist/gen/toshi/workspace/v1/webhook_pb.js +4 -4
  54. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2069 -54
  55. package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
  56. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6634 -933
  57. package/dist/gen/toshi/workspace/v1/workspace_pb.js +912 -93
  58. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +3209 -1378
  59. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +211 -74
  60. package/dist/index.d.ts +8 -1
  61. package/dist/index.js +8 -1
  62. package/dist/interceptors.d.ts +6 -2
  63. package/dist/interceptors.js +13 -8
  64. package/dist/retry.d.ts +18 -0
  65. package/dist/retry.js +230 -23
  66. package/dist/test/alarms.d.ts +29 -0
  67. package/dist/test/alarms.js +144 -0
  68. package/dist/test/fake.js +31 -0
  69. package/dist/test/index.d.ts +12 -2
  70. package/dist/test/index.js +12 -2
  71. package/dist/test/procedures.js +96 -5
  72. package/dist/version.d.ts +1 -1
  73. package/dist/version.js +1 -1
  74. package/dist/wait.d.ts +4 -0
  75. package/dist/wait.js +24 -1
  76. package/package.json +3 -2
@@ -0,0 +1,1616 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, DurationJson, FieldMask, FieldMaskJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file toshi/workspace/v1/connections.proto.
6
+ */
7
+ export declare const file_toshi_workspace_v1_connections: GenFile;
8
+ /**
9
+ * Connection is one source of a workspace's events.
10
+ *
11
+ * @generated from message toshi.workspace.v1.Connection
12
+ */
13
+ export type Connection = Message<"toshi.workspace.v1.Connection"> & {
14
+ /**
15
+ * @generated from field: string id = 1;
16
+ */
17
+ id: string;
18
+ /**
19
+ * @generated from field: toshi.workspace.v1.ConnectionKind kind = 2;
20
+ */
21
+ kind: ConnectionKind;
22
+ /**
23
+ * Unique among the workspace's live connections of its kind, WEBHOOK or
24
+ * MAIL; for GITHUB, the login of the account the App is installed on.
25
+ *
26
+ * @generated from field: string name = 3;
27
+ */
28
+ name: string;
29
+ /**
30
+ * The project and environment a WEBHOOK or MAIL connection's events belong
31
+ * to; empty for GITHUB, whose events belong to their repository's project.
32
+ *
33
+ * @generated from field: string project = 4;
34
+ */
35
+ project: string;
36
+ /**
37
+ * @generated from field: string environment = 5;
38
+ */
39
+ environment: string;
40
+ /**
41
+ * The GitHub App installation of a GITHUB connection; zero otherwise.
42
+ *
43
+ * @generated from field: int64 installation_id = 6;
44
+ */
45
+ installationId: bigint;
46
+ /**
47
+ * @generated from field: google.protobuf.Timestamp created_at = 7;
48
+ */
49
+ createdAt?: Timestamp | undefined;
50
+ /**
51
+ * Until when a rotated WEBHOOK connection's previous secret still
52
+ * verifies; unset when there is none.
53
+ *
54
+ * @generated from field: google.protobuf.Timestamp previous_secret_expires_at = 8;
55
+ */
56
+ previousSecretExpiresAt?: Timestamp | undefined;
57
+ /**
58
+ * Where a WEBHOOK connection's deliveries are posted in place of the
59
+ * event log; unset when they become events.
60
+ *
61
+ * @generated from field: toshi.workspace.v1.ConnectionTarget target = 10;
62
+ */
63
+ target?: ConnectionTarget | undefined;
64
+ /**
65
+ * The inbound address a WEBHOOK connection's sender POSTs to: the
66
+ * deployment's public address and /ingress/ with the connection's
67
+ * address token. Empty for GITHUB and MAIL, and when the deployment names
68
+ * no public address.
69
+ *
70
+ * @generated from field: string ingress_url = 11;
71
+ */
72
+ ingressUrl: string;
73
+ /**
74
+ * Who manages this object: "manifest" when the project manifest declares
75
+ * it, empty when nothing does. A manifest apply sets managed_by,
76
+ * manifest_digest, manifest_origin and managed_fields together.
77
+ *
78
+ * @generated from field: string managed_by = 12;
79
+ */
80
+ managedBy: string;
81
+ /**
82
+ * The SHA-256 of the manifest file that last set this object, as 64
83
+ * lowercase hex characters. Empty when managed_by is empty.
84
+ *
85
+ * @generated from field: string manifest_digest = 13;
86
+ */
87
+ manifestDigest: string;
88
+ /**
89
+ * The fields of this object the manifest declares, as update mask paths.
90
+ * Empty when managed_by is empty.
91
+ *
92
+ * @generated from field: repeated string managed_fields = 14;
93
+ */
94
+ managedFields: string[];
95
+ /**
96
+ * How the manifest came to manage this object: "created" when a manifest
97
+ * apply created it, "adopted" when an apply took over an object that
98
+ * already existed. Empty when managed_by is empty.
99
+ *
100
+ * @generated from field: string manifest_origin = 15;
101
+ */
102
+ manifestOrigin: string;
103
+ /**
104
+ * Where a MAIL connection receives mail and where it sends it; unset for
105
+ * the other kinds.
106
+ *
107
+ * @generated from field: toshi.workspace.v1.MailConnection mail = 16;
108
+ */
109
+ mail?: MailConnection | undefined;
110
+ };
111
+ /**
112
+ * Connection is one source of a workspace's events.
113
+ *
114
+ * @generated from message toshi.workspace.v1.Connection
115
+ */
116
+ export type ConnectionJson = {
117
+ /**
118
+ * @generated from field: string id = 1;
119
+ */
120
+ id?: string;
121
+ /**
122
+ * @generated from field: toshi.workspace.v1.ConnectionKind kind = 2;
123
+ */
124
+ kind?: ConnectionKindJson;
125
+ /**
126
+ * Unique among the workspace's live connections of its kind, WEBHOOK or
127
+ * MAIL; for GITHUB, the login of the account the App is installed on.
128
+ *
129
+ * @generated from field: string name = 3;
130
+ */
131
+ name?: string;
132
+ /**
133
+ * The project and environment a WEBHOOK or MAIL connection's events belong
134
+ * to; empty for GITHUB, whose events belong to their repository's project.
135
+ *
136
+ * @generated from field: string project = 4;
137
+ */
138
+ project?: string;
139
+ /**
140
+ * @generated from field: string environment = 5;
141
+ */
142
+ environment?: string;
143
+ /**
144
+ * The GitHub App installation of a GITHUB connection; zero otherwise.
145
+ *
146
+ * @generated from field: int64 installation_id = 6;
147
+ */
148
+ installationId?: string;
149
+ /**
150
+ * @generated from field: google.protobuf.Timestamp created_at = 7;
151
+ */
152
+ createdAt?: TimestampJson;
153
+ /**
154
+ * Until when a rotated WEBHOOK connection's previous secret still
155
+ * verifies; unset when there is none.
156
+ *
157
+ * @generated from field: google.protobuf.Timestamp previous_secret_expires_at = 8;
158
+ */
159
+ previousSecretExpiresAt?: TimestampJson;
160
+ /**
161
+ * Where a WEBHOOK connection's deliveries are posted in place of the
162
+ * event log; unset when they become events.
163
+ *
164
+ * @generated from field: toshi.workspace.v1.ConnectionTarget target = 10;
165
+ */
166
+ target?: ConnectionTargetJson;
167
+ /**
168
+ * The inbound address a WEBHOOK connection's sender POSTs to: the
169
+ * deployment's public address and /ingress/ with the connection's
170
+ * address token. Empty for GITHUB and MAIL, and when the deployment names
171
+ * no public address.
172
+ *
173
+ * @generated from field: string ingress_url = 11;
174
+ */
175
+ ingressUrl?: string;
176
+ /**
177
+ * Who manages this object: "manifest" when the project manifest declares
178
+ * it, empty when nothing does. A manifest apply sets managed_by,
179
+ * manifest_digest, manifest_origin and managed_fields together.
180
+ *
181
+ * @generated from field: string managed_by = 12;
182
+ */
183
+ managedBy?: string;
184
+ /**
185
+ * The SHA-256 of the manifest file that last set this object, as 64
186
+ * lowercase hex characters. Empty when managed_by is empty.
187
+ *
188
+ * @generated from field: string manifest_digest = 13;
189
+ */
190
+ manifestDigest?: string;
191
+ /**
192
+ * The fields of this object the manifest declares, as update mask paths.
193
+ * Empty when managed_by is empty.
194
+ *
195
+ * @generated from field: repeated string managed_fields = 14;
196
+ */
197
+ managedFields?: string[];
198
+ /**
199
+ * How the manifest came to manage this object: "created" when a manifest
200
+ * apply created it, "adopted" when an apply took over an object that
201
+ * already existed. Empty when managed_by is empty.
202
+ *
203
+ * @generated from field: string manifest_origin = 15;
204
+ */
205
+ manifestOrigin?: string;
206
+ /**
207
+ * Where a MAIL connection receives mail and where it sends it; unset for
208
+ * the other kinds.
209
+ *
210
+ * @generated from field: toshi.workspace.v1.MailConnection mail = 16;
211
+ */
212
+ mail?: MailConnectionJson;
213
+ };
214
+ /**
215
+ * Describes the message toshi.workspace.v1.Connection.
216
+ * Use `create(ConnectionSchema)` to create a new message.
217
+ */
218
+ export declare const ConnectionSchema: GenMessage<Connection, {
219
+ jsonType: ConnectionJson;
220
+ }>;
221
+ /**
222
+ * MailConnection is where a MAIL connection receives mail and where it
223
+ * sends it.
224
+ *
225
+ * @generated from message toshi.workspace.v1.MailConnection
226
+ */
227
+ export type MailConnection = Message<"toshi.workspace.v1.MailConnection"> & {
228
+ /**
229
+ * Output only. The address mail is received at: the connection's name,
230
+ * "@", the workspace's ID and the deployment's inbound mail domain, all
231
+ * lowercase.
232
+ *
233
+ * @generated from field: string address = 1;
234
+ */
235
+ address: string;
236
+ /**
237
+ * The service, by its ID, whose event channel the mail goes to.
238
+ *
239
+ * @generated from field: string service = 2;
240
+ */
241
+ service: string;
242
+ /**
243
+ * The name of that service's event channel.
244
+ *
245
+ * @generated from field: string channel = 3;
246
+ */
247
+ channel: string;
248
+ /**
249
+ * Output only. The mail provider that receives for the address, such as
250
+ * "ses".
251
+ *
252
+ * @generated from field: string provider = 4;
253
+ */
254
+ provider: string;
255
+ };
256
+ /**
257
+ * MailConnection is where a MAIL connection receives mail and where it
258
+ * sends it.
259
+ *
260
+ * @generated from message toshi.workspace.v1.MailConnection
261
+ */
262
+ export type MailConnectionJson = {
263
+ /**
264
+ * Output only. The address mail is received at: the connection's name,
265
+ * "@", the workspace's ID and the deployment's inbound mail domain, all
266
+ * lowercase.
267
+ *
268
+ * @generated from field: string address = 1;
269
+ */
270
+ address?: string;
271
+ /**
272
+ * The service, by its ID, whose event channel the mail goes to.
273
+ *
274
+ * @generated from field: string service = 2;
275
+ */
276
+ service?: string;
277
+ /**
278
+ * The name of that service's event channel.
279
+ *
280
+ * @generated from field: string channel = 3;
281
+ */
282
+ channel?: string;
283
+ /**
284
+ * Output only. The mail provider that receives for the address, such as
285
+ * "ses".
286
+ *
287
+ * @generated from field: string provider = 4;
288
+ */
289
+ provider?: string;
290
+ };
291
+ /**
292
+ * Describes the message toshi.workspace.v1.MailConnection.
293
+ * Use `create(MailConnectionSchema)` to create a new message.
294
+ */
295
+ export declare const MailConnectionSchema: GenMessage<MailConnection, {
296
+ jsonType: MailConnectionJson;
297
+ }>;
298
+ /**
299
+ * ConnectionTarget is the URL a WEBHOOK connection's deliveries are posted
300
+ * to: each delivery's event, as the event log would hold it, signed as
301
+ * Standard Webhooks does with the target's own secret, until the URL
302
+ * answers 2xx or the tries run out.
303
+ *
304
+ * @generated from message toshi.workspace.v1.ConnectionTarget
305
+ */
306
+ export type ConnectionTarget = Message<"toshi.workspace.v1.ConnectionTarget"> & {
307
+ /**
308
+ * url is the https URL the events are posted to.
309
+ *
310
+ * @generated from field: string url = 1;
311
+ */
312
+ url: string;
313
+ /**
314
+ * secret is the signing secret: "whsec_" and the base64 of 24 to 64
315
+ * bytes. Input only: no call returns it.
316
+ *
317
+ * @generated from field: string secret = 2;
318
+ */
319
+ secret: string;
320
+ /**
321
+ * updated_by is who set it last, as the audit log names them.
322
+ *
323
+ * @generated from field: string updated_by = 3;
324
+ */
325
+ updatedBy: string;
326
+ /**
327
+ * @generated from field: google.protobuf.Timestamp updated_at = 4;
328
+ */
329
+ updatedAt?: Timestamp | undefined;
330
+ };
331
+ /**
332
+ * ConnectionTarget is the URL a WEBHOOK connection's deliveries are posted
333
+ * to: each delivery's event, as the event log would hold it, signed as
334
+ * Standard Webhooks does with the target's own secret, until the URL
335
+ * answers 2xx or the tries run out.
336
+ *
337
+ * @generated from message toshi.workspace.v1.ConnectionTarget
338
+ */
339
+ export type ConnectionTargetJson = {
340
+ /**
341
+ * url is the https URL the events are posted to.
342
+ *
343
+ * @generated from field: string url = 1;
344
+ */
345
+ url?: string;
346
+ /**
347
+ * secret is the signing secret: "whsec_" and the base64 of 24 to 64
348
+ * bytes. Input only: no call returns it.
349
+ *
350
+ * @generated from field: string secret = 2;
351
+ */
352
+ secret?: string;
353
+ /**
354
+ * updated_by is who set it last, as the audit log names them.
355
+ *
356
+ * @generated from field: string updated_by = 3;
357
+ */
358
+ updatedBy?: string;
359
+ /**
360
+ * @generated from field: google.protobuf.Timestamp updated_at = 4;
361
+ */
362
+ updatedAt?: TimestampJson;
363
+ };
364
+ /**
365
+ * Describes the message toshi.workspace.v1.ConnectionTarget.
366
+ * Use `create(ConnectionTargetSchema)` to create a new message.
367
+ */
368
+ export declare const ConnectionTargetSchema: GenMessage<ConnectionTarget, {
369
+ jsonType: ConnectionTargetJson;
370
+ }>;
371
+ /**
372
+ * @generated from message toshi.workspace.v1.ListConnectionsRequest
373
+ */
374
+ export type ListConnectionsRequest = Message<"toshi.workspace.v1.ListConnectionsRequest"> & {
375
+ /**
376
+ * The most connections in one page; zero lets the server choose.
377
+ *
378
+ * @generated from field: int32 page_size = 1;
379
+ */
380
+ pageSize: number;
381
+ /**
382
+ * From an earlier response's next_page_token; empty for the first page.
383
+ *
384
+ * @generated from field: string page_token = 2;
385
+ */
386
+ pageToken: string;
387
+ };
388
+ /**
389
+ * @generated from message toshi.workspace.v1.ListConnectionsRequest
390
+ */
391
+ export type ListConnectionsRequestJson = {
392
+ /**
393
+ * The most connections in one page; zero lets the server choose.
394
+ *
395
+ * @generated from field: int32 page_size = 1;
396
+ */
397
+ pageSize?: number;
398
+ /**
399
+ * From an earlier response's next_page_token; empty for the first page.
400
+ *
401
+ * @generated from field: string page_token = 2;
402
+ */
403
+ pageToken?: string;
404
+ };
405
+ /**
406
+ * Describes the message toshi.workspace.v1.ListConnectionsRequest.
407
+ * Use `create(ListConnectionsRequestSchema)` to create a new message.
408
+ */
409
+ export declare const ListConnectionsRequestSchema: GenMessage<ListConnectionsRequest, {
410
+ jsonType: ListConnectionsRequestJson;
411
+ }>;
412
+ /**
413
+ * @generated from message toshi.workspace.v1.ListConnectionsResponse
414
+ */
415
+ export type ListConnectionsResponse = Message<"toshi.workspace.v1.ListConnectionsResponse"> & {
416
+ /**
417
+ * @generated from field: repeated toshi.workspace.v1.Connection connections = 1;
418
+ */
419
+ connections: Connection[];
420
+ /**
421
+ * Empty on the last page.
422
+ *
423
+ * @generated from field: string next_page_token = 2;
424
+ */
425
+ nextPageToken: string;
426
+ };
427
+ /**
428
+ * @generated from message toshi.workspace.v1.ListConnectionsResponse
429
+ */
430
+ export type ListConnectionsResponseJson = {
431
+ /**
432
+ * @generated from field: repeated toshi.workspace.v1.Connection connections = 1;
433
+ */
434
+ connections?: ConnectionJson[];
435
+ /**
436
+ * Empty on the last page.
437
+ *
438
+ * @generated from field: string next_page_token = 2;
439
+ */
440
+ nextPageToken?: string;
441
+ };
442
+ /**
443
+ * Describes the message toshi.workspace.v1.ListConnectionsResponse.
444
+ * Use `create(ListConnectionsResponseSchema)` to create a new message.
445
+ */
446
+ export declare const ListConnectionsResponseSchema: GenMessage<ListConnectionsResponse, {
447
+ jsonType: ListConnectionsResponseJson;
448
+ }>;
449
+ /**
450
+ * @generated from message toshi.workspace.v1.GetConnectionRequest
451
+ */
452
+ export type GetConnectionRequest = Message<"toshi.workspace.v1.GetConnectionRequest"> & {
453
+ /**
454
+ * @generated from field: string id = 1;
455
+ */
456
+ id: string;
457
+ };
458
+ /**
459
+ * @generated from message toshi.workspace.v1.GetConnectionRequest
460
+ */
461
+ export type GetConnectionRequestJson = {
462
+ /**
463
+ * @generated from field: string id = 1;
464
+ */
465
+ id?: string;
466
+ };
467
+ /**
468
+ * Describes the message toshi.workspace.v1.GetConnectionRequest.
469
+ * Use `create(GetConnectionRequestSchema)` to create a new message.
470
+ */
471
+ export declare const GetConnectionRequestSchema: GenMessage<GetConnectionRequest, {
472
+ jsonType: GetConnectionRequestJson;
473
+ }>;
474
+ /**
475
+ * @generated from message toshi.workspace.v1.GetConnectionResponse
476
+ */
477
+ export type GetConnectionResponse = Message<"toshi.workspace.v1.GetConnectionResponse"> & {
478
+ /**
479
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
480
+ */
481
+ connection?: Connection | undefined;
482
+ };
483
+ /**
484
+ * @generated from message toshi.workspace.v1.GetConnectionResponse
485
+ */
486
+ export type GetConnectionResponseJson = {
487
+ /**
488
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
489
+ */
490
+ connection?: ConnectionJson;
491
+ };
492
+ /**
493
+ * Describes the message toshi.workspace.v1.GetConnectionResponse.
494
+ * Use `create(GetConnectionResponseSchema)` to create a new message.
495
+ */
496
+ export declare const GetConnectionResponseSchema: GenMessage<GetConnectionResponse, {
497
+ jsonType: GetConnectionResponseJson;
498
+ }>;
499
+ /**
500
+ * @generated from message toshi.workspace.v1.CreateConnectionRequest
501
+ */
502
+ export type CreateConnectionRequest = Message<"toshi.workspace.v1.CreateConnectionRequest"> & {
503
+ /**
504
+ * The kind to create: WEBHOOK or MAIL. Installing the GitHub App creates
505
+ * a GITHUB connection.
506
+ *
507
+ * @generated from field: toshi.workspace.v1.ConnectionKind kind = 1;
508
+ */
509
+ kind: ConnectionKind;
510
+ /**
511
+ * A lowercase DNS label of at most 63 characters.
512
+ *
513
+ * @generated from field: string name = 2;
514
+ */
515
+ name: string;
516
+ /**
517
+ * The project and environment the connection's events belong to. Both
518
+ * are required for WEBHOOK. For MAIL they are optional, and when set must
519
+ * be the service's.
520
+ *
521
+ * @generated from field: string project = 3;
522
+ */
523
+ project: string;
524
+ /**
525
+ * @generated from field: string environment = 4;
526
+ */
527
+ environment: string;
528
+ /**
529
+ * @generated from field: string request_key = 5;
530
+ */
531
+ requestKey: string;
532
+ /**
533
+ * The mail address and where its mail goes, for a MAIL connection; unset
534
+ * for WEBHOOK. service and channel are required; address and provider are
535
+ * output only, and ignored on input.
536
+ *
537
+ * @generated from field: toshi.workspace.v1.MailConnection mail = 6;
538
+ */
539
+ mail?: MailConnection | undefined;
540
+ };
541
+ /**
542
+ * @generated from message toshi.workspace.v1.CreateConnectionRequest
543
+ */
544
+ export type CreateConnectionRequestJson = {
545
+ /**
546
+ * The kind to create: WEBHOOK or MAIL. Installing the GitHub App creates
547
+ * a GITHUB connection.
548
+ *
549
+ * @generated from field: toshi.workspace.v1.ConnectionKind kind = 1;
550
+ */
551
+ kind?: ConnectionKindJson;
552
+ /**
553
+ * A lowercase DNS label of at most 63 characters.
554
+ *
555
+ * @generated from field: string name = 2;
556
+ */
557
+ name?: string;
558
+ /**
559
+ * The project and environment the connection's events belong to. Both
560
+ * are required for WEBHOOK. For MAIL they are optional, and when set must
561
+ * be the service's.
562
+ *
563
+ * @generated from field: string project = 3;
564
+ */
565
+ project?: string;
566
+ /**
567
+ * @generated from field: string environment = 4;
568
+ */
569
+ environment?: string;
570
+ /**
571
+ * @generated from field: string request_key = 5;
572
+ */
573
+ requestKey?: string;
574
+ /**
575
+ * The mail address and where its mail goes, for a MAIL connection; unset
576
+ * for WEBHOOK. service and channel are required; address and provider are
577
+ * output only, and ignored on input.
578
+ *
579
+ * @generated from field: toshi.workspace.v1.MailConnection mail = 6;
580
+ */
581
+ mail?: MailConnectionJson;
582
+ };
583
+ /**
584
+ * Describes the message toshi.workspace.v1.CreateConnectionRequest.
585
+ * Use `create(CreateConnectionRequestSchema)` to create a new message.
586
+ */
587
+ export declare const CreateConnectionRequestSchema: GenMessage<CreateConnectionRequest, {
588
+ jsonType: CreateConnectionRequestJson;
589
+ }>;
590
+ /**
591
+ * @generated from message toshi.workspace.v1.CreateConnectionResponse
592
+ */
593
+ export type CreateConnectionResponse = Message<"toshi.workspace.v1.CreateConnectionResponse"> & {
594
+ /**
595
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
596
+ */
597
+ connection?: Connection | undefined;
598
+ /**
599
+ * The signing secret in its whsec_ form, for the sender to sign its
600
+ * requests with; empty for a MAIL connection. Shown only in this answer
601
+ * and an identical retry's.
602
+ *
603
+ * @generated from field: string secret = 2;
604
+ */
605
+ secret: string;
606
+ };
607
+ /**
608
+ * @generated from message toshi.workspace.v1.CreateConnectionResponse
609
+ */
610
+ export type CreateConnectionResponseJson = {
611
+ /**
612
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
613
+ */
614
+ connection?: ConnectionJson;
615
+ /**
616
+ * The signing secret in its whsec_ form, for the sender to sign its
617
+ * requests with; empty for a MAIL connection. Shown only in this answer
618
+ * and an identical retry's.
619
+ *
620
+ * @generated from field: string secret = 2;
621
+ */
622
+ secret?: string;
623
+ };
624
+ /**
625
+ * Describes the message toshi.workspace.v1.CreateConnectionResponse.
626
+ * Use `create(CreateConnectionResponseSchema)` to create a new message.
627
+ */
628
+ export declare const CreateConnectionResponseSchema: GenMessage<CreateConnectionResponse, {
629
+ jsonType: CreateConnectionResponseJson;
630
+ }>;
631
+ /**
632
+ * @generated from message toshi.workspace.v1.DeleteConnectionRequest
633
+ */
634
+ export type DeleteConnectionRequest = Message<"toshi.workspace.v1.DeleteConnectionRequest"> & {
635
+ /**
636
+ * @generated from field: string id = 1;
637
+ */
638
+ id: string;
639
+ /**
640
+ * @generated from field: string request_key = 2;
641
+ */
642
+ requestKey: string;
643
+ };
644
+ /**
645
+ * @generated from message toshi.workspace.v1.DeleteConnectionRequest
646
+ */
647
+ export type DeleteConnectionRequestJson = {
648
+ /**
649
+ * @generated from field: string id = 1;
650
+ */
651
+ id?: string;
652
+ /**
653
+ * @generated from field: string request_key = 2;
654
+ */
655
+ requestKey?: string;
656
+ };
657
+ /**
658
+ * Describes the message toshi.workspace.v1.DeleteConnectionRequest.
659
+ * Use `create(DeleteConnectionRequestSchema)` to create a new message.
660
+ */
661
+ export declare const DeleteConnectionRequestSchema: GenMessage<DeleteConnectionRequest, {
662
+ jsonType: DeleteConnectionRequestJson;
663
+ }>;
664
+ /**
665
+ * @generated from message toshi.workspace.v1.DeleteConnectionResponse
666
+ */
667
+ export type DeleteConnectionResponse = Message<"toshi.workspace.v1.DeleteConnectionResponse"> & {};
668
+ /**
669
+ * @generated from message toshi.workspace.v1.DeleteConnectionResponse
670
+ */
671
+ export type DeleteConnectionResponseJson = {};
672
+ /**
673
+ * Describes the message toshi.workspace.v1.DeleteConnectionResponse.
674
+ * Use `create(DeleteConnectionResponseSchema)` to create a new message.
675
+ */
676
+ export declare const DeleteConnectionResponseSchema: GenMessage<DeleteConnectionResponse, {
677
+ jsonType: DeleteConnectionResponseJson;
678
+ }>;
679
+ /**
680
+ * @generated from message toshi.workspace.v1.RotateConnectionSecretRequest
681
+ */
682
+ export type RotateConnectionSecretRequest = Message<"toshi.workspace.v1.RotateConnectionSecretRequest"> & {
683
+ /**
684
+ * @generated from field: string id = 1;
685
+ */
686
+ id: string;
687
+ /**
688
+ * How long the previous secret still verifies; unset is 24 hours, zero
689
+ * stops it at once, and 7 days is the most.
690
+ *
691
+ * @generated from field: google.protobuf.Duration overlap = 2;
692
+ */
693
+ overlap?: Duration | undefined;
694
+ /**
695
+ * @generated from field: string request_key = 3;
696
+ */
697
+ requestKey: string;
698
+ };
699
+ /**
700
+ * @generated from message toshi.workspace.v1.RotateConnectionSecretRequest
701
+ */
702
+ export type RotateConnectionSecretRequestJson = {
703
+ /**
704
+ * @generated from field: string id = 1;
705
+ */
706
+ id?: string;
707
+ /**
708
+ * How long the previous secret still verifies; unset is 24 hours, zero
709
+ * stops it at once, and 7 days is the most.
710
+ *
711
+ * @generated from field: google.protobuf.Duration overlap = 2;
712
+ */
713
+ overlap?: DurationJson;
714
+ /**
715
+ * @generated from field: string request_key = 3;
716
+ */
717
+ requestKey?: string;
718
+ };
719
+ /**
720
+ * Describes the message toshi.workspace.v1.RotateConnectionSecretRequest.
721
+ * Use `create(RotateConnectionSecretRequestSchema)` to create a new message.
722
+ */
723
+ export declare const RotateConnectionSecretRequestSchema: GenMessage<RotateConnectionSecretRequest, {
724
+ jsonType: RotateConnectionSecretRequestJson;
725
+ }>;
726
+ /**
727
+ * @generated from message toshi.workspace.v1.RotateConnectionSecretResponse
728
+ */
729
+ export type RotateConnectionSecretResponse = Message<"toshi.workspace.v1.RotateConnectionSecretResponse"> & {
730
+ /**
731
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
732
+ */
733
+ connection?: Connection | undefined;
734
+ /**
735
+ * The new signing secret in its whsec_ form. Shown only in this answer
736
+ * and an identical retry's.
737
+ *
738
+ * @generated from field: string secret = 2;
739
+ */
740
+ secret: string;
741
+ };
742
+ /**
743
+ * @generated from message toshi.workspace.v1.RotateConnectionSecretResponse
744
+ */
745
+ export type RotateConnectionSecretResponseJson = {
746
+ /**
747
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
748
+ */
749
+ connection?: ConnectionJson;
750
+ /**
751
+ * The new signing secret in its whsec_ form. Shown only in this answer
752
+ * and an identical retry's.
753
+ *
754
+ * @generated from field: string secret = 2;
755
+ */
756
+ secret?: string;
757
+ };
758
+ /**
759
+ * Describes the message toshi.workspace.v1.RotateConnectionSecretResponse.
760
+ * Use `create(RotateConnectionSecretResponseSchema)` to create a new message.
761
+ */
762
+ export declare const RotateConnectionSecretResponseSchema: GenMessage<RotateConnectionSecretResponse, {
763
+ jsonType: RotateConnectionSecretResponseJson;
764
+ }>;
765
+ /**
766
+ * @generated from message toshi.workspace.v1.UpdateConnectionRequest
767
+ */
768
+ export type UpdateConnectionRequest = Message<"toshi.workspace.v1.UpdateConnectionRequest"> & {
769
+ /**
770
+ * id names the connection; the fields update_mask names carry the new
771
+ * values.
772
+ *
773
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
774
+ */
775
+ connection?: Connection | undefined;
776
+ /**
777
+ * The paths managed_by, manifest_digest, manifest_origin and managed_fields
778
+ * set the management mark and go together: all four or none, and on their
779
+ * own; managed_by "manifest" needs the digest, an origin and at least one
780
+ * field path, and an empty managed_by clears all four.
781
+ *
782
+ * @generated from field: google.protobuf.FieldMask update_mask = 2;
783
+ */
784
+ updateMask?: FieldMask | undefined;
785
+ };
786
+ /**
787
+ * @generated from message toshi.workspace.v1.UpdateConnectionRequest
788
+ */
789
+ export type UpdateConnectionRequestJson = {
790
+ /**
791
+ * id names the connection; the fields update_mask names carry the new
792
+ * values.
793
+ *
794
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
795
+ */
796
+ connection?: ConnectionJson;
797
+ /**
798
+ * The paths managed_by, manifest_digest, manifest_origin and managed_fields
799
+ * set the management mark and go together: all four or none, and on their
800
+ * own; managed_by "manifest" needs the digest, an origin and at least one
801
+ * field path, and an empty managed_by clears all four.
802
+ *
803
+ * @generated from field: google.protobuf.FieldMask update_mask = 2;
804
+ */
805
+ updateMask?: FieldMaskJson;
806
+ };
807
+ /**
808
+ * Describes the message toshi.workspace.v1.UpdateConnectionRequest.
809
+ * Use `create(UpdateConnectionRequestSchema)` to create a new message.
810
+ */
811
+ export declare const UpdateConnectionRequestSchema: GenMessage<UpdateConnectionRequest, {
812
+ jsonType: UpdateConnectionRequestJson;
813
+ }>;
814
+ /**
815
+ * @generated from message toshi.workspace.v1.UpdateConnectionResponse
816
+ */
817
+ export type UpdateConnectionResponse = Message<"toshi.workspace.v1.UpdateConnectionResponse"> & {
818
+ /**
819
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
820
+ */
821
+ connection?: Connection | undefined;
822
+ };
823
+ /**
824
+ * @generated from message toshi.workspace.v1.UpdateConnectionResponse
825
+ */
826
+ export type UpdateConnectionResponseJson = {
827
+ /**
828
+ * @generated from field: toshi.workspace.v1.Connection connection = 1;
829
+ */
830
+ connection?: ConnectionJson;
831
+ };
832
+ /**
833
+ * Describes the message toshi.workspace.v1.UpdateConnectionResponse.
834
+ * Use `create(UpdateConnectionResponseSchema)` to create a new message.
835
+ */
836
+ export declare const UpdateConnectionResponseSchema: GenMessage<UpdateConnectionResponse, {
837
+ jsonType: UpdateConnectionResponseJson;
838
+ }>;
839
+ /**
840
+ * ConnectionDelivery is one message a WEBHOOK connection's sender sent:
841
+ * the tries that carried one webhook id.
842
+ *
843
+ * @generated from message toshi.workspace.v1.ConnectionDelivery
844
+ */
845
+ export type ConnectionDelivery = Message<"toshi.workspace.v1.ConnectionDelivery"> & {
846
+ /**
847
+ * @generated from field: string id = 1;
848
+ */
849
+ id: string;
850
+ /**
851
+ * @generated from field: string connection_id = 2;
852
+ */
853
+ connectionId: string;
854
+ /**
855
+ * The sender's webhook-id header.
856
+ *
857
+ * @generated from field: string webhook_id = 3;
858
+ */
859
+ webhookId: string;
860
+ /**
861
+ * @generated from field: toshi.workspace.v1.ConnectionDeliveryState state = 4;
862
+ */
863
+ state: ConnectionDeliveryState;
864
+ /**
865
+ * Why it was dropped or failed, such as delivery_failed or store_error;
866
+ * empty otherwise.
867
+ *
868
+ * @generated from field: string reason = 5;
869
+ */
870
+ reason: string;
871
+ /**
872
+ * The time the sender signed; when the ingress stored it.
873
+ *
874
+ * @generated from field: google.protobuf.Timestamp sent_at = 6;
875
+ */
876
+ sentAt?: Timestamp | undefined;
877
+ /**
878
+ * @generated from field: google.protobuf.Timestamp received_at = 7;
879
+ */
880
+ receivedAt?: Timestamp | undefined;
881
+ /**
882
+ * When it was processed, dropped or failed; unset while received.
883
+ *
884
+ * @generated from field: google.protobuf.Timestamp processed_at = 8;
885
+ */
886
+ processedAt?: Timestamp | undefined;
887
+ /**
888
+ * Tries a worker made since it was last received or replayed.
889
+ *
890
+ * @generated from field: int32 attempts = 9;
891
+ */
892
+ attempts: number;
893
+ /**
894
+ * The request's Content-Type header.
895
+ *
896
+ * @generated from field: string content_type = 10;
897
+ */
898
+ contentType: string;
899
+ /**
900
+ * The hex SHA-256 of the body.
901
+ *
902
+ * @generated from field: string body_digest = 11;
903
+ */
904
+ bodyDigest: string;
905
+ /**
906
+ * When the workspace's retention removed the body; unset while it is
907
+ * kept. A delivery without its body is not replayed.
908
+ *
909
+ * @generated from field: google.protobuf.Timestamp body_expired_at = 12;
910
+ */
911
+ bodyExpiredAt?: Timestamp | undefined;
912
+ /**
913
+ * How many times it was replayed.
914
+ *
915
+ * @generated from field: int32 replays = 14;
916
+ */
917
+ replays: number;
918
+ /**
919
+ * Who asked for the latest replay; empty before one.
920
+ *
921
+ * @generated from field: string replayed_by = 15;
922
+ */
923
+ replayedBy: string;
924
+ /**
925
+ * The name of the event the delivery carries, such as
926
+ * github.pull_request.opened for a GitHub connection's; empty when the
927
+ * sender named none, as for a webhook connection's.
928
+ *
929
+ * @generated from field: string event_name = 16;
930
+ */
931
+ eventName: string;
932
+ };
933
+ /**
934
+ * ConnectionDelivery is one message a WEBHOOK connection's sender sent:
935
+ * the tries that carried one webhook id.
936
+ *
937
+ * @generated from message toshi.workspace.v1.ConnectionDelivery
938
+ */
939
+ export type ConnectionDeliveryJson = {
940
+ /**
941
+ * @generated from field: string id = 1;
942
+ */
943
+ id?: string;
944
+ /**
945
+ * @generated from field: string connection_id = 2;
946
+ */
947
+ connectionId?: string;
948
+ /**
949
+ * The sender's webhook-id header.
950
+ *
951
+ * @generated from field: string webhook_id = 3;
952
+ */
953
+ webhookId?: string;
954
+ /**
955
+ * @generated from field: toshi.workspace.v1.ConnectionDeliveryState state = 4;
956
+ */
957
+ state?: ConnectionDeliveryStateJson;
958
+ /**
959
+ * Why it was dropped or failed, such as delivery_failed or store_error;
960
+ * empty otherwise.
961
+ *
962
+ * @generated from field: string reason = 5;
963
+ */
964
+ reason?: string;
965
+ /**
966
+ * The time the sender signed; when the ingress stored it.
967
+ *
968
+ * @generated from field: google.protobuf.Timestamp sent_at = 6;
969
+ */
970
+ sentAt?: TimestampJson;
971
+ /**
972
+ * @generated from field: google.protobuf.Timestamp received_at = 7;
973
+ */
974
+ receivedAt?: TimestampJson;
975
+ /**
976
+ * When it was processed, dropped or failed; unset while received.
977
+ *
978
+ * @generated from field: google.protobuf.Timestamp processed_at = 8;
979
+ */
980
+ processedAt?: TimestampJson;
981
+ /**
982
+ * Tries a worker made since it was last received or replayed.
983
+ *
984
+ * @generated from field: int32 attempts = 9;
985
+ */
986
+ attempts?: number;
987
+ /**
988
+ * The request's Content-Type header.
989
+ *
990
+ * @generated from field: string content_type = 10;
991
+ */
992
+ contentType?: string;
993
+ /**
994
+ * The hex SHA-256 of the body.
995
+ *
996
+ * @generated from field: string body_digest = 11;
997
+ */
998
+ bodyDigest?: string;
999
+ /**
1000
+ * When the workspace's retention removed the body; unset while it is
1001
+ * kept. A delivery without its body is not replayed.
1002
+ *
1003
+ * @generated from field: google.protobuf.Timestamp body_expired_at = 12;
1004
+ */
1005
+ bodyExpiredAt?: TimestampJson;
1006
+ /**
1007
+ * How many times it was replayed.
1008
+ *
1009
+ * @generated from field: int32 replays = 14;
1010
+ */
1011
+ replays?: number;
1012
+ /**
1013
+ * Who asked for the latest replay; empty before one.
1014
+ *
1015
+ * @generated from field: string replayed_by = 15;
1016
+ */
1017
+ replayedBy?: string;
1018
+ /**
1019
+ * The name of the event the delivery carries, such as
1020
+ * github.pull_request.opened for a GitHub connection's; empty when the
1021
+ * sender named none, as for a webhook connection's.
1022
+ *
1023
+ * @generated from field: string event_name = 16;
1024
+ */
1025
+ eventName?: string;
1026
+ };
1027
+ /**
1028
+ * Describes the message toshi.workspace.v1.ConnectionDelivery.
1029
+ * Use `create(ConnectionDeliverySchema)` to create a new message.
1030
+ */
1031
+ export declare const ConnectionDeliverySchema: GenMessage<ConnectionDelivery, {
1032
+ jsonType: ConnectionDeliveryJson;
1033
+ }>;
1034
+ /**
1035
+ * ConnectionDeliveryRun is one time a worker ran a delivery to its end.
1036
+ *
1037
+ * @generated from message toshi.workspace.v1.ConnectionDeliveryRun
1038
+ */
1039
+ export type ConnectionDeliveryRun = Message<"toshi.workspace.v1.ConnectionDeliveryRun"> & {
1040
+ /**
1041
+ * 1 for the first run, counting up.
1042
+ *
1043
+ * @generated from field: int32 run = 1;
1044
+ */
1045
+ run: number;
1046
+ /**
1047
+ * event, delivered, delivery_failed, connection_deleted, body_not_json,
1048
+ * invalid_event, unnamed or failed.
1049
+ *
1050
+ * @generated from field: string outcome = 4;
1051
+ */
1052
+ outcome: string;
1053
+ /**
1054
+ * The event the run wrote or found; empty when it wrote none.
1055
+ *
1056
+ * @generated from field: string event_id = 5;
1057
+ */
1058
+ eventId: string;
1059
+ /**
1060
+ * What failed, for a target that took the delivery on no try or a store
1061
+ * that failed.
1062
+ *
1063
+ * @generated from field: string error = 7;
1064
+ */
1065
+ error: string;
1066
+ /**
1067
+ * @generated from field: google.protobuf.Duration duration = 8;
1068
+ */
1069
+ duration?: Duration | undefined;
1070
+ /**
1071
+ * @generated from field: google.protobuf.Timestamp finished_at = 9;
1072
+ */
1073
+ finishedAt?: Timestamp | undefined;
1074
+ /**
1075
+ * Who asked for the replay the run ran; empty for the sender's message.
1076
+ *
1077
+ * @generated from field: string actor = 10;
1078
+ */
1079
+ actor: string;
1080
+ /**
1081
+ * The outbound delivery that posted it to the connection's target, for
1082
+ * delivered and delivery_failed.
1083
+ *
1084
+ * @generated from field: string target_delivery_id = 11;
1085
+ */
1086
+ targetDeliveryId: string;
1087
+ };
1088
+ /**
1089
+ * ConnectionDeliveryRun is one time a worker ran a delivery to its end.
1090
+ *
1091
+ * @generated from message toshi.workspace.v1.ConnectionDeliveryRun
1092
+ */
1093
+ export type ConnectionDeliveryRunJson = {
1094
+ /**
1095
+ * 1 for the first run, counting up.
1096
+ *
1097
+ * @generated from field: int32 run = 1;
1098
+ */
1099
+ run?: number;
1100
+ /**
1101
+ * event, delivered, delivery_failed, connection_deleted, body_not_json,
1102
+ * invalid_event, unnamed or failed.
1103
+ *
1104
+ * @generated from field: string outcome = 4;
1105
+ */
1106
+ outcome?: string;
1107
+ /**
1108
+ * The event the run wrote or found; empty when it wrote none.
1109
+ *
1110
+ * @generated from field: string event_id = 5;
1111
+ */
1112
+ eventId?: string;
1113
+ /**
1114
+ * What failed, for a target that took the delivery on no try or a store
1115
+ * that failed.
1116
+ *
1117
+ * @generated from field: string error = 7;
1118
+ */
1119
+ error?: string;
1120
+ /**
1121
+ * @generated from field: google.protobuf.Duration duration = 8;
1122
+ */
1123
+ duration?: DurationJson;
1124
+ /**
1125
+ * @generated from field: google.protobuf.Timestamp finished_at = 9;
1126
+ */
1127
+ finishedAt?: TimestampJson;
1128
+ /**
1129
+ * Who asked for the replay the run ran; empty for the sender's message.
1130
+ *
1131
+ * @generated from field: string actor = 10;
1132
+ */
1133
+ actor?: string;
1134
+ /**
1135
+ * The outbound delivery that posted it to the connection's target, for
1136
+ * delivered and delivery_failed.
1137
+ *
1138
+ * @generated from field: string target_delivery_id = 11;
1139
+ */
1140
+ targetDeliveryId?: string;
1141
+ };
1142
+ /**
1143
+ * Describes the message toshi.workspace.v1.ConnectionDeliveryRun.
1144
+ * Use `create(ConnectionDeliveryRunSchema)` to create a new message.
1145
+ */
1146
+ export declare const ConnectionDeliveryRunSchema: GenMessage<ConnectionDeliveryRun, {
1147
+ jsonType: ConnectionDeliveryRunJson;
1148
+ }>;
1149
+ /**
1150
+ * @generated from message toshi.workspace.v1.ListConnectionDeliveriesRequest
1151
+ */
1152
+ export type ListConnectionDeliveriesRequest = Message<"toshi.workspace.v1.ListConnectionDeliveriesRequest"> & {
1153
+ /**
1154
+ * @generated from field: string connection_id = 1;
1155
+ */
1156
+ connectionId: string;
1157
+ /**
1158
+ * Only the deliveries in this state; unspecified lists every state.
1159
+ *
1160
+ * @generated from field: toshi.workspace.v1.ConnectionDeliveryState state = 2;
1161
+ */
1162
+ state: ConnectionDeliveryState;
1163
+ /**
1164
+ * The most deliveries in one page; zero lets the server choose.
1165
+ *
1166
+ * @generated from field: int32 page_size = 3;
1167
+ */
1168
+ pageSize: number;
1169
+ /**
1170
+ * From an earlier response's next_page_token; empty for the first page.
1171
+ *
1172
+ * @generated from field: string page_token = 4;
1173
+ */
1174
+ pageToken: string;
1175
+ };
1176
+ /**
1177
+ * @generated from message toshi.workspace.v1.ListConnectionDeliveriesRequest
1178
+ */
1179
+ export type ListConnectionDeliveriesRequestJson = {
1180
+ /**
1181
+ * @generated from field: string connection_id = 1;
1182
+ */
1183
+ connectionId?: string;
1184
+ /**
1185
+ * Only the deliveries in this state; unspecified lists every state.
1186
+ *
1187
+ * @generated from field: toshi.workspace.v1.ConnectionDeliveryState state = 2;
1188
+ */
1189
+ state?: ConnectionDeliveryStateJson;
1190
+ /**
1191
+ * The most deliveries in one page; zero lets the server choose.
1192
+ *
1193
+ * @generated from field: int32 page_size = 3;
1194
+ */
1195
+ pageSize?: number;
1196
+ /**
1197
+ * From an earlier response's next_page_token; empty for the first page.
1198
+ *
1199
+ * @generated from field: string page_token = 4;
1200
+ */
1201
+ pageToken?: string;
1202
+ };
1203
+ /**
1204
+ * Describes the message toshi.workspace.v1.ListConnectionDeliveriesRequest.
1205
+ * Use `create(ListConnectionDeliveriesRequestSchema)` to create a new message.
1206
+ */
1207
+ export declare const ListConnectionDeliveriesRequestSchema: GenMessage<ListConnectionDeliveriesRequest, {
1208
+ jsonType: ListConnectionDeliveriesRequestJson;
1209
+ }>;
1210
+ /**
1211
+ * @generated from message toshi.workspace.v1.ListConnectionDeliveriesResponse
1212
+ */
1213
+ export type ListConnectionDeliveriesResponse = Message<"toshi.workspace.v1.ListConnectionDeliveriesResponse"> & {
1214
+ /**
1215
+ * @generated from field: repeated toshi.workspace.v1.ConnectionDelivery deliveries = 1;
1216
+ */
1217
+ deliveries: ConnectionDelivery[];
1218
+ /**
1219
+ * Empty on the last page.
1220
+ *
1221
+ * @generated from field: string next_page_token = 2;
1222
+ */
1223
+ nextPageToken: string;
1224
+ };
1225
+ /**
1226
+ * @generated from message toshi.workspace.v1.ListConnectionDeliveriesResponse
1227
+ */
1228
+ export type ListConnectionDeliveriesResponseJson = {
1229
+ /**
1230
+ * @generated from field: repeated toshi.workspace.v1.ConnectionDelivery deliveries = 1;
1231
+ */
1232
+ deliveries?: ConnectionDeliveryJson[];
1233
+ /**
1234
+ * Empty on the last page.
1235
+ *
1236
+ * @generated from field: string next_page_token = 2;
1237
+ */
1238
+ nextPageToken?: string;
1239
+ };
1240
+ /**
1241
+ * Describes the message toshi.workspace.v1.ListConnectionDeliveriesResponse.
1242
+ * Use `create(ListConnectionDeliveriesResponseSchema)` to create a new message.
1243
+ */
1244
+ export declare const ListConnectionDeliveriesResponseSchema: GenMessage<ListConnectionDeliveriesResponse, {
1245
+ jsonType: ListConnectionDeliveriesResponseJson;
1246
+ }>;
1247
+ /**
1248
+ * @generated from message toshi.workspace.v1.GetConnectionDeliveryRequest
1249
+ */
1250
+ export type GetConnectionDeliveryRequest = Message<"toshi.workspace.v1.GetConnectionDeliveryRequest"> & {
1251
+ /**
1252
+ * @generated from field: string id = 1;
1253
+ */
1254
+ id: string;
1255
+ };
1256
+ /**
1257
+ * @generated from message toshi.workspace.v1.GetConnectionDeliveryRequest
1258
+ */
1259
+ export type GetConnectionDeliveryRequestJson = {
1260
+ /**
1261
+ * @generated from field: string id = 1;
1262
+ */
1263
+ id?: string;
1264
+ };
1265
+ /**
1266
+ * Describes the message toshi.workspace.v1.GetConnectionDeliveryRequest.
1267
+ * Use `create(GetConnectionDeliveryRequestSchema)` to create a new message.
1268
+ */
1269
+ export declare const GetConnectionDeliveryRequestSchema: GenMessage<GetConnectionDeliveryRequest, {
1270
+ jsonType: GetConnectionDeliveryRequestJson;
1271
+ }>;
1272
+ /**
1273
+ * @generated from message toshi.workspace.v1.GetConnectionDeliveryResponse
1274
+ */
1275
+ export type GetConnectionDeliveryResponse = Message<"toshi.workspace.v1.GetConnectionDeliveryResponse"> & {
1276
+ /**
1277
+ * @generated from field: toshi.workspace.v1.ConnectionDelivery delivery = 1;
1278
+ */
1279
+ delivery?: ConnectionDelivery | undefined;
1280
+ /**
1281
+ * @generated from field: repeated toshi.workspace.v1.ConnectionDeliveryRun runs = 2;
1282
+ */
1283
+ runs: ConnectionDeliveryRun[];
1284
+ };
1285
+ /**
1286
+ * @generated from message toshi.workspace.v1.GetConnectionDeliveryResponse
1287
+ */
1288
+ export type GetConnectionDeliveryResponseJson = {
1289
+ /**
1290
+ * @generated from field: toshi.workspace.v1.ConnectionDelivery delivery = 1;
1291
+ */
1292
+ delivery?: ConnectionDeliveryJson;
1293
+ /**
1294
+ * @generated from field: repeated toshi.workspace.v1.ConnectionDeliveryRun runs = 2;
1295
+ */
1296
+ runs?: ConnectionDeliveryRunJson[];
1297
+ };
1298
+ /**
1299
+ * Describes the message toshi.workspace.v1.GetConnectionDeliveryResponse.
1300
+ * Use `create(GetConnectionDeliveryResponseSchema)` to create a new message.
1301
+ */
1302
+ export declare const GetConnectionDeliveryResponseSchema: GenMessage<GetConnectionDeliveryResponse, {
1303
+ jsonType: GetConnectionDeliveryResponseJson;
1304
+ }>;
1305
+ /**
1306
+ * @generated from message toshi.workspace.v1.ReplayConnectionDeliveryRequest
1307
+ */
1308
+ export type ReplayConnectionDeliveryRequest = Message<"toshi.workspace.v1.ReplayConnectionDeliveryRequest"> & {
1309
+ /**
1310
+ * @generated from field: string id = 1;
1311
+ */
1312
+ id: string;
1313
+ /**
1314
+ * @generated from field: string request_key = 2;
1315
+ */
1316
+ requestKey: string;
1317
+ };
1318
+ /**
1319
+ * @generated from message toshi.workspace.v1.ReplayConnectionDeliveryRequest
1320
+ */
1321
+ export type ReplayConnectionDeliveryRequestJson = {
1322
+ /**
1323
+ * @generated from field: string id = 1;
1324
+ */
1325
+ id?: string;
1326
+ /**
1327
+ * @generated from field: string request_key = 2;
1328
+ */
1329
+ requestKey?: string;
1330
+ };
1331
+ /**
1332
+ * Describes the message toshi.workspace.v1.ReplayConnectionDeliveryRequest.
1333
+ * Use `create(ReplayConnectionDeliveryRequestSchema)` to create a new message.
1334
+ */
1335
+ export declare const ReplayConnectionDeliveryRequestSchema: GenMessage<ReplayConnectionDeliveryRequest, {
1336
+ jsonType: ReplayConnectionDeliveryRequestJson;
1337
+ }>;
1338
+ /**
1339
+ * @generated from message toshi.workspace.v1.ReplayConnectionDeliveryResponse
1340
+ */
1341
+ export type ReplayConnectionDeliveryResponse = Message<"toshi.workspace.v1.ReplayConnectionDeliveryResponse"> & {
1342
+ /**
1343
+ * The delivery as the replay left it: received, its replays counted.
1344
+ *
1345
+ * @generated from field: toshi.workspace.v1.ConnectionDelivery delivery = 1;
1346
+ */
1347
+ delivery?: ConnectionDelivery | undefined;
1348
+ };
1349
+ /**
1350
+ * @generated from message toshi.workspace.v1.ReplayConnectionDeliveryResponse
1351
+ */
1352
+ export type ReplayConnectionDeliveryResponseJson = {
1353
+ /**
1354
+ * The delivery as the replay left it: received, its replays counted.
1355
+ *
1356
+ * @generated from field: toshi.workspace.v1.ConnectionDelivery delivery = 1;
1357
+ */
1358
+ delivery?: ConnectionDeliveryJson;
1359
+ };
1360
+ /**
1361
+ * Describes the message toshi.workspace.v1.ReplayConnectionDeliveryResponse.
1362
+ * Use `create(ReplayConnectionDeliveryResponseSchema)` to create a new message.
1363
+ */
1364
+ export declare const ReplayConnectionDeliveryResponseSchema: GenMessage<ReplayConnectionDeliveryResponse, {
1365
+ jsonType: ReplayConnectionDeliveryResponseJson;
1366
+ }>;
1367
+ /**
1368
+ * ConnectionKind is the kind of source a connection receives events from.
1369
+ *
1370
+ * @generated from enum toshi.workspace.v1.ConnectionKind
1371
+ */
1372
+ export declare enum ConnectionKind {
1373
+ /**
1374
+ * @generated from enum value: CONNECTION_KIND_UNSPECIFIED = 0;
1375
+ */
1376
+ UNSPECIFIED = 0,
1377
+ /**
1378
+ * A GitHub App installation.
1379
+ *
1380
+ * @generated from enum value: CONNECTION_KIND_GITHUB = 1;
1381
+ */
1382
+ GITHUB = 1,
1383
+ /**
1384
+ * A sender that signs its requests as Standard Webhooks does.
1385
+ *
1386
+ * @generated from enum value: CONNECTION_KIND_WEBHOOK = 2;
1387
+ */
1388
+ WEBHOOK = 2,
1389
+ /**
1390
+ * An inbound mail address. The deployment's mail provider receives the
1391
+ * messages; each is stored as a receipt before it goes to a service's
1392
+ * event channel.
1393
+ *
1394
+ * @generated from enum value: CONNECTION_KIND_MAIL = 3;
1395
+ */
1396
+ MAIL = 3
1397
+ }
1398
+ /**
1399
+ * ConnectionKind is the kind of source a connection receives events from.
1400
+ *
1401
+ * @generated from enum toshi.workspace.v1.ConnectionKind
1402
+ */
1403
+ export type ConnectionKindJson = "CONNECTION_KIND_UNSPECIFIED" | "CONNECTION_KIND_GITHUB" | "CONNECTION_KIND_WEBHOOK" | "CONNECTION_KIND_MAIL";
1404
+ /**
1405
+ * Describes the enum toshi.workspace.v1.ConnectionKind.
1406
+ */
1407
+ export declare const ConnectionKindSchema: GenEnum<ConnectionKind, ConnectionKindJson>;
1408
+ /**
1409
+ * ConnectionDeliveryState is where a WEBHOOK connection's delivery stands.
1410
+ *
1411
+ * @generated from enum toshi.workspace.v1.ConnectionDeliveryState
1412
+ */
1413
+ export declare enum ConnectionDeliveryState {
1414
+ /**
1415
+ * @generated from enum value: CONNECTION_DELIVERY_STATE_UNSPECIFIED = 0;
1416
+ */
1417
+ UNSPECIFIED = 0,
1418
+ /**
1419
+ * Stored and waiting for a worker, or being run.
1420
+ *
1421
+ * @generated from enum value: CONNECTION_DELIVERY_STATE_RECEIVED = 1;
1422
+ */
1423
+ RECEIVED = 1,
1424
+ /**
1425
+ * It became an event, or its connection's target took it.
1426
+ *
1427
+ * @generated from enum value: CONNECTION_DELIVERY_STATE_PROCESSED = 2;
1428
+ */
1429
+ PROCESSED = 2,
1430
+ /**
1431
+ * It became no event, for the reason the delivery names.
1432
+ *
1433
+ * @generated from enum value: CONNECTION_DELIVERY_STATE_DROPPED = 3;
1434
+ */
1435
+ DROPPED = 3,
1436
+ /**
1437
+ * The store failed on every try to write its event, or its connection's
1438
+ * target took it on no try.
1439
+ *
1440
+ * @generated from enum value: CONNECTION_DELIVERY_STATE_FAILED = 4;
1441
+ */
1442
+ FAILED = 4
1443
+ }
1444
+ /**
1445
+ * ConnectionDeliveryState is where a WEBHOOK connection's delivery stands.
1446
+ *
1447
+ * @generated from enum toshi.workspace.v1.ConnectionDeliveryState
1448
+ */
1449
+ export type ConnectionDeliveryStateJson = "CONNECTION_DELIVERY_STATE_UNSPECIFIED" | "CONNECTION_DELIVERY_STATE_RECEIVED" | "CONNECTION_DELIVERY_STATE_PROCESSED" | "CONNECTION_DELIVERY_STATE_DROPPED" | "CONNECTION_DELIVERY_STATE_FAILED";
1450
+ /**
1451
+ * Describes the enum toshi.workspace.v1.ConnectionDeliveryState.
1452
+ */
1453
+ export declare const ConnectionDeliveryStateSchema: GenEnum<ConnectionDeliveryState, ConnectionDeliveryStateJson>;
1454
+ /**
1455
+ * ConnectionService keeps a workspace's connections: the sources of the
1456
+ * events it owns. A GitHub App installation is a connection of the kind
1457
+ * GITHUB, which installing the App creates and removing it deletes; the
1458
+ * calls here list it and cannot create or delete it. A WEBHOOK connection
1459
+ * receives events from a sender that signs its requests as Standard
1460
+ * Webhooks does, with a secret the connection keeps. A MAIL connection
1461
+ * receives mail at an address the deployment's inbound mail provider
1462
+ * serves; each message is stored as a receipt before it goes to a
1463
+ * service's event channel.
1464
+ *
1465
+ * The caller's credential names the workspace, as for WorkloadService.
1466
+ * CreateConnection and RotateConnectionSecret require a request_key, which
1467
+ * works as WorkloadService's do: a retry with the same key and the same
1468
+ * request returns what the first call returned and changes nothing. A
1469
+ * signing secret is shown once, in the answer that made it and an identical
1470
+ * retry's; no read returns it. A retry after the connection is deleted, or
1471
+ * after its secret was rotated again, fails with FAILED_PRECONDITION.
1472
+ *
1473
+ * @generated from service toshi.workspace.v1.ConnectionService
1474
+ */
1475
+ export declare const ConnectionService: GenService<{
1476
+ /**
1477
+ * ListConnections returns the workspace's connections, ordered by id.
1478
+ *
1479
+ * A page holds 100 connections when page_size is zero, and 1000 at most.
1480
+ *
1481
+ * @generated from rpc toshi.workspace.v1.ConnectionService.ListConnections
1482
+ */
1483
+ listConnections: {
1484
+ methodKind: "unary";
1485
+ input: typeof ListConnectionsRequestSchema;
1486
+ output: typeof ListConnectionsResponseSchema;
1487
+ };
1488
+ /**
1489
+ * GetConnection returns one connection. One the workspace does not have,
1490
+ * or one deleted, is NOT_FOUND.
1491
+ *
1492
+ * @generated from rpc toshi.workspace.v1.ConnectionService.GetConnection
1493
+ */
1494
+ getConnection: {
1495
+ methodKind: "unary";
1496
+ input: typeof GetConnectionRequestSchema;
1497
+ output: typeof GetConnectionResponseSchema;
1498
+ };
1499
+ /**
1500
+ * CreateConnection creates a WEBHOOK or MAIL connection. A WEBHOOK
1501
+ * connection's events belong to a project's environment, and the call
1502
+ * returns it with its signing secret. A MAIL connection receives mail at
1503
+ * an address the deployment's inbound mail provider serves and sends each
1504
+ * message to a service's event channel; it has no secret. A kind other
1505
+ * than WEBHOOK or MAIL fails with INVALID_ARGUMENT, as does a missing
1506
+ * required field, a name a live connection of the workspace has with
1507
+ * ALREADY_EXISTS, and an environment the project does not have with
1508
+ * NOT_FOUND.
1509
+ *
1510
+ * @generated from rpc toshi.workspace.v1.ConnectionService.CreateConnection
1511
+ */
1512
+ createConnection: {
1513
+ methodKind: "unary";
1514
+ input: typeof CreateConnectionRequestSchema;
1515
+ output: typeof CreateConnectionResponseSchema;
1516
+ };
1517
+ /**
1518
+ * DeleteConnection deletes a WEBHOOK or MAIL connection: its events are no
1519
+ * longer received, and a mail connection's address takes no more mail. A
1520
+ * GITHUB connection fails with FAILED_PRECONDITION, as only removing the
1521
+ * GitHub App deletes it, as does one that live triggers match events from,
1522
+ * naming them as project/name, and one the workspace does not have with
1523
+ * NOT_FOUND.
1524
+ *
1525
+ * @generated from rpc toshi.workspace.v1.ConnectionService.DeleteConnection
1526
+ */
1527
+ deleteConnection: {
1528
+ methodKind: "unary";
1529
+ input: typeof DeleteConnectionRequestSchema;
1530
+ output: typeof DeleteConnectionResponseSchema;
1531
+ };
1532
+ /**
1533
+ * RotateConnectionSecret gives a WEBHOOK connection a new signing secret
1534
+ * and returns it. For the overlap after the rotation, the previous secret
1535
+ * still verifies, so the sender can switch over; with an overlap of zero
1536
+ * it stops verifying at once. While a previous secret still verifies, a
1537
+ * rotation with an overlap fails with FAILED_PRECONDITION; one with an
1538
+ * overlap of zero always runs. An overlap above 7 days or below zero fails
1539
+ * with INVALID_ARGUMENT, a GITHUB connection with FAILED_PRECONDITION,
1540
+ * and one the workspace does not have with NOT_FOUND.
1541
+ *
1542
+ * @generated from rpc toshi.workspace.v1.ConnectionService.RotateConnectionSecret
1543
+ */
1544
+ rotateConnectionSecret: {
1545
+ methodKind: "unary";
1546
+ input: typeof RotateConnectionSecretRequestSchema;
1547
+ output: typeof RotateConnectionSecretResponseSchema;
1548
+ };
1549
+ /**
1550
+ * UpdateConnection sets the fields of connection.id's connection that
1551
+ * update_mask names. The one field it sets is target, the URL a WEBHOOK
1552
+ * connection's deliveries are posted to in place of the event log: its
1553
+ * url and secret, both required, or an empty url to clear it. An unset
1554
+ * update_mask names the fields connection carries. An empty one, an
1555
+ * unset one with no target, "*" and a path of another field are
1556
+ * INVALID_ARGUMENT. The
1557
+ * secret is sealed under the workspace's data key and never returned; a
1558
+ * deployment with no keyring refuses it with FAILED_PRECONDITION. A
1559
+ * GITHUB connection is FAILED_PRECONDITION, and one the workspace does
1560
+ * not have NOT_FOUND.
1561
+ *
1562
+ * @generated from rpc toshi.workspace.v1.ConnectionService.UpdateConnection
1563
+ */
1564
+ updateConnection: {
1565
+ methodKind: "unary";
1566
+ input: typeof UpdateConnectionRequestSchema;
1567
+ output: typeof UpdateConnectionResponseSchema;
1568
+ };
1569
+ /**
1570
+ * ListConnectionDeliveries returns a WEBHOOK connection's deliveries: the
1571
+ * messages its sender sent, one for each webhook id, newest received
1572
+ * first. A delivery never carries its body. A connection the workspace
1573
+ * does not have is NOT_FOUND; a deleted one's deliveries are still
1574
+ * listed, and a deleted one with none is NOT_FOUND.
1575
+ *
1576
+ * A page holds 100 deliveries when page_size is zero, and 1000 at most.
1577
+ *
1578
+ * @generated from rpc toshi.workspace.v1.ConnectionService.ListConnectionDeliveries
1579
+ */
1580
+ listConnectionDeliveries: {
1581
+ methodKind: "unary";
1582
+ input: typeof ListConnectionDeliveriesRequestSchema;
1583
+ output: typeof ListConnectionDeliveriesResponseSchema;
1584
+ };
1585
+ /**
1586
+ * GetConnectionDelivery returns one delivery, without its body, and its
1587
+ * runs: each time a worker made it an event, posted it to its
1588
+ * connection's target, dropped it or failed it, oldest first. A delivery the workspace does not have is NOT_FOUND.
1589
+ *
1590
+ * @generated from rpc toshi.workspace.v1.ConnectionService.GetConnectionDelivery
1591
+ */
1592
+ getConnectionDelivery: {
1593
+ methodKind: "unary";
1594
+ input: typeof GetConnectionDeliveryRequestSchema;
1595
+ output: typeof GetConnectionDeliveryResponseSchema;
1596
+ };
1597
+ /**
1598
+ * ReplayConnectionDelivery sends a processed, dropped or failed delivery
1599
+ * through its connection again, as a new message under the same webhook
1600
+ * id: it goes to the connection's target then, or to the event log when
1601
+ * it has none, and its run records the caller. A delivery still received, whose receipt or body
1602
+ * expired, or whose connection is deleted is FAILED_PRECONDITION, as is
1603
+ * one another replay counted since this call read it. A delivery the
1604
+ * workspace does not have is NOT_FOUND.
1605
+ *
1606
+ * request_key is required: a retry with the same key and the same
1607
+ * request returns what the first call returned and replays nothing.
1608
+ *
1609
+ * @generated from rpc toshi.workspace.v1.ConnectionService.ReplayConnectionDelivery
1610
+ */
1611
+ replayConnectionDelivery: {
1612
+ methodKind: "unary";
1613
+ input: typeof ReplayConnectionDeliveryRequestSchema;
1614
+ output: typeof ReplayConnectionDeliveryResponseSchema;
1615
+ };
1616
+ }>;