@toshicloud/sdk 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +250 -2
  3. package/dist/client.d.ts +153 -0
  4. package/dist/client.js +92 -0
  5. package/dist/errors.d.ts +28 -0
  6. package/dist/errors.js +77 -0
  7. package/dist/execute.d.ts +7 -0
  8. package/dist/execute.js +380 -0
  9. package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +843 -0
  10. package/dist/gen/toshi/workspace/v1/artifacts_pb.js +96 -0
  11. package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +2713 -0
  12. package/dist/gen/toshi/workspace/v1/channels_pb.js +336 -0
  13. package/dist/gen/toshi/workspace/v1/display_pb.d.ts +1166 -0
  14. package/dist/gen/toshi/workspace/v1/display_pb.js +214 -0
  15. package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1540 -0
  16. package/dist/gen/toshi/workspace/v1/projects_pb.js +207 -0
  17. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +1024 -0
  18. package/dist/gen/toshi/workspace/v1/recordings_pb.js +201 -0
  19. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +1214 -0
  20. package/dist/gen/toshi/workspace/v1/secrets_pb.js +182 -0
  21. package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +444 -0
  22. package/dist/gen/toshi/workspace/v1/volumes_pb.js +107 -0
  23. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +1018 -0
  24. package/dist/gen/toshi/workspace/v1/webhook_pb.js +153 -0
  25. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2858 -0
  26. package/dist/gen/toshi/workspace/v1/workloads_pb.js +261 -0
  27. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +5380 -0
  28. package/dist/gen/toshi/workspace/v1/workspace_pb.js +855 -0
  29. package/dist/index.d.ts +15 -0
  30. package/dist/index.js +14 -0
  31. package/dist/interceptors.d.ts +10 -0
  32. package/dist/interceptors.js +159 -0
  33. package/dist/output.d.ts +7 -0
  34. package/dist/output.js +77 -0
  35. package/dist/retry.d.ts +42 -0
  36. package/dist/retry.js +254 -0
  37. package/dist/run.d.ts +10 -0
  38. package/dist/run.js +175 -0
  39. package/dist/stream.d.ts +21 -0
  40. package/dist/stream.js +84 -0
  41. package/dist/wait.d.ts +13 -0
  42. package/dist/wait.js +41 -0
  43. package/dist/watch.d.ts +16 -0
  44. package/dist/watch.js +277 -0
  45. package/package.json +47 -4
