@h4ad/serverless-adapter 3.2.0 → 4.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/lib/adapter.contract-EQE3rlgO.d.ts +278 -0
- package/lib/adapter.contract-y5xSjOjo.d.cts +278 -0
- package/lib/adapters/apollo-server/index.cjs +4 -0
- package/lib/adapters/apollo-server/index.cjs.map +1 -0
- package/lib/adapters/apollo-server/{apollo-server-mutation.adapter.d.ts → index.d.cts} +10 -5
- package/lib/adapters/apollo-server/index.d.ts +61 -2
- package/lib/adapters/apollo-server/index.mjs +2 -0
- package/lib/adapters/apollo-server/index.mjs.map +1 -0
- package/lib/adapters/aws/index.cjs +4 -0
- package/lib/adapters/aws/index.cjs.map +1 -0
- package/lib/adapters/aws/index.d.cts +910 -0
- package/lib/adapters/aws/index.d.ts +910 -12
- package/lib/adapters/aws/index.mjs +2 -0
- package/lib/adapters/aws/index.mjs.map +1 -0
- package/lib/adapters/azure/index.cjs +4 -0
- package/lib/adapters/azure/index.cjs.map +1 -0
- package/lib/adapters/azure/{http-trigger-v4.adapter.d.ts → index.d.cts} +11 -6
- package/lib/adapters/azure/index.d.ts +86 -2
- package/lib/adapters/azure/index.mjs +2 -0
- package/lib/adapters/azure/index.mjs.map +1 -0
- package/lib/adapters/digital-ocean/index.cjs +4 -0
- package/lib/adapters/digital-ocean/index.cjs.map +1 -0
- package/lib/adapters/digital-ocean/index.d.cts +126 -0
- package/lib/adapters/digital-ocean/index.d.ts +126 -2
- package/lib/adapters/digital-ocean/index.mjs +2 -0
- package/lib/adapters/digital-ocean/index.mjs.map +1 -0
- package/lib/adapters/dummy/index.cjs +4 -0
- package/lib/adapters/dummy/index.cjs.map +1 -0
- package/lib/adapters/dummy/{dummy.adapter.d.ts → index.d.cts} +10 -4
- package/lib/adapters/dummy/index.d.ts +37 -2
- package/lib/adapters/dummy/index.mjs +2 -0
- package/lib/adapters/dummy/index.mjs.map +1 -0
- package/lib/adapters/huawei/index.cjs +4 -0
- package/lib/adapters/huawei/index.cjs.map +1 -0
- package/lib/adapters/huawei/index.d.cts +365 -0
- package/lib/adapters/huawei/index.d.ts +365 -2
- package/lib/adapters/huawei/index.mjs +2 -0
- package/lib/adapters/huawei/index.mjs.map +1 -0
- package/lib/{core/base-handler.d.ts → base-handler-fYEk59Xq.d.ts} +9 -6
- package/lib/base-handler-peEBoKtZ.d.cts +35 -0
- package/lib/chunk-22SSVZU5.mjs +1 -0
- package/lib/chunk-22SSVZU5.mjs.map +1 -0
- package/lib/chunk-HU5XBQCP.mjs +10 -0
- package/lib/chunk-HU5XBQCP.mjs.map +1 -0
- package/lib/chunk-NSO4L3EI.mjs +2 -0
- package/lib/chunk-NSO4L3EI.mjs.map +1 -0
- package/lib/chunk-OYOJMOFP.mjs +2 -0
- package/lib/chunk-OYOJMOFP.mjs.map +1 -0
- package/lib/chunk-Y6H576RS.mjs +2 -0
- package/lib/chunk-Y6H576RS.mjs.map +1 -0
- package/lib/{core/constants.d.ts → constants-0cgQlFSV.d.cts} +6 -5
- package/lib/constants-0cgQlFSV.d.ts +32 -0
- package/lib/{contracts/framework.contract.d.ts → framework.contract-YnJ-fl1w.d.cts} +4 -3
- package/lib/framework.contract-YnJ-fl1w.d.ts +20 -0
- package/lib/frameworks/apollo-server/index.cjs +4 -0
- package/lib/frameworks/apollo-server/index.cjs.map +1 -0
- package/lib/frameworks/apollo-server/{apollo-server.framework.d.ts → index.d.cts} +12 -9
- package/lib/frameworks/apollo-server/index.d.ts +72 -2
- package/lib/frameworks/apollo-server/index.mjs +2 -0
- package/lib/frameworks/apollo-server/index.mjs.map +1 -0
- package/lib/frameworks/body-parser/index.cjs +4 -0
- package/lib/frameworks/body-parser/index.cjs.map +1 -0
- package/lib/frameworks/body-parser/index.d.cts +159 -0
- package/lib/frameworks/body-parser/index.d.ts +159 -6
- package/lib/frameworks/body-parser/index.mjs +2 -0
- package/lib/frameworks/body-parser/index.mjs.map +1 -0
- package/lib/frameworks/cors/index.cjs +5 -0
- package/lib/frameworks/cors/index.cjs.map +1 -0
- package/lib/frameworks/cors/{cors.framework.d.ts → index.d.cts} +6 -5
- package/lib/frameworks/cors/index.d.ts +79 -2
- package/lib/frameworks/cors/index.mjs +3 -0
- package/lib/frameworks/cors/index.mjs.map +1 -0
- package/lib/frameworks/deepkit/index.cjs +4 -0
- package/lib/frameworks/deepkit/index.cjs.map +1 -0
- package/lib/frameworks/deepkit/{http-deepkit.framework.d.ts → index.d.cts} +8 -5
- package/lib/frameworks/deepkit/index.d.ts +21 -2
- package/lib/frameworks/deepkit/index.mjs +2 -0
- package/lib/frameworks/deepkit/index.mjs.map +1 -0
- package/lib/frameworks/express/index.cjs +2 -0
- package/lib/frameworks/express/index.cjs.map +1 -0
- package/lib/frameworks/express/{express.framework.d.ts → index.d.cts} +6 -5
- package/lib/frameworks/express/index.d.ts +18 -2
- package/lib/frameworks/express/index.mjs +2 -0
- package/lib/frameworks/express/index.mjs.map +1 -0
- package/lib/frameworks/fastify/index.cjs +2 -0
- package/lib/frameworks/fastify/index.cjs.map +1 -0
- package/lib/frameworks/fastify/{fastify.framework.d.ts → index.d.cts} +6 -5
- package/lib/frameworks/fastify/index.d.ts +18 -2
- package/lib/frameworks/fastify/index.mjs +2 -0
- package/lib/frameworks/fastify/index.mjs.map +1 -0
- package/lib/frameworks/hapi/index.cjs +2 -0
- package/lib/frameworks/hapi/index.cjs.map +1 -0
- package/lib/frameworks/hapi/{hapi.framework.d.ts → index.d.cts} +6 -5
- package/lib/frameworks/hapi/index.d.ts +18 -2
- package/lib/frameworks/hapi/index.mjs +2 -0
- package/lib/frameworks/hapi/index.mjs.map +1 -0
- package/lib/frameworks/koa/index.cjs +2 -0
- package/lib/frameworks/koa/index.cjs.map +1 -0
- package/lib/frameworks/koa/{koa.framework.d.ts → index.d.cts} +6 -5
- package/lib/frameworks/koa/index.d.ts +18 -2
- package/lib/frameworks/koa/index.mjs +2 -0
- package/lib/frameworks/koa/index.mjs.map +1 -0
- package/lib/frameworks/lazy/index.cjs +4 -0
- package/lib/frameworks/lazy/index.cjs.map +1 -0
- package/lib/frameworks/lazy/{lazy.framework.d.ts → index.d.cts} +7 -6
- package/lib/frameworks/lazy/index.d.ts +57 -2
- package/lib/frameworks/lazy/index.mjs +2 -0
- package/lib/frameworks/lazy/index.mjs.map +1 -0
- package/lib/frameworks/trpc/index.cjs +4 -0
- package/lib/frameworks/trpc/index.cjs.map +1 -0
- package/lib/frameworks/trpc/{trpc.framework.d.ts → index.d.cts} +12 -11
- package/lib/frameworks/trpc/index.d.ts +154 -2
- package/lib/frameworks/trpc/index.mjs +2 -0
- package/lib/frameworks/trpc/index.mjs.map +1 -0
- package/lib/handler.contract-8Cb7qLSi.d.ts +66 -0
- package/lib/handler.contract-TQk8iM8f.d.cts +66 -0
- package/lib/handlers/aws/index.cjs +10 -0
- package/lib/handlers/aws/index.cjs.map +1 -0
- package/lib/handlers/aws/{aws-stream.handler.d.ts → index.d.cts} +22 -15
- package/lib/handlers/aws/index.d.ts +96 -2
- package/lib/handlers/aws/index.mjs +2 -0
- package/lib/handlers/aws/index.mjs.map +1 -0
- package/lib/handlers/azure/index.cjs +4 -0
- package/lib/handlers/azure/index.cjs.map +1 -0
- package/lib/handlers/azure/{azure.handler.d.ts → index.d.cts} +16 -8
- package/lib/handlers/azure/index.d.ts +53 -2
- package/lib/handlers/azure/index.mjs +2 -0
- package/lib/handlers/azure/index.mjs.map +1 -0
- package/lib/handlers/default/index.cjs +4 -0
- package/lib/handlers/default/index.cjs.map +1 -0
- package/lib/handlers/default/{default.handler.d.ts → index.d.cts} +13 -6
- package/lib/handlers/default/index.d.ts +95 -2
- package/lib/handlers/default/index.mjs +2 -0
- package/lib/handlers/default/index.mjs.map +1 -0
- package/lib/handlers/digital-ocean/index.cjs +4 -0
- package/lib/handlers/digital-ocean/index.cjs.map +1 -0
- package/lib/handlers/digital-ocean/index.d.cts +25 -0
- package/lib/handlers/digital-ocean/index.d.ts +25 -2
- package/lib/handlers/digital-ocean/index.mjs +2 -0
- package/lib/handlers/digital-ocean/index.mjs.map +1 -0
- package/lib/handlers/firebase/index.cjs +4 -0
- package/lib/handlers/firebase/index.cjs.map +1 -0
- package/lib/handlers/firebase/index.d.cts +59 -0
- package/lib/handlers/firebase/index.d.ts +59 -3
- package/lib/handlers/firebase/index.mjs +2 -0
- package/lib/handlers/firebase/index.mjs.map +1 -0
- package/lib/handlers/gcp/index.cjs +4 -0
- package/lib/handlers/gcp/index.cjs.map +1 -0
- package/lib/handlers/gcp/{gcp.handler.d.ts → index.d.cts} +12 -5
- package/lib/handlers/gcp/index.d.ts +33 -2
- package/lib/handlers/gcp/index.mjs +2 -0
- package/lib/handlers/gcp/index.mjs.map +1 -0
- package/lib/handlers/huawei/index.cjs +4 -0
- package/lib/handlers/huawei/index.cjs.map +1 -0
- package/lib/handlers/huawei/{http-huawei.handler.d.ts → index.d.cts} +15 -12
- package/lib/handlers/huawei/index.d.ts +62 -2
- package/lib/handlers/huawei/index.mjs +2 -0
- package/lib/handlers/huawei/index.mjs.map +1 -0
- package/lib/{@types/headers.d.ts → headers-K2qbcurv.d.cts} +5 -4
- package/lib/headers-K2qbcurv.d.ts +38 -0
- package/lib/index.cjs +10 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +439 -0
- package/lib/index.d.ts +439 -6
- package/lib/index.mjs +2 -0
- package/lib/index.mjs.map +1 -0
- package/lib/{core/logger.d.ts → logger-9me5n48P.d.cts} +8 -7
- package/lib/logger-9me5n48P.d.ts +65 -0
- package/lib/{core/path.d.ts → path-yBwCb8C1.d.cts} +16 -5
- package/lib/path-yBwCb8C1.d.ts +64 -0
- package/lib/{handlers/base/raw-request.d.ts → raw-request-B2vPjAfE.d.cts} +6 -5
- package/lib/raw-request-b6AYnkxd.d.ts +32 -0
- package/lib/{network/request.d.ts → request-DNNIV9ub.d.cts} +7 -7
- package/lib/request-sVa4pxmx.d.ts +44 -0
- package/lib/resolvers/aws-context/index.cjs +2 -0
- package/lib/resolvers/aws-context/index.cjs.map +1 -0
- package/lib/resolvers/aws-context/{aws-context.resolver.d.ts → index.d.cts} +10 -4
- package/lib/resolvers/aws-context/index.d.ts +25 -2
- package/lib/resolvers/aws-context/index.mjs +2 -0
- package/lib/resolvers/aws-context/index.mjs.map +1 -0
- package/lib/resolvers/callback/index.cjs +2 -0
- package/lib/resolvers/callback/index.cjs.map +1 -0
- package/lib/resolvers/callback/{callback.resolver.d.ts → index.d.cts} +10 -4
- package/lib/resolvers/callback/index.d.ts +29 -2
- package/lib/resolvers/callback/index.mjs +2 -0
- package/lib/resolvers/callback/index.mjs.map +1 -0
- package/lib/resolvers/dummy/index.cjs +2 -0
- package/lib/resolvers/dummy/index.cjs.map +1 -0
- package/lib/resolvers/dummy/index.d.cts +20 -0
- package/lib/resolvers/dummy/index.d.ts +20 -2
- package/lib/resolvers/dummy/index.mjs +2 -0
- package/lib/resolvers/dummy/index.mjs.map +1 -0
- package/lib/resolvers/promise/index.cjs +2 -0
- package/lib/resolvers/promise/index.cjs.map +1 -0
- package/lib/resolvers/promise/index.d.cts +20 -0
- package/lib/resolvers/promise/index.d.ts +20 -2
- package/lib/resolvers/promise/index.mjs +2 -0
- package/lib/resolvers/promise/index.mjs.map +1 -0
- package/package.json +565 -7
- package/lib/@types/binary-settings.d.ts +0 -41
- package/lib/@types/binary-settings.d.ts.map +0 -1
- package/lib/@types/binary-settings.js +0 -2
- package/lib/@types/binary-settings.js.map +0 -1
- package/lib/@types/digital-ocean/digital-ocean-http-event.d.ts +0 -37
- package/lib/@types/digital-ocean/digital-ocean-http-event.d.ts.map +0 -1
- package/lib/@types/digital-ocean/digital-ocean-http-event.js +0 -2
- package/lib/@types/digital-ocean/digital-ocean-http-event.js.map +0 -1
- package/lib/@types/digital-ocean/digital-ocean-http-response.d.ts +0 -22
- package/lib/@types/digital-ocean/digital-ocean-http-response.d.ts.map +0 -1
- package/lib/@types/digital-ocean/digital-ocean-http-response.js +0 -2
- package/lib/@types/digital-ocean/digital-ocean-http-response.js.map +0 -1
- package/lib/@types/digital-ocean/index.d.ts +0 -2
- package/lib/@types/digital-ocean/index.d.ts.map +0 -1
- package/lib/@types/digital-ocean/index.js +0 -2
- package/lib/@types/digital-ocean/index.js.map +0 -1
- package/lib/@types/headers.d.ts.map +0 -1
- package/lib/@types/headers.js +0 -2
- package/lib/@types/headers.js.map +0 -1
- package/lib/@types/helpers.d.ts +0 -10
- package/lib/@types/helpers.d.ts.map +0 -1
- package/lib/@types/helpers.js +0 -2
- package/lib/@types/helpers.js.map +0 -1
- package/lib/@types/huawei/huawei-api-gateway-event.d.ts +0 -81
- package/lib/@types/huawei/huawei-api-gateway-event.d.ts.map +0 -1
- package/lib/@types/huawei/huawei-api-gateway-event.js +0 -2
- package/lib/@types/huawei/huawei-api-gateway-event.js.map +0 -1
- package/lib/@types/huawei/huawei-api-gateway-response.d.ts +0 -27
- package/lib/@types/huawei/huawei-api-gateway-response.d.ts.map +0 -1
- package/lib/@types/huawei/huawei-api-gateway-response.js +0 -2
- package/lib/@types/huawei/huawei-api-gateway-response.js.map +0 -1
- package/lib/@types/huawei/huawei-context.d.ts +0 -188
- package/lib/@types/huawei/huawei-context.d.ts.map +0 -1
- package/lib/@types/huawei/huawei-context.js +0 -2
- package/lib/@types/huawei/huawei-context.js.map +0 -1
- package/lib/@types/huawei/index.d.ts +0 -4
- package/lib/@types/huawei/index.d.ts.map +0 -1
- package/lib/@types/huawei/index.js +0 -2
- package/lib/@types/huawei/index.js.map +0 -1
- package/lib/@types/index.d.ts +0 -4
- package/lib/@types/index.d.ts.map +0 -1
- package/lib/@types/index.js +0 -2
- package/lib/@types/index.js.map +0 -1
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.d.ts.map +0 -1
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.js +0 -2
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.js.map +0 -1
- package/lib/adapters/apollo-server/index.d.ts.map +0 -1
- package/lib/adapters/apollo-server/index.js +0 -2
- package/lib/adapters/apollo-server/index.js.map +0 -1
- package/lib/adapters/aws/alb.adapter.d.ts +0 -71
- package/lib/adapters/aws/alb.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/alb.adapter.js +0 -2
- package/lib/adapters/aws/alb.adapter.js.map +0 -1
- package/lib/adapters/aws/api-gateway-v1.adapter.d.ts +0 -76
- package/lib/adapters/aws/api-gateway-v1.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/api-gateway-v1.adapter.js +0 -2
- package/lib/adapters/aws/api-gateway-v1.adapter.js.map +0 -1
- package/lib/adapters/aws/api-gateway-v2.adapter.d.ts +0 -75
- package/lib/adapters/aws/api-gateway-v2.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/api-gateway-v2.adapter.js +0 -2
- package/lib/adapters/aws/api-gateway-v2.adapter.js.map +0 -1
- package/lib/adapters/aws/base/aws-simple-adapter.d.ts +0 -83
- package/lib/adapters/aws/base/aws-simple-adapter.d.ts.map +0 -1
- package/lib/adapters/aws/base/aws-simple-adapter.js +0 -2
- package/lib/adapters/aws/base/aws-simple-adapter.js.map +0 -1
- package/lib/adapters/aws/base/index.d.ts +0 -2
- package/lib/adapters/aws/base/index.d.ts.map +0 -1
- package/lib/adapters/aws/base/index.js +0 -2
- package/lib/adapters/aws/base/index.js.map +0 -1
- package/lib/adapters/aws/dynamodb.adapter.d.ts +0 -56
- package/lib/adapters/aws/dynamodb.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/dynamodb.adapter.js +0 -2
- package/lib/adapters/aws/dynamodb.adapter.js.map +0 -1
- package/lib/adapters/aws/event-bridge.adapter.d.ts +0 -63
- package/lib/adapters/aws/event-bridge.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/event-bridge.adapter.js +0 -2
- package/lib/adapters/aws/event-bridge.adapter.js.map +0 -1
- package/lib/adapters/aws/index.d.ts.map +0 -1
- package/lib/adapters/aws/index.js +0 -2
- package/lib/adapters/aws/index.js.map +0 -1
- package/lib/adapters/aws/lambda-edge.adapter.d.ts +0 -209
- package/lib/adapters/aws/lambda-edge.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/lambda-edge.adapter.js +0 -2
- package/lib/adapters/aws/lambda-edge.adapter.js.map +0 -1
- package/lib/adapters/aws/request-lambda-edge.adapter.d.ts +0 -131
- package/lib/adapters/aws/request-lambda-edge.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/request-lambda-edge.adapter.js +0 -2
- package/lib/adapters/aws/request-lambda-edge.adapter.js.map +0 -1
- package/lib/adapters/aws/s3.adapter.d.ts +0 -56
- package/lib/adapters/aws/s3.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/s3.adapter.js +0 -2
- package/lib/adapters/aws/s3.adapter.js.map +0 -1
- package/lib/adapters/aws/sns.adapter.d.ts +0 -56
- package/lib/adapters/aws/sns.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/sns.adapter.js +0 -2
- package/lib/adapters/aws/sns.adapter.js.map +0 -1
- package/lib/adapters/aws/sqs.adapter.d.ts +0 -56
- package/lib/adapters/aws/sqs.adapter.d.ts.map +0 -1
- package/lib/adapters/aws/sqs.adapter.js +0 -2
- package/lib/adapters/aws/sqs.adapter.js.map +0 -1
- package/lib/adapters/azure/http-trigger-v4.adapter.d.ts.map +0 -1
- package/lib/adapters/azure/http-trigger-v4.adapter.js +0 -2
- package/lib/adapters/azure/http-trigger-v4.adapter.js.map +0 -1
- package/lib/adapters/azure/index.d.ts.map +0 -1
- package/lib/adapters/azure/index.js +0 -2
- package/lib/adapters/azure/index.js.map +0 -1
- package/lib/adapters/digital-ocean/http-function.adapter.d.ts +0 -65
- package/lib/adapters/digital-ocean/http-function.adapter.d.ts.map +0 -1
- package/lib/adapters/digital-ocean/http-function.adapter.js +0 -2
- package/lib/adapters/digital-ocean/http-function.adapter.js.map +0 -1
- package/lib/adapters/digital-ocean/index.d.ts.map +0 -1
- package/lib/adapters/digital-ocean/index.js +0 -2
- package/lib/adapters/digital-ocean/index.js.map +0 -1
- package/lib/adapters/dummy/dummy.adapter.d.ts.map +0 -1
- package/lib/adapters/dummy/dummy.adapter.js +0 -2
- package/lib/adapters/dummy/dummy.adapter.js.map +0 -1
- package/lib/adapters/dummy/index.d.ts.map +0 -1
- package/lib/adapters/dummy/index.js +0 -2
- package/lib/adapters/dummy/index.js.map +0 -1
- package/lib/adapters/huawei/huawei-api-gateway.adapter.d.ts +0 -66
- package/lib/adapters/huawei/huawei-api-gateway.adapter.d.ts.map +0 -1
- package/lib/adapters/huawei/huawei-api-gateway.adapter.js +0 -2
- package/lib/adapters/huawei/huawei-api-gateway.adapter.js.map +0 -1
- package/lib/adapters/huawei/index.d.ts.map +0 -1
- package/lib/adapters/huawei/index.js +0 -2
- package/lib/adapters/huawei/index.js.map +0 -1
- package/lib/contracts/adapter.contract.d.ts +0 -152
- package/lib/contracts/adapter.contract.d.ts.map +0 -1
- package/lib/contracts/adapter.contract.js +0 -2
- package/lib/contracts/adapter.contract.js.map +0 -1
- package/lib/contracts/framework.contract.d.ts.map +0 -1
- package/lib/contracts/framework.contract.js +0 -2
- package/lib/contracts/framework.contract.js.map +0 -1
- package/lib/contracts/handler.contract.d.ts +0 -25
- package/lib/contracts/handler.contract.d.ts.map +0 -1
- package/lib/contracts/handler.contract.js +0 -2
- package/lib/contracts/handler.contract.js.map +0 -1
- package/lib/contracts/index.d.ts +0 -5
- package/lib/contracts/index.d.ts.map +0 -1
- package/lib/contracts/index.js +0 -2
- package/lib/contracts/index.js.map +0 -1
- package/lib/contracts/resolver.contract.d.ts +0 -83
- package/lib/contracts/resolver.contract.d.ts.map +0 -1
- package/lib/contracts/resolver.contract.js +0 -2
- package/lib/contracts/resolver.contract.js.map +0 -1
- package/lib/core/base-handler.d.ts.map +0 -1
- package/lib/core/base-handler.js +0 -2
- package/lib/core/base-handler.js.map +0 -1
- package/lib/core/constants.d.ts.map +0 -1
- package/lib/core/constants.js +0 -2
- package/lib/core/constants.js.map +0 -1
- package/lib/core/current-invoke.d.ts +0 -48
- package/lib/core/current-invoke.d.ts.map +0 -1
- package/lib/core/current-invoke.js +0 -2
- package/lib/core/current-invoke.js.map +0 -1
- package/lib/core/event-body.d.ts +0 -22
- package/lib/core/event-body.d.ts.map +0 -1
- package/lib/core/event-body.js +0 -2
- package/lib/core/event-body.js.map +0 -1
- package/lib/core/headers.d.ts +0 -73
- package/lib/core/headers.d.ts.map +0 -1
- package/lib/core/headers.js +0 -3
- package/lib/core/headers.js.map +0 -1
- package/lib/core/index.d.ts +0 -12
- package/lib/core/index.d.ts.map +0 -1
- package/lib/core/index.js +0 -2
- package/lib/core/index.js.map +0 -1
- package/lib/core/is-binary.d.ts +0 -73
- package/lib/core/is-binary.d.ts.map +0 -1
- package/lib/core/is-binary.js +0 -2
- package/lib/core/is-binary.js.map +0 -1
- package/lib/core/logger.d.ts.map +0 -1
- package/lib/core/logger.js +0 -2
- package/lib/core/logger.js.map +0 -1
- package/lib/core/no-op.d.ts +0 -8
- package/lib/core/no-op.d.ts.map +0 -1
- package/lib/core/no-op.js +0 -2
- package/lib/core/no-op.js.map +0 -1
- package/lib/core/optional.d.ts +0 -22
- package/lib/core/optional.d.ts.map +0 -1
- package/lib/core/optional.js +0 -2
- package/lib/core/optional.js.map +0 -1
- package/lib/core/path.d.ts.map +0 -1
- package/lib/core/path.js +0 -2
- package/lib/core/path.js.map +0 -1
- package/lib/core/stream.d.ts +0 -21
- package/lib/core/stream.d.ts.map +0 -1
- package/lib/core/stream.js +0 -2
- package/lib/core/stream.js.map +0 -1
- package/lib/frameworks/apollo-server/apollo-server.framework.d.ts.map +0 -1
- package/lib/frameworks/apollo-server/apollo-server.framework.js +0 -2
- package/lib/frameworks/apollo-server/apollo-server.framework.js.map +0 -1
- package/lib/frameworks/apollo-server/index.d.ts.map +0 -1
- package/lib/frameworks/apollo-server/index.js +0 -2
- package/lib/frameworks/apollo-server/index.js.map +0 -1
- package/lib/frameworks/body-parser/base-body-parser.framework.d.ts +0 -69
- package/lib/frameworks/body-parser/base-body-parser.framework.d.ts.map +0 -1
- package/lib/frameworks/body-parser/base-body-parser.framework.js +0 -2
- package/lib/frameworks/body-parser/base-body-parser.framework.js.map +0 -1
- package/lib/frameworks/body-parser/index.d.ts.map +0 -1
- package/lib/frameworks/body-parser/index.js +0 -2
- package/lib/frameworks/body-parser/index.js.map +0 -1
- package/lib/frameworks/body-parser/json-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/json-body-parser.framework.d.ts.map +0 -1
- package/lib/frameworks/body-parser/json-body-parser.framework.js +0 -2
- package/lib/frameworks/body-parser/json-body-parser.framework.js.map +0 -1
- package/lib/frameworks/body-parser/raw-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/raw-body-parser.framework.d.ts.map +0 -1
- package/lib/frameworks/body-parser/raw-body-parser.framework.js +0 -2
- package/lib/frameworks/body-parser/raw-body-parser.framework.js.map +0 -1
- package/lib/frameworks/body-parser/text-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/text-body-parser.framework.d.ts.map +0 -1
- package/lib/frameworks/body-parser/text-body-parser.framework.js +0 -2
- package/lib/frameworks/body-parser/text-body-parser.framework.js.map +0 -1
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.d.ts.map +0 -1
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.js +0 -2
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.js.map +0 -1
- package/lib/frameworks/cors/cors.framework.d.ts.map +0 -1
- package/lib/frameworks/cors/cors.framework.js +0 -3
- package/lib/frameworks/cors/cors.framework.js.map +0 -1
- package/lib/frameworks/cors/index.d.ts.map +0 -1
- package/lib/frameworks/cors/index.js +0 -2
- package/lib/frameworks/cors/index.js.map +0 -1
- package/lib/frameworks/deepkit/http-deepkit.framework.d.ts.map +0 -1
- package/lib/frameworks/deepkit/http-deepkit.framework.js +0 -2
- package/lib/frameworks/deepkit/http-deepkit.framework.js.map +0 -1
- package/lib/frameworks/deepkit/index.d.ts.map +0 -1
- package/lib/frameworks/deepkit/index.js +0 -2
- package/lib/frameworks/deepkit/index.js.map +0 -1
- package/lib/frameworks/express/express.framework.d.ts.map +0 -1
- package/lib/frameworks/express/express.framework.js +0 -2
- package/lib/frameworks/express/express.framework.js.map +0 -1
- package/lib/frameworks/express/index.d.ts.map +0 -1
- package/lib/frameworks/express/index.js +0 -2
- package/lib/frameworks/express/index.js.map +0 -1
- package/lib/frameworks/fastify/fastify.framework.d.ts.map +0 -1
- package/lib/frameworks/fastify/fastify.framework.js +0 -2
- package/lib/frameworks/fastify/fastify.framework.js.map +0 -1
- package/lib/frameworks/fastify/helpers/no-op-content-parser.d.ts +0 -14
- package/lib/frameworks/fastify/helpers/no-op-content-parser.d.ts.map +0 -1
- package/lib/frameworks/fastify/helpers/no-op-content-parser.js +0 -2
- package/lib/frameworks/fastify/helpers/no-op-content-parser.js.map +0 -1
- package/lib/frameworks/fastify/index.d.ts.map +0 -1
- package/lib/frameworks/fastify/index.js +0 -2
- package/lib/frameworks/fastify/index.js.map +0 -1
- package/lib/frameworks/hapi/hapi.framework.d.ts.map +0 -1
- package/lib/frameworks/hapi/hapi.framework.js +0 -2
- package/lib/frameworks/hapi/hapi.framework.js.map +0 -1
- package/lib/frameworks/hapi/index.d.ts.map +0 -1
- package/lib/frameworks/hapi/index.js +0 -2
- package/lib/frameworks/hapi/index.js.map +0 -1
- package/lib/frameworks/koa/index.d.ts.map +0 -1
- package/lib/frameworks/koa/index.js +0 -2
- package/lib/frameworks/koa/index.js.map +0 -1
- package/lib/frameworks/koa/koa.framework.d.ts.map +0 -1
- package/lib/frameworks/koa/koa.framework.js +0 -2
- package/lib/frameworks/koa/koa.framework.js.map +0 -1
- package/lib/frameworks/lazy/index.d.ts.map +0 -1
- package/lib/frameworks/lazy/index.js +0 -2
- package/lib/frameworks/lazy/index.js.map +0 -1
- package/lib/frameworks/lazy/lazy.framework.d.ts.map +0 -1
- package/lib/frameworks/lazy/lazy.framework.js +0 -2
- package/lib/frameworks/lazy/lazy.framework.js.map +0 -1
- package/lib/frameworks/trpc/index.d.ts.map +0 -1
- package/lib/frameworks/trpc/index.js +0 -2
- package/lib/frameworks/trpc/index.js.map +0 -1
- package/lib/frameworks/trpc/trpc.framework.d.ts.map +0 -1
- package/lib/frameworks/trpc/trpc.framework.js +0 -2
- package/lib/frameworks/trpc/trpc.framework.js.map +0 -1
- package/lib/handlers/aws/aws-stream.handler.d.ts.map +0 -1
- package/lib/handlers/aws/aws-stream.handler.js +0 -2
- package/lib/handlers/aws/aws-stream.handler.js.map +0 -1
- package/lib/handlers/aws/index.d.ts.map +0 -1
- package/lib/handlers/aws/index.js +0 -2
- package/lib/handlers/aws/index.js.map +0 -1
- package/lib/handlers/azure/azure.handler.d.ts.map +0 -1
- package/lib/handlers/azure/azure.handler.js +0 -2
- package/lib/handlers/azure/azure.handler.js.map +0 -1
- package/lib/handlers/azure/index.d.ts.map +0 -1
- package/lib/handlers/azure/index.js +0 -2
- package/lib/handlers/azure/index.js.map +0 -1
- package/lib/handlers/base/index.d.ts +0 -2
- package/lib/handlers/base/index.d.ts.map +0 -1
- package/lib/handlers/base/index.js +0 -2
- package/lib/handlers/base/index.js.map +0 -1
- package/lib/handlers/base/raw-request.d.ts.map +0 -1
- package/lib/handlers/base/raw-request.js +0 -2
- package/lib/handlers/base/raw-request.js.map +0 -1
- package/lib/handlers/default/default.handler.d.ts.map +0 -1
- package/lib/handlers/default/default.handler.js +0 -2
- package/lib/handlers/default/default.handler.js.map +0 -1
- package/lib/handlers/default/index.d.ts.map +0 -1
- package/lib/handlers/default/index.js +0 -2
- package/lib/handlers/default/index.js.map +0 -1
- package/lib/handlers/digital-ocean/digital-ocean.handler.d.ts +0 -17
- package/lib/handlers/digital-ocean/digital-ocean.handler.d.ts.map +0 -1
- package/lib/handlers/digital-ocean/digital-ocean.handler.js +0 -2
- package/lib/handlers/digital-ocean/digital-ocean.handler.js.map +0 -1
- package/lib/handlers/digital-ocean/index.d.ts.map +0 -1
- package/lib/handlers/digital-ocean/index.js +0 -2
- package/lib/handlers/digital-ocean/index.js.map +0 -1
- package/lib/handlers/firebase/http-firebase-v2.handler.d.ts +0 -27
- package/lib/handlers/firebase/http-firebase-v2.handler.d.ts.map +0 -1
- package/lib/handlers/firebase/http-firebase-v2.handler.js +0 -2
- package/lib/handlers/firebase/http-firebase-v2.handler.js.map +0 -1
- package/lib/handlers/firebase/http-firebase.handler.d.ts +0 -19
- package/lib/handlers/firebase/http-firebase.handler.d.ts.map +0 -1
- package/lib/handlers/firebase/http-firebase.handler.js +0 -2
- package/lib/handlers/firebase/http-firebase.handler.js.map +0 -1
- package/lib/handlers/firebase/index.d.ts.map +0 -1
- package/lib/handlers/firebase/index.js +0 -2
- package/lib/handlers/firebase/index.js.map +0 -1
- package/lib/handlers/gcp/gcp.handler.d.ts.map +0 -1
- package/lib/handlers/gcp/gcp.handler.js +0 -2
- package/lib/handlers/gcp/gcp.handler.js.map +0 -1
- package/lib/handlers/gcp/index.d.ts.map +0 -1
- package/lib/handlers/gcp/index.js +0 -2
- package/lib/handlers/gcp/index.js.map +0 -1
- package/lib/handlers/huawei/http-huawei.handler.d.ts.map +0 -1
- package/lib/handlers/huawei/http-huawei.handler.js +0 -2
- package/lib/handlers/huawei/http-huawei.handler.js.map +0 -1
- package/lib/handlers/huawei/index.d.ts.map +0 -1
- package/lib/handlers/huawei/index.js +0 -2
- package/lib/handlers/huawei/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.doc.js +0 -2
- package/lib/index.doc.js.map +0 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/lib/network/index.d.ts +0 -5
- package/lib/network/index.d.ts.map +0 -1
- package/lib/network/index.js +0 -2
- package/lib/network/index.js.map +0 -1
- package/lib/network/request.d.ts.map +0 -1
- package/lib/network/request.js +0 -2
- package/lib/network/request.js.map +0 -1
- package/lib/network/response-stream.d.ts +0 -41
- package/lib/network/response-stream.d.ts.map +0 -1
- package/lib/network/response-stream.js +0 -7
- package/lib/network/response-stream.js.map +0 -1
- package/lib/network/response.d.ts +0 -48
- package/lib/network/response.d.ts.map +0 -1
- package/lib/network/response.js +0 -4
- package/lib/network/response.js.map +0 -1
- package/lib/network/utils.d.ts +0 -9
- package/lib/network/utils.d.ts.map +0 -1
- package/lib/network/utils.js +0 -2
- package/lib/network/utils.js.map +0 -1
- package/lib/resolvers/aws-context/aws-context.resolver.d.ts.map +0 -1
- package/lib/resolvers/aws-context/aws-context.resolver.js +0 -2
- package/lib/resolvers/aws-context/aws-context.resolver.js.map +0 -1
- package/lib/resolvers/aws-context/index.d.ts.map +0 -1
- package/lib/resolvers/aws-context/index.js +0 -2
- package/lib/resolvers/aws-context/index.js.map +0 -1
- package/lib/resolvers/callback/callback.resolver.d.ts.map +0 -1
- package/lib/resolvers/callback/callback.resolver.js +0 -2
- package/lib/resolvers/callback/callback.resolver.js.map +0 -1
- package/lib/resolvers/callback/index.d.ts.map +0 -1
- package/lib/resolvers/callback/index.js +0 -2
- package/lib/resolvers/callback/index.js.map +0 -1
- package/lib/resolvers/dummy/dummy.resolver.d.ts +0 -14
- package/lib/resolvers/dummy/dummy.resolver.d.ts.map +0 -1
- package/lib/resolvers/dummy/dummy.resolver.js +0 -2
- package/lib/resolvers/dummy/dummy.resolver.js.map +0 -1
- package/lib/resolvers/dummy/index.d.ts.map +0 -1
- package/lib/resolvers/dummy/index.js +0 -2
- package/lib/resolvers/dummy/index.js.map +0 -1
- package/lib/resolvers/promise/index.d.ts.map +0 -1
- package/lib/resolvers/promise/index.js +0 -2
- package/lib/resolvers/promise/index.js.map +0 -1
- package/lib/resolvers/promise/promise.resolver.d.ts +0 -14
- package/lib/resolvers/promise/promise.resolver.d.ts.map +0 -1
- package/lib/resolvers/promise/promise.resolver.js +0 -2
- package/lib/resolvers/promise/promise.resolver.js.map +0 -1
- package/lib/serverless-adapter.d.ts +0 -119
- package/lib/serverless-adapter.d.ts.map +0 -1
- package/lib/serverless-adapter.js +0 -2
- package/lib/serverless-adapter.js.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { SingleValueHeaders } from '../headers';
|
|
2
|
-
/**
|
|
3
|
-
* The interface to represents the values of args send when someone calls a function using HTTP Endpoint.
|
|
4
|
-
* To be able to receive this event, inside your `project.yml`, instead of `web: true` change to `web: 'raw'`.
|
|
5
|
-
*
|
|
6
|
-
* {@link https://www.digitalocean.com/community/questions/digitalocean-functions-how-to-differentiate-query-params-from-body-params | Reference}
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @breadcrumb Types / Digital Ocean / DigitalOceanHttpEvent
|
|
10
|
-
*/
|
|
11
|
-
export interface DigitalOceanHttpEvent {
|
|
12
|
-
/**
|
|
13
|
-
* The HTTP Method of the request
|
|
14
|
-
*/
|
|
15
|
-
__ow_method: string;
|
|
16
|
-
/**
|
|
17
|
-
* The query porams of the request
|
|
18
|
-
*/
|
|
19
|
-
__ow_query: string;
|
|
20
|
-
/**
|
|
21
|
-
* The body of the request.
|
|
22
|
-
*/
|
|
23
|
-
__ow_body?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Indicates if body is base64 string
|
|
26
|
-
*/
|
|
27
|
-
__ow_isBase64Encoded?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* The HTTP Headers of the request
|
|
30
|
-
*/
|
|
31
|
-
__ow_headers: SingleValueHeaders;
|
|
32
|
-
/**
|
|
33
|
-
* The path in the request
|
|
34
|
-
*/
|
|
35
|
-
__ow_path: string;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=digital-ocean-http-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"digital-ocean-http-event.d.ts","sourceRoot":"","sources":["../../../src/@types/digital-ocean/digital-ocean-http-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,YAAY,EAAE,kBAAkB,CAAC;IAEjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),digital_ocean_http_event_exports={};module.exports=__toCommonJS(digital_ocean_http_event_exports);
|
|
2
|
-
//# sourceMappingURL=digital-ocean-http-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"digital-ocean-http-event.js","sources":["../../../src/@types/digital-ocean/digital-ocean-http-event.ts"],"sourcesContent":["//#region Imports\n\nimport { SingleValueHeaders } from '../headers';\n\n//#endregion\n\n/**\n * The interface to represents the values of args send when someone calls a function using HTTP Endpoint.\n * To be able to receive this event, inside your `project.yml`, instead of `web: true` change to `web: 'raw'`.\n *\n * {@link https://www.digitalocean.com/community/questions/digitalocean-functions-how-to-differentiate-query-params-from-body-params | Reference}\n *\n * @public\n * @breadcrumb Types / Digital Ocean / DigitalOceanHttpEvent\n */\nexport interface DigitalOceanHttpEvent {\n /**\n * The HTTP Method of the request\n */\n __ow_method: string;\n\n /**\n * The query porams of the request\n */\n __ow_query: string;\n\n /**\n * The body of the request.\n */\n __ow_body?: string;\n\n /**\n * Indicates if body is base64 string\n */\n __ow_isBase64Encoded?: boolean;\n\n /**\n * The HTTP Headers of the request\n */\n __ow_headers: SingleValueHeaders;\n\n /**\n * The path in the request\n */\n __ow_path: string;\n}\n"],"names":[],"mappings":"kiBAAA,iCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,gCAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SingleValueHeaders } from '../headers';
|
|
2
|
-
/**
|
|
3
|
-
* The interface to represents the response of Digital Ocean Function.
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
* @breadcrumb Types / Digital Ocean / DigitalOceanHttpResponse
|
|
7
|
-
*/
|
|
8
|
-
export interface DigitalOceanHttpResponse {
|
|
9
|
-
/**
|
|
10
|
-
* The HTTP Headers of the response
|
|
11
|
-
*/
|
|
12
|
-
headers?: SingleValueHeaders;
|
|
13
|
-
/**
|
|
14
|
-
* The body of the response
|
|
15
|
-
*/
|
|
16
|
-
body: unknown;
|
|
17
|
-
/**
|
|
18
|
-
* The HTTP Status code of the response
|
|
19
|
-
*/
|
|
20
|
-
statusCode: number;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=digital-ocean-http-response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"digital-ocean-http-response.d.ts","sourceRoot":"","sources":["../../../src/@types/digital-ocean/digital-ocean-http-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),digital_ocean_http_response_exports={};module.exports=__toCommonJS(digital_ocean_http_response_exports);
|
|
2
|
-
//# sourceMappingURL=digital-ocean-http-response.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"digital-ocean-http-response.js","sources":["../../../src/@types/digital-ocean/digital-ocean-http-response.ts"],"sourcesContent":["//#region Imports\n\nimport { SingleValueHeaders } from '../headers';\n\n//#endregion\n\n/**\n * The interface to represents the response of Digital Ocean Function.\n *\n * @public\n * @breadcrumb Types / Digital Ocean / DigitalOceanHttpResponse\n */\nexport interface DigitalOceanHttpResponse {\n /**\n * The HTTP Headers of the response\n */\n headers?: SingleValueHeaders;\n\n /**\n * The body of the response\n */\n body: unknown;\n\n /**\n * The HTTP Status code of the response\n */\n statusCode: number;\n}\n"],"names":[],"mappings":"kiBAAA,oCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,mCAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@types/digital-ocean/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),digital_ocean_exports={};module.exports=__toCommonJS(digital_ocean_exports);__reExport(digital_ocean_exports,require("./digital-ocean-http-event"),module.exports);
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/@types/digital-ocean/index.ts"],"sourcesContent":["export * from './digital-ocean-http-event';\n"],"names":[],"mappings":"kqBAAA,sBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,qBAAA,EAAA,WAAA,sBAAc,QAAd,4BAAA,EAAA,OAAA,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/@types/headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC"}
|
package/lib/@types/headers.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),headers_exports={};module.exports=__toCommonJS(headers_exports);
|
|
2
|
-
//# sourceMappingURL=headers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","sources":["../../src/@types/headers.ts"],"sourcesContent":["/**\n * The record that represents the headers that doesn't have multiple values in the value\n *\n * @example\n * ```typescript\n * { 'Accept-Encoding': 'gzip, deflate, br' }\n * ```\n *\n * @breadcrumb Types\n * @public\n */\nexport type SingleValueHeaders = Record<string, string | undefined>;\n\n/**\n * The record that represents the headers that have multiple values in the value\n *\n * @example\n * ```typescript\n * { 'Accept-Encoding': ['gzip', 'deflate', 'br'] }\n * ```\n *\n * @breadcrumb Types\n * @public\n */\nexport type MultiValueHeaders = Record<string, string[] | undefined>;\n\n/**\n * The record that represents the headers that can both single or multiple values in the value\n *\n * @example\n * ```typescript\n * { 'Accept-Encoding': ['gzip', 'deflate', 'br'], 'Host': 'xyz.execute-api.us-east-1.amazonaws.com' }\n * ```\n *\n * @breadcrumb Types\n * @public\n */\nexport type BothValueHeaders = Record<string, string | string[] | undefined>;\n"],"names":[],"mappings":"kiBAAA,gBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,eAAA"}
|
package/lib/@types/helpers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/@types/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,IAAI;KAC1B,QAAQ,IAAI,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;CAC3C,CAAC"}
|
package/lib/@types/helpers.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),helpers_exports={};module.exports=__toCommonJS(helpers_exports);
|
|
2
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../src/@types/helpers.ts"],"sourcesContent":["/**\n * Removes 'optional' attributes from a type's properties\n *\n * @breadcrumb Types\n * @public\n */\nexport type Concrete<Type> = {\n [Property in keyof Type]-?: Type[Property];\n};\n"],"names":[],"mappings":"kiBAAA,gBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,eAAA"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { BothValueHeaders } from '../index';
|
|
2
|
-
/**
|
|
3
|
-
* The interface that represents the Api Gateway Event of Huawei when integrate with Function Graph of Event Type.
|
|
4
|
-
* See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0102.html#functiongraph_02_0102__li5178638110137 | Reference}.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
* @breadcrumb Types / Huawei / HuaweiApiGatewayEvent
|
|
8
|
-
*/
|
|
9
|
-
export interface HuaweiApiGatewayEvent {
|
|
10
|
-
/**
|
|
11
|
-
* The body value with the content of this event serialized in JSON
|
|
12
|
-
*/
|
|
13
|
-
body: string;
|
|
14
|
-
/**
|
|
15
|
-
* The headers of the request which this event represents
|
|
16
|
-
*/
|
|
17
|
-
headers: BothValueHeaders;
|
|
18
|
-
/**
|
|
19
|
-
* The HTTP Method of the request which this event represents
|
|
20
|
-
*/
|
|
21
|
-
httpMethod: string;
|
|
22
|
-
/**
|
|
23
|
-
* Tells if the body is base64 encoded
|
|
24
|
-
*/
|
|
25
|
-
isBase64Encoded: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The path of the request which this event represents
|
|
28
|
-
*/
|
|
29
|
-
path: string;
|
|
30
|
-
/**
|
|
31
|
-
* The path parameters of the request which this event represents
|
|
32
|
-
*/
|
|
33
|
-
pathParameters: HuaweiRequestPathParameters;
|
|
34
|
-
/**
|
|
35
|
-
* The query strings of the request which this event represents
|
|
36
|
-
*/
|
|
37
|
-
queryStringParameters: HuaweiRequestQueryStringParameters;
|
|
38
|
-
/**
|
|
39
|
-
* The request context with information about the stage, api and requestId
|
|
40
|
-
*/
|
|
41
|
-
requestContext: HuaweiRequestContext;
|
|
42
|
-
/**
|
|
43
|
-
* It can have more properties that I could not discover yet
|
|
44
|
-
*/
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* The path parameters of the request, usually is the name of the wildcard you create in FunctionGraph, such as /\{proxy\}.
|
|
49
|
-
*
|
|
50
|
-
* @public
|
|
51
|
-
* @breadcrumb Types / Huawei / HuaweiApiGatewayEvent
|
|
52
|
-
*/
|
|
53
|
-
export type HuaweiRequestPathParameters = Record<string, string>;
|
|
54
|
-
/**
|
|
55
|
-
* The query strings of the request
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
* @breadcrumb Types / Huawei / HuaweiApiGatewayEvent
|
|
59
|
-
*/
|
|
60
|
-
export type HuaweiRequestQueryStringParameters = Record<string, string | string[]>;
|
|
61
|
-
/**
|
|
62
|
-
* The interface that represents the values you can get inside request context.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
* @breadcrumb Types / Huawei / HuaweiApiGatewayEvent
|
|
66
|
-
*/
|
|
67
|
-
export interface HuaweiRequestContext {
|
|
68
|
-
/**
|
|
69
|
-
* The ID of your API inside Api Gateway
|
|
70
|
-
*/
|
|
71
|
-
apiId: string;
|
|
72
|
-
/**
|
|
73
|
-
* The ID of this request
|
|
74
|
-
*/
|
|
75
|
-
requestId: string;
|
|
76
|
-
/**
|
|
77
|
-
* The name of the stage running this Function Graph
|
|
78
|
-
*/
|
|
79
|
-
stage: string;
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=huawei-api-gateway-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-api-gateway-event.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/huawei-api-gateway-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,cAAc,EAAE,2BAA2B,CAAC;IAE5C;;OAEG;IACH,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D;;OAEG;IACH,cAAc,EAAE,oBAAoB,CAAC;IAErC;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD,MAAM,EACN,MAAM,GAAG,MAAM,EAAE,CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_api_gateway_event_exports={};module.exports=__toCommonJS(huawei_api_gateway_event_exports);
|
|
2
|
-
//# sourceMappingURL=huawei-api-gateway-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-api-gateway-event.js","sources":["../../../src/@types/huawei/huawei-api-gateway-event.ts"],"sourcesContent":["//#region Imports\n\nimport { BothValueHeaders } from '../index';\n\n//#endregion\n\n/**\n * The interface that represents the Api Gateway Event of Huawei when integrate with Function Graph of Event Type.\n * See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0102.html#functiongraph_02_0102__li5178638110137 | Reference}.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport interface HuaweiApiGatewayEvent {\n /**\n * The body value with the content of this event serialized in JSON\n */\n body: string;\n\n /**\n * The headers of the request which this event represents\n */\n headers: BothValueHeaders;\n\n /**\n * The HTTP Method of the request which this event represents\n */\n httpMethod: string;\n\n /**\n * Tells if the body is base64 encoded\n */\n isBase64Encoded: boolean;\n\n /**\n * The path of the request which this event represents\n */\n path: string;\n\n /**\n * The path parameters of the request which this event represents\n */\n pathParameters: HuaweiRequestPathParameters;\n\n /**\n * The query strings of the request which this event represents\n */\n queryStringParameters: HuaweiRequestQueryStringParameters;\n\n /**\n * The request context with information about the stage, api and requestId\n */\n requestContext: HuaweiRequestContext;\n\n /**\n * It can have more properties that I could not discover yet\n */\n [key: string]: any;\n}\n\n/**\n * The path parameters of the request, usually is the name of the wildcard you create in FunctionGraph, such as /\\{proxy\\}.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport type HuaweiRequestPathParameters = Record<string, string>;\n\n/**\n * The query strings of the request\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport type HuaweiRequestQueryStringParameters = Record<\n string,\n string | string[]\n>;\n\n/**\n * The interface that represents the values you can get inside request context.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport interface HuaweiRequestContext {\n /**\n * The ID of your API inside Api Gateway\n */\n apiId: string;\n\n /**\n * The ID of this request\n */\n requestId: string;\n\n /**\n * The name of the stage running this Function Graph\n */\n stage: string;\n}\n"],"names":[],"mappings":"kiBAAA,iCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,gCAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { MultiValueHeaders } from '../headers';
|
|
2
|
-
/**
|
|
3
|
-
* The interface that represents the Api Gateway Response of Huawei when integrate with Function Graph of Event Type.
|
|
4
|
-
* See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0102.html#functiongraph_02_0102__li5178638110137 | Reference}.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
* @breadcrumb Types / Huawei / HuaweiApiGatewayResponse
|
|
8
|
-
*/
|
|
9
|
-
export interface HuaweiApiGatewayResponse {
|
|
10
|
-
/**
|
|
11
|
-
* Tells if the body was encoded as base64
|
|
12
|
-
*/
|
|
13
|
-
isBase64Encoded: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* The HTTP Status code of this response
|
|
16
|
-
*/
|
|
17
|
-
statusCode: number;
|
|
18
|
-
/**
|
|
19
|
-
* The headers sent with this response
|
|
20
|
-
*/
|
|
21
|
-
headers: MultiValueHeaders;
|
|
22
|
-
/**
|
|
23
|
-
* The body value with the content of this response serialized in JSON
|
|
24
|
-
*/
|
|
25
|
-
body: string;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=huawei-api-gateway-response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-api-gateway-response.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/huawei-api-gateway-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAE3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_api_gateway_response_exports={};module.exports=__toCommonJS(huawei_api_gateway_response_exports);
|
|
2
|
-
//# sourceMappingURL=huawei-api-gateway-response.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-api-gateway-response.js","sources":["../../../src/@types/huawei/huawei-api-gateway-response.ts"],"sourcesContent":["//#region Imports\n\nimport { MultiValueHeaders } from '../headers';\n\n//#endregion\n\n/**\n * The interface that represents the Api Gateway Response of Huawei when integrate with Function Graph of Event Type.\n * See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0102.html#functiongraph_02_0102__li5178638110137 | Reference}.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayResponse\n */\nexport interface HuaweiApiGatewayResponse {\n /**\n * Tells if the body was encoded as base64\n */\n isBase64Encoded: boolean;\n\n /**\n * The HTTP Status code of this response\n */\n statusCode: number;\n\n /**\n * The headers sent with this response\n */\n headers: MultiValueHeaders;\n\n /**\n * The body value with the content of this response serialized in JSON\n */\n body: string;\n}\n"],"names":[],"mappings":"kiBAAA,oCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,mCAAA"}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The return value of {@link HuaweiContext} getRequestID
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
6
|
-
*/
|
|
7
|
-
export type GetRequestIDSecondsReturn = string;
|
|
8
|
-
/**
|
|
9
|
-
* The return value of {@link HuaweiContext} getRemainingTimeInMilliSeconds
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
13
|
-
*/
|
|
14
|
-
export type GetRemainingTimeInMilliSecondsReturn = number;
|
|
15
|
-
/**
|
|
16
|
-
* The return value of {@link HuaweiContext} getAccessKey
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
20
|
-
*/
|
|
21
|
-
export type GetAccessKeyReturn = string;
|
|
22
|
-
/**
|
|
23
|
-
* The return value of {@link HuaweiContext} getSecretKey
|
|
24
|
-
*
|
|
25
|
-
* @public
|
|
26
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
27
|
-
*/
|
|
28
|
-
export type GetSecretKeyReturn = string;
|
|
29
|
-
/**
|
|
30
|
-
* The parameters of the method {@link HuaweiContext} getUserData
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
34
|
-
*/
|
|
35
|
-
export type GetUserDataKeyParameter = string;
|
|
36
|
-
/**
|
|
37
|
-
* The return value of {@link HuaweiContext} getUserData
|
|
38
|
-
*
|
|
39
|
-
* @public
|
|
40
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
41
|
-
*/
|
|
42
|
-
export type GetUserDataReturn = any;
|
|
43
|
-
/**
|
|
44
|
-
* The return value of {@link HuaweiContext} getFunctionName
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
47
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
48
|
-
*/
|
|
49
|
-
export type GetFunctionNameReturn = string;
|
|
50
|
-
/**
|
|
51
|
-
* The return value of {@link HuaweiContext} getRunningTimeInSeconds
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
55
|
-
*/
|
|
56
|
-
export type GetRunningTimeInSecondsReturn = number;
|
|
57
|
-
/**
|
|
58
|
-
* The return value of {@link HuaweiContext} getVersion
|
|
59
|
-
*
|
|
60
|
-
* @public
|
|
61
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
62
|
-
*/
|
|
63
|
-
export type GetVersionReturn = string;
|
|
64
|
-
/**
|
|
65
|
-
* The return value of {@link HuaweiContext} getMemorySize
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
69
|
-
*/
|
|
70
|
-
export type GetMemorySizeReturn = number;
|
|
71
|
-
/**
|
|
72
|
-
* The return value of {@link HuaweiContext} getCPUNumber
|
|
73
|
-
*
|
|
74
|
-
* @public
|
|
75
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
76
|
-
*/
|
|
77
|
-
export type GetCPUNumberReturn = number;
|
|
78
|
-
/**
|
|
79
|
-
* The return value of {@link HuaweiContext} getProjectID
|
|
80
|
-
*
|
|
81
|
-
* @public
|
|
82
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
83
|
-
*/
|
|
84
|
-
export type GetProjectIdReturn = number;
|
|
85
|
-
/**
|
|
86
|
-
* The return value of {@link HuaweiContext} getPackage
|
|
87
|
-
*
|
|
88
|
-
* @public
|
|
89
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
90
|
-
*/
|
|
91
|
-
export type GetPackageReturn = string;
|
|
92
|
-
/**
|
|
93
|
-
* The return value of {@link HuaweiContext} getToken
|
|
94
|
-
*
|
|
95
|
-
* @public
|
|
96
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
97
|
-
*/
|
|
98
|
-
export type GetTokenReturn = string;
|
|
99
|
-
/**
|
|
100
|
-
* The return value of {@link HuaweiContext} getLogger
|
|
101
|
-
*
|
|
102
|
-
* Is the instance of logger that can be used to send logs to
|
|
103
|
-
*
|
|
104
|
-
* @public
|
|
105
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
106
|
-
*/
|
|
107
|
-
export type GetLoggerReturn = {
|
|
108
|
-
info(message: string): void;
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* The interface that represents methods sent by huawei to get information about the function graph.
|
|
112
|
-
* See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0410.html#section1 | Context Methods}
|
|
113
|
-
*
|
|
114
|
-
* @public
|
|
115
|
-
* @breadcrumb Types / Huawei / HuaweiContext
|
|
116
|
-
*/
|
|
117
|
-
export interface HuaweiContext {
|
|
118
|
-
/**
|
|
119
|
-
* Obtains a request ID.
|
|
120
|
-
*/
|
|
121
|
-
getRequestID(): GetRequestIDSecondsReturn;
|
|
122
|
-
/**
|
|
123
|
-
* Obtains the remaining running time of a function.
|
|
124
|
-
*/
|
|
125
|
-
getRemainingTimeInMilliSeconds(): GetRemainingTimeInMilliSecondsReturn;
|
|
126
|
-
/**
|
|
127
|
-
* Obtains the AK (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.
|
|
128
|
-
*/
|
|
129
|
-
getAccessKey(): GetAccessKeyReturn;
|
|
130
|
-
/**
|
|
131
|
-
* Obtains the SK (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.
|
|
132
|
-
*/
|
|
133
|
-
getSecretKey(): GetSecretKeyReturn;
|
|
134
|
-
/**
|
|
135
|
-
* Uses keys to obtain the values passed by environment variables.
|
|
136
|
-
*
|
|
137
|
-
* @param key - The key to get environment variables values
|
|
138
|
-
*/
|
|
139
|
-
getUserData(key: GetUserDataKeyParameter): GetUserDataReturn;
|
|
140
|
-
/**
|
|
141
|
-
* Obtains the name of a function.
|
|
142
|
-
*/
|
|
143
|
-
getFunctionName(): GetFunctionNameReturn;
|
|
144
|
-
/**
|
|
145
|
-
* Obtains the timeout of a function.
|
|
146
|
-
*/
|
|
147
|
-
getRunningTimeInSeconds(): GetRunningTimeInSecondsReturn;
|
|
148
|
-
/**
|
|
149
|
-
* Obtains the version of a function.
|
|
150
|
-
*/
|
|
151
|
-
getVersion(): GetVersionReturn;
|
|
152
|
-
/**
|
|
153
|
-
* Obtains the allocated memory.
|
|
154
|
-
*/
|
|
155
|
-
getMemorySize(): GetMemorySizeReturn;
|
|
156
|
-
/**
|
|
157
|
-
* Number of CPU millicores used by the function (1 core = 1000 millicores).
|
|
158
|
-
*
|
|
159
|
-
* The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory. The number of CPU millicores is calculated as follows: Memory/128 x 100 + 200 (basic CPU millicores).
|
|
160
|
-
*/
|
|
161
|
-
getCPUNumber(): GetCPUNumberReturn;
|
|
162
|
-
/**
|
|
163
|
-
* Obtains a project ID.
|
|
164
|
-
*/
|
|
165
|
-
getProjectID(): GetProjectIdReturn;
|
|
166
|
-
/**
|
|
167
|
-
* Obtains a function group, that is, an app.
|
|
168
|
-
*/
|
|
169
|
-
getPackage(): GetPackageReturn;
|
|
170
|
-
/**
|
|
171
|
-
* Obtains the token (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.
|
|
172
|
-
*/
|
|
173
|
-
getToken(): GetTokenReturn;
|
|
174
|
-
/**
|
|
175
|
-
* Obtains the logger method provided by the context and returns a log output class. Logs are output in the format of Time-Request ID-Content by using the info method.
|
|
176
|
-
*
|
|
177
|
-
* For example, use the info method to output logs:
|
|
178
|
-
*
|
|
179
|
-
* @example
|
|
180
|
-
* ```typescript
|
|
181
|
-
* logg = context.getLogger()
|
|
182
|
-
*
|
|
183
|
-
* logg.info("hello")
|
|
184
|
-
* ```
|
|
185
|
-
*/
|
|
186
|
-
getLogger(): GetLoggerReturn;
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=huawei-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-context.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/huawei-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,GAAG,MAAM,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,YAAY,IAAI,yBAAyB,CAAC;IAE1C;;OAEG;IACH,8BAA8B,IAAI,oCAAoC,CAAC;IAEvE;;OAEG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;OAEG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;;;OAIG;IACH,WAAW,CAAC,GAAG,EAAE,uBAAuB,GAAG,iBAAiB,CAAC;IAE7D;;OAEG;IACH,eAAe,IAAI,qBAAqB,CAAC;IAEzC;;OAEG;IACH,uBAAuB,IAAI,6BAA6B,CAAC;IAEzD;;OAEG;IACH,UAAU,IAAI,gBAAgB,CAAC;IAE/B;;OAEG;IACH,aAAa,IAAI,mBAAmB,CAAC;IAErC;;;;OAIG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;OAEG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;OAEG;IACH,UAAU,IAAI,gBAAgB,CAAC;IAE/B;;OAEG;IACH,QAAQ,IAAI,cAAc,CAAC;IAE3B;;;;;;;;;;;OAWG;IACH,SAAS,IAAI,eAAe,CAAC;CAC9B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_context_exports={};module.exports=__toCommonJS(huawei_context_exports);
|
|
2
|
-
//# sourceMappingURL=huawei-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-context.js","sources":["../../../src/@types/huawei/huawei-context.ts"],"sourcesContent":["/**\n * The return value of {@link HuaweiContext} getRequestID\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetRequestIDSecondsReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getRemainingTimeInMilliSeconds\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetRemainingTimeInMilliSecondsReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getAccessKey\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetAccessKeyReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getSecretKey\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetSecretKeyReturn = string;\n\n/**\n * The parameters of the method {@link HuaweiContext} getUserData\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetUserDataKeyParameter = string;\n\n/**\n * The return value of {@link HuaweiContext} getUserData\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetUserDataReturn = any;\n\n/**\n * The return value of {@link HuaweiContext} getFunctionName\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetFunctionNameReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getRunningTimeInSeconds\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetRunningTimeInSecondsReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getVersion\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetVersionReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getMemorySize\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetMemorySizeReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getCPUNumber\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetCPUNumberReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getProjectID\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetProjectIdReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getPackage\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetPackageReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getToken\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetTokenReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getLogger\n *\n * Is the instance of logger that can be used to send logs to\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetLoggerReturn = {\n info(message: string): void;\n};\n\n/**\n * The interface that represents methods sent by huawei to get information about the function graph.\n * See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0410.html#section1 | Context Methods}\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport interface HuaweiContext {\n /**\n * Obtains a request ID.\n */\n getRequestID(): GetRequestIDSecondsReturn;\n\n /**\n * Obtains the remaining running time of a function.\n */\n getRemainingTimeInMilliSeconds(): GetRemainingTimeInMilliSecondsReturn;\n\n /**\n * Obtains the AK (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.\n */\n getAccessKey(): GetAccessKeyReturn;\n\n /**\n * Obtains the SK (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.\n */\n getSecretKey(): GetSecretKeyReturn;\n\n /**\n * Uses keys to obtain the values passed by environment variables.\n *\n * @param key - The key to get environment variables values\n */\n getUserData(key: GetUserDataKeyParameter): GetUserDataReturn;\n\n /**\n * Obtains the name of a function.\n */\n getFunctionName(): GetFunctionNameReturn;\n\n /**\n * Obtains the timeout of a function.\n */\n getRunningTimeInSeconds(): GetRunningTimeInSecondsReturn;\n\n /**\n * Obtains the version of a function.\n */\n getVersion(): GetVersionReturn;\n\n /**\n * Obtains the allocated memory.\n */\n getMemorySize(): GetMemorySizeReturn;\n\n /**\n * Number of CPU millicores used by the function (1 core = 1000 millicores).\n *\n * The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory. The number of CPU millicores is calculated as follows: Memory/128 x 100 + 200 (basic CPU millicores).\n */\n getCPUNumber(): GetCPUNumberReturn;\n\n /**\n * Obtains a project ID.\n */\n getProjectID(): GetProjectIdReturn;\n\n /**\n * Obtains a function group, that is, an app.\n */\n getPackage(): GetPackageReturn;\n\n /**\n * Obtains the token (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.\n */\n getToken(): GetTokenReturn;\n\n /**\n * Obtains the logger method provided by the context and returns a log output class. Logs are output in the format of Time-Request ID-Content by using the info method.\n *\n * For example, use the info method to output logs:\n *\n * @example\n * ```typescript\n * logg = context.getLogger()\n *\n * logg.info(\"hello\")\n * ```\n */\n getLogger(): GetLoggerReturn;\n}\n"],"names":[],"mappings":"kiBAAA,uBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,sBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_exports={};module.exports=__toCommonJS(huawei_exports);__reExport(huawei_exports,require("./huawei-context"),module.exports);__reExport(huawei_exports,require("./huawei-api-gateway-event"),module.exports);__reExport(huawei_exports,require("./huawei-api-gateway-response"),module.exports);
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/@types/huawei/index.ts"],"sourcesContent":["export * from './huawei-context';\nexport * from './huawei-api-gateway-event';\nexport * from './huawei-api-gateway-response';\n"],"names":[],"mappings":"kqBAAA,eAAA,CAAA,EAAA,OAAA,QAAA,aAAA,cAAA,EAAA,WAAA,eAAc,QAAd,kBAAA,EAAA,OAAA,OAAA,EACA,WAAA,eAAc,QADd,4BAAA,EAAA,OAAA,OAAA,EAEA,WAAA,eAAc,QAFd,+BAAA,EAAA,OAAA,OAAA"}
|
package/lib/@types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/@types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
package/lib/@types/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),types_exports={};module.exports=__toCommonJS(types_exports);__reExport(types_exports,require("./binary-settings"),module.exports);__reExport(types_exports,require("./headers"),module.exports);__reExport(types_exports,require("./helpers"),module.exports);
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
package/lib/@types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/@types/index.ts"],"sourcesContent":["export * from './binary-settings';\nexport * from './headers';\nexport * from './helpers';\n"],"names":[],"mappings":"kqBAAA,cAAA,CAAA,EAAA,OAAA,QAAA,aAAA,aAAA,EAAA,WAAA,cAAc,QAAd,mBAAA,EAAA,OAAA,OAAA,EACA,WAAA,cAAc,QADd,WAAA,EAAA,OAAA,OAAA,EAEA,WAAA,cAAc,QAFd,WAAA,EAAA,OAAA,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-server-mutation.adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/apollo-server/apollo-server-mutation.adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,OAAO,EAGR,MAAM,YAAY,CAAC;AAIpB;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,2BAA2B,CACtC,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,SAAS,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CACjE,YAAW,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;IAQrD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,kCAAkC;IALhE;;OAEG;gBAEkB,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,kCAAkC;IAOhE;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO;IAI1E;;OAEG;IACI,cAAc,IAAI,MAAM;IAI/B;;OAEG;IACI,UAAU,CACf,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,EACjB,GAAG,EAAE,OAAO,GACX,cAAc;IA4BjB;;OAEG;IACI,WAAW,CAAC,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG,SAAS;IAerE;;OAEG;IACI,sBAAsB,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI;CAK5E"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),apollo_server_mutation_adapter_exports={};__export(apollo_server_mutation_adapter_exports,{ApolloServerMutationAdapter:()=>ApolloServerMutationAdapter});module.exports=__toCommonJS(apollo_server_mutation_adapter_exports);var import_core=require("../../core");class ApolloServerMutationAdapter{constructor(baseAdapter,options){this.baseAdapter=baseAdapter,this.options=options}canHandle(event,context,log){return this.baseAdapter.canHandle(event,context,log)}getAdapterName(){return this.baseAdapter.getAdapterName()+"Mutation"}getRequest(event,context,log){var _a;const request=this.baseAdapter.getRequest(event,context,log);request.method="POST";const operationName=this.options.mutationName,mutationResultQuery=(0,import_core.getDefaultIfUndefined)(this.options.mutationResultQuery,"{ __typename }"),mutationBody=JSON.stringify({operationName,query:`mutation ${operationName} ($event: String) { ${operationName} (event: $event) ${mutationResultQuery} }`,variables:{event:((_a=request.body)==null?void 0:_a.toString())||""}}),[buffer,contentLength]=(0,import_core.getEventBodyAsBuffer)(mutationBody,!1);return request.body=buffer,request.headers["content-type"]="application/json",request.headers["content-length"]=String(contentLength),request}getResponse(props){const{data,errors}=JSON.parse(props.body);return errors?this.baseAdapter.getResponse(props):this.baseAdapter.getResponse({...props,body:JSON.stringify(data[this.options.mutationName])})}onErrorWhileForwarding(props){return this.baseAdapter.onErrorWhileForwarding(props)}}
|
|
2
|
-
//# sourceMappingURL=apollo-server-mutation.adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-server-mutation.adapter.js","sources":["../../../src/adapters/apollo-server/apollo-server-mutation.adapter.ts"],"sourcesContent":["//#region Imports\n\nimport {\n AdapterContract,\n AdapterRequest,\n GetResponseAdapterProps,\n OnErrorProps,\n} from '../../contracts';\nimport {\n ILogger,\n getDefaultIfUndefined,\n getEventBodyAsBuffer,\n} from '../../core';\n\n//#endregion\n\n/**\n * The options for {@link ApolloServerMutationAdapter}\n *\n * @breadcrumb Adapters / Apollo Server / ApolloServerMutationAdapter\n * @public\n */\nexport type ApolloServerMutationAdapterOptions = {\n /**\n * Specify the name of mutation that will be called when an event was received\n */\n mutationName: string;\n\n /**\n * Specify the mutation result schema.\n * Use this to customize the behavior when you need to return a specific object to be handled by the Adapter, like SQS with Batch Mode.\n *\n * @defaultValue `{ __typename }`\n */\n mutationResultQuery?: string;\n};\n\n/**\n * The adapter that wraps another adapter to force a transformation of the event data as a mutation to Apollo Server be able to handle.\n *\n * @breadcrumb Adapters / Apollo Server / ApolloServerMutationAdapter\n * @public\n */\nexport class ApolloServerMutationAdapter<\n TEvent,\n TContext,\n TResponse,\n TBaseAdapter extends AdapterContract<TEvent, TContext, TResponse>,\n> implements AdapterContract<TEvent, TContext, TResponse>\n{\n //#region Constructor\n\n /**\n * The default constructor\n */\n constructor(\n protected readonly baseAdapter: TBaseAdapter,\n protected readonly options: ApolloServerMutationAdapterOptions,\n ) {}\n\n //#endregion\n\n //#region Public Methods\n\n /**\n * {@inheritDoc}\n */\n public canHandle(event: unknown, context: TContext, log: ILogger): boolean {\n return this.baseAdapter.canHandle(event, context, log);\n }\n\n /**\n * {@inheritDoc}\n */\n public getAdapterName(): string {\n return this.baseAdapter.getAdapterName() + 'Mutation';\n }\n\n /**\n * {@inheritDoc}\n */\n public getRequest(\n event: TEvent,\n context: TContext,\n log: ILogger,\n ): AdapterRequest {\n const request = this.baseAdapter.getRequest(event, context, log);\n\n request.method = 'POST';\n\n const operationName = this.options.mutationName;\n const mutationResultQuery = getDefaultIfUndefined(\n this.options.mutationResultQuery,\n '{ __typename }',\n );\n\n const mutationBody = JSON.stringify({\n operationName,\n query: `mutation ${operationName} ($event: String) { ${operationName} (event: $event) ${mutationResultQuery} }`,\n variables: {\n event: request.body?.toString() || '',\n },\n });\n\n const [buffer, contentLength] = getEventBodyAsBuffer(mutationBody, false);\n\n request.body = buffer;\n request.headers['content-type'] = 'application/json';\n request.headers['content-length'] = String(contentLength);\n\n return request;\n }\n\n /**\n * {@inheritDoc}\n */\n public getResponse(props: GetResponseAdapterProps<TEvent>): TResponse {\n const { data, errors } = JSON.parse(props.body);\n\n if (!errors) {\n return this.baseAdapter.getResponse({\n ...props,\n body: JSON.stringify(data[this.options.mutationName]),\n });\n }\n\n // when error happens, is the responsability of base adapter\n // to deal with error status code.\n return this.baseAdapter.getResponse(props);\n }\n\n /**\n * {@inheritDoc}\n */\n public onErrorWhileForwarding(props: OnErrorProps<TEvent, TResponse>): void {\n return this.baseAdapter.onErrorWhileForwarding(props);\n }\n\n //#endregion\n}\n"],"names":[],"mappings":"ooBAAA,uCAAA,CAAA,EAAA,SAAA,uCAAA,CAAA,4BAAA,IAAA,2BAAA,CAAA,EAAA,OAAA,QAAA,aAAA,sCAAA,EAQA,IAIO,YAAA,QAAA,YAAA,EA+BA,MAAM,2BAMb,CAME,YACqB,YACA,QACnB,CAFmB,KAAA,YAAA,YACA,KAAA,QAAA,OAClB,CASI,UAAU,MAAgB,QAAmB,IAAuB,CACzE,OAAO,KAAK,YAAY,UAAU,MAAO,QAAS,GAAG,CACvD,CAKO,gBAAyB,CACvB,OAAA,KAAK,YAAY,eAAA,EAAmB,UAC7C,CAKO,WACL,MACA,QACA,IACgB,QAChB,MAAM,QAAU,KAAK,YAAY,WAAW,MAAO,QAAS,GAAG,EAE/D,QAAQ,OAAS,OAEX,MAAA,cAAgB,KAAK,QAAQ,aAC7B,uBAAsB,YAAA,uBAC1B,KAAK,QAAQ,oBACb,gBAAA,EAGI,aAAe,KAAK,UAAU,CAClC,cACA,MAAO,YAAY,aAAa,uBAAuB,aAAa,oBAAoB,mBAAmB,KAC3G,UAAW,CACT,QAAO,WAAQ,OAAR,eAAc,aAAc,EACrC,CAAA,CACD,EAEK,CAAC,OAAQ,aAAa,KAAI,YAAA,sBAAqB,aAAc,EAAK,EAExE,eAAQ,KAAO,OACP,QAAA,QAAQ,cAAc,EAAI,mBAClC,QAAQ,QAAQ,gBAAgB,EAAI,OAAO,aAAa,EAEjD,OACT,CAKO,YAAY,MAAmD,CACpE,KAAM,CAAE,KAAM,QAAW,KAAK,MAAM,MAAM,IAAI,EAE9C,OAAK,OASE,KAAK,YAAY,YAAY,KAAK,EARhC,KAAK,YAAY,YAAY,CAClC,GAAG,MACH,KAAM,KAAK,UAAU,KAAK,KAAK,QAAQ,YAAY,CAAC,CAAA,CACrD,CAML,CAKO,uBAAuB,MAA8C,CACnE,OAAA,KAAK,YAAY,uBAAuB,KAAK,CACtD,CAGF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/apollo-server/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),apollo_server_exports={};module.exports=__toCommonJS(apollo_server_exports);__reExport(apollo_server_exports,require("./apollo-server-mutation.adapter"),module.exports);
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/adapters/apollo-server/index.ts"],"sourcesContent":["export * from './apollo-server-mutation.adapter';\n"],"names":[],"mappings":"kqBAAA,sBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,qBAAA,EAAA,WAAA,sBAAc,QAAd,kCAAA,EAAA,OAAA,OAAA"}
|