quidproquo-actionprocessor-awslambda 0.1.11 → 0.1.12

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 (1087) hide show
  1. package/lib/commonjs/awsLambdaUtils.d.ts +6 -4
  2. package/lib/commonjs/awsLambdaUtils.js +2 -2
  3. package/lib/commonjs/awsLambdaUtils.js.map +1 -1
  4. package/lib/commonjs/awsNamingUtils.d.ts +2 -2
  5. package/lib/commonjs/awsNamingUtils.js +60 -109
  6. package/lib/commonjs/awsNamingUtils.js.map +1 -1
  7. package/lib/commonjs/getActionProcessor/core/ai/getAiPromptActionProcessor.js +2 -2
  8. package/lib/commonjs/getActionProcessor/core/ai/getAiPromptActionProcessor.js.map +1 -1
  9. package/lib/commonjs/getActionProcessor/core/ai/getAiPromptStreamActionProcessor.js +6 -6
  10. package/lib/commonjs/getActionProcessor/core/ai/getAiPromptStreamActionProcessor.js.map +1 -1
  11. package/lib/commonjs/getActionProcessor/core/ai/logic/prepareAiPromptCall.d.ts +4 -3
  12. package/lib/commonjs/getActionProcessor/core/ai/logic/prepareAiPromptCall.js.map +1 -1
  13. package/lib/commonjs/getActionProcessor/core/ai/logic/toCacheableMessages.js +1 -1
  14. package/lib/commonjs/getActionProcessor/core/ai/logic/toCacheableMessages.js.map +1 -1
  15. package/lib/commonjs/getActionProcessor/core/apiKeyValidation/getApiKeyValidationValidateActionProcessor.js +10 -8
  16. package/lib/commonjs/getActionProcessor/core/apiKeyValidation/getApiKeyValidationValidateActionProcessor.js.map +1 -1
  17. package/lib/commonjs/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js +2 -2
  18. package/lib/commonjs/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js.map +1 -1
  19. package/lib/commonjs/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js +2 -2
  20. package/lib/commonjs/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js.map +1 -1
  21. package/lib/commonjs/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js +2 -2
  22. package/lib/commonjs/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js.map +1 -1
  23. package/lib/commonjs/getActionProcessor/core/crypto/getCryptoDecryptActionProcessor.d.ts +2 -0
  24. package/lib/commonjs/getActionProcessor/core/crypto/getCryptoDecryptActionProcessor.js +53 -0
  25. package/lib/commonjs/getActionProcessor/core/crypto/getCryptoDecryptActionProcessor.js.map +1 -0
  26. package/lib/commonjs/getActionProcessor/core/crypto/getCryptoEncryptActionProcessor.d.ts +2 -0
  27. package/lib/commonjs/getActionProcessor/core/crypto/getCryptoEncryptActionProcessor.js +45 -0
  28. package/lib/commonjs/getActionProcessor/core/crypto/getCryptoEncryptActionProcessor.js.map +1 -0
  29. package/lib/commonjs/getActionProcessor/core/crypto/index.d.ts +2 -0
  30. package/lib/commonjs/{lambdas/dynamicModuleLoader/dynamicModuleLoaderWarmer.js → getActionProcessor/core/crypto/index.js} +7 -5
  31. package/lib/commonjs/getActionProcessor/core/crypto/index.js.map +1 -0
  32. package/lib/commonjs/getActionProcessor/core/crypto/utils/createKmsDataKeyProvider.d.ts +2 -0
  33. package/lib/commonjs/getActionProcessor/core/crypto/utils/createKmsDataKeyProvider.js +11 -0
  34. package/lib/commonjs/getActionProcessor/core/crypto/utils/createKmsDataKeyProvider.js.map +1 -0
  35. package/lib/commonjs/getActionProcessor/core/crypto/utils/index.d.ts +2 -0
  36. package/lib/commonjs/getActionProcessor/core/crypto/utils/index.js +19 -0
  37. package/lib/commonjs/getActionProcessor/core/crypto/utils/index.js.map +1 -0
  38. package/lib/commonjs/getActionProcessor/core/crypto/utils/resolveCryptoKeyAlias.d.ts +2 -0
  39. package/lib/commonjs/getActionProcessor/core/crypto/utils/resolveCryptoKeyAlias.js +19 -0
  40. package/lib/commonjs/getActionProcessor/core/crypto/utils/resolveCryptoKeyAlias.js.map +1 -0
  41. package/lib/commonjs/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetRecordsActionProcessor.js +2 -2
  42. package/lib/commonjs/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetRecordsActionProcessor.js.map +1 -1
  43. package/lib/commonjs/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetRecordsActionProcessor.js +2 -2
  44. package/lib/commonjs/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetRecordsActionProcessor.js.map +1 -1
  45. package/lib/commonjs/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetRecordsActionProcessor.js +2 -2
  46. package/lib/commonjs/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetRecordsActionProcessor.js.map +1 -1
  47. package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventMatchStoryActionProcessor.js.map +1 -1
  48. package/lib/commonjs/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +13 -10
  49. package/lib/commonjs/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js.map +1 -1
  50. package/lib/commonjs/getActionProcessor/core/file/getFileDeleteActionProcessor.js +4 -8
  51. package/lib/commonjs/getActionProcessor/core/file/getFileDeleteActionProcessor.js.map +1 -1
  52. package/lib/commonjs/getActionProcessor/core/file/getFileExistsActionProcessor.js +1 -1
  53. package/lib/commonjs/getActionProcessor/core/file/getFileExistsActionProcessor.js.map +1 -1
  54. package/lib/commonjs/getActionProcessor/core/file/getFileIsColdStorageActionProcessor.js +2 -1
  55. package/lib/commonjs/getActionProcessor/core/file/getFileIsColdStorageActionProcessor.js.map +1 -1
  56. package/lib/commonjs/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +2 -1
  57. package/lib/commonjs/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js.map +1 -1
  58. package/lib/commonjs/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js +2 -1
  59. package/lib/commonjs/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js.map +1 -1
  60. package/lib/commonjs/getActionProcessor/core/file/getFileWriteObjectJsonActionProcessor.js +2 -1
  61. package/lib/commonjs/getActionProcessor/core/file/getFileWriteObjectJsonActionProcessor.js.map +1 -1
  62. package/lib/commonjs/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +2 -1
  63. package/lib/commonjs/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js.map +1 -1
  64. package/lib/commonjs/getActionProcessor/core/file/utils/StorageDriveNotFoundError.d.ts +3 -0
  65. package/lib/commonjs/getActionProcessor/core/file/utils/StorageDriveNotFoundError.js +14 -0
  66. package/lib/commonjs/getActionProcessor/core/file/utils/StorageDriveNotFoundError.js.map +1 -0
  67. package/lib/commonjs/getActionProcessor/core/file/utils/index.d.ts +1 -0
  68. package/lib/commonjs/getActionProcessor/core/file/utils/index.js +1 -0
  69. package/lib/commonjs/getActionProcessor/core/file/utils/index.js.map +1 -1
  70. package/lib/commonjs/getActionProcessor/core/file/utils/resolveStorageDriveBucketName.d.ts +5 -0
  71. package/lib/commonjs/getActionProcessor/core/file/utils/resolveStorageDriveBucketName.js +7 -1
  72. package/lib/commonjs/getActionProcessor/core/file/utils/resolveStorageDriveBucketName.js.map +1 -1
  73. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/converters/askConvertNeptuneQueryResultToGraphQueryResult.js +1 -1
  74. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/converters/askConvertNeptuneQueryResultToGraphQueryResult.js.map +1 -1
  75. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/AnyNeptuneResult.d.ts +4 -0
  76. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/{neptune.js → AnyNeptuneResult.js} +1 -1
  77. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/AnyNeptuneResult.js.map +1 -0
  78. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherRequest.d.ts +4 -0
  79. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherRequest.js +3 -0
  80. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherRequest.js.map +1 -0
  81. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherResponse.d.ts +4 -0
  82. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherResponse.js +3 -0
  83. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherResponse.js.map +1 -0
  84. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneGraphEntity.d.ts +4 -0
  85. package/lib/commonjs/{lambdaHandlers/types/QpqWarmLambdaEvent.js → getActionProcessor/core/graphDatabase/stories/types/NeptuneGraphEntity.js} +1 -1
  86. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneGraphEntity.js.map +1 -0
  87. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneNodeResult.d.ts +5 -0
  88. package/lib/commonjs/{runtimeConfig/QPQAWSResourceMap.js → getActionProcessor/core/graphDatabase/stories/types/NeptuneNodeResult.js} +1 -1
  89. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneNodeResult.js.map +1 -0
  90. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneQueryResult.d.ts +4 -0
  91. package/lib/commonjs/{lambdas/lambda-utils/QpqWarmLambdaEvent.js → getActionProcessor/core/graphDatabase/stories/types/NeptuneQueryResult.js} +1 -1
  92. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneQueryResult.js.map +1 -0
  93. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneRelationshipResult.d.ts +7 -0
  94. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneRelationshipResult.js +3 -0
  95. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneRelationshipResult.js.map +1 -0
  96. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneScalarResult.d.ts +1 -0
  97. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneScalarResult.js +3 -0
  98. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/NeptuneScalarResult.js.map +1 -0
  99. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/index.d.ts +8 -1
  100. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/index.js +8 -1
  101. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/index.js.map +1 -1
  102. package/lib/commonjs/getActionProcessor/core/index.d.ts +1 -0
  103. package/lib/commonjs/getActionProcessor/core/index.js +3 -1
  104. package/lib/commonjs/getActionProcessor/core/index.js.map +1 -1
  105. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js +2 -1
  106. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js.map +1 -1
  107. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js +2 -2
  108. package/lib/commonjs/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js.map +1 -1
  109. package/lib/commonjs/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js +13 -12
  110. package/lib/commonjs/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js.map +1 -1
  111. package/lib/commonjs/getActionProcessor/core/system/getDateNow.d.ts +1 -0
  112. package/lib/commonjs/getActionProcessor/core/system/getDateNow.js +8 -0
  113. package/lib/commonjs/getActionProcessor/core/system/getDateNow.js.map +1 -0
  114. package/lib/commonjs/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.d.ts +0 -1
  115. package/lib/commonjs/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.js +4 -5
  116. package/lib/commonjs/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.js.map +1 -1
  117. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryAuthenticateUserActionProcessor.js.map +1 -1
  118. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryCreateUserActionProcessor.js.map +1 -1
  119. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js +1 -1
  120. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js.map +1 -1
  121. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js +1 -1
  122. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js.map +1 -1
  123. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js +4 -1
  124. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js.map +1 -1
  125. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryReadAccessTokenActionProcessor.js +7 -3
  126. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryReadAccessTokenActionProcessor.js.map +1 -1
  127. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js +1 -1
  128. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js.map +1 -1
  129. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js +2 -2
  130. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js.map +1 -1
  131. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js +1 -1
  132. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js.map +1 -1
  133. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js +1 -1
  134. package/lib/commonjs/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js.map +1 -1
  135. package/lib/commonjs/getActionProcessor/index.js +1 -2
  136. package/lib/commonjs/getActionProcessor/index.js.map +1 -1
  137. package/lib/commonjs/getActionProcessor/webserver/index.d.ts +1 -1
  138. package/lib/commonjs/getActionProcessor/webserver/index.js.map +1 -1
  139. package/lib/commonjs/getActionProcessor/webserver/serviceFunction/getServiceFunctionExecuteActionProcessor.js.map +1 -1
  140. package/lib/commonjs/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +2 -2
  141. package/lib/commonjs/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js.map +1 -1
  142. package/lib/commonjs/getLambdaEntries.d.ts +4 -0
  143. package/lib/commonjs/getLambdaEntries.js +7 -1
  144. package/lib/commonjs/getLambdaEntries.js.map +1 -1
  145. package/lib/commonjs/index.d.ts +1 -1
  146. package/lib/commonjs/index.js +4 -3
  147. package/lib/commonjs/index.js.map +1 -1
  148. package/lib/commonjs/lambdaExtensions/logExtensionPort.js +1 -1
  149. package/lib/commonjs/lambdaExtensions/logExtensionPort.js.map +1 -1
  150. package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
  151. package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js +4 -3
  152. package/lib/commonjs/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js.map +1 -1
  153. package/lib/commonjs/lambdaHandlers/getApiGatewayEventHandler.js +2 -4
  154. package/lib/commonjs/lambdaHandlers/getApiGatewayEventHandler.js.map +1 -1
  155. package/lib/commonjs/lambdaHandlers/getApiGatewayEventHandler_redirect.js +8 -4
  156. package/lib/commonjs/lambdaHandlers/getApiGatewayEventHandler_redirect.js.map +1 -1
  157. package/lib/commonjs/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js +2 -6
  158. package/lib/commonjs/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js.map +1 -1
  159. package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js +2 -6
  160. package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js.map +1 -1
  161. package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_viewerRequest.d.ts +0 -19
  162. package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_viewerRequest.js +6 -9
  163. package/lib/commonjs/lambdaHandlers/getCloudFrontRequestEvent_viewerRequest.js.map +1 -1
  164. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_createAuthChallenge.js +2 -6
  165. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_createAuthChallenge.js.map +1 -1
  166. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js +2 -6
  167. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js.map +1 -1
  168. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js +2 -6
  169. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js.map +1 -1
  170. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js +2 -6
  171. package/lib/commonjs/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js.map +1 -1
  172. package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js +3 -7
  173. package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js.map +1 -1
  174. package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_stackDeploy.js +2 -6
  175. package/lib/commonjs/lambdaHandlers/getEventBridgeEvent_stackDeploy.js.map +1 -1
  176. package/lib/commonjs/lambdaHandlers/getS3Event_fileEvent.js +2 -6
  177. package/lib/commonjs/lambdaHandlers/getS3Event_fileEvent.js.map +1 -1
  178. package/lib/commonjs/lambdaHandlers/getSqsEvent_queueEvent.js +2 -6
  179. package/lib/commonjs/lambdaHandlers/getSqsEvent_queueEvent.js.map +1 -1
  180. package/lib/commonjs/lambdaHandlers/helpers/dynamicModuleLoaderWarmer.d.ts +5 -0
  181. package/lib/commonjs/lambdaHandlers/helpers/dynamicModuleLoaderWarmer.js +5 -0
  182. package/lib/commonjs/lambdaHandlers/helpers/dynamicModuleLoaderWarmer.js.map +1 -1
  183. package/lib/commonjs/lambdaHandlers/helpers/getBlankStorySession.d.ts +6 -0
  184. package/lib/commonjs/lambdaHandlers/helpers/getBlankStorySession.js +13 -0
  185. package/lib/commonjs/lambdaHandlers/helpers/getBlankStorySession.js.map +1 -0
  186. package/lib/commonjs/lambdaHandlers/helpers/getLogger.d.ts +8 -0
  187. package/lib/commonjs/lambdaHandlers/helpers/{logger.js → getLogger.js} +22 -31
  188. package/lib/commonjs/lambdaHandlers/helpers/getLogger.js.map +1 -0
  189. package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.d.ts +4 -0
  190. package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js +17 -13
  191. package/lib/commonjs/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js.map +1 -1
  192. package/lib/commonjs/lambdaHandlers/helpers/index.d.ts +3 -1
  193. package/lib/commonjs/lambdaHandlers/helpers/index.js +3 -1
  194. package/lib/commonjs/lambdaHandlers/helpers/index.js.map +1 -1
  195. package/lib/commonjs/lambdaHandlers/helpers/isSnsWarmerRecord.d.ts +6 -0
  196. package/lib/commonjs/lambdaHandlers/helpers/isSnsWarmerRecord.js +23 -0
  197. package/lib/commonjs/lambdaHandlers/helpers/isSnsWarmerRecord.js.map +1 -0
  198. package/lib/commonjs/lambdaHandlers/types/QpqFunctionExecutionEvent.d.ts +7 -0
  199. package/lib/commonjs/lambdaHandlers/types/QpqFunctionExecutionEvent.js +3 -0
  200. package/lib/commonjs/lambdaHandlers/types/QpqFunctionExecutionEvent.js.map +1 -0
  201. package/lib/commonjs/lambdaHandlers/types/index.d.ts +1 -1
  202. package/lib/commonjs/lambdaHandlers/types/index.js +1 -1
  203. package/lib/commonjs/lambdaHandlers/types/index.js.map +1 -1
  204. package/lib/commonjs/lambdas/anyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
  205. package/lib/commonjs/lambdas/cloudFrontRequestEvent_viewerRequest.js +0 -1
  206. package/lib/commonjs/lambdas/cloudFrontRequestEvent_viewerRequest.js.map +1 -1
  207. package/lib/commonjs/lambdas/dynamicModuleLoader/dynamicModuleLoader.js.map +1 -1
  208. package/lib/commonjs/lambdas/dynamicModuleLoader/index.d.ts +0 -1
  209. package/lib/commonjs/lambdas/dynamicModuleLoader/index.js +0 -1
  210. package/lib/commonjs/lambdas/dynamicModuleLoader/index.js.map +1 -1
  211. package/lib/commonjs/lambdas/index.js +4 -0
  212. package/lib/commonjs/lambdas/index.js.map +1 -1
  213. package/lib/commonjs/logic/apiGateway/sendMessageToWebSocketConnection.d.ts +2 -0
  214. package/lib/commonjs/logic/apiGateway/{websocketSendMessage.js → sendMessageToWebSocketConnection.js} +7 -7
  215. package/lib/commonjs/logic/apiGateway/sendMessageToWebSocketConnection.js.map +1 -0
  216. package/lib/commonjs/logic/cache/memoFunc.d.ts +5 -2
  217. package/lib/commonjs/logic/cache/memoFunc.js +3 -5
  218. package/lib/commonjs/logic/cache/memoFunc.js.map +1 -1
  219. package/lib/commonjs/logic/cache/memoFuncAsync.d.ts +5 -2
  220. package/lib/commonjs/logic/cache/memoFuncAsync.js +4 -3
  221. package/lib/commonjs/logic/cache/memoFuncAsync.js.map +1 -1
  222. package/lib/commonjs/logic/cloudFront/invalidateCache.d.ts +0 -1
  223. package/lib/commonjs/logic/cloudFront/invalidateCache.js +7 -10
  224. package/lib/commonjs/logic/cloudFront/invalidateCache.js.map +1 -1
  225. package/lib/commonjs/logic/cloudformation/getExportedValue.d.ts +4 -0
  226. package/lib/commonjs/logic/cloudformation/getExportedValue.js +4 -0
  227. package/lib/commonjs/logic/cloudformation/getExportedValue.js.map +1 -1
  228. package/lib/commonjs/logic/cognito/authenticateUser.d.ts +4 -0
  229. package/lib/commonjs/logic/cognito/authenticateUser.js +8 -3
  230. package/lib/commonjs/logic/cognito/authenticateUser.js.map +1 -1
  231. package/lib/commonjs/logic/cognito/cognitoAttributeMap.d.ts +1 -9
  232. package/lib/commonjs/logic/cognito/cognitoAttributeMap.js +2 -36
  233. package/lib/commonjs/logic/cognito/cognitoAttributeMap.js.map +1 -1
  234. package/lib/commonjs/logic/cognito/confirmForgotPassword.d.ts +4 -0
  235. package/lib/commonjs/logic/cognito/confirmForgotPassword.js +5 -3
  236. package/lib/commonjs/logic/cognito/confirmForgotPassword.js.map +1 -1
  237. package/lib/commonjs/logic/cognito/createUser.d.ts +4 -0
  238. package/lib/commonjs/logic/cognito/createUser.js +9 -6
  239. package/lib/commonjs/logic/cognito/createUser.js.map +1 -1
  240. package/lib/commonjs/logic/cognito/decodeAccessToken.d.ts +11 -0
  241. package/lib/commonjs/logic/cognito/decodeAccessToken.js +24 -5
  242. package/lib/commonjs/logic/cognito/decodeAccessToken.js.map +1 -1
  243. package/lib/commonjs/logic/cognito/decodeValidJwt.d.ts +8 -2
  244. package/lib/commonjs/logic/cognito/decodeValidJwt.js +15 -9
  245. package/lib/commonjs/logic/cognito/decodeValidJwt.js.map +1 -1
  246. package/lib/commonjs/logic/cognito/forgotPassword.js +2 -6
  247. package/lib/commonjs/logic/cognito/forgotPassword.js.map +1 -1
  248. package/lib/commonjs/logic/cognito/getCognitoJwksClient.d.ts +7 -0
  249. package/lib/commonjs/logic/cognito/getCognitoJwksClient.js +15 -0
  250. package/lib/commonjs/logic/cognito/getCognitoJwksClient.js.map +1 -0
  251. package/lib/commonjs/logic/cognito/getCognitoUserAttributesFromQpqUserAttributes.d.ts +8 -0
  252. package/lib/commonjs/logic/cognito/getCognitoUserAttributesFromQpqUserAttributes.js +20 -0
  253. package/lib/commonjs/logic/cognito/getCognitoUserAttributesFromQpqUserAttributes.js.map +1 -0
  254. package/lib/commonjs/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.d.ts +7 -0
  255. package/lib/commonjs/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.js +22 -0
  256. package/lib/commonjs/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.js.map +1 -0
  257. package/lib/commonjs/logic/cognito/getQpqAttributesFromCognitoStringMap.d.ts +6 -0
  258. package/lib/commonjs/logic/cognito/getQpqAttributesFromCognitoStringMap.js +17 -0
  259. package/lib/commonjs/logic/cognito/getQpqAttributesFromCognitoStringMap.js.map +1 -0
  260. package/lib/commonjs/logic/cognito/getQpqAttributesFromCognitoUserAttributes.d.ts +4 -0
  261. package/lib/commonjs/logic/cognito/getQpqAttributesFromCognitoUserAttributes.js +14 -0
  262. package/lib/commonjs/logic/cognito/getQpqAttributesFromCognitoUserAttributes.js.map +1 -0
  263. package/lib/commonjs/logic/cognito/getUserAttributes.js +5 -7
  264. package/lib/commonjs/logic/cognito/getUserAttributes.js.map +1 -1
  265. package/lib/commonjs/logic/cognito/getUserAttributesBySub.js +19 -4
  266. package/lib/commonjs/logic/cognito/getUserAttributesBySub.js.map +1 -1
  267. package/lib/commonjs/logic/cognito/getUserPoolClientSecret.d.ts +8 -0
  268. package/lib/commonjs/logic/cognito/getUserPoolClientSecret.js +20 -5
  269. package/lib/commonjs/logic/cognito/getUserPoolClientSecret.js.map +1 -1
  270. package/lib/commonjs/logic/cognito/index.js +3 -0
  271. package/lib/commonjs/logic/cognito/index.js.map +1 -1
  272. package/lib/commonjs/logic/cognito/listPagedUsers.js +2 -6
  273. package/lib/commonjs/logic/cognito/listPagedUsers.js.map +1 -1
  274. package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.d.ts +5 -0
  275. package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.js +8 -7
  276. package/lib/commonjs/logic/cognito/listPagedUsersByAttribute.js.map +1 -1
  277. package/lib/commonjs/logic/cognito/refreshToken.js +9 -8
  278. package/lib/commonjs/logic/cognito/refreshToken.js.map +1 -1
  279. package/lib/commonjs/logic/cognito/requestEmailVerificationCode.js +3 -8
  280. package/lib/commonjs/logic/cognito/requestEmailVerificationCode.js.map +1 -1
  281. package/lib/commonjs/logic/cognito/resolveUsernameByPreferredUsername.d.ts +5 -0
  282. package/lib/commonjs/logic/cognito/resolveUsernameByPreferredUsername.js +26 -3
  283. package/lib/commonjs/logic/cognito/resolveUsernameByPreferredUsername.js.map +1 -1
  284. package/lib/commonjs/logic/cognito/respondToAuthChallenge.d.ts +8 -0
  285. package/lib/commonjs/logic/cognito/{respondToAuthChallengeChallenge.js → respondToAuthChallenge.js} +13 -7
  286. package/lib/commonjs/logic/cognito/respondToAuthChallenge.js.map +1 -0
  287. package/lib/commonjs/logic/cognito/setUserAttributes.js +5 -5
  288. package/lib/commonjs/logic/cognito/setUserAttributes.js.map +1 -1
  289. package/lib/commonjs/logic/cognito/setUserPassword.js +2 -1
  290. package/lib/commonjs/logic/cognito/setUserPassword.js.map +1 -1
  291. package/lib/commonjs/logic/cognito/utils/CognitoUserAttribute.d.ts +5 -0
  292. package/lib/commonjs/logic/cognito/utils/CognitoUserAttribute.js +3 -0
  293. package/lib/commonjs/logic/cognito/utils/CognitoUserAttribute.js.map +1 -0
  294. package/lib/commonjs/logic/cognito/utils/buildCognitoUserFilter.d.ts +10 -0
  295. package/lib/commonjs/logic/cognito/utils/buildCognitoUserFilter.js +34 -0
  296. package/lib/commonjs/logic/cognito/utils/buildCognitoUserFilter.js.map +1 -0
  297. package/lib/commonjs/logic/cognito/utils/calculateSecretHash.d.ts +5 -0
  298. package/lib/commonjs/logic/cognito/utils/calculateSecretHash.js +6 -6
  299. package/lib/commonjs/logic/cognito/utils/calculateSecretHash.js.map +1 -1
  300. package/lib/commonjs/logic/cognito/utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo.d.ts +8 -0
  301. package/lib/commonjs/logic/cognito/utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo.js +23 -0
  302. package/lib/commonjs/logic/cognito/utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo.js.map +1 -0
  303. package/lib/commonjs/logic/cognito/utils/cognitoAuthenticationResultTypeToQpqAuthenticationInfo.d.ts +7 -0
  304. package/lib/commonjs/logic/cognito/utils/cognitoAuthenticationResultTypeToQpqAuthenticationInfo.js +22 -0
  305. package/lib/commonjs/logic/cognito/utils/cognitoAuthenticationResultTypeToQpqAuthenticationInfo.js.map +1 -0
  306. package/lib/commonjs/logic/cognito/utils/cognitoChallengeNameTypeToQpqAuthenticateUserChallenge.d.ts +9 -0
  307. package/lib/commonjs/logic/cognito/utils/cognitoChallengeNameTypeToQpqAuthenticateUserChallenge.js +27 -0
  308. package/lib/commonjs/logic/cognito/utils/cognitoChallengeNameTypeToQpqAuthenticateUserChallenge.js.map +1 -0
  309. package/lib/commonjs/logic/cognito/utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails.d.ts +7 -0
  310. package/lib/commonjs/logic/cognito/utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails.js +14 -0
  311. package/lib/commonjs/logic/cognito/utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails.js.map +1 -0
  312. package/lib/commonjs/logic/cognito/utils/getValidCognitoUserAttributes.d.ts +7 -0
  313. package/lib/commonjs/logic/cognito/utils/getValidCognitoUserAttributes.js +10 -0
  314. package/lib/commonjs/logic/cognito/utils/getValidCognitoUserAttributes.js.map +1 -0
  315. package/lib/commonjs/logic/cognito/utils/index.d.ts +7 -1
  316. package/lib/commonjs/logic/cognito/utils/index.js +7 -1
  317. package/lib/commonjs/logic/cognito/utils/index.js.map +1 -1
  318. package/lib/commonjs/logic/cognito/utils/pageKeyToPaginationToken.d.ts +5 -0
  319. package/lib/commonjs/logic/cognito/utils/pageKeyToPaginationToken.js +5 -0
  320. package/lib/commonjs/logic/cognito/utils/pageKeyToPaginationToken.js.map +1 -1
  321. package/lib/commonjs/logic/cognito/utils/paginationTokenToPageKey.d.ts +5 -0
  322. package/lib/commonjs/logic/cognito/utils/paginationTokenToPageKey.js +5 -0
  323. package/lib/commonjs/logic/cognito/utils/paginationTokenToPageKey.js.map +1 -1
  324. package/lib/commonjs/logic/cognito/verifyUserEmail.d.ts +1 -0
  325. package/lib/commonjs/logic/cognito/verifyUserEmail.js +1 -0
  326. package/lib/commonjs/logic/cognito/verifyUserEmail.js.map +1 -1
  327. package/lib/commonjs/logic/createAwsClient.d.ts +6 -3
  328. package/lib/commonjs/logic/createAwsClient.js +7 -6
  329. package/lib/commonjs/logic/createAwsClient.js.map +1 -1
  330. package/lib/commonjs/logic/dynamo/convertDynamoMapToObject.d.ts +7 -0
  331. package/lib/commonjs/logic/dynamo/convertDynamoMapToObject.js +35 -0
  332. package/lib/commonjs/logic/dynamo/convertDynamoMapToObject.js.map +1 -0
  333. package/lib/commonjs/logic/dynamo/deleteItem.js +4 -10
  334. package/lib/commonjs/logic/dynamo/deleteItem.js.map +1 -1
  335. package/lib/commonjs/logic/dynamo/getAllItems.d.ts +2 -1
  336. package/lib/commonjs/logic/dynamo/getAllItems.js +5 -10
  337. package/lib/commonjs/logic/dynamo/getAllItems.js.map +1 -1
  338. package/lib/commonjs/logic/dynamo/getItem.d.ts +2 -2
  339. package/lib/commonjs/logic/dynamo/getItem.js +6 -18
  340. package/lib/commonjs/logic/dynamo/getItem.js.map +1 -1
  341. package/lib/commonjs/logic/dynamo/index.d.ts +2 -0
  342. package/lib/commonjs/logic/dynamo/index.js +2 -0
  343. package/lib/commonjs/logic/dynamo/index.js.map +1 -1
  344. package/lib/commonjs/logic/dynamo/putItem.d.ts +4 -4
  345. package/lib/commonjs/logic/dynamo/putItem.js +3 -20
  346. package/lib/commonjs/logic/dynamo/putItem.js.map +1 -1
  347. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildAttributeValue.d.ts +8 -0
  348. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildAttributeValue.js +40 -0
  349. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildAttributeValue.js.map +1 -0
  350. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQueryExpression.d.ts +9 -0
  351. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQueryExpression.js +84 -0
  352. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQueryExpression.js.map +1 -0
  353. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdateExpression.d.ts +9 -0
  354. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdateExpression.js +107 -0
  355. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdateExpression.js.map +1 -0
  356. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeNames.d.ts +7 -0
  357. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeNames.js +24 -0
  358. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeNames.js.map +1 -0
  359. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeValues.d.ts +8 -0
  360. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeValues.js +39 -0
  361. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeValues.js.map +1 -0
  362. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeNames.d.ts +7 -0
  363. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeNames.js +23 -0
  364. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeNames.js.map +1 -0
  365. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeValues.d.ts +9 -0
  366. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeValues.js +25 -0
  367. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeValues.js.map +1 -0
  368. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/flattenKvsQueryConditions.d.ts +3 -0
  369. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/flattenKvsQueryConditions.js +17 -0
  370. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/flattenKvsQueryConditions.js.map +1 -0
  371. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.d.ts +7 -2
  372. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.js +13 -22
  373. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.js.map +1 -1
  374. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getHash.d.ts +7 -0
  375. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getHash.js +18 -0
  376. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getHash.js.map +1 -0
  377. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getItemName.d.ts +6 -0
  378. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getItemName.js +14 -0
  379. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getItemName.js.map +1 -0
  380. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getValueName.d.ts +7 -0
  381. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getValueName.js +14 -0
  382. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/getValueName.js.map +1 -0
  383. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/index.d.ts +13 -2
  384. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/index.js +13 -2
  385. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/index.js.map +1 -1
  386. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/isKvsLogicalOperator.d.ts +2 -0
  387. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/isKvsLogicalOperator.js +8 -0
  388. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/isKvsLogicalOperator.js.map +1 -0
  389. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/isKvsQueryCondition.d.ts +2 -0
  390. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/isKvsQueryCondition.js +8 -0
  391. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/isKvsQueryCondition.js.map +1 -0
  392. package/lib/commonjs/logic/dynamo/query.js +6 -10
  393. package/lib/commonjs/logic/dynamo/query.js.map +1 -1
  394. package/lib/commonjs/logic/dynamo/scan.js +6 -10
  395. package/lib/commonjs/logic/dynamo/scan.js.map +1 -1
  396. package/lib/commonjs/logic/dynamo/updateItem.d.ts +2 -1
  397. package/lib/commonjs/logic/dynamo/updateItem.js +8 -12
  398. package/lib/commonjs/logic/dynamo/updateItem.js.map +1 -1
  399. package/lib/commonjs/logic/dynamo/utils/buildDynamoKey.d.ts +8 -0
  400. package/lib/commonjs/logic/dynamo/utils/buildDynamoKey.js +20 -0
  401. package/lib/commonjs/logic/dynamo/utils/buildDynamoKey.js.map +1 -0
  402. package/lib/commonjs/logic/dynamo/{logs/utils → utils}/index.d.ts +2 -0
  403. package/lib/commonjs/logic/dynamo/{logs/utils → utils}/index.js +2 -0
  404. package/lib/commonjs/logic/dynamo/utils/index.js.map +1 -0
  405. package/lib/commonjs/logic/dynamo/utils/itemsToQpqPagedData.d.ts +3 -1
  406. package/lib/commonjs/logic/dynamo/utils/itemsToQpqPagedData.js +3 -2
  407. package/lib/commonjs/logic/dynamo/utils/itemsToQpqPagedData.js.map +1 -1
  408. package/lib/commonjs/logic/dynamo/utils/lastEvaluatedKeyToString.d.ts +3 -0
  409. package/lib/commonjs/logic/dynamo/{logs/utils → utils}/lastEvaluatedKeyToString.js +1 -0
  410. package/lib/commonjs/logic/dynamo/utils/lastEvaluatedKeyToString.js.map +1 -0
  411. package/lib/commonjs/logic/dynamo/utils/stringToLastEvaluatedKey.d.ts +8 -0
  412. package/lib/commonjs/logic/dynamo/utils/stringToLastEvaluatedKey.js +13 -0
  413. package/lib/commonjs/logic/dynamo/utils/stringToLastEvaluatedKey.js.map +1 -0
  414. package/lib/commonjs/logic/federatedModuleStore/FederatedModuleStoreManifest.d.ts +2 -2
  415. package/lib/commonjs/logic/federatedModuleStore/FederatedModuleStoreManifest.js.map +1 -1
  416. package/lib/commonjs/logic/federatedModuleStore/loadFederatedStory.d.ts +1 -1
  417. package/lib/commonjs/logic/federatedModuleStore/loadFederatedStory.js.map +1 -1
  418. package/lib/commonjs/logic/federatedModuleStore/sharedPackages.js +1 -1
  419. package/lib/commonjs/logic/federatedModuleStore/sharedPackages.js.map +1 -1
  420. package/lib/commonjs/logic/kms/decryptDataKey.d.ts +2 -0
  421. package/lib/commonjs/logic/kms/decryptDataKey.js +33 -0
  422. package/lib/commonjs/logic/kms/decryptDataKey.js.map +1 -0
  423. package/lib/commonjs/logic/kms/generateDataKey.d.ts +3 -0
  424. package/lib/commonjs/logic/kms/generateDataKey.js +34 -0
  425. package/lib/commonjs/logic/kms/generateDataKey.js.map +1 -0
  426. package/lib/commonjs/logic/kms/getCachedGeneratedDataKey.d.ts +3 -0
  427. package/lib/commonjs/logic/kms/getCachedGeneratedDataKey.js +37 -0
  428. package/lib/commonjs/logic/kms/getCachedGeneratedDataKey.js.map +1 -0
  429. package/lib/commonjs/logic/kms/getCachedUnwrappedDataKey.d.ts +2 -0
  430. package/lib/commonjs/logic/kms/getCachedUnwrappedDataKey.js +37 -0
  431. package/lib/commonjs/logic/kms/getCachedUnwrappedDataKey.js.map +1 -0
  432. package/lib/commonjs/logic/kms/toKmsEncryptionContext.d.ts +2 -0
  433. package/lib/commonjs/logic/kms/toKmsEncryptionContext.js +10 -0
  434. package/lib/commonjs/logic/kms/toKmsEncryptionContext.js.map +1 -0
  435. package/lib/commonjs/logic/lambda/executeLambdaByName.d.ts +5 -1
  436. package/lib/commonjs/logic/lambda/executeLambdaByName.js +6 -3
  437. package/lib/commonjs/logic/lambda/executeLambdaByName.js.map +1 -1
  438. package/lib/commonjs/logic/neptune/getNeptuneEndpoints.js +8 -6
  439. package/lib/commonjs/logic/neptune/getNeptuneEndpoints.js.map +1 -1
  440. package/lib/commonjs/logic/parametersManager/getParameters.js +2 -1
  441. package/lib/commonjs/logic/parametersManager/getParameters.js.map +1 -1
  442. package/lib/commonjs/logic/s3/deleteFiles.d.ts +1 -0
  443. package/lib/commonjs/logic/s3/deleteFiles.js +16 -9
  444. package/lib/commonjs/logic/s3/deleteFiles.js.map +1 -1
  445. package/lib/commonjs/logic/s3/generatePresignedUploadUrl.d.ts +1 -0
  446. package/lib/commonjs/logic/s3/generatePresignedUploadUrl.js +2 -31
  447. package/lib/commonjs/logic/s3/generatePresignedUploadUrl.js.map +1 -1
  448. package/lib/commonjs/logic/s3/generatePresignedUrl.d.ts +1 -0
  449. package/lib/commonjs/logic/s3/generatePresignedUrl.js +4 -11
  450. package/lib/commonjs/logic/s3/generatePresignedUrl.js.map +1 -1
  451. package/lib/commonjs/logic/s3/listFiles.d.ts +5 -4
  452. package/lib/commonjs/logic/s3/listFiles.js +20 -27
  453. package/lib/commonjs/logic/s3/listFiles.js.map +1 -1
  454. package/lib/commonjs/logic/s3/s3Utils.d.ts +3 -0
  455. package/lib/commonjs/logic/s3/s3Utils.js +5 -0
  456. package/lib/commonjs/logic/s3/s3Utils.js.map +1 -1
  457. package/lib/commonjs/logic/secretsManager/getSecret.js +2 -3
  458. package/lib/commonjs/logic/secretsManager/getSecret.js.map +1 -1
  459. package/lib/commonjs/logic/sns/publishMessage.d.ts +7 -2
  460. package/lib/commonjs/logic/sns/publishMessage.js +11 -11
  461. package/lib/commonjs/logic/sns/publishMessage.js.map +1 -1
  462. package/lib/commonjs/logic/sqs/sendMessages.d.ts +7 -2
  463. package/lib/commonjs/logic/sqs/sendMessages.js +9 -8
  464. package/lib/commonjs/logic/sqs/sendMessages.js.map +1 -1
  465. package/lib/commonjs/runtimeConfig/LambdaRuntimeConfig.d.ts +9 -0
  466. package/lib/commonjs/runtimeConfig/LambdaRuntimeConfig.js +3 -0
  467. package/lib/commonjs/runtimeConfig/LambdaRuntimeConfig.js.map +1 -0
  468. package/lib/commonjs/runtimeConfig/index.d.ts +2 -0
  469. package/lib/commonjs/{logic/dynamo/logs → runtimeConfig}/index.js +2 -1
  470. package/lib/commonjs/runtimeConfig/index.js.map +1 -0
  471. package/lib/commonjs/runtimeConfig/resolveParameterKey.d.ts +7 -0
  472. package/lib/commonjs/runtimeConfig/resolveParameterKey.js +17 -0
  473. package/lib/commonjs/runtimeConfig/resolveParameterKey.js.map +1 -0
  474. package/lib/esm/awsLambdaUtils.d.ts +6 -4
  475. package/lib/esm/awsLambdaUtils.js +2 -2
  476. package/lib/esm/awsLambdaUtils.js.map +1 -1
  477. package/lib/esm/awsNamingUtils.d.ts +2 -2
  478. package/lib/esm/awsNamingUtils.js +53 -100
  479. package/lib/esm/awsNamingUtils.js.map +1 -1
  480. package/lib/esm/getActionProcessor/core/ai/getAiPromptActionProcessor.js +2 -2
  481. package/lib/esm/getActionProcessor/core/ai/getAiPromptActionProcessor.js.map +1 -1
  482. package/lib/esm/getActionProcessor/core/ai/getAiPromptStreamActionProcessor.js +6 -6
  483. package/lib/esm/getActionProcessor/core/ai/getAiPromptStreamActionProcessor.js.map +1 -1
  484. package/lib/esm/getActionProcessor/core/ai/logic/prepareAiPromptCall.d.ts +4 -3
  485. package/lib/esm/getActionProcessor/core/ai/logic/prepareAiPromptCall.js.map +1 -1
  486. package/lib/esm/getActionProcessor/core/ai/logic/toCacheableMessages.js +1 -1
  487. package/lib/esm/getActionProcessor/core/ai/logic/toCacheableMessages.js.map +1 -1
  488. package/lib/esm/getActionProcessor/core/apiKeyValidation/getApiKeyValidationValidateActionProcessor.js +8 -7
  489. package/lib/esm/getActionProcessor/core/apiKeyValidation/getApiKeyValidationValidateActionProcessor.js.map +1 -1
  490. package/lib/esm/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js +1 -1
  491. package/lib/esm/getActionProcessor/core/config/getConfigGetParameterActionProcessor.js.map +1 -1
  492. package/lib/esm/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js +1 -1
  493. package/lib/esm/getActionProcessor/core/config/getConfigGetParametersActionProcessor.js.map +1 -1
  494. package/lib/esm/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js +1 -1
  495. package/lib/esm/getActionProcessor/core/config/getConfigSetParameterActionProcessor.js.map +1 -1
  496. package/lib/esm/getActionProcessor/core/crypto/getCryptoDecryptActionProcessor.d.ts +2 -0
  497. package/lib/esm/getActionProcessor/core/crypto/getCryptoDecryptActionProcessor.js +38 -0
  498. package/lib/esm/getActionProcessor/core/crypto/getCryptoDecryptActionProcessor.js.map +1 -0
  499. package/lib/esm/getActionProcessor/core/crypto/getCryptoEncryptActionProcessor.d.ts +2 -0
  500. package/lib/esm/getActionProcessor/core/crypto/getCryptoEncryptActionProcessor.js +30 -0
  501. package/lib/esm/getActionProcessor/core/crypto/getCryptoEncryptActionProcessor.js.map +1 -0
  502. package/lib/esm/getActionProcessor/core/crypto/index.d.ts +2 -0
  503. package/lib/esm/getActionProcessor/core/crypto/index.js +7 -0
  504. package/lib/esm/getActionProcessor/core/crypto/index.js.map +1 -0
  505. package/lib/esm/getActionProcessor/core/crypto/utils/createKmsDataKeyProvider.d.ts +2 -0
  506. package/lib/esm/getActionProcessor/core/crypto/utils/createKmsDataKeyProvider.js +7 -0
  507. package/lib/esm/getActionProcessor/core/crypto/utils/createKmsDataKeyProvider.js.map +1 -0
  508. package/lib/esm/getActionProcessor/core/crypto/utils/index.d.ts +2 -0
  509. package/lib/esm/getActionProcessor/core/crypto/utils/index.js +3 -0
  510. package/lib/esm/getActionProcessor/core/crypto/utils/index.js.map +1 -0
  511. package/lib/esm/getActionProcessor/core/crypto/utils/resolveCryptoKeyAlias.d.ts +2 -0
  512. package/lib/esm/getActionProcessor/core/crypto/utils/resolveCryptoKeyAlias.js +14 -0
  513. package/lib/esm/getActionProcessor/core/crypto/utils/resolveCryptoKeyAlias.js.map +1 -0
  514. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
  515. package/lib/esm/getActionProcessor/core/event/cognito/createAuthChallenge/getEventGetRecordsActionProcessor.js.map +1 -1
  516. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
  517. package/lib/esm/getActionProcessor/core/event/cognito/defineAuthChallenge/getEventGetRecordsActionProcessor.js.map +1 -1
  518. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetRecordsActionProcessor.js +1 -1
  519. package/lib/esm/getActionProcessor/core/event/cognito/verifyAuthChallenge/getEventGetRecordsActionProcessor.js.map +1 -1
  520. package/lib/esm/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getEventMatchStoryActionProcessor.js.map +1 -1
  521. package/lib/esm/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +20 -17
  522. package/lib/esm/getActionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js.map +1 -1
  523. package/lib/esm/getActionProcessor/core/file/getFileDeleteActionProcessor.js +4 -8
  524. package/lib/esm/getActionProcessor/core/file/getFileDeleteActionProcessor.js.map +1 -1
  525. package/lib/esm/getActionProcessor/core/file/getFileExistsActionProcessor.js +1 -1
  526. package/lib/esm/getActionProcessor/core/file/getFileExistsActionProcessor.js.map +1 -1
  527. package/lib/esm/getActionProcessor/core/file/getFileIsColdStorageActionProcessor.js +2 -1
  528. package/lib/esm/getActionProcessor/core/file/getFileIsColdStorageActionProcessor.js.map +1 -1
  529. package/lib/esm/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +2 -1
  530. package/lib/esm/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js.map +1 -1
  531. package/lib/esm/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js +2 -1
  532. package/lib/esm/getActionProcessor/core/file/getFileWriteBinaryContentsActionProcessor.js.map +1 -1
  533. package/lib/esm/getActionProcessor/core/file/getFileWriteObjectJsonActionProcessor.js +2 -1
  534. package/lib/esm/getActionProcessor/core/file/getFileWriteObjectJsonActionProcessor.js.map +1 -1
  535. package/lib/esm/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +2 -1
  536. package/lib/esm/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js.map +1 -1
  537. package/lib/esm/getActionProcessor/core/file/utils/StorageDriveNotFoundError.d.ts +3 -0
  538. package/lib/esm/getActionProcessor/core/file/utils/StorageDriveNotFoundError.js +10 -0
  539. package/lib/esm/getActionProcessor/core/file/utils/StorageDriveNotFoundError.js.map +1 -0
  540. package/lib/esm/getActionProcessor/core/file/utils/index.d.ts +1 -0
  541. package/lib/esm/getActionProcessor/core/file/utils/index.js +1 -0
  542. package/lib/esm/getActionProcessor/core/file/utils/index.js.map +1 -1
  543. package/lib/esm/getActionProcessor/core/file/utils/resolveStorageDriveBucketName.d.ts +5 -0
  544. package/lib/esm/getActionProcessor/core/file/utils/resolveStorageDriveBucketName.js +7 -1
  545. package/lib/esm/getActionProcessor/core/file/utils/resolveStorageDriveBucketName.js.map +1 -1
  546. package/lib/esm/getActionProcessor/core/graphDatabase/stories/converters/askConvertNeptuneQueryResultToGraphQueryResult.js +1 -1
  547. package/lib/esm/getActionProcessor/core/graphDatabase/stories/converters/askConvertNeptuneQueryResultToGraphQueryResult.js.map +1 -1
  548. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/AnyNeptuneResult.d.ts +4 -0
  549. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/AnyNeptuneResult.js +2 -0
  550. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/AnyNeptuneResult.js.map +1 -0
  551. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherRequest.d.ts +4 -0
  552. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherRequest.js +2 -0
  553. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherRequest.js.map +1 -0
  554. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherResponse.d.ts +4 -0
  555. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherResponse.js +2 -0
  556. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneCypherResponse.js.map +1 -0
  557. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneGraphEntity.d.ts +4 -0
  558. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneGraphEntity.js +2 -0
  559. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneGraphEntity.js.map +1 -0
  560. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneNodeResult.d.ts +5 -0
  561. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneNodeResult.js +2 -0
  562. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneNodeResult.js.map +1 -0
  563. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneQueryResult.d.ts +4 -0
  564. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneQueryResult.js +2 -0
  565. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneQueryResult.js.map +1 -0
  566. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneRelationshipResult.d.ts +7 -0
  567. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneRelationshipResult.js +2 -0
  568. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneRelationshipResult.js.map +1 -0
  569. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneScalarResult.d.ts +1 -0
  570. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneScalarResult.js +2 -0
  571. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/NeptuneScalarResult.js.map +1 -0
  572. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/index.d.ts +8 -1
  573. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/index.js +8 -1
  574. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/index.js.map +1 -1
  575. package/lib/esm/getActionProcessor/core/index.d.ts +1 -0
  576. package/lib/esm/getActionProcessor/core/index.js +3 -0
  577. package/lib/esm/getActionProcessor/core/index.js.map +1 -1
  578. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js +1 -1
  579. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreQueryActionProcessor.js.map +1 -1
  580. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js +1 -1
  581. package/lib/esm/getActionProcessor/core/keyValueStore/getKeyValueStoreScanActionProcessor.js.map +1 -1
  582. package/lib/esm/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js +20 -19
  583. package/lib/esm/getActionProcessor/core/queue/getQueueSendMessageActionProcessor.js.map +1 -1
  584. package/lib/esm/getActionProcessor/core/system/getDateNow.d.ts +1 -0
  585. package/lib/esm/getActionProcessor/core/system/getDateNow.js +4 -0
  586. package/lib/esm/getActionProcessor/core/system/getDateNow.js.map +1 -0
  587. package/lib/esm/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.d.ts +0 -1
  588. package/lib/esm/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.js +2 -2
  589. package/lib/esm/getActionProcessor/core/system/getSystemExecuteStoryActionProcessor.js.map +1 -1
  590. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryAuthenticateUserActionProcessor.js.map +1 -1
  591. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryCreateUserActionProcessor.js.map +1 -1
  592. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js +1 -1
  593. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUserAttributesByUserIdActionProcessor.js.map +1 -1
  594. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js +1 -1
  595. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersActionProcessor.js.map +1 -1
  596. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js +4 -1
  597. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryGetUsersByAttributeActionProcessor.js.map +1 -1
  598. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryReadAccessTokenActionProcessor.js +7 -3
  599. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryReadAccessTokenActionProcessor.js.map +1 -1
  600. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js +1 -1
  601. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRefreshTokenActionProcessor.js.map +1 -1
  602. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js +2 -2
  603. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectoryRespondToAuthChallengeActionProcessor.js.map +1 -1
  604. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js +1 -1
  605. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetPasswordActionProcessor.js.map +1 -1
  606. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js +1 -1
  607. package/lib/esm/getActionProcessor/core/userDirectory/getUserDirectorySetUserAttributesActionProcessor.js.map +1 -1
  608. package/lib/esm/getActionProcessor/index.js +8 -9
  609. package/lib/esm/getActionProcessor/index.js.map +1 -1
  610. package/lib/esm/getActionProcessor/webserver/index.d.ts +1 -1
  611. package/lib/esm/getActionProcessor/webserver/index.js.map +1 -1
  612. package/lib/esm/getActionProcessor/webserver/serviceFunction/getServiceFunctionExecuteActionProcessor.js.map +1 -1
  613. package/lib/esm/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +1 -1
  614. package/lib/esm/getActionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js.map +1 -1
  615. package/lib/esm/getLambdaEntries.d.ts +4 -0
  616. package/lib/esm/getLambdaEntries.js +7 -4
  617. package/lib/esm/getLambdaEntries.js.map +1 -1
  618. package/lib/esm/index.d.ts +1 -1
  619. package/lib/esm/index.js +4 -3
  620. package/lib/esm/index.js.map +1 -1
  621. package/lib/esm/lambdaExtensions/logExtensionPort.js +1 -1
  622. package/lib/esm/lambdaExtensions/logExtensionPort.js.map +1 -1
  623. package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
  624. package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js +4 -3
  625. package/lib/esm/lambdaHandlers/getAnyExecuteServiceFunctionEvent_serviceFunction.js.map +1 -1
  626. package/lib/esm/lambdaHandlers/getApiGatewayEventHandler.js +2 -4
  627. package/lib/esm/lambdaHandlers/getApiGatewayEventHandler.js.map +1 -1
  628. package/lib/esm/lambdaHandlers/getApiGatewayEventHandler_redirect.js +8 -4
  629. package/lib/esm/lambdaHandlers/getApiGatewayEventHandler_redirect.js.map +1 -1
  630. package/lib/esm/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js +2 -6
  631. package/lib/esm/lambdaHandlers/getApiGatwayEventWebsocketWithIdentity_websocketEvent.js.map +1 -1
  632. package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js +2 -6
  633. package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_originRequest.js.map +1 -1
  634. package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_viewerRequest.d.ts +0 -19
  635. package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_viewerRequest.js +5 -7
  636. package/lib/esm/lambdaHandlers/getCloudFrontRequestEvent_viewerRequest.js.map +1 -1
  637. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_createAuthChallenge.js +2 -6
  638. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_createAuthChallenge.js.map +1 -1
  639. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js +2 -6
  640. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_customMessage.js.map +1 -1
  641. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js +2 -6
  642. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_defineAuthChallenge.js.map +1 -1
  643. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js +2 -6
  644. package/lib/esm/lambdaHandlers/getCustomMessageTriggerEvent_verifyAuthChallenge.js.map +1 -1
  645. package/lib/esm/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js +3 -7
  646. package/lib/esm/lambdaHandlers/getEventBridgeEvent_recurringSchedule.js.map +1 -1
  647. package/lib/esm/lambdaHandlers/getEventBridgeEvent_stackDeploy.js +2 -6
  648. package/lib/esm/lambdaHandlers/getEventBridgeEvent_stackDeploy.js.map +1 -1
  649. package/lib/esm/lambdaHandlers/getS3Event_fileEvent.js +2 -6
  650. package/lib/esm/lambdaHandlers/getS3Event_fileEvent.js.map +1 -1
  651. package/lib/esm/lambdaHandlers/getSqsEvent_queueEvent.js +3 -7
  652. package/lib/esm/lambdaHandlers/getSqsEvent_queueEvent.js.map +1 -1
  653. package/lib/esm/lambdaHandlers/helpers/dynamicModuleLoaderWarmer.d.ts +5 -0
  654. package/lib/esm/lambdaHandlers/helpers/dynamicModuleLoaderWarmer.js +5 -0
  655. package/lib/esm/lambdaHandlers/helpers/dynamicModuleLoaderWarmer.js.map +1 -1
  656. package/lib/esm/lambdaHandlers/helpers/getBlankStorySession.d.ts +6 -0
  657. package/lib/esm/lambdaHandlers/helpers/getBlankStorySession.js +9 -0
  658. package/lib/esm/lambdaHandlers/helpers/getBlankStorySession.js.map +1 -0
  659. package/lib/esm/lambdaHandlers/helpers/getLogger.d.ts +8 -0
  660. package/lib/esm/lambdaHandlers/helpers/{logger.js → getLogger.js} +21 -25
  661. package/lib/esm/lambdaHandlers/helpers/getLogger.js.map +1 -0
  662. package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.d.ts +4 -0
  663. package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js +19 -15
  664. package/lib/esm/lambdaHandlers/helpers/getQpqLambdaRuntimeForEvent.js.map +1 -1
  665. package/lib/esm/lambdaHandlers/helpers/index.d.ts +3 -1
  666. package/lib/esm/lambdaHandlers/helpers/index.js +3 -1
  667. package/lib/esm/lambdaHandlers/helpers/index.js.map +1 -1
  668. package/lib/esm/lambdaHandlers/helpers/isSnsWarmerRecord.d.ts +6 -0
  669. package/lib/esm/lambdaHandlers/helpers/isSnsWarmerRecord.js +19 -0
  670. package/lib/esm/lambdaHandlers/helpers/isSnsWarmerRecord.js.map +1 -0
  671. package/lib/esm/lambdaHandlers/types/QpqFunctionExecutionEvent.d.ts +7 -0
  672. package/lib/esm/lambdaHandlers/types/QpqFunctionExecutionEvent.js +2 -0
  673. package/lib/esm/lambdaHandlers/types/QpqFunctionExecutionEvent.js.map +1 -0
  674. package/lib/esm/lambdaHandlers/types/index.d.ts +1 -1
  675. package/lib/esm/lambdaHandlers/types/index.js +1 -1
  676. package/lib/esm/lambdaHandlers/types/index.js.map +1 -1
  677. package/lib/esm/lambdas/anyExecuteServiceFunctionEvent_serviceFunction.d.ts +1 -1
  678. package/lib/esm/lambdas/cloudFrontRequestEvent_viewerRequest.js +0 -1
  679. package/lib/esm/lambdas/cloudFrontRequestEvent_viewerRequest.js.map +1 -1
  680. package/lib/esm/lambdas/dynamicModuleLoader/dynamicModuleLoader.js.map +1 -1
  681. package/lib/esm/lambdas/dynamicModuleLoader/index.d.ts +0 -1
  682. package/lib/esm/lambdas/dynamicModuleLoader/index.js +0 -1
  683. package/lib/esm/lambdas/dynamicModuleLoader/index.js.map +1 -1
  684. package/lib/esm/lambdas/index.js +4 -0
  685. package/lib/esm/lambdas/index.js.map +1 -1
  686. package/lib/esm/logic/apiGateway/sendMessageToWebSocketConnection.d.ts +2 -0
  687. package/lib/esm/logic/apiGateway/{websocketSendMessage.js → sendMessageToWebSocketConnection.js} +7 -7
  688. package/lib/esm/logic/apiGateway/sendMessageToWebSocketConnection.js.map +1 -0
  689. package/lib/esm/logic/cache/memoFunc.d.ts +5 -2
  690. package/lib/esm/logic/cache/memoFunc.js +3 -5
  691. package/lib/esm/logic/cache/memoFunc.js.map +1 -1
  692. package/lib/esm/logic/cache/memoFuncAsync.d.ts +5 -2
  693. package/lib/esm/logic/cache/memoFuncAsync.js +4 -3
  694. package/lib/esm/logic/cache/memoFuncAsync.js.map +1 -1
  695. package/lib/esm/logic/cloudFront/invalidateCache.d.ts +0 -1
  696. package/lib/esm/logic/cloudFront/invalidateCache.js +6 -8
  697. package/lib/esm/logic/cloudFront/invalidateCache.js.map +1 -1
  698. package/lib/esm/logic/cloudformation/getExportedValue.d.ts +4 -0
  699. package/lib/esm/logic/cloudformation/getExportedValue.js +4 -0
  700. package/lib/esm/logic/cloudformation/getExportedValue.js.map +1 -1
  701. package/lib/esm/logic/cognito/authenticateUser.d.ts +4 -0
  702. package/lib/esm/logic/cognito/authenticateUser.js +7 -2
  703. package/lib/esm/logic/cognito/authenticateUser.js.map +1 -1
  704. package/lib/esm/logic/cognito/cognitoAttributeMap.d.ts +1 -9
  705. package/lib/esm/logic/cognito/cognitoAttributeMap.js +1 -38
  706. package/lib/esm/logic/cognito/cognitoAttributeMap.js.map +1 -1
  707. package/lib/esm/logic/cognito/confirmForgotPassword.d.ts +4 -0
  708. package/lib/esm/logic/cognito/confirmForgotPassword.js +5 -3
  709. package/lib/esm/logic/cognito/confirmForgotPassword.js.map +1 -1
  710. package/lib/esm/logic/cognito/createUser.d.ts +4 -0
  711. package/lib/esm/logic/cognito/createUser.js +8 -5
  712. package/lib/esm/logic/cognito/createUser.js.map +1 -1
  713. package/lib/esm/logic/cognito/decodeAccessToken.d.ts +11 -0
  714. package/lib/esm/logic/cognito/decodeAccessToken.js +22 -4
  715. package/lib/esm/logic/cognito/decodeAccessToken.js.map +1 -1
  716. package/lib/esm/logic/cognito/decodeValidJwt.d.ts +8 -2
  717. package/lib/esm/logic/cognito/decodeValidJwt.js +15 -6
  718. package/lib/esm/logic/cognito/decodeValidJwt.js.map +1 -1
  719. package/lib/esm/logic/cognito/forgotPassword.js +2 -6
  720. package/lib/esm/logic/cognito/forgotPassword.js.map +1 -1
  721. package/lib/esm/logic/cognito/getCognitoJwksClient.d.ts +7 -0
  722. package/lib/esm/logic/cognito/getCognitoJwksClient.js +9 -0
  723. package/lib/esm/logic/cognito/getCognitoJwksClient.js.map +1 -0
  724. package/lib/esm/logic/cognito/getCognitoUserAttributesFromQpqUserAttributes.d.ts +8 -0
  725. package/lib/esm/logic/cognito/getCognitoUserAttributesFromQpqUserAttributes.js +16 -0
  726. package/lib/esm/logic/cognito/getCognitoUserAttributesFromQpqUserAttributes.js.map +1 -0
  727. package/lib/esm/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.d.ts +7 -0
  728. package/lib/esm/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.js +18 -0
  729. package/lib/esm/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.js.map +1 -0
  730. package/lib/esm/logic/cognito/getQpqAttributesFromCognitoStringMap.d.ts +6 -0
  731. package/lib/esm/logic/cognito/getQpqAttributesFromCognitoStringMap.js +13 -0
  732. package/lib/esm/logic/cognito/getQpqAttributesFromCognitoStringMap.js.map +1 -0
  733. package/lib/esm/logic/cognito/getQpqAttributesFromCognitoUserAttributes.d.ts +4 -0
  734. package/lib/esm/logic/cognito/getQpqAttributesFromCognitoUserAttributes.js +10 -0
  735. package/lib/esm/logic/cognito/getQpqAttributesFromCognitoUserAttributes.js.map +1 -0
  736. package/lib/esm/logic/cognito/getUserAttributes.js +5 -7
  737. package/lib/esm/logic/cognito/getUserAttributes.js.map +1 -1
  738. package/lib/esm/logic/cognito/getUserAttributesBySub.js +19 -4
  739. package/lib/esm/logic/cognito/getUserAttributesBySub.js.map +1 -1
  740. package/lib/esm/logic/cognito/getUserPoolClientSecret.d.ts +8 -0
  741. package/lib/esm/logic/cognito/getUserPoolClientSecret.js +17 -3
  742. package/lib/esm/logic/cognito/getUserPoolClientSecret.js.map +1 -1
  743. package/lib/esm/logic/cognito/index.js +3 -0
  744. package/lib/esm/logic/cognito/index.js.map +1 -1
  745. package/lib/esm/logic/cognito/listPagedUsers.js +3 -7
  746. package/lib/esm/logic/cognito/listPagedUsers.js.map +1 -1
  747. package/lib/esm/logic/cognito/listPagedUsersByAttribute.d.ts +5 -0
  748. package/lib/esm/logic/cognito/listPagedUsersByAttribute.js +9 -8
  749. package/lib/esm/logic/cognito/listPagedUsersByAttribute.js.map +1 -1
  750. package/lib/esm/logic/cognito/refreshToken.js +8 -7
  751. package/lib/esm/logic/cognito/refreshToken.js.map +1 -1
  752. package/lib/esm/logic/cognito/requestEmailVerificationCode.js +3 -7
  753. package/lib/esm/logic/cognito/requestEmailVerificationCode.js.map +1 -1
  754. package/lib/esm/logic/cognito/resolveUsernameByPreferredUsername.d.ts +5 -0
  755. package/lib/esm/logic/cognito/resolveUsernameByPreferredUsername.js +26 -3
  756. package/lib/esm/logic/cognito/resolveUsernameByPreferredUsername.js.map +1 -1
  757. package/lib/esm/logic/cognito/respondToAuthChallenge.d.ts +8 -0
  758. package/lib/esm/logic/cognito/{respondToAuthChallengeChallenge.js → respondToAuthChallenge.js} +10 -4
  759. package/lib/esm/logic/cognito/respondToAuthChallenge.js.map +1 -0
  760. package/lib/esm/logic/cognito/setUserAttributes.js +4 -4
  761. package/lib/esm/logic/cognito/setUserAttributes.js.map +1 -1
  762. package/lib/esm/logic/cognito/setUserPassword.js +2 -1
  763. package/lib/esm/logic/cognito/setUserPassword.js.map +1 -1
  764. package/lib/esm/logic/cognito/utils/CognitoUserAttribute.d.ts +5 -0
  765. package/lib/esm/logic/cognito/utils/CognitoUserAttribute.js +2 -0
  766. package/lib/esm/logic/cognito/utils/CognitoUserAttribute.js.map +1 -0
  767. package/lib/esm/logic/cognito/utils/buildCognitoUserFilter.d.ts +10 -0
  768. package/lib/esm/logic/cognito/utils/buildCognitoUserFilter.js +29 -0
  769. package/lib/esm/logic/cognito/utils/buildCognitoUserFilter.js.map +1 -0
  770. package/lib/esm/logic/cognito/utils/calculateSecretHash.d.ts +5 -0
  771. package/lib/esm/logic/cognito/utils/calculateSecretHash.js +6 -6
  772. package/lib/esm/logic/cognito/utils/calculateSecretHash.js.map +1 -1
  773. package/lib/esm/logic/cognito/utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo.d.ts +8 -0
  774. package/lib/esm/logic/cognito/utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo.js +19 -0
  775. package/lib/esm/logic/cognito/utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo.js.map +1 -0
  776. package/lib/esm/logic/cognito/utils/cognitoAuthenticationResultTypeToQpqAuthenticationInfo.d.ts +7 -0
  777. package/lib/esm/logic/cognito/utils/cognitoAuthenticationResultTypeToQpqAuthenticationInfo.js +18 -0
  778. package/lib/esm/logic/cognito/utils/cognitoAuthenticationResultTypeToQpqAuthenticationInfo.js.map +1 -0
  779. package/lib/esm/logic/cognito/utils/cognitoChallengeNameTypeToQpqAuthenticateUserChallenge.d.ts +9 -0
  780. package/lib/esm/logic/cognito/utils/cognitoChallengeNameTypeToQpqAuthenticateUserChallenge.js +23 -0
  781. package/lib/esm/logic/cognito/utils/cognitoChallengeNameTypeToQpqAuthenticateUserChallenge.js.map +1 -0
  782. package/lib/esm/logic/cognito/utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails.d.ts +7 -0
  783. package/lib/esm/logic/cognito/utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails.js +10 -0
  784. package/lib/esm/logic/cognito/utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails.js.map +1 -0
  785. package/lib/esm/logic/cognito/utils/getValidCognitoUserAttributes.d.ts +7 -0
  786. package/lib/esm/logic/cognito/utils/getValidCognitoUserAttributes.js +6 -0
  787. package/lib/esm/logic/cognito/utils/getValidCognitoUserAttributes.js.map +1 -0
  788. package/lib/esm/logic/cognito/utils/index.d.ts +7 -1
  789. package/lib/esm/logic/cognito/utils/index.js +7 -1
  790. package/lib/esm/logic/cognito/utils/index.js.map +1 -1
  791. package/lib/esm/logic/cognito/utils/pageKeyToPaginationToken.d.ts +5 -0
  792. package/lib/esm/logic/cognito/utils/pageKeyToPaginationToken.js +5 -0
  793. package/lib/esm/logic/cognito/utils/pageKeyToPaginationToken.js.map +1 -1
  794. package/lib/esm/logic/cognito/utils/paginationTokenToPageKey.d.ts +5 -0
  795. package/lib/esm/logic/cognito/utils/paginationTokenToPageKey.js +5 -0
  796. package/lib/esm/logic/cognito/utils/paginationTokenToPageKey.js.map +1 -1
  797. package/lib/esm/logic/cognito/verifyUserEmail.d.ts +1 -0
  798. package/lib/esm/logic/cognito/verifyUserEmail.js +1 -0
  799. package/lib/esm/logic/cognito/verifyUserEmail.js.map +1 -1
  800. package/lib/esm/logic/createAwsClient.d.ts +6 -3
  801. package/lib/esm/logic/createAwsClient.js +7 -6
  802. package/lib/esm/logic/createAwsClient.js.map +1 -1
  803. package/lib/esm/logic/dynamo/convertDynamoMapToObject.d.ts +7 -0
  804. package/lib/esm/logic/dynamo/convertDynamoMapToObject.js +32 -0
  805. package/lib/esm/logic/dynamo/convertDynamoMapToObject.js.map +1 -0
  806. package/lib/esm/logic/dynamo/deleteItem.js +4 -10
  807. package/lib/esm/logic/dynamo/deleteItem.js.map +1 -1
  808. package/lib/esm/logic/dynamo/getAllItems.d.ts +2 -1
  809. package/lib/esm/logic/dynamo/getAllItems.js +5 -10
  810. package/lib/esm/logic/dynamo/getAllItems.js.map +1 -1
  811. package/lib/esm/logic/dynamo/getItem.d.ts +2 -2
  812. package/lib/esm/logic/dynamo/getItem.js +6 -18
  813. package/lib/esm/logic/dynamo/getItem.js.map +1 -1
  814. package/lib/esm/logic/dynamo/index.d.ts +2 -0
  815. package/lib/esm/logic/dynamo/index.js +2 -0
  816. package/lib/esm/logic/dynamo/index.js.map +1 -1
  817. package/lib/esm/logic/dynamo/putItem.d.ts +4 -4
  818. package/lib/esm/logic/dynamo/putItem.js +3 -20
  819. package/lib/esm/logic/dynamo/putItem.js.map +1 -1
  820. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildAttributeValue.d.ts +8 -0
  821. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildAttributeValue.js +36 -0
  822. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildAttributeValue.js.map +1 -0
  823. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQueryExpression.d.ts +9 -0
  824. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQueryExpression.js +80 -0
  825. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQueryExpression.js.map +1 -0
  826. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdateExpression.d.ts +9 -0
  827. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdateExpression.js +103 -0
  828. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdateExpression.js.map +1 -0
  829. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeNames.d.ts +7 -0
  830. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeNames.js +20 -0
  831. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeNames.js.map +1 -0
  832. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeValues.d.ts +8 -0
  833. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeValues.js +35 -0
  834. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildExpressionAttributeValues.js.map +1 -0
  835. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeNames.d.ts +7 -0
  836. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeNames.js +19 -0
  837. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeNames.js.map +1 -0
  838. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeValues.d.ts +9 -0
  839. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeValues.js +21 -0
  840. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildUpdateExpressionAttributeValues.js.map +1 -0
  841. package/lib/esm/logic/dynamo/qpqDynamoOrm/flattenKvsQueryConditions.d.ts +3 -0
  842. package/lib/esm/logic/dynamo/qpqDynamoOrm/flattenKvsQueryConditions.js +13 -0
  843. package/lib/esm/logic/dynamo/qpqDynamoOrm/flattenKvsQueryConditions.js.map +1 -0
  844. package/lib/esm/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.d.ts +7 -2
  845. package/lib/esm/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.js +13 -22
  846. package/lib/esm/logic/dynamo/qpqDynamoOrm/getDynamoTableIndexByConfigAndQuery.js.map +1 -1
  847. package/lib/esm/logic/dynamo/qpqDynamoOrm/getHash.d.ts +7 -0
  848. package/lib/esm/logic/dynamo/qpqDynamoOrm/getHash.js +11 -0
  849. package/lib/esm/logic/dynamo/qpqDynamoOrm/getHash.js.map +1 -0
  850. package/lib/esm/logic/dynamo/qpqDynamoOrm/getItemName.d.ts +6 -0
  851. package/lib/esm/logic/dynamo/qpqDynamoOrm/getItemName.js +10 -0
  852. package/lib/esm/logic/dynamo/qpqDynamoOrm/getItemName.js.map +1 -0
  853. package/lib/esm/logic/dynamo/qpqDynamoOrm/getValueName.d.ts +7 -0
  854. package/lib/esm/logic/dynamo/qpqDynamoOrm/getValueName.js +10 -0
  855. package/lib/esm/logic/dynamo/qpqDynamoOrm/getValueName.js.map +1 -0
  856. package/lib/esm/logic/dynamo/qpqDynamoOrm/index.d.ts +13 -2
  857. package/lib/esm/logic/dynamo/qpqDynamoOrm/index.js +13 -2
  858. package/lib/esm/logic/dynamo/qpqDynamoOrm/index.js.map +1 -1
  859. package/lib/esm/logic/dynamo/qpqDynamoOrm/isKvsLogicalOperator.d.ts +2 -0
  860. package/lib/esm/logic/dynamo/qpqDynamoOrm/isKvsLogicalOperator.js +4 -0
  861. package/lib/esm/logic/dynamo/qpqDynamoOrm/isKvsLogicalOperator.js.map +1 -0
  862. package/lib/esm/logic/dynamo/qpqDynamoOrm/isKvsQueryCondition.d.ts +2 -0
  863. package/lib/esm/logic/dynamo/qpqDynamoOrm/isKvsQueryCondition.js +4 -0
  864. package/lib/esm/logic/dynamo/qpqDynamoOrm/isKvsQueryCondition.js.map +1 -0
  865. package/lib/esm/logic/dynamo/query.js +5 -8
  866. package/lib/esm/logic/dynamo/query.js.map +1 -1
  867. package/lib/esm/logic/dynamo/scan.js +5 -8
  868. package/lib/esm/logic/dynamo/scan.js.map +1 -1
  869. package/lib/esm/logic/dynamo/updateItem.d.ts +2 -1
  870. package/lib/esm/logic/dynamo/updateItem.js +8 -12
  871. package/lib/esm/logic/dynamo/updateItem.js.map +1 -1
  872. package/lib/esm/logic/dynamo/utils/buildDynamoKey.d.ts +8 -0
  873. package/lib/esm/logic/dynamo/utils/buildDynamoKey.js +16 -0
  874. package/lib/esm/logic/dynamo/utils/buildDynamoKey.js.map +1 -0
  875. package/lib/esm/logic/dynamo/{logs/utils → utils}/index.d.ts +2 -0
  876. package/lib/esm/logic/dynamo/utils/index.js +5 -0
  877. package/lib/esm/logic/dynamo/utils/index.js.map +1 -0
  878. package/lib/esm/logic/dynamo/utils/itemsToQpqPagedData.d.ts +3 -1
  879. package/lib/esm/logic/dynamo/utils/itemsToQpqPagedData.js +2 -1
  880. package/lib/esm/logic/dynamo/utils/itemsToQpqPagedData.js.map +1 -1
  881. package/lib/esm/logic/dynamo/utils/lastEvaluatedKeyToString.d.ts +3 -0
  882. package/lib/esm/logic/dynamo/{logs/utils → utils}/lastEvaluatedKeyToString.js +1 -0
  883. package/lib/esm/logic/dynamo/utils/lastEvaluatedKeyToString.js.map +1 -0
  884. package/lib/esm/logic/dynamo/utils/stringToLastEvaluatedKey.d.ts +8 -0
  885. package/lib/esm/logic/dynamo/utils/stringToLastEvaluatedKey.js +10 -0
  886. package/lib/esm/logic/dynamo/utils/stringToLastEvaluatedKey.js.map +1 -0
  887. package/lib/esm/logic/federatedModuleStore/FederatedModuleStoreManifest.d.ts +2 -2
  888. package/lib/esm/logic/federatedModuleStore/FederatedModuleStoreManifest.js.map +1 -1
  889. package/lib/esm/logic/federatedModuleStore/loadFederatedStory.d.ts +1 -1
  890. package/lib/esm/logic/federatedModuleStore/loadFederatedStory.js.map +1 -1
  891. package/lib/esm/logic/federatedModuleStore/sharedPackages.js +1 -1
  892. package/lib/esm/logic/federatedModuleStore/sharedPackages.js.map +1 -1
  893. package/lib/esm/logic/kms/decryptDataKey.d.ts +2 -0
  894. package/lib/esm/logic/kms/decryptDataKey.js +20 -0
  895. package/lib/esm/logic/kms/decryptDataKey.js.map +1 -0
  896. package/lib/esm/logic/kms/generateDataKey.d.ts +3 -0
  897. package/lib/esm/logic/kms/generateDataKey.js +21 -0
  898. package/lib/esm/logic/kms/generateDataKey.js.map +1 -0
  899. package/lib/esm/logic/kms/getCachedGeneratedDataKey.d.ts +3 -0
  900. package/lib/esm/logic/kms/getCachedGeneratedDataKey.js +24 -0
  901. package/lib/esm/logic/kms/getCachedGeneratedDataKey.js.map +1 -0
  902. package/lib/esm/logic/kms/getCachedUnwrappedDataKey.d.ts +2 -0
  903. package/lib/esm/logic/kms/getCachedUnwrappedDataKey.js +24 -0
  904. package/lib/esm/logic/kms/getCachedUnwrappedDataKey.js.map +1 -0
  905. package/lib/esm/logic/kms/toKmsEncryptionContext.d.ts +2 -0
  906. package/lib/esm/logic/kms/toKmsEncryptionContext.js +6 -0
  907. package/lib/esm/logic/kms/toKmsEncryptionContext.js.map +1 -0
  908. package/lib/esm/logic/lambda/executeLambdaByName.d.ts +5 -1
  909. package/lib/esm/logic/lambda/executeLambdaByName.js +6 -3
  910. package/lib/esm/logic/lambda/executeLambdaByName.js.map +1 -1
  911. package/lib/esm/logic/neptune/getNeptuneEndpoints.js +7 -6
  912. package/lib/esm/logic/neptune/getNeptuneEndpoints.js.map +1 -1
  913. package/lib/esm/logic/parametersManager/getParameters.js +2 -1
  914. package/lib/esm/logic/parametersManager/getParameters.js.map +1 -1
  915. package/lib/esm/logic/s3/deleteFiles.d.ts +1 -0
  916. package/lib/esm/logic/s3/deleteFiles.js +16 -9
  917. package/lib/esm/logic/s3/deleteFiles.js.map +1 -1
  918. package/lib/esm/logic/s3/generatePresignedUploadUrl.d.ts +1 -0
  919. package/lib/esm/logic/s3/generatePresignedUploadUrl.js +2 -31
  920. package/lib/esm/logic/s3/generatePresignedUploadUrl.js.map +1 -1
  921. package/lib/esm/logic/s3/generatePresignedUrl.d.ts +1 -0
  922. package/lib/esm/logic/s3/generatePresignedUrl.js +4 -11
  923. package/lib/esm/logic/s3/generatePresignedUrl.js.map +1 -1
  924. package/lib/esm/logic/s3/listFiles.d.ts +5 -4
  925. package/lib/esm/logic/s3/listFiles.js +20 -27
  926. package/lib/esm/logic/s3/listFiles.js.map +1 -1
  927. package/lib/esm/logic/s3/s3Utils.d.ts +3 -0
  928. package/lib/esm/logic/s3/s3Utils.js +5 -0
  929. package/lib/esm/logic/s3/s3Utils.js.map +1 -1
  930. package/lib/esm/logic/secretsManager/getSecret.js +2 -3
  931. package/lib/esm/logic/secretsManager/getSecret.js.map +1 -1
  932. package/lib/esm/logic/sns/publishMessage.d.ts +7 -2
  933. package/lib/esm/logic/sns/publishMessage.js +11 -17
  934. package/lib/esm/logic/sns/publishMessage.js.map +1 -1
  935. package/lib/esm/logic/sqs/sendMessages.d.ts +7 -2
  936. package/lib/esm/logic/sqs/sendMessages.js +9 -8
  937. package/lib/esm/logic/sqs/sendMessages.js.map +1 -1
  938. package/lib/esm/runtimeConfig/LambdaRuntimeConfig.d.ts +9 -0
  939. package/lib/esm/runtimeConfig/LambdaRuntimeConfig.js +2 -0
  940. package/lib/esm/runtimeConfig/LambdaRuntimeConfig.js.map +1 -0
  941. package/lib/esm/runtimeConfig/index.d.ts +2 -0
  942. package/lib/esm/runtimeConfig/index.js +3 -0
  943. package/lib/esm/runtimeConfig/index.js.map +1 -0
  944. package/lib/esm/runtimeConfig/resolveParameterKey.d.ts +7 -0
  945. package/lib/esm/runtimeConfig/resolveParameterKey.js +12 -0
  946. package/lib/esm/runtimeConfig/resolveParameterKey.js.map +1 -0
  947. package/lib/extension-layer/qpq-log-extension/index.js +32 -32
  948. package/package.json +10 -8
  949. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/neptune.d.ts +0 -26
  950. package/lib/commonjs/getActionProcessor/core/graphDatabase/stories/types/neptune.js.map +0 -1
  951. package/lib/commonjs/lambdaHandlers/helpers/logger.d.ts +0 -8
  952. package/lib/commonjs/lambdaHandlers/helpers/logger.js.map +0 -1
  953. package/lib/commonjs/lambdaHandlers/types/QpqWarmLambdaEvent.d.ts +0 -5
  954. package/lib/commonjs/lambdaHandlers/types/QpqWarmLambdaEvent.js.map +0 -1
  955. package/lib/commonjs/lambdas/dynamicModuleLoader/dynamicModuleLoaderWarmer.d.ts +0 -1
  956. package/lib/commonjs/lambdas/dynamicModuleLoader/dynamicModuleLoaderWarmer.js.map +0 -1
  957. package/lib/commonjs/lambdas/lambda-utils/QpqWarmLambdaEvent.d.ts +0 -5
  958. package/lib/commonjs/lambdas/lambda-utils/QpqWarmLambdaEvent.js.map +0 -1
  959. package/lib/commonjs/lambdas/lambdaSQSEvent.d.ts +0 -2
  960. package/lib/commonjs/lambdas/lambdaSQSEvent.js +0 -16
  961. package/lib/commonjs/lambdas/lambdaSQSEvent.js.map +0 -1
  962. package/lib/commonjs/logic/acm/findMatchingCertificates.d.ts +0 -1
  963. package/lib/commonjs/logic/acm/findMatchingCertificates.js +0 -53
  964. package/lib/commonjs/logic/acm/findMatchingCertificates.js.map +0 -1
  965. package/lib/commonjs/logic/acm/getDomainValidationOptions.d.ts +0 -2
  966. package/lib/commonjs/logic/acm/getDomainValidationOptions.js +0 -41
  967. package/lib/commonjs/logic/acm/getDomainValidationOptions.js.map +0 -1
  968. package/lib/commonjs/logic/apiGateway/websocketSendMessage.d.ts +0 -1
  969. package/lib/commonjs/logic/apiGateway/websocketSendMessage.js.map +0 -1
  970. package/lib/commonjs/logic/cognito/getUser.d.ts +0 -10
  971. package/lib/commonjs/logic/cognito/getUser.js +0 -39
  972. package/lib/commonjs/logic/cognito/getUser.js.map +0 -1
  973. package/lib/commonjs/logic/cognito/respondToAuthChallengeChallenge.d.ts +0 -3
  974. package/lib/commonjs/logic/cognito/respondToAuthChallengeChallenge.js.map +0 -1
  975. package/lib/commonjs/logic/cognito/utils/transformCognitoResponse.d.ts +0 -5
  976. package/lib/commonjs/logic/cognito/utils/transformCognitoResponse.js +0 -48
  977. package/lib/commonjs/logic/cognito/utils/transformCognitoResponse.js.map +0 -1
  978. package/lib/commonjs/logic/cognito/verifyJwt.d.ts +0 -1
  979. package/lib/commonjs/logic/cognito/verifyJwt.js +0 -20
  980. package/lib/commonjs/logic/cognito/verifyJwt.js.map +0 -1
  981. package/lib/commonjs/logic/dynamo/convertObjectToDynamoMap.d.ts +0 -1
  982. package/lib/commonjs/logic/dynamo/convertObjectToDynamoMap.js +0 -67
  983. package/lib/commonjs/logic/dynamo/convertObjectToDynamoMap.js.map +0 -1
  984. package/lib/commonjs/logic/dynamo/getLogByCorrelation.d.ts +0 -2
  985. package/lib/commonjs/logic/dynamo/getLogByCorrelation.js +0 -55
  986. package/lib/commonjs/logic/dynamo/getLogByCorrelation.js.map +0 -1
  987. package/lib/commonjs/logic/dynamo/getLogChildrenByFromCorrelation.d.ts +0 -2
  988. package/lib/commonjs/logic/dynamo/getLogChildrenByFromCorrelation.js +0 -65
  989. package/lib/commonjs/logic/dynamo/getLogChildrenByFromCorrelation.js.map +0 -1
  990. package/lib/commonjs/logic/dynamo/getPagedItemsOverRange.d.ts +0 -2
  991. package/lib/commonjs/logic/dynamo/getPagedItemsOverRange.js +0 -68
  992. package/lib/commonjs/logic/dynamo/getPagedItemsOverRange.js.map +0 -1
  993. package/lib/commonjs/logic/dynamo/logs/index.d.ts +0 -1
  994. package/lib/commonjs/logic/dynamo/logs/index.js.map +0 -1
  995. package/lib/commonjs/logic/dynamo/logs/utils/index.js.map +0 -1
  996. package/lib/commonjs/logic/dynamo/logs/utils/lastEvaluatedKeyToString.d.ts +0 -1
  997. package/lib/commonjs/logic/dynamo/logs/utils/lastEvaluatedKeyToString.js.map +0 -1
  998. package/lib/commonjs/logic/dynamo/logs/utils/stringToLastEvaluatedKey.d.ts +0 -2
  999. package/lib/commonjs/logic/dynamo/logs/utils/stringToLastEvaluatedKey.js +0 -7
  1000. package/lib/commonjs/logic/dynamo/logs/utils/stringToLastEvaluatedKey.js.map +0 -1
  1001. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.d.ts +0 -10
  1002. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js +0 -200
  1003. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js.map +0 -1
  1004. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.d.ts +0 -11
  1005. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js +0 -144
  1006. package/lib/commonjs/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js.map +0 -1
  1007. package/lib/commonjs/logic/dynamo/utils/qpqPagedDataToItems.d.ts +0 -4
  1008. package/lib/commonjs/logic/dynamo/utils/qpqPagedDataToItems.js +0 -10
  1009. package/lib/commonjs/logic/dynamo/utils/qpqPagedDataToItems.js.map +0 -1
  1010. package/lib/commonjs/runtimeConfig/QPQAWSResourceMap.d.ts +0 -4
  1011. package/lib/commonjs/runtimeConfig/QPQAWSResourceMap.js.map +0 -1
  1012. package/lib/commonjs/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.d.ts +0 -4
  1013. package/lib/commonjs/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.js +0 -20
  1014. package/lib/commonjs/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.js.map +0 -1
  1015. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/neptune.d.ts +0 -26
  1016. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/neptune.js +0 -2
  1017. package/lib/esm/getActionProcessor/core/graphDatabase/stories/types/neptune.js.map +0 -1
  1018. package/lib/esm/lambdaHandlers/helpers/logger.d.ts +0 -8
  1019. package/lib/esm/lambdaHandlers/helpers/logger.js.map +0 -1
  1020. package/lib/esm/lambdaHandlers/types/QpqWarmLambdaEvent.d.ts +0 -5
  1021. package/lib/esm/lambdaHandlers/types/QpqWarmLambdaEvent.js +0 -2
  1022. package/lib/esm/lambdaHandlers/types/QpqWarmLambdaEvent.js.map +0 -1
  1023. package/lib/esm/lambdas/dynamicModuleLoader/dynamicModuleLoaderWarmer.d.ts +0 -1
  1024. package/lib/esm/lambdas/dynamicModuleLoader/dynamicModuleLoaderWarmer.js +0 -4
  1025. package/lib/esm/lambdas/dynamicModuleLoader/dynamicModuleLoaderWarmer.js.map +0 -1
  1026. package/lib/esm/lambdas/lambda-utils/QpqWarmLambdaEvent.d.ts +0 -5
  1027. package/lib/esm/lambdas/lambda-utils/QpqWarmLambdaEvent.js +0 -2
  1028. package/lib/esm/lambdas/lambda-utils/QpqWarmLambdaEvent.js.map +0 -1
  1029. package/lib/esm/lambdas/lambdaSQSEvent.d.ts +0 -2
  1030. package/lib/esm/lambdas/lambdaSQSEvent.js +0 -13
  1031. package/lib/esm/lambdas/lambdaSQSEvent.js.map +0 -1
  1032. package/lib/esm/logic/acm/findMatchingCertificates.d.ts +0 -1
  1033. package/lib/esm/logic/acm/findMatchingCertificates.js +0 -39
  1034. package/lib/esm/logic/acm/findMatchingCertificates.js.map +0 -1
  1035. package/lib/esm/logic/acm/getDomainValidationOptions.d.ts +0 -2
  1036. package/lib/esm/logic/acm/getDomainValidationOptions.js +0 -27
  1037. package/lib/esm/logic/acm/getDomainValidationOptions.js.map +0 -1
  1038. package/lib/esm/logic/apiGateway/websocketSendMessage.d.ts +0 -1
  1039. package/lib/esm/logic/apiGateway/websocketSendMessage.js.map +0 -1
  1040. package/lib/esm/logic/cognito/getUser.d.ts +0 -10
  1041. package/lib/esm/logic/cognito/getUser.js +0 -26
  1042. package/lib/esm/logic/cognito/getUser.js.map +0 -1
  1043. package/lib/esm/logic/cognito/respondToAuthChallengeChallenge.d.ts +0 -3
  1044. package/lib/esm/logic/cognito/respondToAuthChallengeChallenge.js.map +0 -1
  1045. package/lib/esm/logic/cognito/utils/transformCognitoResponse.d.ts +0 -5
  1046. package/lib/esm/logic/cognito/utils/transformCognitoResponse.js +0 -42
  1047. package/lib/esm/logic/cognito/utils/transformCognitoResponse.js.map +0 -1
  1048. package/lib/esm/logic/cognito/verifyJwt.d.ts +0 -1
  1049. package/lib/esm/logic/cognito/verifyJwt.js +0 -7
  1050. package/lib/esm/logic/cognito/verifyJwt.js.map +0 -1
  1051. package/lib/esm/logic/dynamo/convertObjectToDynamoMap.d.ts +0 -1
  1052. package/lib/esm/logic/dynamo/convertObjectToDynamoMap.js +0 -64
  1053. package/lib/esm/logic/dynamo/convertObjectToDynamoMap.js.map +0 -1
  1054. package/lib/esm/logic/dynamo/getLogByCorrelation.d.ts +0 -2
  1055. package/lib/esm/logic/dynamo/getLogByCorrelation.js +0 -40
  1056. package/lib/esm/logic/dynamo/getLogByCorrelation.js.map +0 -1
  1057. package/lib/esm/logic/dynamo/getLogChildrenByFromCorrelation.d.ts +0 -2
  1058. package/lib/esm/logic/dynamo/getLogChildrenByFromCorrelation.js +0 -50
  1059. package/lib/esm/logic/dynamo/getLogChildrenByFromCorrelation.js.map +0 -1
  1060. package/lib/esm/logic/dynamo/getPagedItemsOverRange.d.ts +0 -2
  1061. package/lib/esm/logic/dynamo/getPagedItemsOverRange.js +0 -53
  1062. package/lib/esm/logic/dynamo/getPagedItemsOverRange.js.map +0 -1
  1063. package/lib/esm/logic/dynamo/logs/index.d.ts +0 -1
  1064. package/lib/esm/logic/dynamo/logs/index.js +0 -2
  1065. package/lib/esm/logic/dynamo/logs/index.js.map +0 -1
  1066. package/lib/esm/logic/dynamo/logs/utils/index.js +0 -3
  1067. package/lib/esm/logic/dynamo/logs/utils/index.js.map +0 -1
  1068. package/lib/esm/logic/dynamo/logs/utils/lastEvaluatedKeyToString.d.ts +0 -1
  1069. package/lib/esm/logic/dynamo/logs/utils/lastEvaluatedKeyToString.js.map +0 -1
  1070. package/lib/esm/logic/dynamo/logs/utils/stringToLastEvaluatedKey.d.ts +0 -2
  1071. package/lib/esm/logic/dynamo/logs/utils/stringToLastEvaluatedKey.js +0 -4
  1072. package/lib/esm/logic/dynamo/logs/utils/stringToLastEvaluatedKey.js.map +0 -1
  1073. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.d.ts +0 -10
  1074. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js +0 -186
  1075. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoQuery.js.map +0 -1
  1076. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.d.ts +0 -11
  1077. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js +0 -138
  1078. package/lib/esm/logic/dynamo/qpqDynamoOrm/buildDynamoUpdate.js.map +0 -1
  1079. package/lib/esm/logic/dynamo/utils/qpqPagedDataToItems.d.ts +0 -4
  1080. package/lib/esm/logic/dynamo/utils/qpqPagedDataToItems.js +0 -6
  1081. package/lib/esm/logic/dynamo/utils/qpqPagedDataToItems.js.map +0 -1
  1082. package/lib/esm/runtimeConfig/QPQAWSResourceMap.d.ts +0 -4
  1083. package/lib/esm/runtimeConfig/QPQAWSResourceMap.js +0 -2
  1084. package/lib/esm/runtimeConfig/QPQAWSResourceMap.js.map +0 -1
  1085. package/lib/esm/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.d.ts +0 -4
  1086. package/lib/esm/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.js +0 -13
  1087. package/lib/esm/runtimeConfig/qpqAwsLambdaRuntimeConfigUtils.js.map +0 -1
