@toshicloud/sdk 0.6.0 → 0.7.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 (44) hide show
  1. package/README.md +39 -510
  2. package/dist/client.d.ts +6 -4
  3. package/dist/client.js +4 -2
  4. package/dist/gen/toshi/permission_pb.d.ts +12 -0
  5. package/dist/gen/toshi/permission_pb.js +14 -2
  6. package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +213 -19
  7. package/dist/gen/toshi/workspace/v1/connections_pb.js +97 -25
  8. package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +26 -26
  9. package/dist/gen/toshi/workspace/v1/domains_pb.js +4 -4
  10. package/dist/gen/toshi/workspace/v1/{channels_pb.d.ts → endpoints_pb.d.ts} +945 -822
  11. package/dist/gen/toshi/workspace/v1/endpoints_pb.js +488 -0
  12. package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +10 -10
  13. package/dist/gen/toshi/workspace/v1/grants_pb.js +3 -3
  14. package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +46 -22
  15. package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +1 -1
  16. package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +110 -36
  17. package/dist/gen/toshi/workspace/v1/hosts_pb.js +1 -1
  18. package/dist/gen/toshi/workspace/v1/model_credentials_pb.d.ts +654 -0
  19. package/dist/gen/toshi/workspace/v1/model_credentials_pb.js +110 -0
  20. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +21 -2
  21. package/dist/gen/toshi/workspace/v1/recordings_pb.js +1 -1
  22. package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1 -1
  23. package/dist/gen/toshi/workspace/v1/roles_pb.js +1 -1
  24. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +19 -2
  25. package/dist/gen/toshi/workspace/v1/secrets_pb.js +1 -1
  26. package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +28 -28
  27. package/dist/gen/toshi/workspace/v1/triggers_pb.js +6 -6
  28. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +202 -202
  29. package/dist/gen/toshi/workspace/v1/webhook_pb.js +46 -46
  30. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +552 -29
  31. package/dist/gen/toshi/workspace/v1/workloads_pb.js +85 -55
  32. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +639 -119
  33. package/dist/gen/toshi/workspace/v1/workspace_pb.js +174 -88
  34. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +101 -4
  35. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +20 -15
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.js +2 -1
  38. package/dist/retry.js +33 -22
  39. package/dist/test/alarms.js +1 -1
  40. package/dist/test/procedures.js +35 -25
  41. package/dist/version.d.ts +1 -1
  42. package/dist/version.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/gen/toshi/workspace/v1/channels_pb.js +0 -483
