bruce-models 6.5.7 → 6.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bruce-models.es5.js +122 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +120 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/user/user-mfa-method.js +133 -0
- package/dist/lib/user/user-mfa-method.js.map +1 -0
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/user/user-mfa-method.d.ts +74 -0
- package/dist/types/user/user.d.ts +2 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -13493,6 +13493,125 @@
|
|
|
13493
13493
|
UserGroup.RemoveUser = RemoveUser;
|
|
13494
13494
|
})(exports.UserGroup || (exports.UserGroup = {}));
|
|
13495
13495
|
|
|
13496
|
+
(function (UserMfaMethod) {
|
|
13497
|
+
/**
|
|
13498
|
+
* Returns an MFA Method record by its ID.
|
|
13499
|
+
* The api's session must be related to the record.
|
|
13500
|
+
* @param params
|
|
13501
|
+
* @returns
|
|
13502
|
+
*/
|
|
13503
|
+
function Get(params) {
|
|
13504
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13505
|
+
let { methodId, api } = params;
|
|
13506
|
+
if (!methodId) {
|
|
13507
|
+
throw new Error("methodId is required");
|
|
13508
|
+
}
|
|
13509
|
+
if (!api) {
|
|
13510
|
+
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
13511
|
+
}
|
|
13512
|
+
const method = yield api.GET("v3/mfaMethod/" + methodId);
|
|
13513
|
+
return {
|
|
13514
|
+
method: method
|
|
13515
|
+
};
|
|
13516
|
+
});
|
|
13517
|
+
}
|
|
13518
|
+
UserMfaMethod.Get = Get;
|
|
13519
|
+
/**
|
|
13520
|
+
* Returns a list of MFA Methods for the current session.
|
|
13521
|
+
* @param params
|
|
13522
|
+
* @returns
|
|
13523
|
+
*/
|
|
13524
|
+
function GetList(params) {
|
|
13525
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13526
|
+
if (!params) {
|
|
13527
|
+
params = {};
|
|
13528
|
+
}
|
|
13529
|
+
let { api } = params;
|
|
13530
|
+
if (!api) {
|
|
13531
|
+
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
13532
|
+
}
|
|
13533
|
+
const { Items } = yield api.GET("v3/mfaMethods");
|
|
13534
|
+
return {
|
|
13535
|
+
methods: Items
|
|
13536
|
+
};
|
|
13537
|
+
});
|
|
13538
|
+
}
|
|
13539
|
+
UserMfaMethod.GetList = GetList;
|
|
13540
|
+
/**
|
|
13541
|
+
* Deletes an MFA Method record by its ID.
|
|
13542
|
+
* The api's session must be related to the record.
|
|
13543
|
+
* @param params
|
|
13544
|
+
*/
|
|
13545
|
+
function Delete(params) {
|
|
13546
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13547
|
+
let { methodId, api } = params;
|
|
13548
|
+
if (!methodId) {
|
|
13549
|
+
throw new Error("methodId is required");
|
|
13550
|
+
}
|
|
13551
|
+
if (!api) {
|
|
13552
|
+
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
13553
|
+
}
|
|
13554
|
+
yield api.DELETE("v3/mfaMethod/" + methodId);
|
|
13555
|
+
});
|
|
13556
|
+
}
|
|
13557
|
+
UserMfaMethod.Delete = Delete;
|
|
13558
|
+
/**
|
|
13559
|
+
* Creates or updates an MFA Method record.
|
|
13560
|
+
* If the method has an ID, it will be updated, otherwise a new record will be created.
|
|
13561
|
+
* The api's session must be related to the record if updating.
|
|
13562
|
+
* @param params
|
|
13563
|
+
* @returns
|
|
13564
|
+
*/
|
|
13565
|
+
function Update(params) {
|
|
13566
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13567
|
+
let { method, api } = params;
|
|
13568
|
+
if (!method) {
|
|
13569
|
+
throw new Error("method is required");
|
|
13570
|
+
}
|
|
13571
|
+
if (!api) {
|
|
13572
|
+
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
13573
|
+
}
|
|
13574
|
+
let url = "v3/mfaMethod/";
|
|
13575
|
+
if (method.ID) {
|
|
13576
|
+
url += method.ID;
|
|
13577
|
+
}
|
|
13578
|
+
const updated = yield api.POST(url, method);
|
|
13579
|
+
return {
|
|
13580
|
+
method: updated
|
|
13581
|
+
};
|
|
13582
|
+
});
|
|
13583
|
+
}
|
|
13584
|
+
UserMfaMethod.Update = Update;
|
|
13585
|
+
/**
|
|
13586
|
+
* Verifies an MFA Method record by its ID.
|
|
13587
|
+
* The api's session must be related to the record.
|
|
13588
|
+
* @param params
|
|
13589
|
+
* @returns
|
|
13590
|
+
*/
|
|
13591
|
+
function Verify(params) {
|
|
13592
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13593
|
+
let { methodId, code, api } = params;
|
|
13594
|
+
if (!methodId) {
|
|
13595
|
+
throw new Error("methodId is required");
|
|
13596
|
+
}
|
|
13597
|
+
else if (!code) {
|
|
13598
|
+
throw new Error("code is required");
|
|
13599
|
+
}
|
|
13600
|
+
if (!api) {
|
|
13601
|
+
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
13602
|
+
}
|
|
13603
|
+
const body = {
|
|
13604
|
+
Code: code
|
|
13605
|
+
};
|
|
13606
|
+
const updated = yield api.POST("v3/mfaMethod/" + methodId + "/verify", body);
|
|
13607
|
+
return {
|
|
13608
|
+
method: updated
|
|
13609
|
+
};
|
|
13610
|
+
});
|
|
13611
|
+
}
|
|
13612
|
+
UserMfaMethod.Verify = Verify;
|
|
13613
|
+
})(exports.UserMfaMethod || (exports.UserMfaMethod = {}));
|
|
13614
|
+
|
|
13496
13615
|
(function (AccountInvite) {
|
|
13497
13616
|
/**
|
|
13498
13617
|
* Possible invite statuses.
|
|
@@ -15930,7 +16049,7 @@
|
|
|
15930
16049
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
15931
16050
|
|
|
15932
16051
|
// This is updated with the package.json version on build.
|
|
15933
|
-
const VERSION = "6.5.
|
|
16052
|
+
const VERSION = "6.5.8";
|
|
15934
16053
|
|
|
15935
16054
|
exports.VERSION = VERSION;
|
|
15936
16055
|
exports.AbstractApi = AbstractApi;
|