feat: add form and page platform
This commit is contained in:
@@ -14,6 +14,7 @@ type HttpExecutor = Readonly<{
|
||||
request: Readonly<{
|
||||
operationId: string;
|
||||
routeId: string;
|
||||
pathParams?: Record<string, string | number>;
|
||||
searchParams?: unknown;
|
||||
body?: unknown;
|
||||
signal?: AbortSignal;
|
||||
@@ -42,7 +43,7 @@ export function createReferenceHttpGateway(
|
||||
}
|
||||
: result;
|
||||
},
|
||||
async create(command: Readonly<{ name: string }>) {
|
||||
async create(command: Readonly<{ name: string; note?: string }>) {
|
||||
const result = await http.execute({
|
||||
operationId: "CREATE_REFERENCE_RESOURCE",
|
||||
routeId: "REFERENCE_RESOURCE_LIST",
|
||||
@@ -52,5 +53,19 @@ export function createReferenceHttpGateway(
|
||||
? { ok: true as const, value: result.value as ReferenceResource }
|
||||
: result;
|
||||
},
|
||||
async get(
|
||||
resourceId: string,
|
||||
context?: Readonly<{ signal?: AbortSignal }>,
|
||||
) {
|
||||
const result = await http.execute({
|
||||
operationId: "GET_REFERENCE_RESOURCE",
|
||||
routeId: "REFERENCE_RESOURCE_DETAIL",
|
||||
pathParams: { resourceId },
|
||||
signal: context?.signal,
|
||||
});
|
||||
return result.ok
|
||||
? { ok: true as const, value: result.value as ReferenceResource }
|
||||
: result;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user