@@ -0,0 +1,18 @@
1
+ import { cognitoAttributeMap } from './cognitoAttributeMap';
2
+ const reversedCognitoAttributeMap = Object.fromEntries(Object.entries(cognitoAttributeMap).map(([qpqKey, cognitoName]) => [cognitoName, qpqKey]));
3
+ /**
4
+ * Maps a single Cognito attribute name/value onto a partial UserAttributes object.
5
+ * Names with no qpq mapping (e.g. cognito:groups) produce an empty object, and
6
+ * email_verified is coerced from Cognito's 'true'/'false' string to a boolean.
7
+ */
8
+ export const getQpqAttributeObjectFromCognitoKeyValue = (key, value) => {
9
+ const userAttributeKey = reversedCognitoAttributeMap[key];
10
+ if (!userAttributeKey) {
11
+ return {};
12
+ }
13
+ if (userAttributeKey === 'emailVerified') {
14
+ return { emailVerified: value === 'true' };
15
+ }
16
+ return { [userAttributeKey]: value };
17
+ };
18
+ //# sourceMappingURL=getQpqAttributeObjectFromCognitoKeyValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getQpqAttributeObjectFromCognitoKeyValue.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getQpqAttributeObjectFromCognitoKeyValue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,2BAA2B,GAAyC,MAAM,CAAC,WAAW,CAC1F,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,MAA8B,CAAC,CAAC,CAClH,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,GAAW,EAAE,KAAa,EAAkB,EAAE;IACrG,MAAM,gBAAgB,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC;IAE1D,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,gBAAgB,KAAK,eAAe,EAAE,CAAC;QACzC,OAAO,EAAE,aAAa,EAAE,KAAK,KAAK,MAAM,EAAE,CAAC;IAC7C,CAAC;IAED,OAAO,EAAE,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,CAAC;AACvC,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { cognitoAttributeMap } from './cognitoAttributeMap';\n\nconst reversedCognitoAttributeMap: Record<string, keyof UserAttributes> = Object.fromEntries(\n Object.entries(cognitoAttributeMap).map(([qpqKey, cognitoName]) => [cognitoName, qpqKey as keyof UserAttributes]),\n);\n\n/**\n * Maps a single Cognito attribute name/value onto a partial UserAttributes object.\n * Names with no qpq mapping (e.g. cognito:groups) produce an empty object, and\n * email_verified is coerced from Cognito's 'true'/'false' string to a boolean.\n */\nexport const getQpqAttributeObjectFromCognitoKeyValue = (key: string, value: string): UserAttributes => {\n const userAttributeKey = reversedCognitoAttributeMap[key];\n\n if (!userAttributeKey) {\n return {};\n }\n\n if (userAttributeKey === 'emailVerified') {\n return { emailVerified: value === 'true' };\n }\n\n return { [userAttributeKey]: value };\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import { UserAttributes } from 'quidproquo-core';
2
+ /**
3
+ * Maps a Cognito name-to-value record (as delivered in lambda trigger events)
4
+ * onto the qpq UserAttributes shape.
5
+ */
6
+ export declare const getQpqAttributesFromCognitoStringMap: (cognitoUserAttributes: Record<string, string>) => UserAttributes;
@@ -0,0 +1,13 @@
1
+ import { getQpqAttributeObjectFromCognitoKeyValue } from './getQpqAttributeObjectFromCognitoKeyValue';
2
+ /**
3
+ * Maps a Cognito name-to-value record (as delivered in lambda trigger events)
4
+ * onto the qpq UserAttributes shape.
5
+ */
6
+ export const getQpqAttributesFromCognitoStringMap = (cognitoUserAttributes) => {
7
+ const userAttributes = {};
8
+ for (const [key, value] of Object.entries(cognitoUserAttributes)) {
9
+ Object.assign(userAttributes, getQpqAttributeObjectFromCognitoKeyValue(key, value));
10
+ }
11
+ return userAttributes;
12
+ };
13
+ //# sourceMappingURL=getQpqAttributesFromCognitoStringMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getQpqAttributesFromCognitoStringMap.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getQpqAttributesFromCognitoStringMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAC;AAEtG;;;GAGG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,qBAA6C,EAAkB,EAAE;IACpH,MAAM,cAAc,GAAmB,EAAE,CAAC;IAE1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,wCAAwC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { getQpqAttributeObjectFromCognitoKeyValue } from './getQpqAttributeObjectFromCognitoKeyValue';\n\n/**\n * Maps a Cognito name-to-value record (as delivered in lambda trigger events)\n * onto the qpq UserAttributes shape.\n */\nexport const getQpqAttributesFromCognitoStringMap = (cognitoUserAttributes: Record<string, string>): UserAttributes => {\n const userAttributes: UserAttributes = {};\n\n for (const [key, value] of Object.entries(cognitoUserAttributes)) {\n Object.assign(userAttributes, getQpqAttributeObjectFromCognitoKeyValue(key, value));\n }\n\n return userAttributes;\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { UserAttributes } from 'quidproquo-core';
2
+ import { CognitoUserAttribute } from './utils/CognitoUserAttribute';
3
+ /** Maps a list of Cognito user attributes onto the qpq UserAttributes shape. */
4
+ export declare const getQpqAttributesFromCognitoUserAttributes: (cognitoUserAttributes: CognitoUserAttribute[]) => UserAttributes;
@@ -0,0 +1,10 @@
1
+ import { getQpqAttributeObjectFromCognitoKeyValue } from './getQpqAttributeObjectFromCognitoKeyValue';
2
+ /** Maps a list of Cognito user attributes onto the qpq UserAttributes shape. */
3
+ export const getQpqAttributesFromCognitoUserAttributes = (cognitoUserAttributes) => {
4
+ const userAttributes = {};
5
+ for (const { Name, Value } of cognitoUserAttributes) {
6
+ Object.assign(userAttributes, getQpqAttributeObjectFromCognitoKeyValue(Name, Value));
7
+ }
8
+ return userAttributes;
9
+ };
10
+ //# sourceMappingURL=getQpqAttributesFromCognitoUserAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getQpqAttributesFromCognitoUserAttributes.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getQpqAttributesFromCognitoUserAttributes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAC;AAEtG,gFAAgF;AAChF,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,qBAA6C,EAAkB,EAAE;IACzH,MAAM,cAAc,GAAmB,EAAE,CAAC;IAE1C,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,qBAAqB,EAAE,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,wCAAwC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACvF,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { CognitoUserAttribute } from './utils/CognitoUserAttribute';\nimport { getQpqAttributeObjectFromCognitoKeyValue } from './getQpqAttributeObjectFromCognitoKeyValue';\n\n/** Maps a list of Cognito user attributes onto the qpq UserAttributes shape. */\nexport const getQpqAttributesFromCognitoUserAttributes = (cognitoUserAttributes: CognitoUserAttribute[]): UserAttributes => {\n const userAttributes: UserAttributes = {};\n\n for (const { Name, Value } of cognitoUserAttributes) {\n Object.assign(userAttributes, getQpqAttributeObjectFromCognitoKeyValue(Name, Value));\n }\n\n return userAttributes;\n};\n"]}
@@ -1,17 +1,15 @@
1
1
  import { AdminGetUserCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
- import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
3
+ import { getValidCognitoUserAttributes } from './utils/getValidCognitoUserAttributes';
4
+ import { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';
4
5
  export const getUserAttributes = async (userPoolId, region, username) => {
5
6
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
6
7
  region,
7
8
  });
8
- const params = {
9
+ const response = await cognitoClient.send(new AdminGetUserCommand({
9
10
  UserPoolId: userPoolId,
10
11
  Username: username,
11
- };
12
- const response = await cognitoClient.send(new AdminGetUserCommand(params));
13
- const validAttributes = (response.UserAttributes || []).filter((attr) => attr.Name && attr.Value);
14
- const attributes = getQpqAttributesFromCognitoUserAttributes(validAttributes);
15
- return attributes;
12
+ }));
13
+ return getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(response.UserAttributes));
16
14
  };
