//#region ../../node_modules/.pnpm/@smithy+types@4.16.1/node_modules/@smithy/types/dist-types/identity/identity.d.ts /** * @public */ interface Identity { /** * A `Date` when the identity or credential will no longer be accepted. */ readonly expiration?: Date; } /** * @public */ interface IdentityProvider { (identityProperties?: Record): Promise; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.16.1/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts declare global { /** * interface merging stub. */ interface RequestInit {} } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.16.1/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts /** * @public */ interface AwsCredentialIdentity extends Identity { /** * AWS access key ID */ readonly accessKeyId: string; /** * AWS secret access key */ readonly secretAccessKey: string; /** * A security or session token to use with these credentials. Usually * present for temporary credentials. */ readonly sessionToken?: string; /** * AWS credential scope for this set of credentials. */ readonly credentialScope?: string; /** * AWS accountId. */ readonly accountId?: string; } /** * @public */ type AwsCredentialIdentityProvider = IdentityProvider; //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+types@3.974.0/node_modules/@aws-sdk/types/dist-types/serde.d.ts /** * @public * * Declare DOM interfaces in case dom.d.ts is not added to the tsconfig lib, causing * interfaces to not be defined. For developers with dom.d.ts added, the interfaces will * be merged correctly. * * This is also required for any clients with streaming interfaces where the corresponding * types are also referred. The type is only declared here once since this `@aws-sdk/types` * is depended by all `@aws-sdk` packages. */ declare global { /** * @public */ export interface ReadableStream {} /** * @public */ export interface Blob {} } //#endregion //#region src/create-signed-fetcher.d.ts type SignedFetcherOptions = { /** * The AWS service to sign requests for, e.g. `execute-api` for AWS API Gateway or `lambda` for Lambda Function URLs. */ service: string; /** * The AWS region to sign requests for, e.g. `us-east-1` or `eu-west-2`. * Defaults to `us-east-1` if not provided. */ region?: string; /** * The AWS credentials to use when signing requests. * Optional in Node.js environments where they will be retrieved from the environment using [`@aws-sdk/credential-provider-node`](https://www.npmjs.com/package/@aws-sdk/credential-provider-node). * In browser environments, credentials are **required** and must be provided explicitly. * * When omitted, the default provider is constructed once and reused for the lifetime of the * process, so environment changes are not picked up after the first signed request. Pass this * option explicitly to control credential resolution yourself. * * @see {@link https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/Interface/AwsCredentialIdentity/ | AwsCredentialIdentity} * @see {@link https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/Interface/AwsCredentialIdentityProvider/ | AwsCredentialIdentityProvider} */ credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider; /** * The `fetch` function to use when signing requests. * Defaults to the native `fetch` function. */ fetch?: typeof fetch; }; type CreateSignedFetcher = (init: SignedFetcherOptions) => typeof fetch; /** * Creates a signed fetcher function that automatically signs requests using AWS Signature V4. * * @example * ```ts * const signedFetcher = createSignedFetcher({ service: 'lambda', region: 'eu-west-1' }); * * const response = await signedFetcher('https://mylambda.lambda-url.eu-west-1.on.aws/', { * method: 'POST', * body: JSON.stringify({ a: 1 }), * headers: { 'Content-Type': 'application/json' } * }); * ``` */ declare const createSignedFetcher: CreateSignedFetcher; //#endregion export { CreateSignedFetcher, SignedFetcherOptions, createSignedFetcher };