@schemavaults/auth-server-sdk 0.21.6 → 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 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.6" : "unknown";
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.6"}`);
251
+ console.log(`${PACKAGE_NAME}@${"0.21.7"}`);
252
252
  return;
253
253
  }
254
254
  const command = args.find((arg) => !arg.startsWith("-")) ?? "codegen";
@@ -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.6",
4
+ "version": "0.21.7",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
7
7
  "repository": {