Repository URL to install this package:
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { Injectable } from '@angular/core';
import { MotifConnectorService } from 'web-console-core';
import { WAGlobals } from '../../WAGlobals';
import { String } from 'typescript-string-operations';
import * as i0 from "@angular/core";
import * as i1 from "web-console-core";
var /** @type {?} */ USERS_LIST_ENDPOINT = WAGlobals.API_ENDPOINT_PRFIX + "/platform/domains/{0}/users";
var User = /** @class */ (function () {
function User() {
}
return User;
}());
export { User };
function User_tsickle_Closure_declarations() {
/** @type {?} */
User.prototype.created;
/** @type {?} */
User.prototype.domain;
/** @type {?} */
User.prototype.email;
/** @type {?} */
User.prototype.lastLogin;
/** @type {?} */
User.prototype.locale;
/** @type {?} */
User.prototype.msisdn;
/** @type {?} */
User.prototype.prevState;
/** @type {?} */
User.prototype.serial;
/** @type {?} */
User.prototype.state;
/** @type {?} */
User.prototype.userId;
/** @type {?} */
User.prototype.userIdInt;
}
var UsersService = /** @class */ (function () {
function UsersService(motifConnector) {
this.motifConnector = motifConnector;
console.log("MotifConnectorService=", motifConnector);
}
/**
* @param {?} domain
* @return {?}
*/
UsersService.prototype.getUsersList = /**
* @param {?} domain
* @return {?}
*/
function (domain) {
var _this = this;
return new Promise(function (resolve, reject) {
var /** @type {?} */ endpoint = String.Format(USERS_LIST_ENDPOINT, domain);
_this.motifConnector.get(endpoint).subscribe(function (data) {
console.log("Get Users List done: ", data);
resolve(data);
}, reject);
});
};
UsersService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] },
];
/** @nocollapse */
UsersService.ctorParameters = function () { return [
{ type: MotifConnectorService }
]; };
/** @nocollapse */ UsersService.ngInjectableDef = i0.defineInjectable({ factory: function UsersService_Factory() { return new UsersService(i0.inject(i1.MotifConnectorService)); }, token: UsersService, providedIn: "root" });
return UsersService;
}());
export { UsersService };
function UsersService_tsickle_Closure_declarations() {
/** @type {?} */
UsersService.prototype.motifConnector;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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