17
15
  //# sourceMappingURL=getUserAttributes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserAttributes.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getUserAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AAElF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,QAAgB,EAA2B,EAAE;IACvH,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG;QACb,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3E,MAAM,eAAe,GAAG,CAAC,QAAQ,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAsC,CAAC;IAEvI,MAAM,UAAU,GAAG,yCAAyC,CAAC,eAAe,CAAC,CAAC;IAE9E,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { AdminGetUserCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';\n\nexport const getUserAttributes = async (userPoolId: string, region: string, username: string): Promise<UserAttributes> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const params = {\n UserPoolId: userPoolId,\n Username: username,\n };\n\n const response = await cognitoClient.send(new AdminGetUserCommand(params));\n\n const validAttributes = (response.UserAttributes || []).filter((attr) => attr.Name && attr.Value) as { Name: string; Value: string }[];\n\n const attributes = getQpqAttributesFromCognitoUserAttributes(validAttributes);\n\n return attributes;\n};\n"]}
1
+ {"version":3,"file":"getUserAttributes.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getUserAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AAExG,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,QAAgB,EAA2B,EAAE;IACvH,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,mBAAmB,CAAC;QACtB,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ;KACnB,CAAC,CACH,CAAC;IAEF,OAAO,yCAAyC,CAAC,6BAA6B,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { AdminGetUserCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getValidCognitoUserAttributes } from './utils/getValidCognitoUserAttributes';\nimport { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';\n\nexport const getUserAttributes = async (userPoolId: string, region: string, username: string): Promise<UserAttributes> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new AdminGetUserCommand({\n UserPoolId: userPoolId,\n Username: username,\n }),\n );\n\n return getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(response.UserAttributes));\n};\n"]}
@@ -1,6 +1,8 @@
1
1
  import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
