@ahoo-wang/fetcher-wow
Version:
Support for Wow(https://github.com/Ahoo-Wang/Wow) in Fetcher
39 lines • 1.37 kB
TypeScript
import { RequestHeaders, UrlParams } from '@ahoo-wang/fetcher';
import { UrlPathParams } from '../types/endpoints';
import { ParameterRequest } from '@ahoo-wang/fetcher-decorator';
/**
* Command Request Headers Interface
*
* Defines the HTTP header fields used in command processing within the Wow framework.
* This interface extends RequestHeaders to provide type-safe access to all command-related headers.
*
* @example
* ```typescript
* // Using CommandRequestHeaders in a request
* const headers: CommandRequestHeaders = {
* [CommandHeaders.TENANT_ID]: 'tenant-123',
* [CommandHeaders.AGGREGATE_ID]: 'aggregate-456',
* [CommandHeaders.REQUEST_ID]: 'request-789'
* };
* ```
*/
export interface CommandRequestHeaders extends RequestHeaders {
}
export interface CommandUrlParams extends Omit<UrlParams, 'path' | 'query'> {
path?: UrlPathParams;
}
/**
* Command Request Interface
*
* Extends RequestHeaders to provide type-safe access to command-related HTTP headers.
* This interface includes only the essential command headers commonly used in HTTP requests.
*/
export interface CommandRequest<C extends object = object> extends ParameterRequest {
urlParams?: CommandUrlParams;
headers?: CommandRequestHeaders;
/**
* The body of the command request.
*/
body?: C;
}
//# sourceMappingURL=commandRequest.d.ts.map