feat: 接通后台渲染异常上报与响应契约校验
This commit is contained in:
1 parent
330d67adc1
commit
adcaa12970
22 files changed
+845
-33
No files matched your search
@@ -1,5 +1,15 @@
|
||||
export { ApiClientError } from "./client/request.js";
|
||||
export type { ApiClientOptions, FetchLike, FetchResponse, RequestFn } from "./client/request.js";
|
||||
export {
|
||||
ApiClientContractError,
|
||||
ApiClientError,
|
||||
assertResponseContract,
|
||||
} from "./client/request.js";
|
||||
export type {
|
||||
ApiClientOptions,
|
||||
FetchLike,
|
||||
FetchResponse,
|
||||
RequestFn,
|
||||
RequestOptions,
|
||||
} from "./client/request.js";
|
||||
export type {
|
||||
AdminBooking,
|
||||
Booking,
|
||||
@@ -66,7 +76,11 @@ export const apiClientName = "personal-brand-api-client";
|
||||
|
||||
import { bookingMethods } from "./resources/booking.js";
|
||||
import { brandMethods } from "./resources/brand.js";
|
||||
import { request as createRequest, type ApiClientOptions } from "./client/request.js";
|
||||
import {
|
||||
request as createRequest,
|
||||
type ApiClientOptions,
|
||||
type RequestFn,
|
||||
} from "./client/request.js";
|
||||
import { inquiryMethods } from "./resources/inquiry.js";
|
||||
import { mediaMethods } from "./resources/media.js";
|
||||
import { offeringMethods } from "./resources/offering.js";
|
||||
@@ -103,10 +117,7 @@ export class ApiClient
|
||||
TrustMethods
|
||||
{
|
||||
private readonly state: ClientState;
|
||||
private readonly requestFn: <T>(
|
||||
path: string,
|
||||
options?: { method?: string; body?: unknown; rawBody?: unknown },
|
||||
) => Promise<T>;
|
||||
private readonly requestFn: RequestFn;
|
||||
private resources!: {
|
||||
booking: BookingMethods;
|
||||
brand: BrandMethods;
|
||||
@@ -172,6 +183,8 @@ export class ApiClient
|
||||
this.resources.session.logoutAdmin(...arguments_);
|
||||
logoutCustomer = (...arguments_: Parameters<SessionMethods["logoutCustomer"]>) =>
|
||||
this.resources.session.logoutCustomer(...arguments_);
|
||||
reportAdminClientError = (...arguments_: Parameters<SessionMethods["reportAdminClientError"]>) =>
|
||||
this.resources.session.reportAdminClientError(...arguments_);
|
||||
listCustomerBookings = (...arguments_: Parameters<BookingMethods["listCustomerBookings"]>) =>
|
||||
this.resources.booking.listCustomerBookings(...arguments_);
|
||||
createCustomerBooking = (...arguments_: Parameters<BookingMethods["createCustomerBooking"]>) =>
|
||||
|
||||
Reference in new issue
Block a user