export class BillingProgressApiGroup extends HttpApiGroup.make(
"billingProgress",
)
.add(
HttpApiEndpoint.post("updateConfig", "/config").setPayload(
BillingProgressConfig,
),
)
.middleware(AdminMiddleware)
.add(HttpApiEndpoint.get("get", "/").addSuccess(BillingProgressGroups))
.add(
HttpApiEndpoint.get("getConfig", "/config").addSuccess(
BillingProgressConfig,
),
)
.add(
HttpApiEndpoint.get("getConfigOptions", "/config-options").addSuccess(
BillingProgressConfigOptions,
),
)
.add(
HttpApiEndpoint.get("checkForUpdates", "/check-for-updates").addSuccess(
Schema.Date,
),
)
.middlewareEndpoints(Authentication)
.add(
HttpApiEndpoint.post("updateBuilding", "/update-building/:id").setPath(
Schema.Struct({
id: Id,
}),
),
)
.prefix("/billing-progress") {}
export class BillingProgressApiGroup extends HttpApiGroup.make(
"billingProgress",
)
.add(
HttpApiEndpoint.post("updateConfig", "/config").setPayload(
BillingProgressConfig,
),
)
.middleware(AdminMiddleware)
.add(HttpApiEndpoint.get("get", "/").addSuccess(BillingProgressGroups))
.add(
HttpApiEndpoint.get("getConfig", "/config").addSuccess(
BillingProgressConfig,
),
)
.add(
HttpApiEndpoint.get("getConfigOptions", "/config-options").addSuccess(
BillingProgressConfigOptions,
),
)
.add(
HttpApiEndpoint.get("checkForUpdates", "/check-for-updates").addSuccess(
Schema.Date,
),
)
.middlewareEndpoints(Authentication)
.add(
HttpApiEndpoint.post("updateBuilding", "/update-building/:id").setPath(
Schema.Struct({
id: Id,
}),
),
)
.prefix("/billing-progress") {}