@aperture-browser/api-client 0.0.0-init.0 → 0.0.0-nightly.100.78b4e7ef6edc
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 +113 -12
- package/dist/index.d.ts +636 -404
- package/dist/index.js +533 -77
- package/dist/index.js.map +1 -1
- package/dist/passkeys.d.ts +30 -0
- package/dist/passkeys.js +54 -0
- package/dist/passkeys.js.map +1 -0
- package/dist/service-DbyEmdKS.d.ts +406 -0
- package/dist/service-riqZPQHq.js +8 -0
- package/dist/service-riqZPQHq.js.map +1 -0
- package/package.json +15 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,264 +1,15 @@
|
|
|
1
|
+
import { $ as LoginMethods, A as SessionFileEntry, B as Snapshot, C as ResourceGrant, Ct as ApiRequestError, D as SessionDirectory, E as Session, F as SessionRecordingEditError, G as TenantMembership, H as SnapshotsPage, I as SessionStatus, J as TokensPage, K as TenantScope, L as SessionsBulkResponse, M as SessionMutationResponse, N as SessionProxy, O as SessionFile, P as SessionRecording, Q as UsersPage, R as SessionsPage, S as ResourceEvent, St as ApiErrorBody, T as Scope, Tt as toApiRequestError, U as TargetViewport, V as SnapshotMutationResponse, W as Tenant, X as User, Y as UpdateProxyConfig, Z as UserInvitation, _ as PageMeta, _t as Authorization, a as AuditEventsPage, at as OAuthRedirect, b as ProxyRule, bt as resolveTenantHeader, c as AuthMeTenant, ct as PasskeyMutation, d as CreateSessionResponse, dt as PasswordLoginResponse, et as OAuthApproval, f as CreateTokenResponse, ft as RecoveryCodes, g as IceServer, gt as ApiCredentials, h as Health, ht as ApiAuthorization, i as AuditEvent, it as OAuthGrants, j as SessionMedia, k as SessionFileDownloadURL, l as BrowserChannel, lt as PasskeyRegistrationOptions, m as EventsPage, mt as TOTPEnrollment, n as PasskeyCredentialJSON, nt as OAuthClient, o as AuthMePrincipal, ot as Passkey, p as CursorVisibility, pt as SecurityStatus, q as TenantsPage, r as ApiToken, rt as OAuthGrant, s as AuthMeResponse, st as PasskeyLoginOptions, t as AuthApi, tt as OAuthAuthorizationRequest, u as BrowserChannelsResponse, ut as Passkeys, v as PromoteSessionResponse, vt as TENANT_HEADER, w as ResourceMode, wt as LiveSessionErrorBody, x as ProxyUpstream, xt as webSessionCredentials, y as ProxyConfig, yt as TenantHeaderMode, z as SetViewportInput } from "./service-DbyEmdKS.js";
|
|
1
2
|
import * as Effect from "effect/Effect";
|
|
2
3
|
import * as Layer from "effect/Layer";
|
|
3
|
-
import * as HttpClient from "effect/
|
|
4
|
+
import * as HttpClient from "effect/http/HttpClient";
|
|
4
5
|
import * as Api from "@aperture-browser/api-schema";
|
|
5
6
|
import * as Context from "effect/Context";
|
|
6
7
|
import * as Schema from "effect/Schema";
|
|
8
|
+
import * as Redacted from "effect/Redacted";
|
|
7
9
|
import * as Stream from "effect/Stream";
|
|
8
|
-
import * as HttpClientError from "effect/
|
|
9
|
-
import
|
|
10
|
+
import * as HttpClientError from "effect/http/HttpClientError";
|
|
11
|
+
import * as Option from "effect/Option";
|
|
10
12
|
|
|
11
|
-
//#region src/errors.d.ts
|
|
12
|
-
declare const ApiErrorBody: Schema.Struct<{
|
|
13
|
-
readonly error: Schema.Struct<{
|
|
14
|
-
readonly code: Schema.String;
|
|
15
|
-
readonly message: Schema.String;
|
|
16
|
-
}>;
|
|
17
|
-
}>;
|
|
18
|
-
type ApiErrorBody = typeof ApiErrorBody.Type;
|
|
19
|
-
declare const ApiRequestError_base: Schema.Class<ApiRequestError, Schema.TaggedStruct<"ApiRequestError", {
|
|
20
|
-
readonly code: Schema.String;
|
|
21
|
-
readonly message: Schema.String;
|
|
22
|
-
readonly status: Schema.Number;
|
|
23
|
-
}>, import("effect/Cause").YieldableError>;
|
|
24
|
-
/**
|
|
25
|
-
* A failed API request. `code` and `message` come from the server's error body when it
|
|
26
|
-
* sent one; `status` is 0 when no HTTP status applies.
|
|
27
|
-
*/
|
|
28
|
-
declare class ApiRequestError extends ApiRequestError_base {}
|
|
29
|
-
/**
|
|
30
|
-
* Maps HTTP and decoding failures to ApiRequestError. Error responses keep the code and
|
|
31
|
-
* message of the server's error body.
|
|
32
|
-
*/
|
|
33
|
-
declare const toApiRequestError: <A, R>(self: Effect.Effect<A, HttpClientError.HttpClientError | Schema.SchemaError, R>) => Effect.Effect<A, ApiRequestError, R>;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/authorization/service.d.ts
|
|
36
|
-
declare const TENANT_HEADER = "X-Aperture-Tenant-Id";
|
|
37
|
-
interface CredentialContext {
|
|
38
|
-
authorityType: "system_admin" | "tenant" | null;
|
|
39
|
-
tenantId: string | null;
|
|
40
|
-
selectedTenantId: string | null;
|
|
41
|
-
}
|
|
42
|
-
type ApiCredentials = (CredentialContext & {
|
|
43
|
-
kind: "bearer";
|
|
44
|
-
token: string;
|
|
45
|
-
}) | (CredentialContext & {
|
|
46
|
-
kind: "session";
|
|
47
|
-
});
|
|
48
|
-
/** The browser's own login session, sent as a cookie. */
|
|
49
|
-
declare const webSessionCredentials: ApiCredentials;
|
|
50
|
-
type TenantHeaderMode = "none" | "optional" | "tenant-scoped";
|
|
51
|
-
/** Which tenant, if any, a request acts for under the given credentials. */
|
|
52
|
-
declare function resolveTenantHeader(credentials: ApiCredentials, mode: TenantHeaderMode): string | undefined;
|
|
53
|
-
/** How a request authenticates, and which tenant it acts for. */
|
|
54
|
-
interface Authorization {
|
|
55
|
-
readonly credentials?: ApiCredentials;
|
|
56
|
-
readonly bearerToken?: string;
|
|
57
|
-
readonly tenantHeader?: TenantHeaderMode;
|
|
58
|
-
}
|
|
59
|
-
declare const Authorization: {
|
|
60
|
-
anonymous: Authorization;
|
|
61
|
-
webSession: Authorization;
|
|
62
|
-
of: (credentials: ApiCredentials) => Authorization;
|
|
63
|
-
tenantScoped: (credentials: ApiCredentials) => Authorization;
|
|
64
|
-
};
|
|
65
|
-
declare const ApiAuthorization_base: Context.ServiceClass<ApiAuthorization, "@aperture-browser/api-client/ApiAuthorization", {
|
|
66
|
-
/** Runs a call with the given authorization and maps its failures to ApiRequestError. */readonly authorize: (authorization: Authorization) => <A, R>(self: Effect.Effect<A, HttpClientError.HttpClientError | Schema.SchemaError, R>) => Effect.Effect<A, ApiRequestError, R>; /** Emits whenever the web session is found to be missing, expired or revoked. */
|
|
67
|
-
readonly sessionAuthenticationFailures: Stream.Stream<void>;
|
|
68
|
-
}>;
|
|
69
|
-
/**
|
|
70
|
-
* Authenticates API calls. Inside `authorize`, every request sent through the HttpClient
|
|
71
|
-
* that `authorizedHttpClientLayer` provides carries that call's credentials and tenant, so
|
|
72
|
-
* callers never touch headers.
|
|
73
|
-
*/
|
|
74
|
-
declare class ApiAuthorization extends ApiAuthorization_base {}
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/schemas.d.ts
|
|
77
|
-
type PageMeta = Api.PageMeta;
|
|
78
|
-
type Tenant = Api.Tenant;
|
|
79
|
-
type User = Api.User;
|
|
80
|
-
type UserInvitation = Api.UserInvitation;
|
|
81
|
-
type TenantMembership = Api.TenantMembership;
|
|
82
|
-
type AuthMeResponse = Api.AuthMe;
|
|
83
|
-
type AuthMePrincipal = Api.Principal;
|
|
84
|
-
type AuthMeTenant = Api.Tenant;
|
|
85
|
-
type ResourceMode = Api.ResourceMode;
|
|
86
|
-
type ResourceGrant = Api.ResourceGrant;
|
|
87
|
-
type Scope = Api.Scope;
|
|
88
|
-
type TenantScope = Api.TenantScope;
|
|
89
|
-
type Session = Api.Session;
|
|
90
|
-
type SessionMedia = Api.SessionMedia;
|
|
91
|
-
type IceServer = Api.IceServer;
|
|
92
|
-
declare const SessionStatus: import("effect/Schema").Literals<readonly ["creating", "running", "suspended", "deleted", "expired", "failed"]>;
|
|
93
|
-
type SessionStatus = Api.SessionStatus;
|
|
94
|
-
type Snapshot = Api.Snapshot;
|
|
95
|
-
type ApiToken = Api.Token;
|
|
96
|
-
type TenantsPage = Api.TenantPage;
|
|
97
|
-
type UsersPage = Api.UserPage;
|
|
98
|
-
type SessionsPage = Api.SessionPage;
|
|
99
|
-
type SessionsBulkResponse = Api.SessionBulkResponse;
|
|
100
|
-
type SnapshotsPage = Api.SnapshotPage;
|
|
101
|
-
type TokensPage = Api.TokenPage;
|
|
102
|
-
type BrowserChannel = Api.BrowserChannel;
|
|
103
|
-
type BrowserChannelsResponse = Api.BrowserChannels;
|
|
104
|
-
type ResourceEvent = Api.Event;
|
|
105
|
-
type EventsPage = Api.EventPage;
|
|
106
|
-
type CreateSessionResponse = Api.CreateSessionResult;
|
|
107
|
-
type SessionMutationResponse = Api.SessionMutation;
|
|
108
|
-
type SnapshotMutationResponse = Api.SnapshotMutation;
|
|
109
|
-
type PromoteSessionResponse = Api.SnapshotMutation;
|
|
110
|
-
type CreateTokenResponse = Api.CreateTokenResponse;
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region src/auth/schemas.d.ts
|
|
113
|
-
declare const LoginMethods: Schema.Struct<{
|
|
114
|
-
readonly methods: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
115
|
-
readonly type: Schema.Literal<"password">;
|
|
116
|
-
}>, Schema.Struct<{
|
|
117
|
-
readonly type: Schema.Literal<"api_token">;
|
|
118
|
-
}>, Schema.Struct<{
|
|
119
|
-
readonly type: Schema.Literal<"passkey">;
|
|
120
|
-
}>, Schema.Struct<{
|
|
121
|
-
readonly type: Schema.Literal<"oidc">;
|
|
122
|
-
readonly id: Schema.String;
|
|
123
|
-
readonly name: Schema.String;
|
|
124
|
-
readonly loginUrl: Schema.String;
|
|
125
|
-
}>]>>;
|
|
126
|
-
}>;
|
|
127
|
-
declare const PasskeyLoginOptions: Schema.Struct<{
|
|
128
|
-
readonly publicKey: Schema.Struct<{
|
|
129
|
-
readonly challenge: Schema.String;
|
|
130
|
-
readonly timeout: Schema.optionalKey<Schema.Number>;
|
|
131
|
-
readonly rpId: Schema.optionalKey<Schema.String>;
|
|
132
|
-
readonly allowCredentials: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
133
|
-
readonly id: Schema.String;
|
|
134
|
-
readonly type: Schema.Literal<"public-key">;
|
|
135
|
-
readonly transports: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Literals<readonly ["ble", "cable", "hybrid", "internal", "nfc", "smart-card", "usb"]>>>>;
|
|
136
|
-
}>>>>;
|
|
137
|
-
readonly userVerification: Schema.optionalKey<Schema.Literals<readonly ["discouraged", "preferred", "required"]>>;
|
|
138
|
-
readonly hints: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Literals<readonly ["hybrid", "security-key", "client-device"]>>>>;
|
|
139
|
-
readonly extensions: Schema.optionalKey<Schema.Struct<{
|
|
140
|
-
readonly appid: Schema.optionalKey<Schema.String>;
|
|
141
|
-
readonly credProps: Schema.optionalKey<Schema.Boolean>;
|
|
142
|
-
readonly hmacCreateSecret: Schema.optionalKey<Schema.Boolean>;
|
|
143
|
-
readonly minPinLength: Schema.optionalKey<Schema.Boolean>;
|
|
144
|
-
}>>;
|
|
145
|
-
}>;
|
|
146
|
-
}>;
|
|
147
|
-
declare const PasskeyRegistrationOptions: Schema.Struct<{
|
|
148
|
-
readonly publicKey: Schema.Struct<{
|
|
149
|
-
readonly rp: Schema.Struct<{
|
|
150
|
-
readonly id: Schema.optionalKey<Schema.String>;
|
|
151
|
-
readonly name: Schema.String;
|
|
152
|
-
}>;
|
|
153
|
-
readonly user: Schema.Struct<{
|
|
154
|
-
readonly id: Schema.String;
|
|
155
|
-
readonly name: Schema.String;
|
|
156
|
-
readonly displayName: Schema.String;
|
|
157
|
-
}>;
|
|
158
|
-
readonly challenge: Schema.String;
|
|
159
|
-
readonly pubKeyCredParams: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
160
|
-
readonly alg: Schema.Literals<readonly [-7, -8, -35, -36, -37, -38, -39, -257, -258, -259]>;
|
|
161
|
-
readonly type: Schema.Literal<"public-key">;
|
|
162
|
-
}>>>;
|
|
163
|
-
readonly timeout: Schema.optionalKey<Schema.Number>;
|
|
164
|
-
readonly excludeCredentials: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
165
|
-
readonly id: Schema.String;
|
|
166
|
-
readonly type: Schema.Literal<"public-key">;
|
|
167
|
-
readonly transports: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Literals<readonly ["ble", "cable", "hybrid", "internal", "nfc", "smart-card", "usb"]>>>>;
|
|
168
|
-
}>>>>;
|
|
169
|
-
readonly authenticatorSelection: Schema.optionalKey<Schema.Struct<{
|
|
170
|
-
readonly authenticatorAttachment: Schema.optionalKey<Schema.Literals<readonly ["platform", "cross-platform"]>>;
|
|
171
|
-
readonly requireResidentKey: Schema.optionalKey<Schema.Boolean>;
|
|
172
|
-
readonly residentKey: Schema.optionalKey<Schema.Literals<readonly ["discouraged", "preferred", "required"]>>;
|
|
173
|
-
readonly userVerification: Schema.optionalKey<Schema.Literals<readonly ["discouraged", "preferred", "required"]>>;
|
|
174
|
-
}>>;
|
|
175
|
-
readonly hints: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Literals<readonly ["hybrid", "security-key", "client-device"]>>>>;
|
|
176
|
-
readonly attestation: Schema.optionalKey<Schema.Literals<readonly ["direct", "enterprise", "indirect", "none"]>>;
|
|
177
|
-
readonly attestationFormats: Schema.optionalKey<Schema.mutable<Schema.$Array<Schema.Literals<readonly ["fido-u2f", "packed", "android-safetynet", "android-key", "tpm", "apple", "none"]>>>>;
|
|
178
|
-
readonly extensions: Schema.optionalKey<Schema.Struct<{
|
|
179
|
-
readonly appid: Schema.optionalKey<Schema.String>;
|
|
180
|
-
readonly credProps: Schema.optionalKey<Schema.Boolean>;
|
|
181
|
-
readonly hmacCreateSecret: Schema.optionalKey<Schema.Boolean>;
|
|
182
|
-
readonly minPinLength: Schema.optionalKey<Schema.Boolean>;
|
|
183
|
-
}>>;
|
|
184
|
-
}>;
|
|
185
|
-
}>;
|
|
186
|
-
declare const Passkey: Schema.Struct<{
|
|
187
|
-
readonly id: Schema.String;
|
|
188
|
-
readonly name: Schema.String;
|
|
189
|
-
readonly createdAt: Schema.String;
|
|
190
|
-
readonly lastUsedAt: Schema.NullOr<Schema.String>;
|
|
191
|
-
}>;
|
|
192
|
-
declare const Passkeys: Schema.Struct<{
|
|
193
|
-
readonly passkeys: Schema.$Array<Schema.Struct<{
|
|
194
|
-
readonly id: Schema.String;
|
|
195
|
-
readonly name: Schema.String;
|
|
196
|
-
readonly createdAt: Schema.String;
|
|
197
|
-
readonly lastUsedAt: Schema.NullOr<Schema.String>;
|
|
198
|
-
}>>;
|
|
199
|
-
}>;
|
|
200
|
-
declare const PasskeyMutation: Schema.Struct<{
|
|
201
|
-
readonly passkey: Schema.Struct<{
|
|
202
|
-
readonly id: Schema.String;
|
|
203
|
-
readonly name: Schema.String;
|
|
204
|
-
readonly createdAt: Schema.String;
|
|
205
|
-
readonly lastUsedAt: Schema.NullOr<Schema.String>;
|
|
206
|
-
}>;
|
|
207
|
-
}>;
|
|
208
|
-
declare const PasswordLoginResponse: Schema.Struct<{
|
|
209
|
-
readonly mfaRequired: Schema.Boolean;
|
|
210
|
-
}>;
|
|
211
|
-
declare const SecurityStatus: Schema.Struct<{
|
|
212
|
-
readonly hasPassword: Schema.Boolean;
|
|
213
|
-
readonly totpEnabled: Schema.Boolean;
|
|
214
|
-
readonly recoveryCodesRemaining: Schema.Number;
|
|
215
|
-
}>;
|
|
216
|
-
declare const TOTPEnrollment: Schema.Struct<{
|
|
217
|
-
readonly secret: Schema.String;
|
|
218
|
-
readonly otpauthUrl: Schema.String;
|
|
219
|
-
readonly qrCodeDataUrl: Schema.String;
|
|
220
|
-
}>;
|
|
221
|
-
declare const RecoveryCodes: Schema.Struct<{
|
|
222
|
-
readonly recoveryCodes: Schema.$Array<Schema.String>;
|
|
223
|
-
}>;
|
|
224
|
-
type LoginMethods = typeof LoginMethods.Type;
|
|
225
|
-
type PasskeyLoginOptions = typeof PasskeyLoginOptions.Type;
|
|
226
|
-
type PasskeyRegistrationOptions = typeof PasskeyRegistrationOptions.Type;
|
|
227
|
-
type Passkey = typeof Passkey.Type;
|
|
228
|
-
type Passkeys = typeof Passkeys.Type;
|
|
229
|
-
type PasskeyMutation = typeof PasskeyMutation.Type;
|
|
230
|
-
type PasswordLoginResponse = typeof PasswordLoginResponse.Type;
|
|
231
|
-
type RecoveryCodes = typeof RecoveryCodes.Type;
|
|
232
|
-
type SecurityStatus = typeof SecurityStatus.Type;
|
|
233
|
-
type TOTPEnrollment = typeof TOTPEnrollment.Type;
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region src/auth/service.d.ts
|
|
236
|
-
type Call$5<A> = Effect.Effect<A, ApiRequestError>;
|
|
237
|
-
declare const AuthApi_base: Context.ServiceClass<AuthApi, "@aperture-browser/api-client/AuthApi", {
|
|
238
|
-
readonly listLoginMethods: () => Call$5<LoginMethods>;
|
|
239
|
-
readonly loginWithPassword: (email: string, password: string) => Call$5<PasswordLoginResponse>;
|
|
240
|
-
readonly completePasswordMFA: (code: string) => Call$5<void>;
|
|
241
|
-
readonly loginWithAPIToken: (token: string) => Call$5<void>;
|
|
242
|
-
readonly beginPasskeyLogin: () => Call$5<PasskeyLoginOptions>;
|
|
243
|
-
readonly finishPasskeyLogin: (credential: AuthenticationResponseJSON) => Call$5<void>;
|
|
244
|
-
readonly acceptUserInvitation: (token: string, password: string) => Call$5<void>;
|
|
245
|
-
readonly logoutWebSession: () => Call$5<void>;
|
|
246
|
-
readonly getAuthMe: (selectedTenantId?: string | null, credentials?: ApiCredentials) => Call$5<AuthMeResponse>;
|
|
247
|
-
readonly getSecurityStatus: () => Call$5<SecurityStatus>;
|
|
248
|
-
readonly setPassword: (currentPassword: string, newPassword: string) => Call$5<void>;
|
|
249
|
-
readonly listPasskeys: () => Call$5<Passkeys>;
|
|
250
|
-
readonly beginPasskeyRegistration: (name: string) => Call$5<PasskeyRegistrationOptions>;
|
|
251
|
-
readonly finishPasskeyRegistration: (credential: RegistrationResponseJSON) => Call$5<PasskeyMutation>;
|
|
252
|
-
readonly renamePasskey: (passkeyId: string, name: string) => Call$5<PasskeyMutation>;
|
|
253
|
-
readonly deletePasskey: (passkeyId: string) => Call$5<void>;
|
|
254
|
-
readonly beginTOTPEnrollment: () => Call$5<TOTPEnrollment>;
|
|
255
|
-
readonly completeTOTPEnrollment: (code: string) => Call$5<RecoveryCodes>;
|
|
256
|
-
readonly regenerateRecoveryCodes: (code: string) => Call$5<RecoveryCodes>;
|
|
257
|
-
readonly disableTOTP: (code: string) => Call$5<void>;
|
|
258
|
-
}>;
|
|
259
|
-
/** Browser login, account security, and the current principal. */
|
|
260
|
-
declare class AuthApi extends AuthApi_base {}
|
|
261
|
-
//#endregion
|
|
262
13
|
//#region src/auth/layer.d.ts
|
|
263
14
|
declare const makeAuthApi: Effect.Effect<{
|
|
264
15
|
readonly listLoginMethods: () => Effect.Effect<{
|
|
@@ -300,7 +51,7 @@ declare const makeAuthApi: Effect.Effect<{
|
|
|
300
51
|
} | undefined;
|
|
301
52
|
};
|
|
302
53
|
}, ApiRequestError, never>;
|
|
303
|
-
readonly finishPasskeyLogin: (credential:
|
|
54
|
+
readonly finishPasskeyLogin: (credential: PasskeyCredentialJSON) => Effect.Effect<void, ApiRequestError, never>;
|
|
304
55
|
readonly acceptUserInvitation: (token: string, password: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
305
56
|
readonly logoutWebSession: () => Effect.Effect<void, ApiRequestError, never>;
|
|
306
57
|
readonly getAuthMe: (selectedTenantId?: string | null, credentials?: ApiCredentials) => Effect.Effect<Api.AuthMe, ApiRequestError, never>;
|
|
@@ -357,7 +108,7 @@ declare const makeAuthApi: Effect.Effect<{
|
|
|
357
108
|
readonly attestationFormats?: ("none" | "fido-u2f" | "packed" | "android-safetynet" | "android-key" | "tpm" | "apple")[] | undefined;
|
|
358
109
|
};
|
|
359
110
|
}, ApiRequestError, never>;
|
|
360
|
-
readonly finishPasskeyRegistration: (credential:
|
|
111
|
+
readonly finishPasskeyRegistration: (credential: PasskeyCredentialJSON) => Effect.Effect<{
|
|
361
112
|
readonly passkey: {
|
|
362
113
|
readonly id: string;
|
|
363
114
|
readonly name: string;
|
|
@@ -386,8 +137,63 @@ declare const makeAuthApi: Effect.Effect<{
|
|
|
386
137
|
readonly recoveryCodes: readonly string[];
|
|
387
138
|
}, ApiRequestError, never>;
|
|
388
139
|
readonly disableTOTP: (code: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
389
|
-
|
|
390
|
-
|
|
140
|
+
readonly getOAuthAuthorization: (query: string) => Effect.Effect<{
|
|
141
|
+
readonly client: {
|
|
142
|
+
readonly id: string;
|
|
143
|
+
readonly name: string;
|
|
144
|
+
readonly uri: string | null;
|
|
145
|
+
readonly logoUri: string | null;
|
|
146
|
+
readonly kind: "registered" | "metadata_document";
|
|
147
|
+
};
|
|
148
|
+
readonly redirectUri: string;
|
|
149
|
+
readonly requestedScopes: readonly string[];
|
|
150
|
+
readonly user: {
|
|
151
|
+
readonly id: string;
|
|
152
|
+
readonly displayName: string;
|
|
153
|
+
readonly isSystemAdmin: boolean;
|
|
154
|
+
};
|
|
155
|
+
readonly tenants: readonly {
|
|
156
|
+
readonly id: string;
|
|
157
|
+
readonly displayName: string;
|
|
158
|
+
readonly scopes: readonly ("sessions:read" | "sessions:write" | "snapshots:read" | "snapshots:write" | "tenant:write")[];
|
|
159
|
+
}[];
|
|
160
|
+
readonly availableScopes: readonly ("sessions:read" | "sessions:write" | "snapshots:read" | "snapshots:write" | "tenant:write")[];
|
|
161
|
+
readonly canGrantSystemAdmin: boolean;
|
|
162
|
+
}, ApiRequestError, never>;
|
|
163
|
+
readonly approveOAuthAuthorization: (approval: OAuthApproval) => Effect.Effect<{
|
|
164
|
+
readonly redirectUrl: string;
|
|
165
|
+
}, ApiRequestError, never>;
|
|
166
|
+
readonly denyOAuthAuthorization: (query: string) => Effect.Effect<{
|
|
167
|
+
readonly redirectUrl: string;
|
|
168
|
+
}, ApiRequestError, never>;
|
|
169
|
+
readonly listOAuthGrants: () => Effect.Effect<{
|
|
170
|
+
readonly grants: readonly {
|
|
171
|
+
readonly id: string;
|
|
172
|
+
readonly client: {
|
|
173
|
+
readonly id: string;
|
|
174
|
+
readonly name: string;
|
|
175
|
+
readonly uri: string | null;
|
|
176
|
+
readonly logoUri: string | null;
|
|
177
|
+
readonly kind: "registered" | "metadata_document";
|
|
178
|
+
};
|
|
179
|
+
readonly authorityType: "system_admin" | "tenant";
|
|
180
|
+
readonly tenants: readonly {
|
|
181
|
+
readonly id: string;
|
|
182
|
+
readonly displayName: string;
|
|
183
|
+
}[];
|
|
184
|
+
readonly scopes: readonly string[];
|
|
185
|
+
readonly resourceMode: "all" | "allowlist";
|
|
186
|
+
readonly resourceGrants: readonly {
|
|
187
|
+
readonly resourceType: "session" | "snapshot";
|
|
188
|
+
readonly resourceId: string;
|
|
189
|
+
}[];
|
|
190
|
+
readonly createdAt: string;
|
|
191
|
+
readonly lastUsedAt: string | null;
|
|
192
|
+
}[];
|
|
193
|
+
}, ApiRequestError, never>;
|
|
194
|
+
readonly revokeOAuthGrant: (grantId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
195
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
196
|
+
declare const authApiLayer: Layer.Layer<AuthApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
391
197
|
//#endregion
|
|
392
198
|
//#region src/authorization/layer.d.ts
|
|
393
199
|
/**
|
|
@@ -401,50 +207,74 @@ declare const makeApiAuthorization: Effect.Effect<{
|
|
|
401
207
|
}, never, never>;
|
|
402
208
|
declare const apiAuthorizationLayer: Layer.Layer<ApiAuthorization, never, never>;
|
|
403
209
|
//#endregion
|
|
404
|
-
//#region src/events/service.d.ts
|
|
405
|
-
interface EventsListParams {
|
|
406
|
-
limit?: number;
|
|
407
|
-
cursor?: string;
|
|
408
|
-
resourceType?: string;
|
|
409
|
-
resourceId?: string;
|
|
410
|
-
}
|
|
411
|
-
declare const EventsApi_base: Context.ServiceClass<EventsApi, "@aperture-browser/api-client/EventsApi", {
|
|
412
|
-
readonly listEvents: (credentials: ApiCredentials, params?: EventsListParams) => Effect.Effect<EventsPage, ApiRequestError>;
|
|
413
|
-
}>;
|
|
414
|
-
/** The tenant's resource event log. */
|
|
415
|
-
declare class EventsApi extends EventsApi_base {}
|
|
416
|
-
//#endregion
|
|
417
|
-
//#region src/events/layer.d.ts
|
|
418
|
-
declare const makeEventsApi: Effect.Effect<{
|
|
419
|
-
readonly listEvents: (credentials: ApiCredentials, params?: EventsListParams) => Effect.Effect<EventsPage, ApiRequestError>;
|
|
420
|
-
}, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
421
|
-
declare const eventsApiLayer: Layer.Layer<EventsApi, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
422
|
-
//#endregion
|
|
423
|
-
//#region src/layer.d.ts
|
|
424
|
-
/**
|
|
425
|
-
* Every API service, sharing one ApiAuthorization. The services send requests through the
|
|
426
|
-
* HttpClient the app provides, decorated with each call's authorization.
|
|
427
|
-
*/
|
|
428
|
-
declare const apiClientLayer: Layer.Layer<AuthApi | ApiAuthorization | EventsApi | TenantsApi | UsersApi | SessionsApi | SnapshotsApi | TokensApi, never, HttpClient.HttpClient>;
|
|
429
|
-
type ApiServices = Layer.Success<typeof apiClientLayer>;
|
|
430
|
-
declare const baseUrlLayer: (baseUrl: string) => Layer.Layer<HttpClient.HttpClient, never, HttpClient.HttpClient>;
|
|
431
|
-
//#endregion
|
|
432
210
|
//#region src/pagination.d.ts
|
|
433
211
|
interface PaginatedResponse<T> {
|
|
434
212
|
readonly data: ReadonlyArray<T>;
|
|
435
213
|
readonly meta: PageMeta;
|
|
436
214
|
}
|
|
437
|
-
|
|
438
|
-
|
|
215
|
+
/** The opaque `nextCursor` of the previous page, sent along with the same filter. */
|
|
216
|
+
interface PageCursor {
|
|
439
217
|
cursor?: string;
|
|
440
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* The calls every cursor-paginated list exposes. The filter's `limit` is the page size.
|
|
221
|
+
* `list` fetches one page; `stream` fetches pages only as the stream is pulled; `listAll`
|
|
222
|
+
* collects every page.
|
|
223
|
+
*/
|
|
224
|
+
interface PaginatedList<Filter, T> {
|
|
225
|
+
readonly list: (credentials: ApiCredentials, params?: Filter & PageCursor) => Effect.Effect<PaginatedResponse<T>, ApiRequestError>;
|
|
226
|
+
readonly stream: (credentials: ApiCredentials, filter?: Filter) => Stream.Stream<T, ApiRequestError>;
|
|
227
|
+
readonly listAll: (credentials: ApiCredentials, filter?: Filter) => Effect.Effect<ReadonlyArray<T>, ApiRequestError>;
|
|
228
|
+
}
|
|
441
229
|
declare function getNextPageParam<T>(page: PaginatedResponse<T>): string | undefined;
|
|
442
230
|
declare function flattenInfinitePages<T>(pages: PaginatedResponse<T>[] | undefined): T[];
|
|
231
|
+
/**
|
|
232
|
+
* Derives `stream` and `listAll` from the call that fetches one page. That call must also
|
|
233
|
+
* accept a bare cursor, which every filter allows because all its fields are optional.
|
|
234
|
+
*/
|
|
235
|
+
declare function paginated<Filter, T>(list: (credentials: ApiCredentials, params?: (Filter & PageCursor) | PageCursor) => Effect.Effect<PaginatedResponse<T>, ApiRequestError>): PaginatedList<Filter, T>;
|
|
443
236
|
declare const defaultListLimit = 50;
|
|
444
237
|
declare const listQueryDefaults: {
|
|
445
238
|
readonly refetchOnWindowFocus: true;
|
|
446
239
|
};
|
|
447
240
|
//#endregion
|
|
241
|
+
//#region src/events/service.d.ts
|
|
242
|
+
interface EventsFilter {
|
|
243
|
+
limit?: number;
|
|
244
|
+
resourceType?: string;
|
|
245
|
+
resourceId?: string;
|
|
246
|
+
}
|
|
247
|
+
type EventsListParams = EventsFilter & PageCursor;
|
|
248
|
+
type EventsList = PaginatedList<EventsFilter, ResourceEvent>;
|
|
249
|
+
interface AuditEventsFilter {
|
|
250
|
+
limit?: number;
|
|
251
|
+
tenantId?: string;
|
|
252
|
+
actorType?: Api.PrincipalType;
|
|
253
|
+
actorId?: string;
|
|
254
|
+
action?: string;
|
|
255
|
+
resourceType?: string;
|
|
256
|
+
resourceId?: string;
|
|
257
|
+
}
|
|
258
|
+
type AuditEventsListParams = AuditEventsFilter & PageCursor;
|
|
259
|
+
type AuditEventsList = PaginatedList<AuditEventsFilter, AuditEvent>;
|
|
260
|
+
declare const EventsApi_base: Context.ServiceClass<EventsApi, "@aperture-browser/api-client/EventsApi", {
|
|
261
|
+
readonly listEvents: EventsList["list"];
|
|
262
|
+
readonly streamEvents: EventsList["stream"];
|
|
263
|
+
readonly listAllEvents: EventsList["listAll"];
|
|
264
|
+
readonly listAuditEvents: AuditEventsList["list"];
|
|
265
|
+
readonly streamAuditEvents: AuditEventsList["stream"];
|
|
266
|
+
readonly listAllAuditEvents: AuditEventsList["listAll"];
|
|
267
|
+
}>;
|
|
268
|
+
/** The tenant's resource event log, and the deployment-wide audit log. */
|
|
269
|
+
declare class EventsApi extends EventsApi_base {}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/health/service.d.ts
|
|
272
|
+
declare const HealthApi_base: Context.ServiceClass<HealthApi, "@aperture-browser/api-client/HealthApi", {
|
|
273
|
+
readonly getHealth: () => Effect.Effect<Health, ApiRequestError>;
|
|
274
|
+
}>;
|
|
275
|
+
/** The instance's unauthenticated health check. */
|
|
276
|
+
declare class HealthApi extends HealthApi_base {}
|
|
277
|
+
//#endregion
|
|
448
278
|
//#region src/query.d.ts
|
|
449
279
|
type TagFilterValue = Array<{
|
|
450
280
|
key: string;
|
|
@@ -461,7 +291,28 @@ declare const tagQuery: (tags: TagFilterValue | undefined) => {
|
|
|
461
291
|
declare const compactQuery: <T extends object>(query: T) => T;
|
|
462
292
|
//#endregion
|
|
463
293
|
//#region src/sessions/schemas.d.ts
|
|
464
|
-
declare const
|
|
294
|
+
declare const BrowserPage: Schema.Struct<{
|
|
295
|
+
readonly targetId: Schema.String;
|
|
296
|
+
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
297
|
+
readonly title: Schema.String;
|
|
298
|
+
readonly url: Schema.String;
|
|
299
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
300
|
+
readonly width: Schema.Number;
|
|
301
|
+
readonly height: Schema.Number;
|
|
302
|
+
readonly deviceScaleFactor: Schema.Number;
|
|
303
|
+
readonly contentWidth: Schema.Number;
|
|
304
|
+
readonly contentHeight: Schema.Number;
|
|
305
|
+
readonly canvasWidth: Schema.Number;
|
|
306
|
+
readonly canvasHeight: Schema.Number;
|
|
307
|
+
}>>;
|
|
308
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
309
|
+
}>;
|
|
310
|
+
/** Passive page discovery. Reading it never wakes or keeps a browser session alive. */
|
|
311
|
+
declare const BrowserStatus: Schema.Union<readonly [Schema.Struct<{
|
|
312
|
+
readonly status: Schema.Literal<"running">;
|
|
313
|
+
readonly source: Schema.Literal<"live">;
|
|
314
|
+
readonly capturedAt: Schema.String;
|
|
315
|
+
readonly representativeTargetId: Schema.optionalKey<Schema.String>;
|
|
465
316
|
readonly sessionId: Schema.String;
|
|
466
317
|
readonly cdpUrl: Schema.String;
|
|
467
318
|
readonly media: Schema.Struct<{
|
|
@@ -470,16 +321,16 @@ declare const BrowserStatus: Schema.Struct<{
|
|
|
470
321
|
readonly iceServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
471
322
|
readonly urls: Schema.$Array<Schema.String>;
|
|
472
323
|
readonly username: Schema.optionalKey<Schema.String>;
|
|
473
|
-
readonly credential: Schema.optionalKey<Schema.
|
|
324
|
+
readonly credential: Schema.optionalKey<Schema.suspend<Schema.Codec<Api.SensitiveString, string, never, never>>>;
|
|
474
325
|
}>>>;
|
|
475
326
|
}>;
|
|
476
|
-
readonly
|
|
327
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
328
|
+
readonly pages: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
|
|
477
329
|
readonly targetId: Schema.String;
|
|
478
|
-
readonly generation: Schema.Number;
|
|
479
330
|
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
480
331
|
readonly title: Schema.String;
|
|
481
332
|
readonly url: Schema.String;
|
|
482
|
-
readonly viewport: Schema.Struct<{
|
|
333
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
483
334
|
readonly width: Schema.Number;
|
|
484
335
|
readonly height: Schema.Number;
|
|
485
336
|
readonly deviceScaleFactor: Schema.Number;
|
|
@@ -487,37 +338,140 @@ declare const BrowserStatus: Schema.Struct<{
|
|
|
487
338
|
readonly contentHeight: Schema.Number;
|
|
488
339
|
readonly canvasWidth: Schema.Number;
|
|
489
340
|
readonly canvasHeight: Schema.Number;
|
|
490
|
-
}
|
|
341
|
+
}>>;
|
|
342
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
491
343
|
}>>, never>;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
344
|
+
}>, Schema.Struct<{
|
|
345
|
+
readonly status: Schema.Literal<"suspended">;
|
|
346
|
+
readonly source: Schema.Literal<"persisted">;
|
|
347
|
+
readonly capturedAt: Schema.String;
|
|
348
|
+
readonly representativeTargetId: Schema.optionalKey<Schema.String>;
|
|
349
|
+
readonly sessionId: Schema.String;
|
|
350
|
+
readonly cdpUrl: Schema.String;
|
|
351
|
+
readonly media: Schema.Struct<{
|
|
352
|
+
readonly mode: Schema.Literals<readonly ["auto", "cdp"]>;
|
|
353
|
+
readonly webrtcProducer: Schema.Boolean;
|
|
354
|
+
readonly iceServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
355
|
+
readonly urls: Schema.$Array<Schema.String>;
|
|
356
|
+
readonly username: Schema.optionalKey<Schema.String>;
|
|
357
|
+
readonly credential: Schema.optionalKey<Schema.suspend<Schema.Codec<Api.SensitiveString, string, never, never>>>;
|
|
358
|
+
}>>>;
|
|
359
|
+
}>;
|
|
360
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
361
|
+
readonly pages: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
|
|
362
|
+
readonly targetId: Schema.String;
|
|
363
|
+
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
364
|
+
readonly title: Schema.String;
|
|
365
|
+
readonly url: Schema.String;
|
|
366
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
367
|
+
readonly width: Schema.Number;
|
|
368
|
+
readonly height: Schema.Number;
|
|
369
|
+
readonly deviceScaleFactor: Schema.Number;
|
|
370
|
+
readonly contentWidth: Schema.Number;
|
|
371
|
+
readonly contentHeight: Schema.Number;
|
|
372
|
+
readonly canvasWidth: Schema.Number;
|
|
373
|
+
readonly canvasHeight: Schema.Number;
|
|
374
|
+
}>>;
|
|
375
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
376
|
+
}>>, never>;
|
|
377
|
+
}>, Schema.Struct<{
|
|
378
|
+
readonly status: Schema.Literal<"suspended">;
|
|
379
|
+
readonly source: Schema.Literal<"unavailable">;
|
|
380
|
+
readonly sessionId: Schema.String;
|
|
381
|
+
readonly cdpUrl: Schema.String;
|
|
382
|
+
readonly media: Schema.Struct<{
|
|
383
|
+
readonly mode: Schema.Literals<readonly ["auto", "cdp"]>;
|
|
384
|
+
readonly webrtcProducer: Schema.Boolean;
|
|
385
|
+
readonly iceServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
386
|
+
readonly urls: Schema.$Array<Schema.String>;
|
|
387
|
+
readonly username: Schema.optionalKey<Schema.String>;
|
|
388
|
+
readonly credential: Schema.optionalKey<Schema.suspend<Schema.Codec<Api.SensitiveString, string, never, never>>>;
|
|
389
|
+
}>>>;
|
|
390
|
+
}>;
|
|
391
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
392
|
+
readonly pages: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
|
|
393
|
+
readonly targetId: Schema.String;
|
|
394
|
+
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
395
|
+
readonly title: Schema.String;
|
|
396
|
+
readonly url: Schema.String;
|
|
397
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
398
|
+
readonly width: Schema.Number;
|
|
399
|
+
readonly height: Schema.Number;
|
|
400
|
+
readonly deviceScaleFactor: Schema.Number;
|
|
401
|
+
readonly contentWidth: Schema.Number;
|
|
402
|
+
readonly contentHeight: Schema.Number;
|
|
403
|
+
readonly canvasWidth: Schema.Number;
|
|
404
|
+
readonly canvasHeight: Schema.Number;
|
|
405
|
+
}>>;
|
|
406
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
407
|
+
}>>, never>;
|
|
408
|
+
}>]>;
|
|
409
|
+
/**
|
|
410
|
+
* A recording as the live session reports it. Sessions that are still running an
|
|
411
|
+
* older wrapper send only `path`, which decoding carries over into `relativePath`.
|
|
412
|
+
*/
|
|
413
|
+
declare const Recording: Schema.decodeTo<Schema.Struct<{
|
|
414
|
+
readonly relativePath: Schema.String;
|
|
495
415
|
readonly recordingId: Schema.String;
|
|
496
416
|
readonly mode: Schema.Literals<readonly ["tab", "viewer"]>;
|
|
497
417
|
readonly targetId: Schema.String;
|
|
498
418
|
readonly captureGeneration: Schema.Number;
|
|
499
419
|
readonly status: Schema.Literals<readonly ["starting", "running", "stopped", "failed"]>;
|
|
500
420
|
readonly stopReason: Schema.optionalKey<Schema.String>;
|
|
501
|
-
readonly
|
|
421
|
+
readonly sandboxPath: Schema.optionalKey<Schema.String>;
|
|
422
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
502
423
|
readonly startedAt: Schema.String;
|
|
503
424
|
readonly stoppedAt: Schema.optionalKey<Schema.String>;
|
|
504
425
|
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
505
426
|
readonly fps: Schema.Number;
|
|
506
427
|
readonly bitrateKbps: Schema.Number;
|
|
507
428
|
readonly codec: Schema.String;
|
|
508
|
-
|
|
429
|
+
readonly editing: Schema.Boolean;
|
|
430
|
+
readonly editedRelativePath: Schema.optionalKey<Schema.String>;
|
|
431
|
+
readonly timelineRelativePath: Schema.optionalKey<Schema.String>;
|
|
432
|
+
readonly editError: Schema.optionalKey<Schema.Struct<{
|
|
433
|
+
readonly code: Schema.Literals<readonly ["ffmpeg_unavailable", "open_failed", "nothing_kept", "analysis_failed", "plan_failed", "render_failed", "timeout", "cancelled", "timeline_failed"]>;
|
|
434
|
+
readonly message: Schema.String;
|
|
435
|
+
}>>;
|
|
436
|
+
}>, Schema.Struct<{
|
|
437
|
+
readonly relativePath: Schema.optionalKey<Schema.String>;
|
|
438
|
+
readonly recordingId: Schema.String;
|
|
439
|
+
readonly mode: Schema.Literals<readonly ["tab", "viewer"]>;
|
|
440
|
+
readonly targetId: Schema.String;
|
|
441
|
+
readonly captureGeneration: Schema.Number;
|
|
442
|
+
readonly status: Schema.Literals<readonly ["starting", "running", "stopped", "failed"]>;
|
|
443
|
+
readonly stopReason: Schema.optionalKey<Schema.String>;
|
|
444
|
+
readonly sandboxPath: Schema.optionalKey<Schema.String>;
|
|
445
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
446
|
+
readonly startedAt: Schema.String;
|
|
447
|
+
readonly stoppedAt: Schema.optionalKey<Schema.String>;
|
|
448
|
+
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
449
|
+
readonly fps: Schema.Number;
|
|
450
|
+
readonly bitrateKbps: Schema.Number;
|
|
451
|
+
readonly codec: Schema.String;
|
|
452
|
+
readonly editing: Schema.Boolean;
|
|
453
|
+
readonly editedRelativePath: Schema.optionalKey<Schema.String>;
|
|
454
|
+
readonly timelineRelativePath: Schema.optionalKey<Schema.String>;
|
|
455
|
+
readonly editError: Schema.optionalKey<Schema.Struct<{
|
|
456
|
+
readonly code: Schema.Literals<readonly ["ffmpeg_unavailable", "open_failed", "nothing_kept", "analysis_failed", "plan_failed", "render_failed", "timeout", "cancelled", "timeline_failed"]>;
|
|
457
|
+
readonly message: Schema.String;
|
|
458
|
+
}>>;
|
|
459
|
+
}>, never, never>;
|
|
509
460
|
type BrowserStatus = typeof BrowserStatus.Type;
|
|
461
|
+
type BrowserPage = typeof BrowserPage.Type;
|
|
510
462
|
type Recording = typeof Recording.Type;
|
|
511
463
|
//#endregion
|
|
512
464
|
//#region src/sessions/service.d.ts
|
|
513
465
|
type Call$4<A> = Effect.Effect<A, ApiRequestError>;
|
|
514
|
-
interface
|
|
466
|
+
interface SessionsFilter {
|
|
515
467
|
limit?: number;
|
|
516
|
-
cursor?: string;
|
|
517
468
|
includeDeleted?: boolean;
|
|
518
469
|
status?: Api.SessionStatus;
|
|
470
|
+
query?: string;
|
|
519
471
|
tags?: TagFilterValue;
|
|
520
472
|
}
|
|
473
|
+
type SessionsListParams = SessionsFilter & PageCursor;
|
|
474
|
+
type SessionsList = PaginatedList<SessionsFilter, Session>;
|
|
521
475
|
type InitialBrowserTarget = Api.InitialBrowserTarget;
|
|
522
476
|
type InitialBrowserStorageState = Api.InitialBrowserStorageState;
|
|
523
477
|
interface CreateSessionInput {
|
|
@@ -530,6 +484,7 @@ interface CreateSessionInput {
|
|
|
530
484
|
initialTargets?: readonly InitialBrowserTarget[];
|
|
531
485
|
storageState?: InitialBrowserStorageState;
|
|
532
486
|
tags?: Record<string, string>;
|
|
487
|
+
proxy?: ProxyConfig;
|
|
533
488
|
}
|
|
534
489
|
interface CreateSessionOptions {
|
|
535
490
|
waitForReady?: boolean;
|
|
@@ -540,13 +495,36 @@ interface PromoteSessionInput {
|
|
|
540
495
|
force?: boolean;
|
|
541
496
|
tags?: Record<string, string>;
|
|
542
497
|
}
|
|
498
|
+
type CreateSessionRecordingInput = Api.CreateSessionRecordingInput;
|
|
499
|
+
type SessionFileDownloadURLInput = Api.SessionFileDownloadURLInput;
|
|
543
500
|
interface DownloadedFile {
|
|
544
501
|
blob: Blob;
|
|
545
502
|
filename: string | null;
|
|
546
503
|
}
|
|
504
|
+
/**
|
|
505
|
+
* One file to upload. Blob and Uint8Array contents are sent as FormData. Any stream content
|
|
506
|
+
* makes the whole body a streamed request, which browsers other than Chromium cannot send;
|
|
507
|
+
* a stream failure aborts the upload and surfaces as a `network_error`.
|
|
508
|
+
*/
|
|
509
|
+
interface SessionUploadFile {
|
|
510
|
+
name: string;
|
|
511
|
+
content: Blob | Uint8Array | Stream.Stream<Uint8Array, unknown>;
|
|
512
|
+
}
|
|
513
|
+
interface UploadSessionFilesOptions {
|
|
514
|
+
/** Directory below the session files root; `uploads` when omitted. */
|
|
515
|
+
directory?: string;
|
|
516
|
+
}
|
|
517
|
+
type MoveSessionFileInput = Api.MoveSessionFileInput;
|
|
518
|
+
interface DeleteSessionFileOptions {
|
|
519
|
+
/** Delete a directory together with everything below it. */
|
|
520
|
+
recursive?: boolean;
|
|
521
|
+
}
|
|
547
522
|
declare const SessionsApi_base: Context.ServiceClass<SessionsApi, "@aperture-browser/api-client/SessionsApi", {
|
|
548
|
-
readonly listSessions:
|
|
549
|
-
readonly
|
|
523
|
+
readonly listSessions: SessionsList["list"];
|
|
524
|
+
readonly streamSessions: SessionsList["stream"];
|
|
525
|
+
readonly listAllSessions: SessionsList["listAll"];
|
|
526
|
+
readonly exportSessionStorageState: (credentials: ApiCredentials, sessionId: string, input: Api.ExportSessionStorageStateInput) => Call$4<Api.InitialBrowserStorageState>;
|
|
527
|
+
readonly getSession: (credentials: ApiCredentials, sessionId: string) => Call$4<Session>; /** Any number of IDs; the API takes 100 per request, so larger lists are sent in batches. */
|
|
550
528
|
readonly getSessionsBulk: (credentials: ApiCredentials, sessionIds: readonly string[]) => Call$4<SessionsBulkResponse>;
|
|
551
529
|
readonly createSession: (credentials: ApiCredentials, input: CreateSessionInput, options?: CreateSessionOptions) => Call$4<CreateSessionResponse>;
|
|
552
530
|
readonly deleteSession: (credentials: ApiCredentials, sessionId: string) => Call$4<SessionMutationResponse>;
|
|
@@ -554,77 +532,73 @@ declare const SessionsApi_base: Context.ServiceClass<SessionsApi, "@aperture-bro
|
|
|
554
532
|
readonly suspendSession: (credentials: ApiCredentials, sessionId: string) => Call$4<SessionMutationResponse>;
|
|
555
533
|
readonly rotateSessionToken: (credentials: ApiCredentials, sessionId: string) => Call$4<SessionMutationResponse>;
|
|
556
534
|
readonly rotateCollaborationCapability: (credentials: ApiCredentials, sessionId: string, role: "editor" | "viewer") => Call$4<SessionMutationResponse>;
|
|
557
|
-
readonly replaceSessionTags: (credentials: ApiCredentials, sessionId: string, tags: Record<string, string>) => Call$4<SessionMutationResponse>;
|
|
535
|
+
readonly replaceSessionTags: (credentials: ApiCredentials, sessionId: string, tags: Record<string, string>) => Call$4<SessionMutationResponse>; /** Replaces the session's egress proxy; new connections use it immediately. */
|
|
536
|
+
readonly updateSessionProxy: (credentials: ApiCredentials, sessionId: string, proxy: UpdateProxyConfig) => Call$4<SessionMutationResponse>;
|
|
558
537
|
readonly promoteSession: (credentials: ApiCredentials, sessionId: string, input: PromoteSessionInput) => Call$4<PromoteSessionResponse>;
|
|
559
|
-
readonly
|
|
560
|
-
readonly
|
|
561
|
-
readonly
|
|
538
|
+
readonly getSessionCursor: (credentials: ApiCredentials, sessionId: string) => Call$4<CursorVisibility>;
|
|
539
|
+
readonly setSessionCursor: (credentials: ApiCredentials, sessionId: string, visible: boolean) => Call$4<CursorVisibility>;
|
|
540
|
+
readonly listSessionRecordings: (credentials: ApiCredentials, sessionId: string) => Call$4<ReadonlyArray<SessionRecording>>;
|
|
541
|
+
readonly createSessionRecording: (credentials: ApiCredentials, sessionId: string, input: CreateSessionRecordingInput) => Call$4<SessionRecording>;
|
|
542
|
+
readonly getSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Call$4<SessionRecording>; /** Moves a running tab recording to another ready target. */
|
|
543
|
+
readonly retargetSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, targetId: string) => Call$4<SessionRecording>;
|
|
544
|
+
/**
|
|
545
|
+
* Stops a recording and returns it at once with its raw video published. The edit runs
|
|
546
|
+
* afterwards: the recording stays `editing` until `editedRelativePath` or `editError` is set,
|
|
547
|
+
* which `getSessionRecording` reports.
|
|
548
|
+
*/
|
|
549
|
+
readonly stopSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Call$4<SessionRecording>;
|
|
550
|
+
/**
|
|
551
|
+
* Every file and directory of the session, also while it is not running. See
|
|
552
|
+
* `sessionFileTree`.
|
|
553
|
+
*/
|
|
554
|
+
readonly listSessionFiles: (credentials: ApiCredentials, sessionId: string) => Call$4<ReadonlyArray<SessionFileEntry>>;
|
|
555
|
+
/**
|
|
556
|
+
* Stores files in a directory of the session's files, `uploads` by default, in any
|
|
557
|
+
* retained state. Contents are sent as described for `SessionUploadFile`.
|
|
558
|
+
*/
|
|
559
|
+
readonly uploadSessionFiles: (credentials: ApiCredentials, sessionId: string, files: ReadonlyArray<SessionUploadFile>, options?: UploadSessionFilesOptions) => Call$4<ReadonlyArray<SessionFile>>; /** Deletes one file, or a directory; a directory with entries needs `recursive`. */
|
|
560
|
+
readonly deleteSessionFile: (credentials: ApiCredentials, sessionId: string, relativePath: string, options?: DeleteSessionFileOptions) => Call$4<void>; /** Moves or renames one file or directory. It never replaces an existing entry. */
|
|
561
|
+
readonly moveSessionFile: (credentials: ApiCredentials, sessionId: string, input: MoveSessionFileInput) => Call$4<SessionFileEntry>; /** Creates a directory, with any missing parents. */
|
|
562
|
+
readonly createSessionDirectory: (credentials: ApiCredentials, sessionId: string, relativePath: string) => Call$4<SessionDirectory>;
|
|
563
|
+
/**
|
|
564
|
+
* A signed URL that serves one session file without credentials until it expires.
|
|
565
|
+
* `disposition: "inline"` makes it usable as an `<img>` or `<video>` source.
|
|
566
|
+
*/
|
|
567
|
+
readonly createSessionFileDownloadURL: (credentials: ApiCredentials, sessionId: string, input: SessionFileDownloadURLInput) => Call$4<SessionFileDownloadURL>;
|
|
568
|
+
readonly getBrowserChannels: (credentials: ApiCredentials) => Call$4<BrowserChannelsResponse>; /** Reads live or persisted page metadata without waking or keeping the session alive. */
|
|
569
|
+
readonly getBrowserStatus: (credentials: ApiCredentials, sessionId: string, sessionToken?: Redacted.Redacted<string>) => Call$4<BrowserStatus>;
|
|
570
|
+
readonly downloadSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Call$4<DownloadedFile>; /** A JPEG of the session, or of one tab when `targetId` is given. Never wakes a suspended session. */
|
|
571
|
+
readonly getSessionThumbnail: (credentials: ApiCredentials, sessionId: string, targetId?: string) => Call$4<Blob>; /** The recording's bytes as they arrive, for files too large to hold in memory. */
|
|
572
|
+
readonly streamSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Stream.Stream<Uint8Array, ApiRequestError>;
|
|
573
|
+
/**
|
|
574
|
+
* Stores files in the running session's `uploads` directory through the session itself,
|
|
575
|
+
* which also accepts its `sessionToken`.
|
|
576
|
+
*/
|
|
577
|
+
readonly uploadLiveSessionFiles: (credentials: ApiCredentials, sessionId: string, files: ReadonlyArray<SessionUploadFile>, sessionToken?: Redacted.Redacted<string>) => Call$4<ReadonlyArray<SessionFile>>; /** Resizes a top-level target of the running session and returns the applied viewport. */
|
|
578
|
+
readonly setSessionViewport: (credentials: ApiCredentials, sessionId: string, input: SetViewportInput, sessionToken?: Redacted.Redacted<string>) => Call$4<TargetViewport>;
|
|
562
579
|
}>;
|
|
563
580
|
/** Browser sessions, their live browser, and their recordings. */
|
|
564
581
|
declare class SessionsApi extends SessionsApi_base {}
|
|
565
582
|
//#endregion
|
|
566
|
-
//#region src/sessions/layer.d.ts
|
|
567
|
-
declare const makeSessionsApi: Effect.Effect<{
|
|
568
|
-
readonly listSessions: (credentials: ApiCredentials, params?: SessionsListParams) => Effect.Effect<Api.SessionPage, ApiRequestError, never>;
|
|
569
|
-
readonly getSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.Session, ApiRequestError, never>;
|
|
570
|
-
readonly getSessionsBulk: (credentials: ApiCredentials, sessionIds: readonly string[]) => Effect.Effect<Api.SessionBulkResponse, ApiRequestError, never>;
|
|
571
|
-
readonly createSession: (credentials: ApiCredentials, input: CreateSessionInput, options?: CreateSessionOptions) => Effect.Effect<Api.CreateSessionResult, ApiRequestError, never>;
|
|
572
|
-
readonly deleteSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
573
|
-
readonly reopenSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
574
|
-
readonly suspendSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
575
|
-
readonly rotateSessionToken: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
576
|
-
readonly rotateCollaborationCapability: (credentials: ApiCredentials, sessionId: string, role: "editor" | "viewer") => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
577
|
-
readonly replaceSessionTags: (credentials: ApiCredentials, sessionId: string, tags: Record<string, string>) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
578
|
-
readonly promoteSession: (credentials: ApiCredentials, sessionId: string, input: PromoteSessionInput) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
579
|
-
readonly getBrowserChannels: (credentials: ApiCredentials) => Effect.Effect<Api.BrowserChannels, ApiRequestError, never>;
|
|
580
|
-
readonly getBrowserStatus: (credentials: ApiCredentials, sessionId: string, sessionToken?: string) => Effect.Effect<{
|
|
581
|
-
readonly sessionId: string;
|
|
582
|
-
readonly cdpUrl: string;
|
|
583
|
-
readonly media: {
|
|
584
|
-
readonly mode: "auto" | "cdp";
|
|
585
|
-
readonly webrtcProducer: boolean;
|
|
586
|
-
readonly iceServers?: readonly {
|
|
587
|
-
readonly urls: readonly string[];
|
|
588
|
-
readonly username?: string | undefined;
|
|
589
|
-
readonly credential?: string | undefined;
|
|
590
|
-
}[] | undefined;
|
|
591
|
-
};
|
|
592
|
-
readonly targets: readonly {
|
|
593
|
-
readonly targetId: string;
|
|
594
|
-
readonly generation: number;
|
|
595
|
-
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
596
|
-
readonly title: string;
|
|
597
|
-
readonly url: string;
|
|
598
|
-
readonly viewport: {
|
|
599
|
-
readonly width: number;
|
|
600
|
-
readonly height: number;
|
|
601
|
-
readonly deviceScaleFactor: number;
|
|
602
|
-
readonly contentWidth: number;
|
|
603
|
-
readonly contentHeight: number;
|
|
604
|
-
readonly canvasWidth: number;
|
|
605
|
-
readonly canvasHeight: number;
|
|
606
|
-
};
|
|
607
|
-
}[];
|
|
608
|
-
}, ApiRequestError, never>;
|
|
609
|
-
readonly downloadSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: string) => Effect.Effect<DownloadedFile, ApiRequestError, never>;
|
|
610
|
-
}, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
611
|
-
declare const sessionsApiLayer: Layer.Layer<SessionsApi, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
612
|
-
//#endregion
|
|
613
583
|
//#region src/snapshots/service.d.ts
|
|
614
584
|
type Call$3<A> = Effect.Effect<A, ApiRequestError>;
|
|
615
|
-
interface
|
|
585
|
+
interface SnapshotsFilter {
|
|
616
586
|
limit?: number;
|
|
617
|
-
cursor?: string;
|
|
618
587
|
includeDeleted?: boolean;
|
|
619
588
|
deleted?: "active" | "deleted" | "all";
|
|
620
589
|
name?: string;
|
|
621
590
|
tags?: TagFilterValue;
|
|
622
591
|
}
|
|
592
|
+
type SnapshotsListParams = SnapshotsFilter & PageCursor;
|
|
593
|
+
type SnapshotsList = PaginatedList<SnapshotsFilter, Snapshot>;
|
|
623
594
|
interface UpdateSnapshotInput {
|
|
624
595
|
description: string | null;
|
|
625
596
|
}
|
|
626
597
|
declare const SnapshotsApi_base: Context.ServiceClass<SnapshotsApi, "@aperture-browser/api-client/SnapshotsApi", {
|
|
627
|
-
readonly listSnapshots:
|
|
598
|
+
readonly listSnapshots: SnapshotsList["list"];
|
|
599
|
+
readonly streamSnapshots: SnapshotsList["stream"];
|
|
600
|
+
readonly listAllSnapshots: SnapshotsList["listAll"]; /** The active snapshot with exactly this name, if there is one. */
|
|
601
|
+
readonly getSnapshotByName: (credentials: ApiCredentials, name: string) => Call$3<Option.Option<Snapshot>>;
|
|
628
602
|
readonly updateSnapshot: (credentials: ApiCredentials, name: string, input: UpdateSnapshotInput) => Call$3<SnapshotMutationResponse>;
|
|
629
603
|
readonly replaceSnapshotTags: (credentials: ApiCredentials, name: string, tags: Record<string, string>) => Call$3<SnapshotMutationResponse>;
|
|
630
604
|
readonly deleteSnapshot: (credentials: ApiCredentials, name: string) => Call$3<SnapshotMutationResponse>;
|
|
@@ -633,55 +607,42 @@ declare const SnapshotsApi_base: Context.ServiceClass<SnapshotsApi, "@aperture-b
|
|
|
633
607
|
/** Retained snapshots that new sessions start from. */
|
|
634
608
|
declare class SnapshotsApi extends SnapshotsApi_base {}
|
|
635
609
|
//#endregion
|
|
636
|
-
//#region src/snapshots/layer.d.ts
|
|
637
|
-
declare const makeSnapshotsApi: Effect.Effect<{
|
|
638
|
-
readonly listSnapshots: (credentials: ApiCredentials, params?: SnapshotsListParams) => Effect.Effect<Api.SnapshotPage, ApiRequestError, never>;
|
|
639
|
-
readonly updateSnapshot: (credentials: ApiCredentials, name: string, input: UpdateSnapshotInput) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
640
|
-
readonly replaceSnapshotTags: (credentials: ApiCredentials, name: string, tags: Record<string, string>) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
641
|
-
readonly deleteSnapshot: (credentials: ApiCredentials, name: string) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
642
|
-
readonly restoreSnapshot: (credentials: ApiCredentials, name: string) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
643
|
-
}, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
644
|
-
declare const snapshotsApiLayer: Layer.Layer<SnapshotsApi, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
645
|
-
//#endregion
|
|
646
610
|
//#region src/tenants/service.d.ts
|
|
647
611
|
type Call$2<A> = Effect.Effect<A, ApiRequestError>;
|
|
648
|
-
interface
|
|
612
|
+
interface TenantsFilter {
|
|
649
613
|
limit?: number;
|
|
650
|
-
cursor?: string;
|
|
651
614
|
includeDeleted?: boolean;
|
|
652
615
|
deleted?: "active" | "deleted" | "all";
|
|
616
|
+
query?: string;
|
|
653
617
|
}
|
|
618
|
+
type TenantsListParams = TenantsFilter & PageCursor;
|
|
619
|
+
type TenantsList = PaginatedList<TenantsFilter, Tenant>;
|
|
654
620
|
declare const TenantsApi_base: Context.ServiceClass<TenantsApi, "@aperture-browser/api-client/TenantsApi", {
|
|
655
|
-
readonly listTenants:
|
|
621
|
+
readonly listTenants: TenantsList["list"];
|
|
622
|
+
readonly streamTenants: TenantsList["stream"];
|
|
623
|
+
readonly listAllTenants: TenantsList["listAll"];
|
|
656
624
|
readonly createTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Call$2<Tenant>;
|
|
657
625
|
readonly updateTenant: (credentials: ApiCredentials, tenantId: string, input: Api.TenantInput) => Call$2<Tenant>;
|
|
658
626
|
readonly deleteTenant: (credentials: ApiCredentials, tenantId: string) => Call$2<Tenant>;
|
|
659
|
-
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Call$2<Tenant>;
|
|
627
|
+
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Call$2<Tenant>; /** The tenant of a tenant token. */
|
|
628
|
+
readonly getCurrentTenant: (credentials: ApiCredentials) => Call$2<Tenant>;
|
|
629
|
+
readonly updateCurrentTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Call$2<Tenant>;
|
|
660
630
|
}>;
|
|
661
|
-
/** Tenant administration. */
|
|
631
|
+
/** Tenant administration, and the tenant a tenant token belongs to. */
|
|
662
632
|
declare class TenantsApi extends TenantsApi_base {}
|
|
663
633
|
//#endregion
|
|
664
|
-
//#region src/tenants/layer.d.ts
|
|
665
|
-
declare const makeTenantsApi: Effect.Effect<{
|
|
666
|
-
readonly listTenants: (credentials: ApiCredentials, params?: TenantsListParams) => Effect.Effect<Api.TenantPage, ApiRequestError, never>;
|
|
667
|
-
readonly createTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
668
|
-
readonly updateTenant: (credentials: ApiCredentials, tenantId: string, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
669
|
-
readonly deleteTenant: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
670
|
-
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
671
|
-
}, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
672
|
-
declare const tenantsApiLayer: Layer.Layer<TenantsApi, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
673
|
-
//#endregion
|
|
674
634
|
//#region src/tokens/service.d.ts
|
|
675
635
|
type Call$1<A> = Effect.Effect<A, ApiRequestError>;
|
|
676
|
-
interface
|
|
636
|
+
interface TokensFilter {
|
|
677
637
|
limit?: number;
|
|
678
|
-
cursor?: string;
|
|
679
638
|
tenantId?: string;
|
|
680
639
|
name?: string;
|
|
681
640
|
authorityType?: "system_admin" | "tenant";
|
|
682
641
|
revoked?: "all" | "active" | "revoked";
|
|
683
642
|
scope?: string;
|
|
684
643
|
}
|
|
644
|
+
type TokensListParams = TokensFilter & PageCursor;
|
|
645
|
+
type TokensList = PaginatedList<TokensFilter, ApiToken>;
|
|
685
646
|
interface CreateAdminTokenInput {
|
|
686
647
|
name: string;
|
|
687
648
|
authorityType: "system_admin" | "tenant";
|
|
@@ -699,42 +660,38 @@ interface CreateTenantTokenInput {
|
|
|
699
660
|
expiresAt?: string | null;
|
|
700
661
|
}
|
|
701
662
|
declare const TokensApi_base: Context.ServiceClass<TokensApi, "@aperture-browser/api-client/TokensApi", {
|
|
702
|
-
readonly listAdminTokens:
|
|
663
|
+
readonly listAdminTokens: TokensList["list"];
|
|
664
|
+
readonly streamAdminTokens: TokensList["stream"];
|
|
665
|
+
readonly listAllAdminTokens: TokensList["listAll"];
|
|
703
666
|
readonly createAdminToken: (credentials: ApiCredentials, input: CreateAdminTokenInput) => Call$1<CreateTokenResponse>;
|
|
704
667
|
readonly revokeAdminToken: (credentials: ApiCredentials, tokenId: string) => Call$1<void>;
|
|
705
|
-
readonly listTenantTokens:
|
|
668
|
+
readonly listTenantTokens: TokensList["list"];
|
|
669
|
+
readonly streamTenantTokens: TokensList["stream"];
|
|
670
|
+
readonly listAllTenantTokens: TokensList["listAll"];
|
|
706
671
|
readonly createTenantToken: (credentials: ApiCredentials, input: CreateTenantTokenInput) => Call$1<CreateTokenResponse>;
|
|
707
672
|
readonly revokeTenantToken: (credentials: ApiCredentials, tokenId: string) => Call$1<void>;
|
|
708
673
|
}>;
|
|
709
674
|
/** API tokens, issued either deployment-wide or within the current tenant. */
|
|
710
675
|
declare class TokensApi extends TokensApi_base {}
|
|
711
676
|
//#endregion
|
|
712
|
-
//#region src/tokens/layer.d.ts
|
|
713
|
-
declare const makeTokensApi: Effect.Effect<{
|
|
714
|
-
readonly listAdminTokens: (credentials: ApiCredentials, params?: TokensListParams) => Effect.Effect<Api.TokenPage, ApiRequestError, never>;
|
|
715
|
-
readonly createAdminToken: (credentials: ApiCredentials, input: CreateAdminTokenInput) => Effect.Effect<Api.CreateTokenResponse, ApiRequestError, never>;
|
|
716
|
-
readonly revokeAdminToken: (credentials: ApiCredentials, tokenId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
717
|
-
readonly listTenantTokens: (credentials: ApiCredentials, params?: TokensListParams) => Effect.Effect<Api.TokenPage, ApiRequestError, never>;
|
|
718
|
-
readonly createTenantToken: (credentials: ApiCredentials, input: CreateTenantTokenInput) => Effect.Effect<Api.CreateTokenResponse, ApiRequestError, never>;
|
|
719
|
-
readonly revokeTenantToken: (credentials: ApiCredentials, tokenId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
720
|
-
}, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
721
|
-
declare const tokensApiLayer: Layer.Layer<TokensApi, never, HttpClient.HttpClient | ApiAuthorization>;
|
|
722
|
-
//#endregion
|
|
723
677
|
//#region src/users/service.d.ts
|
|
724
678
|
type Call<A> = Effect.Effect<A, ApiRequestError>;
|
|
725
|
-
interface
|
|
679
|
+
interface UsersFilter {
|
|
726
680
|
limit?: number;
|
|
727
|
-
cursor?: string;
|
|
728
681
|
query?: string;
|
|
729
682
|
disabled?: "active" | "disabled" | "all";
|
|
730
683
|
}
|
|
684
|
+
type UsersListParams = UsersFilter & PageCursor;
|
|
685
|
+
type UsersList = PaginatedList<UsersFilter, User>;
|
|
731
686
|
interface UserInput {
|
|
732
687
|
email: string | null;
|
|
733
688
|
displayName: string;
|
|
734
689
|
isSystemAdmin: boolean;
|
|
735
690
|
}
|
|
736
691
|
declare const UsersApi_base: Context.ServiceClass<UsersApi, "@aperture-browser/api-client/UsersApi", {
|
|
737
|
-
readonly listUsers:
|
|
692
|
+
readonly listUsers: UsersList["list"];
|
|
693
|
+
readonly streamUsers: UsersList["stream"];
|
|
694
|
+
readonly listAllUsers: UsersList["listAll"];
|
|
738
695
|
readonly createUser: (credentials: ApiCredentials, input: UserInput) => Call<User>;
|
|
739
696
|
readonly getUser: (credentials: ApiCredentials, userId: string) => Call<User>;
|
|
740
697
|
readonly updateUser: (credentials: ApiCredentials, userId: string, input: UserInput) => Call<User>;
|
|
@@ -742,15 +699,289 @@ declare const UsersApi_base: Context.ServiceClass<UsersApi, "@aperture-browser/a
|
|
|
742
699
|
readonly disableUser: (credentials: ApiCredentials, userId: string) => Call<User>;
|
|
743
700
|
readonly restoreUser: (credentials: ApiCredentials, userId: string) => Call<User>;
|
|
744
701
|
readonly listUserMemberships: (credentials: ApiCredentials, userId: string) => Call<ReadonlyArray<TenantMembership>>;
|
|
702
|
+
readonly listTenantMemberships: (credentials: ApiCredentials, tenantId: string) => Call<ReadonlyArray<TenantMembership>>;
|
|
745
703
|
readonly upsertTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string, scopes: readonly string[]) => Call<TenantMembership>;
|
|
746
704
|
readonly deleteTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string) => Call<void>;
|
|
747
705
|
}>;
|
|
748
706
|
/** User administration and tenant memberships. */
|
|
749
707
|
declare class UsersApi extends UsersApi_base {}
|
|
750
708
|
//#endregion
|
|
709
|
+
//#region src/client.d.ts
|
|
710
|
+
type CredentialedMethod = (credentials: ApiCredentials, ...args: never[]) => unknown;
|
|
711
|
+
/** A service whose methods have their leading credentials argument already applied. */
|
|
712
|
+
type WithCredentials<S> = { readonly [K in keyof S]: S[K] extends ((credentials: ApiCredentials, ...args: infer Args) => infer Result) ? (...args: Args) => Result : never };
|
|
713
|
+
/** Binds `credentials` as the first argument of every method of `service`. */
|
|
714
|
+
declare function withCredentials<S extends { readonly [K in keyof S]: CredentialedMethod }>(service: S, credentials: ApiCredentials): WithCredentials<S>;
|
|
715
|
+
declare const ApertureClient_base: Context.ServiceClass<ApertureClient, "@aperture-browser/api-client/ApertureClient", {
|
|
716
|
+
readonly sessions: WithCredentials<SessionsApi["Service"]>;
|
|
717
|
+
readonly snapshots: WithCredentials<SnapshotsApi["Service"]>;
|
|
718
|
+
readonly tenants: WithCredentials<TenantsApi["Service"]>;
|
|
719
|
+
readonly users: WithCredentials<UsersApi["Service"]>;
|
|
720
|
+
readonly tokens: WithCredentials<TokensApi["Service"]>;
|
|
721
|
+
readonly events: WithCredentials<EventsApi["Service"]>; /** The calls of AuthApi that work with API credentials rather than a browser login. */
|
|
722
|
+
readonly auth: {
|
|
723
|
+
readonly getAuthMe: () => Effect.Effect<AuthMeResponse, ApiRequestError>;
|
|
724
|
+
};
|
|
725
|
+
readonly health: HealthApi["Service"];
|
|
726
|
+
}>;
|
|
727
|
+
/**
|
|
728
|
+
* The credentialed API services with one set of credentials bound, for callers that always
|
|
729
|
+
* act as the same principal, such as a server holding one API token.
|
|
730
|
+
*/
|
|
731
|
+
declare class ApertureClient extends ApertureClient_base {}
|
|
732
|
+
declare const makeApertureClient: (credentials: ApiCredentials) => Effect.Effect<{
|
|
733
|
+
readonly sessions: WithCredentials<SessionsApi["Service"]>;
|
|
734
|
+
readonly snapshots: WithCredentials<SnapshotsApi["Service"]>;
|
|
735
|
+
readonly tenants: WithCredentials<TenantsApi["Service"]>;
|
|
736
|
+
readonly users: WithCredentials<UsersApi["Service"]>;
|
|
737
|
+
readonly tokens: WithCredentials<TokensApi["Service"]>;
|
|
738
|
+
readonly events: WithCredentials<EventsApi["Service"]>; /** The calls of AuthApi that work with API credentials rather than a browser login. */
|
|
739
|
+
readonly auth: {
|
|
740
|
+
readonly getAuthMe: () => Effect.Effect<AuthMeResponse, ApiRequestError>;
|
|
741
|
+
};
|
|
742
|
+
readonly health: HealthApi["Service"];
|
|
743
|
+
}, never, AuthApi | EventsApi | UsersApi | HealthApi | SessionsApi | SnapshotsApi | TenantsApi | TokensApi>;
|
|
744
|
+
/** ApertureClient acting with `credentials`, over the HttpClient the app provides. */
|
|
745
|
+
declare const apertureClientLayer: (credentials: ApiCredentials) => Layer.Layer<ApertureClient, never, import("effect/http/HttpClient").HttpClient>;
|
|
746
|
+
//#endregion
|
|
747
|
+
//#region src/events/layer.d.ts
|
|
748
|
+
declare const makeEventsApi: Effect.Effect<{
|
|
749
|
+
readonly listEvents: (credentials: ApiCredentials, params?: (EventsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Event>, ApiRequestError, never>;
|
|
750
|
+
readonly streamEvents: (credentials: ApiCredentials, filter?: EventsFilter | undefined) => import("effect/Stream").Stream<Api.Event, ApiRequestError, never>;
|
|
751
|
+
readonly listAllEvents: (credentials: ApiCredentials, filter?: EventsFilter | undefined) => Effect.Effect<readonly Api.Event[], ApiRequestError, never>;
|
|
752
|
+
readonly listAuditEvents: (credentials: ApiCredentials, params?: (AuditEventsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.AuditEvent>, ApiRequestError, never>;
|
|
753
|
+
readonly streamAuditEvents: (credentials: ApiCredentials, filter?: AuditEventsFilter | undefined) => import("effect/Stream").Stream<Api.AuditEvent, ApiRequestError, never>;
|
|
754
|
+
readonly listAllAuditEvents: (credentials: ApiCredentials, filter?: AuditEventsFilter | undefined) => Effect.Effect<readonly Api.AuditEvent[], ApiRequestError, never>;
|
|
755
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
756
|
+
declare const eventsApiLayer: Layer.Layer<EventsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region src/health/layer.d.ts
|
|
759
|
+
declare const makeHealthApi: Effect.Effect<{
|
|
760
|
+
readonly getHealth: () => Effect.Effect<Health, ApiRequestError>;
|
|
761
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
762
|
+
declare const healthApiLayer: Layer.Layer<HealthApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
763
|
+
//#endregion
|
|
764
|
+
//#region src/layer.d.ts
|
|
765
|
+
/**
|
|
766
|
+
* Every API service, sharing one ApiAuthorization. The services send requests through the
|
|
767
|
+
* HttpClient the app provides, decorated with each call's authorization.
|
|
768
|
+
*/
|
|
769
|
+
declare const apiClientLayer: Layer.Layer<AuthApi | ApiAuthorization | EventsApi | UsersApi | HealthApi | SessionsApi | SnapshotsApi | TenantsApi | TokensApi, never, HttpClient.HttpClient>;
|
|
770
|
+
type ApiServices = Layer.Success<typeof apiClientLayer>;
|
|
771
|
+
declare const baseUrlLayer: (baseUrl: string) => Layer.Layer<HttpClient.HttpClient, never, HttpClient.HttpClient>;
|
|
772
|
+
//#endregion
|
|
773
|
+
//#region src/sessions/layer.d.ts
|
|
774
|
+
declare const contentDispositionFilename: (header: string | undefined) => string | null;
|
|
775
|
+
declare const makeSessionsApi: Effect.Effect<{
|
|
776
|
+
readonly listSessions: (credentials: ApiCredentials, params?: (SessionsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Session>, ApiRequestError, never>;
|
|
777
|
+
readonly streamSessions: (credentials: ApiCredentials, filter?: SessionsFilter | undefined) => Stream.Stream<Api.Session, ApiRequestError, never>;
|
|
778
|
+
readonly listAllSessions: (credentials: ApiCredentials, filter?: SessionsFilter | undefined) => Effect.Effect<readonly Api.Session[], ApiRequestError, never>;
|
|
779
|
+
readonly exportSessionStorageState: (credentials: ApiCredentials, sessionId: string, input: Api.ExportSessionStorageStateInput) => Effect.Effect<Api.InitialBrowserStorageState, ApiRequestError, never>;
|
|
780
|
+
readonly getSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.Session, ApiRequestError, never>;
|
|
781
|
+
readonly getSessionsBulk: (credentials: ApiCredentials, sessionIds: readonly string[]) => Effect.Effect<Api.SessionBulkResponse, ApiRequestError, never>;
|
|
782
|
+
readonly createSession: (credentials: ApiCredentials, input: CreateSessionInput, options?: CreateSessionOptions) => Effect.Effect<Api.CreateSessionResult, ApiRequestError, never>;
|
|
783
|
+
readonly deleteSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
784
|
+
readonly reopenSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
785
|
+
readonly suspendSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
786
|
+
readonly rotateSessionToken: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
787
|
+
readonly rotateCollaborationCapability: (credentials: ApiCredentials, sessionId: string, role: "editor" | "viewer") => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
788
|
+
readonly replaceSessionTags: (credentials: ApiCredentials, sessionId: string, tags: Record<string, string>) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
789
|
+
readonly updateSessionProxy: (credentials: ApiCredentials, sessionId: string, proxy: UpdateProxyConfig) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
790
|
+
readonly promoteSession: (credentials: ApiCredentials, sessionId: string, input: PromoteSessionInput) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
791
|
+
readonly getSessionCursor: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.CursorVisibility, ApiRequestError, never>;
|
|
792
|
+
readonly setSessionCursor: (credentials: ApiCredentials, sessionId: string, visible: boolean) => Effect.Effect<Api.CursorVisibility, ApiRequestError, never>;
|
|
793
|
+
readonly listSessionRecordings: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<readonly Api.Recording[], ApiRequestError, never>;
|
|
794
|
+
readonly createSessionRecording: (credentials: ApiCredentials, sessionId: string, input: CreateSessionRecordingInput) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
795
|
+
readonly getSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
796
|
+
readonly retargetSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, targetId: string) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
797
|
+
readonly stopSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
798
|
+
readonly listSessionFiles: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<readonly Api.SessionFileEntry[], ApiRequestError, never>;
|
|
799
|
+
readonly uploadSessionFiles: (credentials: ApiCredentials, sessionId: string, files: ReadonlyArray<SessionUploadFile>, options?: UploadSessionFilesOptions) => Effect.Effect<readonly Api.SessionFile[], ApiRequestError, never>;
|
|
800
|
+
readonly deleteSessionFile: (credentials: ApiCredentials, sessionId: string, relativePath: string, options?: DeleteSessionFileOptions) => Effect.Effect<void, ApiRequestError, never>;
|
|
801
|
+
readonly moveSessionFile: (credentials: ApiCredentials, sessionId: string, input: MoveSessionFileInput) => Effect.Effect<Api.SessionFileEntry, ApiRequestError, never>;
|
|
802
|
+
readonly createSessionDirectory: (credentials: ApiCredentials, sessionId: string, relativePath: string) => Effect.Effect<Api.SessionDirectory, ApiRequestError, never>;
|
|
803
|
+
readonly createSessionFileDownloadURL: (credentials: ApiCredentials, sessionId: string, input: SessionFileDownloadURLInput) => Effect.Effect<Api.SessionFileDownloadURL, ApiRequestError, never>;
|
|
804
|
+
readonly getBrowserChannels: (credentials: ApiCredentials) => Effect.Effect<Api.BrowserChannels, ApiRequestError, never>;
|
|
805
|
+
readonly getBrowserStatus: (credentials: ApiCredentials, sessionId: string, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<{
|
|
806
|
+
readonly status: "running";
|
|
807
|
+
readonly thumbnailAvailable: boolean;
|
|
808
|
+
readonly source: "live";
|
|
809
|
+
readonly capturedAt: string;
|
|
810
|
+
readonly sessionId: string;
|
|
811
|
+
readonly cdpUrl: string;
|
|
812
|
+
readonly media: {
|
|
813
|
+
readonly mode: "auto" | "cdp";
|
|
814
|
+
readonly webrtcProducer: boolean;
|
|
815
|
+
readonly iceServers?: readonly {
|
|
816
|
+
readonly urls: readonly string[];
|
|
817
|
+
readonly username?: string | undefined;
|
|
818
|
+
readonly credential?: Api.SensitiveString | undefined;
|
|
819
|
+
}[] | undefined;
|
|
820
|
+
};
|
|
821
|
+
readonly pages: readonly {
|
|
822
|
+
readonly url: string;
|
|
823
|
+
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
824
|
+
readonly targetId: string;
|
|
825
|
+
readonly title: string;
|
|
826
|
+
readonly thumbnailAvailable: boolean;
|
|
827
|
+
readonly viewport?: {
|
|
828
|
+
readonly width: number;
|
|
829
|
+
readonly height: number;
|
|
830
|
+
readonly deviceScaleFactor: number;
|
|
831
|
+
readonly contentWidth: number;
|
|
832
|
+
readonly contentHeight: number;
|
|
833
|
+
readonly canvasWidth: number;
|
|
834
|
+
readonly canvasHeight: number;
|
|
835
|
+
} | undefined;
|
|
836
|
+
}[];
|
|
837
|
+
readonly representativeTargetId?: string | undefined;
|
|
838
|
+
} | {
|
|
839
|
+
readonly status: "suspended";
|
|
840
|
+
readonly thumbnailAvailable: boolean;
|
|
841
|
+
readonly source: "persisted";
|
|
842
|
+
readonly capturedAt: string;
|
|
843
|
+
readonly sessionId: string;
|
|
844
|
+
readonly cdpUrl: string;
|
|
845
|
+
readonly media: {
|
|
846
|
+
readonly mode: "auto" | "cdp";
|
|
847
|
+
readonly webrtcProducer: boolean;
|
|
848
|
+
readonly iceServers?: readonly {
|
|
849
|
+
readonly urls: readonly string[];
|
|
850
|
+
readonly username?: string | undefined;
|
|
851
|
+
readonly credential?: Api.SensitiveString | undefined;
|
|
852
|
+
}[] | undefined;
|
|
853
|
+
};
|
|
854
|
+
readonly pages: readonly {
|
|
855
|
+
readonly url: string;
|
|
856
|
+
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
857
|
+
readonly targetId: string;
|
|
858
|
+
readonly title: string;
|
|
859
|
+
readonly thumbnailAvailable: boolean;
|
|
860
|
+
readonly viewport?: {
|
|
861
|
+
readonly width: number;
|
|
862
|
+
readonly height: number;
|
|
863
|
+
readonly deviceScaleFactor: number;
|
|
864
|
+
readonly contentWidth: number;
|
|
865
|
+
readonly contentHeight: number;
|
|
866
|
+
readonly canvasWidth: number;
|
|
867
|
+
readonly canvasHeight: number;
|
|
868
|
+
} | undefined;
|
|
869
|
+
}[];
|
|
870
|
+
readonly representativeTargetId?: string | undefined;
|
|
871
|
+
} | {
|
|
872
|
+
readonly status: "suspended";
|
|
873
|
+
readonly source: "unavailable";
|
|
874
|
+
readonly sessionId: string;
|
|
875
|
+
readonly cdpUrl: string;
|
|
876
|
+
readonly media: {
|
|
877
|
+
readonly mode: "auto" | "cdp";
|
|
878
|
+
readonly webrtcProducer: boolean;
|
|
879
|
+
readonly iceServers?: readonly {
|
|
880
|
+
readonly urls: readonly string[];
|
|
881
|
+
readonly username?: string | undefined;
|
|
882
|
+
readonly credential?: Api.SensitiveString | undefined;
|
|
883
|
+
}[] | undefined;
|
|
884
|
+
};
|
|
885
|
+
readonly thumbnailAvailable: boolean;
|
|
886
|
+
readonly pages: readonly {
|
|
887
|
+
readonly url: string;
|
|
888
|
+
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
889
|
+
readonly targetId: string;
|
|
890
|
+
readonly title: string;
|
|
891
|
+
readonly thumbnailAvailable: boolean;
|
|
892
|
+
readonly viewport?: {
|
|
893
|
+
readonly width: number;
|
|
894
|
+
readonly height: number;
|
|
895
|
+
readonly deviceScaleFactor: number;
|
|
896
|
+
readonly contentWidth: number;
|
|
897
|
+
readonly contentHeight: number;
|
|
898
|
+
readonly canvasWidth: number;
|
|
899
|
+
readonly canvasHeight: number;
|
|
900
|
+
} | undefined;
|
|
901
|
+
}[];
|
|
902
|
+
}, ApiRequestError, never>;
|
|
903
|
+
readonly downloadSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<DownloadedFile, ApiRequestError, never>;
|
|
904
|
+
readonly getSessionThumbnail: (credentials: ApiCredentials, sessionId: string, targetId?: string) => Effect.Effect<Blob, ApiRequestError, never>;
|
|
905
|
+
readonly streamSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Stream.Stream<Uint8Array, ApiRequestError>;
|
|
906
|
+
readonly uploadLiveSessionFiles: (credentials: ApiCredentials, sessionId: string, files: ReadonlyArray<SessionUploadFile>, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<readonly Api.SessionFile[], ApiRequestError, never>;
|
|
907
|
+
readonly setSessionViewport: (credentials: ApiCredentials, sessionId: string, input: SetViewportInput, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<Api.TargetViewport, ApiRequestError, never>;
|
|
908
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
909
|
+
declare const sessionsApiLayer: Layer.Layer<SessionsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
910
|
+
//#endregion
|
|
911
|
+
//#region src/sessions/tree.d.ts
|
|
912
|
+
/**
|
|
913
|
+
* The top-level directories the session writes into. They always exist and cannot be
|
|
914
|
+
* deleted, moved or renamed.
|
|
915
|
+
*/
|
|
916
|
+
declare const sessionFileRootDirectories: readonly ["downloads", "recordings", "uploads", "outputs"];
|
|
917
|
+
interface SessionFileDirectoryNode {
|
|
918
|
+
readonly kind: "directory";
|
|
919
|
+
readonly name: string;
|
|
920
|
+
readonly relativePath: string;
|
|
921
|
+
/** Absent for a directory known only from the paths of legacy files. */
|
|
922
|
+
readonly directory: SessionDirectory | undefined;
|
|
923
|
+
readonly children: ReadonlyArray<SessionFileTreeNode>;
|
|
924
|
+
}
|
|
925
|
+
interface SessionFileNode {
|
|
926
|
+
readonly kind: "file";
|
|
927
|
+
readonly name: string;
|
|
928
|
+
readonly relativePath: string;
|
|
929
|
+
readonly file: SessionFile;
|
|
930
|
+
}
|
|
931
|
+
type SessionFileTreeNode = SessionFileDirectoryNode | SessionFileNode;
|
|
932
|
+
/**
|
|
933
|
+
* Arranges `listSessionFiles` results into a tree: directories first, then files, each
|
|
934
|
+
* sorted by name. Empty directories appear because the listing includes them.
|
|
935
|
+
*/
|
|
936
|
+
declare function sessionFileTree(entries: ReadonlyArray<SessionFileEntry>): ReadonlyArray<SessionFileTreeNode>;
|
|
937
|
+
//#endregion
|
|
938
|
+
//#region src/snapshots/layer.d.ts
|
|
939
|
+
declare const makeSnapshotsApi: Effect.Effect<{
|
|
940
|
+
readonly listSnapshots: (credentials: ApiCredentials, params?: (SnapshotsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Snapshot>, ApiRequestError, never>;
|
|
941
|
+
readonly streamSnapshots: (credentials: ApiCredentials, filter?: SnapshotsFilter | undefined) => Stream.Stream<Api.Snapshot, ApiRequestError, never>;
|
|
942
|
+
readonly listAllSnapshots: (credentials: ApiCredentials, filter?: SnapshotsFilter | undefined) => Effect.Effect<readonly Api.Snapshot[], ApiRequestError, never>;
|
|
943
|
+
readonly getSnapshotByName: (credentials: ApiCredentials, name: string) => Effect.Effect<import("effect/Option").Option<Api.Snapshot>, ApiRequestError, never>;
|
|
944
|
+
readonly updateSnapshot: (credentials: ApiCredentials, name: string, input: UpdateSnapshotInput) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
945
|
+
readonly replaceSnapshotTags: (credentials: ApiCredentials, name: string, tags: Record<string, string>) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
946
|
+
readonly deleteSnapshot: (credentials: ApiCredentials, name: string) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
947
|
+
readonly restoreSnapshot: (credentials: ApiCredentials, name: string) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
948
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
949
|
+
declare const snapshotsApiLayer: Layer.Layer<SnapshotsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
950
|
+
//#endregion
|
|
951
|
+
//#region src/tenants/layer.d.ts
|
|
952
|
+
declare const makeTenantsApi: Effect.Effect<{
|
|
953
|
+
readonly listTenants: (credentials: ApiCredentials, params?: (TenantsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Tenant>, ApiRequestError, never>;
|
|
954
|
+
readonly streamTenants: (credentials: ApiCredentials, filter?: TenantsFilter | undefined) => import("effect/Stream").Stream<Api.Tenant, ApiRequestError, never>;
|
|
955
|
+
readonly listAllTenants: (credentials: ApiCredentials, filter?: TenantsFilter | undefined) => Effect.Effect<readonly Api.Tenant[], ApiRequestError, never>;
|
|
956
|
+
readonly createTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
957
|
+
readonly updateTenant: (credentials: ApiCredentials, tenantId: string, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
958
|
+
readonly deleteTenant: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
959
|
+
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
960
|
+
readonly getCurrentTenant: (credentials: ApiCredentials) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
961
|
+
readonly updateCurrentTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
962
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
963
|
+
declare const tenantsApiLayer: Layer.Layer<TenantsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/tokens/layer.d.ts
|
|
966
|
+
declare const makeTokensApi: Effect.Effect<{
|
|
967
|
+
readonly listAdminTokens: (credentials: ApiCredentials, params?: (TokensFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Token>, ApiRequestError, never>;
|
|
968
|
+
readonly streamAdminTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => import("effect/Stream").Stream<Api.Token, ApiRequestError, never>;
|
|
969
|
+
readonly listAllAdminTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => Effect.Effect<readonly Api.Token[], ApiRequestError, never>;
|
|
970
|
+
readonly createAdminToken: (credentials: ApiCredentials, input: CreateAdminTokenInput) => Effect.Effect<Api.CreateTokenResponse, ApiRequestError, never>;
|
|
971
|
+
readonly revokeAdminToken: (credentials: ApiCredentials, tokenId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
972
|
+
readonly listTenantTokens: (credentials: ApiCredentials, params?: (TokensFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Token>, ApiRequestError, never>;
|
|
973
|
+
readonly streamTenantTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => import("effect/Stream").Stream<Api.Token, ApiRequestError, never>;
|
|
974
|
+
readonly listAllTenantTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => Effect.Effect<readonly Api.Token[], ApiRequestError, never>;
|
|
975
|
+
readonly createTenantToken: (credentials: ApiCredentials, input: CreateTenantTokenInput) => Effect.Effect<Api.CreateTokenResponse, ApiRequestError, never>;
|
|
976
|
+
readonly revokeTenantToken: (credentials: ApiCredentials, tokenId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
977
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
978
|
+
declare const tokensApiLayer: Layer.Layer<TokensApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
979
|
+
//#endregion
|
|
751
980
|
//#region src/users/layer.d.ts
|
|
752
981
|
declare const makeUsersApi: Effect.Effect<{
|
|
753
|
-
readonly listUsers: (credentials: ApiCredentials, params?:
|
|
982
|
+
readonly listUsers: (credentials: ApiCredentials, params?: (UsersFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.User>, ApiRequestError, never>;
|
|
983
|
+
readonly streamUsers: (credentials: ApiCredentials, filter?: UsersFilter | undefined) => import("effect/Stream").Stream<Api.User, ApiRequestError, never>;
|
|
984
|
+
readonly listAllUsers: (credentials: ApiCredentials, filter?: UsersFilter | undefined) => Effect.Effect<readonly Api.User[], ApiRequestError, never>;
|
|
754
985
|
readonly createUser: (credentials: ApiCredentials, input: UserInput) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
755
986
|
readonly getUser: (credentials: ApiCredentials, userId: string) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
756
987
|
readonly updateUser: (credentials: ApiCredentials, userId: string, input: UserInput) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
@@ -758,10 +989,11 @@ declare const makeUsersApi: Effect.Effect<{
|
|
|
758
989
|
readonly disableUser: (credentials: ApiCredentials, userId: string) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
759
990
|
readonly restoreUser: (credentials: ApiCredentials, userId: string) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
760
991
|
readonly listUserMemberships: (credentials: ApiCredentials, userId: string) => Effect.Effect<readonly Api.TenantMembership[], ApiRequestError, never>;
|
|
992
|
+
readonly listTenantMemberships: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<readonly Api.TenantMembership[], ApiRequestError, never>;
|
|
761
993
|
readonly upsertTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string, scopes: readonly string[]) => Effect.Effect<Api.TenantMembership, ApiRequestError, never>;
|
|
762
994
|
readonly deleteTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
763
|
-
}, never, HttpClient.HttpClient
|
|
764
|
-
declare const usersApiLayer: Layer.Layer<UsersApi, never, HttpClient.HttpClient
|
|
995
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
996
|
+
declare const usersApiLayer: Layer.Layer<UsersApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
765
997
|
//#endregion
|
|
766
|
-
export { ApiAuthorization, ApiCredentials, ApiErrorBody, ApiRequestError, ApiServices, ApiToken, AuthApi, AuthMePrincipal, AuthMeResponse, AuthMeTenant, Authorization, BrowserChannel, BrowserChannelsResponse, BrowserStatus, CreateAdminTokenInput, CreateSessionInput, CreateSessionOptions, CreateSessionResponse, CreateTenantTokenInput, CreateTokenResponse, DownloadedFile, EventsApi, EventsListParams, EventsPage, IceServer, InitialBrowserStorageState, InitialBrowserTarget,
|
|
998
|
+
export { ApertureClient, ApiAuthorization, ApiCredentials, ApiErrorBody, ApiRequestError, ApiServices, ApiToken, AuditEvent, AuditEventsFilter, AuditEventsListParams, AuditEventsPage, AuthApi, AuthMePrincipal, AuthMeResponse, AuthMeTenant, Authorization, BrowserChannel, BrowserChannelsResponse, BrowserPage, BrowserStatus, CreateAdminTokenInput, CreateSessionInput, CreateSessionOptions, CreateSessionRecordingInput, CreateSessionResponse, CreateTenantTokenInput, CreateTokenResponse, CursorVisibility, DeleteSessionFileOptions, DownloadedFile, EventsApi, EventsFilter, EventsListParams, EventsPage, Health, HealthApi, IceServer, InitialBrowserStorageState, InitialBrowserTarget, LiveSessionErrorBody, LoginMethods, MoveSessionFileInput, OAuthApproval, OAuthAuthorizationRequest, OAuthClient, OAuthGrant, OAuthGrants, OAuthRedirect, PageCursor, PageMeta, PaginatedList, PaginatedResponse, Passkey, PasskeyCredentialJSON, PasskeyLoginOptions, PasskeyMutation, PasskeyRegistrationOptions, Passkeys, PasswordLoginResponse, PromoteSessionInput, PromoteSessionResponse, ProxyConfig, ProxyRule, ProxyUpstream, Recording, RecoveryCodes, ResourceEvent, ResourceGrant, ResourceMode, Scope, SecurityStatus, Session, SessionDirectory, SessionFile, SessionFileDirectoryNode, SessionFileDownloadURL, SessionFileDownloadURLInput, SessionFileEntry, SessionFileNode, SessionFileTreeNode, SessionMedia, SessionMutationResponse, SessionProxy, SessionRecording, SessionRecordingEditError, SessionStatus, SessionUploadFile, SessionsApi, SessionsBulkResponse, SessionsFilter, SessionsListParams, SessionsPage, SetViewportInput, Snapshot, SnapshotMutationResponse, SnapshotsApi, SnapshotsFilter, SnapshotsListParams, SnapshotsPage, TENANT_HEADER, TOTPEnrollment, TagFilterValue, TargetViewport, Tenant, TenantHeaderMode, TenantMembership, TenantScope, TenantsApi, TenantsFilter, TenantsListParams, TenantsPage, TokensApi, TokensFilter, TokensListParams, TokensPage, UpdateProxyConfig, UpdateSnapshotInput, UploadSessionFilesOptions, User, UserInput, UserInvitation, UsersApi, UsersFilter, UsersListParams, UsersPage, WithCredentials, apertureClientLayer, apiAuthorizationLayer, apiClientLayer, authApiLayer, authorizedHttpClientLayer, baseUrlLayer, compactQuery, contentDispositionFilename, defaultListLimit, eventsApiLayer, flattenInfinitePages, getNextPageParam, healthApiLayer, listQueryDefaults, makeApertureClient, makeApiAuthorization, makeAuthApi, makeEventsApi, makeHealthApi, makeSessionsApi, makeSnapshotsApi, makeTenantsApi, makeTokensApi, makeUsersApi, paginated, resolveTenantHeader, sessionFileRootDirectories, sessionFileTree, sessionsApiLayer, snapshotsApiLayer, tagQuery, tenantsApiLayer, toApiRequestError, tokensApiLayer, usersApiLayer, webSessionCredentials, withCredentials };
|
|
767
999
|
//# sourceMappingURL=index.d.ts.map
|