import { gracely } from "gracely" import { http } from "cloudly-http" import { Rule } from "../../Rule" export class Rules { constructor(private readonly client: http.Client) {} async create(organization: string, rule: Rule): Promise { return this.client.post(`/organization/rule`, rule, { organization, }) } async replace(organization: string, rule: Rule): Promise { return this.client.put(`/organization/rule/${rule.code}`, rule, { organization, }) } async remove(organization: string, code: string): Promise { return this.client.delete(`/organization/rule/${code}`, { organization, }) } }