feat: establish TypeScript-aware frontend tooling
This commit is contained in:
@@ -21,21 +21,7 @@ const noAuthSession =
|
||||
onUnauthenticated: () => {},
|
||||
});
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* kind: string,
|
||||
* code: string,
|
||||
* retryable: boolean,
|
||||
* operationId: string,
|
||||
* attemptCount: number,
|
||||
* httpStatus?: number,
|
||||
* requestId?: string,
|
||||
* traceId?: string,
|
||||
* retryAfterMs?: number,
|
||||
* userMessageKey: string,
|
||||
* action: string
|
||||
* }} HttpFailure
|
||||
*/
|
||||
/** @typedef {import("../../contracts/errors.js").ApiFailure} HttpFailure */
|
||||
|
||||
/**
|
||||
* @typedef {{ ok: true, value: unknown, meta: Record<string, string> } |
|
||||
@@ -74,6 +60,7 @@ export function createHttpClient(dependencies) {
|
||||
* signal?: AbortSignal,
|
||||
* idempotencyKey?: string
|
||||
* }} [input]
|
||||
* @returns {Promise<HttpResult>}
|
||||
*/
|
||||
async function execute(operationId, input = {}) {
|
||||
const operation = getApiOperation(operationId);
|
||||
|
||||
Reference in New Issue
Block a user