bruce-models 7.1.128 → 7.1.129
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 +52 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +46 -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-access-log.js +64 -0
- package/dist/lib/user/user-access-log.js.map +1 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/user/user-access-log.d.ts +39 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -24081,6 +24081,51 @@
|
|
|
24081
24081
|
User.GetSettingsCacheKey = GetSettingsCacheKey;
|
|
24082
24082
|
})(exports.User || (exports.User = {}));
|
|
24083
24083
|
|
|
24084
|
+
(function (UserAccessLog) {
|
|
24085
|
+
/**
|
|
24086
|
+
* Returns access log records, newest first, or each user's newest one when grouped by user.
|
|
24087
|
+
*/
|
|
24088
|
+
function GetList(params) {
|
|
24089
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24090
|
+
let { api, accountId, userIds, groupByUser, isLogin, success, pageSize, pageIndex, req } = params;
|
|
24091
|
+
if (groupByUser && !(userIds === null || userIds === void 0 ? void 0 : userIds.length)) {
|
|
24092
|
+
throw ("User IDs are required to group by user.");
|
|
24093
|
+
}
|
|
24094
|
+
if (!api) {
|
|
24095
|
+
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
24096
|
+
}
|
|
24097
|
+
const urlParams = new URLSearchParams();
|
|
24098
|
+
if (userIds === null || userIds === void 0 ? void 0 : userIds.length) {
|
|
24099
|
+
urlParams.append("User", userIds.join(","));
|
|
24100
|
+
}
|
|
24101
|
+
if (groupByUser) {
|
|
24102
|
+
urlParams.append("GroupBy", "User");
|
|
24103
|
+
}
|
|
24104
|
+
if (isLogin !== undefined && isLogin !== null) {
|
|
24105
|
+
urlParams.append("IsLogin", String(isLogin));
|
|
24106
|
+
}
|
|
24107
|
+
if (success !== undefined && success !== null) {
|
|
24108
|
+
urlParams.append("Success", success ? "true" : "false");
|
|
24109
|
+
}
|
|
24110
|
+
if (pageSize !== undefined && pageSize !== null) {
|
|
24111
|
+
urlParams.append("PageSize", String(pageSize));
|
|
24112
|
+
}
|
|
24113
|
+
if (pageIndex !== undefined && pageIndex !== null) {
|
|
24114
|
+
urlParams.append("PageIndex", String(pageIndex));
|
|
24115
|
+
}
|
|
24116
|
+
let url = accountId ? `v3/account/${accountId}/accessLogs` : "v3/accessLogs";
|
|
24117
|
+
if (urlParams.toString().length) {
|
|
24118
|
+
url += "?" + urlParams.toString();
|
|
24119
|
+
}
|
|
24120
|
+
const res = yield api.GET(url, exports.Api.PrepReqParams(req));
|
|
24121
|
+
return {
|
|
24122
|
+
records: (res === null || res === void 0 ? void 0 : res.Items) || []
|
|
24123
|
+
};
|
|
24124
|
+
});
|
|
24125
|
+
}
|
|
24126
|
+
UserAccessLog.GetList = GetList;
|
|
24127
|
+
})(exports.UserAccessLog || (exports.UserAccessLog = {}));
|
|
24128
|
+
|
|
24084
24129
|
(function (UserGroup) {
|
|
24085
24130
|
/**
|
|
24086
24131
|
* Returns a user group by its ID.
|
|
@@ -25506,7 +25551,7 @@
|
|
|
25506
25551
|
}
|
|
25507
25552
|
|
|
25508
25553
|
// This is updated with the package.json version on build.
|
|
25509
|
-
const VERSION = "7.1.
|
|
25554
|
+
const VERSION = "7.1.129";
|
|
25510
25555
|
|
|
25511
25556
|
exports.VERSION = VERSION;
|
|
25512
25557
|
exports.AbstractApi = AbstractApi;
|