import z from "zod"; import { ServiceClient } from "../../service-client"; import { TTenant, TTenantUser } from "./types"; import { CreateTenantSchema, CreateTenantUserSchema, GetTenantByIdSchema, ListTenantUsersSchema, ListUserTenantsSchema } from "./schema"; export class TenantService extends ServiceClient { protected getServiceName(): string { return 'com.appconda.service.tenant'; } public async AdminGetAllTenantsIdsAndNames(): Promise { return await this.actionCall('AdminGetAllTenantsIdsAndNames', {}); } public async CreateTenant(payload: z.infer): Promise { return await this.actionCall('CreateTenant', payload); } public async CreateTenantUser(payload: z.infer): Promise { return await this.actionCall('CreateTenantUser', payload); } public async GetTenantById(payload: z.infer): Promise { return await this.actionCall('GetTenantById', payload); } public async ListTenants(): Promise { return await this.actionCall('ListTenants', {}); } public async ListTenantUsers(payload: z.infer): Promise { return await this.actionCall('ListTenantUsers', payload); } public async ListUserTenants(payload: z.infer): Promise { return await this.actionCall('ListUserTenants', payload); } }