@toshicloud/sdk 0.3.0 → 0.3.1
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.
- package/README.md +12 -5
- package/dist/client.d.ts +23 -5
- package/dist/client.js +20 -4
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +297 -0
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +37 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +920 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +94 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +2048 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +226 -0
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +2135 -0
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +301 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +717 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +74 -0
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +518 -0
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +88 -0
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +3719 -0
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +270 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/retry.js +45 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=ts,json_types=true,import_extension=js"
|
|
2
|
+
// @generated from file toshi/workspace/v1/storage_providers.proto (package toshi.workspace.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
/**
|
|
7
|
+
* Describes the file toshi/workspace/v1/storage_providers.proto.
|
|
8
|
+
*/
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ZGVyUmVxdWVzdBIKCgJpZBgBIAEoCSIfCh1EZWxldGVTdG9yYWdlUHJvdmlkZXJSZXNwb25zZTKKBAoWU3RvcmFnZVByb3ZpZGVyU2VydmljZRJ5ChRMaXN0U3RvcmFnZVByb3ZpZGVycxIvLnRvc2hpLndvcmtzcGFjZS52MS5MaXN0U3RvcmFnZVByb3ZpZGVyc1JlcXVlc3QaMC50b3NoaS53b3Jrc3BhY2UudjEuTGlzdFN0b3JhZ2VQcm92aWRlcnNSZXNwb25zZRJ8ChVDcmVhdGVTdG9yYWdlUHJvdmlkZXISMC50b3NoaS53b3Jrc3BhY2UudjEuQ3JlYXRlU3RvcmFnZVByb3ZpZGVyUmVxdWVzdBoxLnRvc2hpLndvcmtzcGFjZS52MS5DcmVhdGVTdG9yYWdlUHJvdmlkZXJSZXNwb25zZRJ5ChRDaGVja1N0b3JhZ2VQcm92aWRlchIvLnRvc2hpLndvcmtzcGFjZS52MS5DaGVja1N0b3JhZ2VQcm92aWRlclJlcXVlc3QaMC50b3NoaS53b3Jrc3BhY2UudjEuQ2hlY2tTdG9yYWdlUHJvdmlkZXJSZXNwb25zZRJ8ChVEZWxldGVTdG9yYWdlUHJvdmlkZXISMC50b3NoaS53b3Jrc3BhY2UudjEuRGVsZXRlU3RvcmFnZVByb3ZpZGVyUmVxdWVzdBoxLnRvc2hpLndvcmtzcGFjZS52MS5EZWxldGVTdG9yYWdlUHJvdmlkZXJSZXNwb25zZUItWitnaXRodWIuY29tL3Rvc2hpY2xvdWQvdG9zaGktYXBpL3dvcmtzcGFjZXYxYgZwcm90bzM", [file_google_protobuf_timestamp]);
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message toshi.workspace.v1.StorageProvider.
|
|
12
|
+
* Use `create(StorageProviderSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const StorageProviderSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 0);
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message toshi.workspace.v1.CreateStorageProviderRequest.
|
|
17
|
+
* Use `create(CreateStorageProviderRequestSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
export const CreateStorageProviderRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 1);
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message toshi.workspace.v1.StorageCredential.
|
|
22
|
+
* Use `create(StorageCredentialSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const StorageCredentialSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 2);
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message toshi.workspace.v1.CreateStorageProviderResponse.
|
|
27
|
+
* Use `create(CreateStorageProviderResponseSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const CreateStorageProviderResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 3);
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message toshi.workspace.v1.ListStorageProvidersRequest.
|
|
32
|
+
* Use `create(ListStorageProvidersRequestSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const ListStorageProvidersRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 4);
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message toshi.workspace.v1.ListStorageProvidersResponse.
|
|
37
|
+
* Use `create(ListStorageProvidersResponseSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
export const ListStorageProvidersResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 5);
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message toshi.workspace.v1.CheckStorageProviderRequest.
|
|
42
|
+
* Use `create(CheckStorageProviderRequestSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export const CheckStorageProviderRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 6);
|
|
45
|
+
/**
|
|
46
|
+
* Describes the message toshi.workspace.v1.CheckStorageProviderResponse.
|
|
47
|
+
* Use `create(CheckStorageProviderResponseSchema)` to create a new message.
|
|
48
|
+
*/
|
|
49
|
+
export const CheckStorageProviderResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 7);
|
|
50
|
+
/**
|
|
51
|
+
* Describes the message toshi.workspace.v1.DeleteStorageProviderRequest.
|
|
52
|
+
* Use `create(DeleteStorageProviderRequestSchema)` to create a new message.
|
|
53
|
+
*/
|
|
54
|
+
export const DeleteStorageProviderRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 8);
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message toshi.workspace.v1.DeleteStorageProviderResponse.
|
|
57
|
+
* Use `create(DeleteStorageProviderResponseSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export const DeleteStorageProviderResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_storage_providers, 9);
|
|
60
|
+
/**
|
|
61
|
+
* StorageProviderService manages the buckets the workspace keeps its
|
|
62
|
+
* objects in: its own bucket, with a key the control plane wraps, and the
|
|
63
|
+
* rows the operator set for it. No call returns a credential or the
|
|
64
|
+
* operator's reference to one.
|
|
65
|
+
*
|
|
66
|
+
* Only a signed-in session may call these: a token is refused with
|
|
67
|
+
* PERMISSION_DENIED. The session names one of its workspaces in the
|
|
68
|
+
* Toshi-Workspace header. A suspended workspace lists its providers, and so does a
|
|
69
|
+
* closed one during its read-only period; every other call is refused for
|
|
70
|
+
* a suspended workspace with FAILED_PRECONDITION.
|
|
71
|
+
*
|
|
72
|
+
* @generated from service toshi.workspace.v1.StorageProviderService
|
|
73
|
+
*/
|
|
74
|
+
export const StorageProviderService = /*@__PURE__*/ serviceDesc(file_toshi_workspace_v1_storage_providers, 0);
|
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file toshi/workspace/v1/tokens.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_toshi_workspace_v1_tokens: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* Token is one of the workspace's tokens, without its value.
|
|
10
|
+
*
|
|
11
|
+
* @generated from message toshi.workspace.v1.Token
|
|
12
|
+
*/
|
|
13
|
+
export type Token = Message<"toshi.workspace.v1.Token"> & {
|
|
14
|
+
/**
|
|
15
|
+
* Token id, such as "tok-1a2b3c4d5e6f".
|
|
16
|
+
*
|
|
17
|
+
* @generated from field: string id = 1;
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* @generated from field: toshi.workspace.v1.TokenKind kind = 2;
|
|
22
|
+
*/
|
|
23
|
+
kind: TokenKind;
|
|
24
|
+
/**
|
|
25
|
+
* "tenant" for an enrollment token, "session" for an API token.
|
|
26
|
+
*
|
|
27
|
+
* @generated from field: string source = 3;
|
|
28
|
+
*/
|
|
29
|
+
source: string;
|
|
30
|
+
/**
|
|
31
|
+
* @generated from field: google.protobuf.Timestamp created_at = 4;
|
|
32
|
+
*/
|
|
33
|
+
createdAt?: Timestamp | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Unset when the token does not expire.
|
|
36
|
+
*
|
|
37
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 5;
|
|
38
|
+
*/
|
|
39
|
+
expiresAt?: Timestamp | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Unset when the token is not revoked.
|
|
42
|
+
*
|
|
43
|
+
* @generated from field: google.protobuf.Timestamp revoked_at = 6;
|
|
44
|
+
*/
|
|
45
|
+
revokedAt?: Timestamp | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the token is accepted now.
|
|
48
|
+
*
|
|
49
|
+
* @generated from field: bool active = 7;
|
|
50
|
+
*/
|
|
51
|
+
active: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The label the workspace chose for an API token; empty for an
|
|
54
|
+
* enrollment token.
|
|
55
|
+
*
|
|
56
|
+
* @generated from field: string name = 8;
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* The project the token is limited to, by name. Empty for a token that
|
|
61
|
+
* acts in the whole workspace.
|
|
62
|
+
*
|
|
63
|
+
* @generated from field: string project = 9;
|
|
64
|
+
*/
|
|
65
|
+
project: string;
|
|
66
|
+
/**
|
|
67
|
+
* The environment of project the token is limited to, by name. Empty
|
|
68
|
+
* when the token acts in every environment of its project.
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: string environment = 10;
|
|
71
|
+
*/
|
|
72
|
+
environment: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Token is one of the workspace's tokens, without its value.
|
|
76
|
+
*
|
|
77
|
+
* @generated from message toshi.workspace.v1.Token
|
|
78
|
+
*/
|
|
79
|
+
export type TokenJson = {
|
|
80
|
+
/**
|
|
81
|
+
* Token id, such as "tok-1a2b3c4d5e6f".
|
|
82
|
+
*
|
|
83
|
+
* @generated from field: string id = 1;
|
|
84
|
+
*/
|
|
85
|
+
id?: string;
|
|
86
|
+
/**
|
|
87
|
+
* @generated from field: toshi.workspace.v1.TokenKind kind = 2;
|
|
88
|
+
*/
|
|
89
|
+
kind?: TokenKindJson;
|
|
90
|
+
/**
|
|
91
|
+
* "tenant" for an enrollment token, "session" for an API token.
|
|
92
|
+
*
|
|
93
|
+
* @generated from field: string source = 3;
|
|
94
|
+
*/
|
|
95
|
+
source?: string;
|
|
96
|
+
/**
|
|
97
|
+
* @generated from field: google.protobuf.Timestamp created_at = 4;
|
|
98
|
+
*/
|
|
99
|
+
createdAt?: TimestampJson;
|
|
100
|
+
/**
|
|
101
|
+
* Unset when the token does not expire.
|
|
102
|
+
*
|
|
103
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 5;
|
|
104
|
+
*/
|
|
105
|
+
expiresAt?: TimestampJson;
|
|
106
|
+
/**
|
|
107
|
+
* Unset when the token is not revoked.
|
|
108
|
+
*
|
|
109
|
+
* @generated from field: google.protobuf.Timestamp revoked_at = 6;
|
|
110
|
+
*/
|
|
111
|
+
revokedAt?: TimestampJson;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the token is accepted now.
|
|
114
|
+
*
|
|
115
|
+
* @generated from field: bool active = 7;
|
|
116
|
+
*/
|
|
117
|
+
active?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The label the workspace chose for an API token; empty for an
|
|
120
|
+
* enrollment token.
|
|
121
|
+
*
|
|
122
|
+
* @generated from field: string name = 8;
|
|
123
|
+
*/
|
|
124
|
+
name?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The project the token is limited to, by name. Empty for a token that
|
|
127
|
+
* acts in the whole workspace.
|
|
128
|
+
*
|
|
129
|
+
* @generated from field: string project = 9;
|
|
130
|
+
*/
|
|
131
|
+
project?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The environment of project the token is limited to, by name. Empty
|
|
134
|
+
* when the token acts in every environment of its project.
|
|
135
|
+
*
|
|
136
|
+
* @generated from field: string environment = 10;
|
|
137
|
+
*/
|
|
138
|
+
environment?: string;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Describes the message toshi.workspace.v1.Token.
|
|
142
|
+
* Use `create(TokenSchema)` to create a new message.
|
|
143
|
+
*/
|
|
144
|
+
export declare const TokenSchema: GenMessage<Token, {
|
|
145
|
+
jsonType: TokenJson;
|
|
146
|
+
}>;
|
|
147
|
+
/**
|
|
148
|
+
* ListTokensRequest optionally narrows the list to one kind.
|
|
149
|
+
*
|
|
150
|
+
* @generated from message toshi.workspace.v1.ListTokensRequest
|
|
151
|
+
*/
|
|
152
|
+
export type ListTokensRequest = Message<"toshi.workspace.v1.ListTokensRequest"> & {
|
|
153
|
+
/**
|
|
154
|
+
* TOKEN_KIND_UNSPECIFIED lists every kind.
|
|
155
|
+
*
|
|
156
|
+
* @generated from field: toshi.workspace.v1.TokenKind kind = 1;
|
|
157
|
+
*/
|
|
158
|
+
kind: TokenKind;
|
|
159
|
+
/**
|
|
160
|
+
* The most tokens in one page; zero lets the server choose.
|
|
161
|
+
*
|
|
162
|
+
* @generated from field: int32 page_size = 2;
|
|
163
|
+
*/
|
|
164
|
+
pageSize: number;
|
|
165
|
+
/**
|
|
166
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
167
|
+
*
|
|
168
|
+
* @generated from field: string page_token = 3;
|
|
169
|
+
*/
|
|
170
|
+
pageToken: string;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* ListTokensRequest optionally narrows the list to one kind.
|
|
174
|
+
*
|
|
175
|
+
* @generated from message toshi.workspace.v1.ListTokensRequest
|
|
176
|
+
*/
|
|
177
|
+
export type ListTokensRequestJson = {
|
|
178
|
+
/**
|
|
179
|
+
* TOKEN_KIND_UNSPECIFIED lists every kind.
|
|
180
|
+
*
|
|
181
|
+
* @generated from field: toshi.workspace.v1.TokenKind kind = 1;
|
|
182
|
+
*/
|
|
183
|
+
kind?: TokenKindJson;
|
|
184
|
+
/**
|
|
185
|
+
* The most tokens in one page; zero lets the server choose.
|
|
186
|
+
*
|
|
187
|
+
* @generated from field: int32 page_size = 2;
|
|
188
|
+
*/
|
|
189
|
+
pageSize?: number;
|
|
190
|
+
/**
|
|
191
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
192
|
+
*
|
|
193
|
+
* @generated from field: string page_token = 3;
|
|
194
|
+
*/
|
|
195
|
+
pageToken?: string;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Describes the message toshi.workspace.v1.ListTokensRequest.
|
|
199
|
+
* Use `create(ListTokensRequestSchema)` to create a new message.
|
|
200
|
+
*/
|
|
201
|
+
export declare const ListTokensRequestSchema: GenMessage<ListTokensRequest, {
|
|
202
|
+
jsonType: ListTokensRequestJson;
|
|
203
|
+
}>;
|
|
204
|
+
/**
|
|
205
|
+
* ListTokensResponse carries the tokens, oldest first.
|
|
206
|
+
*
|
|
207
|
+
* @generated from message toshi.workspace.v1.ListTokensResponse
|
|
208
|
+
*/
|
|
209
|
+
export type ListTokensResponse = Message<"toshi.workspace.v1.ListTokensResponse"> & {
|
|
210
|
+
/**
|
|
211
|
+
* @generated from field: repeated toshi.workspace.v1.Token tokens = 1;
|
|
212
|
+
*/
|
|
213
|
+
tokens: Token[];
|
|
214
|
+
/**
|
|
215
|
+
* Empty on the last page.
|
|
216
|
+
*
|
|
217
|
+
* @generated from field: string next_page_token = 2;
|
|
218
|
+
*/
|
|
219
|
+
nextPageToken: string;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* ListTokensResponse carries the tokens, oldest first.
|
|
223
|
+
*
|
|
224
|
+
* @generated from message toshi.workspace.v1.ListTokensResponse
|
|
225
|
+
*/
|
|
226
|
+
export type ListTokensResponseJson = {
|
|
227
|
+
/**
|
|
228
|
+
* @generated from field: repeated toshi.workspace.v1.Token tokens = 1;
|
|
229
|
+
*/
|
|
230
|
+
tokens?: TokenJson[];
|
|
231
|
+
/**
|
|
232
|
+
* Empty on the last page.
|
|
233
|
+
*
|
|
234
|
+
* @generated from field: string next_page_token = 2;
|
|
235
|
+
*/
|
|
236
|
+
nextPageToken?: string;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Describes the message toshi.workspace.v1.ListTokensResponse.
|
|
240
|
+
* Use `create(ListTokensResponseSchema)` to create a new message.
|
|
241
|
+
*/
|
|
242
|
+
export declare const ListTokensResponseSchema: GenMessage<ListTokensResponse, {
|
|
243
|
+
jsonType: ListTokensResponseJson;
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* CreateWorkspaceTokenRequest names the token and what it may reach.
|
|
247
|
+
*
|
|
248
|
+
* @generated from message toshi.workspace.v1.CreateWorkspaceTokenRequest
|
|
249
|
+
*/
|
|
250
|
+
export type CreateWorkspaceTokenRequest = Message<"toshi.workspace.v1.CreateWorkspaceTokenRequest"> & {
|
|
251
|
+
/**
|
|
252
|
+
* A label for the token.
|
|
253
|
+
*
|
|
254
|
+
* @generated from field: string name = 1;
|
|
255
|
+
*/
|
|
256
|
+
name: string;
|
|
257
|
+
/**
|
|
258
|
+
* Unset means the token never expires.
|
|
259
|
+
*
|
|
260
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 2;
|
|
261
|
+
*/
|
|
262
|
+
expiresAt?: Timestamp | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* Limits the token to this project of the workspace, by name. Empty
|
|
265
|
+
* makes a token for the whole workspace.
|
|
266
|
+
*
|
|
267
|
+
* @generated from field: string project = 3;
|
|
268
|
+
*/
|
|
269
|
+
project: string;
|
|
270
|
+
/**
|
|
271
|
+
* Limits the token further to this environment of project, by name.
|
|
272
|
+
* Needs project.
|
|
273
|
+
*
|
|
274
|
+
* @generated from field: string environment = 4;
|
|
275
|
+
*/
|
|
276
|
+
environment: string;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* CreateWorkspaceTokenRequest names the token and what it may reach.
|
|
280
|
+
*
|
|
281
|
+
* @generated from message toshi.workspace.v1.CreateWorkspaceTokenRequest
|
|
282
|
+
*/
|
|
283
|
+
export type CreateWorkspaceTokenRequestJson = {
|
|
284
|
+
/**
|
|
285
|
+
* A label for the token.
|
|
286
|
+
*
|
|
287
|
+
* @generated from field: string name = 1;
|
|
288
|
+
*/
|
|
289
|
+
name?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Unset means the token never expires.
|
|
292
|
+
*
|
|
293
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 2;
|
|
294
|
+
*/
|
|
295
|
+
expiresAt?: TimestampJson;
|
|
296
|
+
/**
|
|
297
|
+
* Limits the token to this project of the workspace, by name. Empty
|
|
298
|
+
* makes a token for the whole workspace.
|
|
299
|
+
*
|
|
300
|
+
* @generated from field: string project = 3;
|
|
301
|
+
*/
|
|
302
|
+
project?: string;
|
|
303
|
+
/**
|
|
304
|
+
* Limits the token further to this environment of project, by name.
|
|
305
|
+
* Needs project.
|
|
306
|
+
*
|
|
307
|
+
* @generated from field: string environment = 4;
|
|
308
|
+
*/
|
|
309
|
+
environment?: string;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenRequest.
|
|
313
|
+
* Use `create(CreateWorkspaceTokenRequestSchema)` to create a new message.
|
|
314
|
+
*/
|
|
315
|
+
export declare const CreateWorkspaceTokenRequestSchema: GenMessage<CreateWorkspaceTokenRequest, {
|
|
316
|
+
jsonType: CreateWorkspaceTokenRequestJson;
|
|
317
|
+
}>;
|
|
318
|
+
/**
|
|
319
|
+
* CreateWorkspaceTokenResponse carries the new token and its value.
|
|
320
|
+
*
|
|
321
|
+
* @generated from message toshi.workspace.v1.CreateWorkspaceTokenResponse
|
|
322
|
+
*/
|
|
323
|
+
export type CreateWorkspaceTokenResponse = Message<"toshi.workspace.v1.CreateWorkspaceTokenResponse"> & {
|
|
324
|
+
/**
|
|
325
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
326
|
+
*/
|
|
327
|
+
token?: Token | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* The new token. It is returned only here.
|
|
330
|
+
*
|
|
331
|
+
* @generated from field: string value = 2;
|
|
332
|
+
*/
|
|
333
|
+
value: string;
|
|
334
|
+
};
|
|
335
|
+
/**
|
|
336
|
+
* CreateWorkspaceTokenResponse carries the new token and its value.
|
|
337
|
+
*
|
|
338
|
+
* @generated from message toshi.workspace.v1.CreateWorkspaceTokenResponse
|
|
339
|
+
*/
|
|
340
|
+
export type CreateWorkspaceTokenResponseJson = {
|
|
341
|
+
/**
|
|
342
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
343
|
+
*/
|
|
344
|
+
token?: TokenJson;
|
|
345
|
+
/**
|
|
346
|
+
* The new token. It is returned only here.
|
|
347
|
+
*
|
|
348
|
+
* @generated from field: string value = 2;
|
|
349
|
+
*/
|
|
350
|
+
value?: string;
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenResponse.
|
|
354
|
+
* Use `create(CreateWorkspaceTokenResponseSchema)` to create a new message.
|
|
355
|
+
*/
|
|
356
|
+
export declare const CreateWorkspaceTokenResponseSchema: GenMessage<CreateWorkspaceTokenResponse, {
|
|
357
|
+
jsonType: CreateWorkspaceTokenResponseJson;
|
|
358
|
+
}>;
|
|
359
|
+
/**
|
|
360
|
+
* RevokeTokenRequest names the token to revoke.
|
|
361
|
+
*
|
|
362
|
+
* @generated from message toshi.workspace.v1.RevokeTokenRequest
|
|
363
|
+
*/
|
|
364
|
+
export type RevokeTokenRequest = Message<"toshi.workspace.v1.RevokeTokenRequest"> & {
|
|
365
|
+
/**
|
|
366
|
+
* @generated from field: string id = 1;
|
|
367
|
+
*/
|
|
368
|
+
id: string;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* RevokeTokenRequest names the token to revoke.
|
|
372
|
+
*
|
|
373
|
+
* @generated from message toshi.workspace.v1.RevokeTokenRequest
|
|
374
|
+
*/
|
|
375
|
+
export type RevokeTokenRequestJson = {
|
|
376
|
+
/**
|
|
377
|
+
* @generated from field: string id = 1;
|
|
378
|
+
*/
|
|
379
|
+
id?: string;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Describes the message toshi.workspace.v1.RevokeTokenRequest.
|
|
383
|
+
* Use `create(RevokeTokenRequestSchema)` to create a new message.
|
|
384
|
+
*/
|
|
385
|
+
export declare const RevokeTokenRequestSchema: GenMessage<RevokeTokenRequest, {
|
|
386
|
+
jsonType: RevokeTokenRequestJson;
|
|
387
|
+
}>;
|
|
388
|
+
/**
|
|
389
|
+
* RevokeTokenResponse carries the revoked token.
|
|
390
|
+
*
|
|
391
|
+
* @generated from message toshi.workspace.v1.RevokeTokenResponse
|
|
392
|
+
*/
|
|
393
|
+
export type RevokeTokenResponse = Message<"toshi.workspace.v1.RevokeTokenResponse"> & {
|
|
394
|
+
/**
|
|
395
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
396
|
+
*/
|
|
397
|
+
token?: Token | undefined;
|
|
398
|
+
/**
|
|
399
|
+
* How many hosts were signed out and must register again.
|
|
400
|
+
*
|
|
401
|
+
* @generated from field: int32 hosts_signed_out = 2;
|
|
402
|
+
*/
|
|
403
|
+
hostsSignedOut: number;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* RevokeTokenResponse carries the revoked token.
|
|
407
|
+
*
|
|
408
|
+
* @generated from message toshi.workspace.v1.RevokeTokenResponse
|
|
409
|
+
*/
|
|
410
|
+
export type RevokeTokenResponseJson = {
|
|
411
|
+
/**
|
|
412
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
413
|
+
*/
|
|
414
|
+
token?: TokenJson;
|
|
415
|
+
/**
|
|
416
|
+
* How many hosts were signed out and must register again.
|
|
417
|
+
*
|
|
418
|
+
* @generated from field: int32 hosts_signed_out = 2;
|
|
419
|
+
*/
|
|
420
|
+
hostsSignedOut?: number;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Describes the message toshi.workspace.v1.RevokeTokenResponse.
|
|
424
|
+
* Use `create(RevokeTokenResponseSchema)` to create a new message.
|
|
425
|
+
*/
|
|
426
|
+
export declare const RevokeTokenResponseSchema: GenMessage<RevokeTokenResponse, {
|
|
427
|
+
jsonType: RevokeTokenResponseJson;
|
|
428
|
+
}>;
|
|
429
|
+
/**
|
|
430
|
+
* TokenKind says what a token grants.
|
|
431
|
+
*
|
|
432
|
+
* @generated from enum toshi.workspace.v1.TokenKind
|
|
433
|
+
*/
|
|
434
|
+
export declare enum TokenKind {
|
|
435
|
+
/**
|
|
436
|
+
* @generated from enum value: TOKEN_KIND_UNSPECIFIED = 0;
|
|
437
|
+
*/
|
|
438
|
+
UNSPECIFIED = 0,
|
|
439
|
+
/**
|
|
440
|
+
* An enrollment token: registering a host the workspace owns.
|
|
441
|
+
*
|
|
442
|
+
* @generated from enum value: TOKEN_KIND_ENROLLMENT = 2;
|
|
443
|
+
*/
|
|
444
|
+
ENROLLMENT = 2,
|
|
445
|
+
/**
|
|
446
|
+
* An API token: the Workspace API as the workspace.
|
|
447
|
+
*
|
|
448
|
+
* @generated from enum value: TOKEN_KIND_WORKSPACE = 3;
|
|
449
|
+
*/
|
|
450
|
+
WORKSPACE = 3
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* TokenKind says what a token grants.
|
|
454
|
+
*
|
|
455
|
+
* @generated from enum toshi.workspace.v1.TokenKind
|
|
456
|
+
*/
|
|
457
|
+
export type TokenKindJson = "TOKEN_KIND_UNSPECIFIED" | "TOKEN_KIND_ENROLLMENT" | "TOKEN_KIND_WORKSPACE";
|
|
458
|
+
/**
|
|
459
|
+
* Describes the enum toshi.workspace.v1.TokenKind.
|
|
460
|
+
*/
|
|
461
|
+
export declare const TokenKindSchema: GenEnum<TokenKind, TokenKindJson>;
|
|
462
|
+
/**
|
|
463
|
+
* TokenService manages the workspace's tokens: its API tokens, which call
|
|
464
|
+
* the Workspace API as the workspace, and its enrollment tokens, with which
|
|
465
|
+
* its own hosts register. No call returns a token's value except the one
|
|
466
|
+
* that makes it.
|
|
467
|
+
*
|
|
468
|
+
* A workspace's API token acts on its own workspace; a dashboard session
|
|
469
|
+
* names one of its workspaces in the Toshi-Workspace header. A
|
|
470
|
+
* token limited to a project or an environment is refused with
|
|
471
|
+
* PERMISSION_DENIED: these calls act in the whole workspace. A suspended
|
|
472
|
+
* workspace lists its tokens, and every other call is refused for it with
|
|
473
|
+
* FAILED_PRECONDITION.
|
|
474
|
+
*
|
|
475
|
+
* @generated from service toshi.workspace.v1.TokenService
|
|
476
|
+
*/
|
|
477
|
+
export declare const TokenService: GenService<{
|
|
478
|
+
/**
|
|
479
|
+
* ListTokens returns the workspace's API and enrollment tokens, oldest
|
|
480
|
+
* first, without their values.
|
|
481
|
+
*
|
|
482
|
+
* A page holds 100 tokens when page_size is zero, and 1000 at most.
|
|
483
|
+
*
|
|
484
|
+
* @generated from rpc toshi.workspace.v1.TokenService.ListTokens
|
|
485
|
+
*/
|
|
486
|
+
listTokens: {
|
|
487
|
+
methodKind: "unary";
|
|
488
|
+
input: typeof ListTokensRequestSchema;
|
|
489
|
+
output: typeof ListTokensResponseSchema;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* CreateWorkspaceToken makes an API token for the workspace and returns
|
|
493
|
+
* it with its value. Only a signed-in session may call it: a token never
|
|
494
|
+
* makes another token, and the call is refused for one with
|
|
495
|
+
* PERMISSION_DENIED. An unknown project or environment fails with
|
|
496
|
+
* NOT_FOUND; a closed workspace fails with FAILED_PRECONDITION.
|
|
497
|
+
*
|
|
498
|
+
* @generated from rpc toshi.workspace.v1.TokenService.CreateWorkspaceToken
|
|
499
|
+
*/
|
|
500
|
+
createWorkspaceToken: {
|
|
501
|
+
methodKind: "unary";
|
|
502
|
+
input: typeof CreateWorkspaceTokenRequestSchema;
|
|
503
|
+
output: typeof CreateWorkspaceTokenResponseSchema;
|
|
504
|
+
};
|
|
505
|
+
/**
|
|
506
|
+
* RevokeToken stops one of the workspace's tokens working at once.
|
|
507
|
+
* Revoking an enrollment token also signs out the hosts that registered
|
|
508
|
+
* with it. A token of another workspace, and an unknown ID, fail with
|
|
509
|
+
* NOT_FOUND.
|
|
510
|
+
*
|
|
511
|
+
* @generated from rpc toshi.workspace.v1.TokenService.RevokeToken
|
|
512
|
+
*/
|
|
513
|
+
revokeToken: {
|
|
514
|
+
methodKind: "unary";
|
|
515
|
+
input: typeof RevokeTokenRequestSchema;
|
|
516
|
+
output: typeof RevokeTokenResponseSchema;
|
|
517
|
+
};
|
|
518
|
+
}>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=ts,json_types=true,import_extension=js"
|
|
2
|
+
// @generated from file toshi/workspace/v1/tokens.proto (package toshi.workspace.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
/**
|
|
7
|
+
* Describes the file toshi/workspace/v1/tokens.proto.
|
|
8
|
+
*/
|
|
9
|
+
export const file_toshi_workspace_v1_tokens = /*@__PURE__*/ fileDesc("Ch90b3NoaS93b3Jrc3BhY2UvdjEvdG9rZW5zLnByb3RvEhJ0b3NoaS53b3Jrc3BhY2UudjEipAIKBVRva2VuEgoKAmlkGAEgASgJEisKBGtpbmQYAiABKA4yHS50b3NoaS53b3Jrc3BhY2UudjEuVG9rZW5LaW5kEg4KBnNvdXJjZRgDIAEoCRIuCgpjcmVhdGVkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgpleHBpcmVzX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgpyZXZva2VkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIOCgZhY3RpdmUYByABKAgSDAoEbmFtZRgIIAEoCRIPCgdwcm9qZWN0GAkgASgJEhMKC2Vudmlyb25tZW50GAogASgJImcKEUxpc3RUb2tlbnNSZXF1ZXN0EisKBGtpbmQYASABKA4yHS50b3NoaS53b3Jrc3BhY2UudjEuVG9rZW5LaW5kEhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJIlgKEkxpc3RUb2tlbnNSZXNwb25zZRIpCgZ0b2tlbnMYASADKAsyGS50b3NoaS53b3Jrc3BhY2UudjEuVG9rZW4SFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIoEBChtDcmVhdGVXb3Jrc3BhY2VUb2tlblJlcXVlc3Q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10
|
+
/**
|
|
11
|
+
* Describes the message toshi.workspace.v1.Token.
|
|
12
|
+
* Use `create(TokenSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const TokenSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 0);
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message toshi.workspace.v1.ListTokensRequest.
|
|
17
|
+
* Use `create(ListTokensRequestSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
export const ListTokensRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 1);
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message toshi.workspace.v1.ListTokensResponse.
|
|
22
|
+
* Use `create(ListTokensResponseSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const ListTokensResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 2);
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenRequest.
|
|
27
|
+
* Use `create(CreateWorkspaceTokenRequestSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const CreateWorkspaceTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 3);
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenResponse.
|
|
32
|
+
* Use `create(CreateWorkspaceTokenResponseSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const CreateWorkspaceTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 4);
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message toshi.workspace.v1.RevokeTokenRequest.
|
|
37
|
+
* Use `create(RevokeTokenRequestSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
export const RevokeTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 5);
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message toshi.workspace.v1.RevokeTokenResponse.
|
|
42
|
+
* Use `create(RevokeTokenResponseSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export const RevokeTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 6);
|
|
45
|
+
/**
|
|
46
|
+
* TokenKind says what a token grants.
|
|
47
|
+
*
|
|
48
|
+
* @generated from enum toshi.workspace.v1.TokenKind
|
|
49
|
+
*/
|
|
50
|
+
export var TokenKind;
|
|
51
|
+
(function (TokenKind) {
|
|
52
|
+
/**
|
|
53
|
+
* @generated from enum value: TOKEN_KIND_UNSPECIFIED = 0;
|
|
54
|
+
*/
|
|
55
|
+
TokenKind[TokenKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
56
|
+
/**
|
|
57
|
+
* An enrollment token: registering a host the workspace owns.
|
|
58
|
+
*
|
|
59
|
+
* @generated from enum value: TOKEN_KIND_ENROLLMENT = 2;
|
|
60
|
+
*/
|
|
61
|
+
TokenKind[TokenKind["ENROLLMENT"] = 2] = "ENROLLMENT";
|
|
62
|
+
/**
|
|
63
|
+
* An API token: the Workspace API as the workspace.
|
|
64
|
+
*
|
|
65
|
+
* @generated from enum value: TOKEN_KIND_WORKSPACE = 3;
|
|
66
|
+
*/
|
|
67
|
+
TokenKind[TokenKind["WORKSPACE"] = 3] = "WORKSPACE";
|
|
68
|
+
})(TokenKind || (TokenKind = {}));
|
|
69
|
+
/**
|
|
70
|
+
* Describes the enum toshi.workspace.v1.TokenKind.
|
|
71
|
+
*/
|
|
72
|
+
export const TokenKindSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_tokens, 0);
|
|
73
|
+
/**
|
|
74
|
+
* TokenService manages the workspace's tokens: its API tokens, which call
|
|
75
|
+
* the Workspace API as the workspace, and its enrollment tokens, with which
|
|
76
|
+
* its own hosts register. No call returns a token's value except the one
|
|
77
|
+
* that makes it.
|
|
78
|
+
*
|
|
79
|
+
* A workspace's API token acts on its own workspace; a dashboard session
|
|
80
|
+
* names one of its workspaces in the Toshi-Workspace header. A
|
|
81
|
+
* token limited to a project or an environment is refused with
|
|
82
|
+
* PERMISSION_DENIED: these calls act in the whole workspace. A suspended
|
|
83
|
+
* workspace lists its tokens, and every other call is refused for it with
|
|
84
|
+
* FAILED_PRECONDITION.
|
|
85
|
+
*
|
|
86
|
+
* @generated from service toshi.workspace.v1.TokenService
|
|
87
|
+
*/
|
|
88
|
+
export const TokenService = /*@__PURE__*/ serviceDesc(file_toshi_workspace_v1_tokens, 0);
|