UNPKG

@awhere/api

Version:

The awesome aWhere API for JavaScript.

80 lines 3.02 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var identityManager_1 = __importDefault(require("../identity/identityManager")); var IdentityMixin = /** @class */ (function () { function IdentityMixin() { } Object.defineProperty(IdentityMixin, "credential", { // public static fromId(endpoint: string): Promise<IFindOneResult> { // return this.request.get(endpoint).then(res => res.data); // } // public static find(endpoint?: string, findOptions?: IFindOptions): Promise<IFindResult> { // return this.request.post(endpoint!, findOptions).then(res => res.data); // } // public static insert(endpoint?: string, data?: any): Promise<ICUDOneResult> { // return this.request.put(endpoint!, data).then(res => res.data); // } // public static update(endpoint?: string, data?: any): Promise<ICUDOneResult> { // return this.request.put(endpoint!, data).then(res => res.data); // } // public static delete(endpoint?: string): Promise<ICUDOneResult> { // return this.request.delete(endpoint!).then(res => res.data); // } // public static restore(endpoint?: string): Promise<ICUDOneResult> { // return this.request.put(endpoint!).then(res => res.data); // } get: function () { return identityManager_1.default.defaultCredential; }, enumerable: false, configurable: true }); Object.defineProperty(IdentityMixin, "request", { get: function () { return this.credential.request; }, enumerable: false, configurable: true }); Object.defineProperty(IdentityMixin, "socket", { get: function () { return this.credential.socket; }, enumerable: false, configurable: true }); Object.defineProperty(IdentityMixin.prototype, "request", { get: function () { return this.credential.request; }, enumerable: false, configurable: true }); Object.defineProperty(IdentityMixin.prototype, "socket", { get: function () { return this.credential.socket; }, enumerable: false, configurable: true }); Object.defineProperty(IdentityMixin.prototype, "credential", { get: function () { return identityManager_1.default.defaultCredential; }, enumerable: false, configurable: true }); Object.defineProperty(IdentityMixin.prototype, "baseUrl", { get: function () { return this.request.defaults.baseURL; }, enumerable: false, configurable: true }); return IdentityMixin; }()); exports.default = IdentityMixin; //# sourceMappingURL=IdentityMixin.js.map