@htilabs/platform-common-models 0.1.0-beta.2 → 0.2.0-beta.1
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/constants/index.cjs +164 -1779
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +72 -718
- package/dist/constants/index.d.ts +72 -718
- package/dist/constants/index.js +148 -1684
- package/dist/constants/index.js.map +1 -1
- package/dist/index.cjs +337 -1780
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +313 -1685
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +306 -1
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +99 -11
- package/dist/models/index.d.ts +99 -11
- package/dist/models/index.js +304 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{scoring-rule-liZlPytD.d.cts → platform-role-CcFTFHUr.d.cts} +185 -9
- package/dist/{scoring-rule-liZlPytD.d.ts → platform-role-CcFTFHUr.d.ts} +185 -9
- package/dist/schemas/index.cjs +287 -1585
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +281 -1585
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +44 -0
- package/dist/types/index.d.ts +44 -0
- package/package.json +1 -1
- package/src/constants/ic.ts +0 -1930
- package/src/constants/index.ts +1 -0
- package/src/constants/platform-auth.ts +189 -0
- package/src/models/index.ts +18 -1
- package/src/models/platformFunctionModel.ts +33 -0
- package/src/models/platformRoleModel.ts +33 -0
- package/src/schemas/index.ts +16 -0
- package/src/schemas/platform-function.ts +97 -0
- package/src/schemas/platform-role.ts +100 -0
- package/src/types/index.ts +14 -0
- package/src/types/platform-auth.ts +49 -0
|
@@ -859,12 +859,12 @@ declare const scoringConditionSchema: Schema<any, mongoose.Model<any, any, any,
|
|
|
859
859
|
}, {
|
|
860
860
|
value: any;
|
|
861
861
|
questionKey: string;
|
|
862
|
-
operator: "
|
|
862
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
863
863
|
weight: number;
|
|
864
864
|
}, mongoose.Document<unknown, {}, {
|
|
865
865
|
value: any;
|
|
866
866
|
questionKey: string;
|
|
867
|
-
operator: "
|
|
867
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
868
868
|
weight: number;
|
|
869
869
|
}, {
|
|
870
870
|
id: string;
|
|
@@ -873,7 +873,7 @@ declare const scoringConditionSchema: Schema<any, mongoose.Model<any, any, any,
|
|
|
873
873
|
}>> & Omit<{
|
|
874
874
|
value: any;
|
|
875
875
|
questionKey: string;
|
|
876
|
-
operator: "
|
|
876
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
877
877
|
weight: number;
|
|
878
878
|
} & {
|
|
879
879
|
_id: mongoose.Types.ObjectId;
|
|
@@ -884,7 +884,7 @@ declare const scoringConditionSchema: Schema<any, mongoose.Model<any, any, any,
|
|
|
884
884
|
}, unknown, {
|
|
885
885
|
value: any;
|
|
886
886
|
questionKey: string;
|
|
887
|
-
operator: "
|
|
887
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
888
888
|
weight: number;
|
|
889
889
|
} & {
|
|
890
890
|
_id: mongoose.Types.ObjectId;
|
|
@@ -1022,12 +1022,12 @@ declare const scoringRuleSchemaDefinition: {
|
|
|
1022
1022
|
}, {
|
|
1023
1023
|
value: any;
|
|
1024
1024
|
questionKey: string;
|
|
1025
|
-
operator: "
|
|
1025
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
1026
1026
|
weight: number;
|
|
1027
1027
|
}, mongoose.Document<unknown, {}, {
|
|
1028
1028
|
value: any;
|
|
1029
1029
|
questionKey: string;
|
|
1030
|
-
operator: "
|
|
1030
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
1031
1031
|
weight: number;
|
|
1032
1032
|
}, {
|
|
1033
1033
|
id: string;
|
|
@@ -1036,7 +1036,7 @@ declare const scoringRuleSchemaDefinition: {
|
|
|
1036
1036
|
}>> & Omit<{
|
|
1037
1037
|
value: any;
|
|
1038
1038
|
questionKey: string;
|
|
1039
|
-
operator: "
|
|
1039
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
1040
1040
|
weight: number;
|
|
1041
1041
|
} & {
|
|
1042
1042
|
_id: mongoose.Types.ObjectId;
|
|
@@ -1047,7 +1047,7 @@ declare const scoringRuleSchemaDefinition: {
|
|
|
1047
1047
|
}, unknown, {
|
|
1048
1048
|
value: any;
|
|
1049
1049
|
questionKey: string;
|
|
1050
|
-
operator: "
|
|
1050
|
+
operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
|
|
1051
1051
|
weight: number;
|
|
1052
1052
|
} & {
|
|
1053
1053
|
_id: mongoose.Types.ObjectId;
|
|
@@ -1176,4 +1176,180 @@ declare const _scoringRuleSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
1176
1176
|
}>;
|
|
1177
1177
|
type ScoringRule = InferRawDocType<typeof _scoringRuleSchema>;
|
|
1178
1178
|
|
|
1179
|
-
|
|
1179
|
+
declare const platformFunctionSchemaDefinition: {
|
|
1180
|
+
code: {
|
|
1181
|
+
type: StringConstructor;
|
|
1182
|
+
required: boolean;
|
|
1183
|
+
};
|
|
1184
|
+
label: {
|
|
1185
|
+
type: StringConstructor;
|
|
1186
|
+
required: boolean;
|
|
1187
|
+
};
|
|
1188
|
+
description: {
|
|
1189
|
+
type: StringConstructor;
|
|
1190
|
+
default: string;
|
|
1191
|
+
};
|
|
1192
|
+
category: {
|
|
1193
|
+
type: StringConstructor;
|
|
1194
|
+
default: string;
|
|
1195
|
+
};
|
|
1196
|
+
tools: {
|
|
1197
|
+
type: StringConstructor[];
|
|
1198
|
+
enum: ("THREAD" | "PAVE" | "ECHO" | "LEADS" | "TRAIL" | "PLATFORM")[];
|
|
1199
|
+
default: never[];
|
|
1200
|
+
};
|
|
1201
|
+
isAdminRelevant: {
|
|
1202
|
+
type: BooleanConstructor;
|
|
1203
|
+
default: boolean;
|
|
1204
|
+
};
|
|
1205
|
+
isUserRelevant: {
|
|
1206
|
+
type: BooleanConstructor;
|
|
1207
|
+
default: boolean;
|
|
1208
|
+
};
|
|
1209
|
+
isHtiOnly: {
|
|
1210
|
+
type: BooleanConstructor;
|
|
1211
|
+
default: boolean;
|
|
1212
|
+
};
|
|
1213
|
+
status: {
|
|
1214
|
+
type: StringConstructor;
|
|
1215
|
+
enum: ("Not started" | "Defined; new function" | "Defined; existing PAVE function" | "Functional on all apps" | "Future function (not v1)")[];
|
|
1216
|
+
default: string;
|
|
1217
|
+
};
|
|
1218
|
+
sortOrder: {
|
|
1219
|
+
type: NumberConstructor;
|
|
1220
|
+
default: number;
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
declare const platformFunctionSchemaOptions: {
|
|
1224
|
+
timestamps: {
|
|
1225
|
+
createdAt: string;
|
|
1226
|
+
updatedAt: string;
|
|
1227
|
+
};
|
|
1228
|
+
collection: string;
|
|
1229
|
+
};
|
|
1230
|
+
/**
|
|
1231
|
+
* Build the PlatformFunction schema.
|
|
1232
|
+
* @returns Mongoose Schema for PlatformFunction
|
|
1233
|
+
*/
|
|
1234
|
+
declare function buildPlatformFunctionSchema(): Schema;
|
|
1235
|
+
declare const _platformFunctionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
1236
|
+
[x: number]: unknown;
|
|
1237
|
+
[x: symbol]: unknown;
|
|
1238
|
+
[x: string]: unknown;
|
|
1239
|
+
}, mongoose.Document<unknown, {}, {
|
|
1240
|
+
[x: number]: unknown;
|
|
1241
|
+
[x: symbol]: unknown;
|
|
1242
|
+
[x: string]: unknown;
|
|
1243
|
+
}, {
|
|
1244
|
+
id: string;
|
|
1245
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
1246
|
+
[x: number]: unknown;
|
|
1247
|
+
[x: symbol]: unknown;
|
|
1248
|
+
[x: string]: unknown;
|
|
1249
|
+
} & Required<{
|
|
1250
|
+
_id: unknown;
|
|
1251
|
+
}> & {
|
|
1252
|
+
__v: number;
|
|
1253
|
+
}, "id"> & {
|
|
1254
|
+
id: string;
|
|
1255
|
+
}, unknown, {
|
|
1256
|
+
[x: number]: {};
|
|
1257
|
+
[x: symbol]: {};
|
|
1258
|
+
[x: string]: {};
|
|
1259
|
+
} & Required<{
|
|
1260
|
+
_id: unknown;
|
|
1261
|
+
}> & {
|
|
1262
|
+
__v: number;
|
|
1263
|
+
}>;
|
|
1264
|
+
type PlatformFunction = InferRawDocType<typeof _platformFunctionSchema>;
|
|
1265
|
+
|
|
1266
|
+
declare const platformRoleSchemaDefinition: {
|
|
1267
|
+
code: {
|
|
1268
|
+
type: StringConstructor;
|
|
1269
|
+
required: boolean;
|
|
1270
|
+
};
|
|
1271
|
+
label: {
|
|
1272
|
+
type: StringConstructor;
|
|
1273
|
+
required: boolean;
|
|
1274
|
+
};
|
|
1275
|
+
description: {
|
|
1276
|
+
type: StringConstructor;
|
|
1277
|
+
default: string;
|
|
1278
|
+
};
|
|
1279
|
+
level: {
|
|
1280
|
+
type: StringConstructor;
|
|
1281
|
+
enum: ("operational" | "agency" | "team" | "platform" | "oversight")[];
|
|
1282
|
+
required: boolean;
|
|
1283
|
+
};
|
|
1284
|
+
tools: {
|
|
1285
|
+
type: StringConstructor[];
|
|
1286
|
+
enum: ("THREAD" | "PAVE" | "ECHO" | "LEADS" | "TRAIL" | "PLATFORM")[];
|
|
1287
|
+
default: never[];
|
|
1288
|
+
};
|
|
1289
|
+
shareView: {
|
|
1290
|
+
type: StringConstructor;
|
|
1291
|
+
enum: ("sys_info" | "all" | "none" | null)[];
|
|
1292
|
+
default: null;
|
|
1293
|
+
};
|
|
1294
|
+
trainingRequirements: {
|
|
1295
|
+
type: StringConstructor;
|
|
1296
|
+
default: null;
|
|
1297
|
+
};
|
|
1298
|
+
isHtiOnly: {
|
|
1299
|
+
type: BooleanConstructor;
|
|
1300
|
+
default: boolean;
|
|
1301
|
+
};
|
|
1302
|
+
/** Dynamic map of functionCode → PermissionStateValue. */
|
|
1303
|
+
functions: {
|
|
1304
|
+
type: typeof Schema.Types.Mixed;
|
|
1305
|
+
default: {};
|
|
1306
|
+
};
|
|
1307
|
+
sortOrder: {
|
|
1308
|
+
type: NumberConstructor;
|
|
1309
|
+
default: number;
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
declare const platformRoleSchemaOptions: {
|
|
1313
|
+
timestamps: {
|
|
1314
|
+
createdAt: string;
|
|
1315
|
+
updatedAt: string;
|
|
1316
|
+
};
|
|
1317
|
+
collection: string;
|
|
1318
|
+
};
|
|
1319
|
+
/**
|
|
1320
|
+
* Build the PlatformRole schema.
|
|
1321
|
+
* @returns Mongoose Schema for PlatformRole
|
|
1322
|
+
*/
|
|
1323
|
+
declare function buildPlatformRoleSchema(): Schema;
|
|
1324
|
+
declare const _platformRoleSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
1325
|
+
[x: number]: unknown;
|
|
1326
|
+
[x: symbol]: unknown;
|
|
1327
|
+
[x: string]: unknown;
|
|
1328
|
+
}, mongoose.Document<unknown, {}, {
|
|
1329
|
+
[x: number]: unknown;
|
|
1330
|
+
[x: symbol]: unknown;
|
|
1331
|
+
[x: string]: unknown;
|
|
1332
|
+
}, {
|
|
1333
|
+
id: string;
|
|
1334
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
1335
|
+
[x: number]: unknown;
|
|
1336
|
+
[x: symbol]: unknown;
|
|
1337
|
+
[x: string]: unknown;
|
|
1338
|
+
} & Required<{
|
|
1339
|
+
_id: unknown;
|
|
1340
|
+
}> & {
|
|
1341
|
+
__v: number;
|
|
1342
|
+
}, "id"> & {
|
|
1343
|
+
id: string;
|
|
1344
|
+
}, unknown, {
|
|
1345
|
+
[x: number]: {};
|
|
1346
|
+
[x: symbol]: {};
|
|
1347
|
+
[x: string]: {};
|
|
1348
|
+
} & Required<{
|
|
1349
|
+
_id: unknown;
|
|
1350
|
+
}> & {
|
|
1351
|
+
__v: number;
|
|
1352
|
+
}>;
|
|
1353
|
+
type PlatformRole = InferRawDocType<typeof _platformRoleSchema>;
|
|
1354
|
+
|
|
1355
|
+
export { scoringRecommendationSchema as A, scoringRuleSchemaDefinition as B, type Choice as C, scoringRuleSchemaOptions as D, scoringThresholdSchema as E, type Form as F, type Guidance as G, sectionQuestionRefSchema as H, sectionSchemaDefinition as I, sectionSchemaOptions as J, visibilityRuleSchema as K, type Layout as L, type PlatformFunction as P, type Question as Q, type ScoringCondition as S, type VisibilityRule as V, type FormSectionRef as a, type PlatformRole as b, type ScoringRecommendation as c, type ScoringRule as d, type ScoringThreshold as e, type Section as f, type SectionQuestionRef as g, buildFormSchema as h, buildPlatformFunctionSchema as i, buildPlatformRoleSchema as j, buildQuestionSchema as k, buildScoringRuleSchema as l, buildSectionSchema as m, choiceSchema as n, formSchemaDefinition as o, formSchemaOptions as p, formSectionRefSchema as q, guidanceSchema as r, layoutSchema as s, platformFunctionSchemaDefinition as t, platformFunctionSchemaOptions as u, platformRoleSchemaDefinition as v, platformRoleSchemaOptions as w, questionSchemaDefinition as x, questionSchemaOptions as y, scoringConditionSchema as z };
|