// Definition
const createFlagEndpoint = HttpApiEndpoint.post("create-flag")`/`
.setPayload(FlagPayload)
.addSuccess(Flag);
const flagsGroup = HttpApiGroup.make("flags").add(createFlagEndpoint);
export const Api = HttpApi.make("Api").add(flagsGroup);
// Implementation
const FlagsLive = HttpApiBuilder.group(Api, "flags", (h) => h.handle("create-flag", createFlag));
export const ApiLive = HttpApiBuilder.api(Api).pipe(Layer.provide(FlagsLive));
// Handlers
const createFlag: (??? something something typeof createFlagEndpoint...?) = function ({ payload, request }) { ... }
// Definition
const createFlagEndpoint = HttpApiEndpoint.post("create-flag")`/`
.setPayload(FlagPayload)
.addSuccess(Flag);
const flagsGroup = HttpApiGroup.make("flags").add(createFlagEndpoint);
export const Api = HttpApi.make("Api").add(flagsGroup);
// Implementation
const FlagsLive = HttpApiBuilder.group(Api, "flags", (h) => h.handle("create-flag", createFlag));
export const ApiLive = HttpApiBuilder.api(Api).pipe(Layer.provide(FlagsLive));
// Handlers
const createFlag: (??? something something typeof createFlagEndpoint...?) = function ({ payload, request }) { ... }