@aws-lambda-powertools/parser
Advanced tools
Comparing version
import { z } from 'zod'; | ||
import { AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncOidcIdentity } from './appsync-shared.js'; | ||
declare const AppSyncLambdaIdentity: z.ZodObject<{ | ||
resolverContext: z.ZodAny; | ||
}, "strip", z.ZodTypeAny, { | ||
resolverContext?: any; | ||
}, { | ||
resolverContext?: any; | ||
}>; | ||
/** | ||
@@ -74,22 +82,22 @@ * A zod schema for an AppSync resolver event | ||
username: z.ZodString; | ||
claims: z.ZodAny; | ||
claims: z.ZodRecord<z.ZodString, z.ZodUnknown>; | ||
sourceIp: z.ZodArray<z.ZodString, "many">; | ||
defaultAuthStrategy: z.ZodString; | ||
defaultAuthStrategy: z.ZodNullable<z.ZodString>; | ||
groups: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; | ||
}, "strip", z.ZodTypeAny, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}>, z.ZodObject<{ | ||
@@ -208,8 +216,8 @@ accountId: z.ZodString; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -251,8 +259,8 @@ sub: string; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -392,22 +400,22 @@ sub: string; | ||
username: z.ZodString; | ||
claims: z.ZodAny; | ||
claims: z.ZodRecord<z.ZodString, z.ZodUnknown>; | ||
sourceIp: z.ZodArray<z.ZodString, "many">; | ||
defaultAuthStrategy: z.ZodString; | ||
defaultAuthStrategy: z.ZodNullable<z.ZodString>; | ||
groups: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; | ||
}, "strip", z.ZodTypeAny, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}>, z.ZodObject<{ | ||
@@ -526,8 +534,8 @@ accountId: z.ZodString; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -569,8 +577,8 @@ sub: string; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -584,3 +592,3 @@ sub: string; | ||
}>, "many">; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema }; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema, AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncOidcIdentity, AppSyncLambdaIdentity, }; | ||
//# sourceMappingURL=appsync.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AppSyncBatchResolverSchema = exports.AppSyncResolverSchema = void 0; | ||
exports.AppSyncLambdaIdentity = exports.AppSyncOidcIdentity = exports.AppSyncIamIdentity = exports.AppSyncCognitoIdentity = exports.AppSyncBatchResolverSchema = exports.AppSyncResolverSchema = void 0; | ||
const zod_1 = require("zod"); | ||
const AppSyncIamIdentity = zod_1.z.object({ | ||
accountId: zod_1.z.string(), | ||
cognitoIdentityPoolId: zod_1.z.string().nullable(), | ||
cognitoIdentityId: zod_1.z.string().nullable(), | ||
sourceIp: zod_1.z.array(zod_1.z.string()), | ||
username: zod_1.z.string(), | ||
userArn: zod_1.z.string(), | ||
cognitoIdentityAuthType: zod_1.z.string().nullable(), | ||
cognitoIdentityAuthProvider: zod_1.z.string().nullable(), | ||
}); | ||
const AppSyncCognitoIdentity = zod_1.z.object({ | ||
sub: zod_1.z.string(), | ||
issuer: zod_1.z.string(), | ||
username: zod_1.z.string(), | ||
claims: zod_1.z.any(), | ||
sourceIp: zod_1.z.array(zod_1.z.string()), | ||
defaultAuthStrategy: zod_1.z.string(), | ||
groups: zod_1.z.array(zod_1.z.string()).nullable(), | ||
}); | ||
const AppSyncOidcIdentity = zod_1.z.object({ | ||
claims: zod_1.z.any(), | ||
issuer: zod_1.z.string(), | ||
sub: zod_1.z.string(), | ||
}); | ||
const appsync_shared_js_1 = require("./appsync-shared.js"); | ||
Object.defineProperty(exports, "AppSyncCognitoIdentity", { enumerable: true, get: function () { return appsync_shared_js_1.AppSyncCognitoIdentity; } }); | ||
Object.defineProperty(exports, "AppSyncIamIdentity", { enumerable: true, get: function () { return appsync_shared_js_1.AppSyncIamIdentity; } }); | ||
Object.defineProperty(exports, "AppSyncOidcIdentity", { enumerable: true, get: function () { return appsync_shared_js_1.AppSyncOidcIdentity; } }); | ||
const AppSyncLambdaIdentity = zod_1.z.object({ | ||
resolverContext: zod_1.z.any(), | ||
}); | ||
exports.AppSyncLambdaIdentity = AppSyncLambdaIdentity; | ||
const AppSyncIdentity = zod_1.z.union([ | ||
AppSyncCognitoIdentity, | ||
AppSyncIamIdentity, | ||
AppSyncOidcIdentity, | ||
appsync_shared_js_1.AppSyncCognitoIdentity, | ||
appsync_shared_js_1.AppSyncIamIdentity, | ||
appsync_shared_js_1.AppSyncOidcIdentity, | ||
AppSyncLambdaIdentity, | ||
@@ -37,0 +18,0 @@ ]); |
@@ -330,65 +330,99 @@ import { z } from 'zod'; | ||
* { | ||
* "Records": [ | ||
* { | ||
* "eventID": "1", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "ApproximateCreationDateTime": 1693997155.0, | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Records":[{ | ||
* "eventID":"1", | ||
* "eventName":"INSERT", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES", | ||
* "SequenceNumber": "111", | ||
* "SizeBytes": 26 | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "INSERT", | ||
* "eventSourceARN": "eventsource_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* "SequenceNumber":"111", | ||
* "SizeBytes":26, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* { | ||
* "eventID": "2", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "OldImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"2", | ||
* "eventName":"MODIFY", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "SequenceNumber": "222", | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "SizeBytes": 59, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "This item has changed" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "SequenceNumber":"222", | ||
* "SizeBytes":59, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"3", | ||
* "eventName":"REMOVE", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES" | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "MODIFY", | ||
* "eventSourceARN": "source_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* } | ||
* ] | ||
* "SequenceNumber":"333", | ||
* "SizeBytes":38, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }], | ||
* "window": { | ||
* "start": "2020-07-30T17:00:00Z", | ||
* "end": "2020-07-30T17:05:00Z" | ||
* }, | ||
* "state": { | ||
* "1": "state1" | ||
* }, | ||
* "shardId": "shard123456789", | ||
* "eventSourceARN": "stream-ARN", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
@@ -496,2 +530,17 @@ * ``` | ||
}>, "many">; | ||
window: z.ZodOptional<z.ZodObject<{ | ||
start: z.ZodString; | ||
end: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
start: string; | ||
end: string; | ||
}, { | ||
start: string; | ||
end: string; | ||
}>>; | ||
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
shardId: z.ZodOptional<z.ZodString>; | ||
eventSourceARN: z.ZodOptional<z.ZodString>; | ||
isFinalInvokeForWindow: z.ZodOptional<z.ZodBoolean>; | ||
isWindowTerminatedEarly: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -517,2 +566,11 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, string> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}, { | ||
@@ -540,4 +598,13 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, string> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}>; | ||
export { DynamoDBStreamToKinesisRecord, DynamoDBStreamToKinesisChangeRecord, DynamoDBStreamSchema, DynamoDBStreamRecord, DynamoDBStreamChangeRecord, DynamoDBStreamChangeRecordBase, UserIdentity, }; | ||
//# sourceMappingURL=dynamodb.d.ts.map |
@@ -138,65 +138,99 @@ "use strict"; | ||
* { | ||
* "Records": [ | ||
* { | ||
* "eventID": "1", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "ApproximateCreationDateTime": 1693997155.0, | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Records":[{ | ||
* "eventID":"1", | ||
* "eventName":"INSERT", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES", | ||
* "SequenceNumber": "111", | ||
* "SizeBytes": 26 | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "INSERT", | ||
* "eventSourceARN": "eventsource_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* "SequenceNumber":"111", | ||
* "SizeBytes":26, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* { | ||
* "eventID": "2", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "OldImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"2", | ||
* "eventName":"MODIFY", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "SequenceNumber": "222", | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "SizeBytes": 59, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "This item has changed" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "SequenceNumber":"222", | ||
* "SizeBytes":59, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"3", | ||
* "eventName":"REMOVE", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES" | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "MODIFY", | ||
* "eventSourceARN": "source_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* } | ||
* ] | ||
* "SequenceNumber":"333", | ||
* "SizeBytes":38, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }], | ||
* "window": { | ||
* "start": "2020-07-30T17:00:00Z", | ||
* "end": "2020-07-30T17:05:00Z" | ||
* }, | ||
* "state": { | ||
* "1": "state1" | ||
* }, | ||
* "shardId": "shard123456789", | ||
* "eventSourceARN": "stream-ARN", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
@@ -210,3 +244,14 @@ * ``` | ||
Records: zod_1.z.array(DynamoDBStreamRecord).min(1), | ||
window: zod_1.z | ||
.object({ | ||
start: zod_1.z.string().datetime(), | ||
end: zod_1.z.string().datetime(), | ||
}) | ||
.optional(), | ||
state: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(), | ||
shardId: zod_1.z.string().optional(), | ||
eventSourceARN: zod_1.z.string().optional(), | ||
isFinalInvokeForWindow: zod_1.z.boolean().optional(), | ||
isWindowTerminatedEarly: zod_1.z.boolean().optional(), | ||
}); | ||
exports.DynamoDBStreamSchema = DynamoDBStreamSchema; |
@@ -43,4 +43,4 @@ import { z } from 'zod'; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -55,4 +55,4 @@ account: string; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -59,0 +59,0 @@ account: string; |
@@ -5,2 +5,3 @@ export { AlbSchema, AlbMultiValueHeadersSchema } from './alb.js'; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema, } from './appsync.js'; | ||
export { AppSyncEventsBaseSchema, AppSyncEventsRequestSchema, AppSyncEventsInfoSchema, AppSyncEventsPublishSchema, AppSyncEventsSubscribeSchema, } from './appsync-events.js'; | ||
export { APIGatewayProxyEventV2Schema, APIGatewayRequestAuthorizerEventV2Schema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, } from './api-gatewayv2.js'; | ||
@@ -7,0 +8,0 @@ export { CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, } from './cloudformation-custom-resource.js'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.S3Schema = exports.S3ObjectLambdaEventSchema = exports.S3EventNotificationEventBridgeSchema = exports.S3SqsEventNotificationSchema = exports.LambdaFunctionUrlSchema = exports.KinesisFirehoseSqsRecordSchema = exports.KinesisFirehoseRecordSchema = exports.KinesisFirehoseSqsSchema = exports.KinesisFirehoseSchema = exports.KinesisDataStreamRecord = exports.KinesisDynamoDBStreamSchema = exports.KinesisDataStreamSchema = exports.KafkaRecordSchema = exports.KafkaSelfManagedEventSchema = exports.KafkaMskEventSchema = exports.EventBridgeSchema = exports.DynamoDBStreamToKinesisRecord = exports.DynamoDBStreamSchema = exports.VerifyAuthChallengeTriggerSchema = exports.CreateAuthChallengeTriggerSchema = exports.DefineAuthChallengeTriggerSchema = exports.CustomSMSSenderTriggerSchema = exports.CustomEmailSenderTriggerSchema = exports.CustomMessageTriggerSchema = exports.MigrateUserTriggerSchema = exports.PreTokenGenerationTriggerSchemaV2AndV3 = exports.PreTokenGenerationTriggerSchemaV1 = exports.PostAuthenticationTriggerSchema = exports.PreAuthenticationTriggerSchema = exports.PostConfirmationTriggerSchema = exports.PreSignupTriggerSchema = exports.CloudWatchLogsSchema = exports.CloudWatchLogsDecodeSchema = exports.CloudWatchLogEventSchema = exports.CloudFormationCustomResourceUpdateSchema = exports.CloudFormationCustomResourceDeleteSchema = exports.CloudFormationCustomResourceCreateSchema = exports.APIGatewayRequestContextV2Schema = exports.APIGatewayRequestAuthorizerV2Schema = exports.APIGatewayRequestAuthorizerEventV2Schema = exports.APIGatewayProxyEventV2Schema = exports.AppSyncBatchResolverSchema = exports.AppSyncResolverSchema = exports.APIGatewayProxyWebsocketEventSchema = exports.APIGatewayEventRequestContextSchema = exports.APIGatewayTokenAuthorizerEventSchema = exports.APIGatewayRequestAuthorizerEventSchema = exports.APIGatewayProxyEventSchema = exports.AlbMultiValueHeadersSchema = exports.AlbSchema = void 0; | ||
exports.VpcLatticeV2Schema = exports.VpcLatticeSchema = exports.TransferFamilySchema = exports.SqsAttributesSchema = exports.SqsMsgAttributeDataTypeSchema = exports.SqsMsgAttributeSchema = exports.SqsRecordSchema = exports.SqsSchema = exports.SnsNotificationSchema = exports.SnsSqsNotificationSchema = exports.SnsRecordSchema = exports.SnsSchema = exports.SesRecordSchema = exports.SesSchema = void 0; | ||
exports.KinesisFirehoseSqsRecordSchema = exports.KinesisFirehoseRecordSchema = exports.KinesisFirehoseSqsSchema = exports.KinesisFirehoseSchema = exports.KinesisDataStreamRecord = exports.KinesisDynamoDBStreamSchema = exports.KinesisDataStreamSchema = exports.KafkaRecordSchema = exports.KafkaSelfManagedEventSchema = exports.KafkaMskEventSchema = exports.EventBridgeSchema = exports.DynamoDBStreamToKinesisRecord = exports.DynamoDBStreamSchema = exports.VerifyAuthChallengeTriggerSchema = exports.CreateAuthChallengeTriggerSchema = exports.DefineAuthChallengeTriggerSchema = exports.CustomSMSSenderTriggerSchema = exports.CustomEmailSenderTriggerSchema = exports.CustomMessageTriggerSchema = exports.MigrateUserTriggerSchema = exports.PreTokenGenerationTriggerSchemaV2AndV3 = exports.PreTokenGenerationTriggerSchemaV1 = exports.PostAuthenticationTriggerSchema = exports.PreAuthenticationTriggerSchema = exports.PostConfirmationTriggerSchema = exports.PreSignupTriggerSchema = exports.CloudWatchLogsSchema = exports.CloudWatchLogsDecodeSchema = exports.CloudWatchLogEventSchema = exports.CloudFormationCustomResourceUpdateSchema = exports.CloudFormationCustomResourceDeleteSchema = exports.CloudFormationCustomResourceCreateSchema = exports.APIGatewayRequestContextV2Schema = exports.APIGatewayRequestAuthorizerV2Schema = exports.APIGatewayRequestAuthorizerEventV2Schema = exports.APIGatewayProxyEventV2Schema = exports.AppSyncEventsSubscribeSchema = exports.AppSyncEventsPublishSchema = exports.AppSyncEventsInfoSchema = exports.AppSyncEventsRequestSchema = exports.AppSyncEventsBaseSchema = exports.AppSyncBatchResolverSchema = exports.AppSyncResolverSchema = exports.APIGatewayProxyWebsocketEventSchema = exports.APIGatewayEventRequestContextSchema = exports.APIGatewayTokenAuthorizerEventSchema = exports.APIGatewayRequestAuthorizerEventSchema = exports.APIGatewayProxyEventSchema = exports.AlbMultiValueHeadersSchema = exports.AlbSchema = void 0; | ||
exports.VpcLatticeV2Schema = exports.VpcLatticeSchema = exports.TransferFamilySchema = exports.SqsAttributesSchema = exports.SqsMsgAttributeDataTypeSchema = exports.SqsMsgAttributeSchema = exports.SqsRecordSchema = exports.SqsSchema = exports.SnsNotificationSchema = exports.SnsSqsNotificationSchema = exports.SnsRecordSchema = exports.SnsSchema = exports.SesRecordSchema = exports.SesSchema = exports.S3Schema = exports.S3ObjectLambdaEventSchema = exports.S3EventNotificationEventBridgeSchema = exports.S3SqsEventNotificationSchema = exports.LambdaFunctionUrlSchema = void 0; | ||
var alb_js_1 = require("./alb.js"); | ||
@@ -18,2 +18,8 @@ Object.defineProperty(exports, "AlbSchema", { enumerable: true, get: function () { return alb_js_1.AlbSchema; } }); | ||
Object.defineProperty(exports, "AppSyncBatchResolverSchema", { enumerable: true, get: function () { return appsync_js_1.AppSyncBatchResolverSchema; } }); | ||
var appsync_events_js_1 = require("./appsync-events.js"); | ||
Object.defineProperty(exports, "AppSyncEventsBaseSchema", { enumerable: true, get: function () { return appsync_events_js_1.AppSyncEventsBaseSchema; } }); | ||
Object.defineProperty(exports, "AppSyncEventsRequestSchema", { enumerable: true, get: function () { return appsync_events_js_1.AppSyncEventsRequestSchema; } }); | ||
Object.defineProperty(exports, "AppSyncEventsInfoSchema", { enumerable: true, get: function () { return appsync_events_js_1.AppSyncEventsInfoSchema; } }); | ||
Object.defineProperty(exports, "AppSyncEventsPublishSchema", { enumerable: true, get: function () { return appsync_events_js_1.AppSyncEventsPublishSchema; } }); | ||
Object.defineProperty(exports, "AppSyncEventsSubscribeSchema", { enumerable: true, get: function () { return appsync_events_js_1.AppSyncEventsSubscribeSchema; } }); | ||
var api_gatewayv2_js_1 = require("./api-gatewayv2.js"); | ||
@@ -20,0 +26,0 @@ Object.defineProperty(exports, "APIGatewayProxyEventV2Schema", { enumerable: true, get: function () { return api_gatewayv2_js_1.APIGatewayProxyEventV2Schema; } }); |
@@ -331,3 +331,3 @@ import { z } from 'zod'; | ||
* "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", | ||
* "approximateArrivalTimestamp": 1545084650.987 | ||
* "approximateArrivalTimestamp": 1607497475.000 | ||
* }, | ||
@@ -338,27 +338,23 @@ * "eventSource": "aws:kinesis", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* }, | ||
* { | ||
* "kinesis": { | ||
* "kinesisSchemaVersion": "1.0", | ||
* "partitionKey": "1", | ||
* "sequenceNumber": "49590338271490256608559692540925702759324208523137515618", | ||
* "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=", | ||
* "approximateArrivalTimestamp": 1545084711.166 | ||
* }, | ||
* "eventSource": "aws:kinesis", | ||
* "eventVersion": "1.0", | ||
* "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-kinesis-role", | ||
* "awsRegion": "us-east-1", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream" | ||
* } | ||
* ] | ||
* ], | ||
* "window": { | ||
* "start": "2020-12-09T07:04:00Z", | ||
* "end": "2020-12-09T07:06:00Z" | ||
* }, | ||
* "state": { | ||
* "1": 282, | ||
* "2": 715 | ||
* }, | ||
* "shardId": "shardId-000000000006", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
*``` | ||
* @see {@link types.KinesisDataStreamEvent | KinesisDataStreamEvent} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-event-example} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/services-kinesis-windows.html#streams-tumbling-processing} | ||
* | ||
@@ -425,2 +421,17 @@ */ | ||
}>, "many">; | ||
window: z.ZodOptional<z.ZodObject<{ | ||
start: z.ZodString; | ||
end: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
start: string; | ||
end: string; | ||
}, { | ||
start: string; | ||
end: string; | ||
}>>; | ||
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; | ||
shardId: z.ZodOptional<z.ZodString>; | ||
eventSourceARN: z.ZodOptional<z.ZodString>; | ||
isFinalInvokeForWindow: z.ZodOptional<z.ZodBoolean>; | ||
isWindowTerminatedEarly: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -443,2 +454,11 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, unknown> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}, { | ||
@@ -461,4 +481,13 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, unknown> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}>; | ||
export { KinesisDataStreamRecord, KinesisDataStreamRecordPayload, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, }; | ||
//# sourceMappingURL=kinesis.d.ts.map |
@@ -73,3 +73,3 @@ "use strict"; | ||
* "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", | ||
* "approximateArrivalTimestamp": 1545084650.987 | ||
* "approximateArrivalTimestamp": 1607497475.000 | ||
* }, | ||
@@ -80,27 +80,23 @@ * "eventSource": "aws:kinesis", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* }, | ||
* { | ||
* "kinesis": { | ||
* "kinesisSchemaVersion": "1.0", | ||
* "partitionKey": "1", | ||
* "sequenceNumber": "49590338271490256608559692540925702759324208523137515618", | ||
* "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=", | ||
* "approximateArrivalTimestamp": 1545084711.166 | ||
* }, | ||
* "eventSource": "aws:kinesis", | ||
* "eventVersion": "1.0", | ||
* "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-kinesis-role", | ||
* "awsRegion": "us-east-1", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream" | ||
* } | ||
* ] | ||
* ], | ||
* "window": { | ||
* "start": "2020-12-09T07:04:00Z", | ||
* "end": "2020-12-09T07:06:00Z" | ||
* }, | ||
* "state": { | ||
* "1": 282, | ||
* "2": 715 | ||
* }, | ||
* "shardId": "shardId-000000000006", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
*``` | ||
* @see {@link types.KinesisDataStreamEvent | KinesisDataStreamEvent} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-event-example} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/services-kinesis-windows.html#streams-tumbling-processing} | ||
* | ||
@@ -110,3 +106,14 @@ */ | ||
Records: zod_1.z.array(KinesisDataStreamRecord).min(1), | ||
window: zod_1.z | ||
.object({ | ||
start: zod_1.z.string().datetime(), | ||
end: zod_1.z.string().datetime(), | ||
}) | ||
.optional(), | ||
state: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(), | ||
shardId: zod_1.z.string().optional(), | ||
eventSourceARN: zod_1.z.string().optional(), | ||
isFinalInvokeForWindow: zod_1.z.boolean().optional(), | ||
isWindowTerminatedEarly: zod_1.z.boolean().optional(), | ||
}); | ||
exports.KinesisDataStreamSchema = KinesisDataStreamSchema; |
@@ -134,4 +134,4 @@ import { z } from 'zod'; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -167,4 +167,4 @@ account: string; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -1214,9 +1214,9 @@ account: string; | ||
}, "strip", z.ZodTypeAny, { | ||
payload: string | {}; | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
}, { | ||
payload: string | {}; | ||
}, { | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
payload: string | {}; | ||
}>; | ||
@@ -1366,5 +1366,5 @@ userRequest: z.ZodObject<{ | ||
configuration: { | ||
payload: string | {}; | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
payload: string | {}; | ||
}; | ||
@@ -1405,5 +1405,5 @@ userRequest: { | ||
configuration: { | ||
payload: string | {}; | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
payload: string | {}; | ||
}; | ||
@@ -1410,0 +1410,0 @@ userRequest: { |
export type { ParsedResult, ParsedResultError, ParsedResultSuccess, ParseFunction, ParserOptions, } from '../types/parser.js'; | ||
export type { Envelope } from './envelope.js'; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFirehoseRecord, KinesisFireHoseSqsEvent, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, } from './schema.js'; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, AppSyncEventsPublishEvent, AppSyncEventsSubscribeEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFirehoseRecord, KinesisFireHoseSqsEvent, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, } from './schema.js'; | ||
//# sourceMappingURL=index.d.ts.map |
import type { z } from 'zod'; | ||
import type { APIGatewayEventRequestContextSchema, APIGatewayProxyEventSchema, APIGatewayProxyEventV2Schema, APIGatewayProxyWebsocketEventSchema, APIGatewayRequestAuthorizerEventSchema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, APIGatewayTokenAuthorizerEventSchema, AlbMultiValueHeadersSchema, AlbSchema, AppSyncBatchResolverSchema, AppSyncResolverSchema, CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, CloudWatchLogEventSchema, CloudWatchLogsDecodeSchema, CloudWatchLogsSchema, DynamoDBStreamSchema, DynamoDBStreamToKinesisRecord, EventBridgeSchema, KafkaMskEventSchema, KafkaRecordSchema, KafkaSelfManagedEventSchema, KinesisDataStreamRecord, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, KinesisFirehoseRecordSchema, KinesisFirehoseSchema, KinesisFirehoseSqsRecordSchema, KinesisFirehoseSqsSchema, LambdaFunctionUrlSchema, S3EventNotificationEventBridgeSchema, S3ObjectLambdaEventSchema, S3Schema, S3SqsEventNotificationSchema, SesRecordSchema, SesSchema, SnsNotificationSchema, SnsRecordSchema, SnsSchema, SnsSqsNotificationSchema, SqsRecordSchema, SqsSchema, TransferFamilySchema, VpcLatticeSchema, VpcLatticeV2Schema } from '../schemas/index.js'; | ||
import type { APIGatewayEventRequestContextSchema, APIGatewayProxyEventSchema, APIGatewayProxyEventV2Schema, APIGatewayProxyWebsocketEventSchema, APIGatewayRequestAuthorizerEventSchema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, APIGatewayTokenAuthorizerEventSchema, AlbMultiValueHeadersSchema, AlbSchema, AppSyncBatchResolverSchema, AppSyncEventsPublishSchema, AppSyncEventsSubscribeSchema, AppSyncResolverSchema, CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, CloudWatchLogEventSchema, CloudWatchLogsDecodeSchema, CloudWatchLogsSchema, DynamoDBStreamSchema, DynamoDBStreamToKinesisRecord, EventBridgeSchema, KafkaMskEventSchema, KafkaRecordSchema, KafkaSelfManagedEventSchema, KinesisDataStreamRecord, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, KinesisFirehoseRecordSchema, KinesisFirehoseSchema, KinesisFirehoseSqsRecordSchema, KinesisFirehoseSqsSchema, LambdaFunctionUrlSchema, S3EventNotificationEventBridgeSchema, S3ObjectLambdaEventSchema, S3Schema, S3SqsEventNotificationSchema, SesRecordSchema, SesSchema, SnsNotificationSchema, SnsRecordSchema, SnsSchema, SnsSqsNotificationSchema, SqsRecordSchema, SqsSchema, TransferFamilySchema, VpcLatticeSchema, VpcLatticeV2Schema } from '../schemas/index.js'; | ||
type ALBEvent = z.infer<typeof AlbSchema>; | ||
@@ -15,2 +15,4 @@ type ALBMultiValueHeadersEvent = z.infer<typeof AlbMultiValueHeadersSchema>; | ||
type AppSyncBatchResolverEvent = z.infer<typeof AppSyncBatchResolverSchema>; | ||
type AppSyncEventsPublishEvent = z.infer<typeof AppSyncEventsPublishSchema>; | ||
type AppSyncEventsSubscribeEvent = z.infer<typeof AppSyncEventsSubscribeSchema>; | ||
type CloudWatchLogEvent = z.infer<typeof CloudWatchLogEventSchema>; | ||
@@ -51,3 +53,3 @@ type CloudWatchLogsDecode = z.infer<typeof CloudWatchLogsDecodeSchema>; | ||
type VpcLatticeEventV2 = z.infer<typeof VpcLatticeV2Schema>; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyWebsocketEvent, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFireHoseSqsEvent, KinesisFirehoseRecord, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, }; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyWebsocketEvent, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, AppSyncEventsPublishEvent, AppSyncEventsSubscribeEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFireHoseSqsEvent, KinesisFirehoseRecord, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, }; | ||
//# sourceMappingURL=schema.d.ts.map |
import { z } from 'zod'; | ||
import { AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncOidcIdentity } from './appsync-shared.js'; | ||
declare const AppSyncLambdaIdentity: z.ZodObject<{ | ||
resolverContext: z.ZodAny; | ||
}, "strip", z.ZodTypeAny, { | ||
resolverContext?: any; | ||
}, { | ||
resolverContext?: any; | ||
}>; | ||
/** | ||
@@ -74,22 +82,22 @@ * A zod schema for an AppSync resolver event | ||
username: z.ZodString; | ||
claims: z.ZodAny; | ||
claims: z.ZodRecord<z.ZodString, z.ZodUnknown>; | ||
sourceIp: z.ZodArray<z.ZodString, "many">; | ||
defaultAuthStrategy: z.ZodString; | ||
defaultAuthStrategy: z.ZodNullable<z.ZodString>; | ||
groups: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; | ||
}, "strip", z.ZodTypeAny, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}>, z.ZodObject<{ | ||
@@ -208,8 +216,8 @@ accountId: z.ZodString; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -251,8 +259,8 @@ sub: string; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -392,22 +400,22 @@ sub: string; | ||
username: z.ZodString; | ||
claims: z.ZodAny; | ||
claims: z.ZodRecord<z.ZodString, z.ZodUnknown>; | ||
sourceIp: z.ZodArray<z.ZodString, "many">; | ||
defaultAuthStrategy: z.ZodString; | ||
defaultAuthStrategy: z.ZodNullable<z.ZodString>; | ||
groups: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; | ||
}, "strip", z.ZodTypeAny, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}, { | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
}>, z.ZodObject<{ | ||
@@ -526,8 +534,8 @@ accountId: z.ZodString; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -569,8 +577,8 @@ sub: string; | ||
sourceIp: string[]; | ||
claims: Record<string, unknown>; | ||
username: string; | ||
sub: string; | ||
issuer: string; | ||
defaultAuthStrategy: string; | ||
defaultAuthStrategy: string | null; | ||
groups: string[] | null; | ||
claims?: any; | ||
} | { | ||
@@ -584,3 +592,3 @@ sub: string; | ||
}>, "many">; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema }; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema, AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncOidcIdentity, AppSyncLambdaIdentity, }; | ||
//# sourceMappingURL=appsync.d.ts.map |
import { z } from 'zod'; | ||
const AppSyncIamIdentity = z.object({ | ||
accountId: z.string(), | ||
cognitoIdentityPoolId: z.string().nullable(), | ||
cognitoIdentityId: z.string().nullable(), | ||
sourceIp: z.array(z.string()), | ||
username: z.string(), | ||
userArn: z.string(), | ||
cognitoIdentityAuthType: z.string().nullable(), | ||
cognitoIdentityAuthProvider: z.string().nullable(), | ||
}); | ||
const AppSyncCognitoIdentity = z.object({ | ||
sub: z.string(), | ||
issuer: z.string(), | ||
username: z.string(), | ||
claims: z.any(), | ||
sourceIp: z.array(z.string()), | ||
defaultAuthStrategy: z.string(), | ||
groups: z.array(z.string()).nullable(), | ||
}); | ||
const AppSyncOidcIdentity = z.object({ | ||
claims: z.any(), | ||
issuer: z.string(), | ||
sub: z.string(), | ||
}); | ||
import { AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncOidcIdentity, } from './appsync-shared.js'; | ||
const AppSyncLambdaIdentity = z.object({ | ||
@@ -244,2 +221,2 @@ resolverContext: z.any(), | ||
const AppSyncBatchResolverSchema = z.array(AppSyncResolverSchema); | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema }; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema, AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncOidcIdentity, AppSyncLambdaIdentity, }; |
@@ -330,65 +330,99 @@ import { z } from 'zod'; | ||
* { | ||
* "Records": [ | ||
* { | ||
* "eventID": "1", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "ApproximateCreationDateTime": 1693997155.0, | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Records":[{ | ||
* "eventID":"1", | ||
* "eventName":"INSERT", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES", | ||
* "SequenceNumber": "111", | ||
* "SizeBytes": 26 | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "INSERT", | ||
* "eventSourceARN": "eventsource_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* "SequenceNumber":"111", | ||
* "SizeBytes":26, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* { | ||
* "eventID": "2", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "OldImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"2", | ||
* "eventName":"MODIFY", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "SequenceNumber": "222", | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "SizeBytes": 59, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "This item has changed" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "SequenceNumber":"222", | ||
* "SizeBytes":59, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"3", | ||
* "eventName":"REMOVE", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES" | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "MODIFY", | ||
* "eventSourceARN": "source_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* } | ||
* ] | ||
* "SequenceNumber":"333", | ||
* "SizeBytes":38, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }], | ||
* "window": { | ||
* "start": "2020-07-30T17:00:00Z", | ||
* "end": "2020-07-30T17:05:00Z" | ||
* }, | ||
* "state": { | ||
* "1": "state1" | ||
* }, | ||
* "shardId": "shard123456789", | ||
* "eventSourceARN": "stream-ARN", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
@@ -496,2 +530,17 @@ * ``` | ||
}>, "many">; | ||
window: z.ZodOptional<z.ZodObject<{ | ||
start: z.ZodString; | ||
end: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
start: string; | ||
end: string; | ||
}, { | ||
start: string; | ||
end: string; | ||
}>>; | ||
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
shardId: z.ZodOptional<z.ZodString>; | ||
eventSourceARN: z.ZodOptional<z.ZodString>; | ||
isFinalInvokeForWindow: z.ZodOptional<z.ZodBoolean>; | ||
isWindowTerminatedEarly: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -517,2 +566,11 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, string> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}, { | ||
@@ -540,4 +598,13 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, string> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}>; | ||
export { DynamoDBStreamToKinesisRecord, DynamoDBStreamToKinesisChangeRecord, DynamoDBStreamSchema, DynamoDBStreamRecord, DynamoDBStreamChangeRecord, DynamoDBStreamChangeRecordBase, UserIdentity, }; | ||
//# sourceMappingURL=dynamodb.d.ts.map |
@@ -129,65 +129,99 @@ import { unmarshallDynamoDB } from '@aws-lambda-powertools/commons/utils/unmarshallDynamoDB'; | ||
* { | ||
* "Records": [ | ||
* { | ||
* "eventID": "1", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "ApproximateCreationDateTime": 1693997155.0, | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Records":[{ | ||
* "eventID":"1", | ||
* "eventName":"INSERT", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES", | ||
* "SequenceNumber": "111", | ||
* "SizeBytes": 26 | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "INSERT", | ||
* "eventSourceARN": "eventsource_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* "SequenceNumber":"111", | ||
* "SizeBytes":26, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* { | ||
* "eventID": "2", | ||
* "eventVersion": "1.0", | ||
* "dynamodb": { | ||
* "OldImage": { | ||
* "Message": { | ||
* "S": "New item!" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"2", | ||
* "eventName":"MODIFY", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "NewImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "SequenceNumber": "222", | ||
* "Keys": { | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"New item!" | ||
* }, | ||
* "SizeBytes": 59, | ||
* "NewImage": { | ||
* "Message": { | ||
* "S": "This item has changed" | ||
* }, | ||
* "Id": { | ||
* "N": "101" | ||
* } | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "SequenceNumber":"222", | ||
* "SizeBytes":59, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }, | ||
* { | ||
* "eventID":"3", | ||
* "eventName":"REMOVE", | ||
* "eventVersion":"1.0", | ||
* "eventSource":"aws:dynamodb", | ||
* "awsRegion":"us-east-1", | ||
* "dynamodb":{ | ||
* "Keys":{ | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "OldImage":{ | ||
* "Message":{ | ||
* "S":"This item has changed" | ||
* }, | ||
* "StreamViewType": "NEW_AND_OLD_IMAGES" | ||
* "Id":{ | ||
* "N":"101" | ||
* } | ||
* }, | ||
* "awsRegion": "us-west-2", | ||
* "eventName": "MODIFY", | ||
* "eventSourceARN": "source_arn", | ||
* "eventSource": "aws:dynamodb" | ||
* } | ||
* ] | ||
* "SequenceNumber":"333", | ||
* "SizeBytes":38, | ||
* "StreamViewType":"NEW_AND_OLD_IMAGES" | ||
* }, | ||
* "eventSourceARN":"stream-ARN" | ||
* }], | ||
* "window": { | ||
* "start": "2020-07-30T17:00:00Z", | ||
* "end": "2020-07-30T17:05:00Z" | ||
* }, | ||
* "state": { | ||
* "1": "state1" | ||
* }, | ||
* "shardId": "shard123456789", | ||
* "eventSourceARN": "stream-ARN", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
@@ -201,3 +235,14 @@ * ``` | ||
Records: z.array(DynamoDBStreamRecord).min(1), | ||
window: z | ||
.object({ | ||
start: z.string().datetime(), | ||
end: z.string().datetime(), | ||
}) | ||
.optional(), | ||
state: z.record(z.string(), z.string()).optional(), | ||
shardId: z.string().optional(), | ||
eventSourceARN: z.string().optional(), | ||
isFinalInvokeForWindow: z.boolean().optional(), | ||
isWindowTerminatedEarly: z.boolean().optional(), | ||
}); | ||
export { DynamoDBStreamToKinesisRecord, DynamoDBStreamToKinesisChangeRecord, DynamoDBStreamSchema, DynamoDBStreamRecord, DynamoDBStreamChangeRecord, DynamoDBStreamChangeRecordBase, UserIdentity, }; |
@@ -43,4 +43,4 @@ import { z } from 'zod'; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -55,4 +55,4 @@ account: string; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -59,0 +59,0 @@ account: string; |
@@ -5,2 +5,3 @@ export { AlbSchema, AlbMultiValueHeadersSchema } from './alb.js'; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema, } from './appsync.js'; | ||
export { AppSyncEventsBaseSchema, AppSyncEventsRequestSchema, AppSyncEventsInfoSchema, AppSyncEventsPublishSchema, AppSyncEventsSubscribeSchema, } from './appsync-events.js'; | ||
export { APIGatewayProxyEventV2Schema, APIGatewayRequestAuthorizerEventV2Schema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, } from './api-gatewayv2.js'; | ||
@@ -7,0 +8,0 @@ export { CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, } from './cloudformation-custom-resource.js'; |
@@ -5,2 +5,3 @@ export { AlbSchema, AlbMultiValueHeadersSchema } from './alb.js'; | ||
export { AppSyncResolverSchema, AppSyncBatchResolverSchema, } from './appsync.js'; | ||
export { AppSyncEventsBaseSchema, AppSyncEventsRequestSchema, AppSyncEventsInfoSchema, AppSyncEventsPublishSchema, AppSyncEventsSubscribeSchema, } from './appsync-events.js'; | ||
export { APIGatewayProxyEventV2Schema, APIGatewayRequestAuthorizerEventV2Schema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, } from './api-gatewayv2.js'; | ||
@@ -7,0 +8,0 @@ export { CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, } from './cloudformation-custom-resource.js'; |
@@ -331,3 +331,3 @@ import { z } from 'zod'; | ||
* "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", | ||
* "approximateArrivalTimestamp": 1545084650.987 | ||
* "approximateArrivalTimestamp": 1607497475.000 | ||
* }, | ||
@@ -338,27 +338,23 @@ * "eventSource": "aws:kinesis", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* }, | ||
* { | ||
* "kinesis": { | ||
* "kinesisSchemaVersion": "1.0", | ||
* "partitionKey": "1", | ||
* "sequenceNumber": "49590338271490256608559692540925702759324208523137515618", | ||
* "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=", | ||
* "approximateArrivalTimestamp": 1545084711.166 | ||
* }, | ||
* "eventSource": "aws:kinesis", | ||
* "eventVersion": "1.0", | ||
* "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-kinesis-role", | ||
* "awsRegion": "us-east-1", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream" | ||
* } | ||
* ] | ||
* ], | ||
* "window": { | ||
* "start": "2020-12-09T07:04:00Z", | ||
* "end": "2020-12-09T07:06:00Z" | ||
* }, | ||
* "state": { | ||
* "1": 282, | ||
* "2": 715 | ||
* }, | ||
* "shardId": "shardId-000000000006", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
*``` | ||
* @see {@link types.KinesisDataStreamEvent | KinesisDataStreamEvent} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-event-example} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/services-kinesis-windows.html#streams-tumbling-processing} | ||
* | ||
@@ -425,2 +421,17 @@ */ | ||
}>, "many">; | ||
window: z.ZodOptional<z.ZodObject<{ | ||
start: z.ZodString; | ||
end: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
start: string; | ||
end: string; | ||
}, { | ||
start: string; | ||
end: string; | ||
}>>; | ||
state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; | ||
shardId: z.ZodOptional<z.ZodString>; | ||
eventSourceARN: z.ZodOptional<z.ZodString>; | ||
isFinalInvokeForWindow: z.ZodOptional<z.ZodBoolean>; | ||
isWindowTerminatedEarly: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -443,2 +454,11 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, unknown> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}, { | ||
@@ -461,4 +481,13 @@ Records: { | ||
}[]; | ||
eventSourceARN?: string | undefined; | ||
window?: { | ||
start: string; | ||
end: string; | ||
} | undefined; | ||
state?: Record<string, unknown> | undefined; | ||
shardId?: string | undefined; | ||
isFinalInvokeForWindow?: boolean | undefined; | ||
isWindowTerminatedEarly?: boolean | undefined; | ||
}>; | ||
export { KinesisDataStreamRecord, KinesisDataStreamRecordPayload, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, }; | ||
//# sourceMappingURL=kinesis.d.ts.map |
@@ -67,3 +67,3 @@ import { gunzipSync } from 'node:zlib'; | ||
* "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", | ||
* "approximateArrivalTimestamp": 1545084650.987 | ||
* "approximateArrivalTimestamp": 1607497475.000 | ||
* }, | ||
@@ -74,27 +74,23 @@ * "eventSource": "aws:kinesis", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* }, | ||
* { | ||
* "kinesis": { | ||
* "kinesisSchemaVersion": "1.0", | ||
* "partitionKey": "1", | ||
* "sequenceNumber": "49590338271490256608559692540925702759324208523137515618", | ||
* "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=", | ||
* "approximateArrivalTimestamp": 1545084711.166 | ||
* }, | ||
* "eventSource": "aws:kinesis", | ||
* "eventVersion": "1.0", | ||
* "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618", | ||
* "eventName": "aws:kinesis:record", | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", | ||
* "awsRegion": "us-east-2", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" | ||
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-kinesis-role", | ||
* "awsRegion": "us-east-1", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream" | ||
* } | ||
* ] | ||
* ], | ||
* "window": { | ||
* "start": "2020-12-09T07:04:00Z", | ||
* "end": "2020-12-09T07:06:00Z" | ||
* }, | ||
* "state": { | ||
* "1": 282, | ||
* "2": 715 | ||
* }, | ||
* "shardId": "shardId-000000000006", | ||
* "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream", | ||
* "isFinalInvokeForWindow": false, | ||
* "isWindowTerminatedEarly": false | ||
* } | ||
*``` | ||
* @see {@link types.KinesisDataStreamEvent | KinesisDataStreamEvent} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-event-example} | ||
* @see {@link https://docs.aws.amazon.com/lambda/latest/dg/services-kinesis-windows.html#streams-tumbling-processing} | ||
* | ||
@@ -104,3 +100,14 @@ */ | ||
Records: z.array(KinesisDataStreamRecord).min(1), | ||
window: z | ||
.object({ | ||
start: z.string().datetime(), | ||
end: z.string().datetime(), | ||
}) | ||
.optional(), | ||
state: z.record(z.string(), z.unknown()).optional(), | ||
shardId: z.string().optional(), | ||
eventSourceARN: z.string().optional(), | ||
isFinalInvokeForWindow: z.boolean().optional(), | ||
isWindowTerminatedEarly: z.boolean().optional(), | ||
}); | ||
export { KinesisDataStreamRecord, KinesisDataStreamRecordPayload, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, }; |
@@ -134,4 +134,4 @@ import { z } from 'zod'; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -167,4 +167,4 @@ account: string; | ||
source: string; | ||
id: string; | ||
version: string; | ||
id: string; | ||
region: string; | ||
@@ -1214,9 +1214,9 @@ account: string; | ||
}, "strip", z.ZodTypeAny, { | ||
payload: string | {}; | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
}, { | ||
payload: string | {}; | ||
}, { | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
payload: string | {}; | ||
}>; | ||
@@ -1366,5 +1366,5 @@ userRequest: z.ZodObject<{ | ||
configuration: { | ||
payload: string | {}; | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
payload: string | {}; | ||
}; | ||
@@ -1405,5 +1405,5 @@ userRequest: { | ||
configuration: { | ||
payload: string | {}; | ||
accessPointArn: string; | ||
supportingAccessPointArn: string; | ||
payload: string | {}; | ||
}; | ||
@@ -1410,0 +1410,0 @@ userRequest: { |
export type { ParsedResult, ParsedResultError, ParsedResultSuccess, ParseFunction, ParserOptions, } from '../types/parser.js'; | ||
export type { Envelope } from './envelope.js'; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFirehoseRecord, KinesisFireHoseSqsEvent, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, } from './schema.js'; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, AppSyncEventsPublishEvent, AppSyncEventsSubscribeEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFirehoseRecord, KinesisFireHoseSqsEvent, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, } from './schema.js'; | ||
//# sourceMappingURL=index.d.ts.map |
import type { z } from 'zod'; | ||
import type { APIGatewayEventRequestContextSchema, APIGatewayProxyEventSchema, APIGatewayProxyEventV2Schema, APIGatewayProxyWebsocketEventSchema, APIGatewayRequestAuthorizerEventSchema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, APIGatewayTokenAuthorizerEventSchema, AlbMultiValueHeadersSchema, AlbSchema, AppSyncBatchResolverSchema, AppSyncResolverSchema, CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, CloudWatchLogEventSchema, CloudWatchLogsDecodeSchema, CloudWatchLogsSchema, DynamoDBStreamSchema, DynamoDBStreamToKinesisRecord, EventBridgeSchema, KafkaMskEventSchema, KafkaRecordSchema, KafkaSelfManagedEventSchema, KinesisDataStreamRecord, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, KinesisFirehoseRecordSchema, KinesisFirehoseSchema, KinesisFirehoseSqsRecordSchema, KinesisFirehoseSqsSchema, LambdaFunctionUrlSchema, S3EventNotificationEventBridgeSchema, S3ObjectLambdaEventSchema, S3Schema, S3SqsEventNotificationSchema, SesRecordSchema, SesSchema, SnsNotificationSchema, SnsRecordSchema, SnsSchema, SnsSqsNotificationSchema, SqsRecordSchema, SqsSchema, TransferFamilySchema, VpcLatticeSchema, VpcLatticeV2Schema } from '../schemas/index.js'; | ||
import type { APIGatewayEventRequestContextSchema, APIGatewayProxyEventSchema, APIGatewayProxyEventV2Schema, APIGatewayProxyWebsocketEventSchema, APIGatewayRequestAuthorizerEventSchema, APIGatewayRequestAuthorizerV2Schema, APIGatewayRequestContextV2Schema, APIGatewayTokenAuthorizerEventSchema, AlbMultiValueHeadersSchema, AlbSchema, AppSyncBatchResolverSchema, AppSyncEventsPublishSchema, AppSyncEventsSubscribeSchema, AppSyncResolverSchema, CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, CloudWatchLogEventSchema, CloudWatchLogsDecodeSchema, CloudWatchLogsSchema, DynamoDBStreamSchema, DynamoDBStreamToKinesisRecord, EventBridgeSchema, KafkaMskEventSchema, KafkaRecordSchema, KafkaSelfManagedEventSchema, KinesisDataStreamRecord, KinesisDataStreamSchema, KinesisDynamoDBStreamSchema, KinesisFirehoseRecordSchema, KinesisFirehoseSchema, KinesisFirehoseSqsRecordSchema, KinesisFirehoseSqsSchema, LambdaFunctionUrlSchema, S3EventNotificationEventBridgeSchema, S3ObjectLambdaEventSchema, S3Schema, S3SqsEventNotificationSchema, SesRecordSchema, SesSchema, SnsNotificationSchema, SnsRecordSchema, SnsSchema, SnsSqsNotificationSchema, SqsRecordSchema, SqsSchema, TransferFamilySchema, VpcLatticeSchema, VpcLatticeV2Schema } from '../schemas/index.js'; | ||
type ALBEvent = z.infer<typeof AlbSchema>; | ||
@@ -15,2 +15,4 @@ type ALBMultiValueHeadersEvent = z.infer<typeof AlbMultiValueHeadersSchema>; | ||
type AppSyncBatchResolverEvent = z.infer<typeof AppSyncBatchResolverSchema>; | ||
type AppSyncEventsPublishEvent = z.infer<typeof AppSyncEventsPublishSchema>; | ||
type AppSyncEventsSubscribeEvent = z.infer<typeof AppSyncEventsSubscribeSchema>; | ||
type CloudWatchLogEvent = z.infer<typeof CloudWatchLogEventSchema>; | ||
@@ -51,3 +53,3 @@ type CloudWatchLogsDecode = z.infer<typeof CloudWatchLogsDecodeSchema>; | ||
type VpcLatticeEventV2 = z.infer<typeof VpcLatticeV2Schema>; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyWebsocketEvent, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFireHoseSqsEvent, KinesisFirehoseRecord, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, }; | ||
export type { ALBEvent, ALBMultiValueHeadersEvent, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyWebsocketEvent, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerV2, APIGatewayRequestContextV2, APIGatewayTokenAuthorizerEvent, AppSyncBatchResolverEvent, AppSyncResolverEvent, AppSyncEventsPublishEvent, AppSyncEventsSubscribeEvent, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceUpdateEvent, CloudWatchLogEvent, CloudWatchLogsDecode, CloudWatchLogsEvent, DynamoDBStreamEvent, DynamoDBStreamToKinesisRecordEvent, EventBridgeEvent, KafkaMskEvent, KafkaRecord, KafkaSelfManagedEvent, KinesisDataStreamEvent, KinesisDataStreamRecordEvent, KinesisDynamoDBStreamEvent, KinesisFireHoseEvent, KinesisFireHoseSqsEvent, KinesisFirehoseRecord, KinesisFirehoseSqsRecord, LambdaFunctionUrlEvent, S3Event, S3EventNotificationEventBridge, S3ObjectLambdaEvent, S3SqsEventNotification, SesEvent, SesRecord, SnsEvent, SnsNotification, SnsRecord, SnsSqsNotification, SqsEvent, SqsRecord, TransferFamilyEvent, VpcLatticeEvent, VpcLatticeEventV2, }; | ||
//# sourceMappingURL=schema.d.ts.map |
{ | ||
"name": "@aws-lambda-powertools/parser", | ||
"version": "2.19.1", | ||
"version": "2.20.0", | ||
"description": "The parser package for the Powertools for AWS Lambda (TypeScript) library.", | ||
@@ -35,3 +35,3 @@ "author": { | ||
"dependencies": { | ||
"@aws-lambda-powertools/commons": "2.19.1" | ||
"@aws-lambda-powertools/commons": "2.20.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "peerDependencies": { |
@@ -22,3 +22,2 @@ # Powertools for AWS Lambda (TypeScript) - Parser Utility <!-- omit in toc --> | ||
- [Using Lambda Layer](#using-lambda-layer) | ||
- [Credits](#credits) | ||
- [License](#license) | ||
@@ -242,3 +241,3 @@ | ||
See the [safe parsing](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser#safe-parsing) section in the documentation for more details. | ||
See the [safe parsing](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parser#safe-parsing) section in the documentation for more details. | ||
@@ -288,3 +287,3 @@ ### Built-in schemas and envelopes | ||
Check the utility documentation for a complete list of built-in [schemas](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#built-in-schemas) and [envelopes](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#built-in-envelopes). | ||
Check the utility documentation for a complete list of built-in [schemas](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parser/#built-in-schemas) and [envelopes](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parser/#built-in-envelopes). | ||
@@ -309,3 +308,6 @@ ## Contribute | ||
Knowing which companies are using this library is important to help prioritize the project internally. If your company is using Powertools for AWS Lambda (TypeScript), you can request to have your name and logo added to the README file by raising a [Support Powertools for AWS Lambda (TypeScript) (become a reference)](https://s12d.com/become-a-reference-ts) issue. | ||
Knowing which companies are using this library is important to help prioritize the project internally. If your company | ||
is using Powertools for AWS Lambda (TypeScript), you can request to have your name and logo added to the README file by | ||
raising a [Support Powertools for AWS Lambda (TypeScript) (become a reference)](https://s12d.com/become-reference-pt-ts) | ||
issue. | ||
@@ -335,14 +337,10 @@ The following companies, among others, use Powertools: | ||
Share what you did with Powertools for AWS Lambda (TypeScript) ππ. Blog post, workshops, presentation, sample apps and others. Check out what the community has already shared about Powertools for AWS Lambda (TypeScript) [here](https://docs.powertools.aws.dev/lambda/typescript/latest/we_made_this). | ||
Share what you did with Powertools for AWS Lambda (TypeScript) ππ. Blog post, workshops, presentation, sample apps and others. Check out what the community has [already shared](https://docs.powertools.aws.dev/lambda/typescript/latest/we_made_this) about Powertools for AWS Lambda (TypeScript). | ||
### Using Lambda Layer | ||
This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](https://docs.powertools.aws.dev/lambda/typescript/latest/#lambda-layer), you can add Powertools as a dev dependency (or as part of your virtual env) to not impact the development process. | ||
This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](https://docs.powertools.aws.dev/lambda/typescript/latest/getting-started/lambda-layers/), you can add Powertools as a dev dependency to not impact the development process. | ||
## Credits | ||
Credits for the Lambda Powertools for AWS Lambda (TypeScript) idea go to [DAZN](https://github.com/getndazn) and their [DAZN Lambda Powertools](https://github.com/getndazn/dazn-lambda-powertools/). | ||
## License | ||
This library is licensed under the MIT-0 License. See the LICENSE file. | ||
This library is licensed under the MIT-0 License. See the LICENSE file.This library is licensed under the MIT-0 License. See the LICENSE file. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1444684
5.54%318
3.92%36869
7.05%342
-0.58%+ Added
- Removed