@spytecgps/lambda-utils 0.0.10 → 0.9.1
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/types.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import { APIGatewayProxyEventBase } from 'aws-lambda/trigger/api-gateway-proxy';
|
|
|
4
4
|
export interface SpytecAuthorizedResources {
|
|
5
5
|
devices: string[];
|
|
6
6
|
}
|
|
7
|
+
export declare type AuthClass = 'user' | 'client' | 'system';
|
|
7
8
|
export interface SpytecAuthContext {
|
|
8
|
-
type:
|
|
9
|
+
type: AuthClass;
|
|
9
10
|
userId?: string;
|
|
10
11
|
clientId: number;
|
|
11
12
|
resources: SpytecAuthorizedResources;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as Joi from 'joi';
|
|
2
|
-
import { SpytecAuthContext } from '../types';
|
|
2
|
+
import { AuthClass, SpytecAuthContext } from '../types';
|
|
3
3
|
import { APIGatewayEventRequestContextWithAuthorizer } from 'aws-lambda/common/api-gateway';
|
|
4
4
|
interface GetAuthorizerValidatorParams {
|
|
5
5
|
scope?: string;
|
|
6
|
+
type?: AuthClass;
|
|
6
7
|
}
|
|
7
|
-
export declare const getAuthorizerValidator: ({ scope }?: GetAuthorizerValidatorParams) => Joi.ObjectSchema<SpytecAuthContext>;
|
|
8
|
+
export declare const getAuthorizerValidator: ({ scope, type }?: GetAuthorizerValidatorParams) => Joi.ObjectSchema<SpytecAuthContext>;
|
|
8
9
|
/**
|
|
9
10
|
* @deprecated
|
|
10
11
|
*/
|
package/dist/wrappers/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export {
|
|
1
|
+
import apiGatewayEventWrapper from './apiGatewayEventWrapper';
|
|
2
|
+
export { apiGatewayEventWrapper };
|
|
3
3
|
export * from './response';
|