@sylphx/sdk 0.32.0 → 0.32.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 +20 -0
- package/dist/access.d.ts +34 -0
- package/dist/access.js +14 -2
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +1564 -0
- package/dist/agents.js +1096 -0
- package/dist/agents.js.map +1 -0
- package/dist/ai.js +1 -1
- package/dist/artifacts.js +1 -1
- package/dist/assets.js +1 -1
- package/dist/auth/client.js +1 -1
- package/dist/auth/end-user-keys-mock.d.ts +83 -0
- package/dist/auth/end-user-keys-mock.js +427 -0
- package/dist/auth/end-user-keys-mock.js.map +1 -0
- package/dist/auth/end-user-keys.d.ts +219 -0
- package/dist/auth/end-user-keys.js +240 -0
- package/dist/auth/end-user-keys.js.map +1 -0
- package/dist/auth/verify.js +1 -1
- package/dist/auth.d.ts +201 -2
- package/dist/auth.js +148 -2
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +86 -8
- package/dist/billing.js +39 -1
- package/dist/billing.js.map +1 -1
- package/dist/broker.js +1 -1
- package/dist/build.d.ts +361 -28
- package/dist/build.js +302 -10
- package/dist/build.js.map +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.js +1 -1
- package/dist/config.js +1 -1
- package/dist/connections.js +1 -1
- package/dist/data.d.ts +52 -0
- package/dist/data.js +57 -1
- package/dist/data.js.map +1 -1
- package/dist/entitlement.js +1 -1
- package/dist/events/realtime.js +1 -1
- package/dist/events/webhooks.js +1 -1
- package/dist/events.js +1 -1
- package/dist/flags.d.ts +18 -0
- package/dist/flags.js +44 -0
- package/dist/flags.js.map +1 -0
- package/dist/hosting.js +1 -1
- package/dist/ids.d.ts +152 -2
- package/dist/ids.js +32 -2
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.js +1 -1
- package/dist/knowledge.d.ts +1192 -0
- package/dist/knowledge.js +1002 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/localization.js +1 -1
- package/dist/methods.js +1563 -40
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1687 -7
- package/dist/money.js +1269 -1
- package/dist/money.js.map +1 -1
- package/dist/network.js +1 -1
- package/dist/notify.d.ts +346 -1
- package/dist/notify.js +249 -1
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +138 -0
- package/dist/observability.js +89 -1
- package/dist/observability.js.map +1 -1
- package/dist/realtime.d.ts +404 -0
- package/dist/realtime.js +312 -0
- package/dist/realtime.js.map +1 -0
- package/dist/release.js +1 -1
- package/dist/runners.js +1 -1
- package/dist/runtime.js +1 -1
- package/dist/sandboxes.js +1 -1
- package/dist/secrets.d.ts +336 -0
- package/dist/secrets.js +268 -1
- package/dist/secrets.js.map +1 -1
- package/dist/workflows.d.ts +119 -3
- package/dist/workflows.js +144 -4
- package/dist/workflows.js.map +1 -1
- package/package.json +2 -2
package/dist/secrets.d.ts
CHANGED
|
@@ -13,6 +13,40 @@ export interface AccessSecretVersionResponse {
|
|
|
13
13
|
/** The value. */
|
|
14
14
|
payload?: string;
|
|
15
15
|
}
|
|
16
|
+
/** The request of CommitProfile. */
|
|
17
|
+
export interface CommitProfileRequest {
|
|
18
|
+
/** The profile to write back. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** The `attachment` OpenProfile returned with WRITE_BACK. */
|
|
21
|
+
attachment: string;
|
|
22
|
+
/** The whole state to write, in the profile kind's form, at most 2 MiB. */
|
|
23
|
+
state: string;
|
|
24
|
+
}
|
|
25
|
+
/** The response of CommitProfile. */
|
|
26
|
+
export interface CommitProfileResponse {
|
|
27
|
+
/** The version written. */
|
|
28
|
+
profileVersion?: ProfileVersion;
|
|
29
|
+
/**
|
|
30
|
+
* True when another write landed after this attachment's base: the version
|
|
31
|
+
* holds both, merged site by site with this write winning the sites it
|
|
32
|
+
* changed.
|
|
33
|
+
*/
|
|
34
|
+
conflict?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** The request of CreateProfile. */
|
|
37
|
+
export interface CreateProfileRequest {
|
|
38
|
+
/** The environment to create in. */
|
|
39
|
+
parent: string;
|
|
40
|
+
/** The profile to create; only spec is read. */
|
|
41
|
+
profile: Profile;
|
|
42
|
+
/**
|
|
43
|
+
* The id of the new profile, `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`; the server assigns one when
|
|
44
|
+
* empty.
|
|
45
|
+
*/
|
|
46
|
+
profileId?: string;
|
|
47
|
+
/** Validate and return the result without writing anything. */
|
|
48
|
+
validateOnly?: boolean;
|
|
49
|
+
}
|
|
16
50
|
/** The request of CreateSecretBinding. */
|
|
17
51
|
export interface CreateSecretBindingRequest {
|
|
18
52
|
/** The environment to create in. */
|
|
@@ -50,6 +84,20 @@ export interface CreateSecretVersionRequest {
|
|
|
50
84
|
/** Validate and return the result without writing anything. */
|
|
51
85
|
validateOnly?: boolean;
|
|
52
86
|
}
|
|
87
|
+
/** The request of DeleteProfile. */
|
|
88
|
+
export interface DeleteProfileRequest {
|
|
89
|
+
/** The name of the profile to delete. */
|
|
90
|
+
name: string;
|
|
91
|
+
/** Delete only if the current etag matches. */
|
|
92
|
+
etag?: string;
|
|
93
|
+
/** Validate without deleting anything. */
|
|
94
|
+
validateOnly?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Also destroy every version; without it a profile with versions fails
|
|
97
|
+
* with INVALID_STATE.
|
|
98
|
+
*/
|
|
99
|
+
force?: boolean;
|
|
100
|
+
}
|
|
53
101
|
/** The request of DeleteSecretBinding. */
|
|
54
102
|
export interface DeleteSecretBindingRequest {
|
|
55
103
|
/** The name of the secret binding to delete. */
|
|
@@ -125,6 +173,16 @@ export interface FileDelivery {
|
|
|
125
173
|
/** The absolute path, for example `/run/secrets/tls.key`. */
|
|
126
174
|
path?: string;
|
|
127
175
|
}
|
|
176
|
+
/** The request of GetProfile. */
|
|
177
|
+
export interface GetProfileRequest {
|
|
178
|
+
/** The name of the profile to get. */
|
|
179
|
+
name: string;
|
|
180
|
+
}
|
|
181
|
+
/** The request of GetProfileVersion. */
|
|
182
|
+
export interface GetProfileVersionRequest {
|
|
183
|
+
/** The name of the profile version to get. */
|
|
184
|
+
name: string;
|
|
185
|
+
}
|
|
128
186
|
/** The request of GetSecretBinding. */
|
|
129
187
|
export interface GetSecretBindingRequest {
|
|
130
188
|
/** The name of the secret binding to get. */
|
|
@@ -140,6 +198,42 @@ export interface GetSecretVersionRequest {
|
|
|
140
198
|
/** The name of the secret version to get. */
|
|
141
199
|
name: string;
|
|
142
200
|
}
|
|
201
|
+
/** The request of ListProfileVersions. */
|
|
202
|
+
export interface ListProfileVersionsRequest {
|
|
203
|
+
/** The profile whose versions to list. */
|
|
204
|
+
parent: string;
|
|
205
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
206
|
+
pageSize?: number;
|
|
207
|
+
/** `next_page_token` of the previous page. */
|
|
208
|
+
pageToken?: string;
|
|
209
|
+
}
|
|
210
|
+
/** The response of ListProfileVersions. */
|
|
211
|
+
export interface ListProfileVersionsResponse {
|
|
212
|
+
/** The page, newest first. */
|
|
213
|
+
profileVersions?: ProfileVersion[];
|
|
214
|
+
/** The token of the next page; empty on the last page. */
|
|
215
|
+
nextPageToken?: string;
|
|
216
|
+
}
|
|
217
|
+
/** The request of ListProfiles. */
|
|
218
|
+
export interface ListProfilesRequest {
|
|
219
|
+
/** The environment to list in. */
|
|
220
|
+
parent: string;
|
|
221
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
222
|
+
pageSize?: number;
|
|
223
|
+
/** `next_page_token` of the previous page. */
|
|
224
|
+
pageToken?: string;
|
|
225
|
+
/** AIP-160 filter over labels and filterable fields. */
|
|
226
|
+
filter?: string;
|
|
227
|
+
/** AIP-132 ordering over filterable fields. */
|
|
228
|
+
orderBy?: string;
|
|
229
|
+
}
|
|
230
|
+
/** The response of ListProfiles. */
|
|
231
|
+
export interface ListProfilesResponse {
|
|
232
|
+
/** The page. */
|
|
233
|
+
profiles?: Profile[];
|
|
234
|
+
/** The token of the next page; empty on the last page. */
|
|
235
|
+
nextPageToken?: string;
|
|
236
|
+
}
|
|
143
237
|
/** The request of ListSecretBindings. */
|
|
144
238
|
export interface ListSecretBindingsRequest {
|
|
145
239
|
/** The environment to list in. */
|
|
@@ -200,6 +294,135 @@ export interface ListSecretsResponse {
|
|
|
200
294
|
/** The token of the next page; empty on the last page. */
|
|
201
295
|
nextPageToken?: string;
|
|
202
296
|
}
|
|
297
|
+
/** The request of OpenProfile. */
|
|
298
|
+
export interface OpenProfileRequest {
|
|
299
|
+
/** The profile to mount. */
|
|
300
|
+
name: string;
|
|
301
|
+
/** READ_ONLY (the default) or WRITE_BACK. */
|
|
302
|
+
mode?: ProfileMountMode;
|
|
303
|
+
/** A version to mount; unset mounts the latest. */
|
|
304
|
+
version?: string;
|
|
305
|
+
/**
|
|
306
|
+
* How long a WRITE_BACK attachment may commit; default 1 hour, at most 12
|
|
307
|
+
* hours. A lost session cannot write back after it.
|
|
308
|
+
*/
|
|
309
|
+
ttl?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Who mounts it, for the audit trail: for example `run`, `step`, `member`.
|
|
312
|
+
* At most 16 entries; keys and values are names, never values.
|
|
313
|
+
*/
|
|
314
|
+
context?: Record<string, string>;
|
|
315
|
+
}
|
|
316
|
+
/** The response of OpenProfile. */
|
|
317
|
+
export interface OpenProfileResponse {
|
|
318
|
+
/** The attachment this mount is recorded as; `:commit` takes it. */
|
|
319
|
+
attachment?: string;
|
|
320
|
+
/** The version mounted; empty when the profile has none yet. */
|
|
321
|
+
version?: string;
|
|
322
|
+
/** The mode granted. */
|
|
323
|
+
mode?: ProfileMountMode;
|
|
324
|
+
/**
|
|
325
|
+
* The profile's state: for a `browser` profile the Playwright
|
|
326
|
+
* `storageState` JSON document, for a `computer` profile the archive of its
|
|
327
|
+
* declared paths. Empty when the profile has no version yet.
|
|
328
|
+
*/
|
|
329
|
+
state?: string;
|
|
330
|
+
/** When a WRITE_BACK attachment stops accepting commits. */
|
|
331
|
+
expireTime?: string;
|
|
332
|
+
/** The sites in the state and when each last changed. */
|
|
333
|
+
sites?: ProfileSite[];
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* A Profile is sign-in state a sandbox session mounts: a browser's cookies
|
|
337
|
+
* and storage per site, or a computer's application sign-ins. It is
|
|
338
|
+
* secret-like: every version is envelope-encrypted under a data key of its
|
|
339
|
+
* own profile, no read method returns a value, and mounting is a separate,
|
|
340
|
+
* audited permission (`secrets:mount`) granted per principal on the profile.
|
|
341
|
+
*/
|
|
342
|
+
export interface Profile {
|
|
343
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/profiles/{profile}`. */
|
|
344
|
+
name?: string;
|
|
345
|
+
/** `pfl_<cell><ulid>`. */
|
|
346
|
+
readonly uid?: string;
|
|
347
|
+
/** Resource metadata. */
|
|
348
|
+
meta?: common.ResourceMeta;
|
|
349
|
+
/** Desired state. */
|
|
350
|
+
spec?: ProfileSpec;
|
|
351
|
+
/** Observed state. */
|
|
352
|
+
readonly status?: ProfileStatus;
|
|
353
|
+
}
|
|
354
|
+
/** A ProfileGrant lets one principal mount a profile in a mode. */
|
|
355
|
+
export interface ProfileGrant {
|
|
356
|
+
/**
|
|
357
|
+
* The Access principal, as its keys carry it (for example a service
|
|
358
|
+
* account's id).
|
|
359
|
+
*/
|
|
360
|
+
principal?: string;
|
|
361
|
+
/**
|
|
362
|
+
* The most it may mount: READ_ONLY, or WRITE_BACK (which includes
|
|
363
|
+
* READ_ONLY).
|
|
364
|
+
*/
|
|
365
|
+
mode?: ProfileMountMode;
|
|
366
|
+
}
|
|
367
|
+
/** A ProfileSite names one site of a profile, never its values. */
|
|
368
|
+
export interface ProfileSite {
|
|
369
|
+
/**
|
|
370
|
+
* The registrable domain (eTLD+1), for example `example.com`; for a
|
|
371
|
+
* `computer` profile, one declared path.
|
|
372
|
+
*/
|
|
373
|
+
readonly site?: string;
|
|
374
|
+
/** When this site's record last changed. */
|
|
375
|
+
readonly updateTime?: string;
|
|
376
|
+
}
|
|
377
|
+
/** ProfileSpec is the caller-writable state of a Profile. */
|
|
378
|
+
export interface ProfileSpec {
|
|
379
|
+
/** What the profile holds. */
|
|
380
|
+
kind?: ProfileKind;
|
|
381
|
+
/**
|
|
382
|
+
* Who may mount it and how. A principal with no grant cannot mount it,
|
|
383
|
+
* whatever its scopes.
|
|
384
|
+
*/
|
|
385
|
+
grants?: ProfileGrant[];
|
|
386
|
+
/**
|
|
387
|
+
* For a `computer` profile: the paths under the sandbox's home directory
|
|
388
|
+
* its archive holds, for example `.config/app`.
|
|
389
|
+
*/
|
|
390
|
+
paths?: string[];
|
|
391
|
+
}
|
|
392
|
+
/** ProfileStatus is the observed state of a Profile. */
|
|
393
|
+
export interface ProfileStatus {
|
|
394
|
+
/** The generation this status was computed from. */
|
|
395
|
+
readonly observedGeneration?: string;
|
|
396
|
+
/** Ready. */
|
|
397
|
+
readonly conditions?: common.Condition[];
|
|
398
|
+
/** The newest version; empty until the first write-back. */
|
|
399
|
+
readonly latestVersion?: string;
|
|
400
|
+
/** The sites of the latest version and when each last changed. */
|
|
401
|
+
readonly sites?: ProfileSite[];
|
|
402
|
+
}
|
|
403
|
+
/** A ProfileVersion is one immutable, encrypted state of a Profile. */
|
|
404
|
+
export interface ProfileVersion {
|
|
405
|
+
/**
|
|
406
|
+
* `…/profiles/{profile}/profile_versions/{profile_version}`; the id is the
|
|
407
|
+
* version number, from 1.
|
|
408
|
+
*/
|
|
409
|
+
name?: string;
|
|
410
|
+
/** `pflv_<cell><ulid>`. */
|
|
411
|
+
readonly uid?: string;
|
|
412
|
+
/** Resource metadata. */
|
|
413
|
+
meta?: common.ResourceMeta;
|
|
414
|
+
/** The sites it holds and when each last changed. */
|
|
415
|
+
readonly sites?: ProfileSite[];
|
|
416
|
+
/** The version the write was based on; empty for a first write. */
|
|
417
|
+
readonly baseVersion?: string;
|
|
418
|
+
/**
|
|
419
|
+
* Set when another version landed after the base: that version, whose
|
|
420
|
+
* sites this one kept where this write did not change them.
|
|
421
|
+
*/
|
|
422
|
+
readonly conflictVersion?: string;
|
|
423
|
+
/** The size of the state, in bytes. */
|
|
424
|
+
readonly sizeBytes?: string;
|
|
425
|
+
}
|
|
203
426
|
/**
|
|
204
427
|
* A Secret is a named, versioned value that a third party accepts only as a
|
|
205
428
|
* bearer string. Its versions hold the values; its bindings deliver them.
|
|
@@ -312,6 +535,15 @@ export interface SecretVersion {
|
|
|
312
535
|
/** When the value was destroyed. */
|
|
313
536
|
readonly destroyTime?: string;
|
|
314
537
|
}
|
|
538
|
+
/** The request of UpdateProfile. */
|
|
539
|
+
export interface UpdateProfileRequest {
|
|
540
|
+
/** The profile to update; `name` identifies it. */
|
|
541
|
+
profile: Profile;
|
|
542
|
+
/** The fields to write (`spec.grants`, `spec.paths`); unset writes both. */
|
|
543
|
+
updateMask?: string;
|
|
544
|
+
/** Validate and return the result without writing anything. */
|
|
545
|
+
validateOnly?: boolean;
|
|
546
|
+
}
|
|
315
547
|
/** The request of UpdateSecretBinding. */
|
|
316
548
|
export interface UpdateSecretBindingRequest {
|
|
317
549
|
/** The secret binding to update; `name` identifies it. */
|
|
@@ -330,6 +562,10 @@ export interface UpdateSecretRequest {
|
|
|
330
562
|
/** Validate and return the result without writing anything. */
|
|
331
563
|
validateOnly?: boolean;
|
|
332
564
|
}
|
|
565
|
+
/** ProfileKind is what a Profile holds. */
|
|
566
|
+
export type ProfileKind = 'browser' | 'computer' | (string & {});
|
|
567
|
+
/** ProfileMountMode is how a session mounts a Profile. */
|
|
568
|
+
export type ProfileMountMode = 'read_only' | 'write_back' | (string & {});
|
|
333
569
|
/** SecretVersionState is the lifecycle state of a SecretVersion. */
|
|
334
570
|
export type SecretVersionState = 'enabled' | 'disabled' | 'destroyed' | (string & {});
|
|
335
571
|
/**
|
|
@@ -346,6 +582,10 @@ export declare class SecretsApi {
|
|
|
346
582
|
readonly secretVersions: SecretVersionsCollection;
|
|
347
583
|
/** The `secret_bindings` collection. */
|
|
348
584
|
readonly secretBindings: SecretBindingsCollection;
|
|
585
|
+
/** The `profiles` collection. */
|
|
586
|
+
readonly profiles: ProfilesCollection;
|
|
587
|
+
/** The `profile_versions` collection. */
|
|
588
|
+
readonly profileVersions: ProfileVersionsCollection;
|
|
349
589
|
constructor(client: runtime.Client);
|
|
350
590
|
}
|
|
351
591
|
/** `secrets` of Sylphx Secrets: Resource type `secrets.sylphx.com/Secret`. */
|
|
@@ -506,3 +746,99 @@ export declare class SecretBindingsCollection {
|
|
|
506
746
|
*/
|
|
507
747
|
delete(request: DeleteSecretBindingRequest): Promise<Record<string, never>>;
|
|
508
748
|
}
|
|
749
|
+
/** `profiles` of Sylphx Secrets: Resource type `secrets.sylphx.com/Profile`. */
|
|
750
|
+
export declare class ProfilesCollection {
|
|
751
|
+
private readonly client;
|
|
752
|
+
constructor(client: runtime.Client);
|
|
753
|
+
/**
|
|
754
|
+
* Gets a profile: its kind, grants, sites and latest version; never a value.
|
|
755
|
+
*
|
|
756
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/profiles/*}` · permission `secrets:read` · effect `read`
|
|
757
|
+
*
|
|
758
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
759
|
+
*/
|
|
760
|
+
get(request: GetProfileRequest): Promise<Profile>;
|
|
761
|
+
/**
|
|
762
|
+
* Lists the profiles of an environment.
|
|
763
|
+
*
|
|
764
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/profiles` · permission `secrets:read` · effect `read`
|
|
765
|
+
*
|
|
766
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
767
|
+
*/
|
|
768
|
+
list(request: ListProfilesRequest): Promise<ListProfilesResponse>;
|
|
769
|
+
/** Every item of every page of `list`. */
|
|
770
|
+
listAll(request: ListProfilesRequest): AsyncGenerator<Profile>;
|
|
771
|
+
/**
|
|
772
|
+
* Creates an empty profile; its first version is written by a write-back
|
|
773
|
+
* mount (`:open` with WRITE_BACK, then `:commit`).
|
|
774
|
+
*
|
|
775
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/profiles` · permission `secrets:write` · effect `write`
|
|
776
|
+
*
|
|
777
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
778
|
+
*/
|
|
779
|
+
create(request: CreateProfileRequest): Promise<Profile>;
|
|
780
|
+
/**
|
|
781
|
+
* Updates a profile's grants or declared paths. Granting a mount is this
|
|
782
|
+
* call: nothing else adds a grant.
|
|
783
|
+
*
|
|
784
|
+
* `PATCH /v1/{profile.name=orgs/*\/projects/*\/envs/*\/profiles/*}` · permission `secrets:write` · effect `write`
|
|
785
|
+
*
|
|
786
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
787
|
+
*/
|
|
788
|
+
update(request: UpdateProfileRequest): Promise<Profile>;
|
|
789
|
+
/**
|
|
790
|
+
* Deletes a profile; with `force`, a profile that has versions too, which
|
|
791
|
+
* destroys every version.
|
|
792
|
+
*
|
|
793
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/profiles/*}` · permission `secrets:write` · effect `destructive`
|
|
794
|
+
*
|
|
795
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`.
|
|
796
|
+
*/
|
|
797
|
+
delete(request: DeleteProfileRequest): Promise<Record<string, never>>;
|
|
798
|
+
/**
|
|
799
|
+
* Mounts a profile for one session: returns the state of one version and,
|
|
800
|
+
* for WRITE_BACK, an attachment that `:commit` writes through until it
|
|
801
|
+
* expires. Every call is audited with the caller's context; the caller's
|
|
802
|
+
* principal needs a grant of at least the requested mode.
|
|
803
|
+
*
|
|
804
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/profiles/*}:open` · permission `secrets:mount` · effect `read`
|
|
805
|
+
*
|
|
806
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
|
|
807
|
+
*/
|
|
808
|
+
open(request: OpenProfileRequest): Promise<OpenProfileResponse>;
|
|
809
|
+
/**
|
|
810
|
+
* Writes a mounted profile back as a new version, by compare-and-set on the
|
|
811
|
+
* version the attachment was opened at (or last committed). When another
|
|
812
|
+
* write landed first, nothing is lost: the result is still a new version,
|
|
813
|
+
* merged site by site with the newer write winning, and marked as a
|
|
814
|
+
* conflict.
|
|
815
|
+
*
|
|
816
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/profiles/*}:commit` · permission `secrets:mount` · effect `write`
|
|
817
|
+
*
|
|
818
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
819
|
+
*/
|
|
820
|
+
commit(request: CommitProfileRequest): Promise<CommitProfileResponse>;
|
|
821
|
+
}
|
|
822
|
+
/** `profile_versions` of Sylphx Secrets: Resource type `secrets.sylphx.com/ProfileVersion`. */
|
|
823
|
+
export declare class ProfileVersionsCollection {
|
|
824
|
+
private readonly client;
|
|
825
|
+
constructor(client: runtime.Client);
|
|
826
|
+
/**
|
|
827
|
+
* Gets a profile version: its sites and lineage; never a value.
|
|
828
|
+
*
|
|
829
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/profiles/*\/profile_versions/*}` · permission `secrets:read` · effect `read`
|
|
830
|
+
*
|
|
831
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
832
|
+
*/
|
|
833
|
+
get(request: GetProfileVersionRequest): Promise<ProfileVersion>;
|
|
834
|
+
/**
|
|
835
|
+
* Lists a profile's versions, newest first.
|
|
836
|
+
*
|
|
837
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/profiles/*}/profile_versions` · permission `secrets:read` · effect `read`
|
|
838
|
+
*
|
|
839
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
840
|
+
*/
|
|
841
|
+
list(request: ListProfileVersionsRequest): Promise<ListProfileVersionsResponse>;
|
|
842
|
+
/** Every item of every page of `list`. */
|
|
843
|
+
listAll(request: ListProfileVersionsRequest): AsyncGenerator<ProfileVersion>;
|
|
844
|
+
}
|