@flow-industries/id 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk/json.d.ts
CHANGED
|
@@ -11,7 +11,5 @@ export type RawRecord = {
|
|
|
11
11
|
readonly [key: string]: RawValue;
|
|
12
12
|
};
|
|
13
13
|
export declare const isString: (v: RawValue) => v is string;
|
|
14
|
-
export declare const isBool: (v: RawValue) => v is boolean;
|
|
15
14
|
export declare const isNum: (v: RawValue) => v is number;
|
|
16
15
|
export declare const isRecord: (v: RawValue) => v is RawRecord;
|
|
17
|
-
export declare const isStrings: (v: RawValue) => v is string[];
|
package/dist/sdk/json.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export const isString = (v) => String(v) === v;
|
|
2
|
-
export const isBool = (v) => v === true || v === false;
|
|
3
2
|
export const isNum = (v) => Number(v) === v && Number.isFinite(v);
|
|
4
3
|
export const isRecord = (v) => v !== null && v !== undefined && !Array.isArray(v) && Object(v) === v;
|
|
5
|
-
export const isStrings = (v) => Array.isArray(v) && v.every((entry) => isString(entry));
|
|
@@ -9,7 +9,7 @@ export type AuthOutcome = "success" | "failure" | "info";
|
|
|
9
9
|
export type AuthMode = "sign-up" | "sign-in";
|
|
10
10
|
/** Client-only funnel steps reported via the `/api/events` beacon. */
|
|
11
11
|
export type FunnelStep = "mode_selected" | "email_entered" | "ceremony_started" | "ceremony_failed" | "done_shown";
|
|
12
|
-
export type AuthEventName = "auth.username.checked" | "auth.signup.succeeded" | "auth.signup.failed" | "auth.otp.sent" | "auth.otp.verified" | "auth.otp.failed" | "auth.email.verify.sent" | "auth.email.verify.succeeded" | "auth.email.verify.failed" | "auth.email.changed" | "auth.avatar.upload.succeeded" | "auth.avatar.upload.failed" | "auth.challenge.issued" | "auth.signin.succeeded" | "auth.signin.failed" | "auth.passkey.added" | "auth.passkey.add_failed" | "auth.restore.succeeded" | "auth.restore.failed" | "auth.restore.no_session" | "auth.refresh.succeeded" | "auth.refresh.failed" | "auth.refresh.reuse" | "auth.refresh.grace" | "auth.jwt.verified" | "auth.jwt.rejected" | "auth.signout" | "auth.session.revoked" | "auth.session.revoked_all" | "auth.audience.rejected" | "auth.audience.minted" | "auth.guest.created" | "auth.guest.restored" | "auth.guest.upgraded" | "auth.guest.failed" | "auth.role.granted" | "auth.role.revoked" | "auth.funnel.mode_selected" | "auth.funnel.email_entered" | "auth.funnel.ceremony_started" | "auth.funnel.ceremony_failed" | "auth.funnel.done_shown" | "room_event.activated" | "room_event.completed" | "room_event.reminder_dispatched" | "room_event.reminder_failed";
|
|
12
|
+
export type AuthEventName = "auth.username.checked" | "auth.signup.succeeded" | "auth.signup.failed" | "auth.otp.sent" | "auth.otp.verified" | "auth.otp.failed" | "auth.email.verify.sent" | "auth.email.verify.succeeded" | "auth.email.verify.failed" | "auth.email.changed" | "auth.avatar.upload.succeeded" | "auth.avatar.upload.failed" | "auth.challenge.issued" | "auth.signin.succeeded" | "auth.signin.failed" | "auth.passkey.added" | "auth.passkey.add_failed" | "auth.restore.succeeded" | "auth.restore.failed" | "auth.restore.no_session" | "auth.refresh.succeeded" | "auth.refresh.failed" | "auth.refresh.reuse" | "auth.refresh.grace" | "auth.jwt.verified" | "auth.jwt.rejected" | "auth.signout" | "auth.session.revoked" | "auth.session.revoked_all" | "auth.audience.rejected" | "auth.audience.minted" | "auth.guest.created" | "auth.guest.restored" | "auth.guest.upgraded" | "auth.guest.failed" | "auth.role.granted" | "auth.role.revoked" | "room.restriction.issued" | "room.restriction.lifted" | "auth.funnel.mode_selected" | "auth.funnel.email_entered" | "auth.funnel.ceremony_started" | "auth.funnel.ceremony_failed" | "auth.funnel.done_shown" | "room_event.activated" | "room_event.completed" | "room_event.reminder_dispatched" | "room_event.reminder_failed";
|
|
13
13
|
export type AuthErrorCode = "username_taken" | "credential_taken" | "email_taken" | "email_not_verified" | "no_email" | "image_upload_forbidden" | "image_upload_rate_limited" | "invalid_image_type" | "image_too_large" | "image_upload_failed" | "otp_invalid" | "otp_expired" | "otp_attempts_exceeded" | "otp_resend_cooldown" | "otp_resend_limit" | "otp_global_limit" | "otp_send_failed" | "challenge_expired" | "unknown_credential" | "invalid_assertion_type" | "invalid_assertion_origin" | "user_verification_required" | "invalid_signature" | "user_not_found" | "missing_audience" | "audience_not_allowed" | "audience_mismatch" | "no_session" | "no_passkey" | "refresh_token_invalid" | "refresh_token_expired" | "refresh_epoch_stale" | "refresh_user_epoch_stale" | "refresh_reuse_detected" | "guest_rate_limited" | "guest_global_limit" | "guest_username_exhausted" | "guest_session" | "passkey_exists" | "already_upgraded" | "malformed_token" | "unknown_key" | "verification_failed" | "webauthn_not_allowed" | "webauthn_security" | "webauthn_invalid_state" | "webauthn_not_supported" | "webauthn_constraint" | "webauthn_aborted" | "webauthn_unknown" | "internal_error";
|
|
14
14
|
/** One flat record per event = one row in the `auth_events` stream. */
|
|
15
15
|
export interface AuthEventRecord {
|
|
@@ -32,6 +32,9 @@ export interface AuthEventRecord {
|
|
|
32
32
|
actorId: string | null;
|
|
33
33
|
roleFrom: GlobalRole | null;
|
|
34
34
|
roleTo: GlobalRole | null;
|
|
35
|
+
roomId: string | null;
|
|
36
|
+
restrictionKind: string | null;
|
|
37
|
+
restrictionExpiresAt: string | null;
|
|
35
38
|
ip: string | null;
|
|
36
39
|
country: string | null;
|
|
37
40
|
userAgent: string | null;
|
|
@@ -9,8 +9,8 @@ export type { Bridge, BridgeParameters, FlowAccount, FlowRemote, FlowRemoteConfi
|
|
|
9
9
|
export type { Call, ConnectCapabilities, ConnectRequest, ConnectResponse, GuestRequest, GuestResponse, MethodName, MethodParams, MethodResult, RestoreResponse, RpcRequest, SendCallsParams, SendCallsRequest, SendCallsResponse, SendTransactionParams, SendTransactionRequest, SendTransactionResponse, SignMessageRequest, SignMessageResponse, SignOutRequest, SignOutResponse, SignTypedDataRequest, SignTypedDataResponse, TransactionArgs, TypedData, TypedDataDomain, TypedDataField, } from "./protocol";
|
|
10
10
|
export { getConnectCapabilities, isPersonalSignParams, isSendCallsParams, isSendTransactionParams, } from "./protocol";
|
|
11
11
|
export type { CreateRoomEventInput, RoomEventArchive, RoomEventAttendance, RoomEventFrequency, RoomEventInstance, RoomEventInterest, RoomEventInterestState, RoomEventList, RoomEventOccurrence, RoomEventRecurrence, RoomEventRoomRef, RoomEventRun, RoomEventSeries, RoomEventStatus, SetInterestInput, UpdateRoomEventInput, } from "./room-events";
|
|
12
|
-
export type { CreateRoomInput, GlobalRole, ModerationSubject, MyRooms, PlayerPositionReport, RoleChangeVerdict, RoomCapabilities, RoomCapability, RoomChannel, RoomDetail, RoomList, RoomMemberEntry, RoomMembers, RoomOccupancy, RoomOwner, RoomPlayerPosition, RoomPresenceEntry, RoomPresenceSnapshot, RoomRestrictionKind, RoomRole, RoomSummary, RoomSurfaceSettings, RoomsApi, RoomVisibility, StaffEntry, UpdateRoomInput, VerifyRoomContext, Viewer, } from "./rooms";
|
|
12
|
+
export type { CreateRoomInput, GlobalRole, ModerationSubject, MyRooms, PlayerPositionReport, RoleChangeVerdict, RoomCapabilities, RoomCapability, RoomChannel, RoomDetail, RoomList, RoomMemberEntry, RoomMembers, RoomOccupancy, RoomOwner, RoomPlayerPosition, RoomPresenceEntry, RoomPresenceSnapshot, RoomRestrictionKind, RoomRole, RoomSummary, RoomSurfaceSettings, RoomsApi, RoomVisibility, StaffEntry, UpdateRoomInput, VerifyRoomContext, Viewer, VoiceDecisionReason, VoiceDecisionSubject, VoiceRoomDecision, } from "./rooms";
|
|
13
13
|
export type { AccessKeyOptions, AccessKeyPreparation, Address, ColorScheme, CreateDialogHostOptions, CreateFlowOptions, DialogHost, DialogOpenOptions, FinalizeAccessKeyParams, Flow, FlowConnectorParameters, FlowCookieNames, FlowIdProviderProps, FlowSessionState, FlowState, FlowWidgetHandle, FlowWidgetName, FlowWidgetProps, Listener, LoginOptions, MountFlowWidgetOptions, MountProfileOptions, PrepareArgsWithAuth, PrepareTransactionRequestPhase, ProfileButtonHandle, ProfileButtonProps, ProfilePosition, ResolveAccountParams, ResolvedAccessKeyOptions, RootCredential, RunLoginParams, RunLoginResult, SendCallsArgs, SendTransactionArgs, Session, SigningContext, SignMessageArgs, SignTypedDataArgs, Store, StoredAccessKey, WagmiConnectCapabilities, WagmiConnectParams, } from "./sdk";
|
|
14
14
|
export type { GracefulShutdownCleanup, GracefulShutdownOptions, GracefulShutdownServer, GracefulShutdownSignal, ResolvedFlowSession, ResolveSessionOptions, SessionRouteOptions, SessionRouteResponse, SessionRouteSession, } from "./server";
|
|
15
15
|
export type { CoinAsset, IdentifiedTx, TxApprove, TxConvert, TxSend, TxSwap, } from "./tx";
|
|
16
|
-
export type { ActionDayContext, ActionEventKind, ActionSessionState, ActiveActionResponse, LevelProgress, PublicProfile, XpGrantResult, XpRecentGrant, XpSummary, } from "./xp";
|
|
16
|
+
export type { ActionDayContext, ActionEventKind, ActionSessionState, ActionTransitionKind, ActiveActionResponse, LevelProgress, PublicProfile, XpGrantResult, XpRecentGrant, XpSummary, } from "./xp";
|
|
@@ -136,6 +136,19 @@ export interface PlayerPositionReport {
|
|
|
136
136
|
yaw: number;
|
|
137
137
|
worldId: string;
|
|
138
138
|
}
|
|
139
|
+
export interface VoiceDecisionSubject {
|
|
140
|
+
roomId: string;
|
|
141
|
+
sub: string;
|
|
142
|
+
}
|
|
143
|
+
export type VoiceDecisionReason = "room_not_found" | "user_not_found" | "banned" | "private_not_member";
|
|
144
|
+
/** Current server-authoritative room admission and shared text/voice mute
|
|
145
|
+
* state for one active LiveKit participant. */
|
|
146
|
+
export interface VoiceRoomDecision extends VoiceDecisionSubject {
|
|
147
|
+
admitted: boolean;
|
|
148
|
+
muted: boolean;
|
|
149
|
+
mutedUntil: string | null;
|
|
150
|
+
reason?: VoiceDecisionReason;
|
|
151
|
+
}
|
|
139
152
|
/**
|
|
140
153
|
* One server-resolved permission over an admitted room session, keyed by the
|
|
141
154
|
* Talk operation it authorizes (see `src/rooms/capabilities.ts` for the
|
package/dist/sdk/types/xp.d.ts
CHANGED
|
@@ -43,17 +43,18 @@ export interface ActionDayContext {
|
|
|
43
43
|
priorMinutes: number;
|
|
44
44
|
flowScore: number;
|
|
45
45
|
}
|
|
46
|
-
/** Lifecycle state of a durable action session. `abandoned` is set
|
|
47
|
-
*
|
|
48
|
-
* session (e.g. a server crash). */
|
|
46
|
+
/** Lifecycle state of a durable action session. `abandoned` is set when the
|
|
47
|
+
* janitor finds a session older than the safety window; it never grants XP. */
|
|
49
48
|
export type ActionSessionState = "active" | "finished" | "abandoned";
|
|
50
49
|
/** An action-session transition kind, appended to the action_event log.
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
export type ActionEventKind = "start" | "focus_lost" | "focus_gained" | "finish" | "abandon";
|
|
50
|
+
* Paused intervals do not accrue; focus transitions split the accrued time for
|
|
51
|
+
* stats without stopping it. */
|
|
52
|
+
export type ActionEventKind = "start" | "pause" | "resume" | "focus_lost" | "focus_gained" | "finish" | "abandon";
|
|
53
|
+
/** Reporter-supplied transitions accepted while an action is active. */
|
|
54
|
+
export type ActionTransitionKind = Extract<ActionEventKind, "pause" | "resume" | "focus_lost" | "focus_gained">;
|
|
54
55
|
/** Response of GET /api/actions/active — the caller's current in-progress
|
|
55
56
|
* action (or null when idle), plus the day context so the timer can render the
|
|
56
|
-
* live XP estimate from the
|
|
57
|
+
* live XP estimate from the timestamp-derived accrued duration. (Always an
|
|
57
58
|
* `active` session by definition, so the lifecycle state isn't carried.) */
|
|
58
59
|
export interface ActiveActionResponse extends ActionDayContext {
|
|
59
60
|
source: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow-industries/id",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/flow-industries/auth.git"
|
|
7
|
+
},
|
|
4
8
|
"main": "./dist/sdk/client/index.js",
|
|
5
9
|
"module": "./dist/sdk/client/index.js",
|
|
6
10
|
"types": "./dist/sdk/client/index.d.ts",
|