monorise 0.0.1
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/dist/base/index.d.ts +254 -0
- package/dist/base/index.js +44 -0
- package/dist/base/index.js.map +1 -0
- package/dist/cli/cli.d.ts +1 -0
- package/dist/cli/cli.js +461 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/core/index.d.ts +4767 -0
- package/dist/core/index.js +7941 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/react/actions/app.action.d.ts +46 -0
- package/dist/react/actions/app.action.d.ts.map +1 -0
- package/dist/react/actions/auth.action.d.ts +24 -0
- package/dist/react/actions/auth.action.d.ts.map +1 -0
- package/dist/react/actions/config.action.d.ts +10 -0
- package/dist/react/actions/config.action.d.ts.map +1 -0
- package/dist/react/actions/core.action.d.ts +219 -0
- package/dist/react/actions/core.action.d.ts.map +1 -0
- package/dist/react/index.d.ts +1093 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +2344 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/lib/api.d.ts +38 -0
- package/dist/react/lib/api.d.ts.map +1 -0
- package/dist/react/lib/constant.d.ts +2 -0
- package/dist/react/lib/constant.d.ts.map +1 -0
- package/dist/react/lib/entity.d.ts +10 -0
- package/dist/react/lib/entity.d.ts.map +1 -0
- package/dist/react/lib/utils.d.ts +10 -0
- package/dist/react/lib/utils.d.ts.map +1 -0
- package/dist/react/services/auth.service.d.ts +21 -0
- package/dist/react/services/auth.service.d.ts.map +1 -0
- package/dist/react/services/core.service.d.ts +76 -0
- package/dist/react/services/core.service.d.ts.map +1 -0
- package/dist/react/services/filestore.service.d.ts +22 -0
- package/dist/react/services/filestore.service.d.ts.map +1 -0
- package/dist/react/store/monorise.store.d.ts +169 -0
- package/dist/react/store/monorise.store.d.ts.map +1 -0
- package/dist/react/tsup.config.d.ts +3 -0
- package/dist/react/tsup.config.d.ts.map +1 -0
- package/dist/react/types/api.type.d.ts +30 -0
- package/dist/react/types/api.type.d.ts.map +1 -0
- package/dist/react/types/axios.type.d.ts +13 -0
- package/dist/react/types/axios.type.d.ts.map +1 -0
- package/dist/react/types/monorise.type.d.ts +8 -0
- package/dist/react/types/monorise.type.d.ts.map +1 -0
- package/dist/react/types/mutual.type.d.ts +21 -0
- package/dist/react/types/mutual.type.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/analog.d.ts +423 -0
- package/dist/sst/.sst/platform/src/components/aws/analog.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts +542 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts +1002 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts +931 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts +52 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts +33 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts +41 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts +638 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/astro.d.ts +421 -0
- package/dist/sst/.sst/platform/src/components/aws/astro.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts +702 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts +47 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts +1216 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts +20 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +49 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts +403 -0
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts +299 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts +882 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts +306 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +194 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts +38 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts +603 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts +250 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts +27 -0
- package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dns.d.ts +94 -0
- package/dist/sst/.sst/platform/src/components/aws/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts +568 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/efs.d.ts +217 -0
- package/dist/sst/.sst/platform/src/components/aws/efs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts +291 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts +803 -0
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts +1629 -0
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts +40 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts +6 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts +38 -0
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts +249 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts +17 -0
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/logging.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/logging.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts +496 -0
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts +517 -0
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts +495 -0
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts +165 -0
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts +40 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts +317 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts +500 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts +29 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts +8 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts +12 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts +485 -0
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/react.d.ts +416 -0
- package/dist/sst/.sst/platform/src/components/aws/react.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts +232 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts +338 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts +364 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/remix.d.ts +423 -0
- package/dist/sst/.sst/platform/src/components/aws/remix.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts +29 -0
- package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts +1272 -0
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts +78 -0
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts +1625 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts +389 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts +414 -0
- package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts +685 -0
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts +736 -0
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts +73 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts +63 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts +236 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts +127 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts +231 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts +477 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts +91 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts +473 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts +417 -0
- package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts +354 -0
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts +322 -0
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts +150 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts +208 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts +444 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-site.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/base/base-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts +199 -0
- package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts +69 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts +103 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts +121 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts +107 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts +94 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts +186 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts +171 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts +222 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts +16 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts +107 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts +20 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts +60 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts +51 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts +262 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/component.d.ts +37 -0
- package/dist/sst/.sst/platform/src/components/component.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cpu.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/cpu.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/dns.d.ts +59 -0
- package/dist/sst/.sst/platform/src/components/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/error.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/error.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts +99 -0
- package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/experimental/index.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/experimental/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/index.d.ts +16 -0
- package/dist/sst/.sst/platform/src/components/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/input.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/input.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts +41 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/linkable.d.ts +271 -0
- package/dist/sst/.sst/platform/src/components/linkable.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/naming.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/naming.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/path.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/path.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts +19 -0
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/secret.d.ts +125 -0
- package/dist/sst/.sst/platform/src/components/secret.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/size.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/size.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts +73 -0
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/index.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/vercel/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts +14 -0
- package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/config.d.ts +1258 -0
- package/dist/sst/.sst/platform/src/config.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/compare-semver.d.ts +4 -0
- package/dist/sst/.sst/platform/src/util/compare-semver.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/fs.d.ts +5 -0
- package/dist/sst/.sst/platform/src/util/fs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/lazy.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/lazy.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/semaphore.d.ts +9 -0
- package/dist/sst/.sst/platform/src/util/semaphore.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/warn.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/warn.d.ts.map +1 -0
- package/dist/sst/components/dashboard.d.ts +2 -0
- package/dist/sst/components/dashboard.d.ts.map +1 -0
- package/dist/sst/components/monorise-core.d.ts +18 -0
- package/dist/sst/components/monorise-core.d.ts.map +1 -0
- package/dist/sst/components/q-function.d.ts +17 -0
- package/dist/sst/components/q-function.d.ts.map +1 -0
- package/dist/sst/components/single-table.d.ts +14 -0
- package/dist/sst/components/single-table.d.ts.map +1 -0
- package/dist/sst/constants/event.d.ts +73 -0
- package/dist/sst/constants/event.d.ts.map +1 -0
- package/dist/sst/constants/table.d.ts +3 -0
- package/dist/sst/constants/table.d.ts.map +1 -0
- package/dist/sst/index.d.ts +11 -0
- package/dist/sst/index.d.ts.map +1 -0
- package/dist/sst/index.js +609 -0
- package/dist/sst/index.js.map +1 -0
- package/dist/sst/sst.config.d.ts +3 -0
- package/dist/sst/sst.config.d.ts.map +1 -0
- package/dist/sst/tsup.config.d.ts +3 -0
- package/dist/sst/tsup.config.d.ts.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Component, Prettify, Transform } from "../component";
|
|
3
|
+
import { Link } from "../link";
|
|
4
|
+
import type { Input } from "../input";
|
|
5
|
+
import { FunctionArgs, FunctionArn } from "./function";
|
|
6
|
+
import { RETENTION } from "./logging";
|
|
7
|
+
import { ApiGatewayV2DomainArgs } from "./helpers/apigatewayv2-domain";
|
|
8
|
+
import { ApiGatewayV2LambdaRoute } from "./apigatewayv2-lambda-route";
|
|
9
|
+
import { ApiGatewayV2Authorizer } from "./apigatewayv2-authorizer";
|
|
10
|
+
import { apigatewayv2, cloudwatch } from "@pulumi/aws";
|
|
11
|
+
import { ApiGatewayV2UrlRoute } from "./apigatewayv2-url-route";
|
|
12
|
+
import { Duration, DurationHours } from "../duration";
|
|
13
|
+
import { ApiGatewayV2PrivateRoute } from "./apigatewayv2-private-route";
|
|
14
|
+
import { Vpc } from "./vpc";
|
|
15
|
+
interface ApiGatewayV2CorsArgs {
|
|
16
|
+
/**
|
|
17
|
+
* Allow cookies or other credentials in requests to the HTTP API.
|
|
18
|
+
* @default `false`
|
|
19
|
+
* @example
|
|
20
|
+
* ```js
|
|
21
|
+
* {
|
|
22
|
+
* cors: {
|
|
23
|
+
* allowCredentials: true
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
allowCredentials?: Input<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* The HTTP headers that origins can include in requests to the HTTP API.
|
|
31
|
+
* @default `["*"]`
|
|
32
|
+
* @example
|
|
33
|
+
* ```js
|
|
34
|
+
* {
|
|
35
|
+
* cors: {
|
|
36
|
+
* allowHeaders: ["date", "keep-alive", "x-custom-header"]
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
allowHeaders?: Input<Input<string>[]>;
|
|
42
|
+
/**
|
|
43
|
+
* The origins that can access the HTTP API.
|
|
44
|
+
* @default `["*"]`
|
|
45
|
+
* @example
|
|
46
|
+
* ```js
|
|
47
|
+
* {
|
|
48
|
+
* cors: {
|
|
49
|
+
* allowOrigins: ["https://www.example.com", "http://localhost:60905"]
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
* Or the wildcard for all origins.
|
|
54
|
+
* ```js
|
|
55
|
+
* {
|
|
56
|
+
* cors: {
|
|
57
|
+
* allowOrigins: ["*"]
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
allowOrigins?: Input<Input<string>[]>;
|
|
63
|
+
/**
|
|
64
|
+
* The HTTP methods that are allowed when calling the HTTP API.
|
|
65
|
+
* @default `["*"]`
|
|
66
|
+
* @example
|
|
67
|
+
* ```js
|
|
68
|
+
* {
|
|
69
|
+
* cors: {
|
|
70
|
+
* allowMethods: ["GET", "POST", "DELETE"]
|
|
71
|
+
* }
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
* Or the wildcard for all methods.
|
|
75
|
+
* ```js
|
|
76
|
+
* {
|
|
77
|
+
* cors: {
|
|
78
|
+
* allowMethods: ["*"]
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
allowMethods?: Input<Input<"*" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT">[]>;
|
|
84
|
+
/**
|
|
85
|
+
* The HTTP headers you want to expose in your function to an origin that calls the HTTP API.
|
|
86
|
+
* @default `[]`
|
|
87
|
+
* @example
|
|
88
|
+
* ```js
|
|
89
|
+
* {
|
|
90
|
+
* cors: {
|
|
91
|
+
* exposeHeaders: ["date", "keep-alive", "x-custom-header"]
|
|
92
|
+
* }
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
exposeHeaders?: Input<Input<string>[]>;
|
|
97
|
+
/**
|
|
98
|
+
* The maximum amount of time the browser can cache results of a preflight request. By
|
|
99
|
+
* default the browser doesn't cache the results. The maximum value is `86400 seconds` or `1 day`.
|
|
100
|
+
* @default `"0 seconds"`
|
|
101
|
+
* @example
|
|
102
|
+
* ```js
|
|
103
|
+
* {
|
|
104
|
+
* cors: {
|
|
105
|
+
* maxAge: "1 day"
|
|
106
|
+
* }
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
maxAge?: Input<Duration>;
|
|
111
|
+
}
|
|
112
|
+
export interface ApiGatewayV2Args {
|
|
113
|
+
/**
|
|
114
|
+
* [Link resources](/docs/linking/) to all your API Gateway routes.
|
|
115
|
+
*
|
|
116
|
+
* Linked resources will be merged with the resources linked to each route.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
*
|
|
120
|
+
* Takes a list of resources to link to all the routes.
|
|
121
|
+
*
|
|
122
|
+
* ```js
|
|
123
|
+
* {
|
|
124
|
+
* link: [bucket, stripeKey]
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
link?: FunctionArgs["link"];
|
|
129
|
+
/**
|
|
130
|
+
* Set a custom domain for your HTTP API.
|
|
131
|
+
*
|
|
132
|
+
* Automatically manages domains hosted on AWS Route 53, Cloudflare, and Vercel. For other
|
|
133
|
+
* providers, you'll need to pass in a `cert` that validates domain ownership and add the
|
|
134
|
+
* DNS records.
|
|
135
|
+
*
|
|
136
|
+
* :::tip
|
|
137
|
+
* Built-in support for AWS Route 53, Cloudflare, and Vercel. And manual setup for other
|
|
138
|
+
* providers.
|
|
139
|
+
* :::
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
*
|
|
143
|
+
* By default this assumes the domain is hosted on Route 53.
|
|
144
|
+
*
|
|
145
|
+
* ```js
|
|
146
|
+
* {
|
|
147
|
+
* domain: "example.com"
|
|
148
|
+
* }
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* For domains hosted on Cloudflare.
|
|
152
|
+
*
|
|
153
|
+
* ```js
|
|
154
|
+
* {
|
|
155
|
+
* domain: {
|
|
156
|
+
* name: "example.com",
|
|
157
|
+
* dns: sst.cloudflare.dns()
|
|
158
|
+
* }
|
|
159
|
+
* }
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
domain?: Input<string | Prettify<ApiGatewayV2DomainArgs>>;
|
|
163
|
+
/**
|
|
164
|
+
* Customize the CORS (Cross-origin resource sharing) settings for your HTTP API.
|
|
165
|
+
* @default `true`
|
|
166
|
+
* @example
|
|
167
|
+
* Disable CORS.
|
|
168
|
+
* ```js
|
|
169
|
+
* {
|
|
170
|
+
* cors: false
|
|
171
|
+
* }
|
|
172
|
+
* ```
|
|
173
|
+
* Only enable the `GET` and `POST` methods for `https://example.com`.
|
|
174
|
+
* ```js
|
|
175
|
+
* {
|
|
176
|
+
* cors: {
|
|
177
|
+
* allowMethods: ["GET", "POST"],
|
|
178
|
+
* allowOrigins: ["https://example.com"]
|
|
179
|
+
* }
|
|
180
|
+
* }
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
cors?: Input<boolean | Prettify<ApiGatewayV2CorsArgs>>;
|
|
184
|
+
/**
|
|
185
|
+
* Configure the [API Gateway logs](https://docs.aws.amazon.com/apigateway/latest/developerguide/view-cloudwatch-log-events-in-cloudwatch-console.html) in CloudWatch. By default, access logs are enabled and kept for 1 month.
|
|
186
|
+
* @default `{retention: "1 month"}`
|
|
187
|
+
* @example
|
|
188
|
+
* ```js
|
|
189
|
+
* {
|
|
190
|
+
* accessLog: {
|
|
191
|
+
* retention: "forever"
|
|
192
|
+
* }
|
|
193
|
+
* }
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
accessLog?: Input<{
|
|
197
|
+
/**
|
|
198
|
+
* The duration the API Gateway logs are kept in CloudWatch.
|
|
199
|
+
* @default `1 month`
|
|
200
|
+
*/
|
|
201
|
+
retention?: Input<keyof typeof RETENTION>;
|
|
202
|
+
}>;
|
|
203
|
+
/**
|
|
204
|
+
* Configure the API to connect to private resources in a virtual private cloud or VPC.
|
|
205
|
+
* This creates a VPC link for your HTTP API.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* Create a `Vpc` component.
|
|
209
|
+
*
|
|
210
|
+
* ```js title="sst.config.ts"
|
|
211
|
+
* const myVpc = new sst.aws.Vpc("MyVpc");
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* Or reference an existing VPC.
|
|
215
|
+
*
|
|
216
|
+
* ```js title="sst.config.ts"
|
|
217
|
+
* const myVpc = sst.aws.Vpc.get("MyVpc", "vpc-12345678901234567");
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* And pass it in. The VPC link will be placed in the public subnets.
|
|
221
|
+
*
|
|
222
|
+
* ```js
|
|
223
|
+
* {
|
|
224
|
+
* vpc: myVpc
|
|
225
|
+
* }
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* The above is equivalent to:
|
|
229
|
+
*
|
|
230
|
+
* ```js
|
|
231
|
+
* {
|
|
232
|
+
* vpc: {
|
|
233
|
+
* securityGroups: myVpc.securityGroups,
|
|
234
|
+
* subnets: myVpc.publicSubnets
|
|
235
|
+
* }
|
|
236
|
+
* }
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
vpc?: Vpc | Input<{
|
|
240
|
+
/**
|
|
241
|
+
* A list of VPC security group IDs.
|
|
242
|
+
*/
|
|
243
|
+
securityGroups: Input<Input<string>[]>;
|
|
244
|
+
/**
|
|
245
|
+
* A list of VPC subnet IDs.
|
|
246
|
+
*/
|
|
247
|
+
subnets: Input<Input<string>[]>;
|
|
248
|
+
}>;
|
|
249
|
+
/**
|
|
250
|
+
* [Transform](/docs/components#transform) how this component creates its underlying
|
|
251
|
+
* resources.
|
|
252
|
+
*/
|
|
253
|
+
transform?: {
|
|
254
|
+
/**
|
|
255
|
+
* Transform the API Gateway HTTP API resource.
|
|
256
|
+
*/
|
|
257
|
+
api?: Transform<apigatewayv2.ApiArgs>;
|
|
258
|
+
/**
|
|
259
|
+
* Transform the API Gateway HTTP API stage resource.
|
|
260
|
+
*/
|
|
261
|
+
stage?: Transform<apigatewayv2.StageArgs>;
|
|
262
|
+
/**
|
|
263
|
+
* Transform the API Gateway HTTP API domain name resource.
|
|
264
|
+
*/
|
|
265
|
+
domainName?: Transform<apigatewayv2.DomainNameArgs>;
|
|
266
|
+
/**
|
|
267
|
+
* Transform the API Gateway HTTP API VPC link resource.
|
|
268
|
+
*/
|
|
269
|
+
vpcLink?: Transform<apigatewayv2.VpcLinkArgs>;
|
|
270
|
+
/**
|
|
271
|
+
* Transform the CloudWatch LogGroup resource used for access logs.
|
|
272
|
+
*/
|
|
273
|
+
logGroup?: Transform<cloudwatch.LogGroupArgs>;
|
|
274
|
+
/**
|
|
275
|
+
* Transform the routes. This is called for every route that is added.
|
|
276
|
+
*
|
|
277
|
+
* :::note
|
|
278
|
+
* This is applied right before the resource is created.
|
|
279
|
+
* :::
|
|
280
|
+
*
|
|
281
|
+
* You can use this to set any default props for all the routes and their handler function.
|
|
282
|
+
* Like the other transforms, you can either pass in an object or a callback.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
*
|
|
286
|
+
* Here we are setting a default memory of `2048 MB` for our routes.
|
|
287
|
+
*
|
|
288
|
+
* ```js
|
|
289
|
+
* {
|
|
290
|
+
* transform: {
|
|
291
|
+
* route: {
|
|
292
|
+
* handler: (args, opts) => {
|
|
293
|
+
* // Set the default if it's not set by the route
|
|
294
|
+
* args.memory ??= "2048 MB";
|
|
295
|
+
* }
|
|
296
|
+
* }
|
|
297
|
+
* }
|
|
298
|
+
* }
|
|
299
|
+
* ```
|
|
300
|
+
*
|
|
301
|
+
* Defaulting to IAM auth for all our routes.
|
|
302
|
+
*
|
|
303
|
+
* ```js
|
|
304
|
+
* {
|
|
305
|
+
* transform: {
|
|
306
|
+
* route: {
|
|
307
|
+
* args: (props) => {
|
|
308
|
+
* // Set the default if it's not set by the route
|
|
309
|
+
* props.auth ??= { iam: true };
|
|
310
|
+
* }
|
|
311
|
+
* }
|
|
312
|
+
* }
|
|
313
|
+
* }
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
route?: {
|
|
317
|
+
/**
|
|
318
|
+
* Transform the handler function of the route.
|
|
319
|
+
*/
|
|
320
|
+
handler?: Transform<FunctionArgs>;
|
|
321
|
+
/**
|
|
322
|
+
* Transform the arguments for the route.
|
|
323
|
+
*/
|
|
324
|
+
args?: Transform<ApiGatewayV2RouteArgs>;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
export interface ApiGatewayV2AuthorizerArgs {
|
|
329
|
+
/**
|
|
330
|
+
* The name of the authorizer.
|
|
331
|
+
* @example
|
|
332
|
+
* ```js
|
|
333
|
+
* {
|
|
334
|
+
* name: "myAuthorizer"
|
|
335
|
+
* }
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
name: string;
|
|
339
|
+
/**
|
|
340
|
+
* Create a JWT or JSON Web Token authorizer that can be used by the routes.
|
|
341
|
+
*
|
|
342
|
+
* @example
|
|
343
|
+
* Configure JWT auth.
|
|
344
|
+
*
|
|
345
|
+
* ```js
|
|
346
|
+
* {
|
|
347
|
+
* jwt: {
|
|
348
|
+
* issuer: "https://issuer.com/",
|
|
349
|
+
* audiences: ["https://api.example.com"],
|
|
350
|
+
* identitySource: "$request.header.AccessToken"
|
|
351
|
+
* }
|
|
352
|
+
* }
|
|
353
|
+
* ```
|
|
354
|
+
*
|
|
355
|
+
* You can also use Cognito as the identity provider.
|
|
356
|
+
*
|
|
357
|
+
* ```js
|
|
358
|
+
* {
|
|
359
|
+
* jwt: {
|
|
360
|
+
* audiences: [userPoolClient.id],
|
|
361
|
+
* issuer: $interpolate`https://cognito-idp.${aws.getArnOutput(userPool).region}.amazonaws.com/${userPool.id}`,
|
|
362
|
+
* }
|
|
363
|
+
* }
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* Where `userPool` and `userPoolClient` are:
|
|
367
|
+
*
|
|
368
|
+
* ```js
|
|
369
|
+
* const userPool = new aws.cognito.UserPool();
|
|
370
|
+
* const userPoolClient = new aws.cognito.UserPoolClient();
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
jwt?: Input<{
|
|
374
|
+
/**
|
|
375
|
+
* Base domain of the identity provider that issues JSON Web Tokens.
|
|
376
|
+
* @example
|
|
377
|
+
* ```js
|
|
378
|
+
* {
|
|
379
|
+
* issuer: "https://issuer.com/"
|
|
380
|
+
* }
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
issuer: Input<string>;
|
|
384
|
+
/**
|
|
385
|
+
* List of the intended recipients of the JWT. A valid JWT must provide an `aud` that matches at least one entry in this list.
|
|
386
|
+
*/
|
|
387
|
+
audiences: Input<Input<string>[]>;
|
|
388
|
+
/**
|
|
389
|
+
* Specifies where to extract the JWT from the request.
|
|
390
|
+
* @default `"$request.header.Authorization"`
|
|
391
|
+
*/
|
|
392
|
+
identitySource?: Input<string>;
|
|
393
|
+
}>;
|
|
394
|
+
/**
|
|
395
|
+
* Create a Lambda authorizer that can be used by the routes.
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* Configure Lambda auth.
|
|
399
|
+
*
|
|
400
|
+
* ```js
|
|
401
|
+
* {
|
|
402
|
+
* lambda: {
|
|
403
|
+
* function: "src/authorizer.index"
|
|
404
|
+
* }
|
|
405
|
+
* }
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
lambda?: Input<{
|
|
409
|
+
/**
|
|
410
|
+
* The Lambda authorizer function. Takes the handler path or the function args.
|
|
411
|
+
* @example
|
|
412
|
+
* Add a simple authorizer.
|
|
413
|
+
*
|
|
414
|
+
* ```js
|
|
415
|
+
* {
|
|
416
|
+
* function: "src/authorizer.index"
|
|
417
|
+
* }
|
|
418
|
+
* ```
|
|
419
|
+
*
|
|
420
|
+
* Customize the authorizer handler.
|
|
421
|
+
*
|
|
422
|
+
* ```js
|
|
423
|
+
* {
|
|
424
|
+
* function: {
|
|
425
|
+
* handler: "src/authorizer.index",
|
|
426
|
+
* memory: "2048 MB"
|
|
427
|
+
* }
|
|
428
|
+
* }
|
|
429
|
+
* ```
|
|
430
|
+
*/
|
|
431
|
+
function: Input<string | FunctionArgs | FunctionArn>;
|
|
432
|
+
/**
|
|
433
|
+
* The JWT payload version.
|
|
434
|
+
* @default `"2.0"`
|
|
435
|
+
* @example
|
|
436
|
+
* ```js
|
|
437
|
+
* {
|
|
438
|
+
* payload: "2.0"
|
|
439
|
+
* }
|
|
440
|
+
* ```
|
|
441
|
+
*/
|
|
442
|
+
payload?: Input<"1.0" | "2.0">;
|
|
443
|
+
/**
|
|
444
|
+
* The response type.
|
|
445
|
+
* @default `"simple"`
|
|
446
|
+
* @example
|
|
447
|
+
* ```js
|
|
448
|
+
* {
|
|
449
|
+
* response: "iam"
|
|
450
|
+
* }
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
response?: Input<"simple" | "iam">;
|
|
454
|
+
/**
|
|
455
|
+
* The time to live (TTL) for the authorizer.
|
|
456
|
+
* @default Not cached
|
|
457
|
+
* @example
|
|
458
|
+
* ```js
|
|
459
|
+
* {
|
|
460
|
+
* ttl: "300 seconds"
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
ttl?: Input<DurationHours>;
|
|
465
|
+
/**
|
|
466
|
+
* Specifies where to extract the identity from.
|
|
467
|
+
* @default `["$request.header.Authorization"]`
|
|
468
|
+
* @example
|
|
469
|
+
* ```js
|
|
470
|
+
* {
|
|
471
|
+
* identitySources: ["$request.header.RequestToken"]
|
|
472
|
+
* }
|
|
473
|
+
* ```
|
|
474
|
+
*/
|
|
475
|
+
identitySources?: Input<Input<string>[]>;
|
|
476
|
+
}>;
|
|
477
|
+
/**
|
|
478
|
+
* [Transform](/docs/components#transform) how this component creates its underlying
|
|
479
|
+
* resources.
|
|
480
|
+
*/
|
|
481
|
+
transform?: {
|
|
482
|
+
/**
|
|
483
|
+
* Transform the API Gateway authorizer resource.
|
|
484
|
+
*/
|
|
485
|
+
authorizer?: Transform<apigatewayv2.AuthorizerArgs>;
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
export interface ApiGatewayV2RouteArgs {
|
|
489
|
+
/**
|
|
490
|
+
* Enable auth for your HTTP API. By default, auth is disabled.
|
|
491
|
+
*
|
|
492
|
+
* @default `false`
|
|
493
|
+
* @example
|
|
494
|
+
* ```js
|
|
495
|
+
* {
|
|
496
|
+
* auth: {
|
|
497
|
+
* iam: true
|
|
498
|
+
* }
|
|
499
|
+
* }
|
|
500
|
+
* ```
|
|
501
|
+
*/
|
|
502
|
+
auth?: Input<false | {
|
|
503
|
+
/**
|
|
504
|
+
* Enable IAM authorization for a given API route. When IAM auth is enabled, clients
|
|
505
|
+
* need to use Signature Version 4 to sign their requests with their AWS credentials.
|
|
506
|
+
*/
|
|
507
|
+
iam?: Input<boolean>;
|
|
508
|
+
/**
|
|
509
|
+
* Enable JWT or JSON Web Token authorization for a given API route. When JWT auth is enabled, clients need to include a valid JWT in their requests.
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* You can configure JWT auth.
|
|
513
|
+
*
|
|
514
|
+
* ```js
|
|
515
|
+
* {
|
|
516
|
+
* auth: {
|
|
517
|
+
* jwt: {
|
|
518
|
+
* authorizer: myAuthorizer.id,
|
|
519
|
+
* scopes: ["read:profile", "write:profile"]
|
|
520
|
+
* }
|
|
521
|
+
* }
|
|
522
|
+
* }
|
|
523
|
+
* ```
|
|
524
|
+
*
|
|
525
|
+
* Where `myAuthorizer` is created by calling the `addAuthorizer` method.
|
|
526
|
+
*/
|
|
527
|
+
jwt?: Input<{
|
|
528
|
+
/**
|
|
529
|
+
* Authorizer ID of the JWT authorizer.
|
|
530
|
+
*/
|
|
531
|
+
authorizer: Input<string>;
|
|
532
|
+
/**
|
|
533
|
+
* Defines the permissions or access levels that the JWT grants. If the JWT does not have the required scope, the request is rejected. By default it does not require any scopes.
|
|
534
|
+
*/
|
|
535
|
+
scopes?: Input<Input<string>[]>;
|
|
536
|
+
}>;
|
|
537
|
+
/**
|
|
538
|
+
* Enable custom Lambda authorization for a given API route. Pass in the authorizer ID.
|
|
539
|
+
*
|
|
540
|
+
* @example
|
|
541
|
+
* ```js
|
|
542
|
+
* {
|
|
543
|
+
* auth: {
|
|
544
|
+
* lambda: myAuthorizer.id
|
|
545
|
+
* }
|
|
546
|
+
* }
|
|
547
|
+
* ```
|
|
548
|
+
*
|
|
549
|
+
* Where `myAuthorizer` is created by calling the `addAuthorizer` method.
|
|
550
|
+
*/
|
|
551
|
+
lambda?: Input<string>;
|
|
552
|
+
}>;
|
|
553
|
+
/**
|
|
554
|
+
* [Transform](/docs/components#transform) how this component creates its underlying
|
|
555
|
+
* resources.
|
|
556
|
+
*/
|
|
557
|
+
transform?: {
|
|
558
|
+
/**
|
|
559
|
+
* Transform the API Gateway HTTP API integration resource.
|
|
560
|
+
*/
|
|
561
|
+
integration?: Transform<apigatewayv2.IntegrationArgs>;
|
|
562
|
+
/**
|
|
563
|
+
* Transform the API Gateway HTTP API route resource.
|
|
564
|
+
*/
|
|
565
|
+
route?: Transform<apigatewayv2.RouteArgs>;
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* The `ApiGatewayV2` component lets you add an [Amazon API Gateway HTTP API](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api.html) to your app.
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
*
|
|
573
|
+
* #### Create the API
|
|
574
|
+
*
|
|
575
|
+
* ```ts title="sst.config.ts"
|
|
576
|
+
* const api = new sst.aws.ApiGatewayV2("MyApi");
|
|
577
|
+
* ```
|
|
578
|
+
*
|
|
579
|
+
* #### Add a custom domain
|
|
580
|
+
*
|
|
581
|
+
* ```js {2} title="sst.config.ts"
|
|
582
|
+
* new sst.aws.ApiGatewayV2("MyApi", {
|
|
583
|
+
* domain: "api.example.com"
|
|
584
|
+
* });
|
|
585
|
+
* ```
|
|
586
|
+
*
|
|
587
|
+
* #### Add routes
|
|
588
|
+
*
|
|
589
|
+
* ```ts title="sst.config.ts"
|
|
590
|
+
* api.route("GET /", "src/get.handler");
|
|
591
|
+
* api.route("POST /", "src/post.handler");
|
|
592
|
+
* ```
|
|
593
|
+
*
|
|
594
|
+
* #### Configure the routes
|
|
595
|
+
*
|
|
596
|
+
* You can configure the route.
|
|
597
|
+
*
|
|
598
|
+
* ```ts title="sst.config.ts"
|
|
599
|
+
* api.route("GET /", "src/get.handler", {
|
|
600
|
+
* auth: { iam: true }
|
|
601
|
+
* });
|
|
602
|
+
* ```
|
|
603
|
+
*
|
|
604
|
+
* #### Configure the route handler
|
|
605
|
+
*
|
|
606
|
+
* You can configure the route handler function.
|
|
607
|
+
*
|
|
608
|
+
* ```ts title="sst.config.ts"
|
|
609
|
+
* api.route("POST /", {
|
|
610
|
+
* handler: "src/post.handler",
|
|
611
|
+
* memory: "2048 MB"
|
|
612
|
+
* });
|
|
613
|
+
* ```
|
|
614
|
+
*
|
|
615
|
+
* #### Default props for all routes
|
|
616
|
+
*
|
|
617
|
+
* You can use the `transform` to set some default props for all your routes. For example,
|
|
618
|
+
* instead of setting the `memory` for each route.
|
|
619
|
+
*
|
|
620
|
+
* ```ts title="sst.config.ts"
|
|
621
|
+
* api.route("GET /", { handler: "src/get.handler", memory: "2048 MB" });
|
|
622
|
+
* api.route("POST /", { handler: "src/post.handler", memory: "2048 MB" });
|
|
623
|
+
* ```
|
|
624
|
+
*
|
|
625
|
+
* You can set it through the `transform`.
|
|
626
|
+
*
|
|
627
|
+
* ```ts title="sst.config.ts" {6}
|
|
628
|
+
* const api = new sst.aws.ApiGatewayV2("MyApi", {
|
|
629
|
+
* transform: {
|
|
630
|
+
* route: {
|
|
631
|
+
* handler: (args, opts) => {
|
|
632
|
+
* // Set the default if it's not set by the route
|
|
633
|
+
* args.memory ??= "2048 MB";
|
|
634
|
+
* }
|
|
635
|
+
* }
|
|
636
|
+
* }
|
|
637
|
+
* });
|
|
638
|
+
*
|
|
639
|
+
* api.route("GET /", "src/get.handler");
|
|
640
|
+
* api.route("POST /", "src/post.handler");
|
|
641
|
+
* ```
|
|
642
|
+
*
|
|
643
|
+
* With this we set the `memory` if it's not overridden by the route.
|
|
644
|
+
*/
|
|
645
|
+
export declare class ApiGatewayV2 extends Component implements Link.Linkable {
|
|
646
|
+
private constructorName;
|
|
647
|
+
private constructorArgs;
|
|
648
|
+
private constructorOpts;
|
|
649
|
+
private api;
|
|
650
|
+
private apigDomain?;
|
|
651
|
+
private apiMapping?;
|
|
652
|
+
private logGroup;
|
|
653
|
+
private vpcLink?;
|
|
654
|
+
constructor(name: string, args?: ApiGatewayV2Args, opts?: ComponentResourceOptions);
|
|
655
|
+
/**
|
|
656
|
+
* The URL of the API.
|
|
657
|
+
*
|
|
658
|
+
* If the `domain` is set, this is the URL with the custom domain.
|
|
659
|
+
* Otherwise, it's the auto-generated API Gateway URL.
|
|
660
|
+
*/
|
|
661
|
+
get url(): Output<string>;
|
|
662
|
+
/**
|
|
663
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
664
|
+
*/
|
|
665
|
+
get nodes(): {
|
|
666
|
+
/**
|
|
667
|
+
* The Amazon API Gateway HTTP API.
|
|
668
|
+
*/
|
|
669
|
+
api: import("@pulumi/aws/apigatewayv2/api").Api;
|
|
670
|
+
/**
|
|
671
|
+
* The API Gateway HTTP API domain name.
|
|
672
|
+
*/
|
|
673
|
+
readonly domainName: Output<import("@pulumi/aws/apigatewayv2/domainName").DomainName>;
|
|
674
|
+
/**
|
|
675
|
+
* The CloudWatch LogGroup for the access logs.
|
|
676
|
+
*/
|
|
677
|
+
logGroup: import("@pulumi/aws/cloudwatch/logGroup").LogGroup;
|
|
678
|
+
/**
|
|
679
|
+
* The API Gateway HTTP API VPC link.
|
|
680
|
+
*/
|
|
681
|
+
vpcLink: import("@pulumi/aws/apigatewayv2/vpcLink").VpcLink | undefined;
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* Add a route to the API Gateway HTTP API. The route is a combination of
|
|
685
|
+
* - An HTTP method and a path, `{METHOD} /{path}`.
|
|
686
|
+
* - Or a `$default` route.
|
|
687
|
+
*
|
|
688
|
+
* :::tip
|
|
689
|
+
* The `$default` route is a default or catch-all route. It'll match if no other route matches.
|
|
690
|
+
* :::
|
|
691
|
+
*
|
|
692
|
+
* A method could be one of `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, or `ANY`. Here `ANY` matches any HTTP method.
|
|
693
|
+
*
|
|
694
|
+
* The path can be a combination of
|
|
695
|
+
* - Literal segments, `/notes`, `/notes/new`, etc.
|
|
696
|
+
* - Parameter segments, `/notes/{noteId}`, `/notes/{noteId}/attachments/{attachmentId}`, etc.
|
|
697
|
+
* - Greedy segments, `/{proxy+}`, `/notes/{proxy+}`, etc. The `{proxy+}` segment is a greedy segment that matches all child paths. It needs to be at the end of the path.
|
|
698
|
+
*
|
|
699
|
+
* :::tip
|
|
700
|
+
* The `{proxy+}` is a greedy segment, it matches all its child paths.
|
|
701
|
+
* :::
|
|
702
|
+
*
|
|
703
|
+
* The `$default` is a reserved keyword for the default route. It'll be matched
|
|
704
|
+
* if no other route matches. When a request comes in, the API Gateway will look
|
|
705
|
+
* for the most specific match. If no route matches, the `$default` route will
|
|
706
|
+
* be invoked.
|
|
707
|
+
*
|
|
708
|
+
* :::note
|
|
709
|
+
* You cannot have duplicate routes.
|
|
710
|
+
* :::
|
|
711
|
+
*
|
|
712
|
+
* @param rawRoute The path for the route.
|
|
713
|
+
* @param handler The function that'll be invoked.
|
|
714
|
+
* @param args Configure the route.
|
|
715
|
+
*
|
|
716
|
+
* @example
|
|
717
|
+
* Add a simple route.
|
|
718
|
+
*
|
|
719
|
+
* ```js title="sst.config.ts"
|
|
720
|
+
* api.route("GET /", "src/get.handler");
|
|
721
|
+
* ```
|
|
722
|
+
*
|
|
723
|
+
* Match any HTTP method.
|
|
724
|
+
*
|
|
725
|
+
* ```js title="sst.config.ts"
|
|
726
|
+
* api.route("ANY /", "src/route.handler");
|
|
727
|
+
* ```
|
|
728
|
+
*
|
|
729
|
+
* Add a default or fallback route. Here for every request other than `GET /`,
|
|
730
|
+
* the `$default` route will be invoked.
|
|
731
|
+
*
|
|
732
|
+
* ```js title="sst.config.ts"
|
|
733
|
+
* api.route("GET /", "src/get.handler");
|
|
734
|
+
*
|
|
735
|
+
* api.route("$default", "src/default.handler");
|
|
736
|
+
* ```
|
|
737
|
+
*
|
|
738
|
+
* Add a parameterized route.
|
|
739
|
+
*
|
|
740
|
+
* ```js title="sst.config.ts"
|
|
741
|
+
* api.route("GET /notes/{id}", "src/get.handler");
|
|
742
|
+
* ```
|
|
743
|
+
*
|
|
744
|
+
* Add a greedy route.
|
|
745
|
+
*
|
|
746
|
+
* ```js title="sst.config.ts"
|
|
747
|
+
* api.route("GET /notes/{proxy+}", "src/greedy.handler");
|
|
748
|
+
* ```
|
|
749
|
+
*
|
|
750
|
+
* Enable auth for a route.
|
|
751
|
+
*
|
|
752
|
+
* ```js title="sst.config.ts"
|
|
753
|
+
* api.route("GET /", "src/get.handler")
|
|
754
|
+
* api.route("POST /", "src/post.handler", {
|
|
755
|
+
* auth: {
|
|
756
|
+
* iam: true
|
|
757
|
+
* }
|
|
758
|
+
* });
|
|
759
|
+
* ```
|
|
760
|
+
*
|
|
761
|
+
* Customize the route handler.
|
|
762
|
+
*
|
|
763
|
+
* ```js title="sst.config.ts"
|
|
764
|
+
* api.route("GET /", {
|
|
765
|
+
* handler: "src/get.handler",
|
|
766
|
+
* memory: "2048 MB"
|
|
767
|
+
* });
|
|
768
|
+
* ```
|
|
769
|
+
*
|
|
770
|
+
* Or pass in the ARN of an existing Lambda function.
|
|
771
|
+
*
|
|
772
|
+
* ```js title="sst.config.ts"
|
|
773
|
+
* api.route("GET /", "arn:aws:lambda:us-east-1:123456789012:function:my-function");
|
|
774
|
+
* ```
|
|
775
|
+
*/
|
|
776
|
+
route(rawRoute: string, handler: Input<string | FunctionArgs | FunctionArn>, args?: ApiGatewayV2RouteArgs): ApiGatewayV2LambdaRoute;
|
|
777
|
+
/**
|
|
778
|
+
* Add a URL route to the API Gateway HTTP API.
|
|
779
|
+
*
|
|
780
|
+
* @param rawRoute The path for the route.
|
|
781
|
+
* @param url The URL to forward to.
|
|
782
|
+
* @param args Configure the route.
|
|
783
|
+
*
|
|
784
|
+
* @example
|
|
785
|
+
* Add a simple route.
|
|
786
|
+
*
|
|
787
|
+
* ```js title="sst.config.ts"
|
|
788
|
+
* api.routeUrl("GET /", "https://google.com");
|
|
789
|
+
* ```
|
|
790
|
+
*
|
|
791
|
+
* Enable auth for a route.
|
|
792
|
+
*
|
|
793
|
+
* ```js title="sst.config.ts"
|
|
794
|
+
* api.routeUrl("POST /", "https://google.com", {
|
|
795
|
+
* auth: {
|
|
796
|
+
* iam: true
|
|
797
|
+
* }
|
|
798
|
+
* });
|
|
799
|
+
* ```
|
|
800
|
+
*/
|
|
801
|
+
routeUrl(rawRoute: string, url: Input<string>, args?: ApiGatewayV2RouteArgs): ApiGatewayV2UrlRoute;
|
|
802
|
+
/**
|
|
803
|
+
* Adds a private route to the API Gateway HTTP API.
|
|
804
|
+
*
|
|
805
|
+
* To add private routes, you need to have a VPC link. Make sure to pass in a `vpc`.
|
|
806
|
+
* Learn more about [adding private routes](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-private.html).
|
|
807
|
+
*
|
|
808
|
+
* :::tip
|
|
809
|
+
* You need to pass `vpc` to add a private route.
|
|
810
|
+
* :::
|
|
811
|
+
*
|
|
812
|
+
* A couple of things to note:
|
|
813
|
+
*
|
|
814
|
+
* 1. Your API Gateway HTTP API also needs to be in the **same VPC** as the service.
|
|
815
|
+
*
|
|
816
|
+
* 2. You also need to verify that your VPC's [**availability zones support VPC link**](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vpc-links.html#http-api-vpc-link-availability).
|
|
817
|
+
*
|
|
818
|
+
* 3. Run `aws ec2 describe-availability-zones` to get a list of AZs for your
|
|
819
|
+
* account.
|
|
820
|
+
*
|
|
821
|
+
* 4. Only list the AZ ID's that support VPC link.
|
|
822
|
+
* ```ts title="sst.config.ts" {4}
|
|
823
|
+
* vpc: {
|
|
824
|
+
* az: ["eu-west-3a", "eu-west-3c"]
|
|
825
|
+
* }
|
|
826
|
+
* ```
|
|
827
|
+
* If the VPC picks an AZ automatically that doesn't support VPC link, you'll get
|
|
828
|
+
* the following error:
|
|
829
|
+
* ```
|
|
830
|
+
* operation error ApiGatewayV2: BadRequestException: Subnet is in Availability
|
|
831
|
+
* Zone 'euw3-az2' where service is not available
|
|
832
|
+
* ```
|
|
833
|
+
*
|
|
834
|
+
* @param rawRoute The path for the route.
|
|
835
|
+
* @param arn The ARN of the AWS Load Balancer or Cloud Map service.
|
|
836
|
+
* @param args Configure the route.
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* Here are a few examples using the private route. Add a route to Application Load Balancer.
|
|
840
|
+
*
|
|
841
|
+
* ```js title="sst.config.ts"
|
|
842
|
+
* const loadBalancerArn = "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188";
|
|
843
|
+
* api.routePrivate("GET /", loadBalancerArn);
|
|
844
|
+
* ```
|
|
845
|
+
*
|
|
846
|
+
* Add a route to AWS Cloud Map service.
|
|
847
|
+
*
|
|
848
|
+
* ```js title="sst.config.ts"
|
|
849
|
+
* const serviceArn = "arn:aws:servicediscovery:us-east-2:123456789012:service/srv-id?stage=prod&deployment=green_deployment";
|
|
850
|
+
* api.routePrivate("GET /", serviceArn);
|
|
851
|
+
* ```
|
|
852
|
+
*
|
|
853
|
+
* Enable IAM authentication for a route.
|
|
854
|
+
*
|
|
855
|
+
* ```js title="sst.config.ts"
|
|
856
|
+
* api.routePrivate("GET /", serviceArn, {
|
|
857
|
+
* auth: {
|
|
858
|
+
* iam: true
|
|
859
|
+
* }
|
|
860
|
+
* });
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
routePrivate(rawRoute: string, arn: Input<string>, args?: ApiGatewayV2RouteArgs): ApiGatewayV2PrivateRoute;
|
|
864
|
+
private parseRoute;
|
|
865
|
+
private buildRouteId;
|
|
866
|
+
/**
|
|
867
|
+
* Add an authorizer to the API Gateway HTTP API.
|
|
868
|
+
*
|
|
869
|
+
* @param args Configure the authorizer.
|
|
870
|
+
* @example
|
|
871
|
+
* Add a Lambda authorizer.
|
|
872
|
+
*
|
|
873
|
+
* ```js title="sst.config.ts"
|
|
874
|
+
* api.addAuthorizer({
|
|
875
|
+
* name: "myAuthorizer",
|
|
876
|
+
* lambda: {
|
|
877
|
+
* function: "src/authorizer.index"
|
|
878
|
+
* }
|
|
879
|
+
* });
|
|
880
|
+
* ```
|
|
881
|
+
*
|
|
882
|
+
* Add a JWT authorizer.
|
|
883
|
+
*
|
|
884
|
+
* ```js title="sst.config.ts"
|
|
885
|
+
* const authorizer = api.addAuthorizer({
|
|
886
|
+
* name: "myAuthorizer",
|
|
887
|
+
* jwt: {
|
|
888
|
+
* issuer: "https://issuer.com/",
|
|
889
|
+
* audiences: ["https://api.example.com"],
|
|
890
|
+
* identitySource: "$request.header.AccessToken"
|
|
891
|
+
* }
|
|
892
|
+
* });
|
|
893
|
+
* ```
|
|
894
|
+
*
|
|
895
|
+
* Add a Cognito UserPool as a JWT authorizer.
|
|
896
|
+
*
|
|
897
|
+
* ```js title="sst.config.ts"
|
|
898
|
+
* const pool = new sst.aws.CognitoUserPool("MyUserPool");
|
|
899
|
+
* const poolClient = userPool.addClient("Web");
|
|
900
|
+
*
|
|
901
|
+
* const authorizer = api.addAuthorizer({
|
|
902
|
+
* name: "myCognitoAuthorizer",
|
|
903
|
+
* jwt: {
|
|
904
|
+
* issuer: $interpolate`https://cognito-idp.${aws.getRegionOutput().name}.amazonaws.com/${pool.id}`,
|
|
905
|
+
* audiences: [poolClient.id]
|
|
906
|
+
* }
|
|
907
|
+
* });
|
|
908
|
+
* ```
|
|
909
|
+
*
|
|
910
|
+
* Now you can use the authorizer in your routes.
|
|
911
|
+
*
|
|
912
|
+
* ```js title="sst.config.ts"
|
|
913
|
+
* api.route("GET /", "src/get.handler", {
|
|
914
|
+
* auth: {
|
|
915
|
+
* jwt: {
|
|
916
|
+
* authorizer: authorizer.id
|
|
917
|
+
* }
|
|
918
|
+
* }
|
|
919
|
+
* });
|
|
920
|
+
* ```
|
|
921
|
+
*/
|
|
922
|
+
addAuthorizer(args: ApiGatewayV2AuthorizerArgs): ApiGatewayV2Authorizer;
|
|
923
|
+
/** @internal */
|
|
924
|
+
getSSTLink(): {
|
|
925
|
+
properties: {
|
|
926
|
+
url: Output<string>;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
export {};
|
|
931
|
+
//# sourceMappingURL=apigatewayv2.d.ts.map
|