import type { AnyCommand, AnySpyCall, AwsSdkMockAliasMatchers, AwsSdkMockBaseMatchers, CommonMatcherUtils, MatcherFunction } from './types'; interface MessageFunctionParams { cmd: string; client: string; commandCalls: AnySpyCall[]; calls: AnySpyCall[]; data: CheckData; notPrefix: string; ctxUtils: T; } /** * Provides {@link jest} matcher for testing {@link AwsStub} command calls * * @example * * ```ts * import { mockClient } from "aws-sdk-client-mock"; * import { ScanCommand } from "@aws-sdk/client-dynamodb"; * * const awsMock = mockClient(DynamoDBClient); * * awsMock.on(ScanCommand).resolves({ * Items: [{ Info: { S: '{ "val": "info" }' }, LockID: { S: "fooId" } }], * }); * * it("Should call scan command", async () => { * // check result ... maybe :) * await expect(sut()).resolves.toEqual({ ... }); * * // Assert awsMock to have recevied a Scan Command at least one time * expect(awsMock).toHaveReceivedCommand(ScanCommand); * }); * ``` */ export interface AwsSdkMockMatchers extends AwsSdkMockBaseMatchers, AwsSdkMockAliasMatchers, Record { } interface MessageImpl { toHaveReceivedCommandTimes: (expectedCalls: number) => (args: MessageFunctionParams) => string; toHaveReceivedCommand: (args: MessageFunctionParams) => string; toHaveReceivedCommandWith: (input: Record) => (args: MessageFunctionParams) => string; toHaveReceivedNthCommandWith: (call: number, input: Record) => (args: MessageFunctionParams) => string; toHaveReceivedNthSpecificCommandWith: (call: number, input: Record) => (args: MessageFunctionParams) => string; toHaveReceivedAnyCommand: (args: MessageFunctionParams) => string; } export declare function createBaseMatchers(errorMsg: MessageImpl, objectContaining: (sample: Record) => { asymmetricMatch(other: unknown): boolean; toString(): string; getExpectedType?(): string; toAsymmetricMatcher?(): string; }): { [P in keyof AwsSdkMockBaseMatchers]: MatcherFunction; }; export {};