@@ -0,0 +1,1540 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, DurationJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file toshi/workspace/v1/projects.proto.
6
+ */
7
+ export declare const file_toshi_workspace_v1_projects: GenFile;
8
+ /**
9
+ * Project is one of a workspace's projects.
10
+ *
11
+ * @generated from message toshi.workspace.v1.Project
12
+ */
13
+ export type Project = Message<"toshi.workspace.v1.Project"> & {
14
+ /**
15
+ * @generated from field: string name = 1;
16
+ */
17
+ name: string;
18
+ /**
19
+ * @generated from field: google.protobuf.Timestamp created_at = 2;
20
+ */
21
+ createdAt?: Timestamp | undefined;
22
+ /**
23
+ * @generated from field: repeated toshi.workspace.v1.ProjectEnvironment environments = 3;
24
+ */
25
+ environments: ProjectEnvironment[];
26
+ };
27
+ /**
28
+ * Project is one of a workspace's projects.
29
+ *
30
+ * @generated from message toshi.workspace.v1.Project
31
+ */
32
+ export type ProjectJson = {
33
+ /**
34
+ * @generated from field: string name = 1;
35
+ */
36
+ name?: string;
37
+ /**
38
+ * @generated from field: google.protobuf.Timestamp created_at = 2;
39
+ */
40
+ createdAt?: TimestampJson;
41
+ /**
42
+ * @generated from field: repeated toshi.workspace.v1.ProjectEnvironment environments = 3;
43
+ */
44
+ environments?: ProjectEnvironmentJson[];
45
+ };
46
+ /**
47
+ * Describes the message toshi.workspace.v1.Project.
48
+ * Use `create(ProjectSchema)` to create a new message.
49
+ */
50
+ export declare const ProjectSchema: GenMessage<Project, {
51
+ jsonType: ProjectJson;
52
+ }>;
53
+ /**
54
+ * ProjectEnvironment is one of a project's environments.
55
+ *
56
+ * @generated from message toshi.workspace.v1.ProjectEnvironment
57
+ */
58
+ export type ProjectEnvironment = Message<"toshi.workspace.v1.ProjectEnvironment"> & {
59
+ /**
60
+ * @generated from field: string name = 1;
61
+ */
62
+ name: string;
63
+ /**
64
+ * development, preview or production.
65
+ *
66
+ * @generated from field: string kind = 2;
67
+ */
68
+ kind: string;
69
+ };
70
+ /**
71
+ * ProjectEnvironment is one of a project's environments.
72
+ *
73
+ * @generated from message toshi.workspace.v1.ProjectEnvironment
74
+ */
75
+ export type ProjectEnvironmentJson = {
76
+ /**
77
+ * @generated from field: string name = 1;
78
+ */
79
+ name?: string;
80
+ /**
81
+ * development, preview or production.
82
+ *
83
+ * @generated from field: string kind = 2;
84
+ */
85
+ kind?: string;
86
+ };
87
+ /**
88
+ * Describes the message toshi.workspace.v1.ProjectEnvironment.
89
+ * Use `create(ProjectEnvironmentSchema)` to create a new message.
90
+ */
91
+ export declare const ProjectEnvironmentSchema: GenMessage<ProjectEnvironment, {
92
+ jsonType: ProjectEnvironmentJson;
93
+ }>;
94
+ /**
95
+ * Repository is a repository a project claims: a CI job of the repository
96
+ * runs in that project.
97
+ *
98
+ * @generated from message toshi.workspace.v1.Repository
99
+ */
100
+ export type Repository = Message<"toshi.workspace.v1.Repository"> & {
101
+ /**
102
+ * "owner/name".
103
+ *
104
+ * @generated from field: string repository = 1;
105
+ */
106
+ repository: string;
107
+ /**
108
+ * The claiming project's name.
109
+ *
110
+ * @generated from field: string project = 2;
111
+ */
112
+ project: string;
113
+ /**
114
+ * @generated from field: google.protobuf.Timestamp claimed_at = 3;
115
+ */
116
+ claimedAt?: Timestamp | undefined;
117
+ };
118
+ /**
119
+ * Repository is a repository a project claims: a CI job of the repository
120
+ * runs in that project.
121
+ *
122
+ * @generated from message toshi.workspace.v1.Repository
123
+ */
124
+ export type RepositoryJson = {
125
+ /**
126
+ * "owner/name".
127
+ *
128
+ * @generated from field: string repository = 1;
129
+ */
130
+ repository?: string;
131
+ /**
132
+ * The claiming project's name.
133
+ *
134
+ * @generated from field: string project = 2;
135
+ */
136
+ project?: string;
137
+ /**
138
+ * @generated from field: google.protobuf.Timestamp claimed_at = 3;
139
+ */
140
+ claimedAt?: TimestampJson;
141
+ };
142
+ /**
143
+ * Describes the message toshi.workspace.v1.Repository.
144
+ * Use `create(RepositorySchema)` to create a new message.
145
+ */
146
+ export declare const RepositorySchema: GenMessage<Repository, {
147
+ jsonType: RepositoryJson;
148
+ }>;
149
+ /**
150
+ * @generated from message toshi.workspace.v1.ListProjectsRequest
151
+ */
152
+ export type ListProjectsRequest = Message<"toshi.workspace.v1.ListProjectsRequest"> & {
153
+ /**
154
+ * The most projects in one page; zero lets the server choose.
155
+ *
156
+ * @generated from field: int32 page_size = 1;
157
+ */
158
+ pageSize: number;
159
+ /**
160
+ * From an earlier response's next_page_token; empty for the first page.
161
+ *
162
+ * @generated from field: string page_token = 2;
163
+ */
164
+ pageToken: string;
165
+ };
166
+ /**
167
+ * @generated from message toshi.workspace.v1.ListProjectsRequest
168
+ */
169
+ export type ListProjectsRequestJson = {
170
+ /**
171
+ * The most projects in one page; zero lets the server choose.
172
+ *
173
+ * @generated from field: int32 page_size = 1;
174
+ */
175
+ pageSize?: number;
176
+ /**
177
+ * From an earlier response's next_page_token; empty for the first page.
178
+ *
179
+ * @generated from field: string page_token = 2;
180
+ */
181
+ pageToken?: string;
182
+ };
183
+ /**
184
+ * Describes the message toshi.workspace.v1.ListProjectsRequest.
185
+ * Use `create(ListProjectsRequestSchema)` to create a new message.
186
+ */
187
+ export declare const ListProjectsRequestSchema: GenMessage<ListProjectsRequest, {
188
+ jsonType: ListProjectsRequestJson;
189
+ }>;
190
+ /**
191
+ * @generated from message toshi.workspace.v1.ListProjectsResponse
192
+ */
193
+ export type ListProjectsResponse = Message<"toshi.workspace.v1.ListProjectsResponse"> & {
194
+ /**
195
+ * @generated from field: repeated toshi.workspace.v1.Project projects = 1;
196
+ */
197
+ projects: Project[];
198
+ /**
199
+ * The limit of the token that made the call. A server that has this
200
+ * field always sets it; both its fields are empty for a caller that
201
+ * covers the whole workspace.
202
+ *
203
+ * @generated from field: toshi.workspace.v1.TokenLimit token_limit = 2;
204
+ */
205
+ tokenLimit?: TokenLimit | undefined;
206
+ /**
207
+ * Empty on the last page.
208
+ *
209
+ * @generated from field: string next_page_token = 3;
210
+ */
211
+ nextPageToken: string;
212
+ };
213
+ /**
214
+ * @generated from message toshi.workspace.v1.ListProjectsResponse
215
+ */
216
+ export type ListProjectsResponseJson = {
217
+ /**
218
+ * @generated from field: repeated toshi.workspace.v1.Project projects = 1;
219
+ */
220
+ projects?: ProjectJson[];
221
+ /**
222
+ * The limit of the token that made the call. A server that has this
223
+ * field always sets it; both its fields are empty for a caller that
224
+ * covers the whole workspace.
225
+ *
226
+ * @generated from field: toshi.workspace.v1.TokenLimit token_limit = 2;
227
+ */
228
+ tokenLimit?: TokenLimitJson;
229
+ /**
230
+ * Empty on the last page.
231
+ *
232
+ * @generated from field: string next_page_token = 3;
233
+ */
234
+ nextPageToken?: string;
235
+ };
236
+ /**
237
+ * Describes the message toshi.workspace.v1.ListProjectsResponse.
238
+ * Use `create(ListProjectsResponseSchema)` to create a new message.
239
+ */
240
+ export declare const ListProjectsResponseSchema: GenMessage<ListProjectsResponse, {
241
+ jsonType: ListProjectsResponseJson;
242
+ }>;
243
+ /**
244
+ * TokenLimit names the project and the environment an API token is
245
+ * limited to.
246
+ *
247
+ * @generated from message toshi.workspace.v1.TokenLimit
248
+ */
249
+ export type TokenLimit = Message<"toshi.workspace.v1.TokenLimit"> & {
250
+ /**
251
+ * The project's name; empty when the token covers the whole workspace.
252
+ *
253
+ * @generated from field: string project = 1;
254
+ */
255
+ project: string;
256
+ /**
257
+ * The environment's name; empty when the token covers every
258
+ * environment of its project, or the whole workspace.
259
+ *
260
+ * @generated from field: string environment = 2;
261
+ */
262
+ environment: string;
263
+ };
264
+ /**
265
+ * TokenLimit names the project and the environment an API token is
266
+ * limited to.
267
+ *
268
+ * @generated from message toshi.workspace.v1.TokenLimit
269
+ */
270
+ export type TokenLimitJson = {
271
+ /**
272
+ * The project's name; empty when the token covers the whole workspace.
273
+ *
274
+ * @generated from field: string project = 1;
275
+ */
276
+ project?: string;
277
+ /**
278
+ * The environment's name; empty when the token covers every
279
+ * environment of its project, or the whole workspace.
280
+ *
281
+ * @generated from field: string environment = 2;
282
+ */
283
+ environment?: string;
284
+ };
285
+ /**
286
+ * Describes the message toshi.workspace.v1.TokenLimit.
287
+ * Use `create(TokenLimitSchema)` to create a new message.
288
+ */
289
+ export declare const TokenLimitSchema: GenMessage<TokenLimit, {
290
+ jsonType: TokenLimitJson;
291
+ }>;
292
+ /**
293
+ * @generated from message toshi.workspace.v1.ListRepositoriesRequest
294
+ */
295
+ export type ListRepositoriesRequest = Message<"toshi.workspace.v1.ListRepositoriesRequest"> & {
296
+ /**
297
+ * Only this project's repositories; empty lists every project's.
298
+ *
299
+ * @generated from field: string project = 1;
300
+ */
301
+ project: string;
302
+ /**
303
+ * The most repositories in one page; zero lets the server choose.
304
+ *
305
+ * @generated from field: int32 page_size = 2;
306
+ */
307
+ pageSize: number;
308
+ /**
309
+ * From an earlier response's next_page_token; empty for the first page.
310
+ *
311
+ * @generated from field: string page_token = 3;
312
+ */
313
+ pageToken: string;
314
+ };
315
+ /**
316
+ * @generated from message toshi.workspace.v1.ListRepositoriesRequest
317
+ */
318
+ export type ListRepositoriesRequestJson = {
319
+ /**
320
+ * Only this project's repositories; empty lists every project's.
321
+ *
322
+ * @generated from field: string project = 1;
323
+ */
324
+ project?: string;
325
+ /**
326
+ * The most repositories in one page; zero lets the server choose.
327
+ *
328
+ * @generated from field: int32 page_size = 2;
329
+ */
330
+ pageSize?: number;
331
+ /**
332
+ * From an earlier response's next_page_token; empty for the first page.
333
+ *
334
+ * @generated from field: string page_token = 3;
335
+ */
336
+ pageToken?: string;
337
+ };
338
+ /**
339
+ * Describes the message toshi.workspace.v1.ListRepositoriesRequest.
340
+ * Use `create(ListRepositoriesRequestSchema)` to create a new message.
341
+ */
342
+ export declare const ListRepositoriesRequestSchema: GenMessage<ListRepositoriesRequest, {
343
+ jsonType: ListRepositoriesRequestJson;
344
+ }>;
345
+ /**
346
+ * @generated from message toshi.workspace.v1.ListRepositoriesResponse
347
+ */
348
+ export type ListRepositoriesResponse = Message<"toshi.workspace.v1.ListRepositoriesResponse"> & {
349
+ /**
350
+ * @generated from field: repeated toshi.workspace.v1.Repository repositories = 1;
351
+ */
352
+ repositories: Repository[];
353
+ /**
354
+ * Empty on the last page.
355
+ *
356
+ * @generated from field: string next_page_token = 2;
357
+ */
358
+ nextPageToken: string;
359
+ };
360
+ /**
361
+ * @generated from message toshi.workspace.v1.ListRepositoriesResponse
362
+ */
363
+ export type ListRepositoriesResponseJson = {
364
+ /**
365
+ * @generated from field: repeated toshi.workspace.v1.Repository repositories = 1;
366
+ */
367
+ repositories?: RepositoryJson[];
368
+ /**
369
+ * Empty on the last page.
370
+ *
371
+ * @generated from field: string next_page_token = 2;
372
+ */
373
+ nextPageToken?: string;
374
+ };
375
+ /**
376
+ * Describes the message toshi.workspace.v1.ListRepositoriesResponse.
377
+ * Use `create(ListRepositoriesResponseSchema)` to create a new message.
378
+ */
379
+ export declare const ListRepositoriesResponseSchema: GenMessage<ListRepositoriesResponse, {
380
+ jsonType: ListRepositoriesResponseJson;
381
+ }>;
382
+ /**
383
+ * @generated from message toshi.workspace.v1.CreateProjectRequest
384
+ */
385
+ export type CreateProjectRequest = Message<"toshi.workspace.v1.CreateProjectRequest"> & {
386
+ /**
387
+ * @generated from field: string name = 1;
388
+ */
389
+ name: string;
390
+ };
391
+ /**
392
+ * @generated from message toshi.workspace.v1.CreateProjectRequest
393
+ */
394
+ export type CreateProjectRequestJson = {
395
+ /**
396
+ * @generated from field: string name = 1;
397
+ */
398
+ name?: string;
399
+ };
400
+ /**
401
+ * Describes the message toshi.workspace.v1.CreateProjectRequest.
402
+ * Use `create(CreateProjectRequestSchema)` to create a new message.
403
+ */
404
+ export declare const CreateProjectRequestSchema: GenMessage<CreateProjectRequest, {
405
+ jsonType: CreateProjectRequestJson;
406
+ }>;
407
+ /**
408
+ * @generated from message toshi.workspace.v1.CreateProjectResponse
409
+ */
410
+ export type CreateProjectResponse = Message<"toshi.workspace.v1.CreateProjectResponse"> & {
411
+ /**
412
+ * @generated from field: toshi.workspace.v1.Project project = 1;
413
+ */
414
+ project?: Project | undefined;
415
+ };
416
+ /**
417
+ * @generated from message toshi.workspace.v1.CreateProjectResponse
418
+ */
419
+ export type CreateProjectResponseJson = {
420
+ /**
421
+ * @generated from field: toshi.workspace.v1.Project project = 1;
422
+ */
423
+ project?: ProjectJson;
424
+ };
425
+ /**
426
+ * Describes the message toshi.workspace.v1.CreateProjectResponse.
427
+ * Use `create(CreateProjectResponseSchema)` to create a new message.
428
+ */
429
+ export declare const CreateProjectResponseSchema: GenMessage<CreateProjectResponse, {
430
+ jsonType: CreateProjectResponseJson;
431
+ }>;
432
+ /**
433
+ * @generated from message toshi.workspace.v1.ClaimRepositoryRequest
434
+ */
435
+ export type ClaimRepositoryRequest = Message<"toshi.workspace.v1.ClaimRepositoryRequest"> & {
436
+ /**
437
+ * "owner/name".
438
+ *
439
+ * @generated from field: string repository = 1;
440
+ */
441
+ repository: string;
442
+ /**
443
+ * The name of the project that is to claim it.
444
+ *
445
+ * @generated from field: string project = 2;
446
+ */
447
+ project: string;
448
+ };
449
+ /**
450
+ * @generated from message toshi.workspace.v1.ClaimRepositoryRequest
451
+ */
452
+ export type ClaimRepositoryRequestJson = {
453
+ /**
454
+ * "owner/name".
455
+ *
456
+ * @generated from field: string repository = 1;
457
+ */
458
+ repository?: string;
459
+ /**
460
+ * The name of the project that is to claim it.
461
+ *
462
+ * @generated from field: string project = 2;
463
+ */
464
+ project?: string;
465
+ };
466
+ /**
467
+ * Describes the message toshi.workspace.v1.ClaimRepositoryRequest.
468
+ * Use `create(ClaimRepositoryRequestSchema)` to create a new message.
469
+ */
470
+ export declare const ClaimRepositoryRequestSchema: GenMessage<ClaimRepositoryRequest, {
471
+ jsonType: ClaimRepositoryRequestJson;
472
+ }>;
473
+ /**
474
+ * @generated from message toshi.workspace.v1.ClaimRepositoryResponse
475
+ */
476
+ export type ClaimRepositoryResponse = Message<"toshi.workspace.v1.ClaimRepositoryResponse"> & {
477
+ /**
478
+ * @generated from field: toshi.workspace.v1.Repository repository = 1;
479
+ */
480
+ repository?: Repository | undefined;
481
+ /**
482
+ * The name of the project that claimed the repository before the call;
483
+ * empty when no project did.
484
+ *
485
+ * @generated from field: string previous_project = 2;
486
+ */
487
+ previousProject: string;
488
+ };
489
+ /**
490
+ * @generated from message toshi.workspace.v1.ClaimRepositoryResponse
491
+ */
492
+ export type ClaimRepositoryResponseJson = {
493
+ /**
494
+ * @generated from field: toshi.workspace.v1.Repository repository = 1;
495
+ */
496
+ repository?: RepositoryJson;
497
+ /**
498
+ * The name of the project that claimed the repository before the call;
499
+ * empty when no project did.
500
+ *
501
+ * @generated from field: string previous_project = 2;
502
+ */
503
+ previousProject?: string;
504
+ };
505
+ /**
506
+ * Describes the message toshi.workspace.v1.ClaimRepositoryResponse.
507
+ * Use `create(ClaimRepositoryResponseSchema)` to create a new message.
508
+ */
509
+ export declare const ClaimRepositoryResponseSchema: GenMessage<ClaimRepositoryResponse, {
510
+ jsonType: ClaimRepositoryResponseJson;
511
+ }>;
512
+ /**
513
+ * @generated from message toshi.workspace.v1.GetProjectRequest
514
+ */
515
+ export type GetProjectRequest = Message<"toshi.workspace.v1.GetProjectRequest"> & {
516
+ /**
517
+ * The project's name.
518
+ *
519
+ * @generated from field: string name = 1;
520
+ */
521
+ name: string;
522
+ };
523
+ /**
524
+ * @generated from message toshi.workspace.v1.GetProjectRequest
525
+ */
526
+ export type GetProjectRequestJson = {
527
+ /**
528
+ * The project's name.
529
+ *
530
+ * @generated from field: string name = 1;
531
+ */
532
+ name?: string;
533
+ };
534
+ /**
535
+ * Describes the message toshi.workspace.v1.GetProjectRequest.
536
+ * Use `create(GetProjectRequestSchema)` to create a new message.
537
+ */
538
+ export declare const GetProjectRequestSchema: GenMessage<GetProjectRequest, {
539
+ jsonType: GetProjectRequestJson;
540
+ }>;
541
+ /**
542
+ * @generated from message toshi.workspace.v1.GetProjectResponse
543
+ */
544
+ export type GetProjectResponse = Message<"toshi.workspace.v1.GetProjectResponse"> & {
545
+ /**
546
+ * @generated from field: toshi.workspace.v1.Project project = 1;
547
+ */
548
+ project?: Project | undefined;
549
+ };
550
+ /**
551
+ * @generated from message toshi.workspace.v1.GetProjectResponse
552
+ */
553
+ export type GetProjectResponseJson = {
554
+ /**
555
+ * @generated from field: toshi.workspace.v1.Project project = 1;
556
+ */
557
+ project?: ProjectJson;
558
+ };
559
+ /**
560
+ * Describes the message toshi.workspace.v1.GetProjectResponse.
561
+ * Use `create(GetProjectResponseSchema)` to create a new message.
562
+ */
563
+ export declare const GetProjectResponseSchema: GenMessage<GetProjectResponse, {
564
+ jsonType: GetProjectResponseJson;
565
+ }>;
566
+ /**
567
+ * @generated from message toshi.workspace.v1.CreateEnvironmentRequest
568
+ */
569
+ export type CreateEnvironmentRequest = Message<"toshi.workspace.v1.CreateEnvironmentRequest"> & {
570
+ /**
571
+ * The name of the project that is to have the environment.
572
+ *
573
+ * @generated from field: string project = 1;
574
+ */
575
+ project: string;
576
+ /**
577
+ * development, preview or production; the environment is named after
578
+ * it.
579
+ *
580
+ * @generated from field: string kind = 2;
581
+ */
582
+ kind: string;
583
+ };
584
+ /**
585
+ * @generated from message toshi.workspace.v1.CreateEnvironmentRequest
586
+ */
587
+ export type CreateEnvironmentRequestJson = {
588
+ /**
589
+ * The name of the project that is to have the environment.
590
+ *
591
+ * @generated from field: string project = 1;
592
+ */
593
+ project?: string;
594
+ /**
595
+ * development, preview or production; the environment is named after
596
+ * it.
597
+ *
598
+ * @generated from field: string kind = 2;
599
+ */
600
+ kind?: string;
601
+ };
602
+ /**
603
+ * Describes the message toshi.workspace.v1.CreateEnvironmentRequest.
604
+ * Use `create(CreateEnvironmentRequestSchema)` to create a new message.
605
+ */
606
+ export declare const CreateEnvironmentRequestSchema: GenMessage<CreateEnvironmentRequest, {
607
+ jsonType: CreateEnvironmentRequestJson;
608
+ }>;
609
+ /**
610
+ * @generated from message toshi.workspace.v1.CreateEnvironmentResponse
611
+ */
612
+ export type CreateEnvironmentResponse = Message<"toshi.workspace.v1.CreateEnvironmentResponse"> & {
613
+ /**
614
+ * @generated from field: toshi.workspace.v1.ProjectEnvironment environment = 1;
615
+ */
616
+ environment?: ProjectEnvironment | undefined;
617
+ };
618
+ /**
619
+ * @generated from message toshi.workspace.v1.CreateEnvironmentResponse
620
+ */
621
+ export type CreateEnvironmentResponseJson = {
622
+ /**
623
+ * @generated from field: toshi.workspace.v1.ProjectEnvironment environment = 1;
624
+ */
625
+ environment?: ProjectEnvironmentJson;
626
+ };
627
+ /**
628
+ * Describes the message toshi.workspace.v1.CreateEnvironmentResponse.
629
+ * Use `create(CreateEnvironmentResponseSchema)` to create a new message.
630
+ */
631
+ export declare const CreateEnvironmentResponseSchema: GenMessage<CreateEnvironmentResponse, {
632
+ jsonType: CreateEnvironmentResponseJson;
633
+ }>;
634
+ /**
635
+ * @generated from message toshi.workspace.v1.DeleteEnvironmentRequest
636
+ */
637
+ export type DeleteEnvironmentRequest = Message<"toshi.workspace.v1.DeleteEnvironmentRequest"> & {
638
+ /**
639
+ * The name of the project that has the environment.
640
+ *
641
+ * @generated from field: string project = 1;
642
+ */
643
+ project: string;
644
+ /**
645
+ * The environment's name.
646
+ *
647
+ * @generated from field: string name = 2;
648
+ */
649
+ name: string;
650
+ };
651
+ /**
652
+ * @generated from message toshi.workspace.v1.DeleteEnvironmentRequest
653
+ */
654
+ export type DeleteEnvironmentRequestJson = {
655
+ /**
656
+ * The name of the project that has the environment.
657
+ *
658
+ * @generated from field: string project = 1;
659
+ */
660
+ project?: string;
661
+ /**
662
+ * The environment's name.
663
+ *
664
+ * @generated from field: string name = 2;
665
+ */
666
+ name?: string;
667
+ };
668
+ /**
669
+ * Describes the message toshi.workspace.v1.DeleteEnvironmentRequest.
670
+ * Use `create(DeleteEnvironmentRequestSchema)` to create a new message.
671
+ */
672
+ export declare const DeleteEnvironmentRequestSchema: GenMessage<DeleteEnvironmentRequest, {
673
+ jsonType: DeleteEnvironmentRequestJson;
674
+ }>;
675
+ /**
676
+ * @generated from message toshi.workspace.v1.DeleteEnvironmentResponse
677
+ */
678
+ export type DeleteEnvironmentResponse = Message<"toshi.workspace.v1.DeleteEnvironmentResponse"> & {};
679
+ /**
680
+ * @generated from message toshi.workspace.v1.DeleteEnvironmentResponse
681
+ */
682
+ export type DeleteEnvironmentResponseJson = {};
683
+ /**
684
+ * Describes the message toshi.workspace.v1.DeleteEnvironmentResponse.
685
+ * Use `create(DeleteEnvironmentResponseSchema)` to create a new message.
686
+ */
687
+ export declare const DeleteEnvironmentResponseSchema: GenMessage<DeleteEnvironmentResponse, {
688
+ jsonType: DeleteEnvironmentResponseJson;
689
+ }>;
690
+ /**
691
+ * BranchRule is one of a project's branch rules: it chooses the
692
+ * environment of a CI job whose run it matches.
693
+ *
694
+ * @generated from message toshi.workspace.v1.BranchRule
695
+ */
696
+ export type BranchRule = Message<"toshi.workspace.v1.BranchRule"> & {
697
+ /**
698
+ * default_branch matches a run of its repository's default branch,
699
+ * pattern a run of a branch the pattern matches, and fallback every run
700
+ * no earlier rule matched. Only a push, schedule or workflow_dispatch
701
+ * run of a repository that is not a fork, at a commit on its branch,
702
+ * can match a rule other than fallback; every other run, a pull
703
+ * request's included, goes to the fallback rule.
704
+ *
705
+ * @generated from field: string match = 1;
706
+ */
707
+ match: string;
708
+ /**
709
+ * A pattern rule's branch name or glob, and empty for the other
710
+ * matches. * matches any run of characters within one /-separated
711
+ * segment and ** any run across segments; every other character matches
712
+ * itself, case-sensitively.
713
+ *
714
+ * @generated from field: string pattern = 2;
715
+ */
716
+ pattern: string;
717
+ /**
718
+ * The name of the project's environment the rule chooses; empty chooses
719
+ * none: a job the rule matches gets no workload token and no secrets.
720
+ *
721
+ * @generated from field: string environment = 3;
722
+ */
723
+ environment: string;
724
+ };
725
+ /**
726
+ * BranchRule is one of a project's branch rules: it chooses the
727
+ * environment of a CI job whose run it matches.
728
+ *
729
+ * @generated from message toshi.workspace.v1.BranchRule
730
+ */
731
+ export type BranchRuleJson = {
732
+ /**
733
+ * default_branch matches a run of its repository's default branch,
734
+ * pattern a run of a branch the pattern matches, and fallback every run
735
+ * no earlier rule matched. Only a push, schedule or workflow_dispatch
736
+ * run of a repository that is not a fork, at a commit on its branch,
737
+ * can match a rule other than fallback; every other run, a pull
738
+ * request's included, goes to the fallback rule.
739
+ *
740
+ * @generated from field: string match = 1;
741
+ */
742
+ match?: string;
743
+ /**
744
+ * A pattern rule's branch name or glob, and empty for the other
745
+ * matches. * matches any run of characters within one /-separated
746
+ * segment and ** any run across segments; every other character matches
747
+ * itself, case-sensitively.
748
+ *
749
+ * @generated from field: string pattern = 2;
750
+ */
751
+ pattern?: string;
752
+ /**
753
+ * The name of the project's environment the rule chooses; empty chooses
754
+ * none: a job the rule matches gets no workload token and no secrets.
755
+ *
756
+ * @generated from field: string environment = 3;
757
+ */
758
+ environment?: string;
759
+ };
760
+ /**
761
+ * Describes the message toshi.workspace.v1.BranchRule.
762
+ * Use `create(BranchRuleSchema)` to create a new message.
763
+ */
764
+ export declare const BranchRuleSchema: GenMessage<BranchRule, {
765
+ jsonType: BranchRuleJson;
766
+ }>;
767
+ /**
768
+ * @generated from message toshi.workspace.v1.ListBranchRulesRequest
769
+ */
770
+ export type ListBranchRulesRequest = Message<"toshi.workspace.v1.ListBranchRulesRequest"> & {
771
+ /**
772
+ * The project's name.
773
+ *
774
+ * @generated from field: string project = 1;
775
+ */
776
+ project: string;
777
+ /**
778
+ * The most rules in one page; zero lets the server choose.
779
+ *
780
+ * @generated from field: int32 page_size = 2;
781
+ */
782
+ pageSize: number;
783
+ /**
784
+ * From an earlier response's next_page_token; empty for the first page.
785
+ *
786
+ * @generated from field: string page_token = 3;
787
+ */
788
+ pageToken: string;
789
+ };
790
+ /**
791
+ * @generated from message toshi.workspace.v1.ListBranchRulesRequest
792
+ */
793
+ export type ListBranchRulesRequestJson = {
794
+ /**
795
+ * The project's name.
796
+ *
797
+ * @generated from field: string project = 1;
798
+ */
799
+ project?: string;
800
+ /**
801
+ * The most rules in one page; zero lets the server choose.
802
+ *
803
+ * @generated from field: int32 page_size = 2;
804
+ */
805
+ pageSize?: number;
806
+ /**
807
+ * From an earlier response's next_page_token; empty for the first page.
808
+ *
809
+ * @generated from field: string page_token = 3;
810
+ */
811
+ pageToken?: string;
812
+ };
813
+ /**
814
+ * Describes the message toshi.workspace.v1.ListBranchRulesRequest.
815
+ * Use `create(ListBranchRulesRequestSchema)` to create a new message.
816
+ */
817
+ export declare const ListBranchRulesRequestSchema: GenMessage<ListBranchRulesRequest, {
818
+ jsonType: ListBranchRulesRequestJson;
819
+ }>;
820
+ /**
821
+ * @generated from message toshi.workspace.v1.ListBranchRulesResponse
822
+ */
823
+ export type ListBranchRulesResponse = Message<"toshi.workspace.v1.ListBranchRulesResponse"> & {
824
+ /**
825
+ * @generated from field: repeated toshi.workspace.v1.BranchRule rules = 1;
826
+ */
827
+ rules: BranchRule[];
828
+ /**
829
+ * Empty on the last page.
830
+ *
831
+ * @generated from field: string next_page_token = 2;
832
+ */
833
+ nextPageToken: string;
834
+ };
835
+ /**
836
+ * @generated from message toshi.workspace.v1.ListBranchRulesResponse
837
+ */
838
+ export type ListBranchRulesResponseJson = {
839
+ /**
840
+ * @generated from field: repeated toshi.workspace.v1.BranchRule rules = 1;
841
+ */
842
+ rules?: BranchRuleJson[];
843
+ /**
844
+ * Empty on the last page.
845
+ *
846
+ * @generated from field: string next_page_token = 2;
847
+ */
848
+ nextPageToken?: string;
849
+ };
850
+ /**
851
+ * Describes the message toshi.workspace.v1.ListBranchRulesResponse.
852
+ * Use `create(ListBranchRulesResponseSchema)` to create a new message.
853
+ */
854
+ export declare const ListBranchRulesResponseSchema: GenMessage<ListBranchRulesResponse, {
855
+ jsonType: ListBranchRulesResponseJson;
856
+ }>;
857
+ /**
858
+ * @generated from message toshi.workspace.v1.SetBranchRulesRequest
859
+ */
860
+ export type SetBranchRulesRequest = Message<"toshi.workspace.v1.SetBranchRulesRequest"> & {
861
+ /**
862
+ * The project's name.
863
+ *
864
+ * @generated from field: string project = 1;
865
+ */
866
+ project: string;
867
+ /**
868
+ * The project's new branch rules in order, the fallback rule last.
869
+ *
870
+ * @generated from field: repeated toshi.workspace.v1.BranchRule rules = 2;
871
+ */
872
+ rules: BranchRule[];
873
+ };
874
+ /**
875
+ * @generated from message toshi.workspace.v1.SetBranchRulesRequest
876
+ */
877
+ export type SetBranchRulesRequestJson = {
878
+ /**
879
+ * The project's name.
880
+ *
881
+ * @generated from field: string project = 1;
882
+ */
883
+ project?: string;
884
+ /**
885
+ * The project's new branch rules in order, the fallback rule last.
886
+ *
887
+ * @generated from field: repeated toshi.workspace.v1.BranchRule rules = 2;
888
+ */
889
+ rules?: BranchRuleJson[];
890
+ };
891
+ /**
892
+ * Describes the message toshi.workspace.v1.SetBranchRulesRequest.
893
+ * Use `create(SetBranchRulesRequestSchema)` to create a new message.
894
+ */
895
+ export declare const SetBranchRulesRequestSchema: GenMessage<SetBranchRulesRequest, {
896
+ jsonType: SetBranchRulesRequestJson;
897
+ }>;
898
+ /**
899
+ * @generated from message toshi.workspace.v1.SetBranchRulesResponse
900
+ */
901
+ export type SetBranchRulesResponse = Message<"toshi.workspace.v1.SetBranchRulesResponse"> & {
902
+ /**
903
+ * The rules as stored.
904
+ *
905
+ * @generated from field: repeated toshi.workspace.v1.BranchRule rules = 1;
906
+ */
907
+ rules: BranchRule[];
908
+ };
909
+ /**
910
+ * @generated from message toshi.workspace.v1.SetBranchRulesResponse
911
+ */
912
+ export type SetBranchRulesResponseJson = {
913
+ /**
914
+ * The rules as stored.
915
+ *
916
+ * @generated from field: repeated toshi.workspace.v1.BranchRule rules = 1;
917
+ */
918
+ rules?: BranchRuleJson[];
919
+ };
920
+ /**
921
+ * Describes the message toshi.workspace.v1.SetBranchRulesResponse.
922
+ * Use `create(SetBranchRulesResponseSchema)` to create a new message.
923
+ */
924
+ export declare const SetBranchRulesResponseSchema: GenMessage<SetBranchRulesResponse, {
925
+ jsonType: SetBranchRulesResponseJson;
926
+ }>;
927
+ /**
928
+ * EmbedToken is one of a project's embed tokens, without the token itself.
929
+ *
930
+ * @generated from message toshi.workspace.v1.EmbedToken
931
+ */
932
+ export type EmbedToken = Message<"toshi.workspace.v1.EmbedToken"> & {
933
+ /**
934
+ * Assigned by the server.
935
+ *
936
+ * @generated from field: string id = 1;
937
+ */
938
+ id: string;
939
+ /**
940
+ * The project's name.
941
+ *
942
+ * @generated from field: string project = 2;
943
+ */
944
+ project: string;
945
+ /**
946
+ * The origins of the pages that may spend it, such as
947
+ * https://app.example.com.
948
+ *
949
+ * @generated from field: repeated string origins = 3;
950
+ */
951
+ origins: string[];
952
+ /**
953
+ * @generated from field: toshi.workspace.v1.EmbedTokenState state = 4;
954
+ */
955
+ state: EmbedTokenState;
956
+ /**
957
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
958
+ */
959
+ createdAt?: Timestamp | undefined;
960
+ /**
961
+ * @generated from field: google.protobuf.Timestamp expires_at = 6;
962
+ */
963
+ expiresAt?: Timestamp | undefined;
964
+ /**
965
+ * Unset until a page spends it.
966
+ *
967
+ * @generated from field: google.protobuf.Timestamp used_at = 7;
968
+ */
969
+ usedAt?: Timestamp | undefined;
970
+ /**
971
+ * The recording it was spent on; empty until then.
972
+ *
973
+ * @generated from field: string recording_id = 8;
974
+ */
975
+ recordingId: string;
976
+ /**
977
+ * Unset unless it was revoked.
978
+ *
979
+ * @generated from field: google.protobuf.Timestamp revoked_at = 9;
980
+ */
981
+ revokedAt?: Timestamp | undefined;
982
+ /**
983
+ * Who minted it: a person's sign-in or an API token, as in the audit.
984
+ *
985
+ * @generated from field: string created_by = 10;
986
+ */
987
+ createdBy: string;
988
+ };
989
+ /**
990
+ * EmbedToken is one of a project's embed tokens, without the token itself.
991
+ *
992
+ * @generated from message toshi.workspace.v1.EmbedToken
993
+ */
994
+ export type EmbedTokenJson = {
995
+ /**
996
+ * Assigned by the server.
997
+ *
998
+ * @generated from field: string id = 1;
999
+ */
1000
+ id?: string;
1001
+ /**
1002
+ * The project's name.
1003
+ *
1004
+ * @generated from field: string project = 2;
1005
+ */
1006
+ project?: string;
1007
+ /**
1008
+ * The origins of the pages that may spend it, such as
1009
+ * https://app.example.com.
1010
+ *
1011
+ * @generated from field: repeated string origins = 3;
1012
+ */
1013
+ origins?: string[];
1014
+ /**
1015
+ * @generated from field: toshi.workspace.v1.EmbedTokenState state = 4;
1016
+ */
1017
+ state?: EmbedTokenStateJson;
1018
+ /**
1019
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
1020
+ */
1021
+ createdAt?: TimestampJson;
1022
+ /**
1023
+ * @generated from field: google.protobuf.Timestamp expires_at = 6;
1024
+ */
1025
+ expiresAt?: TimestampJson;
1026
+ /**
1027
+ * Unset until a page spends it.
1028
+ *
1029
+ * @generated from field: google.protobuf.Timestamp used_at = 7;
1030
+ */
1031
+ usedAt?: TimestampJson;
1032
+ /**
1033
+ * The recording it was spent on; empty until then.
1034
+ *
1035
+ * @generated from field: string recording_id = 8;
1036
+ */
1037
+ recordingId?: string;
1038
+ /**
1039
+ * Unset unless it was revoked.
1040
+ *
1041
+ * @generated from field: google.protobuf.Timestamp revoked_at = 9;
1042
+ */
1043
+ revokedAt?: TimestampJson;
1044
+ /**
1045
+ * Who minted it: a person's sign-in or an API token, as in the audit.
1046
+ *
1047
+ * @generated from field: string created_by = 10;
1048
+ */
1049
+ createdBy?: string;
1050
+ };
1051
+ /**
1052
+ * Describes the message toshi.workspace.v1.EmbedToken.
1053
+ * Use `create(EmbedTokenSchema)` to create a new message.
1054
+ */
1055
+ export declare const EmbedTokenSchema: GenMessage<EmbedToken, {
1056
+ jsonType: EmbedTokenJson;
1057
+ }>;
1058
+ /**
1059
+ * @generated from message toshi.workspace.v1.CreateEmbedTokenRequest
1060
+ */
1061
+ export type CreateEmbedTokenRequest = Message<"toshi.workspace.v1.CreateEmbedTokenRequest"> & {
1062
+ /**
1063
+ * The project's name.
1064
+ *
1065
+ * @generated from field: string project = 1;
1066
+ */
1067
+ project: string;
1068
+ /**
1069
+ * The origins of the pages that may spend it, each a scheme and a host
1070
+ * with an optional port: https, or http for localhost only. At least
1071
+ * one, and more than the server's maximum is INVALID_ARGUMENT.
1072
+ *
1073
+ * @generated from field: repeated string origins = 2;
1074
+ */
1075
+ origins: string[];
1076
+ /**
1077
+ * How long the token stays valid; unset is the server's default, and
1078
+ * more than its maximum is INVALID_ARGUMENT.
1079
+ *
1080
+ * @generated from field: google.protobuf.Duration expires_in = 3;
1081
+ */
1082
+ expiresIn?: Duration | undefined;
1083
+ };
1084
+ /**
1085
+ * @generated from message toshi.workspace.v1.CreateEmbedTokenRequest
1086
+ */
1087
+ export type CreateEmbedTokenRequestJson = {
1088
+ /**
1089
+ * The project's name.
1090
+ *
1091
+ * @generated from field: string project = 1;
1092
+ */
1093
+ project?: string;
1094
+ /**
1095
+ * The origins of the pages that may spend it, each a scheme and a host
1096
+ * with an optional port: https, or http for localhost only. At least
1097
+ * one, and more than the server's maximum is INVALID_ARGUMENT.
1098
+ *
1099
+ * @generated from field: repeated string origins = 2;
1100
+ */
1101
+ origins?: string[];
1102
+ /**
1103
+ * How long the token stays valid; unset is the server's default, and
1104
+ * more than its maximum is INVALID_ARGUMENT.
1105
+ *
1106
+ * @generated from field: google.protobuf.Duration expires_in = 3;
1107
+ */
1108
+ expiresIn?: DurationJson;
1109
+ };
1110
+ /**
1111
+ * Describes the message toshi.workspace.v1.CreateEmbedTokenRequest.
1112
+ * Use `create(CreateEmbedTokenRequestSchema)` to create a new message.
1113
+ */
1114
+ export declare const CreateEmbedTokenRequestSchema: GenMessage<CreateEmbedTokenRequest, {
1115
+ jsonType: CreateEmbedTokenRequestJson;
1116
+ }>;
1117
+ /**
1118
+ * @generated from message toshi.workspace.v1.CreateEmbedTokenResponse
1119
+ */
1120
+ export type CreateEmbedTokenResponse = Message<"toshi.workspace.v1.CreateEmbedTokenResponse"> & {
1121
+ /**
1122
+ * @generated from field: toshi.workspace.v1.EmbedToken embed_token = 1;
1123
+ */
1124
+ embedToken?: EmbedToken | undefined;
1125
+ /**
1126
+ * The token to hand to the page. It is in this answer only.
1127
+ *
1128
+ * @generated from field: string token = 2;
1129
+ */
1130
+ token: string;
1131
+ };
1132
+ /**
1133
+ * @generated from message toshi.workspace.v1.CreateEmbedTokenResponse
1134
+ */
1135
+ export type CreateEmbedTokenResponseJson = {
1136
+ /**
1137
+ * @generated from field: toshi.workspace.v1.EmbedToken embed_token = 1;
1138
+ */
1139
+ embedToken?: EmbedTokenJson;
1140
+ /**
1141
+ * The token to hand to the page. It is in this answer only.
1142
+ *
1143
+ * @generated from field: string token = 2;
1144
+ */
1145
+ token?: string;
1146
+ };
1147
+ /**
1148
+ * Describes the message toshi.workspace.v1.CreateEmbedTokenResponse.
1149
+ * Use `create(CreateEmbedTokenResponseSchema)` to create a new message.
1150
+ */
1151
+ export declare const CreateEmbedTokenResponseSchema: GenMessage<CreateEmbedTokenResponse, {
1152
+ jsonType: CreateEmbedTokenResponseJson;
1153
+ }>;
1154
+ /**
1155
+ * @generated from message toshi.workspace.v1.ListEmbedTokensRequest
1156
+ */
1157
+ export type ListEmbedTokensRequest = Message<"toshi.workspace.v1.ListEmbedTokensRequest"> & {
1158
+ /**
1159
+ * The project's name.
1160
+ *
1161
+ * @generated from field: string project = 1;
1162
+ */
1163
+ project: string;
1164
+ /**
1165
+ * The most embed tokens in one page; zero lets the server choose.
1166
+ *
1167
+ * @generated from field: int32 page_size = 2;
1168
+ */
1169
+ pageSize: number;
1170
+ /**
1171
+ * From an earlier response's next_page_token; empty for the first page.
1172
+ *
1173
+ * @generated from field: string page_token = 3;
1174
+ */
1175
+ pageToken: string;
1176
+ };
1177
+ /**
1178
+ * @generated from message toshi.workspace.v1.ListEmbedTokensRequest
1179
+ */
1180
+ export type ListEmbedTokensRequestJson = {
1181
+ /**
1182
+ * The project's name.
1183
+ *
1184
+ * @generated from field: string project = 1;
1185
+ */
1186
+ project?: string;
1187
+ /**
1188
+ * The most embed tokens in one page; zero lets the server choose.
1189
+ *
1190
+ * @generated from field: int32 page_size = 2;
1191
+ */
1192
+ pageSize?: number;
1193
+ /**
1194
+ * From an earlier response's next_page_token; empty for the first page.
1195
+ *
1196
+ * @generated from field: string page_token = 3;
1197
+ */
1198
+ pageToken?: string;
1199
+ };
1200
+ /**
1201
+ * Describes the message toshi.workspace.v1.ListEmbedTokensRequest.
1202
+ * Use `create(ListEmbedTokensRequestSchema)` to create a new message.
1203
+ */
1204
+ export declare const ListEmbedTokensRequestSchema: GenMessage<ListEmbedTokensRequest, {
1205
+ jsonType: ListEmbedTokensRequestJson;
1206
+ }>;
1207
+ /**
1208
+ * @generated from message toshi.workspace.v1.ListEmbedTokensResponse
1209
+ */
1210
+ export type ListEmbedTokensResponse = Message<"toshi.workspace.v1.ListEmbedTokensResponse"> & {
1211
+ /**
1212
+ * @generated from field: repeated toshi.workspace.v1.EmbedToken embed_tokens = 1;
1213
+ */
1214
+ embedTokens: EmbedToken[];
1215
+ /**
1216
+ * Empty on the last page.
1217
+ *
1218
+ * @generated from field: string next_page_token = 2;
1219
+ */
1220
+ nextPageToken: string;
1221
+ };
1222
+ /**
1223
+ * @generated from message toshi.workspace.v1.ListEmbedTokensResponse
1224
+ */
1225
+ export type ListEmbedTokensResponseJson = {
1226
+ /**
1227
+ * @generated from field: repeated toshi.workspace.v1.EmbedToken embed_tokens = 1;
1228
+ */
1229
+ embedTokens?: EmbedTokenJson[];
1230
+ /**
1231
+ * Empty on the last page.
1232
+ *
1233
+ * @generated from field: string next_page_token = 2;
1234
+ */
1235
+ nextPageToken?: string;
1236
+ };
1237
+ /**
1238
+ * Describes the message toshi.workspace.v1.ListEmbedTokensResponse.
1239
+ * Use `create(ListEmbedTokensResponseSchema)` to create a new message.
1240
+ */
1241
+ export declare const ListEmbedTokensResponseSchema: GenMessage<ListEmbedTokensResponse, {
1242
+ jsonType: ListEmbedTokensResponseJson;
1243
+ }>;
1244
+ /**
1245
+ * @generated from message toshi.workspace.v1.RevokeEmbedTokenRequest
1246
+ */
1247
+ export type RevokeEmbedTokenRequest = Message<"toshi.workspace.v1.RevokeEmbedTokenRequest"> & {
1248
+ /**
1249
+ * The project's name.
1250
+ *
1251
+ * @generated from field: string project = 1;
1252
+ */
1253
+ project: string;
1254
+ /**
1255
+ * @generated from field: string embed_token_id = 2;
1256
+ */
1257
+ embedTokenId: string;
1258
+ };
1259
+ /**
1260
+ * @generated from message toshi.workspace.v1.RevokeEmbedTokenRequest
1261
+ */
1262
+ export type RevokeEmbedTokenRequestJson = {
1263
+ /**
1264
+ * The project's name.
1265
+ *
1266
+ * @generated from field: string project = 1;
1267
+ */
1268
+ project?: string;
1269
+ /**
1270
+ * @generated from field: string embed_token_id = 2;
1271
+ */
1272
+ embedTokenId?: string;
1273
+ };
1274
+ /**
1275
+ * Describes the message toshi.workspace.v1.RevokeEmbedTokenRequest.
1276
+ * Use `create(RevokeEmbedTokenRequestSchema)` to create a new message.
1277
+ */
1278
+ export declare const RevokeEmbedTokenRequestSchema: GenMessage<RevokeEmbedTokenRequest, {
1279
+ jsonType: RevokeEmbedTokenRequestJson;
1280
+ }>;
1281
+ /**
1282
+ * @generated from message toshi.workspace.v1.RevokeEmbedTokenResponse
1283
+ */
1284
+ export type RevokeEmbedTokenResponse = Message<"toshi.workspace.v1.RevokeEmbedTokenResponse"> & {
1285
+ /**
1286
+ * @generated from field: toshi.workspace.v1.EmbedToken embed_token = 1;
1287
+ */
1288
+ embedToken?: EmbedToken | undefined;
1289
+ };
1290
+ /**
1291
+ * @generated from message toshi.workspace.v1.RevokeEmbedTokenResponse
1292
+ */
1293
+ export type RevokeEmbedTokenResponseJson = {
1294
+ /**
1295
+ * @generated from field: toshi.workspace.v1.EmbedToken embed_token = 1;
1296
+ */
1297
+ embedToken?: EmbedTokenJson;
1298
+ };
1299
+ /**
1300
+ * Describes the message toshi.workspace.v1.RevokeEmbedTokenResponse.
1301
+ * Use `create(RevokeEmbedTokenResponseSchema)` to create a new message.
1302
+ */
1303
+ export declare const RevokeEmbedTokenResponseSchema: GenMessage<RevokeEmbedTokenResponse, {
1304
+ jsonType: RevokeEmbedTokenResponseJson;
1305
+ }>;
1306
+ /**
1307
+ * EmbedTokenState is where an embed token is in its life.
1308
+ *
1309
+ * @generated from enum toshi.workspace.v1.EmbedTokenState
1310
+ */
1311
+ export declare enum EmbedTokenState {
1312
+ /**
1313
+ * @generated from enum value: EMBED_TOKEN_STATE_UNSPECIFIED = 0;
1314
+ */
1315
+ UNSPECIFIED = 0,
1316
+ /**
1317
+ * Not yet spent: a page on one of its origins can spend it.
1318
+ *
1319
+ * @generated from enum value: EMBED_TOKEN_STATE_ACTIVE = 1;
1320
+ */
1321
+ ACTIVE = 1,
1322
+ /**
1323
+ * A page spent it on a recording.
1324
+ *
1325
+ * @generated from enum value: EMBED_TOKEN_STATE_USED = 2;
1326
+ */
1327
+ USED = 2,
1328
+ /**
1329
+ * @generated from enum value: EMBED_TOKEN_STATE_REVOKED = 3;
1330
+ */
1331
+ REVOKED = 3,
1332
+ /**
1333
+ * @generated from enum value: EMBED_TOKEN_STATE_EXPIRED = 4;
1334
+ */
1335
+ EXPIRED = 4
1336
+ }
1337
+ /**
1338
+ * EmbedTokenState is where an embed token is in its life.
1339
+ *
1340
+ * @generated from enum toshi.workspace.v1.EmbedTokenState
1341
+ */
1342
+ export type EmbedTokenStateJson = "EMBED_TOKEN_STATE_UNSPECIFIED" | "EMBED_TOKEN_STATE_ACTIVE" | "EMBED_TOKEN_STATE_USED" | "EMBED_TOKEN_STATE_REVOKED" | "EMBED_TOKEN_STATE_EXPIRED";
1343
+ /**
1344
+ * Describes the enum toshi.workspace.v1.EmbedTokenState.
1345
+ */
1346
+ export declare const EmbedTokenStateSchema: GenEnum<EmbedTokenState, EmbedTokenStateJson>;
1347
+ /**
1348
+ * ProjectService reads a workspace's projects and the repositories they
1349
+ * claim, creates a project, creates or deletes an environment of one, moves a
1350
+ * repository's claim and sets the branch rules that choose a CI job's
1351
+ * environment. A workspace holds projects, and a project holds environments.
1352
+ *
1353
+ * The caller's credential names the workspace, as for WorkloadService.
1354
+ * Nothing of another workspace is visible.
1355
+ *
1356
+ * @generated from service toshi.workspace.v1.ProjectService
1357
+ */
1358
+ export declare const ProjectService: GenService<{
1359
+ /**
1360
+ * ListProjects returns the workspace's projects by name, each with its
1361
+ * environments by name.
1362
+ *
1363
+ * A page holds 100 projects when page_size is zero, and 1000 at most.
1364
+ *
1365
+ * @generated from rpc toshi.workspace.v1.ProjectService.ListProjects
1366
+ */
1367
+ listProjects: {
1368
+ methodKind: "unary";
1369
+ input: typeof ListProjectsRequestSchema;
1370
+ output: typeof ListProjectsResponseSchema;
1371
+ };
1372
+ /**
1373
+ * GetProject returns one project with its environments by name. A
1374
+ * project the workspace does not have is NOT_FOUND. A token limited to
1375
+ * a project gets only that project, and PERMISSION_DENIED for any other
1376
+ * name; a token limited to an environment gets the project with that
1377
+ * environment only.
1378
+ *
1379
+ * @generated from rpc toshi.workspace.v1.ProjectService.GetProject
1380
+ */
1381
+ getProject: {
1382
+ methodKind: "unary";
1383
+ input: typeof GetProjectRequestSchema;
1384
+ output: typeof GetProjectResponseSchema;
1385
+ };
1386
+ /**
1387
+ * ListRepositories returns the repositories the workspace's projects
1388
+ * claim, by repository. A project the workspace does not have is
1389
+ * NOT_FOUND.
1390
+ *
1391
+ * A page holds 100 repositories when page_size is zero, and 1000 at most.
1392
+ *
1393
+ * @generated from rpc toshi.workspace.v1.ProjectService.ListRepositories
1394
+ */
1395
+ listRepositories: {
1396
+ methodKind: "unary";
1397
+ input: typeof ListRepositoriesRequestSchema;
1398
+ output: typeof ListRepositoriesResponseSchema;
1399
+ };
1400
+ /**
1401
+ * CreateProject makes a project with its three environments,
1402
+ * development, preview and production. A name the workspace's projects
1403
+ * already have is ALREADY_EXISTS. A token limited to a project is
1404
+ * PERMISSION_DENIED: the new project is not its own.
1405
+ *
1406
+ * @generated from rpc toshi.workspace.v1.ProjectService.CreateProject
1407
+ */
1408
+ createProject: {
1409
+ methodKind: "unary";
1410
+ input: typeof CreateProjectRequestSchema;
1411
+ output: typeof CreateProjectResponseSchema;
1412
+ };
1413
+ /**
1414
+ * ClaimRepository puts a repository in a project: it claims a repository
1415
+ * no project claims, or moves the claim from another project. A CI job
1416
+ * whose repository's claim was read before the move keeps its project,
1417
+ * and its credentials are refused; a job whose claim is read after it
1418
+ * lands in the new project. A project the workspace does not have is NOT_FOUND. A token
1419
+ * limited to a project claims only for that project, and only a
1420
+ * repository no other project claims.
1421
+ *
1422
+ * @generated from rpc toshi.workspace.v1.ProjectService.ClaimRepository
1423
+ */
1424
+ claimRepository: {
1425
+ methodKind: "unary";
1426
+ input: typeof ClaimRepositoryRequestSchema;
1427
+ output: typeof ClaimRepositoryResponseSchema;
1428
+ };
1429
+ /**
1430
+ * CreateEnvironment adds the environment of a kind a project lacks,
1431
+ * named after its kind, such as preview for a project made with
1432
+ * production only. A kind the project has is ALREADY_EXISTS; a project
1433
+ * the workspace does not have is NOT_FOUND. A token limited to a project
1434
+ * creates only in that project, and a token limited to an environment
1435
+ * is PERMISSION_DENIED.
1436
+ *
1437
+ * @generated from rpc toshi.workspace.v1.ProjectService.CreateEnvironment
1438
+ */
1439
+ createEnvironment: {
1440
+ methodKind: "unary";
1441
+ input: typeof CreateEnvironmentRequestSchema;
1442
+ output: typeof CreateEnvironmentResponseSchema;
1443
+ };
1444
+ /**
1445
+ * DeleteEnvironment deletes a project's environment by name. A project's
1446
+ * production environment is FAILED_PRECONDITION, and so is an
1447
+ * environment that anything live still refers to, with each kind and
1448
+ * its count in the message: secret sets, API tokens that are neither
1449
+ * revoked nor expired, unfinished jobs, workloads that are not deleted
1450
+ * and artifacts still being uploaded. Finished jobs and complete
1451
+ * artifacts keep the environment as history. A project or environment
1452
+ * the workspace does not have is NOT_FOUND. A token limited to a
1453
+ * project deletes only in that project, and a token limited to an
1454
+ * environment is PERMISSION_DENIED.
1455
+ *
1456
+ * @generated from rpc toshi.workspace.v1.ProjectService.DeleteEnvironment
1457
+ */
1458
+ deleteEnvironment: {
1459
+ methodKind: "unary";
1460
+ input: typeof DeleteEnvironmentRequestSchema;
1461
+ output: typeof DeleteEnvironmentResponseSchema;
1462
+ };
1463
+ /**
1464
+ * ListBranchRules returns a project's branch rules in order, the
1465
+ * fallback rule last: the first that matches a CI job's run chooses the
1466
+ * job's environment. The fallback rule takes every other run and never
1467
+ * chooses an environment of kind production. A project the workspace does
1468
+ * not have is NOT_FOUND. A token limited to a project reads only that
1469
+ * project's rules, and a token limited to an environment is
1470
+ * PERMISSION_DENIED.
1471
+ *
1472
+ * A page holds 100 rules when page_size is zero, and 1000 at most.
1473
+ *
1474
+ * @generated from rpc toshi.workspace.v1.ProjectService.ListBranchRules
1475
+ */
1476
+ listBranchRules: {
1477
+ methodKind: "unary";
1478
+ input: typeof ListBranchRulesRequestSchema;
1479
+ output: typeof ListBranchRulesResponseSchema;
1480
+ };
1481
+ /**
1482
+ * SetBranchRules replaces a project's branch rules with the list given,
1483
+ * whole: it has at most 100 rules, a known match on each, a pattern on
1484
+ * exactly the pattern rules, no two rules matching the same way, the
1485
+ * fallback rule exactly once and last, each environment one of the
1486
+ * project's or none, and the fallback rule's environment not a
1487
+ * production one. Any other list is INVALID_ARGUMENT and changes
1488
+ * nothing. A job already assigned keeps the environment it got; the new
1489
+ * rules choose from its next assignment. A project the workspace does
1490
+ * not have is NOT_FOUND. A token limited to a project sets only that
1491
+ * project's rules, and a token limited to an environment is
1492
+ * PERMISSION_DENIED.
1493
+ *
1494
+ * @generated from rpc toshi.workspace.v1.ProjectService.SetBranchRules
1495
+ */
1496
+ setBranchRules: {
1497
+ methodKind: "unary";
1498
+ input: typeof SetBranchRulesRequestSchema;
1499
+ output: typeof SetBranchRulesResponseSchema;
1500
+ };
1501
+ /**
1502
+ * CreateEmbedToken mints an embed token for a project: a credential for
1503
+ * a web page on one of the token's origins, which spends it once to
1504
+ * fetch one of the project's ready recordings. It expires in minutes. A
1505
+ * project the workspace does not have is NOT_FOUND. A token limited to a
1506
+ * project mints only for that project, and a token limited to an
1507
+ * environment is PERMISSION_DENIED.
1508
+ *
1509
+ * @generated from rpc toshi.workspace.v1.ProjectService.CreateEmbedToken
1510
+ */
1511
+ createEmbedToken: {
1512
+ methodKind: "unary";
1513
+ input: typeof CreateEmbedTokenRequestSchema;
1514
+ output: typeof CreateEmbedTokenResponseSchema;
1515
+ };
1516
+ /**
1517
+ * ListEmbedTokens returns a project's embed tokens, oldest first, without
1518
+ * the tokens themselves.
1519
+ *
1520
+ * A page holds 100 embed tokens when page_size is zero, and 1000 at most.
1521
+ *
1522
+ * @generated from rpc toshi.workspace.v1.ProjectService.ListEmbedTokens
1523
+ */
1524
+ listEmbedTokens: {
1525
+ methodKind: "unary";
1526
+ input: typeof ListEmbedTokensRequestSchema;
1527
+ output: typeof ListEmbedTokensResponseSchema;
1528
+ };
1529
+ /**
1530
+ * RevokeEmbedToken refuses an embed token before it expires. A token
1531
+ * already revoked is returned as it is.
1532
+ *
1533
+ * @generated from rpc toshi.workspace.v1.ProjectService.RevokeEmbedToken
1534
+ */
1535
+ revokeEmbedToken: {
1536
+ methodKind: "unary";
1537
+ input: typeof RevokeEmbedTokenRequestSchema;
1538
+ output: typeof RevokeEmbedTokenResponseSchema;
1539
+ };
1540
+ }>;