@toshicloud/sdk 0.0.0-stage → 0.2.0

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