@stll/auth-model 0.5.0 → 0.7.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 +8 -5
- package/dist/contract.js +8 -4
- package/dist/invitation-sections.d.ts +18700 -12401
- package/dist/invitation-sections.js +1 -2
- package/package.json +2 -2
package/dist/contract.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
//#region src/contract.d.ts
|
|
2
1
|
/** Better Auth version whose logical schema this contract describes. */
|
|
3
|
-
export declare const BETTER_AUTH_CONTRACT_VERSION = "1.7.
|
|
2
|
+
export declare const BETTER_AUTH_CONTRACT_VERSION = "1.7.16";
|
|
4
3
|
export declare const AUTH_SESSION_STARTUP_HEADER = "x-stella-session-startup";
|
|
5
4
|
export declare const AUTH_SOCIAL_PROVIDER_IDS: readonly ["google", "microsoft", "apple"];
|
|
6
5
|
export type AuthSocialProviderId = (typeof AUTH_SOCIAL_PROVIDER_IDS)[number];
|
|
@@ -66,12 +65,17 @@ export declare const ORGANIZATION_SLUG_RULES: {
|
|
|
66
65
|
};
|
|
67
66
|
/** Random bytes behind an opaque organization slug. */
|
|
68
67
|
export declare const ORGANIZATION_OPAQUE_SLUG_BYTES = 10;
|
|
68
|
+
/**
|
|
69
|
+
* The shape of every slug `createOpaqueOrganizationSlug` returns: the `org-`
|
|
70
|
+
* prefix and one alphabet symbol per random byte.
|
|
71
|
+
*/
|
|
72
|
+
export declare const OPAQUE_ORGANIZATION_SLUG_PATTERN: RegExp;
|
|
69
73
|
/**
|
|
70
74
|
* The opaque `org-` slug shared by organization creation and slug changes.
|
|
71
75
|
* The source fills this function's own fixed-size buffer, so it cannot change
|
|
72
76
|
* the identifier's length; organization names never enter the identifier.
|
|
73
77
|
*/
|
|
74
|
-
export declare const createOpaqueOrganizationSlug: (fillRandom?: (bytes: Uint8Array) => void) => string;
|
|
78
|
+
export declare const createOpaqueOrganizationSlug: (fillRandom?: (bytes: Uint8Array<ArrayBuffer>) => void) => string;
|
|
75
79
|
export declare const BETTER_AUTH_ORGANIZATION_OPTIONS: {
|
|
76
80
|
readonly allowUserToCreateOrganization: true;
|
|
77
81
|
readonly cancelPendingInvitationsOnReInvite: false;
|
|
@@ -305,7 +309,7 @@ export declare const BETTER_AUTH_PARITY_MANIFEST: {
|
|
|
305
309
|
readonly invitation: "invitation";
|
|
306
310
|
};
|
|
307
311
|
};
|
|
308
|
-
readonly betterAuthVersion: "1.7.
|
|
312
|
+
readonly betterAuthVersion: "1.7.16";
|
|
309
313
|
readonly options: {
|
|
310
314
|
readonly allowUserToCreateOrganization: true;
|
|
311
315
|
readonly cancelPendingInvitationsOnReInvite: false;
|
|
@@ -437,5 +441,4 @@ export declare const BETTER_AUTH_PARITY_MANIFEST: {
|
|
|
437
441
|
};
|
|
438
442
|
};
|
|
439
443
|
};
|
|
440
|
-
//#endregion
|
|
441
444
|
export {};
|
package/dist/contract.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/contract.ts
|
|
2
2
|
/** Better Auth version whose logical schema this contract describes. */
|
|
3
|
-
const BETTER_AUTH_CONTRACT_VERSION = "1.7.
|
|
3
|
+
const BETTER_AUTH_CONTRACT_VERSION = "1.7.16";
|
|
4
4
|
const AUTH_SESSION_STARTUP_HEADER = "x-stella-session-startup";
|
|
5
5
|
const AUTH_SOCIAL_PROVIDER_IDS = [
|
|
6
6
|
"google",
|
|
@@ -113,6 +113,11 @@ const ORGANIZATION_SLUG_RULES = {
|
|
|
113
113
|
const ORGANIZATION_OPAQUE_SLUG_BYTES = 10;
|
|
114
114
|
const OPAQUE_SLUG_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
|
|
115
115
|
/**
|
|
116
|
+
* The shape of every slug `createOpaqueOrganizationSlug` returns: the `org-`
|
|
117
|
+
* prefix and one alphabet symbol per random byte.
|
|
118
|
+
*/
|
|
119
|
+
const OPAQUE_ORGANIZATION_SLUG_PATTERN = /^org-[a-z2-7]{10}$/u;
|
|
120
|
+
/**
|
|
116
121
|
* The opaque `org-` slug shared by organization creation and slug changes.
|
|
117
122
|
* The source fills this function's own fixed-size buffer, so it cannot change
|
|
118
123
|
* the identifier's length; organization names never enter the identifier.
|
|
@@ -563,5 +568,4 @@ const BETTER_AUTH_PARITY_MANIFEST = {
|
|
|
563
568
|
roleNames: ORGANIZATION_ROLE_NAMES,
|
|
564
569
|
schema: BETTER_AUTH_CORE_SCHEMA
|
|
565
570
|
};
|
|
566
|
-
|
|
567
|
-
export { AUTH_ACCESS_RESET_ERROR_CODE, AUTH_SESSION_STARTUP_HEADER, AUTH_SOCIAL_PROVIDER_IDS, BETTER_AUTH_ADAPTER_INVARIANTS, BETTER_AUTH_ADAPTER_OPTIONS, BETTER_AUTH_CONTRACT_VERSION, BETTER_AUTH_CORE_MODEL_NAMES, BETTER_AUTH_CORE_SCHEMA, BETTER_AUTH_ORGANIZATION_OPTIONS, BETTER_AUTH_ORGANIZATION_ROLE_GRANTS, BETTER_AUTH_ORGANIZATION_STATEMENTS, BETTER_AUTH_PARITY_MANIFEST, ORGANIZATION_OPAQUE_SLUG_BYTES, ORGANIZATION_ROLE_NAMES, ORGANIZATION_SLUG_RULES, compareBetterAuthSchema, createOpaqueOrganizationSlug };
|
|
571
|
+
export { AUTH_ACCESS_RESET_ERROR_CODE, AUTH_SESSION_STARTUP_HEADER, AUTH_SOCIAL_PROVIDER_IDS, BETTER_AUTH_ADAPTER_INVARIANTS, BETTER_AUTH_ADAPTER_OPTIONS, BETTER_AUTH_CONTRACT_VERSION, BETTER_AUTH_CORE_MODEL_NAMES, BETTER_AUTH_CORE_SCHEMA, BETTER_AUTH_ORGANIZATION_OPTIONS, BETTER_AUTH_ORGANIZATION_ROLE_GRANTS, BETTER_AUTH_ORGANIZATION_STATEMENTS, BETTER_AUTH_PARITY_MANIFEST, OPAQUE_ORGANIZATION_SLUG_PATTERN, ORGANIZATION_OPAQUE_SLUG_BYTES, ORGANIZATION_ROLE_NAMES, ORGANIZATION_SLUG_RULES, compareBetterAuthSchema, createOpaqueOrganizationSlug };
|