@schemavaults/auth-common 0.9.6 → 0.9.8
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/auth-error-message-catalog.d.ts +5 -0
- package/dist/auth-error-message-catalog.js +28 -0
- package/dist/auth-error-message-catalog.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/organizations/index.d.ts +1 -1
- package/dist/organizations/index.js +1 -1
- package/dist/organizations/index.js.map +1 -1
- package/dist/organizations/invite_member_form.d.ts +1 -1
- package/dist/organizations/organization_definition.d.ts +1 -1
- package/dist/organizations/organization_id.d.ts +2 -1
- package/dist/organizations/organization_id.js +8 -1
- package/dist/organizations/organization_id.js.map +1 -1
- package/dist/organizations/organization_invitation.d.ts +1 -1
- package/dist/request_tokens_result.d.ts +5 -5
- package/dist/token-data/token-data.d.ts +3 -3
- package/package.json +7 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const ERROR_IDS: readonly ["unknown", "bad_request", "app_id_not_found", "api_server_id_not_found", "unauthenticated", "forbidden", "load_user_data_failure", "internal_server_error", "load_server_config_failure", "server_misconfiguration"];
|
|
2
|
+
export type SchemaVaultsAuthErrorId = (typeof ERROR_IDS)[number];
|
|
3
|
+
export declare const ERROR_MESSAGE_CATALOG: Record<SchemaVaultsAuthErrorId, string>;
|
|
4
|
+
export declare function isValidErrorId(id: string): id is SchemaVaultsAuthErrorId;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const ERROR_IDS = [
|
|
2
|
+
"unknown",
|
|
3
|
+
"bad_request",
|
|
4
|
+
"app_id_not_found",
|
|
5
|
+
"api_server_id_not_found",
|
|
6
|
+
"unauthenticated",
|
|
7
|
+
"forbidden",
|
|
8
|
+
"load_user_data_failure",
|
|
9
|
+
"internal_server_error",
|
|
10
|
+
"load_server_config_failure",
|
|
11
|
+
"server_misconfiguration",
|
|
12
|
+
];
|
|
13
|
+
export const ERROR_MESSAGE_CATALOG = {
|
|
14
|
+
unknown: "An unknown error occurred",
|
|
15
|
+
bad_request: "Your request was malformed or invalid.",
|
|
16
|
+
app_id_not_found: "App with specified ID not found!",
|
|
17
|
+
api_server_id_not_found: "API server with specified ID not found",
|
|
18
|
+
unauthenticated: "Failed to authenticate to figure out who you are! Try logging in again or contacting support...",
|
|
19
|
+
forbidden: "Oops! You don't have permission to do that action! Get in touch with support if you believe this is a mistake!",
|
|
20
|
+
load_user_data_failure: "There was an error loading data associated with your SchemaVaults account!",
|
|
21
|
+
internal_server_error: "There was a problem in the SchemaVaults backend logic and something caused a crash!",
|
|
22
|
+
load_server_config_failure: "There was a problem loading server configuration settings.",
|
|
23
|
+
server_misconfiguration: "The server does not appear to be configured properly. If you are the site admin, please see the logs for more details.",
|
|
24
|
+
};
|
|
25
|
+
export function isValidErrorId(id) {
|
|
26
|
+
return ERROR_IDS.includes(id);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=auth-error-message-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-error-message-catalog.js","sourceRoot":"","sources":["../src/auth-error-message-catalog.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG;IAChB,SAAS;IACT,aAAa;IACb,kBAAkB;IAClB,yBAAyB;IACzB,iBAAiB;IACjB,WAAW;IACX,wBAAwB;IACxB,uBAAuB;IACvB,4BAA4B;IAC5B,yBAAyB;CACW,CAAC;AAIvC,MAAM,CAAC,MAAM,qBAAqB,GAA4C;IAC5E,OAAO,EAAE,2BAA2B;IACpC,WAAW,EAAE,wCAAwC;IACrD,gBAAgB,EAAE,kCAAkC;IACpD,uBAAuB,EAAE,wCAAwC;IACjE,eAAe,EACb,iGAAiG;IACnG,SAAS,EACP,gHAAgH;IAClH,sBAAsB,EACpB,4EAA4E;IAC9E,qBAAqB,EACnB,qFAAqF;IACvF,0BAA0B,EACxB,4DAA4D;IAC9D,uBAAuB,EACrB,wHAAwH;CAC3H,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,SAAS,CAAC,QAAQ,CAAC,EAA8C,CAAC,CAAC;AAC5E,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { ERROR_MESSAGE_CATALOG, isValidErrorId } from "./auth-error-message-catalog";
|
|
2
|
+
export type { SchemaVaultsAuthErrorId } from "./auth-error-message-catalog";
|
|
1
3
|
export { userDataSchema, type UserData } from "./user_data";
|
|
2
4
|
export * from "./credentials";
|
|
3
5
|
export type * from "./credentials";
|
|
@@ -17,7 +19,7 @@ export { appIdSchema } from "@schemavaults/app-definitions";
|
|
|
17
19
|
export { audienceSchema, audienceRefSchema } from "./audience-schema";
|
|
18
20
|
export { inviteCodeFormatSchema, inviteCodeDefinitionSchema, } from "./invite-code";
|
|
19
21
|
export type { InviteCode, InviteCodeDefinition } from "./invite-code";
|
|
20
|
-
export { organizationIdSchema, isValidOrganizationID, organizationDefinitionSchema, hardcodedOrgs, SCHEMAVAULTS_ORGANIZATION_ID, MAXIMUM_USER_ORGANIZATIONS, MINIMUM_ORGANIZATION_ID_LENGTH, MAXIMUM_ORGANIZATION_ID_LENGTH, inviteMemberInputModes, inviteMemberFormSchema, organizationInvitationStatusTypes, organizationInvitationStatusSchema, organizationInvitationSchema, } from "./organizations";
|
|
22
|
+
export { organizationIdSchema, isValidOrganizationID, RESERVED_ORGANIZATION_IDS, organizationDefinitionSchema, hardcodedOrgs, SCHEMAVAULTS_ORGANIZATION_ID, MAXIMUM_USER_ORGANIZATIONS, MINIMUM_ORGANIZATION_ID_LENGTH, MAXIMUM_ORGANIZATION_ID_LENGTH, inviteMemberInputModes, inviteMemberFormSchema, organizationInvitationStatusTypes, organizationInvitationStatusSchema, organizationInvitationSchema, } from "./organizations";
|
|
21
23
|
export type { OrganizationID, OrganizationDefinition, InviteMemberInputMode, InviteMemberFormValues, InviteMemberSubmitData, OrganizationInvitationStatus, OrganizationInvitation, UserPendingInvitation, OrganizationInvitationWithUserData, } from "./organizations";
|
|
22
24
|
export { MaximumBrowserCookieSize } from "./MaximumBrowserCookieSize";
|
|
23
25
|
export { RefreshTokenCookieName, RefreshTokenExpiryCookieName, } from "./RefreshTokenCookieNames";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ERROR_MESSAGE_CATALOG, isValidErrorId } from "./auth-error-message-catalog";
|
|
1
2
|
export { userDataSchema } from "./user_data";
|
|
2
3
|
export * from "./credentials";
|
|
3
4
|
// Shapes of tokens
|
|
@@ -11,7 +12,7 @@ export { PRODUCTION_AUTH_SERVER_URL } from "@schemavaults/app-definitions";
|
|
|
11
12
|
export { appIdSchema } from "@schemavaults/app-definitions";
|
|
12
13
|
export { audienceSchema, audienceRefSchema } from "./audience-schema";
|
|
13
14
|
export { inviteCodeFormatSchema, inviteCodeDefinitionSchema, } from "./invite-code";
|
|
14
|
-
export { organizationIdSchema, isValidOrganizationID, organizationDefinitionSchema, hardcodedOrgs, SCHEMAVAULTS_ORGANIZATION_ID, MAXIMUM_USER_ORGANIZATIONS, MINIMUM_ORGANIZATION_ID_LENGTH, MAXIMUM_ORGANIZATION_ID_LENGTH, inviteMemberInputModes, inviteMemberFormSchema, organizationInvitationStatusTypes, organizationInvitationStatusSchema, organizationInvitationSchema, } from "./organizations";
|
|
15
|
+
export { organizationIdSchema, isValidOrganizationID, RESERVED_ORGANIZATION_IDS, organizationDefinitionSchema, hardcodedOrgs, SCHEMAVAULTS_ORGANIZATION_ID, MAXIMUM_USER_ORGANIZATIONS, MINIMUM_ORGANIZATION_ID_LENGTH, MAXIMUM_ORGANIZATION_ID_LENGTH, inviteMemberInputModes, inviteMemberFormSchema, organizationInvitationStatusTypes, organizationInvitationStatusSchema, organizationInvitationSchema, } from "./organizations";
|
|
15
16
|
export { MaximumBrowserCookieSize } from "./MaximumBrowserCookieSize";
|
|
16
17
|
export { RefreshTokenCookieName, RefreshTokenExpiryCookieName, } from "./RefreshTokenCookieNames";
|
|
17
18
|
export { AccessTokenCookieName, AccessTokenExpiryCookieName, } from "./AccessTokenCookieNames";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,aAAa,CAAC;AAE5D,cAAc,eAAe,CAAC;AAG9B,mBAAmB;AACnB,cAAc,cAAc,CAAC;AAM7B,cAAc,cAAc,CAAC;AAG7B,cAAc,QAAQ,CAAC;AAGvB,OAAO,EACL,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EAEzB,uCAAuC,GAExC,MAAM,yBAAyB,CAAC;AAEjC,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,aAAa,EACb,4BAA4B,EAC5B,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,sBAAsB,EACtB,sBAAsB,EACtB,iCAAiC,EACjC,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AAazB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAC;AAEtG,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAiB,MAAM,aAAa,CAAC;AAE5D,cAAc,eAAe,CAAC;AAG9B,mBAAmB;AACnB,cAAc,cAAc,CAAC;AAM7B,cAAc,cAAc,CAAC;AAG7B,cAAc,QAAQ,CAAC;AAGvB,OAAO,EACL,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EAEzB,uCAAuC,GAExC,MAAM,yBAAyB,CAAC;AAEjC,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,4BAA4B,EAC5B,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,sBAAsB,EACtB,sBAAsB,EACtB,iCAAiC,EACjC,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AAazB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAC;AAEtG,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { organizationIdSchema, isValidOrganizationID } from "./organization_id";
|
|
1
|
+
export { organizationIdSchema, isValidOrganizationID, RESERVED_ORGANIZATION_IDS } from "./organization_id";
|
|
2
2
|
export type { OrganizationID } from "./organization_id";
|
|
3
3
|
export { organizationDefinitionSchema } from "./organization_definition";
|
|
4
4
|
export type { OrganizationDefinition } from "./organization_definition";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { organizationIdSchema, isValidOrganizationID } from "./organization_id";
|
|
1
|
+
export { organizationIdSchema, isValidOrganizationID, RESERVED_ORGANIZATION_IDS } from "./organization_id";
|
|
2
2
|
export { organizationDefinitionSchema } from "./organization_definition";
|
|
3
3
|
export { SCHEMAVAULTS_ORGANIZATION_ID } from "./schemavaults_org_id";
|
|
4
4
|
export { hardcodedOrgs } from "./hardcoded_orgs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organizations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organizations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAG3G,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { type OrganizationID } from "./organization_id";
|
|
|
3
3
|
export declare const inviteMemberInputModes: readonly ["email", "uid"];
|
|
4
4
|
export type InviteMemberInputMode = (typeof inviteMemberInputModes)[number];
|
|
5
5
|
export declare const inviteMemberFormSchema: z.ZodEffects<z.ZodObject<{
|
|
6
|
-
organization_id: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
+
organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
7
7
|
input_mode: z.ZodEnum<["email", "uid"]>;
|
|
8
8
|
identifier: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
9
9
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const organizationDefinitionSchema: z.ZodObject<{
|
|
3
|
-
organization_id: z.ZodEffects<z.ZodString, string, string>;
|
|
3
|
+
organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
created_at: z.ZodNumber;
|
|
6
6
|
created_by: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const RESERVED_ORGANIZATION_IDS: readonly ["new", "create", "delete", "update"];
|
|
3
|
+
export declare const organizationIdSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
3
4
|
export type OrganizationID = z.infer<typeof organizationIdSchema>;
|
|
4
5
|
export declare function isValidOrganizationID(organization_id: string): organization_id is OrganizationID;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { MAXIMUM_ORGANIZATION_ID_LENGTH, MINIMUM_ORGANIZATION_ID_LENGTH, } from "./organization_constants";
|
|
3
|
+
export const RESERVED_ORGANIZATION_IDS = [
|
|
4
|
+
"new",
|
|
5
|
+
"create",
|
|
6
|
+
"delete",
|
|
7
|
+
"update",
|
|
8
|
+
];
|
|
3
9
|
export const organizationIdSchema = z
|
|
4
10
|
.string()
|
|
5
11
|
.min(MINIMUM_ORGANIZATION_ID_LENGTH, `Organization ID must be at least ${MINIMUM_ORGANIZATION_ID_LENGTH} characters long.`)
|
|
@@ -10,7 +16,8 @@ export const organizationIdSchema = z
|
|
|
10
16
|
return false;
|
|
11
17
|
}
|
|
12
18
|
return true;
|
|
13
|
-
}, "Organization ID may not end with a hyphen or dash.")
|
|
19
|
+
}, "Organization ID may not end with a hyphen or dash.")
|
|
20
|
+
.refine((orgId) => !RESERVED_ORGANIZATION_IDS.includes(orgId), "This organization ID is reserved and cannot be used.");
|
|
14
21
|
export function isValidOrganizationID(organization_id) {
|
|
15
22
|
return organizationIdSchema.safeParse(organization_id).success;
|
|
16
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization_id.js","sourceRoot":"","sources":["../../src/organizations/organization_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,EAAE;KACR,GAAG,CACF,8BAA8B,EAC9B,oCAAoC,8BAA8B,mBAAmB,CACtF;KACA,GAAG,CACF,8BAA8B,EAC9B,0CAA0C,8BAA8B,mBAAmB,CAC5F;KACA,KAAK,CACJ,oBAAoB,EACpB,qIAAqI,CACtI;KACA,MAAM,CAAC,CAAC,KAAa,EAAW,EAAE;IACjC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,EAAE,oDAAoD,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"organization_id.js","sourceRoot":"","sources":["../../src/organizations/organization_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;CAC4B,CAAC;AAEvC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,EAAE;KACR,GAAG,CACF,8BAA8B,EAC9B,oCAAoC,8BAA8B,mBAAmB,CACtF;KACA,GAAG,CACF,8BAA8B,EAC9B,0CAA0C,8BAA8B,mBAAmB,CAC5F;KACA,KAAK,CACJ,oBAAoB,EACpB,qIAAqI,CACtI;KACA,MAAM,CAAC,CAAC,KAAa,EAAW,EAAE;IACjC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,EAAE,oDAAoD,CAAC;KACvD,MAAM,CACL,CAAC,KAAa,EAAW,EAAE,CACzB,CAAC,yBAAyB,CAAC,QAAQ,CAAC,KAAmD,CAAC,EAC1F,sDAAsD,CACvD,CAAC;AAIJ,MAAM,UAAU,qBAAqB,CACnC,eAAuB;IAEvB,OAAO,oBAAoB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC;AACjE,CAAC"}
|
|
@@ -50,7 +50,7 @@ export interface OrganizationInvitationWithUserData {
|
|
|
50
50
|
}
|
|
51
51
|
export declare const organizationInvitationSchema: z.ZodObject<{
|
|
52
52
|
invitation_id: z.ZodString;
|
|
53
|
-
organization_id: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
+
organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
54
54
|
organization_name: z.ZodOptional<z.ZodString>;
|
|
55
55
|
inviter_uid: z.ZodString;
|
|
56
56
|
inviter_email: z.ZodOptional<z.ZodString>;
|
|
@@ -6,7 +6,7 @@ export declare const successfullyGeneratedTokensRecordSchema: z.ZodEffects<z.Zod
|
|
|
6
6
|
exp: z.ZodNumber;
|
|
7
7
|
token: z.ZodString;
|
|
8
8
|
aud: z.ZodString;
|
|
9
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
9
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
10
10
|
} & {
|
|
11
11
|
type: z.ZodLiteral<"access">;
|
|
12
12
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -32,7 +32,7 @@ export declare const successfullyGeneratedTokensRecordSchema: z.ZodEffects<z.Zod
|
|
|
32
32
|
exp: z.ZodNumber;
|
|
33
33
|
token: z.ZodString;
|
|
34
34
|
aud: z.ZodString;
|
|
35
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
35
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
36
36
|
} & {
|
|
37
37
|
type: z.ZodLiteral<"refresh">;
|
|
38
38
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -199,7 +199,7 @@ export declare const requestTokensResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
199
199
|
exp: z.ZodNumber;
|
|
200
200
|
token: z.ZodString;
|
|
201
201
|
aud: z.ZodString;
|
|
202
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
202
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
203
203
|
} & {
|
|
204
204
|
type: z.ZodLiteral<"access">;
|
|
205
205
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -225,7 +225,7 @@ export declare const requestTokensResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
225
225
|
exp: z.ZodNumber;
|
|
226
226
|
token: z.ZodString;
|
|
227
227
|
aud: z.ZodString;
|
|
228
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
228
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
229
229
|
} & {
|
|
230
230
|
type: z.ZodLiteral<"refresh">;
|
|
231
231
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -423,7 +423,7 @@ export declare const requestTokensResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
423
423
|
disabled?: boolean | undefined;
|
|
424
424
|
invite_code?: string | undefined;
|
|
425
425
|
}>>;
|
|
426
|
-
userOrgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
426
|
+
userOrgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
427
427
|
}, "strict", z.ZodTypeAny, {
|
|
428
428
|
message: string;
|
|
429
429
|
client_app_id: string;
|
|
@@ -8,7 +8,7 @@ export declare const tokenDataSchema: z.ZodObject<{
|
|
|
8
8
|
exp: z.ZodNumber;
|
|
9
9
|
token: z.ZodString;
|
|
10
10
|
aud: z.ZodString;
|
|
11
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
11
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
12
12
|
}, "strict", z.ZodTypeAny, {
|
|
13
13
|
type: "refresh" | "access";
|
|
14
14
|
uid: string;
|
|
@@ -39,7 +39,7 @@ export declare const refreshTokenDataSchema: z.ZodObject<{
|
|
|
39
39
|
exp: z.ZodNumber;
|
|
40
40
|
token: z.ZodString;
|
|
41
41
|
aud: z.ZodString;
|
|
42
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
42
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
43
43
|
} & {
|
|
44
44
|
type: z.ZodLiteral<"refresh">;
|
|
45
45
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -65,7 +65,7 @@ export declare const accessTokenDataSchema: z.ZodObject<{
|
|
|
65
65
|
exp: z.ZodNumber;
|
|
66
66
|
token: z.ZodString;
|
|
67
67
|
aud: z.ZodString;
|
|
68
|
-
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
68
|
+
orgs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
69
69
|
} & {
|
|
70
70
|
type: z.ZodLiteral<"access">;
|
|
71
71
|
}, "strict", z.ZodTypeAny, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/auth-common",
|
|
3
3
|
"description": "Types and utility functions for authentication and authorization",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.8",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"zod": "3.25.8",
|
|
17
|
-
"@schemavaults/app-definitions": "0.6.
|
|
17
|
+
"@schemavaults/app-definitions": "0.6.21",
|
|
18
18
|
"crypto-js": "4.2.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
@@ -66,6 +66,11 @@
|
|
|
66
66
|
"types": "./dist/AccessTokenCookieNames.d.ts",
|
|
67
67
|
"import": "./dist/AccessTokenCookieNames.js",
|
|
68
68
|
"require": "./dist/AccessTokenCookieNames.js"
|
|
69
|
+
},
|
|
70
|
+
"./auth-error-message-catalog": {
|
|
71
|
+
"types": "./dist/auth-error-message-catalog.d.ts",
|
|
72
|
+
"import": "./dist/auth-error-message-catalog.js",
|
|
73
|
+
"require": "./dist/auth-error-message-catalog.js"
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
}
|