quidproquo-actionprocessor-awslambda 0.0.232 → 0.0.234
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/README.md +97 -118
- package/lib/commonjs/awsLambdaUtils.d.ts +1 -1
- package/lib/commonjs/awsLambdaUtils.js +1 -1
- package/lib/commonjs/awsNamingUtils.d.ts +1 -1
- package/lib/commonjs/awsNamingUtils.js +4 -7
- package/lib/commonjs/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/config/getConfigGetSecretActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/cognito/createAuthChallenge/types.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/cognito/customMessage/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/commonjs/getActionProcessor/core/event/cognito/customMessage/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/cognito/defineAuthChallenge/types.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/cognito/index.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/cognito/index.js +1 -1
- package/lib/commonjs/getActionProcessor/core/event/cognito/utils/getChallengeSessionFromCognitoTriggerEventSession.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/cognito/verifyAuthChallenge/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/types.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/index.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/index.js +1 -1
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/index.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/index.js +2 -2
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/types.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/types.d.ts +2 -2
- package/lib/commonjs/getActionProcessor/core/event/utils/isAuthValid.js +6 -5
- package/lib/commonjs/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +5 -5
- package/lib/commonjs/getActionProcessor/core/file/getFileDeleteActionProcessor.js +4 -4
- package/lib/commonjs/getActionProcessor/core/file/getFileExistsActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/file/getFileGenerateTemporarySecureUrlActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/file/getFileReadBinaryContentsActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/file/getFileReadTextContentsActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js +4 -3
- package/lib/commonjs/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +4 -3
- package/lib/commonjs/getActionProcessor/core/file/index.js +2 -2
- package/lib/commonjs/getActionProcessor/core/graphDatabase/customActions/getActionProcessor/getGraphDatabaseForNeptuneGetEndpointsActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/graphDatabase/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.js +1 -1
- package/lib/commonjs/getActionProcessor/core/index.d.ts +5 -5
- package/lib/commonjs/getActionProcessor/core/index.js +10 -10
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreDeleteActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreGetActionProcessor.js +4 -4
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreGetAllActionProcessor.js +4 -4
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js +4 -4
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreUpdateActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreUpsertActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/keyValueStore/index.js +2 -2
- package/lib/commonjs/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js +5 -5
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryAuthenticateUserActionProcessor.js +4 -3
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryChangePasswordActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryConfirmEmailVerificationActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryConfirmForgotPasswordActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryCreateUserActionProcessor.js +4 -3
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryDecodeAccessTokenActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryForgotPasswordActionProcessor.js +4 -3
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js +4 -3
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRequestEmailVerificationActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js +2 -1
- package/lib/commonjs/getActionProcessor/index.js +1 -1
- package/lib/commonjs/getActionProcessor/webserver/index.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/webserver/index.js +2 -2
- package/lib/commonjs/getActionProcessor/webserver/serviceFunction/getServiceFunctionExecuteActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/webserver/webEntry/getWebEntryInvalidateCacheActionProcessor.js +3 -2
- package/lib/commonjs/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +2 -1
- package/lib/commonjs/index.d.ts +5 -5
- package/lib/commonjs/index.js +8 -8
- package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
- package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js +1 -1
- package/lib/commonjs/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.d.ts +1 -1
- package/lib/commonjs/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
- package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js +1 -1
- package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js +1 -1
- package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js +1 -1
- package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js +1 -1
- package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js +1 -1
- package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_stackDeploy.js +1 -1
- package/lib/commonjs/lambdaHandlers/getS3Event_fileEvent.js +1 -1
- package/lib/commonjs/lambdaHandlers/getSqsEvent_queueEvent.d.ts +1 -1
- package/lib/commonjs/lambdaHandlers/getSqsEvent_queueEvent.js +1 -1
- package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.d.ts +1 -1
- package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js +4 -4
- package/lib/commonjs/lambdaHandlers/helpers/logger.d.ts +1 -1
- package/lib/commonjs/lambdaHandlers/helpers/logger.js +1 -1
- package/lib/commonjs/lambdaHandlers/index.d.ts +3 -3
- package/lib/commonjs/lambdaHandlers/index.js +3 -3
- package/lib/commonjs/lambdas/anyExecuteServiceFunctionEvent_serviceFunction.js +2 -2
- package/lib/commonjs/lambdas/apiGatewayEventHandler.js +1 -1
- package/lib/commonjs/lambdas/apiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
- package/lib/commonjs/lambdas/cloudFrontRequestEvent_originRequest.js +1 -1
- package/lib/commonjs/lambdas/customMessageTriggerEvent_createAuthChallenge.js +1 -1
- package/lib/commonjs/lambdas/customMessageTriggerEvent_customMessage.js +1 -1
- package/lib/commonjs/lambdas/customMessageTriggerEvent_defineAuthChallenge.js +1 -1
- package/lib/commonjs/lambdas/customMessageTriggerEvent_verifyAuthChallenge.js +1 -1
- package/lib/commonjs/lambdas/dynamicModuleLoader/dynamicModuleLoader.js +1 -1
- package/lib/commonjs/lambdas/eventBridgeEvent_recurringSchedule.js +1 -1
- package/lib/commonjs/lambdas/eventBridgeEvent_stackDeploy.js +1 -1
- package/lib/commonjs/lambdas/lambda-utils/getQpqConfig.js +1 -1
- package/lib/commonjs/lambdas/lambda-utils/index.d.ts +1 -1
- package/lib/commonjs/lambdas/lambda-utils/index.js +1 -1
- package/lib/commonjs/lambdas/lambda-utils/logger.d.ts +1 -1
- package/lib/commonjs/lambdas/lambda-utils/logger.js +1 -1
- package/lib/commonjs/lambdas/lambdaSQSEvent.js +3 -3
- package/lib/commonjs/lambdas/sqsEvent_queueEvent.js +1 -1
- package/lib/commonjs/logic/acm/findMatchingCertificates.js +1 -2
- package/lib/commonjs/logic/apiGateway/getApiKeys.js +5 -1
- package/lib/commonjs/logic/apiGateway/websocketSendMessage.js +3 -3
- package/lib/commonjs/logic/cache/memoFuncAsync.js +5 -9
- package/lib/commonjs/logic/cloudFront/invalidateCache.js +1 -1
- package/lib/commonjs/logic/cloudformation/getExportedValue.js +1 -1
- package/lib/commonjs/logic/cognito/authenticateUser.js +5 -3
- package/lib/commonjs/logic/cognito/changePassword.js +3 -1
- package/lib/commonjs/logic/cognito/confirmForgotPassword.js +5 -3
- package/lib/commonjs/logic/cognito/createUser.d.ts +1 -1
- package/lib/commonjs/logic/cognito/createUser.js +5 -3
- package/lib/commonjs/logic/cognito/decodeAccessToken.js +2 -2
- package/lib/commonjs/logic/cognito/forgotPassword.js +4 -2
- package/lib/commonjs/logic/cognito/getUser.js +3 -1
- package/lib/commonjs/logic/cognito/getUserAttributes.js +4 -2
- package/lib/commonjs/logic/cognito/getUserAttributesBySub.js +4 -2
- package/lib/commonjs/logic/cognito/getUserPoolClientSecret.js +3 -1
- package/lib/commonjs/logic/cognito/index.d.ts +1 -1
- package/lib/commonjs/logic/cognito/index.js +1 -1
- package/lib/commonjs/logic/cognito/listPagedUsers.d.ts +1 -1
- package/lib/commonjs/logic/cognito/listPagedUsers.js +4 -2
- package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.d.ts +1 -1
- package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.js +4 -2
- package/lib/commonjs/logic/cognito/refreshToken.js +5 -3
- package/lib/commonjs/logic/cognito/requestEmailVerificationCode.js +3 -1
- package/lib/commonjs/logic/cognito/respondToAuthChallengeChallenge.js +5 -3
- package/lib/commonjs/logic/cognito/setUserAttributes.js +4 -2
- package/lib/commonjs/logic/cognito/setUserPassword.js +3 -1
- package/lib/commonjs/logic/cognito/utils/index.d.ts +1 -1
- package/lib/commonjs/logic/cognito/utils/transformCognitoResponse.d.ts +2 -2
- package/lib/commonjs/logic/cognito/verifyUserEmail.js +3 -1
- package/lib/commonjs/logic/dynamo/deleteItem.js +1 -1
- package/lib/commonjs/logic/dynamo/getLogChildrenByFromCorrelation.js +1 -1
- package/lib/commonjs/logic/dynamo/getPagedItemsOverRange.js +7 -3
- package/lib/commonjs/logic/dynamo/index.d.ts +1 -1
- package/lib/commonjs/logic/dynamo/index.js +1 -1
- package/lib/commonjs/logic/dynamo/putItem.js +1 -1
- package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.d.ts +1 -1
- package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js +2 -4
- package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.d.ts +1 -1
- package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js +2 -9
- package/lib/commonjs/logic/dynamo/query.js +2 -2
- package/lib/commonjs/logic/dynamo/scan.js +2 -2
- package/lib/commonjs/logic/dynamo/updateItem.d.ts +1 -1
- package/lib/commonjs/logic/dynamo/updateItem.js +1 -1
- package/lib/commonjs/logic/parametersManager/setParameter.js +1 -1
- package/lib/commonjs/logic/s3/generatePresignedUrl.js +3 -1
- package/lib/commonjs/logic/s3/listFiles.js +1 -1
- package/lib/commonjs/logic/s3/readBinaryFile.js +5 -1
- package/lib/commonjs/logic/s3/s3Utils.d.ts +2 -2
- package/lib/commonjs/logic/s3/s3Utils.js +2 -2
- package/lib/commonjs/logic/s3/writeBinaryFile.js +1 -1
- package/lib/commonjs/logic/s3/writeTextFile.js +1 -1
- package/lib/commonjs/logic/secretsManager/getSecret.js +3 -1
- package/lib/commonjs/logic/sqs/sendMessages.js +1 -1
- package/lib/esm/awsLambdaUtils.d.ts +1 -1
- package/lib/esm/awsLambdaUtils.js +1 -1
- package/lib/esm/awsNamingUtils.d.ts +1 -1
- package/lib/esm/awsNamingUtils.js +4 -7
- package/lib/esm/getActionProcessor/core/config/getConfigGetGlobalActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/config/getConfigGetSecretActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventMatchStoryActionProcessor.js +2 -2
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventGetRecordsActionProcessor.js +5 -2
- package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/types.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventAutoRespondActionProcessor.js +2 -2
- package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/customMessage/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/types.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/index.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/index.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/utils/getChallengeSessionFromCognitoTriggerEventSession.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventGetRecordsActionProcessor.js +2 -2
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/types.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/index.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/index.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/index.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/index.js +2 -2
- package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/types.d.ts +1 -1
- package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/s3/fileEvent/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventAutoRespondActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventGetRecordsActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventGetStorySessionActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventMatchStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventTransformResponseResultActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/event/sqs/queue/types.d.ts +2 -2
- package/lib/esm/getActionProcessor/core/event/utils/isAuthValid.js +6 -5
- package/lib/esm/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +4 -4
- package/lib/esm/getActionProcessor/core/file/getFileDeleteActionProcessor.js +2 -2
- package/lib/esm/getActionProcessor/core/file/getFileExistsActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/file/getFileGenerateTemporarySecureUrlActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/file/getFileReadBinaryContentsActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/file/getFileReadTextContentsActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js +5 -4
- package/lib/esm/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +5 -4
- package/lib/esm/getActionProcessor/core/file/index.js +2 -2
- package/lib/esm/getActionProcessor/core/graphDatabase/customActions/getActionProcessor/getGraphDatabaseForNeptuneGetEndpointsActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/graphDatabase/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.js +2 -2
- package/lib/esm/getActionProcessor/core/graphDatabase/getGraphDatabaseInternalFieldNamesActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/graphDatabase/stories/askRunNeptuneOpenCypherQuery.js +1 -1
- package/lib/esm/getActionProcessor/core/graphDatabase/stories/converters/askConvertAnyNeptuneResultToAnyGraphResult.js +2 -2
- package/lib/esm/getActionProcessor/core/index.d.ts +5 -5
- package/lib/esm/getActionProcessor/core/index.js +10 -10
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreDeleteActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreGetActionProcessor.js +3 -3
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreGetAllActionProcessor.js +3 -3
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js +3 -3
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreUpdateActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreUpsertActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/core/keyValueStore/index.js +2 -2
- package/lib/esm/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js +3 -3
- package/lib/esm/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryAuthenticateUserActionProcessor.js +6 -5
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryChangePasswordActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryConfirmEmailVerificationActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryConfirmForgotPasswordActionProcessor.js +5 -4
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryCreateUserActionProcessor.js +6 -5
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryDecodeAccessTokenActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryForgotPasswordActionProcessor.js +6 -5
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryReadAccessTokenActionProcessor.js +1 -1
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js +6 -5
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRequestEmailVerificationActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js +5 -4
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/index.js +1 -1
- package/lib/esm/getActionProcessor/webserver/index.d.ts +1 -1
- package/lib/esm/getActionProcessor/webserver/index.js +2 -2
- package/lib/esm/getActionProcessor/webserver/serviceFunction/getServiceFunctionExecuteActionProcessor.js +3 -2
- package/lib/esm/getActionProcessor/webserver/webEntry/getWebEntryInvalidateCacheActionProcessor.js +4 -3
- package/lib/esm/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +3 -2
- package/lib/esm/index.d.ts +5 -5
- package/lib/esm/index.js +5 -5
- package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
- package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js +1 -1
- package/lib/esm/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.d.ts +1 -1
- package/lib/esm/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
- package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js +1 -1
- package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js +1 -1
- package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js +1 -1
- package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js +1 -1
- package/lib/esm/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js +1 -1
- package/lib/esm/lambdaHandlers/getEventBridgeEvent_stackDeploy.js +1 -1
- package/lib/esm/lambdaHandlers/getS3Event_fileEvent.js +1 -1
- package/lib/esm/lambdaHandlers/getSqsEvent_queueEvent.d.ts +1 -1
- package/lib/esm/lambdaHandlers/getSqsEvent_queueEvent.js +1 -1
- package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.d.ts +1 -1
- package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js +4 -4
- package/lib/esm/lambdaHandlers/helpers/logger.d.ts +1 -1
- package/lib/esm/lambdaHandlers/helpers/logger.js +3 -3
- package/lib/esm/lambdaHandlers/index.d.ts +3 -3
- package/lib/esm/lambdaHandlers/index.js +3 -3
- package/lib/esm/lambdas/anyExecuteServiceFunctionEvent_serviceFunction.js +2 -2
- package/lib/esm/lambdas/apiGatewayEventHandler.js +1 -1
- package/lib/esm/lambdas/apiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
- package/lib/esm/lambdas/cloudFrontRequestEvent_originRequest.js +1 -1
- package/lib/esm/lambdas/customMessageTriggerEvent_createAuthChallenge.js +1 -1
- package/lib/esm/lambdas/customMessageTriggerEvent_customMessage.js +1 -1
- package/lib/esm/lambdas/customMessageTriggerEvent_defineAuthChallenge.js +1 -1
- package/lib/esm/lambdas/customMessageTriggerEvent_verifyAuthChallenge.js +1 -1
- package/lib/esm/lambdas/dynamicModuleLoader/dynamicModuleLoader.js +1 -1
- package/lib/esm/lambdas/eventBridgeEvent_recurringSchedule.js +1 -1
- package/lib/esm/lambdas/eventBridgeEvent_stackDeploy.js +1 -1
- package/lib/esm/lambdas/lambda-utils/getQpqConfig.js +1 -1
- package/lib/esm/lambdas/lambda-utils/index.d.ts +1 -1
- package/lib/esm/lambdas/lambda-utils/index.js +1 -1
- package/lib/esm/lambdas/lambda-utils/logger.d.ts +1 -1
- package/lib/esm/lambdas/lambda-utils/logger.js +3 -3
- package/lib/esm/lambdas/lambdaSQSEvent.js +3 -3
- package/lib/esm/lambdas/sqsEvent_queueEvent.js +1 -1
- package/lib/esm/logic/acm/findMatchingCertificates.js +1 -2
- package/lib/esm/logic/apiGateway/getApiKeys.js +6 -2
- package/lib/esm/logic/apiGateway/websocketSendMessage.js +4 -4
- package/lib/esm/logic/cache/memoFuncAsync.js +5 -9
- package/lib/esm/logic/cloudFront/invalidateCache.js +1 -1
- package/lib/esm/logic/cloudformation/getExportedValue.js +2 -2
- package/lib/esm/logic/cognito/authenticateUser.js +6 -4
- package/lib/esm/logic/cognito/changePassword.js +4 -2
- package/lib/esm/logic/cognito/cognitoAttributeMap.js +4 -1
- package/lib/esm/logic/cognito/confirmForgotPassword.js +5 -3
- package/lib/esm/logic/cognito/createUser.d.ts +1 -1
- package/lib/esm/logic/cognito/createUser.js +6 -4
- package/lib/esm/logic/cognito/decodeAccessToken.js +2 -2
- package/lib/esm/logic/cognito/decodeValidJwt.js +1 -1
- package/lib/esm/logic/cognito/forgotPassword.js +5 -3
- package/lib/esm/logic/cognito/getUser.js +4 -2
- package/lib/esm/logic/cognito/getUserAttributes.js +5 -3
- package/lib/esm/logic/cognito/getUserAttributesBySub.js +5 -3
- package/lib/esm/logic/cognito/getUserPoolClientSecret.js +3 -1
- package/lib/esm/logic/cognito/index.d.ts +1 -1
- package/lib/esm/logic/cognito/index.js +1 -1
- package/lib/esm/logic/cognito/listPagedUsers.d.ts +1 -1
- package/lib/esm/logic/cognito/listPagedUsers.js +5 -3
- package/lib/esm/logic/cognito/listPagedUsersByAttribute.d.ts +1 -1
- package/lib/esm/logic/cognito/listPagedUsersByAttribute.js +4 -2
- package/lib/esm/logic/cognito/refreshToken.js +6 -4
- package/lib/esm/logic/cognito/requestEmailVerificationCode.js +3 -1
- package/lib/esm/logic/cognito/respondToAuthChallengeChallenge.js +5 -3
- package/lib/esm/logic/cognito/setUserAttributes.js +5 -3
- package/lib/esm/logic/cognito/setUserPassword.js +4 -2
- package/lib/esm/logic/cognito/utils/index.d.ts +1 -1
- package/lib/esm/logic/cognito/utils/index.js +1 -1
- package/lib/esm/logic/cognito/utils/transformCognitoResponse.d.ts +2 -2
- package/lib/esm/logic/cognito/verifyUserEmail.js +3 -1
- package/lib/esm/logic/dynamo/deleteItem.js +2 -2
- package/lib/esm/logic/dynamo/getLogChildrenByFromCorrelation.js +1 -1
- package/lib/esm/logic/dynamo/getPagedItemsOverRange.js +7 -3
- package/lib/esm/logic/dynamo/index.d.ts +1 -1
- package/lib/esm/logic/dynamo/index.js +1 -1
- package/lib/esm/logic/dynamo/putItem.js +1 -1
- package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.d.ts +1 -1
- package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js +2 -4
- package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.d.ts +1 -1
- package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js +3 -10
- package/lib/esm/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.js +1 -1
- package/lib/esm/logic/dynamo/query.js +3 -3
- package/lib/esm/logic/dynamo/scan.js +3 -3
- package/lib/esm/logic/dynamo/updateItem.d.ts +1 -1
- package/lib/esm/logic/dynamo/updateItem.js +1 -1
- package/lib/esm/logic/lambda/executeLambdaByName.js +1 -1
- package/lib/esm/logic/neptune/getNeptuneEndpoints.js +1 -1
- package/lib/esm/logic/parametersManager/getParameter.js +1 -1
- package/lib/esm/logic/parametersManager/getParameters.js +1 -1
- package/lib/esm/logic/parametersManager/setParameter.js +2 -2
- package/lib/esm/logic/s3/deleteFiles.js +1 -1
- package/lib/esm/logic/s3/generatePresignedUrl.js +3 -1
- package/lib/esm/logic/s3/listFiles.js +1 -1
- package/lib/esm/logic/s3/readBinaryFile.js +6 -2
- package/lib/esm/logic/s3/readTextFile.js +1 -1
- package/lib/esm/logic/s3/s3Utils.d.ts +2 -2
- package/lib/esm/logic/s3/s3Utils.js +2 -2
- package/lib/esm/logic/s3/writeBinaryFile.js +2 -2
- package/lib/esm/logic/s3/writeTextFile.js +2 -2
- package/lib/esm/logic/secretsManager/getSecret.js +4 -2
- package/lib/esm/logic/sns/publishMessage.js +1 -1
- package/lib/esm/logic/sqs/sendMessages.js +2 -2
- package/lib/esm/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.js +1 -1
- package/package.json +9 -6
|
@@ -16,14 +16,10 @@ export const memoFuncAsync = (func, ttlInSeconds = 3600) => {
|
|
|
16
16
|
if (nodeCache.has(cacheKey)) {
|
|
17
17
|
return nodeCache.get(cacheKey);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
catch (err) {
|
|
26
|
-
throw err; // re-throw the error to be caught by caller
|
|
27
|
-
}
|
|
19
|
+
// Await the result
|
|
20
|
+
const result = await func(...args);
|
|
21
|
+
// and then cache it
|
|
22
|
+
nodeCache.set(cacheKey, result);
|
|
23
|
+
return result;
|
|
28
24
|
});
|
|
29
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CloudFrontClient, CreateInvalidationCommand, } from '@aws-sdk/client-cloudfront';
|
|
2
1
|
import crypto from 'crypto';
|
|
2
|
+
import { CloudFrontClient, CreateInvalidationCommand } from '@aws-sdk/client-cloudfront';
|
|
3
3
|
import { createAwsClient } from '../createAwsClient';
|
|
4
4
|
export const getInvalidationCallerReference = (paths) => {
|
|
5
5
|
const allPaths = paths.join('');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CloudFormationClient, ListExportsCommand
|
|
1
|
+
import { CloudFormationClient, ListExportsCommand } from '@aws-sdk/client-cloudformation';
|
|
2
2
|
import { memoFuncAsync } from '../cache/memoFuncAsync';
|
|
3
3
|
import { createAwsClient } from '../createAwsClient';
|
|
4
4
|
export const getExportedValue = memoFuncAsync(async (variableName, region) => {
|
|
@@ -12,6 +12,6 @@ export const getExportedValue = memoFuncAsync(async (variableName, region) => {
|
|
|
12
12
|
return value;
|
|
13
13
|
}
|
|
14
14
|
listCommandParams.NextToken = result.NextToken;
|
|
15
|
-
} while (
|
|
15
|
+
} while (listCommandParams.NextToken);
|
|
16
16
|
throw new Error(`CF could not find: [${variableName}]`);
|
|
17
17
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminInitiateAuthCommand, AuthFlowType, CognitoIdentityProviderClient, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { calculateSecretHash } from './utils/calculateSecretHash';
|
|
3
|
-
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
4
4
|
import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/transformCognitoResponse';
|
|
5
|
-
import {
|
|
5
|
+
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
6
6
|
// TODO: retry for TooManyRequestsException
|
|
7
7
|
export const authenticateUser = async (userPoolId, clientId, region, isCustom, username, password) => {
|
|
8
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
8
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
9
|
+
region,
|
|
10
|
+
});
|
|
9
11
|
const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);
|
|
10
12
|
const secretHash = calculateSecretHash(username, clientId, clientSecret);
|
|
11
13
|
// Time we issued the request
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangePasswordCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const changePassword = async (accessToken, previousPassword, proposedPassword, region) => {
|
|
4
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
4
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
region,
|
|
6
|
+
});
|
|
5
7
|
const params = {
|
|
6
8
|
AccessToken: accessToken,
|
|
7
9
|
PreviousPassword: previousPassword,
|
|
@@ -42,7 +42,10 @@ const getQpqAttributeObjectFromCognitoKeyValue = (key, value) => {
|
|
|
42
42
|
export const getQpqAttributesFromCognitoUserAttributes = (cognitoUserAttributes) => {
|
|
43
43
|
// Map cognitoUserAttributes to your UserAttributes format
|
|
44
44
|
const userAttributes = cognitoUserAttributes.reduce((acc, { Name, Value }) => {
|
|
45
|
-
return {
|
|
45
|
+
return {
|
|
46
|
+
...acc,
|
|
47
|
+
...getQpqAttributeObjectFromCognitoKeyValue(Name, Value),
|
|
48
|
+
};
|
|
46
49
|
}, {});
|
|
47
50
|
return userAttributes;
|
|
48
51
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CognitoIdentityProviderClient, ConfirmForgotPasswordCommand, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { calculateSecretHash } from './utils/calculateSecretHash';
|
|
3
|
-
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
4
4
|
import { authenticateUser } from './authenticateUser';
|
|
5
|
-
import {
|
|
5
|
+
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
6
6
|
export const confirmForgotPassword = async (userPoolId, clientId, region, code, username, password) => {
|
|
7
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
8
|
+
region,
|
|
9
|
+
});
|
|
8
10
|
const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);
|
|
9
11
|
const secretHash = calculateSecretHash(username, clientId, clientSecret);
|
|
10
12
|
const params = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuthenticateUserResponse, CreateUserRequest } from 'quidproquo-core';
|
|
2
2
|
export declare const createUser: (userPoolId: string, region: string, clientId: string, createUserRequest: CreateUserRequest) => Promise<AuthenticateUserResponse>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminCreateUserCommand, CognitoIdentityProviderClient, DeliveryMediumType, MessageActionType, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { authenticateUser } from './authenticateUser';
|
|
3
|
-
import { setUserPassword } from './setUserPassword';
|
|
4
4
|
import { getCognitoUserAttributesFromQpqUserAttributes } from './cognitoAttributeMap';
|
|
5
|
-
import {
|
|
5
|
+
import { setUserPassword } from './setUserPassword';
|
|
6
6
|
export const createUser = async (userPoolId, region, clientId, createUserRequest) => {
|
|
7
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
8
|
+
region,
|
|
9
|
+
});
|
|
8
10
|
const params = {
|
|
9
11
|
UserPoolId: userPoolId,
|
|
10
12
|
Username: createUserRequest.email,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { qpqConfigAwsUtils } from 'quidproquo-config-aws';
|
|
2
2
|
import { getCFExportNameUserPoolIdFromConfig } from '../../awsNamingUtils';
|
|
3
3
|
import { getExportedValue } from '../cloudformation/getExportedValue';
|
|
4
4
|
import { decodeValidJwt } from './decodeValidJwt';
|
|
5
5
|
export const decodeAccessToken = async (userDirectoryName, qpqConfig, accessToken, ignoreExpiration = false) => {
|
|
6
|
-
const region =
|
|
6
|
+
const region = qpqConfigAwsUtils.getApplicationModuleDeployRegion(qpqConfig);
|
|
7
7
|
const userPoolId = await getExportedValue(getCFExportNameUserPoolIdFromConfig(userDirectoryName, qpqConfig), region);
|
|
8
8
|
const decodedAuthToken = await decodeValidJwt(userPoolId, region, ignoreExpiration, accessToken);
|
|
9
9
|
if (!decodedAuthToken || !decodedAuthToken?.username) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { CognitoIdentityProviderClient, ForgotPasswordCommand
|
|
1
|
+
import { CognitoIdentityProviderClient, ForgotPasswordCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { calculateSecretHash } from './utils/calculateSecretHash';
|
|
3
4
|
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
4
|
-
import { createAwsClient } from '../createAwsClient';
|
|
5
5
|
export const forgotPassword = async (userPoolId, clientId, region, username) => {
|
|
6
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
6
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
region,
|
|
8
|
+
});
|
|
7
9
|
const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);
|
|
8
10
|
const secretHash = calculateSecretHash(username, clientId, clientSecret);
|
|
9
11
|
const params = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CognitoIdentityProviderClient, GetUserCommand
|
|
1
|
+
import { CognitoIdentityProviderClient, GetUserCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
const getUserAttribute = (attributeName, userAttributes) => {
|
|
4
4
|
const lowerAttributeName = attributeName.toLowerCase();
|
|
@@ -6,7 +6,9 @@ const getUserAttribute = (attributeName, userAttributes) => {
|
|
|
6
6
|
return attribute?.Value;
|
|
7
7
|
};
|
|
8
8
|
export const getUser = async (accessToken, region) => {
|
|
9
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
9
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
10
|
+
region,
|
|
11
|
+
});
|
|
10
12
|
const params = {
|
|
11
13
|
AccessToken: accessToken,
|
|
12
14
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
|
|
1
|
+
import { AdminGetUserCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
|
|
4
4
|
export const getUserAttributes = async (userPoolId, region, username) => {
|
|
5
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
6
|
+
region,
|
|
7
|
+
});
|
|
6
8
|
const params = {
|
|
7
9
|
UserPoolId: userPoolId,
|
|
8
10
|
Username: username,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { CognitoIdentityProviderClient, ListUsersCommand
|
|
2
|
-
import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
|
|
1
|
+
import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
|
|
4
4
|
export const getUserAttributesBySub = async (userPoolId, region, sub) => {
|
|
5
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
6
|
+
region,
|
|
7
|
+
});
|
|
6
8
|
const response = await cognitoClient.send(new ListUsersCommand({
|
|
7
9
|
UserPoolId: userPoolId,
|
|
8
10
|
Filter: `sub = "${sub}"`,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CognitoIdentityProviderClient, DescribeUserPoolClientCommand, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const getUserPoolClientSecret = async (userPoolId, clientId, region) => {
|
|
4
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
4
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
region,
|
|
6
|
+
});
|
|
5
7
|
const params = {
|
|
6
8
|
ClientId: clientId,
|
|
7
9
|
UserPoolId: userPoolId,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QpqPagedData, UserAttributes } from 'quidproquo-core';
|
|
2
2
|
export declare const listPagedUsers: (userPoolId: string, region: string, pageKey?: string) => Promise<QpqPagedData<UserAttributes>>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { CognitoIdentityProviderClient, ListUsersCommand
|
|
1
|
+
import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
|
|
3
4
|
import { pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';
|
|
4
|
-
import { createAwsClient } from '../createAwsClient';
|
|
5
5
|
export const listPagedUsers = async (userPoolId, region, pageKey) => {
|
|
6
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
6
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
region,
|
|
8
|
+
});
|
|
7
9
|
const response = await cognitoClient.send(new ListUsersCommand({
|
|
8
10
|
UserPoolId: userPoolId,
|
|
9
11
|
PaginationToken: pageKeyToPaginationToken(pageKey),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QpqPagedData, UserAttributes } from 'quidproquo-core';
|
|
2
2
|
export declare const listPagedUsersByAttribute: (userPoolId: string, region: string, attributeName: string, attributeValue: string, limit?: number, pageKey?: string) => Promise<QpqPagedData<UserAttributes>>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
|
|
3
4
|
import { pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';
|
|
4
|
-
import { createAwsClient } from '../createAwsClient';
|
|
5
5
|
export const listPagedUsersByAttribute = async (userPoolId, region, attributeName, attributeValue, limit, pageKey) => {
|
|
6
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
6
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
region,
|
|
8
|
+
});
|
|
7
9
|
const response = await cognitoClient.send(new ListUsersCommand({
|
|
8
10
|
UserPoolId: userPoolId,
|
|
9
11
|
Limit: limit,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminInitiateAuthCommand, AuthFlowType, CognitoIdentityProviderClient, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { calculateSecretHash } from './utils/calculateSecretHash';
|
|
3
|
-
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
4
4
|
import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/transformCognitoResponse';
|
|
5
|
-
import {
|
|
5
|
+
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
6
6
|
export const refreshToken = async (userPoolId, clientId, region, username, refreshToken) => {
|
|
7
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
8
|
+
region,
|
|
9
|
+
});
|
|
8
10
|
const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);
|
|
9
11
|
const secretHash = calculateSecretHash(username, clientId, clientSecret);
|
|
10
12
|
const params = {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CognitoIdentityProviderClient, GetUserAttributeVerificationCodeCommand, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const requestEmailVerificationCode = async (region, accessToken) => {
|
|
4
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
4
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
region,
|
|
6
|
+
});
|
|
5
7
|
const params = {
|
|
6
8
|
AccessToken: accessToken,
|
|
7
9
|
AttributeName: 'email', // Request verification for the email attribute
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CognitoIdentityProviderClient, RespondToAuthChallengeCommand, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
2
3
|
import { calculateSecretHash } from './utils/calculateSecretHash';
|
|
3
|
-
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
4
4
|
import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/transformCognitoResponse';
|
|
5
|
-
import {
|
|
5
|
+
import { getUserPoolClientSecret } from './getUserPoolClientSecret';
|
|
6
6
|
export const respondToAuthChallengeChallenge = async (userPoolId, clientId, region, username, session, challengeNameType, attributes) => {
|
|
7
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
7
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
8
|
+
region,
|
|
9
|
+
});
|
|
8
10
|
const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);
|
|
9
11
|
const secretHash = calculateSecretHash(username, clientId, clientSecret);
|
|
10
12
|
const params = {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getCognitoUserAttributesFromQpqUserAttributes } from './cognitoAttributeMap';
|
|
1
|
+
import { AdminUpdateUserAttributesCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { getCognitoUserAttributesFromQpqUserAttributes } from './cognitoAttributeMap';
|
|
4
4
|
export const setUserAttributes = async (userPoolId, region, username, userAttributes) => {
|
|
5
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
6
|
+
region,
|
|
7
|
+
});
|
|
6
8
|
const { userId, ...writeableUserAttributes } = userAttributes;
|
|
7
9
|
const params = {
|
|
8
10
|
UserPoolId: userPoolId,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminSetUserPasswordCommand, CognitoIdentityProviderClient, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const setUserPassword = async (region, userPoolId, username, password) => {
|
|
4
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
4
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
region,
|
|
6
|
+
});
|
|
5
7
|
// There has to be a better way than this?
|
|
6
8
|
const passwordParams = {
|
|
7
9
|
Password: password,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuthenticateUserResponse, AuthenticationInfo
|
|
2
|
-
import {
|
|
1
|
+
import { AuthenticateUserChallenge, AuthenticateUserResponse, AuthenticationInfo } from 'quidproquo-core';
|
|
2
|
+
import { AdminInitiateAuthResponse, AuthenticationResultType, ChallengeNameType } from '@aws-sdk/client-cognito-identity-provider';
|
|
3
3
|
export declare const cognitoAuthenticationResultTypeToQpqAuthenticationInfo: (authResult: AuthenticationResultType, issueDateTime: string) => AuthenticationInfo;
|
|
4
4
|
export declare const cognitoChallengeNameTypeToQpqAuthenticateUserChallenge: (cognitoChallengeName: ChallengeNameType | string | undefined) => AuthenticateUserChallenge;
|
|
5
5
|
export declare const cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo: (authResponse: AdminInitiateAuthResponse, issueDateTime: string) => AuthenticateUserResponse;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CognitoIdentityProviderClient, VerifyUserAttributeCommand, } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const verifyUserEmail = async (region, accessToken, verificationCode) => {
|
|
4
|
-
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
4
|
+
const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
|
|
5
|
+
region,
|
|
6
|
+
});
|
|
5
7
|
const params = {
|
|
6
8
|
AccessToken: accessToken,
|
|
7
9
|
AttributeName: 'email',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { buildAttributeValue } from './qpqDynamoOrm';
|
|
1
|
+
import { DeleteItemCommand, DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { buildAttributeValue } from './qpqDynamoOrm';
|
|
4
4
|
export async function deleteItem(tableName, region, key, keyName, sortKey, sortKeyName) {
|
|
5
5
|
const dynamoDBClient = createAwsClient(DynamoDBClient, { region });
|
|
6
6
|
const deleteItemParams = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamoDBClient, QueryCommand } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { lastEvaluatedKeyToString, stringToLastEvaluatedKey } from './logs';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { lastEvaluatedKeyToString, stringToLastEvaluatedKey } from './logs';
|
|
4
4
|
export async function getLogChildrenByFromCorrelation(tableName, region, fromCorrelation, pageKey) {
|
|
5
5
|
const dynamoDBClient = createAwsClient(DynamoDBClient, { region });
|
|
6
6
|
const queryParams = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamoDBClient, QueryCommand } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { lastEvaluatedKeyToString, stringToLastEvaluatedKey } from './logs';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { lastEvaluatedKeyToString, stringToLastEvaluatedKey } from './logs';
|
|
4
4
|
export async function getPagedItemsOverRange(tableName, region, runtimeType, startIsoDateTime, endIsoDateTime, pageKey) {
|
|
5
5
|
const dynamoDBClient = createAwsClient(DynamoDBClient, { region });
|
|
6
6
|
const queryParams = {
|
|
@@ -8,8 +8,12 @@ export async function getPagedItemsOverRange(tableName, region, runtimeType, sta
|
|
|
8
8
|
KeyConditionExpression: 'runtimeType = :runtimeType AND startedAtWithCorrelation BETWEEN :startIsoDateTime AND :endIsoDateTime',
|
|
9
9
|
ExpressionAttributeValues: {
|
|
10
10
|
':runtimeType': { S: runtimeType },
|
|
11
|
-
':startIsoDateTime': {
|
|
12
|
-
|
|
11
|
+
':startIsoDateTime': {
|
|
12
|
+
S: startIsoDateTime + '#00000000-0000-0000-0000-000000000000',
|
|
13
|
+
},
|
|
14
|
+
':endIsoDateTime': {
|
|
15
|
+
S: endIsoDateTime + '#ffffffff-ffff-ffff-ffff-ffffffffffff',
|
|
16
|
+
},
|
|
13
17
|
},
|
|
14
18
|
ScanIndexForward: false,
|
|
15
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DynamoDBClient, PutItemCommand } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { buildAttributeValue } from './qpqDynamoOrm';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { buildAttributeValue } from './qpqDynamoOrm';
|
|
4
4
|
// We currently only support objects as root items in dynamo
|
|
5
5
|
// Storing a list (array) as the root of your DynamoDB record is indeed possible,
|
|
6
6
|
// but there are some caveats. One of the main challenges is that DynamoDB doesn't support
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KvsAdvancedDataType, KvsLogicalOperator, KvsQueryCondition, KvsQueryOperation } from 'quidproquo-core';
|
|
2
2
|
import { AttributeValue } from '@aws-sdk/client-dynamodb';
|
|
3
3
|
export declare const getItemName: (name: string) => string;
|
|
4
4
|
export declare const getValueName: (value: KvsAdvancedDataType) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { KvsLogicalOperatorType, KvsQueryOperationType, } from 'quidproquo-core';
|
|
1
2
|
import crypto from 'crypto';
|
|
2
|
-
import { KvsQueryOperationType, KvsLogicalOperatorType, } from 'quidproquo-core';
|
|
3
3
|
// TODO: Come up with a better way of generating item name / values
|
|
4
4
|
// probably a map ~ however this will most likely never fail.
|
|
5
5
|
const getHash = (name) => {
|
|
@@ -37,9 +37,7 @@ const buildDynamoQueryExpressionGreaterThanOrEqual = (query) => {
|
|
|
37
37
|
return `${getItemName(query.key)} >= ${getValueName(query.valueA)}`;
|
|
38
38
|
};
|
|
39
39
|
const buildDynamoQueryExpressionIn = (query) => {
|
|
40
|
-
return `${getItemName(query.key)} IN (${query.valueA
|
|
41
|
-
.map((v) => getValueName(v))
|
|
42
|
-
.join(', ')})`;
|
|
40
|
+
return `${getItemName(query.key)} IN (${query.valueA.map((v) => getValueName(v)).join(', ')})`;
|
|
43
41
|
};
|
|
44
42
|
const buildDynamoQueryExpressionExists = (query) => {
|
|
45
43
|
return `attribute_exists(${getItemName(query.key)})`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KvsUpdateActionType } from 'quidproquo-core';
|
|
2
|
-
import { getItemName, getValueName
|
|
2
|
+
import { buildAttributeValue, getItemName, getValueName } from './buildDynamoQuery';
|
|
3
3
|
export const buildUpdateExpressionAttributeNames = (updates) => {
|
|
4
4
|
let attributeNames = {};
|
|
5
5
|
for (let update of updates) {
|
|
@@ -94,9 +94,7 @@ export const buildDynamoUpdateExpressionForType = (type, kvsUpdate) => {
|
|
|
94
94
|
if (actions.length === 0) {
|
|
95
95
|
return '';
|
|
96
96
|
}
|
|
97
|
-
const expressions = actions
|
|
98
|
-
.map((update, index) => buildDynamoUpdateExpressionPart(update, index))
|
|
99
|
-
.join(', ');
|
|
97
|
+
const expressions = actions.map((update, index) => buildDynamoUpdateExpressionPart(update, index)).join(', ');
|
|
100
98
|
switch (type) {
|
|
101
99
|
case KvsUpdateActionType.Set:
|
|
102
100
|
return `SET ${expressions}`;
|
|
@@ -111,12 +109,7 @@ export const buildDynamoUpdateExpressionForType = (type, kvsUpdate) => {
|
|
|
111
109
|
}
|
|
112
110
|
};
|
|
113
111
|
export const buildDynamoUpdateExpression = (updates) => {
|
|
114
|
-
const updatesExpressions = [
|
|
115
|
-
KvsUpdateActionType.Set,
|
|
116
|
-
KvsUpdateActionType.Remove,
|
|
117
|
-
KvsUpdateActionType.Add,
|
|
118
|
-
KvsUpdateActionType.Delete,
|
|
119
|
-
]
|
|
112
|
+
const updatesExpressions = [KvsUpdateActionType.Set, KvsUpdateActionType.Remove, KvsUpdateActionType.Add, KvsUpdateActionType.Delete]
|
|
120
113
|
.map((kvsUpdateActionType) => buildDynamoUpdateExpressionForType(kvsUpdateActionType, updates))
|
|
121
114
|
.filter((expression) => !!expression);
|
|
122
115
|
const result = updatesExpressions.join(' ');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isKvsLogicalOperator, isKvsQueryCondition } from './buildDynamoQuery';
|
|
2
2
|
export const getDynamoTableIndexByConfigAndQuery = (setting, query) => {
|
|
3
3
|
// Function to extract keys from a query
|
|
4
4
|
const extractKeysFromQuery = (query) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DynamoDBClient, QueryCommand } from '@aws-sdk/client-dynamodb';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { itemsToQpqPagedData } from './utils/itemsToQpqPagedData';
|
|
2
4
|
import { convertDynamoMapToObject } from './convertObjectToDynamoMap';
|
|
3
5
|
import { stringToLastEvaluatedKey } from './logs';
|
|
4
|
-
import {
|
|
5
|
-
import { buildExpressionAttributeValues, buildExpressionAttributeNames, buildDynamoQueryExpression, } from './qpqDynamoOrm';
|
|
6
|
-
import { createAwsClient } from '../createAwsClient';
|
|
6
|
+
import { buildDynamoQueryExpression, buildExpressionAttributeNames, buildExpressionAttributeValues } from './qpqDynamoOrm';
|
|
7
7
|
export async function query(tableName, region, keyExpression, filterExpression, pageKey, indexName, limit, sortAscending) {
|
|
8
8
|
// Instantiate DynamoDB client
|
|
9
9
|
const dynamoDBClient = createAwsClient(DynamoDBClient, { region });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DynamoDBClient, ScanCommand } from '@aws-sdk/client-dynamodb';
|
|
2
|
+
import { createAwsClient } from '../createAwsClient';
|
|
3
|
+
import { itemsToQpqPagedData } from './utils/itemsToQpqPagedData';
|
|
2
4
|
import { convertDynamoMapToObject } from './convertObjectToDynamoMap';
|
|
3
5
|
import { stringToLastEvaluatedKey } from './logs';
|
|
4
|
-
import {
|
|
5
|
-
import { buildExpressionAttributeValues, buildExpressionAttributeNames, buildDynamoQueryExpression, } from './qpqDynamoOrm';
|
|
6
|
-
import { createAwsClient } from '../createAwsClient';
|
|
6
|
+
import { buildDynamoQueryExpression, buildExpressionAttributeNames, buildExpressionAttributeValues } from './qpqDynamoOrm';
|
|
7
7
|
export async function scan(tableName, region, filterExpression, pageKey) {
|
|
8
8
|
// Instantiate DynamoDB client
|
|
9
9
|
const dynamoDBClient = createAwsClient(DynamoDBClient, { region });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KvsCoreDataType, KvsUpdate } from 'quidproquo-core';
|
|
2
2
|
export declare function updateItem<Item>(tableName: string, region: string, update: KvsUpdate, keyName: string, key: KvsCoreDataType, sortkeyName?: string, sortKey?: KvsCoreDataType): Promise<Item>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DynamoDBClient, ReturnValue, UpdateItemCommand } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { buildAttributeValue, buildDynamoUpdateExpression, buildUpdateExpressionAttributeNames, buildUpdateExpressionAttributeValues, } from './qpqDynamoOrm';
|
|
3
2
|
import { createAwsClient } from '../createAwsClient';
|
|
4
3
|
import { convertDynamoMapToObject } from './convertObjectToDynamoMap';
|
|
4
|
+
import { buildAttributeValue, buildDynamoUpdateExpression, buildUpdateExpressionAttributeNames, buildUpdateExpressionAttributeValues, } from './qpqDynamoOrm';
|
|
5
5
|
export async function updateItem(tableName, region, update, keyName, key, sortkeyName, sortKey) {
|
|
6
6
|
const dynamoDBClient = createAwsClient(DynamoDBClient, { region });
|
|
7
7
|
const params = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InvokeCommand, LambdaClient } from '@aws-sdk/client-lambda';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const executeLambdaByName = async (functionName, region, payload, isAsync) => {
|
|
4
4
|
const lambdaClient = createAwsClient(LambdaClient, { region });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DescribeDBClustersCommand, NeptuneClient } from '@aws-sdk/client-neptune';
|
|
2
2
|
import { createAwsClient } from '../createAwsClient';
|
|
3
3
|
export const getNeptuneEndpoints = async (clusterIdentifier, region) => {
|
|
4
4
|
const neptuneClient = createAwsClient(NeptuneClient, { region });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetParameterCommand, SSMClient } from '@aws-sdk/client-ssm';
|
|
2
2
|
import { memoFuncAsync } from '../cache/memoFuncAsync';
|
|
3
3
|
import { createAwsClient } from '../createAwsClient';
|
|
4
4
|
export const getParameter = memoFuncAsync(async (parameterName, region) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetParametersCommand, SSMClient } from '@aws-sdk/client-ssm';
|
|
2
2
|
import { memoFuncAsync } from '../cache/memoFuncAsync';
|
|
3
3
|
import { createAwsClient } from '../createAwsClient';
|
|
4
4
|
export const getParameters = memoFuncAsync(async (parameterNames, region) => {
|