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";
const /** @type {?} */ USERS_LIST_ENDPOINT = WAGlobals.API_ENDPOINT_PRFIX + "/platform/domains/{0}/users";
export class User {
constructor() {
}
}
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;
}
export class UsersService {
/**
* @param {?} motifConnector
*/
constructor(motifConnector) {
this.motifConnector = motifConnector;
console.log("MotifConnectorService=", motifConnector);
}
/**
* @param {?} domain
* @return {?}
*/
getUsersList(domain) {
return new Promise((resolve, reject) => {
let /** @type {?} */ endpoint = String.Format(USERS_LIST_ENDPOINT, domain);
this.motifConnector.get(endpoint).subscribe((data) => {
console.log("Get Users List done: ", data);
resolve(data);
}, reject);
});
}
}
UsersService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] },
];
/** @nocollapse */
UsersService.ctorParameters = () => [
{ type: MotifConnectorService }
];
/** @nocollapse */ UsersService.ngInjectableDef = i0.defineInjectable({ factory: function UsersService_Factory() { return new UsersService(i0.inject(i1.MotifConnectorService)); }, token: UsersService, providedIn: "root" });
function UsersService_tsickle_Closure_declarations() {
/** @type {?} */
UsersService.prototype.motifConnector;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXNlcnNTZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vd2EtbW90aWY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