@schemavaults/auth-server-sdk 0.21.5 → 0.21.7
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/cli.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/route_guards/withAdminRouteGuard/withAdminApiRouteGuard.d.ts +2 -2
- package/dist/route_guards/withAdminRouteGuard/withAdminServerComponentRouteGuard.d.ts +2 -2
- package/dist/route_guards/withAuthenticatedRouteGuard/withAuthenticatedApiRouteGuard.d.ts +3 -3
- package/dist/route_guards/withAuthenticatedRouteGuard/withAuthenticatedServerComponentRouteGuard.d.ts +3 -3
- package/package.json +4 -4
package/dist/cli.cjs
CHANGED
|
@@ -66,7 +66,7 @@ var init_resolve_codegen_templates_directory = __esm({
|
|
|
66
66
|
|
|
67
67
|
// src/NextjsAppDirectoryPlugin/codegen-marker.ts
|
|
68
68
|
function getCodegenMarkerComment() {
|
|
69
|
-
const version = true ? "0.21.
|
|
69
|
+
const version = true ? "0.21.7" : "unknown";
|
|
70
70
|
return `${CODEGEN_MARKER_PREFIX}${version}`;
|
|
71
71
|
}
|
|
72
72
|
function hasCodegenMarker(firstLine) {
|
|
@@ -248,7 +248,7 @@ async function main() {
|
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
if (args.includes("--version") || args.includes("-v")) {
|
|
251
|
-
console.log(`${PACKAGE_NAME}@${"0.21.
|
|
251
|
+
console.log(`${PACKAGE_NAME}@${"0.21.7"}`);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
const command = args.find((arg) => !arg.startsWith("-")) ?? "codegen";
|
package/dist/index.d.ts
CHANGED
|
@@ -32,4 +32,4 @@ export { organizationIdSchema, organizationDefinitionSchema, isValidOrganization
|
|
|
32
32
|
export type { OrganizationID, OrganizationDefinition, } from "@schemavaults/auth-common";
|
|
33
33
|
export type { SchemaVaultsApp, SchemaVaultsAppDomainRef, } from "@schemavaults/app-definitions";
|
|
34
34
|
export type { SchemaVaultsApiServerDefinition, SchemaVaultsApiServerDomainRef, } from "@schemavaults/app-definitions";
|
|
35
|
-
export { getHardcodedApp, getHardcodedApiServer,
|
|
35
|
+
export { getHardcodedApp, getHardcodedClientWebAppDomain, getHardcodedApiServer, getHardcodedApiServerDomain, getAuthServerUri, } from "@schemavaults/app-definitions";
|
package/dist/index.js
CHANGED
|
@@ -24,5 +24,5 @@ export { userDataSchema } from "@schemavaults/auth-common";
|
|
|
24
24
|
// Re-export organization types
|
|
25
25
|
export { organizationIdSchema, organizationDefinitionSchema, isValidOrganizationID, SCHEMAVAULTS_ORGANIZATION_ID, } from "@schemavaults/auth-common";
|
|
26
26
|
// Loading hardcoded apps/apis
|
|
27
|
-
export { getHardcodedApp, getHardcodedApiServer,
|
|
27
|
+
export { getHardcodedApp, getHardcodedClientWebAppDomain, getHardcodedApiServer, getHardcodedApiServerDomain, getAuthServerUri, } from "@schemavaults/app-definitions";
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAG7B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,yBAAyB,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EACL,qBAAqB,EACrB,cAAc,GACf,MAAM,qCAAqC,CAAC;AAG7C,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC,iBAAiB;AACjB,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EACL,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,yBAAyB;AACzB,OAA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AM,0CAA0C,CAAC;AAE9F,OAAO,EACL,WAAW,EACX,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AAEvC,eAAe;AACf,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,gBAAgB;AAChB,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,4BAA4B;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,+BAA+B;AAC/B,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAkBnC,8BAA8B;AAC9B,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,qBAAqB,EACrB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,+BAA+B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { ApiServerId } from "@schemavaults/app-definitions";
|
|
|
2
2
|
import { type TProtectedAuthenticatedApiRoute, type IBaseProtectedAuthenticatedApiRouteInputs } from "../../route_guards/withAuthenticatedRouteGuard";
|
|
3
3
|
import type { NextRequest, NextResponse } from "next/server";
|
|
4
4
|
import type { IJwtKeyManager } from "../../JwtKeyManager";
|
|
5
|
-
type TAdditionalRouteInputs<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs> = Omit<TRouteInputs, keyof IBaseProtectedAuthenticatedApiRouteInputs>;
|
|
6
|
-
export declare function withAdminApiRouteGuard<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs>(api_route_handler: TProtectedAuthenticatedApiRoute<TRouteInputs>, additional_custom_api_route_inputs?: TAdditionalRouteInputs<TRouteInputs> | undefined, custom_is_authorized_check?: ((route_inputs: TRouteInputs) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): (req: NextRequest) => Promise<NextResponse>;
|
|
5
|
+
type TAdditionalRouteInputs<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs = IBaseProtectedAuthenticatedApiRouteInputs> = Omit<TRouteInputs, keyof IBaseProtectedAuthenticatedApiRouteInputs>;
|
|
6
|
+
export declare function withAdminApiRouteGuard<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs = IBaseProtectedAuthenticatedApiRouteInputs>(api_route_handler: TProtectedAuthenticatedApiRoute<TRouteInputs>, additional_custom_api_route_inputs?: TAdditionalRouteInputs<TRouteInputs> | undefined, custom_is_authorized_check?: ((route_inputs: TRouteInputs) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): (req: NextRequest) => Promise<NextResponse>;
|
|
7
7
|
export default withAdminApiRouteGuard;
|
|
8
8
|
export type { TProtectedAuthenticatedApiRoute as TProtectedAdminApiRoute, IBaseProtectedAuthenticatedApiRouteInputs as IBaseProtectedAdminApiRouteInputs, } from "../../route_guards/withAuthenticatedRouteGuard";
|
|
@@ -2,6 +2,6 @@ import { type ApiServerId } from "@schemavaults/app-definitions";
|
|
|
2
2
|
import { type IBaseProtectedAuthenticatedServerComponentPageProps, type TProtectedAuthenticatedPageServerComponent } from "../../route_guards/withAuthenticatedRouteGuard";
|
|
3
3
|
import type { ReactElement } from "react";
|
|
4
4
|
import type { IJwtKeyManager } from "../../JwtKeyManager";
|
|
5
|
-
type TAdditionalProps<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps> = Omit<TProps, keyof IBaseProtectedAuthenticatedServerComponentPageProps>;
|
|
6
|
-
export declare function withAdminServerComponentRouteGuard<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps>(server_component: TProtectedAuthenticatedPageServerComponent<TProps>, additional_custom_server_component_props?: TAdditionalProps<TProps> | undefined, custom_is_authorized_check?: ((props: TProps) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): Promise<ReactElement>;
|
|
5
|
+
type TAdditionalProps<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps = IBaseProtectedAuthenticatedServerComponentPageProps> = Omit<TProps, keyof IBaseProtectedAuthenticatedServerComponentPageProps>;
|
|
6
|
+
export declare function withAdminServerComponentRouteGuard<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps = IBaseProtectedAuthenticatedServerComponentPageProps>(server_component: TProtectedAuthenticatedPageServerComponent<TProps>, additional_custom_server_component_props?: TAdditionalProps<TProps> | undefined, custom_is_authorized_check?: ((props: TProps) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): Promise<ReactElement>;
|
|
7
7
|
export type { TProtectedAuthenticatedPageServerComponent as TProtectedAdminPageServerComponent, IBaseProtectedAuthenticatedServerComponentPageProps as IBaseProtectedAdminServerComponentPageProps, } from "../../route_guards/withAuthenticatedRouteGuard";
|
|
@@ -2,7 +2,7 @@ import { type ApiServerId } from "@schemavaults/app-definitions";
|
|
|
2
2
|
import type { NextRequest, NextResponse } from "next/server";
|
|
3
3
|
import type { IJwtKeyManager } from "../../JwtKeyManager";
|
|
4
4
|
import type { IBaseProtectedAuthenticatedApiRouteInputs } from "./IBaseProtectedAuthenticatedApiRouteInputs";
|
|
5
|
-
export type TProtectedAuthenticatedApiRoute<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs> = (route_inputs: TRouteInputs) => Promise<NextResponse>;
|
|
6
|
-
type TAdditionalRouteInputs<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs> = Omit<TRouteInputs, keyof IBaseProtectedAuthenticatedApiRouteInputs>;
|
|
7
|
-
export declare function withAuthenticatedApiRouteGuard<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs>(api_route_handler: TProtectedAuthenticatedApiRoute<TRouteInputs>, additional_custom_api_route_inputs?: TAdditionalRouteInputs<TRouteInputs> | undefined, route_guard_type?: "authenticated" | "admin", custom_is_authorized_check?: ((route_inputs: TRouteInputs) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): (req: NextRequest) => Promise<NextResponse>;
|
|
5
|
+
export type TProtectedAuthenticatedApiRoute<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs = IBaseProtectedAuthenticatedApiRouteInputs> = (route_inputs: TRouteInputs) => Promise<NextResponse>;
|
|
6
|
+
type TAdditionalRouteInputs<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs = IBaseProtectedAuthenticatedApiRouteInputs> = Omit<TRouteInputs, keyof IBaseProtectedAuthenticatedApiRouteInputs>;
|
|
7
|
+
export declare function withAuthenticatedApiRouteGuard<TRouteInputs extends IBaseProtectedAuthenticatedApiRouteInputs = IBaseProtectedAuthenticatedApiRouteInputs>(api_route_handler: TProtectedAuthenticatedApiRoute<TRouteInputs>, additional_custom_api_route_inputs?: TAdditionalRouteInputs<TRouteInputs> | undefined, route_guard_type?: "authenticated" | "admin", custom_is_authorized_check?: ((route_inputs: TRouteInputs) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): (req: NextRequest) => Promise<NextResponse>;
|
|
8
8
|
export default withAuthenticatedApiRouteGuard;
|
|
@@ -2,7 +2,7 @@ import { type ApiServerId } from "@schemavaults/app-definitions";
|
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import type { IJwtKeyManager } from "../../JwtKeyManager";
|
|
4
4
|
import type { IBaseProtectedAuthenticatedServerComponentPageProps } from "./IBaseProtectedAuthenticatedServerComponentPageProps";
|
|
5
|
-
export type TProtectedAuthenticatedPageServerComponent<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps> = (props: TProps) => Promise<ReactElement>;
|
|
6
|
-
type TAdditionalProps<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps> = Omit<TProps, keyof IBaseProtectedAuthenticatedServerComponentPageProps>;
|
|
7
|
-
export declare function withAuthenticatedServerComponentRouteGuard<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps>(server_component: TProtectedAuthenticatedPageServerComponent<TProps>, additional_custom_server_component_props?: TAdditionalProps<TProps> | undefined, route_guard_type?: "authenticated" | "admin", custom_is_authorized_check?: ((props: TProps) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): Promise<ReactElement>;
|
|
5
|
+
export type TProtectedAuthenticatedPageServerComponent<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps = IBaseProtectedAuthenticatedServerComponentPageProps> = (props: TProps) => Promise<ReactElement>;
|
|
6
|
+
type TAdditionalProps<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps = IBaseProtectedAuthenticatedServerComponentPageProps> = Omit<TProps, keyof IBaseProtectedAuthenticatedServerComponentPageProps>;
|
|
7
|
+
export declare function withAuthenticatedServerComponentRouteGuard<TProps extends IBaseProtectedAuthenticatedServerComponentPageProps = IBaseProtectedAuthenticatedServerComponentPageProps>(server_component: TProtectedAuthenticatedPageServerComponent<TProps>, additional_custom_server_component_props?: TAdditionalProps<TProps> | undefined, route_guard_type?: "authenticated" | "admin", custom_is_authorized_check?: ((props: TProps) => Promise<boolean>) | undefined, jwt_keys_manager?: IJwtKeyManager, getApiServerId?: () => ApiServerId): Promise<ReactElement>;
|
|
8
8
|
export default withAuthenticatedServerComponentRouteGuard;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/auth-server-sdk",
|
|
3
3
|
"description": "TypeScript SDK for building authenticated endpoints/middlewares for the Auth Server and Resource Servers",
|
|
4
|
-
"version": "0.21.
|
|
4
|
+
"version": "0.21.7",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"zod": "3.25.8",
|
|
21
|
-
"@schemavaults/jwt": "0.6.
|
|
22
|
-
"@schemavaults/auth-common": "0.9.
|
|
23
|
-
"@schemavaults/app-definitions": "0.6.
|
|
21
|
+
"@schemavaults/jwt": "0.6.34",
|
|
22
|
+
"@schemavaults/auth-common": "0.9.4",
|
|
23
|
+
"@schemavaults/app-definitions": "0.6.19"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsc --project tsconfig.json && tsc-alias --project tsconfig.json && bun run copy-codegen-templates && bun run prepare-cli",
|