1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var Unibase;
- (function (Unibase) {
- let Platform;
- (function (Platform) {
- let Crypto;
- (function (Crypto) {
- let Managers;
- (function (Managers) {
- class CryptoManger extends Platform.Core.BaseManager {
- static Instance() {
- if (this._instance === undefined)
- this._instance = new CryptoManger();
- return this._instance;
- }
- cryptography(token, uniqueid, secretcode, isencrypt) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/crypto/platform/cryptography/token/' + token + '/uniqueid/' + uniqueid + '/secretcode/' + secretcode + '/isencrypt/' + isencrypt;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- return response;
- });
- });
- }
- crypto(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/crypto/platform/crypto';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshcryptoproviders() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/crypto/platform/refreshcryptoproviders/np';
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return JSON.parse(response.result);
- });
- });
- }
- }
- Managers.CryptoManger = CryptoManger;
- })(Managers = Crypto.Managers || (Crypto.Managers = {}));
- })(Crypto = Platform.Crypto || (Platform.Crypto = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|