@aperture-browser/api-client 0.0.0-init.0 → 0.0.0-nightly.101.c63f90ec6164
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 +658 -404
- package/dist/index.js +552 -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,41 @@ 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 RecordingSettings: Schema.Struct<{
|
|
295
|
+
readonly capture: Schema.optionalKey<Schema.Literals<readonly ["continuous", "bursts"]>>;
|
|
296
|
+
readonly presentation: Schema.optionalKey<Schema.Boolean>;
|
|
297
|
+
readonly idle: Schema.optionalKey<Schema.Literals<readonly ["cut", "speed"]>>;
|
|
298
|
+
readonly ripple: Schema.optionalKey<Schema.Boolean>;
|
|
299
|
+
readonly burst: Schema.optionalKey<Schema.Struct<{
|
|
300
|
+
readonly leadMs: Schema.optionalKey<Schema.Number>;
|
|
301
|
+
readonly tailMs: Schema.optionalKey<Schema.Number>;
|
|
302
|
+
readonly settleMs: Schema.optionalKey<Schema.Number>;
|
|
303
|
+
readonly maxTailMs: Schema.optionalKey<Schema.Number>;
|
|
304
|
+
}>>;
|
|
305
|
+
}>;
|
|
306
|
+
type RecordingSettings = typeof RecordingSettings.Type;
|
|
307
|
+
declare const BrowserPage: Schema.Struct<{
|
|
308
|
+
readonly targetId: Schema.String;
|
|
309
|
+
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
310
|
+
readonly title: Schema.String;
|
|
311
|
+
readonly url: Schema.String;
|
|
312
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
313
|
+
readonly width: Schema.Number;
|
|
314
|
+
readonly height: Schema.Number;
|
|
315
|
+
readonly deviceScaleFactor: Schema.Number;
|
|
316
|
+
readonly contentWidth: Schema.Number;
|
|
317
|
+
readonly contentHeight: Schema.Number;
|
|
318
|
+
readonly canvasWidth: Schema.Number;
|
|
319
|
+
readonly canvasHeight: Schema.Number;
|
|
320
|
+
}>>;
|
|
321
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
322
|
+
}>;
|
|
323
|
+
/** Passive page discovery. Reading it never wakes or keeps a browser session alive. */
|
|
324
|
+
declare const BrowserStatus: Schema.Union<readonly [Schema.Struct<{
|
|
325
|
+
readonly status: Schema.Literal<"running">;
|
|
326
|
+
readonly source: Schema.Literal<"live">;
|
|
327
|
+
readonly capturedAt: Schema.String;
|
|
328
|
+
readonly representativeTargetId: Schema.optionalKey<Schema.String>;
|
|
465
329
|
readonly sessionId: Schema.String;
|
|
466
330
|
readonly cdpUrl: Schema.String;
|
|
467
331
|
readonly media: Schema.Struct<{
|
|
@@ -470,16 +334,16 @@ declare const BrowserStatus: Schema.Struct<{
|
|
|
470
334
|
readonly iceServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
471
335
|
readonly urls: Schema.$Array<Schema.String>;
|
|
472
336
|
readonly username: Schema.optionalKey<Schema.String>;
|
|
473
|
-
readonly credential: Schema.optionalKey<Schema.
|
|
337
|
+
readonly credential: Schema.optionalKey<Schema.suspend<Schema.Codec<Api.SensitiveString, string, never, never>>>;
|
|
474
338
|
}>>>;
|
|
475
339
|
}>;
|
|
476
|
-
readonly
|
|
340
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
341
|
+
readonly pages: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
|
|
477
342
|
readonly targetId: Schema.String;
|
|
478
|
-
readonly generation: Schema.Number;
|
|
479
343
|
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
480
344
|
readonly title: Schema.String;
|
|
481
345
|
readonly url: Schema.String;
|
|
482
|
-
readonly viewport: Schema.Struct<{
|
|
346
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
483
347
|
readonly width: Schema.Number;
|
|
484
348
|
readonly height: Schema.Number;
|
|
485
349
|
readonly deviceScaleFactor: Schema.Number;
|
|
@@ -487,37 +351,140 @@ declare const BrowserStatus: Schema.Struct<{
|
|
|
487
351
|
readonly contentHeight: Schema.Number;
|
|
488
352
|
readonly canvasWidth: Schema.Number;
|
|
489
353
|
readonly canvasHeight: Schema.Number;
|
|
490
|
-
}
|
|
354
|
+
}>>;
|
|
355
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
491
356
|
}>>, never>;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
357
|
+
}>, Schema.Struct<{
|
|
358
|
+
readonly status: Schema.Literal<"suspended">;
|
|
359
|
+
readonly source: Schema.Literal<"persisted">;
|
|
360
|
+
readonly capturedAt: Schema.String;
|
|
361
|
+
readonly representativeTargetId: Schema.optionalKey<Schema.String>;
|
|
362
|
+
readonly sessionId: Schema.String;
|
|
363
|
+
readonly cdpUrl: Schema.String;
|
|
364
|
+
readonly media: Schema.Struct<{
|
|
365
|
+
readonly mode: Schema.Literals<readonly ["auto", "cdp"]>;
|
|
366
|
+
readonly webrtcProducer: Schema.Boolean;
|
|
367
|
+
readonly iceServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
368
|
+
readonly urls: Schema.$Array<Schema.String>;
|
|
369
|
+
readonly username: Schema.optionalKey<Schema.String>;
|
|
370
|
+
readonly credential: Schema.optionalKey<Schema.suspend<Schema.Codec<Api.SensitiveString, string, never, never>>>;
|
|
371
|
+
}>>>;
|
|
372
|
+
}>;
|
|
373
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
374
|
+
readonly pages: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
|
|
375
|
+
readonly targetId: Schema.String;
|
|
376
|
+
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
377
|
+
readonly title: Schema.String;
|
|
378
|
+
readonly url: Schema.String;
|
|
379
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
380
|
+
readonly width: Schema.Number;
|
|
381
|
+
readonly height: Schema.Number;
|
|
382
|
+
readonly deviceScaleFactor: Schema.Number;
|
|
383
|
+
readonly contentWidth: Schema.Number;
|
|
384
|
+
readonly contentHeight: Schema.Number;
|
|
385
|
+
readonly canvasWidth: Schema.Number;
|
|
386
|
+
readonly canvasHeight: Schema.Number;
|
|
387
|
+
}>>;
|
|
388
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
389
|
+
}>>, never>;
|
|
390
|
+
}>, Schema.Struct<{
|
|
391
|
+
readonly status: Schema.Literal<"suspended">;
|
|
392
|
+
readonly source: Schema.Literal<"unavailable">;
|
|
393
|
+
readonly sessionId: Schema.String;
|
|
394
|
+
readonly cdpUrl: Schema.String;
|
|
395
|
+
readonly media: Schema.Struct<{
|
|
396
|
+
readonly mode: Schema.Literals<readonly ["auto", "cdp"]>;
|
|
397
|
+
readonly webrtcProducer: Schema.Boolean;
|
|
398
|
+
readonly iceServers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
399
|
+
readonly urls: Schema.$Array<Schema.String>;
|
|
400
|
+
readonly username: Schema.optionalKey<Schema.String>;
|
|
401
|
+
readonly credential: Schema.optionalKey<Schema.suspend<Schema.Codec<Api.SensitiveString, string, never, never>>>;
|
|
402
|
+
}>>>;
|
|
403
|
+
}>;
|
|
404
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
405
|
+
readonly pages: Schema.withDecodingDefaultKey<Schema.$Array<Schema.Struct<{
|
|
406
|
+
readonly targetId: Schema.String;
|
|
407
|
+
readonly state: Schema.Literals<readonly ["pending", "ready", "unavailable", "closed"]>;
|
|
408
|
+
readonly title: Schema.String;
|
|
409
|
+
readonly url: Schema.String;
|
|
410
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
411
|
+
readonly width: Schema.Number;
|
|
412
|
+
readonly height: Schema.Number;
|
|
413
|
+
readonly deviceScaleFactor: Schema.Number;
|
|
414
|
+
readonly contentWidth: Schema.Number;
|
|
415
|
+
readonly contentHeight: Schema.Number;
|
|
416
|
+
readonly canvasWidth: Schema.Number;
|
|
417
|
+
readonly canvasHeight: Schema.Number;
|
|
418
|
+
}>>;
|
|
419
|
+
readonly thumbnailAvailable: Schema.Boolean;
|
|
420
|
+
}>>, never>;
|
|
421
|
+
}>]>;
|
|
422
|
+
/**
|
|
423
|
+
* A recording as the live session reports it. Sessions that are still running an
|
|
424
|
+
* older wrapper send only `path`, which decoding carries over into `relativePath`.
|
|
425
|
+
*/
|
|
426
|
+
declare const Recording: Schema.decodeTo<Schema.Struct<{
|
|
427
|
+
readonly relativePath: Schema.String;
|
|
495
428
|
readonly recordingId: Schema.String;
|
|
496
429
|
readonly mode: Schema.Literals<readonly ["tab", "viewer"]>;
|
|
497
430
|
readonly targetId: Schema.String;
|
|
498
431
|
readonly captureGeneration: Schema.Number;
|
|
499
432
|
readonly status: Schema.Literals<readonly ["starting", "running", "stopped", "failed"]>;
|
|
500
433
|
readonly stopReason: Schema.optionalKey<Schema.String>;
|
|
501
|
-
readonly
|
|
434
|
+
readonly sandboxPath: Schema.optionalKey<Schema.String>;
|
|
435
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
502
436
|
readonly startedAt: Schema.String;
|
|
503
437
|
readonly stoppedAt: Schema.optionalKey<Schema.String>;
|
|
504
438
|
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
505
439
|
readonly fps: Schema.Number;
|
|
506
440
|
readonly bitrateKbps: Schema.Number;
|
|
507
441
|
readonly codec: Schema.String;
|
|
508
|
-
|
|
442
|
+
readonly editing: Schema.Boolean;
|
|
443
|
+
readonly editedRelativePath: Schema.optionalKey<Schema.String>;
|
|
444
|
+
readonly timelineRelativePath: Schema.optionalKey<Schema.String>;
|
|
445
|
+
readonly editError: Schema.optionalKey<Schema.Struct<{
|
|
446
|
+
readonly code: Schema.Literals<readonly ["ffmpeg_unavailable", "open_failed", "nothing_kept", "analysis_failed", "plan_failed", "render_failed", "timeout", "cancelled", "timeline_failed"]>;
|
|
447
|
+
readonly message: Schema.String;
|
|
448
|
+
}>>;
|
|
449
|
+
}>, Schema.Struct<{
|
|
450
|
+
readonly relativePath: Schema.optionalKey<Schema.String>;
|
|
451
|
+
readonly recordingId: Schema.String;
|
|
452
|
+
readonly mode: Schema.Literals<readonly ["tab", "viewer"]>;
|
|
453
|
+
readonly targetId: Schema.String;
|
|
454
|
+
readonly captureGeneration: Schema.Number;
|
|
455
|
+
readonly status: Schema.Literals<readonly ["starting", "running", "stopped", "failed"]>;
|
|
456
|
+
readonly stopReason: Schema.optionalKey<Schema.String>;
|
|
457
|
+
readonly sandboxPath: Schema.optionalKey<Schema.String>;
|
|
458
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
459
|
+
readonly startedAt: Schema.String;
|
|
460
|
+
readonly stoppedAt: Schema.optionalKey<Schema.String>;
|
|
461
|
+
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
462
|
+
readonly fps: Schema.Number;
|
|
463
|
+
readonly bitrateKbps: Schema.Number;
|
|
464
|
+
readonly codec: Schema.String;
|
|
465
|
+
readonly editing: Schema.Boolean;
|
|
466
|
+
readonly editedRelativePath: Schema.optionalKey<Schema.String>;
|
|
467
|
+
readonly timelineRelativePath: Schema.optionalKey<Schema.String>;
|
|
468
|
+
readonly editError: Schema.optionalKey<Schema.Struct<{
|
|
469
|
+
readonly code: Schema.Literals<readonly ["ffmpeg_unavailable", "open_failed", "nothing_kept", "analysis_failed", "plan_failed", "render_failed", "timeout", "cancelled", "timeline_failed"]>;
|
|
470
|
+
readonly message: Schema.String;
|
|
471
|
+
}>>;
|
|
472
|
+
}>, never, never>;
|
|
509
473
|
type BrowserStatus = typeof BrowserStatus.Type;
|
|
474
|
+
type BrowserPage = typeof BrowserPage.Type;
|
|
510
475
|
type Recording = typeof Recording.Type;
|
|
511
476
|
//#endregion
|
|
512
477
|
//#region src/sessions/service.d.ts
|
|
513
478
|
type Call$4<A> = Effect.Effect<A, ApiRequestError>;
|
|
514
|
-
interface
|
|
479
|
+
interface SessionsFilter {
|
|
515
480
|
limit?: number;
|
|
516
|
-
cursor?: string;
|
|
517
481
|
includeDeleted?: boolean;
|
|
518
482
|
status?: Api.SessionStatus;
|
|
483
|
+
query?: string;
|
|
519
484
|
tags?: TagFilterValue;
|
|
520
485
|
}
|
|
486
|
+
type SessionsListParams = SessionsFilter & PageCursor;
|
|
487
|
+
type SessionsList = PaginatedList<SessionsFilter, Session>;
|
|
521
488
|
type InitialBrowserTarget = Api.InitialBrowserTarget;
|
|
522
489
|
type InitialBrowserStorageState = Api.InitialBrowserStorageState;
|
|
523
490
|
interface CreateSessionInput {
|
|
@@ -530,6 +497,7 @@ interface CreateSessionInput {
|
|
|
530
497
|
initialTargets?: readonly InitialBrowserTarget[];
|
|
531
498
|
storageState?: InitialBrowserStorageState;
|
|
532
499
|
tags?: Record<string, string>;
|
|
500
|
+
proxy?: ProxyConfig;
|
|
533
501
|
}
|
|
534
502
|
interface CreateSessionOptions {
|
|
535
503
|
waitForReady?: boolean;
|
|
@@ -540,13 +508,39 @@ interface PromoteSessionInput {
|
|
|
540
508
|
force?: boolean;
|
|
541
509
|
tags?: Record<string, string>;
|
|
542
510
|
}
|
|
511
|
+
type CreateSessionRecordingInput = Api.CreateSessionRecordingInput;
|
|
512
|
+
type RecordingCaptionInput = Api.RecordingCaptionInput;
|
|
513
|
+
type RecordingFocusInput = Api.RecordingFocusInput;
|
|
514
|
+
type RecordingAttentionInput = Api.RecordingAttentionInput;
|
|
515
|
+
type SessionFileDownloadURLInput = Api.SessionFileDownloadURLInput;
|
|
543
516
|
interface DownloadedFile {
|
|
544
517
|
blob: Blob;
|
|
545
518
|
filename: string | null;
|
|
546
519
|
}
|
|
520
|
+
/**
|
|
521
|
+
* One file to upload. Blob and Uint8Array contents are sent as FormData. Any stream content
|
|
522
|
+
* makes the whole body a streamed request, which browsers other than Chromium cannot send;
|
|
523
|
+
* a stream failure aborts the upload and surfaces as a `network_error`.
|
|
524
|
+
*/
|
|
525
|
+
interface SessionUploadFile {
|
|
526
|
+
name: string;
|
|
527
|
+
content: Blob | Uint8Array | Stream.Stream<Uint8Array, unknown>;
|
|
528
|
+
}
|
|
529
|
+
interface UploadSessionFilesOptions {
|
|
530
|
+
/** Directory below the session files root; `uploads` when omitted. */
|
|
531
|
+
directory?: string;
|
|
532
|
+
}
|
|
533
|
+
type MoveSessionFileInput = Api.MoveSessionFileInput;
|
|
534
|
+
interface DeleteSessionFileOptions {
|
|
535
|
+
/** Delete a directory together with everything below it. */
|
|
536
|
+
recursive?: boolean;
|
|
537
|
+
}
|
|
547
538
|
declare const SessionsApi_base: Context.ServiceClass<SessionsApi, "@aperture-browser/api-client/SessionsApi", {
|
|
548
|
-
readonly listSessions:
|
|
549
|
-
readonly
|
|
539
|
+
readonly listSessions: SessionsList["list"];
|
|
540
|
+
readonly streamSessions: SessionsList["stream"];
|
|
541
|
+
readonly listAllSessions: SessionsList["listAll"];
|
|
542
|
+
readonly exportSessionStorageState: (credentials: ApiCredentials, sessionId: string, input: Api.ExportSessionStorageStateInput) => Call$4<Api.InitialBrowserStorageState>;
|
|
543
|
+
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
544
|
readonly getSessionsBulk: (credentials: ApiCredentials, sessionIds: readonly string[]) => Call$4<SessionsBulkResponse>;
|
|
551
545
|
readonly createSession: (credentials: ApiCredentials, input: CreateSessionInput, options?: CreateSessionOptions) => Call$4<CreateSessionResponse>;
|
|
552
546
|
readonly deleteSession: (credentials: ApiCredentials, sessionId: string) => Call$4<SessionMutationResponse>;
|
|
@@ -554,77 +548,76 @@ declare const SessionsApi_base: Context.ServiceClass<SessionsApi, "@aperture-bro
|
|
|
554
548
|
readonly suspendSession: (credentials: ApiCredentials, sessionId: string) => Call$4<SessionMutationResponse>;
|
|
555
549
|
readonly rotateSessionToken: (credentials: ApiCredentials, sessionId: string) => Call$4<SessionMutationResponse>;
|
|
556
550
|
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>;
|
|
551
|
+
readonly replaceSessionTags: (credentials: ApiCredentials, sessionId: string, tags: Record<string, string>) => Call$4<SessionMutationResponse>; /** Replaces the session's egress proxy; new connections use it immediately. */
|
|
552
|
+
readonly updateSessionProxy: (credentials: ApiCredentials, sessionId: string, proxy: UpdateProxyConfig) => Call$4<SessionMutationResponse>;
|
|
558
553
|
readonly promoteSession: (credentials: ApiCredentials, sessionId: string, input: PromoteSessionInput) => Call$4<PromoteSessionResponse>;
|
|
559
|
-
readonly
|
|
560
|
-
readonly
|
|
561
|
-
readonly
|
|
554
|
+
readonly getSessionCursor: (credentials: ApiCredentials, sessionId: string) => Call$4<CursorVisibility>;
|
|
555
|
+
readonly setSessionCursor: (credentials: ApiCredentials, sessionId: string, visible: boolean) => Call$4<CursorVisibility>;
|
|
556
|
+
readonly listSessionRecordings: (credentials: ApiCredentials, sessionId: string) => Call$4<ReadonlyArray<SessionRecording>>;
|
|
557
|
+
readonly createSessionRecording: (credentials: ApiCredentials, sessionId: string, input: CreateSessionRecordingInput) => Call$4<SessionRecording>;
|
|
558
|
+
readonly getSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Call$4<SessionRecording>; /** Moves a running tab recording to another ready target. */
|
|
559
|
+
readonly retargetSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, targetId: string) => Call$4<SessionRecording>;
|
|
560
|
+
/**
|
|
561
|
+
* Stops a recording and returns it at once with its raw video published. The edit runs
|
|
562
|
+
* afterwards: the recording stays `editing` until `editedRelativePath` or `editError` is set,
|
|
563
|
+
* which `getSessionRecording` reports.
|
|
564
|
+
*/
|
|
565
|
+
readonly stopSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Call$4<SessionRecording>;
|
|
566
|
+
readonly captionSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, input: RecordingCaptionInput) => Call$4<void>;
|
|
567
|
+
readonly focusSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, input: RecordingFocusInput) => Call$4<void>;
|
|
568
|
+
readonly attentionSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, input: RecordingAttentionInput) => Call$4<void>;
|
|
569
|
+
/**
|
|
570
|
+
* Every file and directory of the session, also while it is not running. See
|
|
571
|
+
* `sessionFileTree`.
|
|
572
|
+
*/
|
|
573
|
+
readonly listSessionFiles: (credentials: ApiCredentials, sessionId: string) => Call$4<ReadonlyArray<SessionFileEntry>>;
|
|
574
|
+
/**
|
|
575
|
+
* Stores files in a directory of the session's files, `uploads` by default, in any
|
|
576
|
+
* retained state. Contents are sent as described for `SessionUploadFile`.
|
|
577
|
+
*/
|
|
578
|
+
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`. */
|
|
579
|
+
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. */
|
|
580
|
+
readonly moveSessionFile: (credentials: ApiCredentials, sessionId: string, input: MoveSessionFileInput) => Call$4<SessionFileEntry>; /** Creates a directory, with any missing parents. */
|
|
581
|
+
readonly createSessionDirectory: (credentials: ApiCredentials, sessionId: string, relativePath: string) => Call$4<SessionDirectory>;
|
|
582
|
+
/**
|
|
583
|
+
* A signed URL that serves one session file without credentials until it expires.
|
|
584
|
+
* `disposition: "inline"` makes it usable as an `<img>` or `<video>` source.
|
|
585
|
+
*/
|
|
586
|
+
readonly createSessionFileDownloadURL: (credentials: ApiCredentials, sessionId: string, input: SessionFileDownloadURLInput) => Call$4<SessionFileDownloadURL>;
|
|
587
|
+
readonly getBrowserChannels: (credentials: ApiCredentials) => Call$4<BrowserChannelsResponse>; /** Reads live or persisted page metadata without waking or keeping the session alive. */
|
|
588
|
+
readonly getBrowserStatus: (credentials: ApiCredentials, sessionId: string, sessionToken?: Redacted.Redacted<string>) => Call$4<BrowserStatus>;
|
|
589
|
+
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. */
|
|
590
|
+
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. */
|
|
591
|
+
readonly streamSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Stream.Stream<Uint8Array, ApiRequestError>;
|
|
592
|
+
/**
|
|
593
|
+
* Stores files in the running session's `uploads` directory through the session itself,
|
|
594
|
+
* which also accepts its `sessionToken`.
|
|
595
|
+
*/
|
|
596
|
+
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. */
|
|
597
|
+
readonly setSessionViewport: (credentials: ApiCredentials, sessionId: string, input: SetViewportInput, sessionToken?: Redacted.Redacted<string>) => Call$4<TargetViewport>;
|
|
562
598
|
}>;
|
|
563
599
|
/** Browser sessions, their live browser, and their recordings. */
|
|
564
600
|
declare class SessionsApi extends SessionsApi_base {}
|
|
565
601
|
//#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
602
|
//#region src/snapshots/service.d.ts
|
|
614
603
|
type Call$3<A> = Effect.Effect<A, ApiRequestError>;
|
|
615
|
-
interface
|
|
604
|
+
interface SnapshotsFilter {
|
|
616
605
|
limit?: number;
|
|
617
|
-
cursor?: string;
|
|
618
606
|
includeDeleted?: boolean;
|
|
619
607
|
deleted?: "active" | "deleted" | "all";
|
|
620
608
|
name?: string;
|
|
621
609
|
tags?: TagFilterValue;
|
|
622
610
|
}
|
|
611
|
+
type SnapshotsListParams = SnapshotsFilter & PageCursor;
|
|
612
|
+
type SnapshotsList = PaginatedList<SnapshotsFilter, Snapshot>;
|
|
623
613
|
interface UpdateSnapshotInput {
|
|
624
614
|
description: string | null;
|
|
625
615
|
}
|
|
626
616
|
declare const SnapshotsApi_base: Context.ServiceClass<SnapshotsApi, "@aperture-browser/api-client/SnapshotsApi", {
|
|
627
|
-
readonly listSnapshots:
|
|
617
|
+
readonly listSnapshots: SnapshotsList["list"];
|
|
618
|
+
readonly streamSnapshots: SnapshotsList["stream"];
|
|
619
|
+
readonly listAllSnapshots: SnapshotsList["listAll"]; /** The active snapshot with exactly this name, if there is one. */
|
|
620
|
+
readonly getSnapshotByName: (credentials: ApiCredentials, name: string) => Call$3<Option.Option<Snapshot>>;
|
|
628
621
|
readonly updateSnapshot: (credentials: ApiCredentials, name: string, input: UpdateSnapshotInput) => Call$3<SnapshotMutationResponse>;
|
|
629
622
|
readonly replaceSnapshotTags: (credentials: ApiCredentials, name: string, tags: Record<string, string>) => Call$3<SnapshotMutationResponse>;
|
|
630
623
|
readonly deleteSnapshot: (credentials: ApiCredentials, name: string) => Call$3<SnapshotMutationResponse>;
|
|
@@ -633,55 +626,42 @@ declare const SnapshotsApi_base: Context.ServiceClass<SnapshotsApi, "@aperture-b
|
|
|
633
626
|
/** Retained snapshots that new sessions start from. */
|
|
634
627
|
declare class SnapshotsApi extends SnapshotsApi_base {}
|
|
635
628
|
//#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
629
|
//#region src/tenants/service.d.ts
|
|
647
630
|
type Call$2<A> = Effect.Effect<A, ApiRequestError>;
|
|
648
|
-
interface
|
|
631
|
+
interface TenantsFilter {
|
|
649
632
|
limit?: number;
|
|
650
|
-
cursor?: string;
|
|
651
633
|
includeDeleted?: boolean;
|
|
652
634
|
deleted?: "active" | "deleted" | "all";
|
|
635
|
+
query?: string;
|
|
653
636
|
}
|
|
637
|
+
type TenantsListParams = TenantsFilter & PageCursor;
|
|
638
|
+
type TenantsList = PaginatedList<TenantsFilter, Tenant>;
|
|
654
639
|
declare const TenantsApi_base: Context.ServiceClass<TenantsApi, "@aperture-browser/api-client/TenantsApi", {
|
|
655
|
-
readonly listTenants:
|
|
640
|
+
readonly listTenants: TenantsList["list"];
|
|
641
|
+
readonly streamTenants: TenantsList["stream"];
|
|
642
|
+
readonly listAllTenants: TenantsList["listAll"];
|
|
656
643
|
readonly createTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Call$2<Tenant>;
|
|
657
644
|
readonly updateTenant: (credentials: ApiCredentials, tenantId: string, input: Api.TenantInput) => Call$2<Tenant>;
|
|
658
645
|
readonly deleteTenant: (credentials: ApiCredentials, tenantId: string) => Call$2<Tenant>;
|
|
659
|
-
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Call$2<Tenant>;
|
|
646
|
+
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Call$2<Tenant>; /** The tenant of a tenant token. */
|
|
647
|
+
readonly getCurrentTenant: (credentials: ApiCredentials) => Call$2<Tenant>;
|
|
648
|
+
readonly updateCurrentTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Call$2<Tenant>;
|
|
660
649
|
}>;
|
|
661
|
-
/** Tenant administration. */
|
|
650
|
+
/** Tenant administration, and the tenant a tenant token belongs to. */
|
|
662
651
|
declare class TenantsApi extends TenantsApi_base {}
|
|
663
652
|
//#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
653
|
//#region src/tokens/service.d.ts
|
|
675
654
|
type Call$1<A> = Effect.Effect<A, ApiRequestError>;
|
|
676
|
-
interface
|
|
655
|
+
interface TokensFilter {
|
|
677
656
|
limit?: number;
|
|
678
|
-
cursor?: string;
|
|
679
657
|
tenantId?: string;
|
|
680
658
|
name?: string;
|
|
681
659
|
authorityType?: "system_admin" | "tenant";
|
|
682
660
|
revoked?: "all" | "active" | "revoked";
|
|
683
661
|
scope?: string;
|
|
684
662
|
}
|
|
663
|
+
type TokensListParams = TokensFilter & PageCursor;
|
|
664
|
+
type TokensList = PaginatedList<TokensFilter, ApiToken>;
|
|
685
665
|
interface CreateAdminTokenInput {
|
|
686
666
|
name: string;
|
|
687
667
|
authorityType: "system_admin" | "tenant";
|
|
@@ -699,42 +679,38 @@ interface CreateTenantTokenInput {
|
|
|
699
679
|
expiresAt?: string | null;
|
|
700
680
|
}
|
|
701
681
|
declare const TokensApi_base: Context.ServiceClass<TokensApi, "@aperture-browser/api-client/TokensApi", {
|
|
702
|
-
readonly listAdminTokens:
|
|
682
|
+
readonly listAdminTokens: TokensList["list"];
|
|
683
|
+
readonly streamAdminTokens: TokensList["stream"];
|
|
684
|
+
readonly listAllAdminTokens: TokensList["listAll"];
|
|
703
685
|
readonly createAdminToken: (credentials: ApiCredentials, input: CreateAdminTokenInput) => Call$1<CreateTokenResponse>;
|
|
704
686
|
readonly revokeAdminToken: (credentials: ApiCredentials, tokenId: string) => Call$1<void>;
|
|
705
|
-
readonly listTenantTokens:
|
|
687
|
+
readonly listTenantTokens: TokensList["list"];
|
|
688
|
+
readonly streamTenantTokens: TokensList["stream"];
|
|
689
|
+
readonly listAllTenantTokens: TokensList["listAll"];
|
|
706
690
|
readonly createTenantToken: (credentials: ApiCredentials, input: CreateTenantTokenInput) => Call$1<CreateTokenResponse>;
|
|
707
691
|
readonly revokeTenantToken: (credentials: ApiCredentials, tokenId: string) => Call$1<void>;
|
|
708
692
|
}>;
|
|
709
693
|
/** API tokens, issued either deployment-wide or within the current tenant. */
|
|
710
694
|
declare class TokensApi extends TokensApi_base {}
|
|
711
695
|
//#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
696
|
//#region src/users/service.d.ts
|
|
724
697
|
type Call<A> = Effect.Effect<A, ApiRequestError>;
|
|
725
|
-
interface
|
|
698
|
+
interface UsersFilter {
|
|
726
699
|
limit?: number;
|
|
727
|
-
cursor?: string;
|
|
728
700
|
query?: string;
|
|
729
701
|
disabled?: "active" | "disabled" | "all";
|
|
730
702
|
}
|
|
703
|
+
type UsersListParams = UsersFilter & PageCursor;
|
|
704
|
+
type UsersList = PaginatedList<UsersFilter, User>;
|
|
731
705
|
interface UserInput {
|
|
732
706
|
email: string | null;
|
|
733
707
|
displayName: string;
|
|
734
708
|
isSystemAdmin: boolean;
|
|
735
709
|
}
|
|
736
710
|
declare const UsersApi_base: Context.ServiceClass<UsersApi, "@aperture-browser/api-client/UsersApi", {
|
|
737
|
-
readonly listUsers:
|
|
711
|
+
readonly listUsers: UsersList["list"];
|
|
712
|
+
readonly streamUsers: UsersList["stream"];
|
|
713
|
+
readonly listAllUsers: UsersList["listAll"];
|
|
738
714
|
readonly createUser: (credentials: ApiCredentials, input: UserInput) => Call<User>;
|
|
739
715
|
readonly getUser: (credentials: ApiCredentials, userId: string) => Call<User>;
|
|
740
716
|
readonly updateUser: (credentials: ApiCredentials, userId: string, input: UserInput) => Call<User>;
|
|
@@ -742,15 +718,292 @@ declare const UsersApi_base: Context.ServiceClass<UsersApi, "@aperture-browser/a
|
|
|
742
718
|
readonly disableUser: (credentials: ApiCredentials, userId: string) => Call<User>;
|
|
743
719
|
readonly restoreUser: (credentials: ApiCredentials, userId: string) => Call<User>;
|
|
744
720
|
readonly listUserMemberships: (credentials: ApiCredentials, userId: string) => Call<ReadonlyArray<TenantMembership>>;
|
|
721
|
+
readonly listTenantMemberships: (credentials: ApiCredentials, tenantId: string) => Call<ReadonlyArray<TenantMembership>>;
|
|
745
722
|
readonly upsertTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string, scopes: readonly string[]) => Call<TenantMembership>;
|
|
746
723
|
readonly deleteTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string) => Call<void>;
|
|
747
724
|
}>;
|
|
748
725
|
/** User administration and tenant memberships. */
|
|
749
726
|
declare class UsersApi extends UsersApi_base {}
|
|
750
727
|
//#endregion
|
|
728
|
+
//#region src/client.d.ts
|
|
729
|
+
type CredentialedMethod = (credentials: ApiCredentials, ...args: never[]) => unknown;
|
|
730
|
+
/** A service whose methods have their leading credentials argument already applied. */
|
|
731
|
+
type WithCredentials<S> = { readonly [K in keyof S]: S[K] extends ((credentials: ApiCredentials, ...args: infer Args) => infer Result) ? (...args: Args) => Result : never };
|
|
732
|
+
/** Binds `credentials` as the first argument of every method of `service`. */
|
|
733
|
+
declare function withCredentials<S extends { readonly [K in keyof S]: CredentialedMethod }>(service: S, credentials: ApiCredentials): WithCredentials<S>;
|
|
734
|
+
declare const ApertureClient_base: Context.ServiceClass<ApertureClient, "@aperture-browser/api-client/ApertureClient", {
|
|
735
|
+
readonly sessions: WithCredentials<SessionsApi["Service"]>;
|
|
736
|
+
readonly snapshots: WithCredentials<SnapshotsApi["Service"]>;
|
|
737
|
+
readonly tenants: WithCredentials<TenantsApi["Service"]>;
|
|
738
|
+
readonly users: WithCredentials<UsersApi["Service"]>;
|
|
739
|
+
readonly tokens: WithCredentials<TokensApi["Service"]>;
|
|
740
|
+
readonly events: WithCredentials<EventsApi["Service"]>; /** The calls of AuthApi that work with API credentials rather than a browser login. */
|
|
741
|
+
readonly auth: {
|
|
742
|
+
readonly getAuthMe: () => Effect.Effect<AuthMeResponse, ApiRequestError>;
|
|
743
|
+
};
|
|
744
|
+
readonly health: HealthApi["Service"];
|
|
745
|
+
}>;
|
|
746
|
+
/**
|
|
747
|
+
* The credentialed API services with one set of credentials bound, for callers that always
|
|
748
|
+
* act as the same principal, such as a server holding one API token.
|
|
749
|
+
*/
|
|
750
|
+
declare class ApertureClient extends ApertureClient_base {}
|
|
751
|
+
declare const makeApertureClient: (credentials: ApiCredentials) => Effect.Effect<{
|
|
752
|
+
readonly sessions: WithCredentials<SessionsApi["Service"]>;
|
|
753
|
+
readonly snapshots: WithCredentials<SnapshotsApi["Service"]>;
|
|
754
|
+
readonly tenants: WithCredentials<TenantsApi["Service"]>;
|
|
755
|
+
readonly users: WithCredentials<UsersApi["Service"]>;
|
|
756
|
+
readonly tokens: WithCredentials<TokensApi["Service"]>;
|
|
757
|
+
readonly events: WithCredentials<EventsApi["Service"]>; /** The calls of AuthApi that work with API credentials rather than a browser login. */
|
|
758
|
+
readonly auth: {
|
|
759
|
+
readonly getAuthMe: () => Effect.Effect<AuthMeResponse, ApiRequestError>;
|
|
760
|
+
};
|
|
761
|
+
readonly health: HealthApi["Service"];
|
|
762
|
+
}, never, AuthApi | HealthApi | SessionsApi | SnapshotsApi | TenantsApi | UsersApi | TokensApi | EventsApi>;
|
|
763
|
+
/** ApertureClient acting with `credentials`, over the HttpClient the app provides. */
|
|
764
|
+
declare const apertureClientLayer: (credentials: ApiCredentials) => Layer.Layer<ApertureClient, never, import("effect/http/HttpClient").HttpClient>;
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region src/events/layer.d.ts
|
|
767
|
+
declare const makeEventsApi: Effect.Effect<{
|
|
768
|
+
readonly listEvents: (credentials: ApiCredentials, params?: (EventsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Event>, ApiRequestError, never>;
|
|
769
|
+
readonly streamEvents: (credentials: ApiCredentials, filter?: EventsFilter | undefined) => import("effect/Stream").Stream<Api.Event, ApiRequestError, never>;
|
|
770
|
+
readonly listAllEvents: (credentials: ApiCredentials, filter?: EventsFilter | undefined) => Effect.Effect<readonly Api.Event[], ApiRequestError, never>;
|
|
771
|
+
readonly listAuditEvents: (credentials: ApiCredentials, params?: (AuditEventsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.AuditEvent>, ApiRequestError, never>;
|
|
772
|
+
readonly streamAuditEvents: (credentials: ApiCredentials, filter?: AuditEventsFilter | undefined) => import("effect/Stream").Stream<Api.AuditEvent, ApiRequestError, never>;
|
|
773
|
+
readonly listAllAuditEvents: (credentials: ApiCredentials, filter?: AuditEventsFilter | undefined) => Effect.Effect<readonly Api.AuditEvent[], ApiRequestError, never>;
|
|
774
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
775
|
+
declare const eventsApiLayer: Layer.Layer<EventsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
776
|
+
//#endregion
|
|
777
|
+
//#region src/health/layer.d.ts
|
|
778
|
+
declare const makeHealthApi: Effect.Effect<{
|
|
779
|
+
readonly getHealth: () => Effect.Effect<Health, ApiRequestError>;
|
|
780
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
781
|
+
declare const healthApiLayer: Layer.Layer<HealthApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
782
|
+
//#endregion
|
|
783
|
+
//#region src/layer.d.ts
|
|
784
|
+
/**
|
|
785
|
+
* Every API service, sharing one ApiAuthorization. The services send requests through the
|
|
786
|
+
* HttpClient the app provides, decorated with each call's authorization.
|
|
787
|
+
*/
|
|
788
|
+
declare const apiClientLayer: Layer.Layer<AuthApi | ApiAuthorization | HealthApi | SessionsApi | SnapshotsApi | TenantsApi | UsersApi | TokensApi | EventsApi, never, HttpClient.HttpClient>;
|
|
789
|
+
type ApiServices = Layer.Success<typeof apiClientLayer>;
|
|
790
|
+
declare const baseUrlLayer: (baseUrl: string) => Layer.Layer<HttpClient.HttpClient, never, HttpClient.HttpClient>;
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region src/sessions/layer.d.ts
|
|
793
|
+
declare const contentDispositionFilename: (header: string | undefined) => string | null;
|
|
794
|
+
declare const makeSessionsApi: Effect.Effect<{
|
|
795
|
+
readonly listSessions: (credentials: ApiCredentials, params?: (SessionsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Session>, ApiRequestError, never>;
|
|
796
|
+
readonly streamSessions: (credentials: ApiCredentials, filter?: SessionsFilter | undefined) => Stream.Stream<Api.Session, ApiRequestError, never>;
|
|
797
|
+
readonly listAllSessions: (credentials: ApiCredentials, filter?: SessionsFilter | undefined) => Effect.Effect<readonly Api.Session[], ApiRequestError, never>;
|
|
798
|
+
readonly exportSessionStorageState: (credentials: ApiCredentials, sessionId: string, input: Api.ExportSessionStorageStateInput) => Effect.Effect<Api.InitialBrowserStorageState, ApiRequestError, never>;
|
|
799
|
+
readonly getSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.Session, ApiRequestError, never>;
|
|
800
|
+
readonly getSessionsBulk: (credentials: ApiCredentials, sessionIds: readonly string[]) => Effect.Effect<Api.SessionBulkResponse, ApiRequestError, never>;
|
|
801
|
+
readonly createSession: (credentials: ApiCredentials, input: CreateSessionInput, options?: CreateSessionOptions) => Effect.Effect<Api.CreateSessionResult, ApiRequestError, never>;
|
|
802
|
+
readonly deleteSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
803
|
+
readonly reopenSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
804
|
+
readonly suspendSession: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
805
|
+
readonly rotateSessionToken: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
806
|
+
readonly rotateCollaborationCapability: (credentials: ApiCredentials, sessionId: string, role: "editor" | "viewer") => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
807
|
+
readonly replaceSessionTags: (credentials: ApiCredentials, sessionId: string, tags: Record<string, string>) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
808
|
+
readonly updateSessionProxy: (credentials: ApiCredentials, sessionId: string, proxy: UpdateProxyConfig) => Effect.Effect<Api.SessionMutation, ApiRequestError, never>;
|
|
809
|
+
readonly promoteSession: (credentials: ApiCredentials, sessionId: string, input: PromoteSessionInput) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
810
|
+
readonly getSessionCursor: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<Api.CursorVisibility, ApiRequestError, never>;
|
|
811
|
+
readonly setSessionCursor: (credentials: ApiCredentials, sessionId: string, visible: boolean) => Effect.Effect<Api.CursorVisibility, ApiRequestError, never>;
|
|
812
|
+
readonly listSessionRecordings: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<readonly Api.Recording[], ApiRequestError, never>;
|
|
813
|
+
readonly createSessionRecording: (credentials: ApiCredentials, sessionId: string, input: CreateSessionRecordingInput) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
814
|
+
readonly getSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
815
|
+
readonly retargetSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, targetId: string) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
816
|
+
readonly stopSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string) => Effect.Effect<Api.Recording, ApiRequestError, never>;
|
|
817
|
+
readonly captionSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, input: RecordingCaptionInput) => Effect.Effect<void, ApiRequestError, never>;
|
|
818
|
+
readonly focusSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, input: RecordingFocusInput) => Effect.Effect<void, ApiRequestError, never>;
|
|
819
|
+
readonly attentionSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, input: RecordingAttentionInput) => Effect.Effect<void, ApiRequestError, never>;
|
|
820
|
+
readonly listSessionFiles: (credentials: ApiCredentials, sessionId: string) => Effect.Effect<readonly Api.SessionFileEntry[], ApiRequestError, never>;
|
|
821
|
+
readonly uploadSessionFiles: (credentials: ApiCredentials, sessionId: string, files: ReadonlyArray<SessionUploadFile>, options?: UploadSessionFilesOptions) => Effect.Effect<readonly Api.SessionFile[], ApiRequestError, never>;
|
|
822
|
+
readonly deleteSessionFile: (credentials: ApiCredentials, sessionId: string, relativePath: string, options?: DeleteSessionFileOptions) => Effect.Effect<void, ApiRequestError, never>;
|
|
823
|
+
readonly moveSessionFile: (credentials: ApiCredentials, sessionId: string, input: MoveSessionFileInput) => Effect.Effect<Api.SessionFileEntry, ApiRequestError, never>;
|
|
824
|
+
readonly createSessionDirectory: (credentials: ApiCredentials, sessionId: string, relativePath: string) => Effect.Effect<Api.SessionDirectory, ApiRequestError, never>;
|
|
825
|
+
readonly createSessionFileDownloadURL: (credentials: ApiCredentials, sessionId: string, input: SessionFileDownloadURLInput) => Effect.Effect<Api.SessionFileDownloadURL, ApiRequestError, never>;
|
|
826
|
+
readonly getBrowserChannels: (credentials: ApiCredentials) => Effect.Effect<Api.BrowserChannels, ApiRequestError, never>;
|
|
827
|
+
readonly getBrowserStatus: (credentials: ApiCredentials, sessionId: string, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<{
|
|
828
|
+
readonly status: "running";
|
|
829
|
+
readonly thumbnailAvailable: boolean;
|
|
830
|
+
readonly source: "live";
|
|
831
|
+
readonly capturedAt: string;
|
|
832
|
+
readonly sessionId: string;
|
|
833
|
+
readonly cdpUrl: string;
|
|
834
|
+
readonly media: {
|
|
835
|
+
readonly mode: "auto" | "cdp";
|
|
836
|
+
readonly webrtcProducer: boolean;
|
|
837
|
+
readonly iceServers?: readonly {
|
|
838
|
+
readonly urls: readonly string[];
|
|
839
|
+
readonly username?: string | undefined;
|
|
840
|
+
readonly credential?: Api.SensitiveString | undefined;
|
|
841
|
+
}[] | undefined;
|
|
842
|
+
};
|
|
843
|
+
readonly pages: readonly {
|
|
844
|
+
readonly url: string;
|
|
845
|
+
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
846
|
+
readonly targetId: string;
|
|
847
|
+
readonly title: string;
|
|
848
|
+
readonly thumbnailAvailable: boolean;
|
|
849
|
+
readonly viewport?: {
|
|
850
|
+
readonly width: number;
|
|
851
|
+
readonly height: number;
|
|
852
|
+
readonly deviceScaleFactor: number;
|
|
853
|
+
readonly contentWidth: number;
|
|
854
|
+
readonly contentHeight: number;
|
|
855
|
+
readonly canvasWidth: number;
|
|
856
|
+
readonly canvasHeight: number;
|
|
857
|
+
} | undefined;
|
|
858
|
+
}[];
|
|
859
|
+
readonly representativeTargetId?: string | undefined;
|
|
860
|
+
} | {
|
|
861
|
+
readonly status: "suspended";
|
|
862
|
+
readonly thumbnailAvailable: boolean;
|
|
863
|
+
readonly source: "persisted";
|
|
864
|
+
readonly capturedAt: string;
|
|
865
|
+
readonly sessionId: string;
|
|
866
|
+
readonly cdpUrl: string;
|
|
867
|
+
readonly media: {
|
|
868
|
+
readonly mode: "auto" | "cdp";
|
|
869
|
+
readonly webrtcProducer: boolean;
|
|
870
|
+
readonly iceServers?: readonly {
|
|
871
|
+
readonly urls: readonly string[];
|
|
872
|
+
readonly username?: string | undefined;
|
|
873
|
+
readonly credential?: Api.SensitiveString | undefined;
|
|
874
|
+
}[] | undefined;
|
|
875
|
+
};
|
|
876
|
+
readonly pages: readonly {
|
|
877
|
+
readonly url: string;
|
|
878
|
+
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
879
|
+
readonly targetId: string;
|
|
880
|
+
readonly title: string;
|
|
881
|
+
readonly thumbnailAvailable: boolean;
|
|
882
|
+
readonly viewport?: {
|
|
883
|
+
readonly width: number;
|
|
884
|
+
readonly height: number;
|
|
885
|
+
readonly deviceScaleFactor: number;
|
|
886
|
+
readonly contentWidth: number;
|
|
887
|
+
readonly contentHeight: number;
|
|
888
|
+
readonly canvasWidth: number;
|
|
889
|
+
readonly canvasHeight: number;
|
|
890
|
+
} | undefined;
|
|
891
|
+
}[];
|
|
892
|
+
readonly representativeTargetId?: string | undefined;
|
|
893
|
+
} | {
|
|
894
|
+
readonly status: "suspended";
|
|
895
|
+
readonly source: "unavailable";
|
|
896
|
+
readonly sessionId: string;
|
|
897
|
+
readonly cdpUrl: string;
|
|
898
|
+
readonly media: {
|
|
899
|
+
readonly mode: "auto" | "cdp";
|
|
900
|
+
readonly webrtcProducer: boolean;
|
|
901
|
+
readonly iceServers?: readonly {
|
|
902
|
+
readonly urls: readonly string[];
|
|
903
|
+
readonly username?: string | undefined;
|
|
904
|
+
readonly credential?: Api.SensitiveString | undefined;
|
|
905
|
+
}[] | undefined;
|
|
906
|
+
};
|
|
907
|
+
readonly thumbnailAvailable: boolean;
|
|
908
|
+
readonly pages: readonly {
|
|
909
|
+
readonly url: string;
|
|
910
|
+
readonly state: "pending" | "ready" | "unavailable" | "closed";
|
|
911
|
+
readonly targetId: string;
|
|
912
|
+
readonly title: string;
|
|
913
|
+
readonly thumbnailAvailable: boolean;
|
|
914
|
+
readonly viewport?: {
|
|
915
|
+
readonly width: number;
|
|
916
|
+
readonly height: number;
|
|
917
|
+
readonly deviceScaleFactor: number;
|
|
918
|
+
readonly contentWidth: number;
|
|
919
|
+
readonly contentHeight: number;
|
|
920
|
+
readonly canvasWidth: number;
|
|
921
|
+
readonly canvasHeight: number;
|
|
922
|
+
} | undefined;
|
|
923
|
+
}[];
|
|
924
|
+
}, ApiRequestError, never>;
|
|
925
|
+
readonly downloadSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<DownloadedFile, ApiRequestError, never>;
|
|
926
|
+
readonly getSessionThumbnail: (credentials: ApiCredentials, sessionId: string, targetId?: string) => Effect.Effect<Blob, ApiRequestError, never>;
|
|
927
|
+
readonly streamSessionRecording: (credentials: ApiCredentials, sessionId: string, recordingId: string, sessionToken?: Redacted.Redacted<string>) => Stream.Stream<Uint8Array, ApiRequestError>;
|
|
928
|
+
readonly uploadLiveSessionFiles: (credentials: ApiCredentials, sessionId: string, files: ReadonlyArray<SessionUploadFile>, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<readonly Api.SessionFile[], ApiRequestError, never>;
|
|
929
|
+
readonly setSessionViewport: (credentials: ApiCredentials, sessionId: string, input: SetViewportInput, sessionToken?: Redacted.Redacted<string>) => Effect.Effect<Api.TargetViewport, ApiRequestError, never>;
|
|
930
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
931
|
+
declare const sessionsApiLayer: Layer.Layer<SessionsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
932
|
+
//#endregion
|
|
933
|
+
//#region src/sessions/tree.d.ts
|
|
934
|
+
/**
|
|
935
|
+
* The top-level directories the session writes into. They always exist and cannot be
|
|
936
|
+
* deleted, moved or renamed.
|
|
937
|
+
*/
|
|
938
|
+
declare const sessionFileRootDirectories: readonly ["downloads", "recordings", "uploads", "outputs"];
|
|
939
|
+
interface SessionFileDirectoryNode {
|
|
940
|
+
readonly kind: "directory";
|
|
941
|
+
readonly name: string;
|
|
942
|
+
readonly relativePath: string;
|
|
943
|
+
/** Absent for a directory known only from the paths of legacy files. */
|
|
944
|
+
readonly directory: SessionDirectory | undefined;
|
|
945
|
+
readonly children: ReadonlyArray<SessionFileTreeNode>;
|
|
946
|
+
}
|
|
947
|
+
interface SessionFileNode {
|
|
948
|
+
readonly kind: "file";
|
|
949
|
+
readonly name: string;
|
|
950
|
+
readonly relativePath: string;
|
|
951
|
+
readonly file: SessionFile;
|
|
952
|
+
}
|
|
953
|
+
type SessionFileTreeNode = SessionFileDirectoryNode | SessionFileNode;
|
|
954
|
+
/**
|
|
955
|
+
* Arranges `listSessionFiles` results into a tree: directories first, then files, each
|
|
956
|
+
* sorted by name. Empty directories appear because the listing includes them.
|
|
957
|
+
*/
|
|
958
|
+
declare function sessionFileTree(entries: ReadonlyArray<SessionFileEntry>): ReadonlyArray<SessionFileTreeNode>;
|
|
959
|
+
//#endregion
|
|
960
|
+
//#region src/snapshots/layer.d.ts
|
|
961
|
+
declare const makeSnapshotsApi: Effect.Effect<{
|
|
962
|
+
readonly listSnapshots: (credentials: ApiCredentials, params?: (SnapshotsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Snapshot>, ApiRequestError, never>;
|
|
963
|
+
readonly streamSnapshots: (credentials: ApiCredentials, filter?: SnapshotsFilter | undefined) => Stream.Stream<Api.Snapshot, ApiRequestError, never>;
|
|
964
|
+
readonly listAllSnapshots: (credentials: ApiCredentials, filter?: SnapshotsFilter | undefined) => Effect.Effect<readonly Api.Snapshot[], ApiRequestError, never>;
|
|
965
|
+
readonly getSnapshotByName: (credentials: ApiCredentials, name: string) => Effect.Effect<import("effect/Option").Option<Api.Snapshot>, ApiRequestError, never>;
|
|
966
|
+
readonly updateSnapshot: (credentials: ApiCredentials, name: string, input: UpdateSnapshotInput) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
967
|
+
readonly replaceSnapshotTags: (credentials: ApiCredentials, name: string, tags: Record<string, string>) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
968
|
+
readonly deleteSnapshot: (credentials: ApiCredentials, name: string) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
969
|
+
readonly restoreSnapshot: (credentials: ApiCredentials, name: string) => Effect.Effect<Api.SnapshotMutation, ApiRequestError, never>;
|
|
970
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
971
|
+
declare const snapshotsApiLayer: Layer.Layer<SnapshotsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
972
|
+
//#endregion
|
|
973
|
+
//#region src/tenants/layer.d.ts
|
|
974
|
+
declare const makeTenantsApi: Effect.Effect<{
|
|
975
|
+
readonly listTenants: (credentials: ApiCredentials, params?: (TenantsFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Tenant>, ApiRequestError, never>;
|
|
976
|
+
readonly streamTenants: (credentials: ApiCredentials, filter?: TenantsFilter | undefined) => import("effect/Stream").Stream<Api.Tenant, ApiRequestError, never>;
|
|
977
|
+
readonly listAllTenants: (credentials: ApiCredentials, filter?: TenantsFilter | undefined) => Effect.Effect<readonly Api.Tenant[], ApiRequestError, never>;
|
|
978
|
+
readonly createTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
979
|
+
readonly updateTenant: (credentials: ApiCredentials, tenantId: string, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
980
|
+
readonly deleteTenant: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
981
|
+
readonly restoreTenant: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
982
|
+
readonly getCurrentTenant: (credentials: ApiCredentials) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
983
|
+
readonly updateCurrentTenant: (credentials: ApiCredentials, input: Api.TenantInput) => Effect.Effect<Api.Tenant, ApiRequestError, never>;
|
|
984
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
985
|
+
declare const tenantsApiLayer: Layer.Layer<TenantsApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
986
|
+
//#endregion
|
|
987
|
+
//#region src/tokens/layer.d.ts
|
|
988
|
+
declare const makeTokensApi: Effect.Effect<{
|
|
989
|
+
readonly listAdminTokens: (credentials: ApiCredentials, params?: (TokensFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Token>, ApiRequestError, never>;
|
|
990
|
+
readonly streamAdminTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => import("effect/Stream").Stream<Api.Token, ApiRequestError, never>;
|
|
991
|
+
readonly listAllAdminTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => Effect.Effect<readonly Api.Token[], ApiRequestError, never>;
|
|
992
|
+
readonly createAdminToken: (credentials: ApiCredentials, input: CreateAdminTokenInput) => Effect.Effect<Api.CreateTokenResponse, ApiRequestError, never>;
|
|
993
|
+
readonly revokeAdminToken: (credentials: ApiCredentials, tokenId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
994
|
+
readonly listTenantTokens: (credentials: ApiCredentials, params?: (TokensFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.Token>, ApiRequestError, never>;
|
|
995
|
+
readonly streamTenantTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => import("effect/Stream").Stream<Api.Token, ApiRequestError, never>;
|
|
996
|
+
readonly listAllTenantTokens: (credentials: ApiCredentials, filter?: TokensFilter | undefined) => Effect.Effect<readonly Api.Token[], ApiRequestError, never>;
|
|
997
|
+
readonly createTenantToken: (credentials: ApiCredentials, input: CreateTenantTokenInput) => Effect.Effect<Api.CreateTokenResponse, ApiRequestError, never>;
|
|
998
|
+
readonly revokeTenantToken: (credentials: ApiCredentials, tokenId: string) => Effect.Effect<void, ApiRequestError, never>;
|
|
999
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
1000
|
+
declare const tokensApiLayer: Layer.Layer<TokensApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
1001
|
+
//#endregion
|
|
751
1002
|
//#region src/users/layer.d.ts
|
|
752
1003
|
declare const makeUsersApi: Effect.Effect<{
|
|
753
|
-
readonly listUsers: (credentials: ApiCredentials, params?:
|
|
1004
|
+
readonly listUsers: (credentials: ApiCredentials, params?: (UsersFilter & PageCursor) | undefined) => Effect.Effect<PaginatedResponse<Api.User>, ApiRequestError, never>;
|
|
1005
|
+
readonly streamUsers: (credentials: ApiCredentials, filter?: UsersFilter | undefined) => import("effect/Stream").Stream<Api.User, ApiRequestError, never>;
|
|
1006
|
+
readonly listAllUsers: (credentials: ApiCredentials, filter?: UsersFilter | undefined) => Effect.Effect<readonly Api.User[], ApiRequestError, never>;
|
|
754
1007
|
readonly createUser: (credentials: ApiCredentials, input: UserInput) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
755
1008
|
readonly getUser: (credentials: ApiCredentials, userId: string) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
756
1009
|
readonly updateUser: (credentials: ApiCredentials, userId: string, input: UserInput) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
@@ -758,10 +1011,11 @@ declare const makeUsersApi: Effect.Effect<{
|
|
|
758
1011
|
readonly disableUser: (credentials: ApiCredentials, userId: string) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
759
1012
|
readonly restoreUser: (credentials: ApiCredentials, userId: string) => Effect.Effect<Api.User, ApiRequestError, never>;
|
|
760
1013
|
readonly listUserMemberships: (credentials: ApiCredentials, userId: string) => Effect.Effect<readonly Api.TenantMembership[], ApiRequestError, never>;
|
|
1014
|
+
readonly listTenantMemberships: (credentials: ApiCredentials, tenantId: string) => Effect.Effect<readonly Api.TenantMembership[], ApiRequestError, never>;
|
|
761
1015
|
readonly upsertTenantMembership: (credentials: ApiCredentials, tenantId: string, userId: string, scopes: readonly string[]) => Effect.Effect<Api.TenantMembership, ApiRequestError, never>;
|
|
762
1016
|
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
|
|
1017
|
+
}, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
1018
|
+
declare const usersApiLayer: Layer.Layer<UsersApi, never, ApiAuthorization | HttpClient.HttpClient>;
|
|
765
1019
|
//#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,
|
|
1020
|
+
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, RecordingAttentionInput, RecordingCaptionInput, RecordingFocusInput, RecordingSettings, 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
1021
|
//# sourceMappingURL=index.d.ts.map
|