import { c as ResourceType, l as RepositoryMap, n as InMemoryStorage, r as AbstractStorage, s as ResourceMap, t as Config, u as GetParams } from "./config-BqgYQFsl.mjs"; import { FastifyBaseLogger, FastifyBaseLogger as FastifyBaseLogger$1, FastifyInstance } from "fastify"; import { AnyHandler } from "msw"; import "qs"; import { SetupServer } from "msw/node"; //#region src/oauth/store.d.ts type Token = { access_token: string; token_type: "Bearer"; expires_in: number; scope: string; refresh_token?: string; }; declare class OAuth2Store { tokens: Token[]; private tokenClientMap; validate: boolean; constructor(validate?: boolean); addToken(token: Token, clientId?: string): void; getClientIdForToken(accessToken: string): string | undefined; getClientToken(clientId: string, clientSecret: string, scope?: string): Token; getAnonymousToken(projectKey: string, anonymousId: string | undefined, scope: string, clientId?: string): Token; getCustomerToken(projectKey: string, customerId: string, scope: string, clientId?: string): Token; refreshToken(clientId: string, clientSecret: string, refreshToken: string): { access_token: string; token_type: "Bearer"; expires_in: number; scope: string; } | undefined; validateToken(token: string): boolean; } //#endregion //#region src/projectAPI.d.ts declare class ProjectAPI { private projectKey; private _storage; private _repositories; readonly config: Config; constructor(projectKey: string, repositories: RepositoryMap, config: Config); unsafeAdd(typeId: T, resource: ResourceMap[T]): Promise; get(typeId: RT, id: string, params?: GetParams): Promise; getRepository(typeId: RT): RepositoryMap[RT]; } //#endregion //#region src/ctMock.d.ts type CommercetoolsMockOptions = { validateCredentials: boolean; enableAuthentication: boolean; defaultProjectKey: string | undefined; apiHost: RegExp | string; authHost: RegExp | string; silent: boolean; strict: boolean; storage: AbstractStorage | undefined; logger: FastifyBaseLogger$1 | undefined; }; declare class CommercetoolsMock { app: FastifyInstance; options: CommercetoolsMockOptions; private _storage; private _oauth2; private _mswServer; private _repositories; private _projectService; constructor(options?: Partial); get server(): import("fastify").RawServerDefault; clear(): Promise; project(projectKey?: string): ProjectAPI; authStore(): OAuth2Store; runServer(port?: number): Promise; private createApp; registerHandlers(server: SetupServer): void; getHandlers(): AnyHandler[]; mswServer(): SetupServer | undefined; } //#endregion //#region src/helpers.d.ts declare const getBaseResourceProperties: (clientId?: string) => { id: string; createdAt: string; lastModifiedAt: string; version: number; createdBy: { clientId: string; isPlatformClient: boolean; }; lastModifiedBy: { clientId: string; isPlatformClient: boolean; }; }; //#endregion export { AbstractStorage, CommercetoolsMock, type CommercetoolsMockOptions, type FastifyBaseLogger, InMemoryStorage, getBaseResourceProperties }; //# sourceMappingURL=index.d.mts.map