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.
Files changed (417) hide show
  1. package/README.md +97 -118
  2. package/lib/commonjs/awsLambdaUtils.d.ts +1 -1
  3. package/lib/commonjs/awsLambdaUtils.js +1 -1
  4. package/lib/commonjs/awsNamingUtils.d.ts +1 -1
  5. package/lib/commonjs/awsNamingUtils.js +4 -7
  6. package/lib/commonjs/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js +3 -2
  7. package/lib/commonjs/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js +3 -2
  8. package/lib/commonjs/getActionProcessor/core/config/getConfigGetSecretActionProcessor.js +2 -1
  9. package/lib/commonjs/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js +3 -2
  10. package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/types.d.ts +2 -2
  11. package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventMatchStoryActionProcessor.js +1 -1
  12. package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/types.d.ts +2 -2
  13. package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/types.d.ts +2 -2
  14. package/lib/commonjs/getActionProcessor/core/event/cognito/createAuthChallenge/types.d.ts +1 -1
  15. package/lib/commonjs/getActionProcessor/core/event/cognito/customMessage/getEventAutoRespondActionProcessor.js +1 -1
  16. package/lib/commonjs/getActionProcessor/core/event/cognito/customMessage/types.d.ts +2 -2
  17. package/lib/commonjs/getActionProcessor/core/event/cognito/defineAuthChallenge/types.d.ts +1 -1
  18. package/lib/commonjs/getActionProcessor/core/event/cognito/index.d.ts +1 -1
  19. package/lib/commonjs/getActionProcessor/core/event/cognito/index.js +1 -1
  20. package/lib/commonjs/getActionProcessor/core/event/cognito/utils/getChallengeSessionFromCognitoTriggerEventSession.d.ts +1 -1
  21. package/lib/commonjs/getActionProcessor/core/event/cognito/verifyAuthChallenge/types.d.ts +2 -2
  22. package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventGetRecordsActionProcessor.js +1 -1
  23. package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/types.d.ts +1 -1
  24. package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/index.d.ts +1 -1
  25. package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/index.js +1 -1
  26. package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.d.ts +1 -1
  27. package/lib/commonjs/getActionProcessor/core/event/index.d.ts +2 -2
  28. package/lib/commonjs/getActionProcessor/core/event/index.js +2 -2
  29. package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/types.d.ts +1 -1
  30. package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/types.d.ts +2 -2
  31. package/lib/commonjs/getActionProcessor/core/event/sqs/queue/types.d.ts +2 -2
  32. package/lib/commonjs/getActionProcessor/core/event/utils/isAuthValid.js +6 -5
  33. package/lib/commonjs/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +5 -5
  34. package/lib/commonjs/getActionProcessor/core/file/getFileDeleteActionProcessor.js +4 -4
  35. package/lib/commonjs/getActionProcessor/core/file/getFileExistsActionProcessor.js +3 -2
  36. package/lib/commonjs/getActionProcessor/core/file/getFileGenerateTemporarySecureUrlActionProcessor.js +2 -1
  37. package/lib/commonjs/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +3 -2
  38. package/lib/commonjs/getActionProcessor/core/file/getFileReadBinaryContentsActionProcessor.js +3 -2
  39. package/lib/commonjs/getActionProcessor/core/file/getFileReadTextContentsActionProcessor.js +3 -2
  40. package/lib/commonjs/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js +4 -3
  41. package/lib/commonjs/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +4 -3
  42. package/lib/commonjs/getActionProcessor/core/file/index.js +2 -2
  43. package/lib/commonjs/getActionProcessor/core/graphDatabase/customActions/getActionProcessor/getGraphDatabaseForNeptuneGetEndpointsActionProcessor.js +3 -2
  44. package/lib/commonjs/getActionProcessor/core/graphDatabase/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.js +1 -1
  45. package/lib/commonjs/getActionProcessor/core/index.d.ts +5 -5
  46. package/lib/commonjs/getActionProcessor/core/index.js +10 -10
  47. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreDeleteActionProcessor.js +3 -2
  48. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreGetActionProcessor.js +4 -4
  49. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreGetAllActionProcessor.js +4 -4
  50. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js +3 -2
  51. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js +4 -4
  52. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreUpdateActionProcessor.js +3 -2
  53. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreUpsertActionProcessor.js +3 -2
  54. package/lib/commonjs/getActionProcessor/core/keyValueStore/index.js +2 -2
  55. package/lib/commonjs/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js +5 -5
  56. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryAuthenticateUserActionProcessor.js +4 -3
  57. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryChangePasswordActionProcessor.js +2 -1
  58. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryConfirmEmailVerificationActionProcessor.js +2 -1
  59. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryConfirmForgotPasswordActionProcessor.js +3 -2
  60. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryCreateUserActionProcessor.js +4 -3
  61. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryDecodeAccessTokenActionProcessor.js +2 -1
  62. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryForgotPasswordActionProcessor.js +4 -3
  63. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesActionProcessor.js +2 -1
  64. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js +2 -1
  65. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js +2 -1
  66. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js +2 -1
  67. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js +4 -3
  68. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRequestEmailVerificationActionProcessor.js +2 -1
  69. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js +3 -2
  70. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js +2 -1
  71. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js +2 -1
  72. package/lib/commonjs/getActionProcessor/index.js +1 -1
  73. package/lib/commonjs/getActionProcessor/webserver/index.d.ts +1 -1
  74. package/lib/commonjs/getActionProcessor/webserver/index.js +2 -2
  75. package/lib/commonjs/getActionProcessor/webserver/serviceFunction/getServiceFunctionExecuteActionProcessor.js +3 -2
  76. package/lib/commonjs/getActionProcessor/webserver/webEntry/getWebEntryInvalidateCacheActionProcessor.js +3 -2
  77. package/lib/commonjs/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +2 -1
  78. package/lib/commonjs/index.d.ts +5 -5
  79. package/lib/commonjs/index.js +8 -8
  80. package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
  81. package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js +1 -1
  82. package/lib/commonjs/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.d.ts +1 -1
  83. package/lib/commonjs/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
  84. package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js +1 -1
  85. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js +1 -1
  86. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js +1 -1
  87. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js +1 -1
  88. package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js +1 -1
  89. package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_stackDeploy.js +1 -1
  90. package/lib/commonjs/lambdaHandlers/getS3Event_fileEvent.js +1 -1
  91. package/lib/commonjs/lambdaHandlers/getSqsEvent_queueEvent.d.ts +1 -1
  92. package/lib/commonjs/lambdaHandlers/getSqsEvent_queueEvent.js +1 -1
  93. package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.d.ts +1 -1
  94. package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js +4 -4
  95. package/lib/commonjs/lambdaHandlers/helpers/logger.d.ts +1 -1
  96. package/lib/commonjs/lambdaHandlers/helpers/logger.js +1 -1
  97. package/lib/commonjs/lambdaHandlers/index.d.ts +3 -3
  98. package/lib/commonjs/lambdaHandlers/index.js +3 -3
  99. package/lib/commonjs/lambdas/anyExecuteServiceFunctionEvent_serviceFunction.js +2 -2
  100. package/lib/commonjs/lambdas/apiGatewayEventHandler.js +1 -1
  101. package/lib/commonjs/lambdas/apiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
  102. package/lib/commonjs/lambdas/cloudFrontRequestEvent_originRequest.js +1 -1
  103. package/lib/commonjs/lambdas/customMessageTriggerEvent_createAuthChallenge.js +1 -1
  104. package/lib/commonjs/lambdas/customMessageTriggerEvent_customMessage.js +1 -1
  105. package/lib/commonjs/lambdas/customMessageTriggerEvent_defineAuthChallenge.js +1 -1
  106. package/lib/commonjs/lambdas/customMessageTriggerEvent_verifyAuthChallenge.js +1 -1
  107. package/lib/commonjs/lambdas/dynamicModuleLoader/dynamicModuleLoader.js +1 -1
  108. package/lib/commonjs/lambdas/eventBridgeEvent_recurringSchedule.js +1 -1
  109. package/lib/commonjs/lambdas/eventBridgeEvent_stackDeploy.js +1 -1
  110. package/lib/commonjs/lambdas/lambda-utils/getQpqConfig.js +1 -1
  111. package/lib/commonjs/lambdas/lambda-utils/index.d.ts +1 -1
  112. package/lib/commonjs/lambdas/lambda-utils/index.js +1 -1
  113. package/lib/commonjs/lambdas/lambda-utils/logger.d.ts +1 -1
  114. package/lib/commonjs/lambdas/lambda-utils/logger.js +1 -1
  115. package/lib/commonjs/lambdas/lambdaSQSEvent.js +3 -3
  116. package/lib/commonjs/lambdas/sqsEvent_queueEvent.js +1 -1
  117. package/lib/commonjs/logic/acm/findMatchingCertificates.js +1 -2
  118. package/lib/commonjs/logic/apiGateway/getApiKeys.js +5 -1
  119. package/lib/commonjs/logic/apiGateway/websocketSendMessage.js +3 -3
  120. package/lib/commonjs/logic/cache/memoFuncAsync.js +5 -9
  121. package/lib/commonjs/logic/cloudFront/invalidateCache.js +1 -1
  122. package/lib/commonjs/logic/cloudformation/getExportedValue.js +1 -1
  123. package/lib/commonjs/logic/cognito/authenticateUser.js +5 -3
  124. package/lib/commonjs/logic/cognito/changePassword.js +3 -1
  125. package/lib/commonjs/logic/cognito/confirmForgotPassword.js +5 -3
  126. package/lib/commonjs/logic/cognito/createUser.d.ts +1 -1
  127. package/lib/commonjs/logic/cognito/createUser.js +5 -3
  128. package/lib/commonjs/logic/cognito/decodeAccessToken.js +2 -2
  129. package/lib/commonjs/logic/cognito/forgotPassword.js +4 -2
  130. package/lib/commonjs/logic/cognito/getUser.js +3 -1
  131. package/lib/commonjs/logic/cognito/getUserAttributes.js +4 -2
  132. package/lib/commonjs/logic/cognito/getUserAttributesBySub.js +4 -2
  133. package/lib/commonjs/logic/cognito/getUserPoolClientSecret.js +3 -1
  134. package/lib/commonjs/logic/cognito/index.d.ts +1 -1
  135. package/lib/commonjs/logic/cognito/index.js +1 -1
  136. package/lib/commonjs/logic/cognito/listPagedUsers.d.ts +1 -1
  137. package/lib/commonjs/logic/cognito/listPagedUsers.js +4 -2
  138. package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.d.ts +1 -1
  139. package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.js +4 -2
  140. package/lib/commonjs/logic/cognito/refreshToken.js +5 -3
  141. package/lib/commonjs/logic/cognito/requestEmailVerificationCode.js +3 -1
  142. package/lib/commonjs/logic/cognito/respondToAuthChallengeChallenge.js +5 -3
  143. package/lib/commonjs/logic/cognito/setUserAttributes.js +4 -2
  144. package/lib/commonjs/logic/cognito/setUserPassword.js +3 -1
  145. package/lib/commonjs/logic/cognito/utils/index.d.ts +1 -1
  146. package/lib/commonjs/logic/cognito/utils/transformCognitoResponse.d.ts +2 -2
  147. package/lib/commonjs/logic/cognito/verifyUserEmail.js +3 -1
  148. package/lib/commonjs/logic/dynamo/deleteItem.js +1 -1
  149. package/lib/commonjs/logic/dynamo/getLogChildrenByFromCorrelation.js +1 -1
  150. package/lib/commonjs/logic/dynamo/getPagedItemsOverRange.js +7 -3
  151. package/lib/commonjs/logic/dynamo/index.d.ts +1 -1
  152. package/lib/commonjs/logic/dynamo/index.js +1 -1
  153. package/lib/commonjs/logic/dynamo/putItem.js +1 -1
  154. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.d.ts +1 -1
  155. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js +2 -4
  156. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.d.ts +1 -1
  157. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js +2 -9
  158. package/lib/commonjs/logic/dynamo/query.js +2 -2
  159. package/lib/commonjs/logic/dynamo/scan.js +2 -2
  160. package/lib/commonjs/logic/dynamo/updateItem.d.ts +1 -1
  161. package/lib/commonjs/logic/dynamo/updateItem.js +1 -1
  162. package/lib/commonjs/logic/parametersManager/setParameter.js +1 -1
  163. package/lib/commonjs/logic/s3/generatePresignedUrl.js +3 -1
  164. package/lib/commonjs/logic/s3/listFiles.js +1 -1
  165. package/lib/commonjs/logic/s3/readBinaryFile.js +5 -1
  166. package/lib/commonjs/logic/s3/s3Utils.d.ts +2 -2
  167. package/lib/commonjs/logic/s3/s3Utils.js +2 -2
  168. package/lib/commonjs/logic/s3/writeBinaryFile.js +1 -1
  169. package/lib/commonjs/logic/s3/writeTextFile.js +1 -1
  170. package/lib/commonjs/logic/secretsManager/getSecret.js +3 -1
  171. package/lib/commonjs/logic/sqs/sendMessages.js +1 -1
  172. package/lib/esm/awsLambdaUtils.d.ts +1 -1
  173. package/lib/esm/awsLambdaUtils.js +1 -1
  174. package/lib/esm/awsNamingUtils.d.ts +1 -1
  175. package/lib/esm/awsNamingUtils.js +4 -7
  176. package/lib/esm/getActionProcessor/core/config/getConfigGetGlobalActionProcessor.js +1 -1
  177. package/lib/esm/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js +4 -3
  178. package/lib/esm/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js +4 -3
  179. package/lib/esm/getActionProcessor/core/config/getConfigGetSecretActionProcessor.js +3 -2
  180. package/lib/esm/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js +4 -3
  181. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventAutoRespondActionProcessor.js +1 -1
  182. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventGetRecordsActionProcessor.js +1 -1
  183. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventGetStorySessionActionProcessor.js +1 -1
  184. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventMatchStoryActionProcessor.js +1 -1
  185. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/getEventTransformResponseResultActionProcessor.js +1 -1
  186. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/api/types.d.ts +2 -2
  187. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventAutoRespondActionProcessor.js +1 -1
  188. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventGetRecordsActionProcessor.js +1 -1
  189. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventGetStorySessionActionProcessor.js +1 -1
  190. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventMatchStoryActionProcessor.js +2 -2
  191. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/getEventTransformResponseResultActionProcessor.js +1 -1
  192. package/lib/esm/getActionProcessor/core/event/apiGatwayEvent/websocket/types.d.ts +2 -2
  193. package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventAutoRespondActionProcessor.js +1 -1
  194. package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventGetRecordsActionProcessor.js +5 -2
  195. package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventGetStorySessionActionProcessor.js +1 -1
  196. package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventMatchStoryActionProcessor.js +1 -1
  197. package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/getEventTransformResponseResultActionProcessor.js +1 -1
  198. package/lib/esm/getActionProcessor/core/event/cloudFrontOriginRequest/types.d.ts +2 -2
  199. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventAutoRespondActionProcessor.js +1 -1
  200. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
  201. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetStorySessionActionProcessor.js +1 -1
  202. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventMatchStoryActionProcessor.js +1 -1
  203. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventTransformResponseResultActionProcessor.js +1 -1
  204. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/types.d.ts +1 -1
  205. package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventAutoRespondActionProcessor.js +2 -2
  206. package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventGetRecordsActionProcessor.js +1 -1
  207. package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventGetStorySessionActionProcessor.js +1 -1
  208. package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventMatchStoryActionProcessor.js +1 -1
  209. package/lib/esm/getActionProcessor/core/event/cognito/customMessage/getEventTransformResponseResultActionProcessor.js +1 -1
  210. package/lib/esm/getActionProcessor/core/event/cognito/customMessage/types.d.ts +2 -2
  211. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventAutoRespondActionProcessor.js +1 -1
  212. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
  213. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetStorySessionActionProcessor.js +1 -1
  214. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventMatchStoryActionProcessor.js +1 -1
  215. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventTransformResponseResultActionProcessor.js +1 -1
  216. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/types.d.ts +1 -1
  217. package/lib/esm/getActionProcessor/core/event/cognito/index.d.ts +1 -1
  218. package/lib/esm/getActionProcessor/core/event/cognito/index.js +1 -1
  219. package/lib/esm/getActionProcessor/core/event/cognito/utils/getChallengeSessionFromCognitoTriggerEventSession.d.ts +1 -1
  220. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventAutoRespondActionProcessor.js +1 -1
  221. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
  222. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetStorySessionActionProcessor.js +1 -1
  223. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventMatchStoryActionProcessor.js +1 -1
  224. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventTransformResponseResultActionProcessor.js +1 -1
  225. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/types.d.ts +2 -2
  226. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventAutoRespondActionProcessor.js +1 -1
  227. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventGetRecordsActionProcessor.js +2 -2
  228. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventGetStorySessionActionProcessor.js +1 -1
  229. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventMatchStoryActionProcessor.js +1 -1
  230. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/getEventTransformResponseResultActionProcessor.js +1 -1
  231. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/deployStack/types.d.ts +1 -1
  232. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/index.d.ts +1 -1
  233. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/index.js +1 -1
  234. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventAutoRespondActionProcessor.js +1 -1
  235. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventGetRecordsActionProcessor.js +1 -1
  236. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventGetStorySessionActionProcessor.js +1 -1
  237. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventMatchStoryActionProcessor.js +1 -1
  238. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventTransformResponseResultActionProcessor.js +1 -1
  239. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.d.ts +1 -1
  240. package/lib/esm/getActionProcessor/core/event/index.d.ts +2 -2
  241. package/lib/esm/getActionProcessor/core/event/index.js +2 -2
  242. package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventAutoRespondActionProcessor.js +1 -1
  243. package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventGetRecordsActionProcessor.js +1 -1
  244. package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventGetStorySessionActionProcessor.js +1 -1
  245. package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventMatchStoryActionProcessor.js +1 -1
  246. package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/getEventTransformResponseResultActionProcessor.js +1 -1
  247. package/lib/esm/getActionProcessor/core/event/lambda/serviceFunction/types.d.ts +1 -1
  248. package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventAutoRespondActionProcessor.js +1 -1
  249. package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventGetRecordsActionProcessor.js +1 -1
  250. package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventGetStorySessionActionProcessor.js +1 -1
  251. package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventMatchStoryActionProcessor.js +1 -1
  252. package/lib/esm/getActionProcessor/core/event/s3/fileEvent/getEventTransformResponseResultActionProcessor.js +1 -1
  253. package/lib/esm/getActionProcessor/core/event/s3/fileEvent/types.d.ts +2 -2
  254. package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventAutoRespondActionProcessor.js +1 -1
  255. package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventGetRecordsActionProcessor.js +1 -1
  256. package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventGetStorySessionActionProcessor.js +1 -1
  257. package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventMatchStoryActionProcessor.js +1 -1
  258. package/lib/esm/getActionProcessor/core/event/sqs/queue/getEventTransformResponseResultActionProcessor.js +1 -1
  259. package/lib/esm/getActionProcessor/core/event/sqs/queue/types.d.ts +2 -2
  260. package/lib/esm/getActionProcessor/core/event/utils/isAuthValid.js +6 -5
  261. package/lib/esm/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +4 -4
  262. package/lib/esm/getActionProcessor/core/file/getFileDeleteActionProcessor.js +2 -2
  263. package/lib/esm/getActionProcessor/core/file/getFileExistsActionProcessor.js +4 -3
  264. package/lib/esm/getActionProcessor/core/file/getFileGenerateTemporarySecureUrlActionProcessor.js +3 -2
  265. package/lib/esm/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +4 -3
  266. package/lib/esm/getActionProcessor/core/file/getFileReadBinaryContentsActionProcessor.js +4 -3
  267. package/lib/esm/getActionProcessor/core/file/getFileReadTextContentsActionProcessor.js +4 -3
  268. package/lib/esm/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js +5 -4
  269. package/lib/esm/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +5 -4
  270. package/lib/esm/getActionProcessor/core/file/index.js +2 -2
  271. package/lib/esm/getActionProcessor/core/graphDatabase/customActions/getActionProcessor/getGraphDatabaseForNeptuneGetEndpointsActionProcessor.js +4 -3
  272. package/lib/esm/getActionProcessor/core/graphDatabase/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.js +2 -2
  273. package/lib/esm/getActionProcessor/core/graphDatabase/getGraphDatabaseInternalFieldNamesActionProcessor.js +1 -1
  274. package/lib/esm/getActionProcessor/core/graphDatabase/stories/askRunNeptuneOpenCypherQuery.js +1 -1
  275. package/lib/esm/getActionProcessor/core/graphDatabase/stories/converters/askConvertAnyNeptuneResultToAnyGraphResult.js +2 -2
  276. package/lib/esm/getActionProcessor/core/index.d.ts +5 -5
  277. package/lib/esm/getActionProcessor/core/index.js +10 -10
  278. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreDeleteActionProcessor.js +3 -2
  279. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreGetActionProcessor.js +3 -3
  280. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreGetAllActionProcessor.js +3 -3
  281. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js +4 -3
  282. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js +3 -3
  283. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreUpdateActionProcessor.js +3 -2
  284. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreUpsertActionProcessor.js +4 -3
  285. package/lib/esm/getActionProcessor/core/keyValueStore/index.js +2 -2
  286. package/lib/esm/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js +3 -3
  287. package/lib/esm/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.js +1 -1
  288. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryAuthenticateUserActionProcessor.js +6 -5
  289. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryChangePasswordActionProcessor.js +3 -2
  290. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryConfirmEmailVerificationActionProcessor.js +3 -2
  291. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryConfirmForgotPasswordActionProcessor.js +5 -4
  292. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryCreateUserActionProcessor.js +6 -5
  293. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryDecodeAccessTokenActionProcessor.js +3 -2
  294. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryForgotPasswordActionProcessor.js +6 -5
  295. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesActionProcessor.js +3 -2
  296. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js +3 -2
  297. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js +3 -2
  298. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js +3 -2
  299. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryReadAccessTokenActionProcessor.js +1 -1
  300. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js +6 -5
  301. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRequestEmailVerificationActionProcessor.js +3 -2
  302. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js +5 -4
  303. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js +3 -2
  304. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js +3 -2
  305. package/lib/esm/getActionProcessor/index.js +1 -1
  306. package/lib/esm/getActionProcessor/webserver/index.d.ts +1 -1
  307. package/lib/esm/getActionProcessor/webserver/index.js +2 -2
  308. package/lib/esm/getActionProcessor/webserver/serviceFunction/getServiceFunctionExecuteActionProcessor.js +3 -2
  309. package/lib/esm/getActionProcessor/webserver/webEntry/getWebEntryInvalidateCacheActionProcessor.js +4 -3
  310. package/lib/esm/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +3 -2
  311. package/lib/esm/index.d.ts +5 -5
  312. package/lib/esm/index.js +5 -5
  313. package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
  314. package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js +1 -1
  315. package/lib/esm/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.d.ts +1 -1
  316. package/lib/esm/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
  317. package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js +1 -1
  318. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js +1 -1
  319. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js +1 -1
  320. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js +1 -1
  321. package/lib/esm/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js +1 -1
  322. package/lib/esm/lambdaHandlers/getEventBridgeEvent_stackDeploy.js +1 -1
  323. package/lib/esm/lambdaHandlers/getS3Event_fileEvent.js +1 -1
  324. package/lib/esm/lambdaHandlers/getSqsEvent_queueEvent.d.ts +1 -1
  325. package/lib/esm/lambdaHandlers/getSqsEvent_queueEvent.js +1 -1
  326. package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.d.ts +1 -1
  327. package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js +4 -4
  328. package/lib/esm/lambdaHandlers/helpers/logger.d.ts +1 -1
  329. package/lib/esm/lambdaHandlers/helpers/logger.js +3 -3
  330. package/lib/esm/lambdaHandlers/index.d.ts +3 -3
  331. package/lib/esm/lambdaHandlers/index.js +3 -3
  332. package/lib/esm/lambdas/anyExecuteServiceFunctionEvent_serviceFunction.js +2 -2
  333. package/lib/esm/lambdas/apiGatewayEventHandler.js +1 -1
  334. package/lib/esm/lambdas/apiGatwayEventWebsocketWithIdentity_websocketEvent.js +1 -1
  335. package/lib/esm/lambdas/cloudFrontRequestEvent_originRequest.js +1 -1
  336. package/lib/esm/lambdas/customMessageTriggerEvent_createAuthChallenge.js +1 -1
  337. package/lib/esm/lambdas/customMessageTriggerEvent_customMessage.js +1 -1
  338. package/lib/esm/lambdas/customMessageTriggerEvent_defineAuthChallenge.js +1 -1
  339. package/lib/esm/lambdas/customMessageTriggerEvent_verifyAuthChallenge.js +1 -1
  340. package/lib/esm/lambdas/dynamicModuleLoader/dynamicModuleLoader.js +1 -1
  341. package/lib/esm/lambdas/eventBridgeEvent_recurringSchedule.js +1 -1
  342. package/lib/esm/lambdas/eventBridgeEvent_stackDeploy.js +1 -1
  343. package/lib/esm/lambdas/lambda-utils/getQpqConfig.js +1 -1
  344. package/lib/esm/lambdas/lambda-utils/index.d.ts +1 -1
  345. package/lib/esm/lambdas/lambda-utils/index.js +1 -1
  346. package/lib/esm/lambdas/lambda-utils/logger.d.ts +1 -1
  347. package/lib/esm/lambdas/lambda-utils/logger.js +3 -3
  348. package/lib/esm/lambdas/lambdaSQSEvent.js +3 -3
  349. package/lib/esm/lambdas/sqsEvent_queueEvent.js +1 -1
  350. package/lib/esm/logic/acm/findMatchingCertificates.js +1 -2
  351. package/lib/esm/logic/apiGateway/getApiKeys.js +6 -2
  352. package/lib/esm/logic/apiGateway/websocketSendMessage.js +4 -4
  353. package/lib/esm/logic/cache/memoFuncAsync.js +5 -9
  354. package/lib/esm/logic/cloudFront/invalidateCache.js +1 -1
  355. package/lib/esm/logic/cloudformation/getExportedValue.js +2 -2
  356. package/lib/esm/logic/cognito/authenticateUser.js +6 -4
  357. package/lib/esm/logic/cognito/changePassword.js +4 -2
  358. package/lib/esm/logic/cognito/cognitoAttributeMap.js +4 -1
  359. package/lib/esm/logic/cognito/confirmForgotPassword.js +5 -3
  360. package/lib/esm/logic/cognito/createUser.d.ts +1 -1
  361. package/lib/esm/logic/cognito/createUser.js +6 -4
  362. package/lib/esm/logic/cognito/decodeAccessToken.js +2 -2
  363. package/lib/esm/logic/cognito/decodeValidJwt.js +1 -1
  364. package/lib/esm/logic/cognito/forgotPassword.js +5 -3
  365. package/lib/esm/logic/cognito/getUser.js +4 -2
  366. package/lib/esm/logic/cognito/getUserAttributes.js +5 -3
  367. package/lib/esm/logic/cognito/getUserAttributesBySub.js +5 -3
  368. package/lib/esm/logic/cognito/getUserPoolClientSecret.js +3 -1
  369. package/lib/esm/logic/cognito/index.d.ts +1 -1
  370. package/lib/esm/logic/cognito/index.js +1 -1
  371. package/lib/esm/logic/cognito/listPagedUsers.d.ts +1 -1
  372. package/lib/esm/logic/cognito/listPagedUsers.js +5 -3
  373. package/lib/esm/logic/cognito/listPagedUsersByAttribute.d.ts +1 -1
  374. package/lib/esm/logic/cognito/listPagedUsersByAttribute.js +4 -2
  375. package/lib/esm/logic/cognito/refreshToken.js +6 -4
  376. package/lib/esm/logic/cognito/requestEmailVerificationCode.js +3 -1
  377. package/lib/esm/logic/cognito/respondToAuthChallengeChallenge.js +5 -3
  378. package/lib/esm/logic/cognito/setUserAttributes.js +5 -3
  379. package/lib/esm/logic/cognito/setUserPassword.js +4 -2
  380. package/lib/esm/logic/cognito/utils/index.d.ts +1 -1
  381. package/lib/esm/logic/cognito/utils/index.js +1 -1
  382. package/lib/esm/logic/cognito/utils/transformCognitoResponse.d.ts +2 -2
  383. package/lib/esm/logic/cognito/verifyUserEmail.js +3 -1
  384. package/lib/esm/logic/dynamo/deleteItem.js +2 -2
  385. package/lib/esm/logic/dynamo/getLogChildrenByFromCorrelation.js +1 -1
  386. package/lib/esm/logic/dynamo/getPagedItemsOverRange.js +7 -3
  387. package/lib/esm/logic/dynamo/index.d.ts +1 -1
  388. package/lib/esm/logic/dynamo/index.js +1 -1
  389. package/lib/esm/logic/dynamo/putItem.js +1 -1
  390. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.d.ts +1 -1
  391. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js +2 -4
  392. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.d.ts +1 -1
  393. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js +3 -10
  394. package/lib/esm/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.js +1 -1
  395. package/lib/esm/logic/dynamo/query.js +3 -3
  396. package/lib/esm/logic/dynamo/scan.js +3 -3
  397. package/lib/esm/logic/dynamo/updateItem.d.ts +1 -1
  398. package/lib/esm/logic/dynamo/updateItem.js +1 -1
  399. package/lib/esm/logic/lambda/executeLambdaByName.js +1 -1
  400. package/lib/esm/logic/neptune/getNeptuneEndpoints.js +1 -1
  401. package/lib/esm/logic/parametersManager/getParameter.js +1 -1
  402. package/lib/esm/logic/parametersManager/getParameters.js +1 -1
  403. package/lib/esm/logic/parametersManager/setParameter.js +2 -2
  404. package/lib/esm/logic/s3/deleteFiles.js +1 -1
  405. package/lib/esm/logic/s3/generatePresignedUrl.js +3 -1
  406. package/lib/esm/logic/s3/listFiles.js +1 -1
  407. package/lib/esm/logic/s3/readBinaryFile.js +6 -2
  408. package/lib/esm/logic/s3/readTextFile.js +1 -1
  409. package/lib/esm/logic/s3/s3Utils.d.ts +2 -2
  410. package/lib/esm/logic/s3/s3Utils.js +2 -2
  411. package/lib/esm/logic/s3/writeBinaryFile.js +2 -2
  412. package/lib/esm/logic/s3/writeTextFile.js +2 -2
  413. package/lib/esm/logic/secretsManager/getSecret.js +4 -2
  414. package/lib/esm/logic/sns/publishMessage.js +1 -1
  415. package/lib/esm/logic/sqs/sendMessages.js +2 -2
  416. package/lib/esm/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.js +1 -1
  417. 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