- import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
3
+ import { buildCognitoUserFilter, InvalidCognitoFilterError } from './utils/buildCognitoUserFilter';
4
+ import { getValidCognitoUserAttributes } from './utils/getValidCognitoUserAttributes';
5
+ import { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';
4
6
  // ListUsers returns an empty list rather than throwing for no match, so we throw
5
7
  // our own error with a discriminable `code` for the processor's catch to map.
6
8
  export class UserNotFoundError extends Error {
@@ -10,19 +12,32 @@ export class UserNotFoundError extends Error {
10
12
  this.name = 'UserNotFoundError';
11
13
  }
12
14
  }
15
+ // A sub that cannot be embedded in a Cognito filter cannot belong to any user,
16
+ // so unsafe input resolves to not-found instead of reaching Cognito.
17
+ const buildSubFilter = (sub) => {
18
+ try {
19
+ return buildCognitoUserFilter('sub', sub);
20
+ }
21
+ catch (error) {
22
+ if (error instanceof InvalidCognitoFilterError) {
23
+ throw new UserNotFoundError();
24
+ }
25
+ throw error;
26
+ }
27
+ };
13
28
  export const getUserAttributesBySub = async (userPoolId, region, sub) => {
29
+ const filter = buildSubFilter(sub);
14
30
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
15
31
  region,
16
32
  });
