@flow-industries/id 0.24.0 → 0.24.2
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 +76 -0
- package/contracts/v1/sdk-exports.json +30 -0
- package/dist/sdk/browser-contract.d.ts +1 -0
- package/dist/sdk/browser-contract.js +1 -0
- package/dist/sdk/browser-session-route.js +3 -3
- package/dist/sdk/client/atproto.d.ts +5 -0
- package/dist/sdk/client/atproto.js +49 -0
- package/dist/sdk/client/create-flow.js +2 -1
- package/dist/sdk/client/index.d.ts +1 -1
- package/dist/sdk/client/profile-button.js +4 -1
- package/dist/sdk/db/handle.d.ts +11 -0
- package/dist/sdk/db/handle.js +0 -0
- package/dist/sdk/db/schema.d.ts +4786 -0
- package/dist/sdk/db/schema.js +859 -0
- package/dist/sdk/oauth/encryption.d.ts +4 -0
- package/dist/sdk/oauth/encryption.js +29 -0
- package/dist/sdk/oauth/stores.d.ts +16 -0
- package/dist/sdk/oauth/stores.js +159 -0
- package/dist/sdk/settings/appearance.d.ts +3 -0
- package/dist/sdk/settings/appearance.js +167 -0
- package/dist/sdk/settings/cosmetics.d.ts +150 -0
- package/dist/sdk/settings/cosmetics.js +418 -0
- package/dist/sdk/settings/ear-items.json +37 -0
- package/dist/sdk/settings/hair-items.json +312 -0
- package/dist/sdk/settings/registry.d.ts +11 -0
- package/dist/sdk/settings/registry.js +136 -0
- package/dist/sdk/settings/surfaces.d.ts +4 -0
- package/dist/sdk/settings/surfaces.js +48 -0
- package/dist/sdk/types/account-data.d.ts +28 -0
- package/dist/sdk/types/atproto-storage.d.ts +9 -0
- package/dist/sdk/types/atproto-storage.js +0 -0
- package/dist/sdk/types/atproto.d.ts +25 -0
- package/dist/sdk/types/atproto.js +0 -0
- package/dist/sdk/types/auth.d.ts +19 -0
- package/dist/sdk/types/cosmetics.d.ts +1 -1
- package/dist/sdk/types/events.d.ts +5 -2
- package/dist/sdk/types/index.d.ts +4 -2
- package/dist/sdk/types/notifications.d.ts +65 -0
- package/dist/sdk/types/notifications.js +9 -0
- package/package.json +6 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export type { AccountDeleteRequest, AccountDeleteResponse, AccountErasureCounts, AccountErasureEntry, AccountErasureFeed, AccountErasureResult, AccountExport, AccountExportAccount, AccountExportActionEvent, AccountExportActionSession, AccountExportAttendance, AccountExportAuthoredEvent, AccountExportCharacterStateTime, AccountExportFollow, AccountExportGameEvent, AccountExportOtherService, AccountExportOwnedRoom, AccountExportPasskey, AccountExportRoomEvents, AccountExportRoomMembership, AccountExportRoomPlayerState, AccountExportRoomPresence, AccountExportRoomRestriction, AccountExportRoomSettings, AccountExportRooms, AccountExportRsvp, AccountExportSettingsSurface, AccountExportStudySubject, AccountExportXpGrant, AccountExportXpSummary, } from "./account-data";
|
|
1
|
+
export type { AccountDeleteRequest, AccountDeleteResponse, AccountErasureCounts, AccountErasureEntry, AccountErasureFeed, AccountErasureResult, AccountExport, AccountExportAccount, AccountExportActionEvent, AccountExportActionSession, AccountExportAttendance, AccountExportAuthoredEvent, AccountExportCharacterStateTime, AccountExportFollow, AccountExportGameEvent, AccountExportNotification, AccountExportOtherService, AccountExportOwnedRoom, AccountExportPasskey, AccountExportRoomEvents, AccountExportRoomMembership, AccountExportRoomPlayerState, AccountExportRoomPresence, AccountExportRoomRestriction, AccountExportRoomSettings, AccountExportRooms, AccountExportRsvp, AccountExportSettingsSurface, AccountExportStudySubject, AccountExportXpGrant, AccountExportXpSummary, } from "./account-data";
|
|
2
2
|
export type { ActionCurve, ActionEventRequest, ActionEventResponse, ActionsApi, ActiveActionState, FinishActionRequest, ListStudySessionsOptions, ListStudySubjectsOptions, StartActionInput, StartActionResult, StudyApi, StudySubjectResponse, UseActiveActionOptions, XpEstimateContext, } from "./actions";
|
|
3
|
-
export type {
|
|
3
|
+
export type { AtprotoCompletion, AtprotoStartRequest, AtprotoStatus, } from "./atproto";
|
|
4
|
+
export type { AccountRegistration, AccountSession, AccountSessionsResponse, AdditionalSession, AuthConfig, AuthorizationTransaction, AuthPageBootstrap, AuthResponse, AuthResponseWithWebAuthn, BioNormalization, BioRejection, BioWriteRefusal, BioWriteResult, FlowCredential, FlowUser, PasskeyEnrollment, PasskeyPluginOptions, RevokeAllSessionsResponse, RevokeSessionResponse, SecurityActivityEntry, SecurityActivityResponse, SessionUser, VerifiedFlowJWT, VerifyOptions, WebAuthnSignature, } from "./auth";
|
|
4
5
|
export type { BodyRegion, CosmeticItem, CosmeticMaterial, CosmeticPaint, CosmeticSlot, EquipConflict, EquippedCosmetic, EquippedCosmetics, EquipRegion, PaintSlot, SettingsConflict, } from "./cosmetics";
|
|
5
6
|
export { BODY_REGIONS, COSMETIC_MATERIALS } from "./cosmetics";
|
|
6
7
|
export type { AccountDataDownload, AccountDataIdentity, BoundaryError, DialogCustomFeatures, DialogCustomLabels, DialogError, DialogReferrer, DialogState, Loadable, ProfileData, ProfileIdentity, SignInWithEmailProps, SignUpProps, } from "./dialog";
|
|
@@ -10,6 +11,7 @@ export type { GameEventReport, GameLifecycleEventName, GameLifecycleFeedEvent, G
|
|
|
10
11
|
export { GAME_LIFECYCLE_EVENT_NAMES } from "./game";
|
|
11
12
|
export type { AccountProfileData } from "./landing";
|
|
12
13
|
export type { Bridge, BridgeParameters, FlowAccount, FlowRemote, FlowRemoteConfig, FromWindowOptions, MessageResponse, Messenger, OneOf, Payload, QueuedRequest, ReadyOptions, RemoteFlowState, RemoteState, Schema, Storage, Topic, WithReady, } from "./messenger";
|
|
14
|
+
export type { MarkNotificationsReadInput, NotificationCounts, NotificationEntry, NotificationPage, NotificationReadResult, NotificationRefusal, } from "./notifications";
|
|
13
15
|
export type { OtpVerificationFailure, OtpVerificationResult, VerificationAdapter, } from "./otp";
|
|
14
16
|
export type { Call, ConnectCapabilities, ConnectResponse, MethodName, MethodParams, MethodResult, RestoreResponse, RpcRequest, SendCallsParams, SendCallsRequest, SendCallsResponse, SendTransactionParams, SendTransactionRequest, SendTransactionResponse, SignMessageRequest, SignMessageResponse, SignTypedDataRequest, SignTypedDataResponse, TransactionArgs, TypedData, TypedDataDomain, TypedDataField, } from "./protocol";
|
|
15
17
|
export { isPersonalSignParams, isSendCallsParams, isSendTransactionParams, } from "./protocol";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-app notifications — the shapes `/api/notifications` speaks (AUTH-351).
|
|
3
|
+
*
|
|
4
|
+
* A stored notification is an address row carrying no content, so every field
|
|
5
|
+
* of a {@link NotificationEntry} below is rendered at read time from the live
|
|
6
|
+
* source by that type's resolver. An entry therefore only exists while its
|
|
7
|
+
* referent does and while this viewer may still see it; nothing here is a copy
|
|
8
|
+
* of anything, and a client must not cache an entry as a durable record.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* One resolved notification, ready to render.
|
|
12
|
+
*
|
|
13
|
+
* `occurredAt` is the *source's* own instant (a reminder's occurrence start),
|
|
14
|
+
* which is what a panel formats relative time from — the server never bakes
|
|
15
|
+
* "in 10 minutes" into a polled response. `createdAt` is when the user was
|
|
16
|
+
* addressed, and it is what the page is ordered and paged on. `href` is a path
|
|
17
|
+
* inside the consuming app (`/events/<id>`), never an absolute URL: auth does
|
|
18
|
+
* not know which surface is rendering it.
|
|
19
|
+
*/
|
|
20
|
+
export interface NotificationEntry {
|
|
21
|
+
id: string;
|
|
22
|
+
type: string;
|
|
23
|
+
title: string;
|
|
24
|
+
body: string | null;
|
|
25
|
+
href: string | null;
|
|
26
|
+
/** A coarse family name the surface maps to its own icon set. */
|
|
27
|
+
icon: string;
|
|
28
|
+
occurredAt: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
readAt: string | null;
|
|
31
|
+
seenAt: string | null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Response of `GET /api/notifications`. A full page is returned whenever that
|
|
35
|
+
* many visible entries exist, so a suppressed row never eats a slot; feed
|
|
36
|
+
* `nextCursor` back as `?cursor=` until it is null.
|
|
37
|
+
*/
|
|
38
|
+
export interface NotificationPage {
|
|
39
|
+
notifications: NotificationEntry[];
|
|
40
|
+
nextCursor: string | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Response of `GET /api/notifications/unread-count`. `unseen` is the bell's
|
|
44
|
+
* badge, cleared by `POST /api/notifications/seen` when the panel opens; a
|
|
45
|
+
* list read writes nothing. `unread` is the per-entry styling count and is
|
|
46
|
+
* only cleared by `POST /api/notifications/read`. Both are counted over stored
|
|
47
|
+
* rows without resolving them, so either may count an entry that a list read
|
|
48
|
+
* would suppress.
|
|
49
|
+
*/
|
|
50
|
+
export interface NotificationCounts {
|
|
51
|
+
unread: number;
|
|
52
|
+
unseen: number;
|
|
53
|
+
}
|
|
54
|
+
/** Response of `POST /api/notifications/read`: rows this call changed, plus the fresh counts. */
|
|
55
|
+
export interface NotificationReadResult extends NotificationCounts {
|
|
56
|
+
updated: number;
|
|
57
|
+
}
|
|
58
|
+
/** Body of `POST /api/notifications/read` — exactly one of the two. */
|
|
59
|
+
export interface MarkNotificationsReadInput {
|
|
60
|
+
ids?: string[];
|
|
61
|
+
/** ISO instant; marks every notification addressed at or before it. */
|
|
62
|
+
before?: string;
|
|
63
|
+
}
|
|
64
|
+
/** Machine-readable refusal codes the notification routes answer with. */
|
|
65
|
+
export type NotificationRefusal = "invalid_cursor";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-app notifications — the shapes `/api/notifications` speaks (AUTH-351).
|
|
3
|
+
*
|
|
4
|
+
* A stored notification is an address row carrying no content, so every field
|
|
5
|
+
* of a {@link NotificationEntry} below is rendered at read time from the live
|
|
6
|
+
* source by that type's resolver. An entry therefore only exists while its
|
|
7
|
+
* referent does and while this viewer may still see it; nothing here is a copy
|
|
8
|
+
* of anything, and a client must not cache an entry as a durable record.
|
|
9
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow-industries/id",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"contracts:generate": "bun scripts/generate-contracts.ts",
|
|
89
89
|
"contracts:check": "bun scripts/generate-contracts.ts --check && bun scripts/check-contract-compatibility.ts",
|
|
90
90
|
"db:check": "bun scripts/db-check.ts",
|
|
91
|
-
"test:migrations": "bun test scripts/migrations.test.ts scripts/migration-drift.test.ts"
|
|
91
|
+
"test:migrations": "bun test scripts/migrations.test.ts scripts/migration-drift.test.ts scripts/oauth-migration.test.ts"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"viem": ">=2.47.10",
|
|
@@ -139,6 +139,9 @@
|
|
|
139
139
|
"sharp"
|
|
140
140
|
],
|
|
141
141
|
"dependencies": {
|
|
142
|
+
"@atproto-labs/handle-resolver": "^0.4.9",
|
|
143
|
+
"@atproto/jwk-jose": "^0.2.4",
|
|
144
|
+
"@atproto/oauth-client": "^0.8.7",
|
|
142
145
|
"@aws-sdk/client-s3": "^3.1073.0",
|
|
143
146
|
"@flow-industries/ui": "^0.23.3",
|
|
144
147
|
"@hono/otel": "^1.1.2",
|
|
@@ -160,6 +163,7 @@
|
|
|
160
163
|
"drizzle-orm": "^0.45.1",
|
|
161
164
|
"geist": "^1.7.0",
|
|
162
165
|
"hono": "^4.11.5",
|
|
166
|
+
"ipaddr.js": "^2.5.0",
|
|
163
167
|
"jose": "^6.1.3",
|
|
164
168
|
"lucide-react": "^0.563.0",
|
|
165
169
|
"motion": "^12.33.0",
|