@kensio/yulin 1.21.0 → 1.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +4 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +3 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +2 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +3 -0
- package/dist/service/aws/factory/sim-aws-logs-collaborators.d.ts +7 -0
- package/dist/service/aws/factory/sim-aws-logs-collaborators.js +10 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.d.ts +3 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.js +5 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js +4 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +3 -0
- package/dist/service/aws/sim-aws-account-region-scope.js +4 -0
- package/dist/service/aws/sim-aws-account.d.ts +3 -0
- package/dist/service/aws/sim-aws-account.js +4 -0
- package/dist/service/aws/sim-aws-region.d.ts +3 -0
- package/dist/service/aws/sim-aws-region.js +4 -0
- package/dist/service/aws/sim-aws-service-accessors.d.ts +3 -0
- package/dist/service/aws/sim-aws-service-accessors.js +4 -0
- package/dist/service/backup/cfn/sim-backup-cfn-plan-creator.d.ts +6 -0
- package/dist/service/backup/cfn/sim-backup-cfn-plan-creator.js +12 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-deleter.d.ts +12 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-deleter.js +31 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-factory.d.ts +15 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-factory.js +38 -0
- package/dist/service/backup/cfn/sim-backup-cfn-selection-creator.d.ts +6 -0
- package/dist/service/backup/cfn/sim-backup-cfn-selection-creator.js +17 -0
- package/dist/service/backup/cfn/sim-backup-cfn-vault-creator.d.ts +6 -0
- package/dist/service/backup/cfn/sim-backup-cfn-vault-creator.js +29 -0
- package/dist/service/backup/cfn/sim-cfn-backup-plan-properties.d.ts +11 -0
- package/dist/service/backup/cfn/sim-cfn-backup-plan-properties.js +37 -0
- package/dist/service/backup/cfn/sim-cfn-backup-properties.d.ts +12 -0
- package/dist/service/backup/cfn/sim-cfn-backup-properties.js +37 -0
- package/dist/service/backup/cfn/sim-cfn-backup-property-reader.d.ts +17 -0
- package/dist/service/backup/cfn/sim-cfn-backup-property-reader.js +62 -0
- package/dist/service/backup/cfn/sim-cfn-backup-resource-error.d.ts +7 -0
- package/dist/service/backup/cfn/sim-cfn-backup-resource-error.js +22 -0
- package/dist/service/backup/command/sim-backup-authorizer.d.ts +11 -0
- package/dist/service/backup/command/sim-backup-authorizer.js +24 -0
- package/dist/service/backup/command/sim-backup-command.types.d.ts +238 -0
- package/dist/service/backup/command/sim-backup-command.types.js +1 -0
- package/dist/service/backup/command/sim-backup-configuration-commands.d.ts +32 -0
- package/dist/service/backup/command/sim-backup-configuration-commands.js +138 -0
- package/dist/service/backup/command/sim-backup-job-commands.d.ts +23 -0
- package/dist/service/backup/command/sim-backup-job-commands.js +52 -0
- package/dist/service/backup/command/sim-backup-recovery-point-commands.d.ts +18 -0
- package/dist/service/backup/command/sim-backup-recovery-point-commands.js +38 -0
- package/dist/service/backup/command/sim-backup-request-options.d.ts +4 -0
- package/dist/service/backup/command/sim-backup-request-options.js +1 -0
- package/dist/service/backup/command/sim-backup-required-string.d.ts +2 -0
- package/dist/service/backup/command/sim-backup-required-string.js +8 -0
- package/dist/service/backup/error/sim-backup.error.d.ts +38 -0
- package/dist/service/backup/error/sim-backup.error.js +50 -0
- package/dist/service/backup/index.d.ts +9 -0
- package/dist/service/backup/index.js +7 -0
- package/dist/service/backup/job/sim-backup-job-input.d.ts +11 -0
- package/dist/service/backup/job/sim-backup-job-input.js +1 -0
- package/dist/service/backup/job/sim-backup-job-page.d.ts +22 -0
- package/dist/service/backup/job/sim-backup-job-page.js +54 -0
- package/dist/service/backup/job/sim-backup-job.d.ts +25 -0
- package/dist/service/backup/job/sim-backup-job.factory.d.ts +10 -0
- package/dist/service/backup/job/sim-backup-job.factory.js +24 -0
- package/dist/service/backup/job/sim-backup-job.js +54 -0
- package/dist/service/backup/job/sim-backup-jobs.d.ts +18 -0
- package/dist/service/backup/job/sim-backup-jobs.js +33 -0
- package/dist/service/backup/plan/sim-backup-plan-schedules.d.ts +21 -0
- package/dist/service/backup/plan/sim-backup-plan-schedules.js +66 -0
- package/dist/service/backup/plan/sim-backup-plan.d.ts +22 -0
- package/dist/service/backup/plan/sim-backup-plan.js +37 -0
- package/dist/service/backup/plan/sim-backup-rule.d.ts +9 -0
- package/dist/service/backup/plan/sim-backup-rule.js +71 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.d.ts +28 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.factory.d.ts +9 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.factory.js +23 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.js +62 -0
- package/dist/service/backup/sdk/sim-backup-sdk-command-router.d.ts +9 -0
- package/dist/service/backup/sdk/sim-backup-sdk-command-router.js +37 -0
- package/dist/service/backup/selection/sim-backup-selection.d.ts +22 -0
- package/dist/service/backup/selection/sim-backup-selection.js +43 -0
- package/dist/service/backup/sim-backup-arn.d.ts +7 -0
- package/dist/service/backup/sim-backup-arn.js +12 -0
- package/dist/service/backup/sim-backup-properties.d.ts +8 -0
- package/dist/service/backup/sim-backup-properties.js +1 -0
- package/dist/service/backup/sim-backup-resource-resolver.d.ts +24 -0
- package/dist/service/backup/sim-backup-resource-resolver.js +44 -0
- package/dist/service/backup/sim-backup-store.d.ts +29 -0
- package/dist/service/backup/sim-backup-store.js +80 -0
- package/dist/service/backup/sim-backup.d.ts +48 -0
- package/dist/service/backup/sim-backup.js +139 -0
- package/dist/service/backup/vault/sim-backup-vault-description.d.ts +12 -0
- package/dist/service/backup/vault/sim-backup-vault-description.js +15 -0
- package/dist/service/backup/vault/sim-backup-vault-lock-configuration.d.ts +5 -0
- package/dist/service/backup/vault/sim-backup-vault-lock-configuration.js +31 -0
- package/dist/service/backup/vault/sim-backup-vault-lock.d.ts +15 -0
- package/dist/service/backup/vault/sim-backup-vault-lock.js +23 -0
- package/dist/service/backup/vault/sim-backup-vault-recovery-points.d.ts +12 -0
- package/dist/service/backup/vault/sim-backup-vault-recovery-points.js +30 -0
- package/dist/service/backup/vault/sim-backup-vault-retention.d.ts +4 -0
- package/dist/service/backup/vault/sim-backup-vault-retention.js +20 -0
- package/dist/service/backup/vault/sim-backup-vault.d.ts +33 -0
- package/dist/service/backup/vault/sim-backup-vault.js +49 -0
- package/dist/service/cloudformation/resource/cfn/backup/sim-backup-cfn-value-adapter.d.ts +3 -0
- package/dist/service/cloudformation/resource/cfn/backup/sim-backup-cfn-value-adapter.js +66 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.js +6 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-metric-filter-cfn.d.ts +23 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-metric-filter-cfn.js +22 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js +2 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-properties.d.ts +49 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-properties.js +61 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-property.type.d.ts +51 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-property.type.js +1 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js +4 -0
- package/dist/service/cloudwatch/index.d.ts +1 -0
- package/dist/service/cloudwatch/index.js +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts +2 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js +6 -0
- package/dist/service/cloudwatch/sim-cloudwatch.d.ts +9 -0
- package/dist/service/cloudwatch/sim-cloudwatch.js +10 -0
- package/dist/service/cloudwatch/write/sim-cloudwatch-service-writer.d.ts +58 -0
- package/dist/service/cloudwatch/write/sim-cloudwatch-service-writer.js +53 -0
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.js +8 -2
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js +4 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.d.ts +11 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.js +13 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-resolver.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-resolver.js +16 -4
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.d.ts +7 -0
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.js +11 -1
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.js +8 -2
- package/dist/service/cognito/command/hosted/hosted-auth.command.d.ts +19 -0
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.d.ts +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.js +3 -2
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.d.ts +8 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.js +11 -3
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-passkey-sign-in.d.ts +11 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-passkey-sign-in.js +13 -2
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts +11 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +11 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.d.ts +7 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.js +18 -7
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-signed-in.d.ts +20 -3
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-signed-in.js +19 -3
- package/dist/service/cognito/command/hosted/sim-cognito-token-endpoint.d.ts +2 -0
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.d.ts +8 -0
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.js +13 -4
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +5 -0
- package/dist/service/cognito/command/sim-cognito-commands.js +22 -2
- package/dist/service/cognito/command/user/sim-cognito-confirm-sign-up-commands.d.ts +74 -0
- package/dist/service/cognito/command/user/sim-cognito-confirm-sign-up-commands.js +110 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts +5 -49
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +7 -87
- package/dist/service/cognito/command/user/sim-cognito-user-commands.d.ts +4 -0
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js +38 -29
- package/dist/service/cognito/error/sim-cognito-managed-login.error.d.ts +23 -0
- package/dist/service/cognito/error/sim-cognito-managed-login.error.js +36 -0
- package/dist/service/cognito/error/sim-cognito-throttle.error.d.ts +13 -0
- package/dist/service/cognito/error/sim-cognito-throttle.error.js +15 -0
- package/dist/service/cognito/index.d.ts +2 -0
- package/dist/service/cognito/index.js +2 -0
- package/dist/service/cognito/metric/sim-cognito-counted-request.d.ts +50 -0
- package/dist/service/cognito/metric/sim-cognito-counted-request.js +51 -0
- package/dist/service/cognito/metric/sim-cognito-metrics.d.ts +22 -0
- package/dist/service/cognito/metric/sim-cognito-metrics.js +26 -0
- package/dist/service/cognito/metric/sim-cognito-pool-metrics.d.ts +40 -0
- package/dist/service/cognito/metric/sim-cognito-pool-metrics.js +51 -0
- package/dist/service/cognito/metric/sim-cognito-throttled-request.d.ts +11 -0
- package/dist/service/cognito/metric/sim-cognito-throttled-request.js +15 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +6 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.d.ts +4 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.js +6 -2
- package/dist/service/cognito/serve/page/sim-cognito-provider-page.d.ts +35 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-page.js +50 -0
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts +6 -0
- package/dist/service/cognito/sim-cognito-identity-provider.js +1 -0
- package/dist/service/cognito/sim-cognito-user-directory.js +3 -3
- package/dist/service/cognito/user-pool/auth/sim-cognito-authorization-code.d.ts +9 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-authorization-code.js +2 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.d.ts +8 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.js +8 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-request-throttle.d.ts +36 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-request-throttle.js +45 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-sign-in.d.ts +42 -9
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-sign-in.js +56 -27
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-triggers.d.ts +52 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-triggers.js +49 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-presented-external-user.d.ts +48 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-presented-external-user.js +94 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-same-federated-identity.d.ts +13 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-same-federated-identity.js +19 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-user-pool-identity-provider.d.ts +7 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-user-pool-identity-provider.js +9 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.d.ts +3 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.js +3 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +18 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +35 -18
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/lambda/command/create-function/create-function.handler.js +4 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
- package/dist/service/lambda/event-source/poll/kinesis/sim-lambda-kinesis-stream-delivery.js +7 -11
- package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-delivery.js +7 -8
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-iterator-age.d.ts +11 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-iterator-age.js +31 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-sequence-numbers.d.ts +10 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-sequence-numbers.js +12 -0
- package/dist/service/lambda/function/sim-lambda-function.d.ts +3 -0
- package/dist/service/lambda/function/sim-lambda-function.js +6 -2
- package/dist/service/lambda/function/sim-lambda-function.type.d.ts +7 -0
- package/dist/service/lambda/metric/sim-lambda-function-metrics.d.ts +47 -0
- package/dist/service/lambda/metric/sim-lambda-function-metrics.js +83 -0
- package/dist/service/lambda/metric/sim-lambda-iterator-age.d.ts +29 -0
- package/dist/service/lambda/metric/sim-lambda-iterator-age.js +41 -0
- package/dist/service/lambda/metric/sim-lambda-metrics.d.ts +12 -0
- package/dist/service/lambda/metric/sim-lambda-metrics.js +13 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts +2 -0
- package/dist/service/lambda/sim-lambda-commands.js +2 -1
- package/dist/service/logs/cfn/metric/sim-cfn-metric-dimension-values.d.ts +9 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-dimension-values.js +25 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-creator.d.ts +30 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-creator.js +52 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-properties.d.ts +40 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-properties.js +66 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-property-rules.d.ts +19 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-property-rules.js +40 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-unsimulated-properties.d.ts +5 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-unsimulated-properties.js +23 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-value.d.ts +25 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-value.js +58 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-transformation-values.d.ts +6 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-transformation-values.js +19 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts +2 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +4 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +5 -3
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +12 -3
- package/dist/service/logs/command/event/sim-logs-put-log-events.d.ts +3 -0
- package/dist/service/logs/command/event/sim-logs-put-log-events.js +3 -0
- package/dist/service/logs/command/group/sim-logs-log-group-commands.js +3 -3
- package/dist/service/logs/command/metric/metric-filter.command.d.ts +79 -0
- package/dist/service/logs/command/metric/metric-filter.command.js +1 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-commands.d.ts +48 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-commands.js +95 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-input.d.ts +11 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-input.js +79 -0
- package/dist/service/logs/command/sim-logs-command.types.d.ts +1 -0
- package/dist/service/logs/group/sim-logs-log-group.d.ts +6 -0
- package/dist/service/logs/group/sim-logs-log-group.js +6 -0
- package/dist/service/logs/index.d.ts +6 -0
- package/dist/service/logs/index.js +4 -0
- package/dist/service/logs/metric/cloudwatch/sim-aws-logs-metric-filter-metrics.d.ts +40 -0
- package/dist/service/logs/metric/cloudwatch/sim-aws-logs-metric-filter-metrics.js +78 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-datapoints.d.ts +25 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-datapoints.js +81 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-document.d.ts +57 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-document.js +85 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-json.d.ts +24 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-json.js +41 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-values.d.ts +20 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-values.js +39 -0
- package/dist/service/logs/metric/sim-logs-metric-datapoint.d.ts +25 -0
- package/dist/service/logs/metric/sim-logs-metric-datapoint.js +1 -0
- package/dist/service/logs/metric/sim-logs-metric-fan-out.d.ts +62 -0
- package/dist/service/logs/metric/sim-logs-metric-fan-out.js +116 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-selection.d.ts +17 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-selection.js +17 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-store.d.ts +35 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-store.js +47 -0
- package/dist/service/logs/metric/sim-logs-metric-filter.d.ts +49 -0
- package/dist/service/logs/metric/sim-logs-metric-filter.js +95 -0
- package/dist/service/logs/metric/sim-logs-metric-publication-failure.d.ts +31 -0
- package/dist/service/logs/metric/sim-logs-metric-publication-failure.js +12 -0
- package/dist/service/logs/metric/sim-logs-metric-publications.d.ts +11 -0
- package/dist/service/logs/metric/sim-logs-metric-publications.js +1 -0
- package/dist/service/logs/metric/sim-logs-metric-transformation.d.ts +45 -0
- package/dist/service/logs/metric/sim-logs-metric-transformation.js +127 -0
- package/dist/service/logs/sdk/sim-logs-sdk-command-router.js +12 -0
- package/dist/service/logs/sim-logs-commands.d.ts +12 -0
- package/dist/service/logs/sim-logs-commands.js +17 -0
- package/dist/service/logs/sim-logs-metric-operations.d.ts +31 -0
- package/dist/service/logs/sim-logs-metric-operations.js +37 -0
- package/dist/service/logs/sim-logs.d.ts +4 -3
- package/dist/service/logs/sim-logs.js +4 -3
- package/dist/service/logs/write/sim-logs-service-writer.d.ts +3 -0
- package/dist/service/logs/write/sim-logs-service-writer.js +5 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts +32 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js +31 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts +13 -2
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js +18 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts +17 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js +27 -3
- package/dist/service/s3/bucket/lifecycle/sim-s3-noncurrent-sweep.d.ts +45 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-noncurrent-sweep.js +90 -0
- package/dist/service/s3/bucket/lock/sim-s3-bucket-object-lock.d.ts +42 -0
- package/dist/service/s3/bucket/lock/sim-s3-bucket-object-lock.js +59 -0
- package/dist/service/s3/bucket/lock/sim-s3-default-retention.d.ts +8 -0
- package/dist/service/s3/bucket/lock/sim-s3-default-retention.js +15 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-configuration.d.ts +49 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-configuration.js +102 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-output.d.ts +14 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-output.js +1 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock.d.ts +62 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock.js +100 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-retention.d.ts +55 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-retention.js +82 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.js +9 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js +1 -2
- package/dist/service/s3/bucket/sim-s3-bucket-objects.d.ts +114 -0
- package/dist/service/s3/bucket/sim-s3-bucket-objects.js +148 -0
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts +30 -29
- package/dist/service/s3/bucket/sim-s3-bucket.js +42 -45
- package/dist/service/s3/bucket/sim-s3-object-deletion.d.ts +30 -0
- package/dist/service/s3/bucket/sim-s3-object-deletion.js +29 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versioning.d.ts +61 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versioning.js +65 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versions.d.ts +97 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versions.js +176 -0
- package/dist/service/s3/bucket/versioning/sim-s3-compare-keys.d.ts +10 -0
- package/dist/service/s3/bucket/versioning/sim-s3-compare-keys.js +16 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-version.d.ts +85 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-version.js +101 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-versions.d.ts +52 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-versions.js +91 -0
- package/dist/service/s3/bucket/versioning/sim-s3-version-page.d.ts +32 -0
- package/dist/service/s3/bucket/versioning/sim-s3-version-page.js +45 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.d.ts +0 -5
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js +3 -14
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts +18 -1
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js +34 -1
- package/dist/service/s3/cfn/bucket/lock/sim-cfn-s3-bucket-object-lock-configuration.d.ts +37 -0
- package/dist/service/s3/cfn/bucket/lock/sim-cfn-s3-bucket-object-lock-configuration.js +78 -0
- package/dist/service/s3/cfn/bucket/replication/sim-cfn-s3-bucket-replication-rules.d.ts +20 -0
- package/dist/service/s3/cfn/bucket/replication/sim-cfn-s3-bucket-replication-rules.js +107 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts +14 -7
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js +29 -37
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-declared-configurations.d.ts +62 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-declared-configurations.js +89 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.d.ts +9 -5
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js +16 -16
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-rules.d.ts +9 -5
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-rules.js +17 -6
- package/dist/service/s3/cfn/bucket/versioning/sim-cfn-s3-bucket-versioning-configuration.d.ts +19 -0
- package/dist/service/s3/cfn/bucket/versioning/sim-cfn-s3-bucket-versioning-configuration.js +28 -0
- package/dist/service/s3/command/authorize/sim-s3-authorize-action.d.ts +24 -0
- package/dist/service/s3/command/authorize/sim-s3-authorize-action.js +30 -0
- package/dist/service/s3/command/complete-multipart-upload/complete-multipart-upload.command.d.ts +2 -0
- package/dist/service/s3/command/complete-multipart-upload/complete-multipart-upload.handler.js +3 -1
- package/dist/service/s3/command/copy-object/copy-object.command.d.ts +3 -1
- package/dist/service/s3/command/copy-object/copy-object.handler.js +3 -1
- package/dist/service/s3/command/delete-object/delete-object-version-removal.d.ts +50 -0
- package/dist/service/s3/command/delete-object/delete-object-version-removal.js +52 -0
- package/dist/service/s3/command/delete-object/delete-object.command.d.ts +19 -2
- package/dist/service/s3/command/delete-object/delete-object.handler.d.ts +7 -1
- package/dist/service/s3/command/delete-object/delete-object.handler.js +28 -16
- package/dist/service/s3/command/delete-object/sim-s3-notify-deleted.d.ts +24 -0
- package/dist/service/s3/command/delete-object/sim-s3-notify-deleted.js +32 -0
- package/dist/service/s3/command/delete-objects/delete-object-attempt.d.ts +6 -2
- package/dist/service/s3/command/delete-objects/delete-object-attempt.js +6 -2
- package/dist/service/s3/command/delete-objects/delete-objects-key-removal.js +10 -9
- package/dist/service/s3/command/delete-objects/delete-objects-outcome.js +9 -1
- package/dist/service/s3/command/delete-objects/delete-objects.command.d.ts +6 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.command.d.ts +23 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.command.js +1 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.handler.d.ts +31 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.handler.js +40 -0
- package/dist/service/s3/command/get-object/get-object-loader.d.ts +3 -2
- package/dist/service/s3/command/get-object/get-object-loader.js +9 -4
- package/dist/service/s3/command/get-object/get-object.command.d.ts +9 -1
- package/dist/service/s3/command/get-object/get-object.handler.js +1 -1
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.command.d.ts +25 -0
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.command.js +1 -0
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.handler.d.ts +31 -0
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.handler.js +41 -0
- package/dist/service/s3/command/head-object/head-object-loader.d.ts +1 -1
- package/dist/service/s3/command/head-object/head-object-loader.js +7 -3
- package/dist/service/s3/command/head-object/head-object.command.d.ts +9 -1
- package/dist/service/s3/command/head-object/head-object.handler.js +1 -1
- package/dist/service/s3/command/list-object-versions/list-object-versions-listing.d.ts +31 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions-listing.js +55 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions-summaries.d.ts +17 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions-summaries.js +34 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.command.d.ts +59 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.command.js +1 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.handler.d.ts +34 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.handler.js +62 -0
- package/dist/service/s3/command/object/sim-s3-read-object-version.d.ts +34 -0
- package/dist/service/s3/command/object/sim-s3-read-object-version.js +52 -0
- package/dist/service/s3/command/object-lock/sim-s3-locked-version.d.ts +11 -0
- package/dist/service/s3/command/object-lock/sim-s3-locked-version.js +27 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-authorizer.d.ts +42 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-authorizer.js +66 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-commands.d.ts +30 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-commands.js +41 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.command.d.ts +21 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.command.js +1 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.handler.d.ts +31 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.handler.js +44 -0
- package/dist/service/s3/command/put-object/put-object.command.d.ts +3 -0
- package/dist/service/s3/command/put-object/put-object.handler.js +10 -10
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.command.d.ts +24 -0
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.command.js +1 -0
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.handler.d.ts +32 -0
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.handler.js +41 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.command.d.ts +21 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.command.js +1 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.handler.d.ts +32 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.handler.js +47 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.command.d.ts +29 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.command.js +1 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.handler.d.ts +31 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.handler.js +42 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts +7 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-authorizer.d.ts +35 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-authorizer.js +57 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-commands.d.ts +26 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-commands.js +34 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-configuration-validation.d.ts +13 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-configuration-validation.js +28 -0
- package/dist/service/s3/error/sim-s3-object-lock.error.d.ts +22 -0
- package/dist/service/s3/error/sim-s3-object-lock.error.js +26 -0
- package/dist/service/s3/error/sim-s3.error.d.ts +22 -0
- package/dist/service/s3/error/sim-s3.error.js +26 -0
- package/dist/service/s3/notification/event/sim-s3-event-records.js +3 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.d.ts +5 -3
- package/dist/service/s3/notification/event/sim-s3-object-event-builder.d.ts +15 -0
- package/dist/service/s3/notification/event/sim-s3-object-event-builder.js +4 -1
- package/dist/service/s3/notification/event/sim-s3-object-event.d.ts +6 -0
- package/dist/service/s3/notification/event/sim-s3-object-event.js +2 -0
- package/dist/service/s3/notification/sim-s3-object-notifier.d.ts +1 -1
- package/dist/service/s3/notification/sim-s3-object-notifier.js +2 -2
- package/dist/service/s3/sdk/sim-s3-sdk-bucket-routes.d.ts +10 -0
- package/dist/service/s3/sdk/sim-s3-sdk-bucket-routes.js +84 -0
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +6 -132
- package/dist/service/s3/sdk/sim-s3-sdk-object-lock-routes.d.ts +10 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-lock-routes.js +28 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-routes.d.ts +7 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-routes.js +80 -0
- package/dist/service/s3/sim-s3-commands.d.ts +4 -0
- package/dist/service/s3/sim-s3-commands.js +6 -0
- package/dist/service/s3/sim-s3-operations.d.ts +5 -5
- package/dist/service/s3/sim-s3-operations.js +5 -6
- package/dist/service/s3/sim-s3-version-operations.d.ts +32 -0
- package/dist/service/s3/sim-s3-version-operations.js +45 -0
- package/dist/service/scheduler/command/schedule/schedule.command.d.ts +9 -2
- package/dist/service/scheduler/command/schedule/sim-scheduler-described-schedule.js +2 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-unsimulated-target.js +0 -6
- package/dist/service/scheduler/command/sim-scheduler-command.types.d.ts +1 -1
- package/dist/service/scheduler/command/sim-scheduler-commands.js +1 -0
- package/dist/service/scheduler/delivery/sim-aws-scheduler-dead-letters.d.ts +17 -0
- package/dist/service/scheduler/delivery/sim-aws-scheduler-dead-letters.js +29 -0
- package/dist/service/scheduler/delivery/sim-aws-scheduler-delivery-targets.d.ts +6 -1
- package/dist/service/scheduler/delivery/sim-aws-scheduler-delivery-targets.js +9 -0
- package/dist/service/scheduler/delivery/sim-scheduler-dead-letter-queue.d.ts +18 -0
- package/dist/service/scheduler/delivery/sim-scheduler-dead-letter-queue.js +62 -0
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-attempt.d.ts +29 -0
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-attempt.js +81 -0
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-function.js +9 -5
- package/dist/service/scheduler/delivery/sim-scheduler-delivery.d.ts +11 -0
- package/dist/service/scheduler/delivery/sim-scheduler-no-delivery-targets.d.ts +5 -1
- package/dist/service/scheduler/delivery/sim-scheduler-no-delivery-targets.js +8 -0
- package/dist/service/scheduler/delivery/sim-scheduler-target-delivery.d.ts +4 -1
- package/dist/service/scheduler/delivery/sim-scheduler-target-delivery.js +20 -15
- package/dist/service/scheduler/index.d.ts +1 -1
- package/dist/service/scheduler/target/sim-scheduler-dead-letter-config.d.ts +15 -0
- package/dist/service/scheduler/target/sim-scheduler-dead-letter-config.js +24 -0
- package/dist/service/scheduler/target/sim-scheduler-retry-policy.d.ts +20 -0
- package/dist/service/scheduler/target/sim-scheduler-retry-policy.js +37 -0
- package/dist/service/scheduler/target/sim-scheduler-target.d.ts +6 -0
- package/dist/service/scheduler/target/sim-scheduler-target.js +12 -0
- package/dist/service/ses/command/configuration-set/sim-ses-configuration-set-commands.js +13 -5
- package/dist/service/ses/command/configuration-set/sim-ses-configuration-set-options.d.ts +1 -1
- package/dist/service/ses/command/configuration-set/sim-ses-configuration-set-options.js +9 -9
- package/dist/service/ses/command/send/send.command.d.ts +10 -1
- package/dist/service/ses/command/send/sim-ses-read-content.d.ts +2 -1
- package/dist/service/ses/command/send/sim-ses-send-email.js +1 -0
- package/dist/service/ses/command/send/sim-ses-service-send.js +1 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.js +26 -5
- package/dist/service/ses/command/send/sim-ses-template-send.js +1 -0
- package/dist/service/ses/command/suppression/suppression.command.d.ts +3 -2
- package/dist/service/ses/configuration-set/sim-ses-configuration-set.d.ts +9 -10
- package/dist/service/ses/configuration-set/sim-ses-configuration-set.js +7 -8
- package/dist/service/ses/email/sim-ses-sent-email-store.d.ts +8 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.js +17 -0
- package/dist/service/ses/email/sim-ses-sent-email.d.ts +18 -0
- package/dist/service/ses/email/sim-ses-sent-email.js +3 -0
- package/dist/service/ses/error/sim-ses.error.d.ts +10 -0
- package/dist/service/ses/error/sim-ses.error.js +10 -0
- package/dist/service/ses/feedback/sim-ses-feedback-recorder.d.ts +34 -0
- package/dist/service/ses/feedback/sim-ses-feedback-recorder.js +55 -0
- package/dist/service/ses/index.d.ts +3 -2
- package/dist/service/ses/index.js +2 -1
- package/dist/service/ses/sim-ses-commands.d.ts +2 -0
- package/dist/service/ses/sim-ses-commands.js +9 -0
- package/dist/service/ses/sim-ses-configuration-sets.d.ts +4 -4
- package/dist/service/ses/sim-ses-configuration-sets.js +4 -4
- package/dist/service/ses/sim-ses-suppression.d.ts +3 -2
- package/dist/service/ses/sim-ses-suppression.js +3 -2
- package/dist/service/ses/sim-ses-v2.d.ts +13 -0
- package/dist/service/ses/sim-ses-v2.js +13 -0
- package/dist/service/ses/suppression/sim-ses-suppressed-destination.d.ts +3 -4
- package/dist/service/ses/suppression/sim-ses-suppressed-destination.js +3 -4
- package/dist/service/ses/suppression/sim-ses-suppression-list.d.ts +4 -4
- package/dist/service/ses/suppression/sim-ses-suppression-list.js +4 -4
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-encryption-rules.d.ts +15 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-encryption-rules.js +33 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts +16 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js +33 -1
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-names.d.ts +12 -6
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-names.js +18 -13
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js +9 -1
- package/dist/terraform/map/sim-tf-map-sqs-redrive.d.ts +4 -3
- package/dist/terraform/map/sim-tf-map-sqs-redrive.js +4 -3
- package/docs/README.md +1 -0
- package/docs/services/backup/README.md +553 -0
- package/docs/services/cloudformation/README.md +16 -6
- package/docs/services/cloudwatch/README.md +159 -3
- package/docs/services/cognito/README.md +370 -7
- package/docs/services/lambda/README.md +28 -0
- package/docs/services/logs/README.md +284 -3
- package/docs/services/s3/README.md +463 -20
- package/docs/services/scheduler/README.md +48 -9
- package/docs/services/ses/README.md +164 -41
- package/docs/services/sqs/README.md +47 -10
- package/llms.txt +1 -0
- package/package.json +7 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SimCognitoError } from "./sim-cognito.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Simulated Cognito TooManyRequestsException error.
|
|
4
|
+
*
|
|
5
|
+
* Real Cognito answers this when a pool has turned a request away for rate
|
|
6
|
+
* limiting. Its own limits belong to the account and are mostly undocumented.
|
|
7
|
+
* Working one out here would be inventing a number, so a test says how many
|
|
8
|
+
* requests a pool should turn away and the pool turns away that many.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimCognitoTooManyRequestsException extends SimCognitoError {
|
|
11
|
+
readonly name = "TooManyRequestsException";
|
|
12
|
+
constructor(message: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SimCognitoError } from "./sim-cognito.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Simulated Cognito TooManyRequestsException error.
|
|
4
|
+
*
|
|
5
|
+
* Real Cognito answers this when a pool has turned a request away for rate
|
|
6
|
+
* limiting. Its own limits belong to the account and are mostly undocumented.
|
|
7
|
+
* Working one out here would be inventing a number, so a test says how many
|
|
8
|
+
* requests a pool should turn away and the pool turns away that many.
|
|
9
|
+
*/
|
|
10
|
+
export class SimCognitoTooManyRequestsException extends SimCognitoError {
|
|
11
|
+
name = "TooManyRequestsException";
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message, { httpStatusCode: 400 });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -65,5 +65,7 @@ export { SimCognitoAuthSession } from "./user-pool/auth/sim-cognito-auth-session
|
|
|
65
65
|
export { SimCognitoIssuedToken } from "./user-pool/auth/sim-cognito-issued-token.js";
|
|
66
66
|
export { SimCognitoPoolAuth } from "./user-pool/auth/sim-cognito-pool-auth.js";
|
|
67
67
|
export { SimCognitoWebAuthnChallengeNotFoundException, SimCognitoWebAuthnConfigurationMissingException, SimCognitoWebAuthnCredentialNotSupportedException, SimCognitoWebAuthnOriginNotAllowedException, SimCognitoWebAuthnRelyingPartyMismatchException, } from "./error/sim-cognito-web-authn.error.js";
|
|
68
|
+
export { SimCognitoTooManyRequestsException } from "./error/sim-cognito-throttle.error.js";
|
|
69
|
+
export { SimCognitoRequestThrottle, type SimCognitoThrottledOperation, } from "./user-pool/auth/sim-cognito-request-throttle.js";
|
|
68
70
|
export { isSimCognitoOAuthError, SimCognitoOAuthError, type SimCognitoOAuthErrorCode, } from "./error/sim-cognito-oauth.error.js";
|
|
69
71
|
export { SimCognitoAliasExistsException, SimCognitoCodeMismatchException, SimCognitoDuplicateProviderException, SimCognitoEnableSoftwareTokenMfaException, SimCognitoError, SimCognitoExpiredCodeException, SimCognitoGroupExistsException, SimCognitoInvalidParameterException, SimCognitoInvalidPasswordException, SimCognitoNotAuthorizedException, SimCognitoPasswordResetRequiredException, SimCognitoResourceNotFoundException, SimCognitoSoftwareTokenMfaNotFoundException, SimCognitoUsernameExistsException, SimCognitoUserNotConfirmedException, SimCognitoUserNotFoundException, SimCognitoUserPoolAlreadyExists, SimCognitoUserPoolClientAlreadyExists, } from "./error/sim-cognito.error.js";
|
|
@@ -57,5 +57,7 @@ export { SimCognitoAuthSession } from "./user-pool/auth/sim-cognito-auth-session
|
|
|
57
57
|
export { SimCognitoIssuedToken } from "./user-pool/auth/sim-cognito-issued-token.js";
|
|
58
58
|
export { SimCognitoPoolAuth } from "./user-pool/auth/sim-cognito-pool-auth.js";
|
|
59
59
|
export { SimCognitoWebAuthnChallengeNotFoundException, SimCognitoWebAuthnConfigurationMissingException, SimCognitoWebAuthnCredentialNotSupportedException, SimCognitoWebAuthnOriginNotAllowedException, SimCognitoWebAuthnRelyingPartyMismatchException, } from "./error/sim-cognito-web-authn.error.js";
|
|
60
|
+
export { SimCognitoTooManyRequestsException } from "./error/sim-cognito-throttle.error.js";
|
|
61
|
+
export { SimCognitoRequestThrottle, } from "./user-pool/auth/sim-cognito-request-throttle.js";
|
|
60
62
|
export { isSimCognitoOAuthError, SimCognitoOAuthError, } from "./error/sim-cognito-oauth.error.js";
|
|
61
63
|
export { SimCognitoAliasExistsException, SimCognitoCodeMismatchException, SimCognitoDuplicateProviderException, SimCognitoEnableSoftwareTokenMfaException, SimCognitoError, SimCognitoExpiredCodeException, SimCognitoGroupExistsException, SimCognitoInvalidParameterException, SimCognitoInvalidPasswordException, SimCognitoNotAuthorizedException, SimCognitoPasswordResetRequiredException, SimCognitoResourceNotFoundException, SimCognitoSoftwareTokenMfaNotFoundException, SimCognitoUsernameExistsException, SimCognitoUserNotConfirmedException, SimCognitoUserNotFoundException, SimCognitoUserPoolAlreadyExists, SimCognitoUserPoolClientAlreadyExists, } from "./error/sim-cognito.error.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { SimCognitoRequestThrottle, SimCognitoThrottledOperation } from "../user-pool/auth/sim-cognito-request-throttle.js";
|
|
2
|
+
import type { SimCognitoPoolMetrics } from "./sim-cognito-pool-metrics.js";
|
|
3
|
+
/**
|
|
4
|
+
* What an authentication request answers with, as the count reads it.
|
|
5
|
+
*/
|
|
6
|
+
interface SimCognitoAuthenticationOutcome {
|
|
7
|
+
readonly AuthenticationResult?: unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The pool and app client a counted request ran against.
|
|
11
|
+
*
|
|
12
|
+
* The client id is a string rather than a client, because a request an
|
|
13
|
+
* administrator made reaches the pool through no app client and is reported
|
|
14
|
+
* under a fixed name instead.
|
|
15
|
+
*/
|
|
16
|
+
export interface SimCognitoCountedScope {
|
|
17
|
+
readonly pool: {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly auth: {
|
|
20
|
+
readonly throttle: SimCognitoRequestThrottle;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly client: {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Run an authentication request and count whether it issued tokens.
|
|
29
|
+
*
|
|
30
|
+
* Real Cognito counts a sign-in successful once tokens have been issued, so a
|
|
31
|
+
* request answered with a challenge counts as a 0 and the response that
|
|
32
|
+
* finishes it counts as a 1.
|
|
33
|
+
*/
|
|
34
|
+
export declare function countedSimCognitoAuth<T extends SimCognitoAuthenticationOutcome>(metrics: SimCognitoPoolMetrics, operation: SimCognitoThrottledOperation, scope: SimCognitoCountedScope, run: () => Promise<T>): Promise<T>;
|
|
35
|
+
/**
|
|
36
|
+
* Run a request that hands back no session and count whether it finished.
|
|
37
|
+
*
|
|
38
|
+
* A registration answers with a user rather than with tokens, so finishing is
|
|
39
|
+
* the whole of what makes one a success.
|
|
40
|
+
*/
|
|
41
|
+
export declare function countedSimCognitoCompletion<T>(metrics: SimCognitoPoolMetrics, operation: SimCognitoThrottledOperation, scope: SimCognitoCountedScope, run: () => Promise<T>): Promise<T>;
|
|
42
|
+
/**
|
|
43
|
+
* Run a token grant and count it as a federation where it is one.
|
|
44
|
+
*
|
|
45
|
+
* A code from an identity provider becomes a `FederationSuccesses` at the
|
|
46
|
+
* tokens it is exchanged for. A code from the pool's own sign-in form is not a
|
|
47
|
+
* federation and counts nothing here.
|
|
48
|
+
*/
|
|
49
|
+
export declare function countedSimCognitoFederation<T>(metrics: SimCognitoPoolMetrics, scope: SimCognitoCountedScope, federated: boolean, run: () => Promise<T>): Promise<T>;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { throttledSimCognitoRequest } from "./sim-cognito-throttled-request.js";
|
|
2
|
+
/**
|
|
3
|
+
* Run a request and count whether it issued tokens.
|
|
4
|
+
*
|
|
5
|
+
* A request the pool refused counts as a 0 rather than going uncounted, which
|
|
6
|
+
* is what makes `Average` over the metric a success rate. The failure itself
|
|
7
|
+
* still reaches the caller.
|
|
8
|
+
*/
|
|
9
|
+
async function countedSimCognitoRequest(metrics, operation, scope, run, succeeded) {
|
|
10
|
+
let counted = false;
|
|
11
|
+
try {
|
|
12
|
+
const output = await throttledSimCognitoRequest(metrics, operation, scope, run);
|
|
13
|
+
counted = succeeded(output);
|
|
14
|
+
return output;
|
|
15
|
+
}
|
|
16
|
+
finally {
|
|
17
|
+
metrics.count(operation, scope.pool.id, scope.client.id, counted);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Run an authentication request and count whether it issued tokens.
|
|
22
|
+
*
|
|
23
|
+
* Real Cognito counts a sign-in successful once tokens have been issued, so a
|
|
24
|
+
* request answered with a challenge counts as a 0 and the response that
|
|
25
|
+
* finishes it counts as a 1.
|
|
26
|
+
*/
|
|
27
|
+
export async function countedSimCognitoAuth(metrics, operation, scope, run) {
|
|
28
|
+
return await countedSimCognitoRequest(metrics, operation, scope, run, (output) => output.AuthenticationResult !== undefined);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Run a request that hands back no session and count whether it finished.
|
|
32
|
+
*
|
|
33
|
+
* A registration answers with a user rather than with tokens, so finishing is
|
|
34
|
+
* the whole of what makes one a success.
|
|
35
|
+
*/
|
|
36
|
+
export async function countedSimCognitoCompletion(metrics, operation, scope, run) {
|
|
37
|
+
return await countedSimCognitoRequest(metrics, operation, scope, run, () => true);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Run a token grant and count it as a federation where it is one.
|
|
41
|
+
*
|
|
42
|
+
* A code from an identity provider becomes a `FederationSuccesses` at the
|
|
43
|
+
* tokens it is exchanged for. A code from the pool's own sign-in form is not a
|
|
44
|
+
* federation and counts nothing here.
|
|
45
|
+
*/
|
|
46
|
+
export async function countedSimCognitoFederation(metrics, scope, federated, run) {
|
|
47
|
+
if (!federated) {
|
|
48
|
+
return await run();
|
|
49
|
+
}
|
|
50
|
+
return await countedSimCognitoCompletion(metrics, "Federation", scope, run);
|
|
51
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SimCloudWatchDimensionInput } from "../../cloudwatch/metric/sim-cloudwatch-dimension.js";
|
|
2
|
+
/**
|
|
3
|
+
* The namespace real Cognito publishes what it counts about a pool under.
|
|
4
|
+
*/
|
|
5
|
+
export declare const simCognitoMetricNamespace = "AWS/Cognito";
|
|
6
|
+
/**
|
|
7
|
+
* The `UserPoolClient` real Cognito reports for a request an administrator
|
|
8
|
+
* made, which reaches the pool without going through an app client at all.
|
|
9
|
+
*/
|
|
10
|
+
export declare const simCognitoAdminClientDimension = "Admin";
|
|
11
|
+
/**
|
|
12
|
+
* The `UserPoolClient` real Cognito reports for a request naming an app client
|
|
13
|
+
* the pool has none of. The id given is left out of the metric.
|
|
14
|
+
*/
|
|
15
|
+
export declare const simCognitoInvalidClientDimension = "Invalid";
|
|
16
|
+
/**
|
|
17
|
+
* The dimensions every metric here carries.
|
|
18
|
+
*
|
|
19
|
+
* Real Cognito reports a pool's counts per app client as well as per pool, so
|
|
20
|
+
* one client's traffic can be watched on its own.
|
|
21
|
+
*/
|
|
22
|
+
export declare function simCognitoPoolDimensions(poolId: string, clientId: string): readonly SimCloudWatchDimensionInput[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The namespace real Cognito publishes what it counts about a pool under.
|
|
3
|
+
*/
|
|
4
|
+
export const simCognitoMetricNamespace = "AWS/Cognito";
|
|
5
|
+
/**
|
|
6
|
+
* The `UserPoolClient` real Cognito reports for a request an administrator
|
|
7
|
+
* made, which reaches the pool without going through an app client at all.
|
|
8
|
+
*/
|
|
9
|
+
export const simCognitoAdminClientDimension = "Admin";
|
|
10
|
+
/**
|
|
11
|
+
* The `UserPoolClient` real Cognito reports for a request naming an app client
|
|
12
|
+
* the pool has none of. The id given is left out of the metric.
|
|
13
|
+
*/
|
|
14
|
+
export const simCognitoInvalidClientDimension = "Invalid";
|
|
15
|
+
/**
|
|
16
|
+
* The dimensions every metric here carries.
|
|
17
|
+
*
|
|
18
|
+
* Real Cognito reports a pool's counts per app client as well as per pool, so
|
|
19
|
+
* one client's traffic can be watched on its own.
|
|
20
|
+
*/
|
|
21
|
+
export function simCognitoPoolDimensions(poolId, clientId) {
|
|
22
|
+
return [
|
|
23
|
+
{ Name: "UserPool", Value: poolId },
|
|
24
|
+
{ Name: "UserPoolClient", Value: clientId },
|
|
25
|
+
];
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SimCloudWatchServiceWriter } from "../../cloudwatch/write/sim-cloudwatch-service-writer.js";
|
|
2
|
+
import type { SimCognitoThrottledOperation } from "../user-pool/auth/sim-cognito-request-throttle.js";
|
|
3
|
+
interface SimCognitoPoolMetricsProperties {
|
|
4
|
+
readonly metrics: SimCloudWatchServiceWriter | undefined;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* What a simulated user pool publishes about the requests it handles.
|
|
8
|
+
*
|
|
9
|
+
* Real Cognito publishes these without being asked and without a caller
|
|
10
|
+
* needing any permission, so they go in through simulated CloudWatch's service
|
|
11
|
+
* writer rather than through `PutMetricData`, which refuses the `AWS/Cognito`
|
|
12
|
+
* namespace exactly as an account does.
|
|
13
|
+
*
|
|
14
|
+
* A pool built on its own, outside a `SimAws` instance, has no CloudWatch to
|
|
15
|
+
* publish into and counts nothing.
|
|
16
|
+
*/
|
|
17
|
+
export declare class SimCognitoPoolMetrics {
|
|
18
|
+
#private;
|
|
19
|
+
constructor(properties: SimCognitoPoolMetricsProperties);
|
|
20
|
+
/**
|
|
21
|
+
* Count one request against the pool and app client that made it.
|
|
22
|
+
*
|
|
23
|
+
* Real Cognito publishes a `*Successes` on every request of the kind, as a 1
|
|
24
|
+
* where it issued tokens and a 0 where it did not, so `Average` over one is
|
|
25
|
+
* a success rate and `SampleCount` is the number of requests. A request that
|
|
26
|
+
* was refused before the pool was known counts nothing, because there is no
|
|
27
|
+
* `UserPool` to report it under.
|
|
28
|
+
*/
|
|
29
|
+
count(operation: SimCognitoThrottledOperation, poolId: string, clientId: string, issuedTokens: boolean): void;
|
|
30
|
+
/**
|
|
31
|
+
* Count one request the pool turned away for rate limiting.
|
|
32
|
+
*
|
|
33
|
+
* Real Cognito counts a throttled request in both places. It is a 1 here and
|
|
34
|
+
* a 0 in the `*Successes` beside it, because a request that was turned away
|
|
35
|
+
* issued no tokens.
|
|
36
|
+
*/
|
|
37
|
+
throttled(operation: SimCognitoThrottledOperation, poolId: string, clientId: string): void;
|
|
38
|
+
private publish;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { simCognitoMetricNamespace, simCognitoPoolDimensions, } from "./sim-cognito-metrics.js";
|
|
2
|
+
/**
|
|
3
|
+
* What a simulated user pool publishes about the requests it handles.
|
|
4
|
+
*
|
|
5
|
+
* Real Cognito publishes these without being asked and without a caller
|
|
6
|
+
* needing any permission, so they go in through simulated CloudWatch's service
|
|
7
|
+
* writer rather than through `PutMetricData`, which refuses the `AWS/Cognito`
|
|
8
|
+
* namespace exactly as an account does.
|
|
9
|
+
*
|
|
10
|
+
* A pool built on its own, outside a `SimAws` instance, has no CloudWatch to
|
|
11
|
+
* publish into and counts nothing.
|
|
12
|
+
*/
|
|
13
|
+
export class SimCognitoPoolMetrics {
|
|
14
|
+
#metrics;
|
|
15
|
+
constructor(properties) {
|
|
16
|
+
this.#metrics = properties.metrics;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Count one request against the pool and app client that made it.
|
|
20
|
+
*
|
|
21
|
+
* Real Cognito publishes a `*Successes` on every request of the kind, as a 1
|
|
22
|
+
* where it issued tokens and a 0 where it did not, so `Average` over one is
|
|
23
|
+
* a success rate and `SampleCount` is the number of requests. A request that
|
|
24
|
+
* was refused before the pool was known counts nothing, because there is no
|
|
25
|
+
* `UserPool` to report it under.
|
|
26
|
+
*/
|
|
27
|
+
count(operation, poolId, clientId, issuedTokens) {
|
|
28
|
+
this.publish(`${operation}Successes`, poolId, clientId, issuedTokens ? 1 : 0);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Count one request the pool turned away for rate limiting.
|
|
32
|
+
*
|
|
33
|
+
* Real Cognito counts a throttled request in both places. It is a 1 here and
|
|
34
|
+
* a 0 in the `*Successes` beside it, because a request that was turned away
|
|
35
|
+
* issued no tokens.
|
|
36
|
+
*/
|
|
37
|
+
throttled(operation, poolId, clientId) {
|
|
38
|
+
this.publish(`${operation}Throttles`, poolId, clientId, 1);
|
|
39
|
+
}
|
|
40
|
+
publish(metricName, poolId, clientId, value) {
|
|
41
|
+
this.#metrics?.publish([
|
|
42
|
+
{
|
|
43
|
+
namespace: simCognitoMetricNamespace,
|
|
44
|
+
metricName,
|
|
45
|
+
dimensions: simCognitoPoolDimensions(poolId, clientId),
|
|
46
|
+
value,
|
|
47
|
+
unit: "Count",
|
|
48
|
+
},
|
|
49
|
+
]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SimCognitoThrottledOperation } from "../user-pool/auth/sim-cognito-request-throttle.js";
|
|
2
|
+
import type { SimCognitoCountedScope } from "./sim-cognito-counted-request.js";
|
|
3
|
+
import type { SimCognitoPoolMetrics } from "./sim-cognito-pool-metrics.js";
|
|
4
|
+
/**
|
|
5
|
+
* Turn a request away where the pool has been told to, and run it otherwise.
|
|
6
|
+
*
|
|
7
|
+
* The refusal is counted here, and the `*Successes` beside it is counted by
|
|
8
|
+
* the caller that wrapped this, because real Cognito counts a throttled
|
|
9
|
+
* request as an unsuccessful one as well as a throttled one.
|
|
10
|
+
*/
|
|
11
|
+
export declare function throttledSimCognitoRequest<T>(metrics: SimCognitoPoolMetrics, operation: SimCognitoThrottledOperation, scope: SimCognitoCountedScope, run: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SimCognitoTooManyRequestsException } from "../error/sim-cognito-throttle.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Turn a request away where the pool has been told to, and run it otherwise.
|
|
4
|
+
*
|
|
5
|
+
* The refusal is counted here, and the `*Successes` beside it is counted by
|
|
6
|
+
* the caller that wrapped this, because real Cognito counts a throttled
|
|
7
|
+
* request as an unsuccessful one as well as a throttled one.
|
|
8
|
+
*/
|
|
9
|
+
export async function throttledSimCognitoRequest(metrics, operation, scope, run) {
|
|
10
|
+
if (!scope.pool.auth.throttle.takesOne(operation)) {
|
|
11
|
+
return await run();
|
|
12
|
+
}
|
|
13
|
+
metrics.throttled(operation, scope.pool.id, scope.client.id);
|
|
14
|
+
throw new SimCognitoTooManyRequestsException(`Rate exceeded for ${operation} on user pool ${scope.pool.id}.`);
|
|
15
|
+
}
|
|
@@ -14,6 +14,7 @@ export declare class SimCognitoManagedLogin {
|
|
|
14
14
|
private readonly pageRequest;
|
|
15
15
|
private readonly signInPage;
|
|
16
16
|
private readonly passkeyPage;
|
|
17
|
+
private readonly providerPage;
|
|
17
18
|
private readonly signUpPage;
|
|
18
19
|
private readonly confirmPage;
|
|
19
20
|
private readonly forgotPasswordPage;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isSimCognitoManagedLoginRequired, isSimCognitoPasskeyRequired, } from "../../error/sim-cognito-managed-login.error.js";
|
|
1
|
+
import { isSimCognitoManagedLoginRequired, isSimCognitoPasskeyRequired, isSimCognitoProviderSignInRequired, } from "../../error/sim-cognito-managed-login.error.js";
|
|
2
2
|
import { isSimCognitoOAuthError } from "../../error/sim-cognito-oauth.error.js";
|
|
3
3
|
import { SimCognitoConfirmPage } from "./sim-cognito-confirm-page.js";
|
|
4
4
|
import { SimCognitoForgotPasswordPage } from "./sim-cognito-forgot-password-page.js";
|
|
5
5
|
import { SimCognitoPageForm } from "./sim-cognito-page-form.js";
|
|
6
6
|
import { SimCognitoPasskeyPage } from "./sim-cognito-passkey-page.js";
|
|
7
|
+
import { SimCognitoProviderPage } from "./sim-cognito-provider-page.js";
|
|
7
8
|
import { simCognitoForgotPasswordPath, simCognitoIsLocalSignIn, simCognitoPagePaths, simCognitoResetPasswordPath, simCognitoSignUpPath, } from "./sim-cognito-page-paths.js";
|
|
8
9
|
import { SimCognitoResetPasswordPage } from "./sim-cognito-reset-password-page.js";
|
|
9
10
|
import { SimCognitoPageRequest } from "./sim-cognito-page-request.js";
|
|
@@ -23,6 +24,7 @@ export class SimCognitoManagedLogin {
|
|
|
23
24
|
pageRequest = new SimCognitoPageRequest();
|
|
24
25
|
signInPage = new SimCognitoSignInPage();
|
|
25
26
|
passkeyPage = new SimCognitoPasskeyPage();
|
|
27
|
+
providerPage = new SimCognitoProviderPage();
|
|
26
28
|
signUpPage = new SimCognitoSignUpPage();
|
|
27
29
|
confirmPage = new SimCognitoConfirmPage();
|
|
28
30
|
forgotPasswordPage = new SimCognitoForgotPasswordPage();
|
|
@@ -71,6 +73,9 @@ export class SimCognitoManagedLogin {
|
|
|
71
73
|
if (isSimCognitoPasskeyRequired(error)) {
|
|
72
74
|
return this.passkeyPage.render(parameters, error.username, error.session);
|
|
73
75
|
}
|
|
76
|
+
if (isSimCognitoProviderSignInRequired(error)) {
|
|
77
|
+
return this.providerPage.render(request.pool.auth.identityProviders.require(error.providerName), parameters);
|
|
78
|
+
}
|
|
74
79
|
if (isSimCognitoOAuthError(error) || !simCognitoIsLocalSignIn(parameters)) {
|
|
75
80
|
return undefined;
|
|
76
81
|
}
|
|
@@ -37,8 +37,11 @@ export declare class SimCognitoPageMarkup {
|
|
|
37
37
|
form(action: string, body: string): string;
|
|
38
38
|
/**
|
|
39
39
|
* One labelled input, with the label naming the field it is for.
|
|
40
|
+
*
|
|
41
|
+
* A field given a value arrives filled in, which is what lets a page a
|
|
42
|
+
* person only has to press the button on still carry what it needs.
|
|
40
43
|
*/
|
|
41
|
-
field(name: string, label: string, type?: string): string;
|
|
44
|
+
field(name: string, label: string, type?: string, value?: string): string;
|
|
42
45
|
/**
|
|
43
46
|
* The parameters this page carries on to the next one.
|
|
44
47
|
*/
|
|
@@ -59,12 +59,16 @@ export class SimCognitoPageMarkup {
|
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* One labelled input, with the label naming the field it is for.
|
|
62
|
+
*
|
|
63
|
+
* A field given a value arrives filled in, which is what lets a page a
|
|
64
|
+
* person only has to press the button on still carry what it needs.
|
|
62
65
|
*/
|
|
63
|
-
field(name, label, type = "text") {
|
|
66
|
+
field(name, label, type = "text", value = "") {
|
|
64
67
|
const escapedName = this.escaped(name);
|
|
65
68
|
return (`<p><label for="${escapedName}">${this.escaped(label)}</label>\n` +
|
|
66
69
|
`<input id="${escapedName}" name="${escapedName}" ` +
|
|
67
|
-
`type="${this.escaped(type)}"
|
|
70
|
+
`type="${this.escaped(type)}" value="${this.escaped(value)}" ` +
|
|
71
|
+
`required></p>\n`);
|
|
68
72
|
}
|
|
69
73
|
/**
|
|
70
74
|
* The parameters this page carries on to the next one.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SimCognitoUserPoolIdentityProvider } from "../../user-pool/idp/sim-cognito-user-pool-identity-provider.js";
|
|
2
|
+
import { type SimCognitoPageParameters } from "./sim-cognito-page-markup.js";
|
|
3
|
+
/**
|
|
4
|
+
* The page a browser reaches where real Cognito would have sent it to an
|
|
5
|
+
* identity provider's own sign-in page.
|
|
6
|
+
*
|
|
7
|
+
* Nothing here calls Google, so there is no page to send anybody to and no
|
|
8
|
+
* password for anybody to type. This stands in for that page: it asks who the
|
|
9
|
+
* provider would have said is signing in, and the answer goes back to the
|
|
10
|
+
* authorize endpoint as the subject and the claims a provider asserts. A test
|
|
11
|
+
* says the same thing with `signInAs` and never sees this.
|
|
12
|
+
*
|
|
13
|
+
* It says whose page it is on its face, twice, because somebody meeting it in
|
|
14
|
+
* a screenshot or a screen recording has to be able to tell at a glance that
|
|
15
|
+
* no real sign-in happened here.
|
|
16
|
+
*/
|
|
17
|
+
export declare class SimCognitoProviderPage {
|
|
18
|
+
private readonly markup;
|
|
19
|
+
/**
|
|
20
|
+
* The page asking who the provider is signing in.
|
|
21
|
+
*
|
|
22
|
+
* Every field arrives filled in, so the common case is pressing the button.
|
|
23
|
+
* Editing the address is what drives a federated sign-up against a pool that
|
|
24
|
+
* already holds a local user at the same address, which real Cognito keeps
|
|
25
|
+
* as two accounts.
|
|
26
|
+
*/
|
|
27
|
+
render(provider: SimCognitoUserPoolIdentityProvider, parameters: SimCognitoPageParameters): Response;
|
|
28
|
+
/**
|
|
29
|
+
* One field per claim the provider's attribute mapping reads.
|
|
30
|
+
*
|
|
31
|
+
* A claim the mapping says nothing about reaches no pool attribute, so
|
|
32
|
+
* asking for one would be asking for something to throw away.
|
|
33
|
+
*/
|
|
34
|
+
private claimFields;
|
|
35
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { simCognitoClaimFieldPrefix, simCognitoDefaultClaim, simCognitoDefaultSubject, simCognitoMappedClaimNames, } from "../../user-pool/idp/sim-cognito-presented-external-user.js";
|
|
2
|
+
import { SimCognitoPageMarkup, } from "./sim-cognito-page-markup.js";
|
|
3
|
+
import { simCognitoAuthorizePath } from "./sim-cognito-page-paths.js";
|
|
4
|
+
/**
|
|
5
|
+
* The page a browser reaches where real Cognito would have sent it to an
|
|
6
|
+
* identity provider's own sign-in page.
|
|
7
|
+
*
|
|
8
|
+
* Nothing here calls Google, so there is no page to send anybody to and no
|
|
9
|
+
* password for anybody to type. This stands in for that page: it asks who the
|
|
10
|
+
* provider would have said is signing in, and the answer goes back to the
|
|
11
|
+
* authorize endpoint as the subject and the claims a provider asserts. A test
|
|
12
|
+
* says the same thing with `signInAs` and never sees this.
|
|
13
|
+
*
|
|
14
|
+
* It says whose page it is on its face, twice, because somebody meeting it in
|
|
15
|
+
* a screenshot or a screen recording has to be able to tell at a glance that
|
|
16
|
+
* no real sign-in happened here.
|
|
17
|
+
*/
|
|
18
|
+
export class SimCognitoProviderPage {
|
|
19
|
+
markup = new SimCognitoPageMarkup();
|
|
20
|
+
/**
|
|
21
|
+
* The page asking who the provider is signing in.
|
|
22
|
+
*
|
|
23
|
+
* Every field arrives filled in, so the common case is pressing the button.
|
|
24
|
+
* Editing the address is what drives a federated sign-up against a pool that
|
|
25
|
+
* already holds a local user at the same address, which real Cognito keeps
|
|
26
|
+
* as two accounts.
|
|
27
|
+
*/
|
|
28
|
+
render(provider, parameters) {
|
|
29
|
+
const body = this.markup.message(`This is Yulin standing in for ${provider.name}. It is not ` +
|
|
30
|
+
`${provider.name}, nobody has signed in there, and nothing on this ` +
|
|
31
|
+
`page reaches it. Say who ${provider.name} would have said is ` +
|
|
32
|
+
`signing in, and the pool signs that user in.`) +
|
|
33
|
+
this.markup.form(simCognitoAuthorizePath, this.markup.hidden(parameters) +
|
|
34
|
+
this.markup.field("subject", `Subject, which ${provider.name} identifies the user by`, "text", simCognitoDefaultSubject(provider)) +
|
|
35
|
+
this.claimFields(provider) +
|
|
36
|
+
this.markup.submit("continue", `Continue as this ${provider.name} user`));
|
|
37
|
+
return this.markup.page(`Simulated ${provider.name} sign-in`, body);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* One field per claim the provider's attribute mapping reads.
|
|
41
|
+
*
|
|
42
|
+
* A claim the mapping says nothing about reaches no pool attribute, so
|
|
43
|
+
* asking for one would be asking for something to throw away.
|
|
44
|
+
*/
|
|
45
|
+
claimFields(provider) {
|
|
46
|
+
return simCognitoMappedClaimNames(provider)
|
|
47
|
+
.map((claimName) => this.markup.field(`${simCognitoClaimFieldPrefix}${claimName}`, `${claimName} claim`, "text", simCognitoDefaultClaim(claimName)))
|
|
48
|
+
.join("");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type BackgroundScheduler } from "../../util/background/background.js";
|
|
2
2
|
import type { SimSdkCommandRouter } from "../../sdk/router/sim-sdk-command-router.type.js";
|
|
3
3
|
import type { SimAwsAccountRegionScope } from "../aws/sim-aws-account-region-scope.js";
|
|
4
|
+
import type { SimCloudWatchServiceWriter } from "../cloudwatch/write/sim-cloudwatch-service-writer.js";
|
|
4
5
|
import { SimAwsMessageLog } from "../aws/message/sim-aws-message-log.js";
|
|
5
6
|
import type { SimIamInterServiceAuthZ } from "../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
6
7
|
import { type SimWafProtection } from "../wafv2/association/sim-waf-protection.js";
|
|
@@ -17,6 +18,11 @@ import { type SimCognitoTriggerFunctions } from "./user-pool/trigger/sim-cognito
|
|
|
17
18
|
export type { SimCognitoIdentityProviderRequestOptions } from "./sim-cognito-user-directory.js";
|
|
18
19
|
interface SimCognitoIdentityProviderProperties {
|
|
19
20
|
readonly accountRegionScope?: SimAwsAccountRegionScope;
|
|
21
|
+
/**
|
|
22
|
+
* Where this pool's own `AWS/Cognito` metrics go. A provider built on its
|
|
23
|
+
* own has none, and counts nothing.
|
|
24
|
+
*/
|
|
25
|
+
readonly metrics?: SimCloudWatchServiceWriter;
|
|
20
26
|
readonly iam?: SimIamInterServiceAuthZ;
|
|
21
27
|
readonly background?: BackgroundScheduler;
|
|
22
28
|
/**
|
|
@@ -33,21 +33,21 @@ export class SimCognitoUserDirectory extends SimCognitoUserFactors {
|
|
|
33
33
|
*/
|
|
34
34
|
async confirmSignUp(command) {
|
|
35
35
|
await this.background.sequence();
|
|
36
|
-
return this.commands.
|
|
36
|
+
return this.commands.confirmSignUp.confirmSignUp(command);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Handle a ResendConfirmationCode Command from the SDK.
|
|
40
40
|
*/
|
|
41
41
|
async resendConfirmationCode(command) {
|
|
42
42
|
await this.background.sequence();
|
|
43
|
-
return this.commands.
|
|
43
|
+
return this.commands.confirmSignUp.resendConfirmationCode(command);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Handle an AdminConfirmSignUp Command from the SDK.
|
|
47
47
|
*/
|
|
48
48
|
async adminConfirmSignUp(command, options) {
|
|
49
49
|
await this.background.sequence();
|
|
50
|
-
return this.commands.
|
|
50
|
+
return this.commands.confirmSignUp.adminConfirmSignUp(command, options);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Handle a ForgotPassword Command from the SDK.
|
|
@@ -13,6 +13,14 @@ interface SimCognitoAuthorizationCodeProperties {
|
|
|
13
13
|
* has to produce the verifier for.
|
|
14
14
|
*/
|
|
15
15
|
readonly codeChallenge?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the sign-in this code came from happened at an identity provider.
|
|
18
|
+
*
|
|
19
|
+
* The token endpoint reads it to pick the `PreTokenGeneration` source, which
|
|
20
|
+
* real Cognito reports as `TokenGeneration_HostedAuth` for a federated grant
|
|
21
|
+
* and `TokenGeneration_Authentication` for a local one.
|
|
22
|
+
*/
|
|
23
|
+
readonly federated?: boolean | undefined;
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
* One authorization code, which is what an authorization code grant carries
|
|
@@ -29,6 +37,7 @@ export declare class SimCognitoAuthorizationCode {
|
|
|
29
37
|
readonly redirectUri: string;
|
|
30
38
|
readonly scopes: readonly string[];
|
|
31
39
|
readonly issuedAt: Date;
|
|
40
|
+
readonly federated: boolean;
|
|
32
41
|
private readonly codeChallenge;
|
|
33
42
|
constructor(properties: SimCognitoAuthorizationCodeProperties);
|
|
34
43
|
/**
|
|
@@ -24,6 +24,7 @@ export class SimCognitoAuthorizationCode {
|
|
|
24
24
|
redirectUri;
|
|
25
25
|
scopes;
|
|
26
26
|
issuedAt;
|
|
27
|
+
federated;
|
|
27
28
|
codeChallenge;
|
|
28
29
|
constructor(properties) {
|
|
29
30
|
this.value = randomUUID();
|
|
@@ -32,6 +33,7 @@ export class SimCognitoAuthorizationCode {
|
|
|
32
33
|
this.redirectUri = properties.redirectUri;
|
|
33
34
|
this.scopes = properties.scopes;
|
|
34
35
|
this.issuedAt = properties.issuedAt;
|
|
36
|
+
this.federated = properties.federated ?? false;
|
|
35
37
|
this.codeChallenge = properties.codeChallenge;
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SimCognitoRequestThrottle } from "./sim-cognito-request-throttle.js";
|
|
1
2
|
import { SimCognitoIdentityProviderStore } from "../idp/sim-cognito-identity-provider-store.js";
|
|
2
3
|
import type { SimCognitoUserPoolDomain } from "../domain/sim-cognito-user-pool-domain.js";
|
|
3
4
|
import type { SimCognitoAuthSession } from "./sim-cognito-auth-session.js";
|
|
@@ -26,6 +27,13 @@ export declare class SimCognitoPoolAuth {
|
|
|
26
27
|
* The external identity providers this pool federates to.
|
|
27
28
|
*/
|
|
28
29
|
readonly identityProviders: SimCognitoIdentityProviderStore;
|
|
30
|
+
/**
|
|
31
|
+
* How many requests of each kind this pool has been told to turn away.
|
|
32
|
+
*
|
|
33
|
+
* The simulator's own control rather than anything real Cognito exposes: a
|
|
34
|
+
* real pool's rate limits belong to the account and no API sets them.
|
|
35
|
+
*/
|
|
36
|
+
readonly throttle: SimCognitoRequestThrottle;
|
|
29
37
|
private readonly sessions;
|
|
30
38
|
private readonly managedLogin;
|
|
31
39
|
private readonly codes;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SimCognitoNotAuthorizedException } from "../../error/sim-cognito.error.js";
|
|
2
|
+
import { SimCognitoRequestThrottle } from "./sim-cognito-request-throttle.js";
|
|
2
3
|
import { SimCognitoIdentityProviderStore } from "../idp/sim-cognito-identity-provider-store.js";
|
|
3
4
|
import { SimCognitoAuthSessionStore, } from "./sim-cognito-auth-session-store.js";
|
|
4
5
|
import { SimCognitoAuthorizationCodeStore } from "./sim-cognito-authorization-code-store.js";
|
|
@@ -23,6 +24,13 @@ export class SimCognitoPoolAuth {
|
|
|
23
24
|
* The external identity providers this pool federates to.
|
|
24
25
|
*/
|
|
25
26
|
identityProviders = new SimCognitoIdentityProviderStore();
|
|
27
|
+
/**
|
|
28
|
+
* How many requests of each kind this pool has been told to turn away.
|
|
29
|
+
*
|
|
30
|
+
* The simulator's own control rather than anything real Cognito exposes: a
|
|
31
|
+
* real pool's rate limits belong to the account and no API sets them.
|
|
32
|
+
*/
|
|
33
|
+
throttle = new SimCognitoRequestThrottle();
|
|
26
34
|
sessions = new SimCognitoAuthSessionStore();
|
|
27
35
|
managedLogin = new SimCognitoManagedLoginSessionStore();
|
|
28
36
|
codes = new SimCognitoAuthorizationCodeStore();
|