17
33
  const response = await cognitoClient.send(new ListUsersCommand({
18
34
  UserPoolId: userPoolId,
19
- Filter: `sub = "${sub}"`,
35
+ Filter: filter,
20
36
  }));
21
37
  const [user] = response?.Users || [];
22
38
  if (!user) {
23
39
  throw new UserNotFoundError();
24
40
  }
25
- const validAttributes = (user.Attributes || []).filter((attr) => attr.Name && attr.Value);
26
- return getQpqAttributesFromCognitoUserAttributes(validAttributes);
41
+ return getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(user.Attributes));
27
42
  };
28
43
  //# sourceMappingURL=getUserAttributesBySub.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserAttributesBySub.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getUserAttributesBySub.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AAElF,iFAAiF;AACjF,8EAA8E;AAC9E,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,IAAI,GAAG,gBAAgB,CAAC;IAEjC;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,GAAW,EAA2B,EAAE;IACvH,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,UAAU,GAAG,GAAG;KACzB,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,iBAAiB,EAAE,CAAC;IAChC,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAGrF,CAAC;IAEJ,OAAO,yCAAyC,CAAC,eAAe,CAAC,CAAC;AACpE,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';\n\n// ListUsers returns an empty list rather than throwing for no match, so we throw\n// our own error with a discriminable `code` for the processor's catch to map.\nexport class UserNotFoundError extends Error {\n readonly code = 'USER_NOT_FOUND';\n\n constructor() {\n super('User not found');\n this.name = 'UserNotFoundError';\n }\n}\n\nexport const getUserAttributesBySub = async (userPoolId: string, region: string, sub: string): Promise<UserAttributes> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n Filter: `sub = \"${sub}\"`,\n }),\n );\n\n const [user] = response?.Users || [];\n if (!user) {\n throw new UserNotFoundError();\n }\n\n const validAttributes = (user.Attributes || []).filter((attr) => attr.Name && attr.Value) as {\n Name: string;\n Value: string;\n }[];\n\n return getQpqAttributesFromCognitoUserAttributes(validAttributes);\n};\n"]}