@@ -0,0 +1,654 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { FieldMask, FieldMaskJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file toshi/workspace/v1/model_credentials.proto.
6
+ */
7
+ export declare const file_toshi_workspace_v1_model_credentials: GenFile;
8
+ /**
9
+ * ModelCredential is a credential as anyone may see it: never its value.
10
+ *
11
+ * @generated from message toshi.workspace.v1.ModelCredential
12
+ */
13
+ export type ModelCredential = Message<"toshi.workspace.v1.ModelCredential"> & {
14
+ /**
15
+ * "mcr-" and 26 characters, given by the control plane.
16
+ *
17
+ * @generated from field: string id = 1;
18
+ */
19
+ id: string;
20
+ /**
21
+ * 1 to 64 characters: lowercase letters, digits and "-", starting with
22
+ * a letter. Unique among the workspace's credentials, and among each
23
+ * person's own.
24
+ *
25
+ * @generated from field: string name = 2;
26
+ */
27
+ name: string;
28
+ /**
29
+ * The model provider: "anthropic" or "openai".
30
+ *
31
+ * @generated from field: string provider = 3;
32
+ */
33
+ provider: string;
34
+ /**
35
+ * @generated from field: toshi.workspace.v1.ModelCredentialKind kind = 4;
36
+ */
37
+ kind: ModelCredentialKind;
38
+ /**
39
+ * The user id of the person whose own credential it is; empty for the
40
+ * workspace's.
41
+ *
42
+ * @generated from field: string owner = 5;
43
+ */
44
+ owner: string;
45
+ /**
46
+ * The credential is the caller's own.
47
+ *
48
+ * @generated from field: bool mine = 6;
49
+ */
50
+ mine: boolean;
51
+ /**
52
+ * The credential's owner holds no role in the workspace any more: no
53
+ * workload receives it, and it stays until it is deleted.
54
+ *
55
+ * @generated from field: bool owner_left = 7;
56
+ */
57
+ ownerLeft: boolean;
58
+ /**
59
+ * The key's place: its project and either its environment or shared.
60
+ *
61
+ * @generated from field: string project = 8;
62
+ */
63
+ project: string;
64
+ /**
65
+ * Empty for the shared set.
66
+ *
67
+ * @generated from field: string environment = 9;
68
+ */
69
+ environment: string;
70
+ /**
71
+ * @generated from field: bool shared = 10;
72
+ */
73
+ shared: boolean;
74
+ /**
75
+ * The key's name in that place.
76
+ *
77
+ * @generated from field: string secret = 11;
78
+ */
79
+ secret: string;
80
+ /**
81
+ * @generated from field: google.protobuf.Timestamp created_at = 12;
82
+ */
83
+ createdAt?: Timestamp | undefined;
84
+ /**
85
+ * The user id of the person who added it.
86
+ *
87
+ * @generated from field: string created_by = 13;
88
+ */
89
+ createdBy: string;
90
+ };
91
+ /**
92
+ * ModelCredential is a credential as anyone may see it: never its value.
93
+ *
94
+ * @generated from message toshi.workspace.v1.ModelCredential
95
+ */
96
+ export type ModelCredentialJson = {
97
+ /**
98
+ * "mcr-" and 26 characters, given by the control plane.
99
+ *
100
+ * @generated from field: string id = 1;
101
+ */
102
+ id?: string;
103
+ /**
104
+ * 1 to 64 characters: lowercase letters, digits and "-", starting with
105
+ * a letter. Unique among the workspace's credentials, and among each
106
+ * person's own.
107
+ *
108
+ * @generated from field: string name = 2;
109
+ */
110
+ name?: string;
111
+ /**
112
+ * The model provider: "anthropic" or "openai".
113
+ *
114
+ * @generated from field: string provider = 3;
115
+ */
116
+ provider?: string;
117
+ /**
118
+ * @generated from field: toshi.workspace.v1.ModelCredentialKind kind = 4;
119
+ */
120
+ kind?: ModelCredentialKindJson;
121
+ /**
122
+ * The user id of the person whose own credential it is; empty for the
123
+ * workspace's.
124
+ *
125
+ * @generated from field: string owner = 5;
126
+ */
127
+ owner?: string;
128
+ /**
129
+ * The credential is the caller's own.
130
+ *
131
+ * @generated from field: bool mine = 6;
132
+ */
133
+ mine?: boolean;
134
+ /**
135
+ * The credential's owner holds no role in the workspace any more: no
136
+ * workload receives it, and it stays until it is deleted.
137
+ *
138
+ * @generated from field: bool owner_left = 7;
139
+ */
140
+ ownerLeft?: boolean;
141
+ /**
142
+ * The key's place: its project and either its environment or shared.
143
+ *
144
+ * @generated from field: string project = 8;
145
+ */
146
+ project?: string;
147
+ /**
148
+ * Empty for the shared set.
149
+ *
150
+ * @generated from field: string environment = 9;
151
+ */
152
+ environment?: string;
153
+ /**
154
+ * @generated from field: bool shared = 10;
155
+ */
156
+ shared?: boolean;
157
+ /**
158
+ * The key's name in that place.
159
+ *
160
+ * @generated from field: string secret = 11;
161
+ */
162
+ secret?: string;
163
+ /**
164
+ * @generated from field: google.protobuf.Timestamp created_at = 12;
165
+ */
166
+ createdAt?: TimestampJson;
167
+ /**
168
+ * The user id of the person who added it.
169
+ *
170
+ * @generated from field: string created_by = 13;
171
+ */
172
+ createdBy?: string;
173
+ };
174
+ /**
175
+ * Describes the message toshi.workspace.v1.ModelCredential.
176
+ * Use `create(ModelCredentialSchema)` to create a new message.
177
+ */
178
+ export declare const ModelCredentialSchema: GenMessage<ModelCredential, {
179
+ jsonType: ModelCredentialJson;
180
+ }>;
181
+ /**
182
+ * @generated from message toshi.workspace.v1.CreateModelCredentialRequest
183
+ */
184
+ export type CreateModelCredentialRequest = Message<"toshi.workspace.v1.CreateModelCredentialRequest"> & {
185
+ /**
186
+ * @generated from field: string name = 1;
187
+ */
188
+ name: string;
189
+ /**
190
+ * @generated from field: string provider = 2;
191
+ */
192
+ provider: string;
193
+ /**
194
+ * The key's place: the project and either environment or shared. A
195
+ * request that names both, or neither, is INVALID_ARGUMENT.
196
+ *
197
+ * @generated from field: string project = 3;
198
+ */
199
+ project: string;
200
+ /**
201
+ * @generated from field: string environment = 4;
202
+ */
203
+ environment: string;
204
+ /**
205
+ * @generated from field: bool shared = 5;
206
+ */
207
+ shared: boolean;
208
+ /**
209
+ * The key's name, as PutSecret takes it.
210
+ *
211
+ * @generated from field: string secret = 6;
212
+ */
213
+ secret: string;
214
+ /**
215
+ * When set, the key's next version; never returned.
216
+ *
217
+ * @generated from field: bytes value = 7;
218
+ */
219
+ value: Uint8Array;
220
+ /**
221
+ * The credential is the caller's own; a call that acts for no person
222
+ * fails with FAILED_PRECONDITION.
223
+ *
224
+ * @generated from field: bool own = 8;
225
+ */
226
+ own: boolean;
227
+ };
228
+ /**
229
+ * @generated from message toshi.workspace.v1.CreateModelCredentialRequest
230
+ */
231
+ export type CreateModelCredentialRequestJson = {
232
+ /**
233
+ * @generated from field: string name = 1;
234
+ */
235
+ name?: string;
236
+ /**
237
+ * @generated from field: string provider = 2;
238
+ */
239
+ provider?: string;
240
+ /**
241
+ * The key's place: the project and either environment or shared. A
242
+ * request that names both, or neither, is INVALID_ARGUMENT.
243
+ *
244
+ * @generated from field: string project = 3;
245
+ */
246
+ project?: string;
247
+ /**
248
+ * @generated from field: string environment = 4;
249
+ */
250
+ environment?: string;
251
+ /**
252
+ * @generated from field: bool shared = 5;
253
+ */
254
+ shared?: boolean;
255
+ /**
256
+ * The key's name, as PutSecret takes it.
257
+ *
258
+ * @generated from field: string secret = 6;
259
+ */
260
+ secret?: string;
261
+ /**
262
+ * When set, the key's next version; never returned.
263
+ *
264
+ * @generated from field: bytes value = 7;
265
+ */
266
+ value?: string;
267
+ /**
268
+ * The credential is the caller's own; a call that acts for no person
269
+ * fails with FAILED_PRECONDITION.
270
+ *
271
+ * @generated from field: bool own = 8;
272
+ */
273
+ own?: boolean;
274
+ };
275
+ /**
276
+ * Describes the message toshi.workspace.v1.CreateModelCredentialRequest.
277
+ * Use `create(CreateModelCredentialRequestSchema)` to create a new message.
278
+ */
279
+ export declare const CreateModelCredentialRequestSchema: GenMessage<CreateModelCredentialRequest, {
280
+ jsonType: CreateModelCredentialRequestJson;
281
+ }>;
282
+ /**
283
+ * @generated from message toshi.workspace.v1.CreateModelCredentialResponse
284
+ */
285
+ export type CreateModelCredentialResponse = Message<"toshi.workspace.v1.CreateModelCredentialResponse"> & {
286
+ /**
287
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
288
+ */
289
+ modelCredential?: ModelCredential | undefined;
290
+ };
291
+ /**
292
+ * @generated from message toshi.workspace.v1.CreateModelCredentialResponse
293
+ */
294
+ export type CreateModelCredentialResponseJson = {
295
+ /**
296
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
297
+ */
298
+ modelCredential?: ModelCredentialJson;
299
+ };
300
+ /**
301
+ * Describes the message toshi.workspace.v1.CreateModelCredentialResponse.
302
+ * Use `create(CreateModelCredentialResponseSchema)` to create a new message.
303
+ */
304
+ export declare const CreateModelCredentialResponseSchema: GenMessage<CreateModelCredentialResponse, {
305
+ jsonType: CreateModelCredentialResponseJson;
306
+ }>;
307
+ /**
308
+ * @generated from message toshi.workspace.v1.GetModelCredentialRequest
309
+ */
310
+ export type GetModelCredentialRequest = Message<"toshi.workspace.v1.GetModelCredentialRequest"> & {
311
+ /**
312
+ * @generated from field: string id = 1;
313
+ */
314
+ id: string;
315
+ };
316
+ /**
317
+ * @generated from message toshi.workspace.v1.GetModelCredentialRequest
318
+ */
319
+ export type GetModelCredentialRequestJson = {
320
+ /**
321
+ * @generated from field: string id = 1;
322
+ */
323
+ id?: string;
324
+ };
325
+ /**
326
+ * Describes the message toshi.workspace.v1.GetModelCredentialRequest.
327
+ * Use `create(GetModelCredentialRequestSchema)` to create a new message.
328
+ */
329
+ export declare const GetModelCredentialRequestSchema: GenMessage<GetModelCredentialRequest, {
330
+ jsonType: GetModelCredentialRequestJson;
331
+ }>;
332
+ /**
333
+ * @generated from message toshi.workspace.v1.GetModelCredentialResponse
334
+ */
335
+ export type GetModelCredentialResponse = Message<"toshi.workspace.v1.GetModelCredentialResponse"> & {
336
+ /**
337
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
338
+ */
339
+ modelCredential?: ModelCredential | undefined;
340
+ };
341
+ /**
342
+ * @generated from message toshi.workspace.v1.GetModelCredentialResponse
343
+ */
344
+ export type GetModelCredentialResponseJson = {
345
+ /**
346
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
347
+ */
348
+ modelCredential?: ModelCredentialJson;
349
+ };
350
+ /**
351
+ * Describes the message toshi.workspace.v1.GetModelCredentialResponse.
352
+ * Use `create(GetModelCredentialResponseSchema)` to create a new message.
353
+ */
354
+ export declare const GetModelCredentialResponseSchema: GenMessage<GetModelCredentialResponse, {
355
+ jsonType: GetModelCredentialResponseJson;
356
+ }>;
357
+ /**
358
+ * @generated from message toshi.workspace.v1.ListModelCredentialsRequest
359
+ */
360
+ export type ListModelCredentialsRequest = Message<"toshi.workspace.v1.ListModelCredentialsRequest"> & {
361
+ /**
362
+ * Only this provider's credentials when set.
363
+ *
364
+ * @generated from field: string provider = 1;
365
+ */
366
+ provider: string;
367
+ /**
368
+ * @generated from field: int32 page_size = 2;
369
+ */
370
+ pageSize: number;
371
+ /**
372
+ * @generated from field: string page_token = 3;
373
+ */
374
+ pageToken: string;
375
+ };
376
+ /**
377
+ * @generated from message toshi.workspace.v1.ListModelCredentialsRequest
378
+ */
379
+ export type ListModelCredentialsRequestJson = {
380
+ /**
381
+ * Only this provider's credentials when set.
382
+ *
383
+ * @generated from field: string provider = 1;
384
+ */
385
+ provider?: string;
386
+ /**
387
+ * @generated from field: int32 page_size = 2;
388
+ */
389
+ pageSize?: number;
390
+ /**
391
+ * @generated from field: string page_token = 3;
392
+ */
393
+ pageToken?: string;
394
+ };
395
+ /**
396
+ * Describes the message toshi.workspace.v1.ListModelCredentialsRequest.
397
+ * Use `create(ListModelCredentialsRequestSchema)` to create a new message.
398
+ */
399
+ export declare const ListModelCredentialsRequestSchema: GenMessage<ListModelCredentialsRequest, {
400
+ jsonType: ListModelCredentialsRequestJson;
401
+ }>;
402
+ /**
403
+ * @generated from message toshi.workspace.v1.ListModelCredentialsResponse
404
+ */
405
+ export type ListModelCredentialsResponse = Message<"toshi.workspace.v1.ListModelCredentialsResponse"> & {
406
+ /**
407
+ * @generated from field: repeated toshi.workspace.v1.ModelCredential model_credentials = 1;
408
+ */
409
+ modelCredentials: ModelCredential[];
410
+ /**
411
+ * @generated from field: string next_page_token = 2;
412
+ */
413
+ nextPageToken: string;
414
+ };
415
+ /**
416
+ * @generated from message toshi.workspace.v1.ListModelCredentialsResponse
417
+ */
418
+ export type ListModelCredentialsResponseJson = {
419
+ /**
420
+ * @generated from field: repeated toshi.workspace.v1.ModelCredential model_credentials = 1;
421
+ */
422
+ modelCredentials?: ModelCredentialJson[];
423
+ /**
424
+ * @generated from field: string next_page_token = 2;
425
+ */
426
+ nextPageToken?: string;
427
+ };
428
+ /**
429
+ * Describes the message toshi.workspace.v1.ListModelCredentialsResponse.
430
+ * Use `create(ListModelCredentialsResponseSchema)` to create a new message.
431
+ */
432
+ export declare const ListModelCredentialsResponseSchema: GenMessage<ListModelCredentialsResponse, {
433
+ jsonType: ListModelCredentialsResponseJson;
434
+ }>;
435
+ /**
436
+ * @generated from message toshi.workspace.v1.UpdateModelCredentialRequest
437
+ */
438
+ export type UpdateModelCredentialRequest = Message<"toshi.workspace.v1.UpdateModelCredentialRequest"> & {
439
+ /**
440
+ * id names the credential; the fields update_mask names carry the new
441
+ * values.
442
+ *
443
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
444
+ */
445
+ modelCredential?: ModelCredential | undefined;
446
+ /**
447
+ * @generated from field: google.protobuf.FieldMask update_mask = 2;
448
+ */
449
+ updateMask?: FieldMask | undefined;
450
+ };
451
+ /**
452
+ * @generated from message toshi.workspace.v1.UpdateModelCredentialRequest
453
+ */
454
+ export type UpdateModelCredentialRequestJson = {
455
+ /**
456
+ * id names the credential; the fields update_mask names carry the new
457
+ * values.
458
+ *
459
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
460
+ */
461
+ modelCredential?: ModelCredentialJson;
462
+ /**
463
+ * @generated from field: google.protobuf.FieldMask update_mask = 2;
464
+ */
465
+ updateMask?: FieldMaskJson;
466
+ };
467
+ /**
468
+ * Describes the message toshi.workspace.v1.UpdateModelCredentialRequest.
469
+ * Use `create(UpdateModelCredentialRequestSchema)` to create a new message.
470
+ */
471
+ export declare const UpdateModelCredentialRequestSchema: GenMessage<UpdateModelCredentialRequest, {
472
+ jsonType: UpdateModelCredentialRequestJson;
473
+ }>;
474
+ /**
475
+ * @generated from message toshi.workspace.v1.UpdateModelCredentialResponse
476
+ */
477
+ export type UpdateModelCredentialResponse = Message<"toshi.workspace.v1.UpdateModelCredentialResponse"> & {
478
+ /**
479
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
480
+ */
481
+ modelCredential?: ModelCredential | undefined;
482
+ };
483
+ /**
484
+ * @generated from message toshi.workspace.v1.UpdateModelCredentialResponse
485
+ */
486
+ export type UpdateModelCredentialResponseJson = {
487
+ /**
488
+ * @generated from field: toshi.workspace.v1.ModelCredential model_credential = 1;
489
+ */
490
+ modelCredential?: ModelCredentialJson;
491
+ };
492
+ /**
493
+ * Describes the message toshi.workspace.v1.UpdateModelCredentialResponse.
494
+ * Use `create(UpdateModelCredentialResponseSchema)` to create a new message.
495
+ */
496
+ export declare const UpdateModelCredentialResponseSchema: GenMessage<UpdateModelCredentialResponse, {
497
+ jsonType: UpdateModelCredentialResponseJson;
498
+ }>;
499
+ /**
500
+ * @generated from message toshi.workspace.v1.DeleteModelCredentialRequest
501
+ */
502
+ export type DeleteModelCredentialRequest = Message<"toshi.workspace.v1.DeleteModelCredentialRequest"> & {
503
+ /**
504
+ * @generated from field: string id = 1;
505
+ */
506
+ id: string;
507
+ };
508
+ /**
509
+ * @generated from message toshi.workspace.v1.DeleteModelCredentialRequest
510
+ */
511
+ export type DeleteModelCredentialRequestJson = {
512
+ /**
513
+ * @generated from field: string id = 1;
514
+ */
515
+ id?: string;
516
+ };
517
+ /**
518
+ * Describes the message toshi.workspace.v1.DeleteModelCredentialRequest.
519
+ * Use `create(DeleteModelCredentialRequestSchema)` to create a new message.
520
+ */
521
+ export declare const DeleteModelCredentialRequestSchema: GenMessage<DeleteModelCredentialRequest, {
522
+ jsonType: DeleteModelCredentialRequestJson;
523
+ }>;
524
+ /**
525
+ * @generated from message toshi.workspace.v1.DeleteModelCredentialResponse
526
+ */
527
+ export type DeleteModelCredentialResponse = Message<"toshi.workspace.v1.DeleteModelCredentialResponse"> & {};
528
+ /**
529
+ * @generated from message toshi.workspace.v1.DeleteModelCredentialResponse
530
+ */
531
+ export type DeleteModelCredentialResponseJson = {};
532
+ /**
533
+ * Describes the message toshi.workspace.v1.DeleteModelCredentialResponse.
534
+ * Use `create(DeleteModelCredentialResponseSchema)` to create a new message.
535
+ */
536
+ export declare const DeleteModelCredentialResponseSchema: GenMessage<DeleteModelCredentialResponse, {
537
+ jsonType: DeleteModelCredentialResponseJson;
538
+ }>;
539
+ /**
540
+ * ModelCredentialKind is what a model credential holds.
541
+ *
542
+ * @generated from enum toshi.workspace.v1.ModelCredentialKind
543
+ */
544
+ export declare enum ModelCredentialKind {
545
+ /**
546
+ * @generated from enum value: MODEL_CREDENTIAL_KIND_UNSPECIFIED = 0;
547
+ */
548
+ UNSPECIFIED = 0,
549
+ /**
550
+ * A provider's API key, kept as a key of a project's secrets.
551
+ *
552
+ * @generated from enum value: MODEL_CREDENTIAL_KIND_KEY = 1;
553
+ */
554
+ KEY = 1
555
+ }
556
+ /**
557
+ * ModelCredentialKind is what a model credential holds.
558
+ *
559
+ * @generated from enum toshi.workspace.v1.ModelCredentialKind
560
+ */
561
+ export type ModelCredentialKindJson = "MODEL_CREDENTIAL_KIND_UNSPECIFIED" | "MODEL_CREDENTIAL_KIND_KEY";
562
+ /**
563
+ * Describes the enum toshi.workspace.v1.ModelCredentialKind.
564
+ */
565
+ export declare const ModelCredentialKindSchema: GenEnum<ModelCredentialKind, ModelCredentialKindJson>;
566
+ /**
567
+ * ModelCredentialService keeps the workspace's model credentials: the keys
568
+ * its workloads use to reach a model provider. A key credential is a key
569
+ * of a project's secrets, an environment's or the shared set's, marked
570
+ * with its provider. A marked key never enters a guest: no workload
571
+ * receives it in its environment, and no call returns its value.
572
+ *
573
+ * A credential is the workspace's or one person's own. The workspace's
574
+ * serve every workload its key's place reaches; a person's own serve only
575
+ * the workloads that person starts, while the person holds a role in the
576
+ * workspace, as a person's own secret does. A key credential is the
577
+ * workspace's unless the request asks for the caller's own.
578
+ *
579
+ * A member makes these calls for their own credentials with membership
580
+ * alone. A workspace credential needs model_credentials.read to be seen
581
+ * and model_credentials.write to be created, changed or deleted; without
582
+ * the permission, a call on a workspace credential fails with
583
+ * PERMISSION_DENIED and the reason PERMISSION_MISSING. No caller sees
584
+ * another person's own credential: it is NOT_FOUND.
585
+ *
586
+ * @generated from service toshi.workspace.v1.ModelCredentialService
587
+ */
588
+ export declare const ModelCredentialService: GenService<{
589
+ /**
590
+ * CreateModelCredential adds a key credential for one provider. The
591
+ * request names the key's place, its project and either its environment
592
+ * or shared, and the key's name. With value, the call writes the value
593
+ * as the key's next version first, as PutSecret does; without it, the
594
+ * key must exist. A key that already serves a credential fails with
595
+ * ALREADY_EXISTS, and so does a second credential of the same name and
596
+ * owner.
597
+ *
598
+ * @generated from rpc toshi.workspace.v1.ModelCredentialService.CreateModelCredential
599
+ */
600
+ createModelCredential: {
601
+ methodKind: "unary";
602
+ input: typeof CreateModelCredentialRequestSchema;
603
+ output: typeof CreateModelCredentialResponseSchema;
604
+ };
605
+ /**
606
+ * GetModelCredential returns one credential, never its value.
607
+ *
608
+ * @generated from rpc toshi.workspace.v1.ModelCredentialService.GetModelCredential
609
+ */
610
+ getModelCredential: {
611
+ methodKind: "unary";
612
+ input: typeof GetModelCredentialRequestSchema;
613
+ output: typeof GetModelCredentialResponseSchema;
614
+ };
615
+ /**
616
+ * ListModelCredentials returns the caller's own credentials and, with
617
+ * model_credentials.read, the workspace's, by name.
618
+ *
619
+ * A page holds 100 credentials when page_size is zero, and 1000 at most.
620
+ *
621
+ * @generated from rpc toshi.workspace.v1.ModelCredentialService.ListModelCredentials
622
+ */
623
+ listModelCredentials: {
624
+ methodKind: "unary";
625
+ input: typeof ListModelCredentialsRequestSchema;
626
+ output: typeof ListModelCredentialsResponseSchema;
627
+ };
628
+ /**
629
+ * UpdateModelCredential sets the fields update_mask names: name, owner,
630
+ * or both. owner is the caller's user id, to make the credential the
631
+ * caller's own, or empty, to make it the workspace's; any other person
632
+ * is INVALID_ARGUMENT. Changing the owner moves the key to the matching
633
+ * keys of the same place, in one write. "*" and a path of any other
634
+ * field are INVALID_ARGUMENT.
635
+ *
636
+ * @generated from rpc toshi.workspace.v1.ModelCredentialService.UpdateModelCredential
637
+ */
638
+ updateModelCredential: {
639
+ methodKind: "unary";
640
+ input: typeof UpdateModelCredentialRequestSchema;
641
+ output: typeof UpdateModelCredentialResponseSchema;
642
+ };
643
+ /**
644
+ * DeleteModelCredential signs the credential out: it removes the
645
+ * credential and its key, with every version, in one write.
646
+ *
647
+ * @generated from rpc toshi.workspace.v1.ModelCredentialService.DeleteModelCredential
648
+ */
649
+ deleteModelCredential: {
650
+ methodKind: "unary";
651
+ input: typeof DeleteModelCredentialRequestSchema;
652
+ output: typeof DeleteModelCredentialResponseSchema;
653
+ };
654
+ }>;