Rocky_Mountain_Vending/.pnpm-store/v10/files/da/43c729bb771e08187b5a60162da7be9e4ad8c4ad0f7f0f5a95314e32161af18c8247663226d27afec078eb03bd6d37ae4d35aa3a51f38cf5292d652e56ca64
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

41 lines
1.4 KiB
Text

import type { HttpRequest, HttpResponse } from "../http";
import type { Identity } from "../identity/identity";
/**
* @internal
*/
export interface ErrorHandler {
(signingProperties: Record<string, unknown>): <E extends Error>(error: E) => never;
}
/**
* @internal
*/
export interface SuccessHandler {
(httpResponse: HttpResponse | unknown, signingProperties: Record<string, unknown>): void;
}
/**
* Interface to sign identity and signing properties.
* @internal
*/
export interface HttpSigner {
/**
* Signs an HttpRequest with an identity and signing properties.
* @param httpRequest request to sign
* @param identity identity to sing the request with
* @param signingProperties property bag for signing
* @returns signed request in a promise
*/
sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record<string, unknown>): Promise<HttpRequest>;
/**
* Handler that executes after the {@link HttpSigner.sign} invocation and corresponding
* middleware throws an error.
* The error handler is expected to throw the error it receives, so the return type of the error handler is `never`.
* @internal
*/
errorHandler?: ErrorHandler;
/**
* Handler that executes after the {@link HttpSigner.sign} invocation and corresponding
* middleware succeeds.
* @internal
*/
successHandler?: SuccessHandler;
}