monorise 0.1.0 → 1.1.0-dev.0
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 +90 -5
- package/dist/base/index.js.map +1 -1
- package/dist/cli/cli.js +6 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/core/chunk-QV4Q5377.js +76 -0
- package/dist/core/chunk-QV4Q5377.js.map +1 -0
- package/dist/core/index.d.ts +187 -19
- package/dist/core/index.js +1583 -85
- package/dist/core/index.js.map +1 -1
- package/dist/core/service.config-ZJEZ6EKA.js +13 -0
- package/dist/core/service.config-ZJEZ6EKA.js.map +1 -0
- package/dist/proxy/index.d.ts +35 -0
- package/dist/proxy/index.js +75 -0
- package/dist/proxy/index.js.map +1 -0
- package/dist/react/actions/websocket.action.d.ts +71 -0
- package/dist/react/actions/websocket.action.d.ts.map +1 -0
- package/dist/react/chunk-4D22OCZG.js +65 -0
- package/dist/react/chunk-4D22OCZG.js.map +1 -0
- package/dist/react/chunk-4N3P4ONH.js +588 -0
- package/dist/react/chunk-4N3P4ONH.js.map +1 -0
- package/dist/react/chunk-4Y4KWGJD.js +182 -0
- package/dist/react/chunk-4Y4KWGJD.js.map +1 -0
- package/dist/react/chunk-757E5UYA.js +893 -0
- package/dist/react/chunk-757E5UYA.js.map +1 -0
- package/dist/react/chunk-A5TI2FW3.js +13 -0
- package/dist/react/chunk-A5TI2FW3.js.map +1 -0
- package/dist/react/chunk-B3XDGUFO.js +489 -0
- package/dist/react/chunk-B3XDGUFO.js.map +1 -0
- package/dist/react/chunk-BPBCUO2Z.js +248 -0
- package/dist/react/chunk-BPBCUO2Z.js.map +1 -0
- package/dist/react/chunk-CQBOIXWK.js +142 -0
- package/dist/react/chunk-CQBOIXWK.js.map +1 -0
- package/dist/react/chunk-DRH2BB7I.js +383 -0
- package/dist/react/chunk-DRH2BB7I.js.map +1 -0
- package/dist/react/chunk-EQ3PKQ2S.js +402 -0
- package/dist/react/chunk-EQ3PKQ2S.js.map +1 -0
- package/dist/react/chunk-H64MMAL7.js +245 -0
- package/dist/react/chunk-H64MMAL7.js.map +1 -0
- package/dist/react/chunk-KJX5LOMN.js +43 -0
- package/dist/react/chunk-KJX5LOMN.js.map +1 -0
- package/dist/react/chunk-MO35V2Y7.js +172 -0
- package/dist/react/chunk-MO35V2Y7.js.map +1 -0
- package/dist/react/chunk-UC3E72G7.js +73 -0
- package/dist/react/chunk-UC3E72G7.js.map +1 -0
- package/dist/react/chunk-UHMKB3OR.js +5568 -0
- package/dist/react/chunk-UHMKB3OR.js.map +1 -0
- package/dist/react/chunk-UQPQBWEQ.js +54 -0
- package/dist/react/chunk-UQPQBWEQ.js.map +1 -0
- package/dist/react/chunk-XCDCVRJR.js +43 -0
- package/dist/react/chunk-XCDCVRJR.js.map +1 -0
- package/dist/react/chunk-XOYAZDIH.js +47 -0
- package/dist/react/chunk-XOYAZDIH.js.map +1 -0
- package/dist/react/chunk-YNFQEPO5.js +29 -0
- package/dist/react/chunk-YNFQEPO5.js.map +1 -0
- package/dist/react/dist-es-35AO47NO.js +90 -0
- package/dist/react/dist-es-35AO47NO.js.map +1 -0
- package/dist/react/dist-es-5GDBXNKQ.js +333 -0
- package/dist/react/dist-es-5GDBXNKQ.js.map +1 -0
- package/dist/react/dist-es-B3JDGWY6.js +71 -0
- package/dist/react/dist-es-B3JDGWY6.js.map +1 -0
- package/dist/react/dist-es-IWIE5JLA.js +169 -0
- package/dist/react/dist-es-IWIE5JLA.js.map +1 -0
- package/dist/react/dist-es-NRIS3TYJ.js +494 -0
- package/dist/react/dist-es-NRIS3TYJ.js.map +1 -0
- package/dist/react/dist-es-VCXAEYYN.js +22 -0
- package/dist/react/dist-es-VCXAEYYN.js.map +1 -0
- package/dist/react/dist-es-VU33JFTZ.js +379 -0
- package/dist/react/dist-es-VU33JFTZ.js.map +1 -0
- package/dist/react/event-streams-OSOTOTTP.js +277 -0
- package/dist/react/event-streams-OSOTOTTP.js.map +1 -0
- package/dist/react/index.d.ts +53 -4
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +10948 -190
- package/dist/react/index.js.map +1 -1
- package/dist/react/loadSso-ME7MKAM3.js +556 -0
- package/dist/react/loadSso-ME7MKAM3.js.map +1 -0
- package/dist/react/service.config-ZJEZ6EKA-FC2TR3GH.js +14 -0
- package/dist/react/service.config-ZJEZ6EKA-FC2TR3GH.js.map +1 -0
- package/dist/react/services/core.service.d.ts +11 -1
- package/dist/react/services/core.service.d.ts.map +1 -1
- package/dist/react/signin-LOXYIE5I.js +653 -0
- package/dist/react/signin-LOXYIE5I.js.map +1 -0
- package/dist/react/sso-oidc-X63KRRLO.js +786 -0
- package/dist/react/sso-oidc-X63KRRLO.js.map +1 -0
- package/dist/react/sts-OXBEY7HY.js +3948 -0
- package/dist/react/sts-OXBEY7HY.js.map +1 -0
- package/dist/react/websocket/WebSocketManager.d.ts +68 -0
- package/dist/react/websocket/WebSocketManager.d.ts.map +1 -0
- package/dist/react/websocket/index.d.ts +3 -0
- package/dist/react/websocket/index.d.ts.map +1 -0
- package/dist/react/websocket/optimistic.d.ts +51 -0
- package/dist/react/websocket/optimistic.d.ts.map +1 -0
- package/dist/react/websocket-QHA7SQXG.js +10 -0
- package/dist/react/websocket-QHA7SQXG.js.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/alb.d.ts +280 -0
- package/dist/sst/.sst/platform/src/components/aws/alb.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts +13 -2
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts +93 -83
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts +8 -2
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts +13 -8
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +3 -2
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts +34 -3
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts +59 -1
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts +100 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cron-v2.d.ts +325 -0
- package/dist/sst/.sst/platform/src/components/aws/cron-v2.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts +15 -6
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/dsql.d.ts +369 -0
- package/dist/sst/.sst/platform/src/components/aws/dsql.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts +63 -3
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts +95 -4
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts +121 -21
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts +7 -3
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/load-balancer.d.ts +9 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/load-balancer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts +2 -2
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts +8 -3
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts +34 -5
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts +39 -5
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts +12 -1
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts +7 -3
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts +13 -2
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts +34 -5
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +6 -1
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts +10 -1
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts +6 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts +14 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts +482 -2
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts +125 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts +6 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts +7 -7
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts +10 -2
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts +20 -6
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts +35 -15
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts +51 -4
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/workflow.d.ts +331 -0
- package/dist/sst/.sst/platform/src/components/aws/workflow.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ai.d.ts +82 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ai.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts +15 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts +4 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts +29 -5
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts +37 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts +36 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-placement.d.ts +27 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-placement.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/queue-worker-subscriber.d.ts +116 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue-worker-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts +186 -3
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts +2 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts +39 -5
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/component.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/duration.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/esbuild.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/esbuild.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts +2 -2
- package/dist/sst/.sst/platform/src/components/link.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/linkable.d.ts +32 -2
- package/dist/sst/.sst/platform/src/components/linkable.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts +2 -2
- package/dist/sst/.sst/platform/src/util/minify.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/minify.d.ts.map +1 -0
- package/dist/sst/components/monorise-core.d.ts +10 -0
- package/dist/sst/components/monorise-core.d.ts.map +1 -1
- package/dist/sst/components/q-function.d.ts +2 -3
- package/dist/sst/components/q-function.d.ts.map +1 -1
- package/dist/sst/index.js +75 -12
- package/dist/sst/index.js.map +1 -1
- package/package.json +10 -2
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts +0 -7
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Entity as Entity$2, EntitySchemaMap, createEntityConfig } from '../base/index';
|
|
1
|
+
import { Entity as Entity$2, EntitySchemaMap, createEntityConfig, WhereConditions } from '../base/index';
|
|
2
2
|
import * as hono from 'hono';
|
|
3
3
|
import { Hono } from 'hono';
|
|
4
4
|
import { DynamoDB, TransactWriteItemsInput, AttributeValue, TransactWriteItem, UpdateItemCommandInput } from '@aws-sdk/client-dynamodb';
|
|
5
5
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
6
6
|
import * as hono_utils_types from 'hono/utils/types';
|
|
7
7
|
import { createFactory } from 'hono/factory';
|
|
8
|
-
import
|
|
8
|
+
import httpStatus8 from 'http-status';
|
|
9
9
|
import { unmarshall, marshall } from '@aws-sdk/util-dynamodb';
|
|
10
10
|
import { EventBridgeClient } from '@aws-sdk/client-eventbridge';
|
|
11
11
|
import * as hono_aws_lambda from 'hono/aws-lambda';
|
|
12
|
-
import { SQSEvent, SQSBatchItemFailure, DynamoDBBatchItemFailure } from 'aws-lambda';
|
|
12
|
+
import { SQSEvent, SQSBatchItemFailure, DynamoDBBatchItemFailure, APIGatewayProxyWebsocketEventV2, APIGatewayProxyResultV2, DynamoDBStreamEvent } from 'aws-lambda';
|
|
13
13
|
import { _Record } from '@aws-sdk/client-dynamodb-streams';
|
|
14
14
|
|
|
15
15
|
type EventDetail = {
|
|
@@ -88,7 +88,7 @@ declare class Entity$1<T extends Entity$2> extends Item$1 {
|
|
|
88
88
|
}
|
|
89
89
|
declare class EntityRepository extends Repository {
|
|
90
90
|
private EntityConfig;
|
|
91
|
-
|
|
91
|
+
readonly TABLE_NAME: string;
|
|
92
92
|
private readonly dynamodbClient;
|
|
93
93
|
private readonly EmailAuthEnabledEntities;
|
|
94
94
|
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, TABLE_NAME: string, dynamodbClient: DynamoDB, EmailAuthEnabledEntities: Entity$2[]);
|
|
@@ -132,11 +132,10 @@ declare class EntityRepository extends Repository {
|
|
|
132
132
|
ExpressionAttributeNames?: Record<string, string>;
|
|
133
133
|
ExpressionAttributeValues?: Record<string, AttributeValue>;
|
|
134
134
|
}): Promise<Entity$1<T>>;
|
|
135
|
-
adjustEntity<T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number>,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
};
|
|
135
|
+
adjustEntity<T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number>, opts?: {
|
|
136
|
+
ConditionExpression?: string;
|
|
137
|
+
ExpressionAttributeNames?: Record<string, string>;
|
|
138
|
+
ExpressionAttributeValues?: Record<string, AttributeValue>;
|
|
140
139
|
}): Promise<Entity$1<T>>;
|
|
141
140
|
deleteEntity<T extends Entity$2>(entityType: T, entityId: string): Promise<void>;
|
|
142
141
|
queryEntities<T extends Entity$2>(entityType: T, query: string): Promise<{
|
|
@@ -317,6 +316,47 @@ declare class TagRepository extends Repository {
|
|
|
317
316
|
}): Promise<void>;
|
|
318
317
|
}
|
|
319
318
|
|
|
319
|
+
interface ConnectionRecord {
|
|
320
|
+
connectionId: string;
|
|
321
|
+
entityType?: string;
|
|
322
|
+
entityId?: string;
|
|
323
|
+
connectedAt?: string;
|
|
324
|
+
expiresAt?: number;
|
|
325
|
+
}
|
|
326
|
+
interface SubscriptionRecord {
|
|
327
|
+
PK: string;
|
|
328
|
+
SK: string;
|
|
329
|
+
connectionId: string;
|
|
330
|
+
subscriptionType: string;
|
|
331
|
+
feedTypes?: string[];
|
|
332
|
+
[key: string]: unknown;
|
|
333
|
+
}
|
|
334
|
+
interface TicketData {
|
|
335
|
+
entityType: string;
|
|
336
|
+
entityId: string;
|
|
337
|
+
feedTypes: string[];
|
|
338
|
+
}
|
|
339
|
+
declare class WebSocketRepository extends Repository {
|
|
340
|
+
private tableName;
|
|
341
|
+
private dynamodbClient;
|
|
342
|
+
private docClient;
|
|
343
|
+
constructor(tableName: string, dynamodbClient: DynamoDB);
|
|
344
|
+
createConnection(connectionId: string, metadata: Record<string, unknown>, expiresAt: number): Promise<void>;
|
|
345
|
+
getConnection(connectionId: string): Promise<ConnectionRecord | undefined>;
|
|
346
|
+
deleteConnection(connectionId: string): Promise<void>;
|
|
347
|
+
createSubscription(subKey: string, connectionId: string, data: Record<string, unknown>): Promise<void>;
|
|
348
|
+
deleteSubscription(subKey: string, connectionId: string): Promise<void>;
|
|
349
|
+
querySubscriptionsByKey(subKey: string): Promise<SubscriptionRecord[]>;
|
|
350
|
+
querySubscriptionsByConnectionId(connectionId: string): Promise<SubscriptionRecord[]>;
|
|
351
|
+
createTicket(ticket: string, entityType: string, entityId: string, feedTypes: string[], expiresAt: number): Promise<void>;
|
|
352
|
+
consumeTicket(ticket: string): Promise<TicketData | null>;
|
|
353
|
+
queryMutualConnections(byEntityType: string, byEntityId: string): Promise<{
|
|
354
|
+
entityType: string;
|
|
355
|
+
entityId: string;
|
|
356
|
+
}[]>;
|
|
357
|
+
queryFeedSubscriptions(entityType: string, entityId: string): Promise<SubscriptionRecord[]>;
|
|
358
|
+
}
|
|
359
|
+
|
|
320
360
|
var __defProp = Object.defineProperty;
|
|
321
361
|
var __defProps = Object.defineProperties;
|
|
322
362
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -361,6 +401,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
361
401
|
});
|
|
362
402
|
};
|
|
363
403
|
|
|
404
|
+
// configs/service.config.ts
|
|
405
|
+
process.env.CORE_TABLE || "";
|
|
406
|
+
process.env.CORE_EVENT_BUS || "";
|
|
407
|
+
|
|
364
408
|
// errors/standard-error.ts
|
|
365
409
|
var StandardError$1 = class StandardError extends Error {
|
|
366
410
|
constructor(errorCode, message, lastError, context) {
|
|
@@ -465,19 +509,15 @@ factory.createMiddleware((c, next) => __async(null, null, function* () {
|
|
|
465
509
|
return yield next();
|
|
466
510
|
}
|
|
467
511
|
if (!xApiKey || Array.isArray(xApiKey) || !API_KEYS.includes(xApiKey)) {
|
|
468
|
-
c.status(
|
|
512
|
+
c.status(httpStatus8.UNAUTHORIZED);
|
|
469
513
|
return c.json({
|
|
470
|
-
status:
|
|
471
|
-
message:
|
|
514
|
+
status: httpStatus8.UNAUTHORIZED,
|
|
515
|
+
message: httpStatus8["401_MESSAGE"]
|
|
472
516
|
});
|
|
473
517
|
}
|
|
474
518
|
return yield next();
|
|
475
519
|
}));
|
|
476
520
|
|
|
477
|
-
// configs/service.config.ts
|
|
478
|
-
process.env.CORE_TABLE || "";
|
|
479
|
-
process.env.CORE_EVENT_BUS || "";
|
|
480
|
-
|
|
481
521
|
// helpers/event.ts
|
|
482
522
|
new EventBridgeClient();
|
|
483
523
|
|
|
@@ -4471,18 +4511,24 @@ declare class EntityService {
|
|
|
4471
4511
|
mutualId?: string;
|
|
4472
4512
|
};
|
|
4473
4513
|
}) => Promise<Entity<T>>;
|
|
4474
|
-
adjustEntity: <T extends Entity$2>({ entityType, entityId, adjustments, accountId, }: {
|
|
4514
|
+
adjustEntity: <T extends Entity$2>({ entityType, entityId, adjustments, accountId, condition, }: {
|
|
4475
4515
|
entityType: T;
|
|
4476
4516
|
entityId: string;
|
|
4477
4517
|
adjustments: Record<string, number>;
|
|
4478
4518
|
accountId?: string;
|
|
4519
|
+
condition?: string;
|
|
4479
4520
|
}) => Promise<Entity<T>>;
|
|
4480
|
-
updateEntity: <T extends Entity$2>({ entityType, entityId, entityPayload, accountId, }: {
|
|
4521
|
+
updateEntity: <T extends Entity$2>({ entityType, entityId, entityPayload, accountId, condition, where, }: {
|
|
4481
4522
|
entityType: T;
|
|
4482
4523
|
entityId: string;
|
|
4483
4524
|
entityPayload: Partial<EntitySchemaMap[T]>;
|
|
4484
4525
|
accountId?: string | string[];
|
|
4526
|
+
condition?: string;
|
|
4527
|
+
/** @deprecated Use `condition` (named condition) instead of raw `where`. */
|
|
4528
|
+
where?: WhereConditions;
|
|
4485
4529
|
}) => Promise<Entity<T>>;
|
|
4530
|
+
/** @deprecated Converts legacy adjustmentConstraints to condition expression opts. */
|
|
4531
|
+
private buildLegacyAdjustCondition;
|
|
4486
4532
|
deleteEntity: <T extends Entity$2>({ entityType, entityId, accountId, }: {
|
|
4487
4533
|
entityType: T;
|
|
4488
4534
|
entityId: string;
|
|
@@ -4672,6 +4718,78 @@ declare class ListTagsController {
|
|
|
4672
4718
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
4673
4719
|
}
|
|
4674
4720
|
|
|
4721
|
+
type TransactionCreateEntity<T extends Entity$2 = Entity$2> = {
|
|
4722
|
+
operation: 'createEntity';
|
|
4723
|
+
entityType: T;
|
|
4724
|
+
entityId?: string;
|
|
4725
|
+
payload: EntitySchemaMap[T];
|
|
4726
|
+
};
|
|
4727
|
+
type TransactionUpdateEntity<T extends Entity$2 = Entity$2> = {
|
|
4728
|
+
operation: 'updateEntity';
|
|
4729
|
+
entityType: T;
|
|
4730
|
+
entityId: string;
|
|
4731
|
+
payload: Partial<EntitySchemaMap[T]>;
|
|
4732
|
+
accountId?: string;
|
|
4733
|
+
condition?: string;
|
|
4734
|
+
};
|
|
4735
|
+
type TransactionAdjustEntity<T extends Entity$2 = Entity$2> = {
|
|
4736
|
+
operation: 'adjustEntity';
|
|
4737
|
+
entityType: T;
|
|
4738
|
+
entityId: string;
|
|
4739
|
+
adjustments: Record<string, number>;
|
|
4740
|
+
accountId?: string;
|
|
4741
|
+
condition?: string;
|
|
4742
|
+
};
|
|
4743
|
+
type TransactionDeleteEntity<T extends Entity$2 = Entity$2> = {
|
|
4744
|
+
operation: 'deleteEntity';
|
|
4745
|
+
entityType: T;
|
|
4746
|
+
entityId: string;
|
|
4747
|
+
};
|
|
4748
|
+
type TransactionOperation = TransactionCreateEntity | TransactionUpdateEntity | TransactionAdjustEntity | TransactionDeleteEntity;
|
|
4749
|
+
type TransactionResultEntry = {
|
|
4750
|
+
operation: string;
|
|
4751
|
+
entityType: Entity$2;
|
|
4752
|
+
entityId: string;
|
|
4753
|
+
data?: Record<string, unknown>;
|
|
4754
|
+
};
|
|
4755
|
+
type TransactionResult = {
|
|
4756
|
+
results: TransactionResultEntry[];
|
|
4757
|
+
};
|
|
4758
|
+
|
|
4759
|
+
declare class TransactionService {
|
|
4760
|
+
private EntityConfig;
|
|
4761
|
+
private EmailAuthEnabledEntities;
|
|
4762
|
+
private entityRepository;
|
|
4763
|
+
private dynamodbClient;
|
|
4764
|
+
private publishEvent;
|
|
4765
|
+
private entityServiceLifeCycle;
|
|
4766
|
+
private eventUtils;
|
|
4767
|
+
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, EmailAuthEnabledEntities: Entity$2[], entityRepository: EntityRepository, dynamodbClient: DynamoDB, publishEvent: typeof publishEvent, entityServiceLifeCycle: EntityServiceLifeCycle, eventUtils: EventUtils);
|
|
4768
|
+
executeTransaction: (operations: TransactionOperation[], accountId?: string) => Promise<TransactionResult>;
|
|
4769
|
+
private buildCreateItems;
|
|
4770
|
+
private buildUpdateItem;
|
|
4771
|
+
private buildAdjustItem;
|
|
4772
|
+
private buildDeleteItem;
|
|
4773
|
+
private collectCreateEvents;
|
|
4774
|
+
private collectUpdateEvents;
|
|
4775
|
+
}
|
|
4776
|
+
|
|
4777
|
+
declare class ExecuteTransactionController {
|
|
4778
|
+
private transactionService;
|
|
4779
|
+
constructor(transactionService: TransactionService);
|
|
4780
|
+
controller: hono.MiddlewareHandler<any, string, {}, any>;
|
|
4781
|
+
}
|
|
4782
|
+
|
|
4783
|
+
declare class CreateTicketController {
|
|
4784
|
+
private container;
|
|
4785
|
+
constructor(container: DependencyContainer);
|
|
4786
|
+
controller: hono.MiddlewareHandler<any, string, {}, Response & hono.TypedResponse<{
|
|
4787
|
+
ticket: string;
|
|
4788
|
+
wsUrl: string;
|
|
4789
|
+
expiresIn: number;
|
|
4790
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4675
4793
|
declare class DependencyContainer {
|
|
4676
4794
|
config: {
|
|
4677
4795
|
EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
@@ -4700,6 +4818,7 @@ declare class DependencyContainer {
|
|
|
4700
4818
|
get entityService(): EntityService;
|
|
4701
4819
|
get mutualService(): MutualService;
|
|
4702
4820
|
get tagRepository(): TagRepository;
|
|
4821
|
+
get websocketRepository(): WebSocketRepository;
|
|
4703
4822
|
get getEntityController(): GetEntityController;
|
|
4704
4823
|
get getEntityByUniqueFieldController(): GetEntityByUniqueFieldValueController;
|
|
4705
4824
|
get listEntitiesController(): ListEntitiesController;
|
|
@@ -4714,6 +4833,9 @@ declare class DependencyContainer {
|
|
|
4714
4833
|
get updateMutualController(): UpdateMutualController;
|
|
4715
4834
|
get deleteMutualController(): DeleteMutualController;
|
|
4716
4835
|
get listTagsController(): ListTagsController;
|
|
4836
|
+
get transactionService(): TransactionService;
|
|
4837
|
+
get executeTransactionController(): ExecuteTransactionController;
|
|
4838
|
+
get createTicketController(): CreateTicketController;
|
|
4717
4839
|
}
|
|
4718
4840
|
|
|
4719
4841
|
declare const setupCommonRoutes: (container: DependencyContainer) => Hono;
|
|
@@ -4734,6 +4856,7 @@ declare const StandardErrorCode: {
|
|
|
4734
4856
|
readonly ENTITY_ID_IS_UNDEFINED: "ENTITY_ID_IS_UNDEFINED";
|
|
4735
4857
|
readonly ENTITY_IS_UNDEFINED: "ENTITY_IS_UNDEFINED";
|
|
4736
4858
|
readonly ENTITY_NOT_FOUND: "ENTITY_NOT_FOUND";
|
|
4859
|
+
readonly INVALID_CONDITION: "INVALID_CONDITION";
|
|
4737
4860
|
readonly INVALID_ENTITY_TYPE: "INVALID_ENTITY_TYPE";
|
|
4738
4861
|
readonly INVALID_MUTUAL: "INVALID_MUTUAL";
|
|
4739
4862
|
readonly INVALID_QUERY: "INVALID_QUERY";
|
|
@@ -4746,7 +4869,10 @@ declare const StandardErrorCode: {
|
|
|
4746
4869
|
readonly REPLICATION_ERROR: "REPLICATION_ERROR";
|
|
4747
4870
|
readonly RETRYABLE_MUTUAL_LOCK_CONFLICT: "RETRYABLE_MUTUAL_LOCK_CONFLICT";
|
|
4748
4871
|
readonly TAG_IS_UNDEFINED: "TAG_IS_UNDEFINED";
|
|
4872
|
+
readonly TRANSACTION_EMPTY: "TRANSACTION_EMPTY";
|
|
4749
4873
|
readonly TRANSACTION_FAILED: "TRANSACTION_FAILED";
|
|
4874
|
+
readonly TRANSACTION_ITEM_LIMIT_EXCEEDED: "TRANSACTION_ITEM_LIMIT_EXCEEDED";
|
|
4875
|
+
readonly TRANSACTION_UNIQUE_FIELD_UPDATE: "TRANSACTION_UNIQUE_FIELD_UPDATE";
|
|
4750
4876
|
readonly UNIQUE_VALUE_EXISTS: "UNIQUE_VALUE_EXISTS";
|
|
4751
4877
|
};
|
|
4752
4878
|
type StandardErrorCode = typeof StandardErrorCode[keyof typeof StandardErrorCode];
|
|
@@ -4786,6 +4912,44 @@ declare const handler: (container: DependencyContainer) => (ev: SQSEvent) => Pro
|
|
|
4786
4912
|
batchItemFailures: SQSBatchItemFailure[];
|
|
4787
4913
|
}>;
|
|
4788
4914
|
|
|
4915
|
+
type WebSocketConnectEvent = APIGatewayProxyWebsocketEventV2 & {
|
|
4916
|
+
queryStringParameters?: Record<string, string | undefined>;
|
|
4917
|
+
headers?: Record<string, string | undefined>;
|
|
4918
|
+
};
|
|
4919
|
+
/**
|
|
4920
|
+
* $connect handler
|
|
4921
|
+
* Supports two auth modes:
|
|
4922
|
+
* - ticket: ?ticket=abc123 (issued via /ws/ticket/:entityType/:entityId)
|
|
4923
|
+
* - token: ?token=userId (simplified direct auth)
|
|
4924
|
+
*/
|
|
4925
|
+
declare const connect: (container: DependencyContainer) => (event: WebSocketConnectEvent) => Promise<APIGatewayProxyResultV2>;
|
|
4926
|
+
/**
|
|
4927
|
+
* $disconnect handler
|
|
4928
|
+
* Cleans up connection record and all associated subscription records.
|
|
4929
|
+
*/
|
|
4930
|
+
declare const disconnect: (container: DependencyContainer) => (event: APIGatewayProxyWebsocketEventV2) => Promise<APIGatewayProxyResultV2>;
|
|
4931
|
+
/**
|
|
4932
|
+
* $default handler - route messages
|
|
4933
|
+
*/
|
|
4934
|
+
declare const $default: (container: DependencyContainer) => (event: APIGatewayProxyWebsocketEventV2) => Promise<APIGatewayProxyResultV2>;
|
|
4935
|
+
/**
|
|
4936
|
+
* Broadcast handler - triggered by DynamoDB Streams
|
|
4937
|
+
*/
|
|
4938
|
+
declare const broadcast: (container: DependencyContainer) => (event: DynamoDBStreamEvent) => Promise<void>;
|
|
4939
|
+
|
|
4940
|
+
declare const transactional: {
|
|
4941
|
+
createEntity: <T extends Entity$2>(entityType: T, payload: EntitySchemaMap[T] & {
|
|
4942
|
+
entityId?: string;
|
|
4943
|
+
}) => TransactionCreateEntity<T>;
|
|
4944
|
+
updateEntity: <T extends Entity$2>(entityType: T, entityId: string, payload: Partial<EntitySchemaMap[T]> & {
|
|
4945
|
+
$condition?: string;
|
|
4946
|
+
}) => TransactionUpdateEntity<T>;
|
|
4947
|
+
adjustEntity: <T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number> & {
|
|
4948
|
+
$condition?: string;
|
|
4949
|
+
}) => TransactionAdjustEntity<T>;
|
|
4950
|
+
deleteEntity: <T extends Entity$2>(entityType: T, entityId: string) => TransactionDeleteEntity<T>;
|
|
4951
|
+
};
|
|
4952
|
+
|
|
4789
4953
|
declare class CoreFactory {
|
|
4790
4954
|
private config;
|
|
4791
4955
|
setupCommonRoutes: ReturnType<typeof setupCommonRoutes>;
|
|
@@ -4795,6 +4959,10 @@ declare class CoreFactory {
|
|
|
4795
4959
|
prejoinProcessor: ReturnType<typeof handler$2>;
|
|
4796
4960
|
tagProcessor: ReturnType<typeof handler>;
|
|
4797
4961
|
appHandler: ReturnType<typeof appHandler>;
|
|
4962
|
+
wsConnect: ReturnType<typeof connect>;
|
|
4963
|
+
wsDisconnect: ReturnType<typeof disconnect>;
|
|
4964
|
+
wsDefault: ReturnType<typeof $default>;
|
|
4965
|
+
wsBroadcast: ReturnType<typeof broadcast>;
|
|
4798
4966
|
dependencyContainer: DependencyContainer;
|
|
4799
4967
|
constructor(config: {
|
|
4800
4968
|
EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
@@ -4803,4 +4971,4 @@ declare class CoreFactory {
|
|
|
4803
4971
|
});
|
|
4804
4972
|
}
|
|
4805
4973
|
|
|
4806
|
-
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, appHandler, handler$4 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, handler as tagProcessor };
|
|
4974
|
+
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, TransactionService, WebSocketRepository, appHandler, handler$4 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, handler as tagProcessor, transactional, broadcast as wsBroadcast, connect as wsConnect, $default as wsDefault, disconnect as wsDisconnect };
|