kontenhumas-fe/service/client/public-clients.ts

32 lines
687 B
TypeScript

import { getCookiesDecrypt } from "@/lib/utils";
import {
httpGetInterceptor,
} from "../http-config/http-interceptor-service";
// Types untuk Public Client
export interface PublicClient {
name: string;
slug: string;
description: string | null;
clientType: string;
logoUrl: string | null;
address: string | null;
phoneNumber: string | null;
website: string | null;
isActive: boolean;
createdAt: string;
}
export interface PublicClientsResponse {
success: boolean;
code: number;
messages: string[];
data: PublicClient[];
}
// Service function
export async function getPublicClients() {
const url = "/clients/public";
return httpGetInterceptor(url);
}