"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AccountService_1 = require("./AccountService");
const CodeDeckService_1 = require("./CodeDeckService");
const NumberPoolService_1 = require("./NumberPoolService");
const OrganisationService_1 = require("./OrganisationService");
const ProductTableService_1 = require("./ProductTableService");
const RatingTableService_1 = require("./RatingTableService");
const TicketService_1 = require("./TicketService");
const UserService_1 = require("./UserService");
const RoleService_1 = require("./RoleService");
const PermissionService_1 = require("./PermissionService");
const AnalyticsService_1 = require("./AnalyticsService");
const __1 = require("..");
const XeroService_1 = require("./XeroService");
const PhoneUserService_1 = require("./PhoneUserService");
class CallableAPI {
    constructor(baseURL, token) {
        this.baseURL = baseURL;
        this.refreshToken(token);
    }
    refreshToken(token) {
        this.token = token;
        this.account = new AccountService_1.default(this.baseURL, this.token);
        this.organisation = new OrganisationService_1.default(this.baseURL, this.token);
        this.ratingTable = new RatingTableService_1.default(this.baseURL, this.token);
        this.productTable = new ProductTableService_1.default(this.baseURL, this.token);
        this.codeDeck = new CodeDeckService_1.default(this.baseURL, this.token);
        this.user = new UserService_1.default(this.baseURL, this.token);
        this.userPhone = new PhoneUserService_1.default(this.baseURL, this.token);
        this.pool = new NumberPoolService_1.default(this.baseURL, this.token);
        this.ticket = new TicketService_1.default(this.baseURL, this.token);
        this.role = new RoleService_1.default(this.baseURL, this.token);
        this.permission = new PermissionService_1.default(this.baseURL, this.token);
        this.analytics = new AnalyticsService_1.default(this.baseURL, this.token);
        this.region = new __1.VoiceRegionService(this.baseURL, this.token);
        this.xero = new XeroService_1.default(this.baseURL, this.token);
    }
}
exports.default = CallableAPI;
