@htilabs/platform-common-models 0.1.0-beta.3 → 0.2.0-beta.2

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.
Files changed (43) hide show
  1. package/dist/constants/index.cjs +437 -153
  2. package/dist/constants/index.cjs.map +1 -1
  3. package/dist/constants/index.d.cts +1 -1
  4. package/dist/constants/index.d.ts +1 -1
  5. package/dist/constants/index.js +414 -153
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/index.cjs +610 -154
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +3 -3
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +579 -154
  12. package/dist/index.js.map +1 -1
  13. package/dist/models/index.cjs +306 -1
  14. package/dist/models/index.cjs.map +1 -1
  15. package/dist/models/index.d.cts +99 -11
  16. package/dist/models/index.d.ts +99 -11
  17. package/dist/models/index.js +304 -1
  18. package/dist/models/index.js.map +1 -1
  19. package/dist/{index-Cww9rH3H.d.cts → platform-auth-C-G2qeGM.d.cts} +167 -56
  20. package/dist/{index-Cww9rH3H.d.ts → platform-auth-C-G2qeGM.d.ts} +167 -56
  21. package/dist/{scoring-rule-liZlPytD.d.cts → platform-role-AHv1l5Og.d.cts} +177 -1
  22. package/dist/{scoring-rule-liZlPytD.d.ts → platform-role-AHv1l5Og.d.ts} +177 -1
  23. package/dist/schemas/index.cjs +539 -153
  24. package/dist/schemas/index.cjs.map +1 -1
  25. package/dist/schemas/index.d.cts +1 -1
  26. package/dist/schemas/index.d.ts +1 -1
  27. package/dist/schemas/index.js +533 -153
  28. package/dist/schemas/index.js.map +1 -1
  29. package/dist/types/index.cjs.map +1 -1
  30. package/dist/types/index.d.cts +45 -1
  31. package/dist/types/index.d.ts +45 -1
  32. package/package.json +1 -1
  33. package/src/constants/ic.ts +254 -153
  34. package/src/constants/index.ts +1 -0
  35. package/src/constants/platform-auth.ts +189 -0
  36. package/src/models/index.ts +18 -1
  37. package/src/models/platformFunctionModel.ts +33 -0
  38. package/src/models/platformRoleModel.ts +33 -0
  39. package/src/schemas/index.ts +16 -0
  40. package/src/schemas/platform-function.ts +97 -0
  41. package/src/schemas/platform-role.ts +100 -0
  42. package/src/types/index.ts +14 -0
  43. package/src/types/platform-auth.ts +49 -0
@@ -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
- export { visibilityRuleSchema as A, type Choice as C, type Form as F, type Guidance as G, type Layout as L, type Question as Q, type ScoringCondition as S, type VisibilityRule as V, type FormSectionRef as a, type ScoringRecommendation as b, type ScoringRule as c, type ScoringThreshold as d, type Section as e, type SectionQuestionRef as f, buildFormSchema as g, buildQuestionSchema as h, buildScoringRuleSchema as i, buildSectionSchema as j, choiceSchema as k, formSchemaDefinition as l, formSchemaOptions as m, formSectionRefSchema as n, guidanceSchema as o, layoutSchema as p, questionSchemaDefinition as q, questionSchemaOptions as r, scoringConditionSchema as s, scoringRecommendationSchema as t, scoringRuleSchemaDefinition as u, scoringRuleSchemaOptions as v, scoringThresholdSchema as w, sectionQuestionRefSchema as x, sectionSchemaDefinition as y, sectionSchemaOptions as z };
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: ("none" | "sys_info" | "all" | 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 };