1
+ {"version":3,"file":"getUserAttributesBySub.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getUserAttributesBySub.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AACnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AAExG,iFAAiF;AACjF,8EAA8E;AAC9E,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,IAAI,GAAG,gBAAgB,CAAC;IAEjC;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,+EAA+E;AAC/E,qEAAqE;AACrE,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE;IAC7C,IAAI,CAAC;QACH,OAAO,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,yBAAyB,EAAE,CAAC;YAC/C,MAAM,IAAI,iBAAiB,EAAE,CAAC;QAChC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,GAAW,EAA2B,EAAE;IACvH,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,MAAM;KACf,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,iBAAiB,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,yCAAyC,CAAC,6BAA6B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AACnG,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { buildCognitoUserFilter, InvalidCognitoFilterError } from './utils/buildCognitoUserFilter';\nimport { getValidCognitoUserAttributes } from './utils/getValidCognitoUserAttributes';\nimport { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';\n\n// ListUsers returns an empty list rather than throwing for no match, so we throw\n// our own error with a discriminable `code` for the processor's catch to map.\nexport class UserNotFoundError extends Error {\n readonly code = 'USER_NOT_FOUND';\n\n constructor() {\n super('User not found');\n this.name = 'UserNotFoundError';\n }\n}\n\n// A sub that cannot be embedded in a Cognito filter cannot belong to any user,\n// so unsafe input resolves to not-found instead of reaching Cognito.\nconst buildSubFilter = (sub: string): string => {\n try {\n return buildCognitoUserFilter('sub', sub);\n } catch (error) {\n if (error instanceof InvalidCognitoFilterError) {\n throw new UserNotFoundError();\n }\n throw error;\n }\n};\n\nexport const getUserAttributesBySub = async (userPoolId: string, region: string, sub: string): Promise<UserAttributes> => {\n const filter = buildSubFilter(sub);\n\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n Filter: filter,\n }),\n );\n\n const [user] = response?.Users || [];\n if (!user) {\n throw new UserNotFoundError();\n }\n\n return getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(user.Attributes));\n};\n"]}
@@ -1 +1,9 @@
1
+ export declare class ClientSecretNotFoundError extends Error {
2
+ readonly code = "CLIENT_SECRET_NOT_FOUND";
3
+ constructor();
4
+ }
5
+ /**
6
+ * Fetches the app client's secret (needed to compute the SECRET_HASH for auth
7
+ * flows). Throws ClientSecretNotFoundError when the client has no secret.
8
+ */
1
9
  export declare const getUserPoolClientSecret: (userPoolId: string, clientId: string, region: string) => Promise<string>;
@@ -1,5 +1,18 @@
1
1
  import { CognitoIdentityProviderClient, DescribeUserPoolClientCommand, } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
