@bit-ui-libs/common
Version:
This library was generated with [Nx](https://nx.dev).
22 lines (18 loc) • 765 B
text/typescript
import { BaseService } from '../api/services/base-service';
import {
AddLocationRequest,
ListLocationsRequest,
LocationResponse,
Location
} from './interfaces';
export class OrganizationLocationService extends BaseService {
async getLocationList(params: ListLocationsRequest) {
return this.get<LocationResponse[]>(`${this.apiUrl}/common-admin/v1/organization-locations/list`, params);
}
async addLocation(orgId: string, req: AddLocationRequest) {
return this.post<LocationResponse, AddLocationRequest>(`${this.apiUrl}/common-admin/v1/organization-locations/${orgId}`, req);
}
async getLocation(params: {id: string, appName?: string }) {
return this.get<Location>(`/common-admin/v1/organization-locations/`+params.id, params);
}
}