@tomei/sso 0.30.0 → 0.31.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/components/group/group.d.ts +9 -1
- package/dist/src/components/group/group.js +113 -0
- package/dist/src/components/group/group.js.map +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/system-privilege/index.d.ts +3 -0
- package/dist/src/components/system-privilege/index.js +8 -0
- package/dist/src/components/system-privilege/index.js.map +1 -0
- package/dist/src/components/system-privilege/system-privilege.js +10 -1
- package/dist/src/components/system-privilege/system-privilege.js.map +1 -1
- package/dist/src/interfaces/group-search-attr.interface.d.ts +7 -0
- package/dist/src/interfaces/group-search-attr.interface.js +3 -0
- package/dist/src/interfaces/group-search-attr.interface.js.map +1 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/interfaces/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/group/group.ts +204 -2
- package/src/components/index.ts +1 -0
- package/src/components/system-privilege/index.ts +4 -0
- package/src/components/system-privilege/system-privilege.ts +13 -1
- package/src/interfaces/group-search-attr.interface.ts +8 -0
- package/src/interfaces/index.ts +1 -0
@@ -1,11 +1,12 @@
|
|
1
1
|
import { ObjectBase } from '@tomei/general';
|
2
2
|
import { GroupTypeEnum } from 'enum';
|
3
|
+
import { LoginUser } from '../login-user/login-user';
|
4
|
+
import { IGroupSearchAttr } from '../../interfaces/group-search-attr.interface';
|
3
5
|
export declare class Group extends ObjectBase {
|
4
6
|
ObjectId: string;
|
5
7
|
ObjectName: string;
|
6
8
|
TableName: 'sso_Group';
|
7
9
|
ObjectType: string;
|
8
|
-
GroupCode: string;
|
9
10
|
Name: string;
|
10
11
|
Description: string;
|
11
12
|
Type: GroupTypeEnum;
|
@@ -18,10 +19,17 @@ export declare class Group extends ObjectBase {
|
|
18
19
|
private _UpdatedById;
|
19
20
|
private _UpdatedAt;
|
20
21
|
private static _Repo;
|
22
|
+
get GroupCode(): string;
|
23
|
+
set GroupCode(value: string);
|
21
24
|
get CreatedById(): number;
|
22
25
|
get CreatedAt(): Date;
|
23
26
|
get UpdatedById(): number;
|
24
27
|
get UpdatedAt(): Date;
|
25
28
|
private constructor();
|
26
29
|
static init(dbTransaction: any, GroupCode?: string): Promise<Group>;
|
30
|
+
static findAll(page: number, row: number, dbTransaction: any, loginUser: LoginUser, search?: IGroupSearchAttr): Promise<{
|
31
|
+
count: number;
|
32
|
+
rows: import("../../models/group.entity").default[];
|
33
|
+
}>;
|
34
|
+
static create(loginUser: LoginUser, dbTransaction: any, group: Group): Promise<Group>;
|
27
35
|
}
|
@@ -12,7 +12,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Group = void 0;
|
13
13
|
const general_1 = require("@tomei/general");
|
14
14
|
const group_repository_1 = require("./group.repository");
|
15
|
+
const config_1 = require("@tomei/config");
|
16
|
+
const sequelize_1 = require("sequelize");
|
17
|
+
const activity_history_1 = require("@tomei/activity-history");
|
15
18
|
class Group extends general_1.ObjectBase {
|
19
|
+
get GroupCode() {
|
20
|
+
return this.ObjectId;
|
21
|
+
}
|
22
|
+
set GroupCode(value) {
|
23
|
+
this.ObjectId = value;
|
24
|
+
}
|
16
25
|
get CreatedById() {
|
17
26
|
return this._CreatedById;
|
18
27
|
}
|
@@ -64,6 +73,110 @@ class Group extends general_1.ObjectBase {
|
|
64
73
|
}
|
65
74
|
});
|
66
75
|
}
|
76
|
+
static findAll(page, row, dbTransaction, loginUser, search) {
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
78
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
79
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'GROUP_LIST');
|
80
|
+
if (!isPrivileged) {
|
81
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg04', 'User is not privileged to list group');
|
82
|
+
}
|
83
|
+
const queryObj = {};
|
84
|
+
let options = {
|
85
|
+
transaction: dbTransaction,
|
86
|
+
};
|
87
|
+
if (page && row) {
|
88
|
+
options = Object.assign(Object.assign({}, options), { limit: row, offset: row * (page - 1), order: [['CreatedAt', 'DESC']] });
|
89
|
+
}
|
90
|
+
if (search) {
|
91
|
+
Object.entries(search).forEach(([key, value]) => {
|
92
|
+
queryObj[key] = {
|
93
|
+
[sequelize_1.Op.substring]: value,
|
94
|
+
};
|
95
|
+
});
|
96
|
+
options = Object.assign(Object.assign({}, options), { where: queryObj });
|
97
|
+
return yield Group._Repo.findAllWithPagination(options);
|
98
|
+
}
|
99
|
+
});
|
100
|
+
}
|
101
|
+
static create(loginUser, dbTransaction, group) {
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
103
|
+
try {
|
104
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
105
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'GROUP_CREATE');
|
106
|
+
if (!isPrivileged) {
|
107
|
+
throw new Error('You do not have permission to create group');
|
108
|
+
}
|
109
|
+
if (!group.GroupCode) {
|
110
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg02', 'Group Code is required');
|
111
|
+
}
|
112
|
+
if (!group.Name) {
|
113
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg02', 'Group Name is required');
|
114
|
+
}
|
115
|
+
if (!group.Type) {
|
116
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg02', 'Group Type is required');
|
117
|
+
}
|
118
|
+
const existingGroupCode = yield Group._Repo.findByPk(group.GroupCode, {
|
119
|
+
transaction: dbTransaction,
|
120
|
+
});
|
121
|
+
if (existingGroupCode) {
|
122
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg03', 'Duplicate GroupCode found.');
|
123
|
+
}
|
124
|
+
if (group.ParentGroupCode) {
|
125
|
+
const parentGroup = yield Group._Repo.findByPk(group.ParentGroupCode, {
|
126
|
+
transaction: dbTransaction,
|
127
|
+
});
|
128
|
+
if (!parentGroup) {
|
129
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg04', 'ParentGroupCode is not found.');
|
130
|
+
}
|
131
|
+
if (group.GroupCode === group.ParentGroupCode) {
|
132
|
+
throw new general_1.ClassError('Group', 'GroupErrMsg05', 'GroupCode and ParentGroupCode cannot be the same.');
|
133
|
+
}
|
134
|
+
}
|
135
|
+
const newGroup = new Group(group);
|
136
|
+
newGroup.ObjectId = group.GroupCode;
|
137
|
+
newGroup.Name = group.Name;
|
138
|
+
newGroup.Type = group.Type;
|
139
|
+
newGroup.Description = group.Description;
|
140
|
+
newGroup.ParentGroupCode = group.ParentGroupCode;
|
141
|
+
newGroup.InheritParentPrivilegeYN = group.InheritParentPrivilegeYN;
|
142
|
+
newGroup.InheritParentSystemAccessYN = group.InheritParentSystemAccessYN;
|
143
|
+
newGroup.Status = 'Active';
|
144
|
+
newGroup._CreatedById = loginUser.UserId;
|
145
|
+
newGroup._UpdatedById = loginUser.UserId;
|
146
|
+
const entityGroupAfter = {
|
147
|
+
GroupCode: newGroup.ObjectId,
|
148
|
+
Name: newGroup.Name,
|
149
|
+
Type: newGroup.Type,
|
150
|
+
Description: newGroup.Description,
|
151
|
+
ParentGroupCode: newGroup.ParentGroupCode,
|
152
|
+
InheritParentPrivilegeYN: newGroup.InheritParentPrivilegeYN,
|
153
|
+
InheritParentSystemAccessYN: newGroup.InheritParentSystemAccessYN,
|
154
|
+
Status: newGroup.Status,
|
155
|
+
CreatedById: newGroup._CreatedById,
|
156
|
+
UpdatedById: newGroup._UpdatedById,
|
157
|
+
CreatedAt: newGroup._CreatedAt,
|
158
|
+
UpdatedAt: newGroup._UpdatedAt,
|
159
|
+
};
|
160
|
+
yield Group._Repo.create(entityGroupAfter, {
|
161
|
+
transaction: dbTransaction,
|
162
|
+
});
|
163
|
+
const entityValueBefore = {};
|
164
|
+
const activity = new activity_history_1.Activity();
|
165
|
+
activity.ActivityId = activity.createId();
|
166
|
+
activity.Action = activity_history_1.ActionEnum.ADD;
|
167
|
+
activity.Description = 'Create Group';
|
168
|
+
activity.EntityType = 'Group';
|
169
|
+
activity.EntityId = newGroup.ObjectId;
|
170
|
+
activity.EntityValueBefore = JSON.stringify(entityValueBefore);
|
171
|
+
activity.EntityValueAfter = JSON.stringify(entityGroupAfter);
|
172
|
+
yield activity.create(loginUser.ObjectId, dbTransaction);
|
173
|
+
return newGroup;
|
174
|
+
}
|
175
|
+
catch (error) {
|
176
|
+
throw error;
|
177
|
+
}
|
178
|
+
});
|
179
|
+
}
|
67
180
|
}
|
68
181
|
exports.Group = Group;
|
69
182
|
Group._Repo = new group_repository_1.GroupRepository();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../../src/components/group/group.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../../src/components/group/group.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,yDAAqD;AAKrD,0CAAkD;AAClD,yCAA+B;AAC/B,8DAA+D;AAE/D,MAAa,KAAM,SAAQ,oBAAU;IAmBnC,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,SAAS,CAAC,KAAa;QACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,YAAoB,SAAsB;QACxC,KAAK,EAAE,CAAC;QAxCV,eAAU,GAAG,OAAO,CAAC;QAyCnB,IAAI,SAAS,EAAE;YACb,IA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AAE,QAAQ,CAAC,UAAU;iBAC/B,CAAC;gBAEF,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACzC,WAAW,EAAE,aAAa;iBAC3B,CAAC,CAAC;gBAIH,MAAM,iBAAiB,GAAG,EAAE,CAAC;gBAG7B,MAAM,QAAQ,GAAG,IAAI,2BAAQ,EAAE,CAAC;gBAChC,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBAC1C,QAAQ,CAAC,MAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;gBACjC,QAAQ,CAAC,WAAW,GAAG,cAAc,CAAC;gBACtC,QAAQ,CAAC,UAAU,GAAG,OAAO,CAAC;gBAC9B,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;gBACtC,QAAQ,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;gBAC/D,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;gBAG7D,MAAM,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAEzD,OAAO,QAAQ,CAAC;aACjB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;;AA/QH,sBAgRC;AA/PgB,WAAK,GAAG,IAAI,kCAAe,EAAE,CAAC"}
|
@@ -27,4 +27,5 @@ __exportStar(require("./group-system-access"), exports);
|
|
27
27
|
__exportStar(require("./user-object-privilege"), exports);
|
28
28
|
__exportStar(require("./group-privilege"), exports);
|
29
29
|
__exportStar(require("./group-object-privilege"), exports);
|
30
|
+
__exportStar(require("./system-privilege"), exports);
|
30
31
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,kDAAgC;AAChC,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,uDAAqC;AACrC,mDAAiC;AACjC,wDAAsC;AACtC,0DAAwC;AACxC,oDAAkC;AAClC,2DAAyC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,kDAAgC;AAChC,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,uDAAqC;AACrC,mDAAiC;AACjC,wDAAsC;AACtC,0DAAwC;AACxC,oDAAkC;AAClC,2DAAyC;AACzC,qDAAmC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SystemPrivilege = exports.SystemPrivilegeRepository = void 0;
|
4
|
+
const system_privilege_repository_1 = require("./system-privilege.repository");
|
5
|
+
Object.defineProperty(exports, "SystemPrivilegeRepository", { enumerable: true, get: function () { return system_privilege_repository_1.SystemPrivilegeRepository; } });
|
6
|
+
const system_privilege_1 = require("./system-privilege");
|
7
|
+
Object.defineProperty(exports, "SystemPrivilege", { enumerable: true, get: function () { return system_privilege_1.SystemPrivilege; } });
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/index.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAGjE,0GAHA,uDAAyB,OAGA;AAFlC,yDAAqD;AAEjB,gGAF3B,kCAAe,OAE2B"}
|
@@ -109,7 +109,16 @@ class SystemPrivilege extends general_1.ObjectBase {
|
|
109
109
|
newSystemPrivilege._UpdatedById = loginUser.UserId;
|
110
110
|
newSystemPrivilege._CreatedAt = new Date();
|
111
111
|
newSystemPrivilege._UpdatedAt = new Date();
|
112
|
-
yield this._Repository.create(
|
112
|
+
yield this._Repository.create({
|
113
|
+
PrivilegeCode: newSystemPrivilege.ObjectId,
|
114
|
+
SystemCode: newSystemPrivilege.SystemCode,
|
115
|
+
Description: newSystemPrivilege.Description,
|
116
|
+
Status: newSystemPrivilege.Status,
|
117
|
+
CreatedById: newSystemPrivilege._CreatedById,
|
118
|
+
UpdatedById: newSystemPrivilege._UpdatedById,
|
119
|
+
CreatedAt: newSystemPrivilege._CreatedAt,
|
120
|
+
UpdatedAt: newSystemPrivilege._UpdatedAt,
|
121
|
+
}, dbTransaction);
|
113
122
|
const EntityValueBefore = {};
|
114
123
|
const EntityValueAfter = newSystemPrivilege;
|
115
124
|
const activity = new activity_history_1.Activity();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"system-privilege.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/system-privilege.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,mEAA+D;AAC/D,+EAA0E;AAG1E,0CAAkD;AAClD,6CAA0C;AAC1C,8DAA+D;AAE/D,MAAa,eAAgB,SAAQ,oBAAU;IAa7C,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,aAAa,CAAC,KAAa;QAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAKD,YAAoB,mBAA0C;QAC5D,KAAK,EAAE,CAAC;QAxCV,eAAU,GAAG,iBAAiB,CA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Ae,EAAE,CAAC;gBACjD,kBAAkB,CAAC,QAAQ,GAAG,eAAe,CAAC,aAAa,CAAC;gBAC5D,kBAAkB,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;gBAC3D,kBAAkB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC;gBAC7D,kBAAkB,CAAC,MAAM,GAAG,QAAQ,CAAC;gBACrC,kBAAkB,CAAC,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC;gBACnD,kBAAkB,CAAC,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC;gBACnD,kBAAkB,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;gBAC3C,kBAAkB,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;gBAG3C,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,kBAAkB,EAAE,
|
1
|
+
{"version":3,"file":"system-privilege.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/system-privilege.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,mEAA+D;AAC/D,+EAA0E;AAG1E,0CAAkD;AAClD,6CAA0C;AAC1C,8DAA+D;AAE/D,MAAa,eAAgB,SAAQ,oBAAU;IAa7C,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,aAAa,CAAC,KAAa;QAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAKD,YAAoB,mBAA0C;QAC5D,KAAK,EAAE,CAAC;QAxCV,e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,GAAG,iBAAiB,CAAC;gBACxC,QAAQ,CAAC,QAAQ,GAAG,kBAAkB,CAAC,UAAU,CAAC;gBAClD,QAAQ,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;gBAC/D,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;gBAG7D,MAAM,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAEzD,OAAO,kBAAkB,CAAC;aAC3B;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;;AAlMH,0CAmMC;AA9JgB,2BAAW,GAAG,IAAI,uDAAyB,EAAE,CAAC;AAC9C,iCAAiB,GAAG,IAAI,oCAAgB,EAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"group-search-attr.interface.js","sourceRoot":"","sources":["../../../src/interfaces/group-search-attr.interface.ts"],"names":[],"mappings":""}
|
@@ -25,4 +25,5 @@ __exportStar(require("./user-object-privilege.interface"), exports);
|
|
25
25
|
__exportStar(require("./group-object-privilege.interface"), exports);
|
26
26
|
__exportStar(require("./group-privilege.interface"), exports);
|
27
27
|
__exportStar(require("./system-search-attr.interface"), exports);
|
28
|
+
__exportStar(require("./group-search-attr.interface"), exports);
|
28
29
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,oDAAkC;AAClC,mEAAiD;AACjD,yDAAuC;AACvC,iEAA+C;AAC/C,oEAAkD;AAClD,qEAAmD;AACnD,8DAA4C;AAC5C,iEAA+C"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,oDAAkC;AAClC,mEAAiD;AACjD,yDAAuC;AACvC,iEAA+C;AAC/C,oEAAkD;AAClD,qEAAmD;AACnD,8DAA4C;AAC5C,iEAA+C;AAC/C,gEAA8C"}
|