+ // DescribeUserPoolClient succeeds even when the app client has no secret, so a
4
+ // missing secret is a hand-thrown, discriminable configuration error.
5
+ export class ClientSecretNotFoundError extends Error {
6
+ code = 'CLIENT_SECRET_NOT_FOUND';
7
+ constructor() {
8
+ super('Can not find client secret for Cognito user pool client');
9
+ this.name = 'ClientSecretNotFoundError';
10
+ }
11
+ }
12
+ /**
13
+ * Fetches the app client's secret (needed to compute the SECRET_HASH for auth
14
+ * flows). Throws ClientSecretNotFoundError when the client has no secret.
15
+ */
3
16
  export const getUserPoolClientSecret = async (userPoolId, clientId, region) => {
4
17
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
5
18
  region,
@@ -9,9 +22,10 @@ export const getUserPoolClientSecret = async (userPoolId, clientId, region) => {
9
22
  UserPoolId: userPoolId,
10
23
  };
11
24
  const response = await cognitoClient.send(new DescribeUserPoolClientCommand(params));
12
- if (!response.UserPoolClient?.ClientSecret) {
13
- throw new Error('Can not find client secret for Cognito user pool client');
25
+ const clientSecret = response.UserPoolClient?.ClientSecret;
26
+ if (!clientSecret) {
27
+ throw new ClientSecretNotFoundError();
14
28
  }
15
- return response.UserPoolClient?.ClientSecret;
29
+ return clientSecret;
16
30
  };
17
31
  //# sourceMappingURL=getUserPoolClientSecret.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserPoolClientSecret.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getUserPoolClientSecret.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,GAE9B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAAE,UAAkB,EAAE,QAAgB,EAAE,MAAc,EAAmB,EAAE;IACrH,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,MAAM,GAAuC;QACjD,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;KACvB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,6BAA6B,CAAC,MAAM,CAAC,CAAC,CAAC;IAErF,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,YAAY,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC;AAC/C,CAAC,CAAC","sourcesContent":["import {\n CognitoIdentityProviderClient,\n DescribeUserPoolClientCommand,\n DescribeUserPoolClientCommandInput,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\n\nexport const getUserPoolClientSecret = async (userPoolId: string, clientId: string, region: string): Promise<string> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const params: DescribeUserPoolClientCommandInput = {\n ClientId: clientId,\n UserPoolId: userPoolId,\n };\n\n const response = await cognitoClient.send(new DescribeUserPoolClientCommand(params));\n\n if (!response.UserPoolClient?.ClientSecret) {\n throw new Error('Can not find client secret for Cognito user pool client');\n }\n\n return response.UserPoolClient?.ClientSecret;\n};\n"]}
1
+ {"version":3,"file":"getUserPoolClientSecret.js","sourceRoot":"","sources":["../../../../src/logic/cognito/getUserPoolClientSecret.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,GAE9B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,+EAA+E;AAC/E,sEAAsE;AACtE,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACzC,IAAI,GAAG,yBAAyB,CAAC;IAE1C;QACE,KAAK,CAAC,yDAAyD,CAAC,CAAC;QACjE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAAE,UAAkB,EAAE,QAAgB,EAAE,MAAc,EAAmB,EAAE;IACrH,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,MAAM,GAAuC;QACjD,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;KACvB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,6BAA6B,CAAC,MAAM,CAAC,CAAC,CAAC;IAErF,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC;IAC3D,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,yBAAyB,EAAE,CAAC;IACxC,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import {\n CognitoIdentityProviderClient,\n DescribeUserPoolClientCommand,\n DescribeUserPoolClientCommandInput,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\n\n// DescribeUserPoolClient succeeds even when the app client has no secret, so a\n// missing secret is a hand-thrown, discriminable configuration error.\nexport class ClientSecretNotFoundError extends Error {\n readonly code = 'CLIENT_SECRET_NOT_FOUND';\n\n constructor() {\n super('Can not find client secret for Cognito user pool client');\n this.name = 'ClientSecretNotFoundError';\n }\n}\n\n/**\n * Fetches the app client's secret (needed to compute the SECRET_HASH for auth\n * flows). Throws ClientSecretNotFoundError when the client has no secret.\n */\nexport const getUserPoolClientSecret = async (userPoolId: string, clientId: string, region: string): Promise<string> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const params: DescribeUserPoolClientCommandInput = {\n ClientId: clientId,\n UserPoolId: userPoolId,\n };\n\n const response = await cognitoClient.send(new DescribeUserPoolClientCommand(params));\n\n const clientSecret = response.UserPoolClient?.ClientSecret;\n if (!clientSecret) {\n throw new ClientSecretNotFoundError();\n }\n\n return clientSecret;\n};\n"]}
@@ -1,3 +1,6 @@
1
+ // Deliberately curated: this barrel is re-exported from the package root (via
2
+ // src/logic/index.ts), so everything here is public API. Internal consumers
3
+ // import sibling files directly; only add here to grow the public surface.
1
4
  export * from './decodeAccessToken';
2
5
  export * from './decodeValidJwt';
3
6
  export * from './globalSignOut';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/logic/cognito/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './decodeAccessToken';\nexport * from './decodeValidJwt';\nexport * from './globalSignOut';\nexport * from './revokeRefreshToken';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/logic/cognito/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC","sourcesContent":["// Deliberately curated: this barrel is re-exported from the package root (via\n// src/logic/index.ts), so everything here is public API. Internal consumers\n// import sibling files directly; only add here to grow the public surface.\nexport * from './decodeAccessToken';\nexport * from './decodeValidJwt';\nexport * from './globalSignOut';\nexport * from './revokeRefreshToken';\n"]}
@@ -1,7 +1,7 @@
1
1
  import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
- import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
4
- import { pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';
3
+ import { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';
4
+ import { getValidCognitoUserAttributes, pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';
5
5
  export const listPagedUsers = async (userPoolId, region, pageKey) => {
6
6
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
7
7
  region,
@@ -10,13 +10,9 @@ export const listPagedUsers = async (userPoolId, region, pageKey) => {
10
10
  UserPoolId: userPoolId,
11
11
  PaginationToken: pageKeyToPaginationToken(pageKey),
12
12
  }));
13
- const users = (response.Users || []).map((user) => {
14
- const validAttributes = (user.Attributes || []).filter((attr) => attr.Name && attr.Value);
15
- return getQpqAttributesFromCognitoUserAttributes(validAttributes);
16
- });
17
13
  return {
18
14
  nextPageKey: paginationTokenToPageKey(response.PaginationToken),
19
- items: users,
15
+ items: (response.Users || []).map((user) => getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(user.Attributes))),
20
16
  };
21
17
  };
22
18
  //# sourceMappingURL=listPagedUsers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listPagedUsers.js","sourceRoot":"","sources":["../../../../src/logic/cognito/listPagedUsers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAqB,MAAM,2CAA2C,CAAC;AAE/H,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAE7E,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,OAAgB,EAAyC,EAAE;IAClI,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAsB,MAAM,aAAa,CAAC,IAAI,CAC1D,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,wBAAwB,CAAC,OAAO,CAAC;KACnD,CAAC,CACH,CAAC;IAEF,MAAM,KAAK,GAAqB,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClE,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAGrF,CAAC;QAEJ,OAAO,yCAAyC,CAAC,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,wBAAwB,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC/D,KAAK,EAAE,KAAK;KACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { QpqPagedData, UserAttributes } from 'quidproquo-core';\n\nimport { CognitoIdentityProviderClient, ListUsersCommand, ListUsersResponse } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';\nimport { pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';\n\nexport const listPagedUsers = async (userPoolId: string, region: string, pageKey?: string): Promise<QpqPagedData<UserAttributes>> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response: ListUsersResponse = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n PaginationToken: pageKeyToPaginationToken(pageKey),\n }),\n );\n\n const users: UserAttributes[] = (response.Users || []).map((user) => {\n const validAttributes = (user.Attributes || []).filter((attr) => attr.Name && attr.Value) as {\n Name: string;\n Value: string;\n }[];\n\n return getQpqAttributesFromCognitoUserAttributes(validAttributes);\n });\n\n return {\n nextPageKey: paginationTokenToPageKey(response.PaginationToken),\n items: users,\n };\n};\n"]}
1
+ {"version":3,"file":"listPagedUsers.js","sourceRoot":"","sources":["../../../../src/logic/cognito/listPagedUsers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAE5G,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,OAAgB,EAAyC,EAAE;IAClI,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,wBAAwB,CAAC,OAAO,CAAC;KACnD,CAAC,CACH,CAAC;IAEF,OAAO;QACL,WAAW,EAAE,wBAAwB,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC/D,KAAK,EAAE,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,yCAAyC,CAAC,6BAA6B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;KACvI,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { QpqPagedData, UserAttributes } from 'quidproquo-core';\n\nimport { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';\nimport { getValidCognitoUserAttributes, pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';\n\nexport const listPagedUsers = async (userPoolId: string, region: string, pageKey?: string): Promise<QpqPagedData<UserAttributes>> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n PaginationToken: pageKeyToPaginationToken(pageKey),\n }),\n );\n\n return {\n nextPageKey: paginationTokenToPageKey(response.PaginationToken),\n items: (response.Users || []).map((user) => getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(user.Attributes))),\n };\n};\n"]}
@@ -1,2 +1,7 @@
1
1
  import { QpqPagedData, UserAttributes } from 'quidproquo-core';
2
+ /**
3
+ * Lists users whose attribute exactly matches the given value.
4
+ * Throws InvalidCognitoFilterError (code INVALID_COGNITO_FILTER) when the
5
+ * attribute name or value cannot be embedded safely in a Cognito filter.
6
+ */
2
7
  export declare const listPagedUsersByAttribute: (userPoolId: string, region: string, attributeName: string, attributeValue: string, limit?: number, pageKey?: string) => Promise<QpqPagedData<UserAttributes>>;
@@ -1,7 +1,12 @@
1
1
  import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
- import { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';
4
- import { pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';
3
+ import { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';
4
+ import { buildCognitoUserFilter, getValidCognitoUserAttributes, pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';
5
+ /**
6
+ * Lists users whose attribute exactly matches the given value.
7
+ * Throws InvalidCognitoFilterError (code INVALID_COGNITO_FILTER) when the
8
+ * attribute name or value cannot be embedded safely in a Cognito filter.
9
+ */
5
10
  export const listPagedUsersByAttribute = async (userPoolId, region, attributeName, attributeValue, limit, pageKey) => {
6
11
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
7
12
  region,
@@ -9,16 +14,12 @@ export const listPagedUsersByAttribute = async (userPoolId, region, attributeNam
9
14
  const response = await cognitoClient.send(new ListUsersCommand({
10
15
  UserPoolId: userPoolId,
11
16
  Limit: limit,
12
- Filter: `${attributeName} = "${attributeValue}"`,
17
+ Filter: buildCognitoUserFilter(attributeName, attributeValue),
13
18
  PaginationToken: pageKeyToPaginationToken(pageKey),
14
19
  }));
15
- const users = (response.Users || []).map((user) => {
16
- const validAttributes = (user.Attributes || []).filter((attr) => attr.Name && attr.Value);
17
- return getQpqAttributesFromCognitoUserAttributes(validAttributes);
18
- });
19
20
  return {
20
21
  nextPageKey: paginationTokenToPageKey(response.PaginationToken),
21
- items: users,
22
+ items: (response.Users || []).map((user) => getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(user.Attributes))),
22
23
  };
23
24
  };
24
25
  //# sourceMappingURL=listPagedUsersByAttribute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listPagedUsersByAttribute.js","sourceRoot":"","sources":["../../../../src/logic/cognito/listPagedUsersByAttribute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAqB,MAAM,2CAA2C,CAAC;AAE/H,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAE7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,UAAkB,EAClB,MAAc,EACd,aAAqB,EACrB,cAAsB,EACtB,KAAc,EACd,OAAgB,EACuB,EAAE;IACzC,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAsB,MAAM,aAAa,CAAC,IAAI,CAC1D,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,GAAG,aAAa,OAAO,cAAc,GAAG;QAChD,eAAe,EAAE,wBAAwB,CAAC,OAAO,CAAC;KACnD,CAAC,CACH,CAAC;IAEF,MAAM,KAAK,GAAqB,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClE,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAGrF,CAAC;QAEJ,OAAO,yCAAyC,CAAC,eAAe,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,wBAAwB,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC/D,KAAK,EAAE,KAAK;KACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { QpqPagedData, UserAttributes } from 'quidproquo-core';\n\nimport { CognitoIdentityProviderClient, ListUsersCommand, ListUsersResponse } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getQpqAttributesFromCognitoUserAttributes } from './cognitoAttributeMap';\nimport { pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';\n\nexport const listPagedUsersByAttribute = async (\n userPoolId: string,\n region: string,\n attributeName: string,\n attributeValue: string,\n limit?: number,\n pageKey?: string,\n): Promise<QpqPagedData<UserAttributes>> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response: ListUsersResponse = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n Limit: limit,\n Filter: `${attributeName} = \"${attributeValue}\"`,\n PaginationToken: pageKeyToPaginationToken(pageKey),\n }),\n );\n\n const users: UserAttributes[] = (response.Users || []).map((user) => {\n const validAttributes = (user.Attributes || []).filter((attr) => attr.Name && attr.Value) as {\n Name: string;\n Value: string;\n }[];\n\n return getQpqAttributesFromCognitoUserAttributes(validAttributes);\n });\n\n return {\n nextPageKey: paginationTokenToPageKey(response.PaginationToken),\n items: users,\n };\n};\n"]}
1
+ {"version":3,"file":"listPagedUsersByAttribute.js","sourceRoot":"","sources":["../../../../src/logic/cognito/listPagedUsersByAttribute.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEpI;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,UAAkB,EAClB,MAAc,EACd,aAAqB,EACrB,cAAsB,EACtB,KAAc,EACd,OAAgB,EACuB,EAAE;IACzC,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,sBAAsB,CAAC,aAAa,EAAE,cAAc,CAAC;QAC7D,eAAe,EAAE,wBAAwB,CAAC,OAAO,CAAC;KACnD,CAAC,CACH,CAAC;IAEF,OAAO;QACL,WAAW,EAAE,wBAAwB,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC/D,KAAK,EAAE,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,yCAAyC,CAAC,6BAA6B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;KACvI,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { QpqPagedData, UserAttributes } from 'quidproquo-core';\n\nimport { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getQpqAttributesFromCognitoUserAttributes } from './getQpqAttributesFromCognitoUserAttributes';\nimport { buildCognitoUserFilter, getValidCognitoUserAttributes, pageKeyToPaginationToken, paginationTokenToPageKey } from './utils';\n\n/**\n * Lists users whose attribute exactly matches the given value.\n * Throws InvalidCognitoFilterError (code INVALID_COGNITO_FILTER) when the\n * attribute name or value cannot be embedded safely in a Cognito filter.\n */\nexport const listPagedUsersByAttribute = async (\n userPoolId: string,\n region: string,\n attributeName: string,\n attributeValue: string,\n limit?: number,\n pageKey?: string,\n): Promise<QpqPagedData<UserAttributes>> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n Limit: limit,\n Filter: buildCognitoUserFilter(attributeName, attributeValue),\n PaginationToken: pageKeyToPaginationToken(pageKey),\n }),\n );\n\n return {\n nextPageKey: paginationTokenToPageKey(response.PaginationToken),\n items: (response.Users || []).map((user) => getQpqAttributesFromCognitoUserAttributes(getValidCognitoUserAttributes(user.Attributes))),\n };\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  import { AdminInitiateAuthCommand, AuthFlowType, CognitoIdentityProviderClient, } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
3
  import { calculateSecretHash } from './utils/calculateSecretHash';
4
- import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/transformCognitoResponse';
4
+ import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo';
5
5
  import { getUserPoolClientSecret } from './getUserPoolClientSecret';
6
6
  export const refreshToken = async (userPoolId, clientId, region, username, refreshToken) => {
7
7
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
@@ -18,15 +18,16 @@ export const refreshToken = async (userPoolId, clientId, region, username, refre
18
18
  SECRET_HASH: secretHash,
19
19
  },
20
20
  };
21
- // Time we issued the request
21
+ // Token expiry is computed relative to this; captured before the call so the
22
+ // derived expiresAt errs early rather than late.
22
23
  const issueDateTime = new Date().toISOString();
23
24
  const response = await cognitoClient.send(new AdminInitiateAuthCommand(params));
24
25
  const authResponse = cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo(response, issueDateTime);
25
- // Cognito's REFRESH_TOKEN_AUTH flow does NOT return a refresh token — the existing one stays
26
- // valid and is reused so AuthenticationResult.RefreshToken is undefined here. Carry the
27
- // caller's refresh token forward so the client keeps a usable session; without this it's
28
- // dropped after the first refresh and the session can never refresh again. (If refresh-token
29
- // rotation is ever enabled, Cognito DOES return a new one then we keep that instead.)
26
+ // With rotation disabled, Cognito's REFRESH_TOKEN_AUTH flow does not return a
27
+ // refresh token: the existing one stays valid and is reused. Carry the caller's
28
+ // token forward so the client keeps a usable session; without this it is dropped
29
+ // after the first refresh and the session can never refresh again. If rotation
30
+ // is ever enabled Cognito does return a new token, and that one wins.
30
31
  if (authResponse.authenticationInfo && !authResponse.authenticationInfo.refreshToken) {
31
32
  authResponse.authenticationInfo.refreshToken = refreshToken;
32
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"refreshToken.js","sourceRoot":"","sources":["../../../../src/logic/cognito/refreshToken.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EAExB,YAAY,EACZ,6BAA6B,GAC9B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uDAAuD,EAAE,MAAM,kCAAkC,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,UAAkB,EAClB,QAAgB,EAChB,MAAc,EACd,QAAgB,EAChB,YAAoB,EACe,EAAE;IACrC,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,MAAM,uBAAuB,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjF,MAAM,UAAU,GAAG,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAEzE,MAAM,MAAM,GAAkC;QAC5C,QAAQ,EAAE,YAAY,CAAC,kBAAkB;QACzC,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ;QAElB,cAAc,EAAE;YACd,aAAa,EAAE,YAAY;YAC3B,WAAW,EAAE,UAAU;SACxB;KACF,CAAC;IAEF,6BAA6B;IAC7B,MAAM,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC;IAEhF,MAAM,YAAY,GAAG,uDAAuD,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEtG,6FAA6F;IAC7F,0FAA0F;IAC1F,yFAAyF;IACzF,6FAA6F;IAC7F,wFAAwF;IACxF,IAAI,YAAY,CAAC,kBAAkB,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;QACrF,YAAY,CAAC,kBAAkB,CAAC,YAAY,GAAG,YAAY,CAAC;IAC9D,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import { AuthenticateUserResponse } from 'quidproquo-core';\n\nimport {\n AdminInitiateAuthCommand,\n AdminInitiateAuthCommandInput,\n AuthFlowType,\n CognitoIdentityProviderClient,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { calculateSecretHash } from './utils/calculateSecretHash';\nimport { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/transformCognitoResponse';\nimport { getUserPoolClientSecret } from './getUserPoolClientSecret';\n\nexport const refreshToken = async (\n userPoolId: string,\n clientId: string,\n region: string,\n username: string,\n refreshToken: string,\n): Promise<AuthenticateUserResponse> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);\n const secretHash = calculateSecretHash(username, clientId, clientSecret);\n\n const params: AdminInitiateAuthCommandInput = {\n AuthFlow: AuthFlowType.REFRESH_TOKEN_AUTH,\n UserPoolId: userPoolId,\n ClientId: clientId,\n\n AuthParameters: {\n REFRESH_TOKEN: refreshToken,\n SECRET_HASH: secretHash,\n },\n };\n\n // Time we issued the request\n const issueDateTime = new Date().toISOString();\n const response = await cognitoClient.send(new AdminInitiateAuthCommand(params));\n\n const authResponse = cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo(response, issueDateTime);\n\n // Cognito's REFRESH_TOKEN_AUTH flow does NOT return a refresh token the existing one stays\n // valid and is reused — so AuthenticationResult.RefreshToken is undefined here. Carry the\n // caller's refresh token forward so the client keeps a usable session; without this it's\n // dropped after the first refresh and the session can never refresh again. (If refresh-token\n // rotation is ever enabled, Cognito DOES return a new one then we keep that instead.)\n if (authResponse.authenticationInfo && !authResponse.authenticationInfo.refreshToken) {\n authResponse.authenticationInfo.refreshToken = refreshToken;\n }\n\n return authResponse;\n};\n"]}
1
+ {"version":3,"file":"refreshToken.js","sourceRoot":"","sources":["../../../../src/logic/cognito/refreshToken.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EAExB,YAAY,EACZ,6BAA6B,GAC9B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uDAAuD,EAAE,MAAM,iEAAiE,CAAC;AAC1I,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,UAAkB,EAClB,QAAgB,EAChB,MAAc,EACd,QAAgB,EAChB,YAAoB,EACe,EAAE;IACrC,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,MAAM,uBAAuB,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjF,MAAM,UAAU,GAAG,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAEzE,MAAM,MAAM,GAAkC;QAC5C,QAAQ,EAAE,YAAY,CAAC,kBAAkB;QACzC,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ;QAElB,cAAc,EAAE;YACd,aAAa,EAAE,YAAY;YAC3B,WAAW,EAAE,UAAU;SACxB;KACF,CAAC;IAEF,6EAA6E;IAC7E,iDAAiD;IACjD,MAAM,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC;IAEhF,MAAM,YAAY,GAAG,uDAAuD,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEtG,8EAA8E;IAC9E,gFAAgF;IAChF,iFAAiF;IACjF,+EAA+E;IAC/E,sEAAsE;IACtE,IAAI,YAAY,CAAC,kBAAkB,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;QACrF,YAAY,CAAC,kBAAkB,CAAC,YAAY,GAAG,YAAY,CAAC;IAC9D,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import { AuthenticateUserResponse } from 'quidproquo-core';\n\nimport {\n AdminInitiateAuthCommand,\n AdminInitiateAuthCommandInput,\n AuthFlowType,\n CognitoIdentityProviderClient,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { calculateSecretHash } from './utils/calculateSecretHash';\nimport { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo';\nimport { getUserPoolClientSecret } from './getUserPoolClientSecret';\n\nexport const refreshToken = async (\n userPoolId: string,\n clientId: string,\n region: string,\n username: string,\n refreshToken: string,\n): Promise<AuthenticateUserResponse> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);\n const secretHash = calculateSecretHash(username, clientId, clientSecret);\n\n const params: AdminInitiateAuthCommandInput = {\n AuthFlow: AuthFlowType.REFRESH_TOKEN_AUTH,\n UserPoolId: userPoolId,\n ClientId: clientId,\n\n AuthParameters: {\n REFRESH_TOKEN: refreshToken,\n SECRET_HASH: secretHash,\n },\n };\n\n // Token expiry is computed relative to this; captured before the call so the\n // derived expiresAt errs early rather than late.\n const issueDateTime = new Date().toISOString();\n const response = await cognitoClient.send(new AdminInitiateAuthCommand(params));\n\n const authResponse = cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo(response, issueDateTime);\n\n // With rotation disabled, Cognito's REFRESH_TOKEN_AUTH flow does not return a\n // refresh token: the existing one stays valid and is reused. Carry the caller's\n // token forward so the client keeps a usable session; without this it is dropped\n // after the first refresh and the session can never refresh again. If rotation\n // is ever enabled Cognito does return a new token, and that one wins.\n if (authResponse.authenticationInfo && !authResponse.authenticationInfo.refreshToken) {\n authResponse.authenticationInfo.refreshToken = refreshToken;\n }\n\n return authResponse;\n};\n"]}
@@ -1,19 +1,15 @@
1
1
  import { CognitoIdentityProviderClient, GetUserAttributeVerificationCodeCommand, } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
+ import { cognitoCodeDeliveryDetailsToQpqDeliveryDetails } from './utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails';
3
4
  export const requestEmailVerificationCode = async (region, accessToken) => {
4
5
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
5
6
  region,
6
7
  });
7
8
  const params = {
8
9
  AccessToken: accessToken,
9
- AttributeName: 'email', // Request verification for the email attribute
10
+ AttributeName: 'email',
10
11
  };
11
12
  const response = await cognitoClient.send(new GetUserAttributeVerificationCodeCommand(params));
12
- const deliveryInfo = {
13
- attributeName: response.CodeDeliveryDetails?.AttributeName || 'email',
14
- destination: response.CodeDeliveryDetails?.Destination || 'unknown@email.com',
15
- deliveryMedium: response.CodeDeliveryDetails?.DeliveryMedium || 'EMAIL',
16
- };
17
- return deliveryInfo;
13
+ return cognitoCodeDeliveryDetailsToQpqDeliveryDetails(response.CodeDeliveryDetails);
18
14
  };
19
15
  //# sourceMappingURL=requestEmailVerificationCode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"requestEmailVerificationCode.js","sourceRoot":"","sources":["../../../../src/logic/cognito/requestEmailVerificationCode.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,6BAA6B,EAC7B,uCAAuC,GAExC,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,EAAE,MAAc,EAAE,WAAmB,EAA0C,EAAE;IAChI,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,MAAM,GAAiD;QAC3D,WAAW,EAAE,WAAW;QACxB,aAAa,EAAE,OAAO,EAAE,+CAA+C;KACxE,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,uCAAuC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/F,MAAM,YAAY,GAAG;QACnB,aAAa,EAAE,QAAQ,CAAC,mBAAmB,EAAE,aAAa,IAAI,OAAO;QACrE,WAAW,EAAE,QAAQ,CAAC,mBAAmB,EAAE,WAAW,IAAI,mBAAmB;QAC7E,cAAc,EAAE,QAAQ,CAAC,mBAAmB,EAAE,cAAc,IAAI,OAAO;KACvC,CAAC;IAEnC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import { AuthenticationDeliveryDetails } from 'quidproquo-core';\n\nimport {\n CognitoIdentityProviderClient,\n GetUserAttributeVerificationCodeCommand,\n GetUserAttributeVerificationCodeCommandInput,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\n\nexport const requestEmailVerificationCode = async (region: string, accessToken: string): Promise<AuthenticationDeliveryDetails> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const params: GetUserAttributeVerificationCodeCommandInput = {\n AccessToken: accessToken,\n AttributeName: 'email', // Request verification for the email attribute\n };\n\n const response = await cognitoClient.send(new GetUserAttributeVerificationCodeCommand(params));\n\n const deliveryInfo = {\n attributeName: response.CodeDeliveryDetails?.AttributeName || 'email',\n destination: response.CodeDeliveryDetails?.Destination || 'unknown@email.com',\n deliveryMedium: response.CodeDeliveryDetails?.DeliveryMedium || 'EMAIL',\n } as AuthenticationDeliveryDetails;\n\n return deliveryInfo;\n};\n"]}
1
+ {"version":3,"file":"requestEmailVerificationCode.js","sourceRoot":"","sources":["../../../../src/logic/cognito/requestEmailVerificationCode.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,6BAA6B,EAC7B,uCAAuC,GAExC,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,8CAA8C,EAAE,MAAM,wDAAwD,CAAC;AAExH,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,EAAE,MAAc,EAAE,WAAmB,EAA0C,EAAE;IAChI,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,MAAM,GAAiD;QAC3D,WAAW,EAAE,WAAW;QACxB,aAAa,EAAE,OAAO;KACvB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,uCAAuC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/F,OAAO,8CAA8C,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACtF,CAAC,CAAC","sourcesContent":["import { AuthenticationDeliveryDetails } from 'quidproquo-core';\n\nimport {\n CognitoIdentityProviderClient,\n GetUserAttributeVerificationCodeCommand,\n GetUserAttributeVerificationCodeCommandInput,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { cognitoCodeDeliveryDetailsToQpqDeliveryDetails } from './utils/cognitoCodeDeliveryDetailsToQpqDeliveryDetails';\n\nexport const requestEmailVerificationCode = async (region: string, accessToken: string): Promise<AuthenticationDeliveryDetails> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const params: GetUserAttributeVerificationCodeCommandInput = {\n AccessToken: accessToken,\n AttributeName: 'email',\n };\n\n const response = await cognitoClient.send(new GetUserAttributeVerificationCodeCommand(params));\n\n return cognitoCodeDeliveryDetailsToQpqDeliveryDetails(response.CodeDeliveryDetails);\n};\n"]}
@@ -1 +1,6 @@
1
+ /**
2
+ * Resolves a login alias (preferred_username) to the real Cognito username.
3
+ * Falls back to the input when nothing matches, so callers can pass either a
4
+ * preferred username or an actual username.
5
+ */
1
6
  export declare const resolveUsernameByPreferredUsername: (userPoolId: string, region: string, preferredUsername: string) => Promise<string>;
@@ -1,15 +1,38 @@
1
1
  import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
+ import { buildCognitoUserFilter, InvalidCognitoFilterError } from './utils/buildCognitoUserFilter';
4
+ // A value that cannot be embedded in a Cognito filter cannot be anyone's
5
+ // preferred_username, so we skip the lookup and treat the input as an actual
6
+ // username (the same fallback as a no-match lookup).
7
+ const buildPreferredUsernameFilter = (preferredUsername) => {
8
+ try {
9
+ return buildCognitoUserFilter('preferred_username', preferredUsername);
10
+ }
11
+ catch (error) {
12
+ if (error instanceof InvalidCognitoFilterError) {
13
+ return null;
14
+ }
15
+ throw error;
16
+ }
17
+ };
18
+ /**
19
+ * Resolves a login alias (preferred_username) to the real Cognito username.
20
+ * Falls back to the input when nothing matches, so callers can pass either a
21
+ * preferred username or an actual username.
22
+ */
3
23
  export const resolveUsernameByPreferredUsername = async (userPoolId, region, preferredUsername) => {
24
+ const filter = buildPreferredUsernameFilter(preferredUsername);
25
+ if (!filter) {
26
+ return preferredUsername;
27
+ }
4
28
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
5
29
  region,
6
30
  });
7
31
  const response = await cognitoClient.send(new ListUsersCommand({
8
32
  UserPoolId: userPoolId,
9
33
  Limit: 1,
10
- Filter: `preferred_username = "${preferredUsername}"`,
34
+ Filter: filter,
11
35
  }));
12
- const resolvedUsername = response.Users?.[0]?.Username;
13
- return resolvedUsername || preferredUsername;
36
+ return response.Users?.[0]?.Username || preferredUsername;
14
37
  };
15
38
  //# sourceMappingURL=resolveUsernameByPreferredUsername.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveUsernameByPreferredUsername.js","sourceRoot":"","sources":["../../../../src/logic/cognito/resolveUsernameByPreferredUsername.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,kCAAkC,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,iBAAyB,EAAmB,EAAE;IACzI,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,yBAAyB,iBAAiB,GAAG;KACtD,CAAC,CACH,CAAC;IAEF,MAAM,gBAAgB,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IAEvD,OAAO,gBAAgB,IAAI,iBAAiB,CAAC;AAC/C,CAAC,CAAC","sourcesContent":["import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\n\nexport const resolveUsernameByPreferredUsername = async (userPoolId: string, region: string, preferredUsername: string): Promise<string> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n Limit: 1,\n Filter: `preferred_username = \"${preferredUsername}\"`,\n }),\n );\n\n const resolvedUsername = response.Users?.[0]?.Username;\n\n return resolvedUsername || preferredUsername;\n};\n"]}
1
+ {"version":3,"file":"resolveUsernameByPreferredUsername.js","sourceRoot":"","sources":["../../../../src/logic/cognito/resolveUsernameByPreferredUsername.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEnG,yEAAyE;AACzE,6EAA6E;AAC7E,qDAAqD;AACrD,MAAM,4BAA4B,GAAG,CAAC,iBAAyB,EAAiB,EAAE;IAChF,IAAI,CAAC;QACH,OAAO,sBAAsB,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;IACzE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,yBAAyB,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,iBAAyB,EAAmB,EAAE;IACzI,MAAM,MAAM,GAAG,4BAA4B,CAAC,iBAAiB,CAAC,CAAC;IAC/D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CACvC,IAAI,gBAAgB,CAAC;QACnB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,MAAM;KACf,CAAC,CACH,CAAC;IAEF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,iBAAiB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["import { CognitoIdentityProviderClient, ListUsersCommand } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { buildCognitoUserFilter, InvalidCognitoFilterError } from './utils/buildCognitoUserFilter';\n\n// A value that cannot be embedded in a Cognito filter cannot be anyone's\n// preferred_username, so we skip the lookup and treat the input as an actual\n// username (the same fallback as a no-match lookup).\nconst buildPreferredUsernameFilter = (preferredUsername: string): string | null => {\n try {\n return buildCognitoUserFilter('preferred_username', preferredUsername);\n } catch (error) {\n if (error instanceof InvalidCognitoFilterError) {\n return null;\n }\n throw error;\n }\n};\n\n/**\n * Resolves a login alias (preferred_username) to the real Cognito username.\n * Falls back to the input when nothing matches, so callers can pass either a\n * preferred username or an actual username.\n */\nexport const resolveUsernameByPreferredUsername = async (userPoolId: string, region: string, preferredUsername: string): Promise<string> => {\n const filter = buildPreferredUsernameFilter(preferredUsername);\n if (!filter) {\n return preferredUsername;\n }\n\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const response = await cognitoClient.send(\n new ListUsersCommand({\n UserPoolId: userPoolId,\n Limit: 1,\n Filter: filter,\n }),\n );\n\n return response.Users?.[0]?.Username || preferredUsername;\n};\n"]}
@@ -0,0 +1,8 @@
1
+ import { AuthenticateUserResponse } from 'quidproquo-core';
2
+ import { ChallengeNameType } from '@aws-sdk/client-cognito-identity-provider';
3
+ /**
4
+ * Answers a pending Cognito auth challenge (new password, TOTP code, custom
5
+ * challenge, ...) using the session from the previous auth step. Returns either
6
+ * issued tokens or the next challenge.
7
+ */
8
+ export declare const respondToAuthChallenge: (userPoolId: string, clientId: string, region: string, username: string, session: string, challengeNameType: ChallengeNameType, attributes: Record<string, string>) => Promise<AuthenticateUserResponse>;
@@ -1,9 +1,14 @@
1
1
  import { CognitoIdentityProviderClient, RespondToAuthChallengeCommand, } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
3
  import { calculateSecretHash } from './utils/calculateSecretHash';
4
- import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/transformCognitoResponse';
4
+ import { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo';
5
5
  import { getUserPoolClientSecret } from './getUserPoolClientSecret';
6
- export const respondToAuthChallengeChallenge = async (userPoolId, clientId, region, username, session, challengeNameType, attributes) => {
6
+ /**
7
+ * Answers a pending Cognito auth challenge (new password, TOTP code, custom
8
+ * challenge, ...) using the session from the previous auth step. Returns either
9
+ * issued tokens or the next challenge.
10
+ */
11
+ export const respondToAuthChallenge = async (userPoolId, clientId, region, username, session, challengeNameType, attributes) => {
7
12
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
8
13
  region,
9
14
  });
@@ -19,9 +24,10 @@ export const respondToAuthChallengeChallenge = async (userPoolId, clientId, regi
19
24
  ...attributes,
20
25
  },
21
26
  };
27
+ // Token expiry is computed relative to this; captured before the call so the
28
+ // derived expiresAt errs early rather than late.
22
29
  const issueDateTime = new Date().toISOString();
23
30
  const response = await cognitoClient.send(new RespondToAuthChallengeCommand(params));
24
- // transform the response into your custom format, similar to your refreshToken function
25
31
  return cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo(response, issueDateTime);
26
32
  };
27
- //# sourceMappingURL=respondToAuthChallengeChallenge.js.map
33
+ //# sourceMappingURL=respondToAuthChallenge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"respondToAuthChallenge.js","sourceRoot":"","sources":["../../../../src/logic/cognito/respondToAuthChallenge.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,6BAA6B,EAC7B,6BAA6B,GAE9B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uDAAuD,EAAE,MAAM,iEAAiE,CAAC;AAC1I,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,UAAkB,EAClB,QAAgB,EAChB,MAAc,EACd,QAAgB,EAChB,OAAe,EACf,iBAAoC,EACpC,UAAkC,EACC,EAAE;IACrC,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,MAAM,uBAAuB,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjF,MAAM,UAAU,GAAG,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAEzE,MAAM,MAAM,GAAuC;QACjD,aAAa,EAAE,iBAAiB;QAChC,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,OAAO;QAChB,kBAAkB,EAAE;YAClB,QAAQ,EAAE,QAAQ;YAClB,WAAW,EAAE,UAAU;YAEvB,GAAG,UAAU;SACd;KACF,CAAC;IAEF,6EAA6E;IAC7E,iDAAiD;IACjD,MAAM,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,6BAA6B,CAAC,MAAM,CAAC,CAAC,CAAC;IAErF,OAAO,uDAAuD,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import { AuthenticateUserResponse } from 'quidproquo-core';\n\nimport {\n ChallengeNameType,\n CognitoIdentityProviderClient,\n RespondToAuthChallengeCommand,\n RespondToAuthChallengeCommandInput,\n} from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { calculateSecretHash } from './utils/calculateSecretHash';\nimport { cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo } from './utils/cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo';\nimport { getUserPoolClientSecret } from './getUserPoolClientSecret';\n\n/**\n * Answers a pending Cognito auth challenge (new password, TOTP code, custom\n * challenge, ...) using the session from the previous auth step. Returns either\n * issued tokens or the next challenge.\n */\nexport const respondToAuthChallenge = async (\n userPoolId: string,\n clientId: string,\n region: string,\n username: string,\n session: string,\n challengeNameType: ChallengeNameType,\n attributes: Record<string, string>,\n): Promise<AuthenticateUserResponse> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const clientSecret = await getUserPoolClientSecret(userPoolId, clientId, region);\n const secretHash = calculateSecretHash(username, clientId, clientSecret);\n\n const params: RespondToAuthChallengeCommandInput = {\n ChallengeName: challengeNameType,\n ClientId: clientId,\n Session: session,\n ChallengeResponses: {\n USERNAME: username,\n SECRET_HASH: secretHash,\n\n ...attributes,\n },\n };\n\n // Token expiry is computed relative to this; captured before the call so the\n // derived expiresAt errs early rather than late.\n const issueDateTime = new Date().toISOString();\n const response = await cognitoClient.send(new RespondToAuthChallengeCommand(params));\n\n return cognitoAdminInitiateAuthResponseToQpqAuthenticationInfo(response, issueDateTime);\n};\n"]}
@@ -1,16 +1,16 @@
1
1
  import { AdminUpdateUserAttributesCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
2
2
  import { createAwsClient } from '../createAwsClient';
3
- import { getCognitoUserAttributesFromQpqUserAttributes } from './cognitoAttributeMap';
3
+ import { getCognitoUserAttributesFromQpqUserAttributes } from './getCognitoUserAttributesFromQpqUserAttributes';
4
4
  export const setUserAttributes = async (userPoolId, region, username, userAttributes) => {
5
5
  const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {
6
6
  region,
7
7
  });
8
+ // userId maps to the immutable sub attribute, so it must never be written back.
8
9
  const { userId, ...writeableUserAttributes } = userAttributes;
9
- const params = {
10
+ await cognitoClient.send(new AdminUpdateUserAttributesCommand({
10
11
  UserPoolId: userPoolId,
11
12
  Username: username,
12
13
  UserAttributes: getCognitoUserAttributesFromQpqUserAttributes(writeableUserAttributes),
13
- };
14
- await cognitoClient.send(new AdminUpdateUserAttributesCommand(params));
14
+ }));
15
15
  };
16
16
  //# sourceMappingURL=setUserAttributes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setUserAttributes.js","sourceRoot":"","sources":["../../../../src/logic/cognito/setUserAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gCAAgC,EAAiB,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAE3I,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,6CAA6C,EAAE,MAAM,uBAAuB,CAAC;AAEtF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,QAAgB,EAAE,cAA8B,EAAiB,EAAE;IAC7I,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,EAAE,MAAM,EAAE,GAAG,uBAAuB,EAAE,GAAG,cAAc,CAAC;IAE9D,MAAM,MAAM,GAAG;QACb,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,6CAA6C,CAAC,uBAAuB,CAAC;KACvF,CAAC;IAEF,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,gCAAgC,CAAC,MAAM,CAAC,CAAC,CAAC;AACzE,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { AdminUpdateUserAttributesCommand, AttributeType, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getCognitoUserAttributesFromQpqUserAttributes } from './cognitoAttributeMap';\n\nexport const setUserAttributes = async (userPoolId: string, region: string, username: string, userAttributes: UserAttributes): Promise<void> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n const { userId, ...writeableUserAttributes } = userAttributes;\n\n const params = {\n UserPoolId: userPoolId,\n Username: username,\n UserAttributes: getCognitoUserAttributesFromQpqUserAttributes(writeableUserAttributes),\n };\n\n await cognitoClient.send(new AdminUpdateUserAttributesCommand(params));\n};\n"]}
1
+ {"version":3,"file":"setUserAttributes.js","sourceRoot":"","sources":["../../../../src/logic/cognito/setUserAttributes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gCAAgC,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAE5H,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,6CAA6C,EAAE,MAAM,iDAAiD,CAAC;AAEhH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAkB,EAAE,MAAc,EAAE,QAAgB,EAAE,cAA8B,EAAiB,EAAE;IAC7I,MAAM,aAAa,GAAG,eAAe,CAAC,6BAA6B,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,gFAAgF;IAChF,MAAM,EAAE,MAAM,EAAE,GAAG,uBAAuB,EAAE,GAAG,cAAc,CAAC;IAE9D,MAAM,aAAa,CAAC,IAAI,CACtB,IAAI,gCAAgC,CAAC;QACnC,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,6CAA6C,CAAC,uBAAuB,CAAC;KACvF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { UserAttributes } from 'quidproquo-core';\n\nimport { AdminUpdateUserAttributesCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';\n\nimport { createAwsClient } from '../createAwsClient';\nimport { getCognitoUserAttributesFromQpqUserAttributes } from './getCognitoUserAttributesFromQpqUserAttributes';\n\nexport const setUserAttributes = async (userPoolId: string, region: string, username: string, userAttributes: UserAttributes): Promise<void> => {\n const cognitoClient = createAwsClient(CognitoIdentityProviderClient, {\n region,\n });\n\n // userId maps to the immutable sub attribute, so it must never be written back.\n const { userId, ...writeableUserAttributes } = userAttributes;\n\n await cognitoClient.send(\n new AdminUpdateUserAttributesCommand({\n UserPoolId: userPoolId,\n Username: username,\n UserAttributes: getCognitoUserAttributesFromQpqUserAttributes(writeableUserAttributes),\n }),\n );\n};\n"]}