28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
/* ----- Vix Auto Generated Routes ----- */
|
|
import { CAuthContract, CProjectContract } from "@vix/ContractTypes";
|
|
import { apiRequest } from "@dunemask/vix/bridge";
|
|
import { authenticatedApiRequest } from "./requests";
|
|
|
|
export const getProjectAuthVerify = (project: string) =>
|
|
authenticatedApiRequest({ subpath: `/${project}/auth/verify`, method: "GET", jsonify: true });
|
|
|
|
export const postProjectAuthLogin = (project: string, login: CAuthContract["Login"]) =>
|
|
apiRequest<CAuthContract["LoginCredentials"]>({
|
|
subpath: `/${project}/auth/login`,
|
|
method: "POST",
|
|
json: login,
|
|
jsonify: true,
|
|
});
|
|
|
|
export const getProjectAuthCredentials = (project: string) =>
|
|
authenticatedApiRequest<CAuthContract["Credentials"]>({
|
|
subpath: `/${project}/auth/credentials`,
|
|
method: "GET",
|
|
jsonify: true,
|
|
});
|
|
|
|
export const postProjectCreate = (project: string, create: CProjectContract["Create"]) =>
|
|
authenticatedApiRequest({ subpath: `/${project}/create`, method: "POST", json: create, jsonify: true });
|
|
|
|
export const getProjectList = (project: string) =>
|
|
authenticatedApiRequest<CProjectContract["ListProjects"]>({ subpath: `/${project}/list`, method: "GET", jsonify: true });
|