@stll/auth-model 0.1.0 → 0.2.0
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/contract.d.ts +10 -2
- package/dist/contract.js +6 -1
- package/package.json +2 -2
package/dist/contract.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/contract.d.ts
|
|
2
2
|
/** Better Auth version whose logical schema this contract describes. */
|
|
3
|
-
declare const BETTER_AUTH_CONTRACT_VERSION = "1.
|
|
3
|
+
declare const BETTER_AUTH_CONTRACT_VERSION = "1.7.1";
|
|
4
4
|
declare const ORGANIZATION_ROLE_NAMES: readonly ["owner", "admin", "member", "intern", "external"];
|
|
5
5
|
type OrganizationRoleName = (typeof ORGANIZATION_ROLE_NAMES)[number];
|
|
6
6
|
/** Better Auth organization resources. Hosts extend this with product grants. */
|
|
@@ -150,6 +150,10 @@ declare const BETTER_AUTH_CORE_SCHEMA: {
|
|
|
150
150
|
readonly primaryKey: readonly ["id"];
|
|
151
151
|
readonly fields: Record<string, BetterAuthFieldContract>;
|
|
152
152
|
readonly indexes: readonly [{
|
|
153
|
+
readonly fields: readonly ["issuer", "accountId"];
|
|
154
|
+
readonly predicate: null;
|
|
155
|
+
readonly unique: true;
|
|
156
|
+
}, {
|
|
153
157
|
readonly fields: readonly ["userId"];
|
|
154
158
|
readonly predicate: null;
|
|
155
159
|
readonly unique: false;
|
|
@@ -283,7 +287,7 @@ declare const BETTER_AUTH_PARITY_MANIFEST: {
|
|
|
283
287
|
readonly transaction: true;
|
|
284
288
|
readonly usePlural: false;
|
|
285
289
|
};
|
|
286
|
-
readonly betterAuthVersion: "1.
|
|
290
|
+
readonly betterAuthVersion: "1.7.1";
|
|
287
291
|
readonly options: {
|
|
288
292
|
readonly allowUserToCreateOrganization: true;
|
|
289
293
|
readonly cancelPendingInvitationsOnReInvite: false;
|
|
@@ -351,6 +355,10 @@ declare const BETTER_AUTH_PARITY_MANIFEST: {
|
|
|
351
355
|
readonly primaryKey: readonly ["id"];
|
|
352
356
|
readonly fields: Record<string, BetterAuthFieldContract>;
|
|
353
357
|
readonly indexes: readonly [{
|
|
358
|
+
readonly fields: readonly ["issuer", "accountId"];
|
|
359
|
+
readonly predicate: null;
|
|
360
|
+
readonly unique: true;
|
|
361
|
+
}, {
|
|
354
362
|
readonly fields: readonly ["userId"];
|
|
355
363
|
readonly predicate: null;
|
|
356
364
|
readonly unique: false;
|
package/dist/contract.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/contract.ts
|
|
2
2
|
/** Better Auth version whose logical schema this contract describes. */
|
|
3
|
-
const BETTER_AUTH_CONTRACT_VERSION = "1.
|
|
3
|
+
const BETTER_AUTH_CONTRACT_VERSION = "1.7.1";
|
|
4
4
|
const ORGANIZATION_ROLE_NAMES = [
|
|
5
5
|
"owner",
|
|
6
6
|
"admin",
|
|
@@ -277,6 +277,7 @@ const BETTER_AUTH_CORE_SCHEMA = {
|
|
|
277
277
|
primaryKey: ["id"],
|
|
278
278
|
fields: withPhysicalNames({
|
|
279
279
|
id: idField,
|
|
280
|
+
issuer: field("string", { required: true }),
|
|
280
281
|
accountId: field("string", { required: true }),
|
|
281
282
|
providerId: field("string", { required: true }),
|
|
282
283
|
userId: field("string", {
|
|
@@ -295,6 +296,10 @@ const BETTER_AUTH_CORE_SCHEMA = {
|
|
|
295
296
|
updatedAt: updatedDate
|
|
296
297
|
}),
|
|
297
298
|
indexes: [{
|
|
299
|
+
fields: ["issuer", "accountId"],
|
|
300
|
+
predicate: null,
|
|
301
|
+
unique: true
|
|
302
|
+
}, {
|
|
298
303
|
fields: ["userId"],
|
|
299
304
|
predicate: null,
|
|
300
305
|
unique: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/auth-model",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Portable Better Auth core contract and parity checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@stll/typescript-config": "0.0.0",
|
|
50
|
-
"better-auth": "1.
|
|
50
|
+
"better-auth": "1.7.1",
|
|
51
51
|
"bun-types": "1.4.0",
|
|
52
52
|
"tsdown": "0.22.14"
|
|
53
53
|
},
|