@toshicloud/sdk 0.5.0 → 0.5.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 +82 -40
- package/dist/client.d.ts +33 -2
- package/dist/client.js +28 -3
- package/dist/errors.d.ts +74 -22
- package/dist/errors.js +99 -27
- package/dist/gen/toshi/permission_pb.d.ts +207 -2
- package/dist/gen/toshi/permission_pb.js +54 -2
- package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
- package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
- package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
- package/dist/gen/toshi/workspace/v1/artifacts_pb.js +9 -7
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +11 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
- package/dist/gen/toshi/workspace/v1/channels_pb.js +185 -39
- package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1481 -0
- package/dist/gen/toshi/workspace/v1/connections_pb.js +208 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +291 -43
- package/dist/gen/toshi/workspace/v1/discovery_pb.js +79 -30
- package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
- package/dist/gen/toshi/workspace/v1/display_pb.js +52 -2
- package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
- package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
- package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +315 -15
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +10 -5
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +12 -7
- package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
- package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
- package/dist/gen/toshi/workspace/v1/products_pb.d.ts +99 -296
- package/dist/gen/toshi/workspace/v1/products_pb.js +7 -53
- package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
- package/dist/gen/toshi/workspace/v1/projects_pb.js +150 -33
- package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +54 -14
- package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
- package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
- package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
- package/dist/gen/toshi/workspace/v1/secrets_pb.js +42 -18
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +65 -8
- package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
- package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
- package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
- package/dist/gen/toshi/workspace/v1/volumes_pb.js +169 -11
- package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +4 -4
- package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6290 -937
- package/dist/gen/toshi/workspace/v1/workspace_pb.js +801 -88
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +2176 -630
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +191 -74
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -1
- package/dist/interceptors.d.ts +6 -2
- package/dist/interceptors.js +13 -8
- package/dist/retry.d.ts +18 -0
- package/dist/retry.js +225 -23
- package/dist/test/procedures.js +100 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wait.d.ts +4 -0
- package/dist/wait.js +24 -1
- package/package.json +3 -2
|
@@ -89,7 +89,9 @@ export type Artifact = Message<"toshi.workspace.v1.Artifact"> & {
|
|
|
89
89
|
completedAt?: Timestamp | undefined;
|
|
90
90
|
/**
|
|
91
91
|
* The kind of workload that uploaded it, as its token named: job or
|
|
92
|
-
* sandbox. workload_id and execution_id are that workload's.
|
|
92
|
+
* sandbox. workload_id and execution_id are that workload's. A CI
|
|
93
|
+
* job runs no workload, and its token names the kind job with the
|
|
94
|
+
* host job's own id: its artifacts' workload_id is that id.
|
|
93
95
|
*
|
|
94
96
|
* @generated from field: string workload_kind = 16;
|
|
95
97
|
*/
|
|
@@ -178,7 +180,9 @@ export type ArtifactJson = {
|
|
|
178
180
|
completedAt?: TimestampJson;
|
|
179
181
|
/**
|
|
180
182
|
* The kind of workload that uploaded it, as its token named: job or
|
|
181
|
-
* sandbox. workload_id and execution_id are that workload's.
|
|
183
|
+
* sandbox. workload_id and execution_id are that workload's. A CI
|
|
184
|
+
* job runs no workload, and its token names the kind job with the
|
|
185
|
+
* host job's own id: its artifacts' workload_id is that id.
|
|
182
186
|
*
|
|
183
187
|
* @generated from field: string workload_kind = 16;
|
|
184
188
|
*/
|
|
@@ -755,12 +759,14 @@ export declare const GetArtifactDownloadURLResponseSchema: GenMessage<GetArtifac
|
|
|
755
759
|
/**
|
|
756
760
|
* ArtifactUploadService is how a job uploads what it recorded:
|
|
757
761
|
* it reserves an artifact, uploads each part to a presigned URL, and
|
|
758
|
-
* completes the upload. The caller is the workload itself
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
762
|
+
* completes the upload. The caller is the workload itself, with a
|
|
763
|
+
* workload identity token for the audience "toshi:artifacts", or a host
|
|
764
|
+
* storing a recording's strip, with that strip's upload token for the
|
|
765
|
+
* audience "toshi:recordings". The workspace, project, environment,
|
|
766
|
+
* workload and execution of the artifact are the token's claims, or the
|
|
767
|
+
* recording's, never the request's. Another token, a display token, an
|
|
768
|
+
* expired token, or one that names no workload is refused with
|
|
769
|
+
* UNAUTHENTICATED. A workspace that
|
|
764
770
|
* is suspended or being deleted is refused with FAILED_PRECONDITION.
|
|
765
771
|
*
|
|
766
772
|
* The data key and the presigned URLs are the only values either call
|
|
@@ -8,7 +8,7 @@ import { file_toshi_workspace_v1_recordings } from "./recordings_pb.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* Describes the file toshi/workspace/v1/artifacts.proto.
|
|
10
10
|
*/
|
|
11
|
-
export const file_toshi_workspace_v1_artifacts = /*@__PURE__*/ fileDesc("
|
|
11
|
+
export const file_toshi_workspace_v1_artifacts = /*@__PURE__*/ fileDesc("CiJ0b3NoaS93b3Jrc3BhY2UvdjEvYXJ0aWZhY3RzLnByb3RvEhJ0b3NoaS53b3Jrc3BhY2UudjEi9wIKCEFydGlmYWN0EgoKAmlkGAEgASgJEhIKCnByb2plY3RfaWQYAiABKAkSFgoOZW52aXJvbm1lbnRfaWQYAyABKAkSEwoLd29ya2xvYWRfaWQYBCABKAkSFAoMZXhlY3V0aW9uX2lkGAUgASgJEgwKBGtpbmQYBiABKAkSDAoEbmFtZRgHIAEoCRIUCgxjb250ZW50X3R5cGUYCCABKAkSEgoKcGFydF9jb3VudBgJIAEoAxISCgpwYXJ0X3NpemVzGAogAygDEhIKCmluZGV4X3NpemUYCyABKAMSDQoFc3RhdGUYDCABKAkSEgoKZW5jcnlwdGlvbhgNIAEoCRIuCgpjcmVhdGVkX2F0GA4gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIwCgxjb21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KS50b3NoaS53b3Jrc3BhY2UudjEuQ29tcGxldGVVcGxvYWRSZXF1ZXN0GioudG9zaGkud29ya3NwYWNlLnYxLkNvbXBsZXRlVXBsb2FkUmVzcG9uc2UiMMLzGA9hcnRpZmFjdHMud3JpdGXS8xgTChFhcnRpZmFjdC51cGxvYWRlZOrzGAIoATLZAwoPQXJ0aWZhY3RTZXJ2aWNlEocBCg1MaXN0QXJ0aWZhY3RzEigudG9zaGkud29ya3NwYWNlLnYxLkxpc3RBcnRpZmFjdHNSZXF1ZXN0GikudG9zaGkud29ya3NwYWNlLnYxLkxpc3RBcnRpZmFjdHNSZXNwb25zZSIhwvMYDmFydGlmYWN0cy5yZWFkyvMYC2Vudmlyb25tZW50EoEBCgtHZXRBcnRpZmFjdBImLnRvc2hpLndvcmtzcGFjZS52MS5HZXRBcnRpZmFjdFJlcXVlc3QaJy50b3NoaS53b3Jrc3BhY2UudjEuR2V0QXJ0aWZhY3RSZXNwb25zZSIhwvMYDmFydGlmYWN0cy5yZWFkyvMYC2Vudmlyb25tZW50ErcBChZHZXRBcnRpZmFjdERvd25sb2FkVVJMEjEudG9zaGkud29ya3NwYWNlLnYxLkdldEFydGlmYWN0RG93bmxvYWRVUkxSZXF1ZXN0GjIudG9zaGkud29ya3NwYWNlLnYxLkdldEFydGlmYWN0RG93bmxvYWRVUkxSZXNwb25zZSI2wvMYDmFydGlmYWN0cy5yZWFkyvMYC2Vudmlyb25tZW500vMYEQoPYXJ0aWZhY3Qudmlld2VkQiJaIGdvLnRvc2hpY2xvdWQuaW8vYXBpL3dvcmtzcGFjZXYxYgZwcm90bzM", [file_google_protobuf_timestamp, file_toshi_permission, file_toshi_workspace_v1_recordings]);
|
|
12
12
|
/**
|
|
13
13
|
* Describes the message toshi.workspace.v1.Artifact.
|
|
14
14
|
* Use `create(ArtifactSchema)` to create a new message.
|
|
@@ -72,12 +72,14 @@ export const GetArtifactDownloadURLResponseSchema = /*@__PURE__*/ messageDesc(fi
|
|
|
72
72
|
/**
|
|
73
73
|
* ArtifactUploadService is how a job uploads what it recorded:
|
|
74
74
|
* it reserves an artifact, uploads each part to a presigned URL, and
|
|
75
|
-
* completes the upload. The caller is the workload itself
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
75
|
+
* completes the upload. The caller is the workload itself, with a
|
|
76
|
+
* workload identity token for the audience "toshi:artifacts", or a host
|
|
77
|
+
* storing a recording's strip, with that strip's upload token for the
|
|
78
|
+
* audience "toshi:recordings". The workspace, project, environment,
|
|
79
|
+
* workload and execution of the artifact are the token's claims, or the
|
|
80
|
+
* recording's, never the request's. Another token, a display token, an
|
|
81
|
+
* expired token, or one that names no workload is refused with
|
|
82
|
+
* UNAUTHENTICATED. A workspace that
|
|
81
83
|
* is suspended or being deleted is refused with FAILED_PRECONDITION.
|
|
82
84
|
*
|
|
83
85
|
* The data key and the presigned URLs are the only values either call
|
|
@@ -26,9 +26,9 @@ export type AuditEvent = Message<"toshi.workspace.v1.AuditEvent"> & {
|
|
|
26
26
|
*/
|
|
27
27
|
actorKind: string;
|
|
28
28
|
/**
|
|
29
|
-
* The session's
|
|
30
|
-
*
|
|
31
|
-
* name.
|
|
29
|
+
* The session's user id, which stays the same across renames and identity
|
|
30
|
+
* providers; the API or product token's id (never its value); the workload
|
|
31
|
+
* as "<kind>:<id>"; or a system or webhook source name.
|
|
32
32
|
*
|
|
33
33
|
* @generated from field: string actor_id = 4;
|
|
34
34
|
*/
|
|
@@ -54,6 +54,43 @@ export type AuditEvent = Message<"toshi.workspace.v1.AuditEvent"> & {
|
|
|
54
54
|
* @generated from field: string request_id = 8;
|
|
55
55
|
*/
|
|
56
56
|
requestId: string;
|
|
57
|
+
/**
|
|
58
|
+
* The permission the call needed, for an event a Workspace API call
|
|
59
|
+
* records; empty otherwise.
|
|
60
|
+
*
|
|
61
|
+
* @generated from field: string permission = 9;
|
|
62
|
+
*/
|
|
63
|
+
permission: string;
|
|
64
|
+
/**
|
|
65
|
+
* Where the call acted, as "project:<id>" or
|
|
66
|
+
* "project:<id>/environment:<id>"; empty for the whole workspace and for
|
|
67
|
+
* an event no call records.
|
|
68
|
+
*
|
|
69
|
+
* @generated from field: string scope = 10;
|
|
70
|
+
*/
|
|
71
|
+
scope: string;
|
|
72
|
+
/**
|
|
73
|
+
* "ok", or the reason the call was refused: PERMISSION_MISSING,
|
|
74
|
+
* OUTSIDE_LIMIT or PRODUCT_UNAVAILABLE.
|
|
75
|
+
* Empty for an event no call records.
|
|
76
|
+
*
|
|
77
|
+
* @generated from field: string outcome = 11;
|
|
78
|
+
*/
|
|
79
|
+
outcome: string;
|
|
80
|
+
/**
|
|
81
|
+
* The id of the token the call was made with (never its value); empty for
|
|
82
|
+
* a session and for an event no call records.
|
|
83
|
+
*
|
|
84
|
+
* @generated from field: string token_id = 12;
|
|
85
|
+
*/
|
|
86
|
+
tokenId: string;
|
|
87
|
+
/**
|
|
88
|
+
* A session actor's login or name as it was when the event was recorded;
|
|
89
|
+
* empty for the other actors, and once the workspace is purged.
|
|
90
|
+
*
|
|
91
|
+
* @generated from field: string actor_name = 13;
|
|
92
|
+
*/
|
|
93
|
+
actorName: string;
|
|
57
94
|
};
|
|
58
95
|
/**
|
|
59
96
|
* AuditEvent is one append-only audit log entry.
|
|
@@ -76,9 +113,9 @@ export type AuditEventJson = {
|
|
|
76
113
|
*/
|
|
77
114
|
actorKind?: string;
|
|
78
115
|
/**
|
|
79
|
-
* The session's
|
|
80
|
-
*
|
|
81
|
-
* name.
|
|
116
|
+
* The session's user id, which stays the same across renames and identity
|
|
117
|
+
* providers; the API or product token's id (never its value); the workload
|
|
118
|
+
* as "<kind>:<id>"; or a system or webhook source name.
|
|
82
119
|
*
|
|
83
120
|
* @generated from field: string actor_id = 4;
|
|
84
121
|
*/
|
|
@@ -104,6 +141,43 @@ export type AuditEventJson = {
|
|
|
104
141
|
* @generated from field: string request_id = 8;
|
|
105
142
|
*/
|
|
106
143
|
requestId?: string;
|
|
144
|
+
/**
|
|
145
|
+
* The permission the call needed, for an event a Workspace API call
|
|
146
|
+
* records; empty otherwise.
|
|
147
|
+
*
|
|
148
|
+
* @generated from field: string permission = 9;
|
|
149
|
+
*/
|
|
150
|
+
permission?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Where the call acted, as "project:<id>" or
|
|
153
|
+
* "project:<id>/environment:<id>"; empty for the whole workspace and for
|
|
154
|
+
* an event no call records.
|
|
155
|
+
*
|
|
156
|
+
* @generated from field: string scope = 10;
|
|
157
|
+
*/
|
|
158
|
+
scope?: string;
|
|
159
|
+
/**
|
|
160
|
+
* "ok", or the reason the call was refused: PERMISSION_MISSING,
|
|
161
|
+
* OUTSIDE_LIMIT or PRODUCT_UNAVAILABLE.
|
|
162
|
+
* Empty for an event no call records.
|
|
163
|
+
*
|
|
164
|
+
* @generated from field: string outcome = 11;
|
|
165
|
+
*/
|
|
166
|
+
outcome?: string;
|
|
167
|
+
/**
|
|
168
|
+
* The id of the token the call was made with (never its value); empty for
|
|
169
|
+
* a session and for an event no call records.
|
|
170
|
+
*
|
|
171
|
+
* @generated from field: string token_id = 12;
|
|
172
|
+
*/
|
|
173
|
+
tokenId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* A session actor's login or name as it was when the event was recorded;
|
|
176
|
+
* empty for the other actors, and once the workspace is purged.
|
|
177
|
+
*
|
|
178
|
+
* @generated from field: string actor_name = 13;
|
|
179
|
+
*/
|
|
180
|
+
actorName?: string;
|
|
107
181
|
};
|
|
108
182
|
/**
|
|
109
183
|
* Describes the message toshi.workspace.v1.AuditEvent.
|
|
@@ -165,6 +239,14 @@ export type ListAuditEventsRequest = Message<"toshi.workspace.v1.ListAuditEvents
|
|
|
165
239
|
* @generated from field: string page_token = 7;
|
|
166
240
|
*/
|
|
167
241
|
pageToken: string;
|
|
242
|
+
/**
|
|
243
|
+
* Only the events of calls with this outcome: "ok", or the reason a call
|
|
244
|
+
* was refused, such as PERMISSION_MISSING. Empty matches every event, a
|
|
245
|
+
* call's or not.
|
|
246
|
+
*
|
|
247
|
+
* @generated from field: string outcome = 8;
|
|
248
|
+
*/
|
|
249
|
+
outcome: string;
|
|
168
250
|
};
|
|
169
251
|
/**
|
|
170
252
|
* ListAuditEventsRequest selects the audit events to return.
|
|
@@ -219,6 +301,14 @@ export type ListAuditEventsRequestJson = {
|
|
|
219
301
|
* @generated from field: string page_token = 7;
|
|
220
302
|
*/
|
|
221
303
|
pageToken?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Only the events of calls with this outcome: "ok", or the reason a call
|
|
306
|
+
* was refused, such as PERMISSION_MISSING. Empty matches every event, a
|
|
307
|
+
* call's or not.
|
|
308
|
+
*
|
|
309
|
+
* @generated from field: string outcome = 8;
|
|
310
|
+
*/
|
|
311
|
+
outcome?: string;
|
|
222
312
|
};
|
|
223
313
|
/**
|
|
224
314
|
* Describes the message toshi.workspace.v1.ListAuditEventsRequest.
|
|
@@ -268,6 +358,80 @@ export type ListAuditEventsResponseJson = {
|
|
|
268
358
|
export declare const ListAuditEventsResponseSchema: GenMessage<ListAuditEventsResponse, {
|
|
269
359
|
jsonType: ListAuditEventsResponseJson;
|
|
270
360
|
}>;
|
|
361
|
+
/**
|
|
362
|
+
* @generated from message toshi.workspace.v1.ExportAuditEventsRequest
|
|
363
|
+
*/
|
|
364
|
+
export type ExportAuditEventsRequest = Message<"toshi.workspace.v1.ExportAuditEventsRequest"> & {
|
|
365
|
+
/**
|
|
366
|
+
* @generated from field: google.protobuf.Timestamp since = 1;
|
|
367
|
+
*/
|
|
368
|
+
since?: Timestamp | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* @generated from field: google.protobuf.Timestamp until = 2;
|
|
371
|
+
*/
|
|
372
|
+
until?: Timestamp | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* @generated from field: string cursor = 3;
|
|
375
|
+
*/
|
|
376
|
+
cursor: string;
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* @generated from message toshi.workspace.v1.ExportAuditEventsRequest
|
|
380
|
+
*/
|
|
381
|
+
export type ExportAuditEventsRequestJson = {
|
|
382
|
+
/**
|
|
383
|
+
* @generated from field: google.protobuf.Timestamp since = 1;
|
|
384
|
+
*/
|
|
385
|
+
since?: TimestampJson;
|
|
386
|
+
/**
|
|
387
|
+
* @generated from field: google.protobuf.Timestamp until = 2;
|
|
388
|
+
*/
|
|
389
|
+
until?: TimestampJson;
|
|
390
|
+
/**
|
|
391
|
+
* @generated from field: string cursor = 3;
|
|
392
|
+
*/
|
|
393
|
+
cursor?: string;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Describes the message toshi.workspace.v1.ExportAuditEventsRequest.
|
|
397
|
+
* Use `create(ExportAuditEventsRequestSchema)` to create a new message.
|
|
398
|
+
*/
|
|
399
|
+
export declare const ExportAuditEventsRequestSchema: GenMessage<ExportAuditEventsRequest, {
|
|
400
|
+
jsonType: ExportAuditEventsRequestJson;
|
|
401
|
+
}>;
|
|
402
|
+
/**
|
|
403
|
+
* @generated from message toshi.workspace.v1.ExportAuditEventsResponse
|
|
404
|
+
*/
|
|
405
|
+
export type ExportAuditEventsResponse = Message<"toshi.workspace.v1.ExportAuditEventsResponse"> & {
|
|
406
|
+
/**
|
|
407
|
+
* @generated from field: bytes data = 1;
|
|
408
|
+
*/
|
|
409
|
+
data: Uint8Array;
|
|
410
|
+
/**
|
|
411
|
+
* @generated from field: string cursor = 2;
|
|
412
|
+
*/
|
|
413
|
+
cursor: string;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* @generated from message toshi.workspace.v1.ExportAuditEventsResponse
|
|
417
|
+
*/
|
|
418
|
+
export type ExportAuditEventsResponseJson = {
|
|
419
|
+
/**
|
|
420
|
+
* @generated from field: bytes data = 1;
|
|
421
|
+
*/
|
|
422
|
+
data?: string;
|
|
423
|
+
/**
|
|
424
|
+
* @generated from field: string cursor = 2;
|
|
425
|
+
*/
|
|
426
|
+
cursor?: string;
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* Describes the message toshi.workspace.v1.ExportAuditEventsResponse.
|
|
430
|
+
* Use `create(ExportAuditEventsResponseSchema)` to create a new message.
|
|
431
|
+
*/
|
|
432
|
+
export declare const ExportAuditEventsResponseSchema: GenMessage<ExportAuditEventsResponse, {
|
|
433
|
+
jsonType: ExportAuditEventsResponseJson;
|
|
434
|
+
}>;
|
|
271
435
|
/**
|
|
272
436
|
* AuditEventService reads the workspace's audit log: what its members, its
|
|
273
437
|
* tokens, the operator and the control plane did in it.
|
|
@@ -294,4 +458,25 @@ export declare const AuditEventService: GenService<{
|
|
|
294
458
|
input: typeof ListAuditEventsRequestSchema;
|
|
295
459
|
output: typeof ListAuditEventsResponseSchema;
|
|
296
460
|
};
|
|
461
|
+
/**
|
|
462
|
+
* ExportAuditEvents streams the audit log as JSON lines, oldest first,
|
|
463
|
+
* without a row cap. The first line is {"header":{"since":...,"until":...,
|
|
464
|
+
* "retention_boundary":...|null,"crossed":true|false}}, followed by one
|
|
465
|
+
* AuditEvent per line. The plan must include audit export or the call fails
|
|
466
|
+
* with PERMISSION_DENIED.
|
|
467
|
+
*
|
|
468
|
+
* Since is required; until defaults to now. Since must be before until,
|
|
469
|
+
* else INVALID_ARGUMENT. A cursor from a previous response resumes after
|
|
470
|
+
* its last row, sending the header again. A malformed cursor or one from
|
|
471
|
+
* another range fails with INVALID_ARGUMENT; a resume cursor at or behind
|
|
472
|
+
* the retention boundary fails with OUT_OF_RANGE. When resuming without an
|
|
473
|
+
* until, the cursor keeps the original range's until.
|
|
474
|
+
*
|
|
475
|
+
* @generated from rpc toshi.workspace.v1.AuditEventService.ExportAuditEvents
|
|
476
|
+
*/
|
|
477
|
+
exportAuditEvents: {
|
|
478
|
+
methodKind: "server_streaming";
|
|
479
|
+
input: typeof ExportAuditEventsRequestSchema;
|
|
480
|
+
output: typeof ExportAuditEventsResponseSchema;
|
|
481
|
+
};
|
|
297
482
|
}>;
|
|
@@ -7,7 +7,7 @@ import { file_toshi_permission } from "../../permission_pb.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Describes the file toshi/workspace/v1/audit_events.proto.
|
|
9
9
|
*/
|
|
10
|
-
export const file_toshi_workspace_v1_audit_events = /*@__PURE__*/ fileDesc("
|
|
10
|
+
export const file_toshi_workspace_v1_audit_events = /*@__PURE__*/ fileDesc("CiV0b3NoaS93b3Jrc3BhY2UvdjEvYXVkaXRfZXZlbnRzLnByb3RvEhJ0b3NoaS53b3Jrc3BhY2UudjEiigIKCkF1ZGl0RXZlbnQSCgoCaWQYASABKAMSJgoCYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhIKCmFjdG9yX2tpbmQYAyABKAkSEAoIYWN0b3JfaWQYBCABKAkSDgoGYWN0aW9uGAUgASgJEg4KBnRhcmdldBgGIAEoCRIUCgxkZXRhaWxzX2pzb24YByABKAkSEgoKcmVxdWVzdF9pZBgIIAEoCRISCgpwZXJtaXNzaW9uGAkgASgJEg0KBXNjb3BlGAogASgJEg8KB291dGNvbWUYCyABKAkSEAoIdG9rZW5faWQYDCABKAkSEgoKYWN0b3JfbmFtZRgNIAEoCSK7AQoWTGlzdEF1ZGl0RXZlbnRzUmVxdWVzdBIOCgZhY3Rpb24YASABKAkSKQoFc2luY2UYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhEKCXBhZ2Vfc2l6ZRgDIAEoBRINCgVhY3RvchgEIAEoCRIPCgdhY3Rpb25zGAUgAygJEg4KBnRhcmdldBgGIAEoCRISCgpwYWdlX3Rva2VuGAcgASgJEg8KB291dGNvbWUYCCABKAkiYgoXTGlzdEF1ZGl0RXZlbnRzUmVzcG9uc2USLgoGZXZlbnRzGAEgAygLMh4udG9zaGkud29ya3NwYWNlLnYxLkF1ZGl0RXZlbnQSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIoABChhFeHBvcnRBdWRpdEV2ZW50c1JlcXVlc3QSKQoFc2luY2UYASABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEikKBXVudGlsGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIOCgZjdXJzb3IYAyABKAkiOQoZRXhwb3J0QXVkaXRFdmVudHNSZXNwb25zZRIMCgRkYXRhGAEgASgMEg4KBmN1cnNvchgCIAEoCTLEAgoRQXVkaXRFdmVudFNlcnZpY2USegoPTGlzdEF1ZGl0RXZlbnRzEioudG9zaGkud29ya3NwYWNlLnYxLkxpc3RBdWRpdEV2ZW50c1JlcXVlc3QaKy50b3NoaS53b3Jrc3BhY2UudjEuTGlzdEF1ZGl0RXZlbnRzUmVzcG9uc2UiDsLzGAphdWRpdC5yZWFkErIBChFFeHBvcnRBdWRpdEV2ZW50cxIsLnRvc2hpLndvcmtzcGFjZS52MS5FeHBvcnRBdWRpdEV2ZW50c1JlcXVlc3QaLS50b3NoaS53b3Jrc3BhY2UudjEuRXhwb3J0QXVkaXRFdmVudHNSZXNwb25zZSI+wvMYCmF1ZGl0LnJlYWTS8xgsChVhdWRpdF9ldmVudHMuZXhwb3J0ZWQSE3dvcmtzcGFjZTp3b3Jrc3BhY2UwAUIiWiBnby50b3NoaWNsb3VkLmlvL2FwaS93b3Jrc3BhY2V2MWIGcHJvdG8z", [file_google_protobuf_timestamp, file_toshi_permission]);
|
|
11
11
|
/**
|
|
12
12
|
* Describes the message toshi.workspace.v1.AuditEvent.
|
|
13
13
|
* Use `create(AuditEventSchema)` to create a new message.
|
|
@@ -23,6 +23,16 @@ export const ListAuditEventsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi
|
|
|
23
23
|
* Use `create(ListAuditEventsResponseSchema)` to create a new message.
|
|
24
24
|
*/
|
|
25
25
|
export const ListAuditEventsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_audit_events, 2);
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message toshi.workspace.v1.ExportAuditEventsRequest.
|
|
28
|
+
* Use `create(ExportAuditEventsRequestSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export const ExportAuditEventsRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_audit_events, 3);
|
|
31
|
+
/**
|
|
32
|
+
* Describes the message toshi.workspace.v1.ExportAuditEventsResponse.
|
|
33
|
+
* Use `create(ExportAuditEventsResponseSchema)` to create a new message.
|
|
34
|
+
*/
|
|
35
|
+
export const ExportAuditEventsResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_audit_events, 4);
|
|
26
36
|
/**
|
|
27
37
|
* AuditEventService reads the workspace's audit log: what its members, its
|
|
28
38
|
* tokens, the operator and the control plane did in it.
|