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