- try {
20
- // Await the result and then cache it
21
- const result = await func(...args);
22
- nodeCache.set(cacheKey, result);
23
- return result;
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, } from '@aws-sdk/client-cloudformation';
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 (!!listCommandParams.NextToken);
15
+ } while (listCommandParams.NextToken);
16
16
  throw new Error(`CF could not find: [${variableName}]`);
17
17
  });
@@ -1,11 +1,13 @@
1
- import { CognitoIdentityProviderClient, AdminInitiateAuthCommand, AuthFlowType, } from '@aws-sdk/client-cognito-identity-provider';
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 { createAwsClient } from '../createAwsClient';
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, { region });
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 { CognitoIdentityProviderClient, ChangePasswordCommand, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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 { ...acc, ...getQpqAttributeObjectFromCognitoKeyValue(Name, Value) };
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 { createAwsClient } from '../createAwsClient';
5
+ import { getUserPoolClientSecret } from './getUserPoolClientSecret';
6
6
  export const confirmForgotPassword = async (userPoolId, clientId, region, code, username, password) => {
7
- const cognitoClient = createAwsClient(CognitoIdentityProviderClient, { region });
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 { CreateUserRequest, AuthenticateUserResponse } from 'quidproquo-core';
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 { CognitoIdentityProviderClient, AdminCreateUserCommand, DeliveryMediumType, MessageActionType, } from '@aws-sdk/client-cognito-identity-provider';
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 { createAwsClient } from '../createAwsClient';
5
+ import { setUserPassword } from './setUserPassword';
6
6
  export const createUser = async (userPoolId, region, clientId, createUserRequest) => {
7
- const cognitoClient = createAwsClient(CognitoIdentityProviderClient, { region });
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 { qpqCoreUtils } from 'quidproquo-core';
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 = qpqCoreUtils.getApplicationModuleDeployRegion(qpqConfig);
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,4 +1,4 @@
1
- import { verify, decode } from 'jsonwebtoken';
1
+ import { decode, verify } from 'jsonwebtoken';
2
2
  import jwksClient from 'jwks-rsa';
3
3
  export const decodeValidJwt = async (userPoolId, region, ignoreExpiration, accessToken) => {
4
4
  if (!accessToken) {
@@ -1,9 +1,11 @@
1
- import { CognitoIdentityProviderClient, ForgotPasswordCommand, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
9
+ const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
10
+ region,
11
+ });
10
12
  const params = {
11
13
  AccessToken: accessToken,
12
14
  };
@@ -1,8 +1,10 @@
1
- import { CognitoIdentityProviderClient, AdminGetUserCommand, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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, { region });
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
- export * from './decodeValidJwt';
2
1
  export * from './decodeAccessToken';
2
+ export * from './decodeValidJwt';
@@ -1,2 +1,2 @@
1
- export * from './decodeValidJwt';
2
1
  export * from './decodeAccessToken';
2
+ export * from './decodeValidJwt';
@@ -1,2 +1,2 @@
1
- import { UserAttributes, QpqPagedData } from 'quidproquo-core';
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, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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 { UserAttributes, QpqPagedData } from 'quidproquo-core';
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, { region });
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 { CognitoIdentityProviderClient, AdminInitiateAuthCommand, AuthFlowType, } from '@aws-sdk/client-cognito-identity-provider';
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 { createAwsClient } from '../createAwsClient';
5
+ import { getUserPoolClientSecret } from './getUserPoolClientSecret';
6
6
  export const refreshToken = async (userPoolId, clientId, region, username, refreshToken) => {
7
- const cognitoClient = createAwsClient(CognitoIdentityProviderClient, { region });
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, { region });
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 { createAwsClient } from '../createAwsClient';
5
+ import { getUserPoolClientSecret } from './getUserPoolClientSecret';
6
6
  export const respondToAuthChallengeChallenge = async (userPoolId, clientId, region, username, session, challengeNameType, attributes) => {
7
- const cognitoClient = createAwsClient(CognitoIdentityProviderClient, { region });
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 { CognitoIdentityProviderClient, AdminUpdateUserAttributesCommand, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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 { CognitoIdentityProviderClient, AdminSetUserPasswordCommand, } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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,4 +1,4 @@
1
- export * from "./calculateSecretHash";
1
+ export * from './calculateSecretHash';
2
2
  export * from './pageKeyToPaginationToken';
3
3
  export * from './paginationTokenToPageKey';
4
4
  export * from './transformCognitoResponse';
@@ -1,4 +1,4 @@
1
- export * from "./calculateSecretHash";
1
+ export * from './calculateSecretHash';
2
2
  export * from './pageKeyToPaginationToken';
3
3
  export * from './paginationTokenToPageKey';
4
4
  export * from './transformCognitoResponse';
@@ -1,5 +1,5 @@
1
- import { AuthenticateUserResponse, AuthenticationInfo, AuthenticateUserChallenge } from 'quidproquo-core';
2
- import { AuthenticationResultType, AdminInitiateAuthResponse, ChallengeNameType } from '@aws-sdk/client-cognito-identity-provider';
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, { region });
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 { DynamoDBClient, DeleteItemCommand, } from '@aws-sdk/client-dynamodb';
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': { S: startIsoDateTime + '#00000000-0000-0000-0000-000000000000' },
12
- ':endIsoDateTime': { S: endIsoDateTime + '#ffffffff-ffff-ffff-ffff-ffffffffffff' },
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
  };
@@ -2,5 +2,5 @@ export * from './deleteItem';
2
2
  export * from './getAllItems';
3
3
  export * from './getItem';
4
4
  export * from './putItem';
5
- export * from './updateItem';
6
5
  export * from './query';
6
+ export * from './updateItem';
@@ -2,5 +2,5 @@ export * from './deleteItem';
2
2
  export * from './getAllItems';
3
3
  export * from './getItem';
4
4
  export * from './putItem';
5
- export * from './updateItem';
6
5
  export * from './query';
6
+ export * from './updateItem';
@@ -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 { KvsQueryOperation, KvsQueryCondition, KvsLogicalOperator, KvsAdvancedDataType } from 'quidproquo-core';
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
+ import { KvsUpdate, KvsUpdateActionType } from 'quidproquo-core';
1
2
  import { AttributeValue } from '@aws-sdk/client-dynamodb';
2
- import { KvsUpdateActionType, KvsUpdate } from 'quidproquo-core';
3
3
  interface ExpressionAttributeNameMap {
4
4
  [key: string]: string;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { KvsUpdateActionType } from 'quidproquo-core';
2
- import { getItemName, getValueName, buildAttributeValue } from './buildDynamoQuery';
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 { isKvsQueryCondition, isKvsLogicalOperator } from './buildDynamoQuery';
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 { itemsToQpqPagedData } from './utils/itemsToQpqPagedData';
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 { itemsToQpqPagedData } from './utils/itemsToQpqPagedData';
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 { KvsUpdate, KvsCoreDataType } from 'quidproquo-core';
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 { LambdaClient, InvokeCommand } from '@aws-sdk/client-lambda';
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 { NeptuneClient, DescribeDBClustersCommand } from '@aws-sdk/client-neptune';
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 { SSMClient, GetParameterCommand } from '@aws-sdk/client-ssm';
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 { SSMClient, GetParametersCommand } from '@aws-sdk/client-ssm';
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) => {