@tangle-network/agent-app 1.0.4 → 1.0.6
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/assistant/index.js +1 -1
- package/dist/{chunk-DDYWECBU.js → chunk-TGSVYWIF.js} +30 -5
- package/dist/{chunk-DDYWECBU.js.map → chunk-TGSVYWIF.js.map} +1 -1
- package/dist/platform/index.js +46 -19
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/sso-identity-store.d.ts +19 -7
- package/dist/web-react/index.js +1 -1
- package/package.json +1 -1
|
@@ -8,13 +8,11 @@
|
|
|
8
8
|
* two partial unique indexes make the link one-per-user and
|
|
9
9
|
* one-per-platform-user, which the write path relies on.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* columns
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* 'timestamp'`). D1 is structural: Cloudflare `D1Database` satisfies
|
|
17
|
-
* {@link TangleIdentityD1Like}.
|
|
11
|
+
* The default schema is Better Auth's singular SQLite model with camelCase
|
|
12
|
+
* columns. {@link D1TangleIdentityStoreOptions.hostSchema} maps an existing
|
|
13
|
+
* host's physical table and column names without changing those defaults.
|
|
14
|
+
* Timestamps are unix-second integers (Drizzle `mode: 'timestamp'`). D1 is
|
|
15
|
+
* structural: Cloudflare `D1Database` satisfies {@link TangleIdentityD1Like}.
|
|
18
16
|
*/
|
|
19
17
|
import { type TangleIdentitySsoAccountStore } from './sso.js';
|
|
20
18
|
/** Better Auth `account.providerId` for the Tangle platform link. */
|
|
@@ -53,8 +51,22 @@ export interface TangleIdentityLegacyLinkTable {
|
|
|
53
51
|
/** Column holding the platform user id; must be unique. */
|
|
54
52
|
platformUserIdColumn: string;
|
|
55
53
|
}
|
|
54
|
+
export interface TangleIdentityHostTable<Column extends string> {
|
|
55
|
+
table: string;
|
|
56
|
+
columns: Record<Column, string>;
|
|
57
|
+
}
|
|
58
|
+
/** Better Auth table and physical column names used by the identity store. */
|
|
59
|
+
export interface TangleIdentityHostSchema {
|
|
60
|
+
user: TangleIdentityHostTable<'id' | 'name' | 'email' | 'emailVerified' | 'createdAt' | 'updatedAt'>;
|
|
61
|
+
session: TangleIdentityHostTable<'id' | 'userId' | 'token' | 'expiresAt' | 'ipAddress' | 'userAgent' | 'createdAt' | 'updatedAt'>;
|
|
62
|
+
account: TangleIdentityHostTable<'id' | 'userId' | 'accountId' | 'providerId' | 'createdAt' | 'updatedAt'>;
|
|
63
|
+
}
|
|
56
64
|
export interface D1TangleIdentityStoreOptions {
|
|
57
65
|
db: TangleIdentityD1Like;
|
|
66
|
+
/** Physical Better Auth names. Default: singular tables with camelCase columns.
|
|
67
|
+
* Custom account tables need the same two partial unique indexes, using their
|
|
68
|
+
* mapped column names; the default index SQL only targets the default schema. */
|
|
69
|
+
hostSchema?: TangleIdentityHostSchema;
|
|
58
70
|
/**
|
|
59
71
|
* The signed-in local user for an explicit "connect Tangle" flow. A live
|
|
60
72
|
* local session plus a verified platform exchange jointly authorize linking
|
package/dist/web-react/index.js
CHANGED
package/package.json
CHANGED