asfur 1.0.115 → 1.0.117

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/index.d.ts CHANGED
@@ -492,6 +492,7 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
492
492
  scenario_id: string;
493
493
  score: number;
494
494
  score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
495
+ main_bullets: any[];
495
496
  key_evidence: any[];
496
497
  text?: string | null | undefined;
497
498
  alert?: any;
@@ -504,6 +505,7 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
504
505
  scenario_id: string;
505
506
  score: number;
506
507
  score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
508
+ main_bullets: any[];
507
509
  key_evidence: any[];
508
510
  text?: string | null | undefined;
509
511
  alert?: any;
@@ -516,6 +518,7 @@ export declare const MongoScenarioScoreSchema: Schema<any, import("mongoose").Mo
516
518
  scenario_id: string;
517
519
  score: number;
518
520
  score_type: "ten_score" | "hundred_score" | "percentage_score" | "four_point_scale";
521
+ main_bullets: any[];
519
522
  key_evidence: any[];
520
523
  text?: string | null | undefined;
521
524
  alert?: any;
@@ -695,6 +698,8 @@ export declare const MongoSendEmailSchema: Schema<any, import("mongoose").Model<
695
698
  virtuals: true;
696
699
  };
697
700
  }, {
701
+ user_id: string;
702
+ priority: "low" | "medium" | "high" | "critical";
698
703
  to: string[];
699
704
  timestamp?: number | null | undefined;
700
705
  from_service?: string | null | undefined;
@@ -703,6 +708,8 @@ export declare const MongoSendEmailSchema: Schema<any, import("mongoose").Model<
703
708
  body?: string | null | undefined;
704
709
  html?: string | null | undefined;
705
710
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
711
+ user_id: string;
712
+ priority: "low" | "medium" | "high" | "critical";
706
713
  to: string[];
707
714
  timestamp?: number | null | undefined;
708
715
  from_service?: string | null | undefined;
@@ -711,6 +718,8 @@ export declare const MongoSendEmailSchema: Schema<any, import("mongoose").Model<
711
718
  body?: string | null | undefined;
712
719
  html?: string | null | undefined;
713
720
  }>, {}> & import("mongoose").FlatRecord<{
721
+ user_id: string;
722
+ priority: "low" | "medium" | "high" | "critical";
714
723
  to: string[];
715
724
  timestamp?: number | null | undefined;
716
725
  from_service?: string | null | undefined;
package/dist/index.js CHANGED
@@ -213,6 +213,7 @@ exports.MongoScenarioScoreSchema = new mongoose_1.Schema({
213
213
  default: 'ten_score',
214
214
  },
215
215
  text: { type: String },
216
+ main_bullets: { type: [mongoose_1.Schema.Types.Mixed] },
216
217
  heatmap: { type: [mongoose_1.Schema.Types.Mixed] },
217
218
  alert: { type: mongoose_1.Schema.Types.Mixed },
218
219
  created_at: { type: Number, default: Date.now },
@@ -280,6 +281,8 @@ exports.MongoMessageSchema = new mongoose_1.Schema({
280
281
  toObject: { virtuals: true },
281
282
  });
282
283
  exports.MongoSendEmailSchema = new mongoose_1.Schema({
284
+ user_id: { type: String, required: true },
285
+ priority: { type: String, enum: types_1.notificationPriorityList, default: 'low' },
283
286
  timestamp: { type: Number },
284
287
  from_service: { type: String },
285
288
  to: { type: [String] },
package/dist/types.d.ts CHANGED
@@ -954,6 +954,19 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
954
954
  score: z.ZodNumber;
955
955
  score_type: z.ZodEnum<["ten_score", "hundred_score", "percentage_score", "four_point_scale"]>;
956
956
  text: z.ZodString;
957
+ main_bullets: z.ZodOptional<z.ZodArray<z.ZodObject<{
958
+ title: z.ZodString;
959
+ bullet: z.ZodString;
960
+ urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
961
+ }, "strip", z.ZodTypeAny, {
962
+ title: string;
963
+ bullet: string;
964
+ urls?: string[] | undefined;
965
+ }, {
966
+ title: string;
967
+ bullet: string;
968
+ urls?: string[] | undefined;
969
+ }>, "many">>;
957
970
  heatmap: z.ZodOptional<z.ZodArray<z.ZodObject<{
958
971
  _id: z.ZodOptional<z.ZodString>;
959
972
  user_id: z.ZodString;
@@ -1144,6 +1157,11 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
1144
1157
  _id?: string | undefined;
1145
1158
  created_at?: number | undefined;
1146
1159
  updated_at?: number | undefined;
1160
+ main_bullets?: {
1161
+ title: string;
1162
+ bullet: string;
1163
+ urls?: string[] | undefined;
1164
+ }[] | undefined;
1147
1165
  alert?: {
1148
1166
  is_on: boolean;
1149
1167
  by_email: boolean;
@@ -1200,6 +1218,11 @@ export declare const zodScenarioScoreSchema: z.ZodObject<{
1200
1218
  _id?: string | undefined;
1201
1219
  created_at?: number | undefined;
1202
1220
  updated_at?: number | undefined;
1221
+ main_bullets?: {
1222
+ title: string;
1223
+ bullet: string;
1224
+ urls?: string[] | undefined;
1225
+ }[] | undefined;
1203
1226
  alert?: {
1204
1227
  message?: string | undefined;
1205
1228
  title?: string | undefined;
@@ -1302,6 +1325,19 @@ export declare const zodScenarioSchema: z.ZodObject<{
1302
1325
  score: z.ZodNumber;
1303
1326
  score_type: z.ZodEnum<["ten_score", "hundred_score", "percentage_score", "four_point_scale"]>;
1304
1327
  text: z.ZodString;
1328
+ main_bullets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1329
+ title: z.ZodString;
1330
+ bullet: z.ZodString;
1331
+ urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1332
+ }, "strip", z.ZodTypeAny, {
1333
+ title: string;
1334
+ bullet: string;
1335
+ urls?: string[] | undefined;
1336
+ }, {
1337
+ title: string;
1338
+ bullet: string;
1339
+ urls?: string[] | undefined;
1340
+ }>, "many">>;
1305
1341
  heatmap: z.ZodOptional<z.ZodArray<z.ZodObject<{
1306
1342
  _id: z.ZodOptional<z.ZodString>;
1307
1343
  user_id: z.ZodString;
@@ -1492,6 +1528,11 @@ export declare const zodScenarioSchema: z.ZodObject<{
1492
1528
  _id?: string | undefined;
1493
1529
  created_at?: number | undefined;
1494
1530
  updated_at?: number | undefined;
1531
+ main_bullets?: {
1532
+ title: string;
1533
+ bullet: string;
1534
+ urls?: string[] | undefined;
1535
+ }[] | undefined;
1495
1536
  alert?: {
1496
1537
  is_on: boolean;
1497
1538
  by_email: boolean;
@@ -1548,6 +1589,11 @@ export declare const zodScenarioSchema: z.ZodObject<{
1548
1589
  _id?: string | undefined;
1549
1590
  created_at?: number | undefined;
1550
1591
  updated_at?: number | undefined;
1592
+ main_bullets?: {
1593
+ title: string;
1594
+ bullet: string;
1595
+ urls?: string[] | undefined;
1596
+ }[] | undefined;
1551
1597
  alert?: {
1552
1598
  message?: string | undefined;
1553
1599
  title?: string | undefined;
@@ -1642,6 +1688,11 @@ export declare const zodScenarioSchema: z.ZodObject<{
1642
1688
  _id?: string | undefined;
1643
1689
  created_at?: number | undefined;
1644
1690
  updated_at?: number | undefined;
1691
+ main_bullets?: {
1692
+ title: string;
1693
+ bullet: string;
1694
+ urls?: string[] | undefined;
1695
+ }[] | undefined;
1645
1696
  alert?: {
1646
1697
  is_on: boolean;
1647
1698
  by_email: boolean;
@@ -1736,6 +1787,11 @@ export declare const zodScenarioSchema: z.ZodObject<{
1736
1787
  _id?: string | undefined;
1737
1788
  created_at?: number | undefined;
1738
1789
  updated_at?: number | undefined;
1790
+ main_bullets?: {
1791
+ title: string;
1792
+ bullet: string;
1793
+ urls?: string[] | undefined;
1794
+ }[] | undefined;
1739
1795
  alert?: {
1740
1796
  message?: string | undefined;
1741
1797
  title?: string | undefined;
@@ -1758,6 +1814,8 @@ export declare const zodScenarioSchema: z.ZodObject<{
1758
1814
  }[] | undefined;
1759
1815
  }>;
1760
1816
  export declare const zodSendEmailSchema: z.ZodObject<{
1817
+ user_id: z.ZodString;
1818
+ priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
1761
1819
  timestamp: z.ZodNumber;
1762
1820
  from_service: z.ZodString;
1763
1821
  to: z.ZodArray<z.ZodString, "many">;
@@ -1766,7 +1824,9 @@ export declare const zodSendEmailSchema: z.ZodObject<{
1766
1824
  body: z.ZodOptional<z.ZodString>;
1767
1825
  html: z.ZodOptional<z.ZodString>;
1768
1826
  }, "strip", z.ZodTypeAny, {
1827
+ user_id: string;
1769
1828
  timestamp: number;
1829
+ priority: "low" | "medium" | "high" | "critical";
1770
1830
  from_service: string;
1771
1831
  to: string[];
1772
1832
  from: string;
@@ -1774,7 +1834,9 @@ export declare const zodSendEmailSchema: z.ZodObject<{
1774
1834
  body?: string | undefined;
1775
1835
  html?: string | undefined;
1776
1836
  }, {
1837
+ user_id: string;
1777
1838
  timestamp: number;
1839
+ priority: "low" | "medium" | "high" | "critical";
1778
1840
  from_service: string;
1779
1841
  to: string[];
1780
1842
  from: string;
package/dist/types.js CHANGED
@@ -225,6 +225,13 @@ exports.zodScenarioScoreSchema = zod_1.z.object({
225
225
  score: zod_1.z.number(),
226
226
  score_type: zod_1.z.enum(exports.scenarioScoreTypeList),
227
227
  text: zod_1.z.string(),
228
+ main_bullets: zod_1.z
229
+ .array(zod_1.z.object({
230
+ title: zod_1.z.string(),
231
+ bullet: zod_1.z.string(),
232
+ urls: zod_1.z.array(zod_1.z.string().url()).optional(), // optional array of URLs associated with the bullet
233
+ }))
234
+ .optional(),
228
235
  heatmap: zod_1.z.array(exports.zodHeatmapSchema).optional(),
229
236
  created_at: zod_1.z.number().optional(),
230
237
  updated_at: zod_1.z.number().optional(),
@@ -259,6 +266,8 @@ exports.zodScenarioSchema = zod_1.z.object({
259
266
  scores: zod_1.z.array(exports.zodScenarioScoreSchema).optional(), // array of scenario scores associated with the scenario
260
267
  });
261
268
  exports.zodSendEmailSchema = zod_1.z.object({
269
+ user_id: zod_1.z.string(),
270
+ priority: zod_1.z.enum(exports.notificationPriorityList),
262
271
  timestamp: zod_1.z.number(),
263
272
  from_service: zod_1.z.string(),
264
273
  to: zod_1.z.array(zod_1.z.string().email()),
package/index.ts CHANGED
@@ -240,6 +240,7 @@ export const MongoScenarioScoreSchema = new Schema(
240
240
  default: 'ten_score',
241
241
  }, // scenario score type
242
242
  text: { type: String }, // data identifier -> the summary id
243
+ main_bullets: { type: [Schema.Types.Mixed] }, // optional main bullets associated with the score, each bullet can have title, bullet text, and optional URLs
243
244
  heatmap: { type: [Schema.Types.Mixed] }, // optional heatmap associated with the score
244
245
  alert: { type: Schema.Types.Mixed }, // optional alert configuration for the scenario score
245
246
  created_at: { type: Number, default: Date.now }, // creation date
@@ -319,6 +320,8 @@ export const MongoMessageSchema = new Schema(
319
320
 
320
321
  export const MongoSendEmailSchema = new Schema(
321
322
  {
323
+ user_id: { type: String, required: true }, // user identifier
324
+ priority: { type: String, enum: notificationPriorityList, default: 'low' }, // email priority
322
325
  timestamp: { type: Number }, // timestamp for when the email should be sent
323
326
  from_service: { type: String }, // name of the service sending the email
324
327
  to: { type: [String] }, // recipient email addresses
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
4
4
  "description": "SDK for interacting with the Asfur API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types.ts CHANGED
@@ -270,6 +270,15 @@ export const zodScenarioScoreSchema = z.object({
270
270
  score: z.number(), // score value
271
271
  score_type: z.enum(scenarioScoreTypeList), // type of the score
272
272
  text: z.string(),
273
+ main_bullets: z
274
+ .array(
275
+ z.object({
276
+ title: z.string(),
277
+ bullet: z.string(),
278
+ urls: z.array(z.string().url()).optional(), // optional array of URLs associated with the bullet
279
+ }),
280
+ )
281
+ .optional(), // optional main bullets associated with the score
273
282
  heatmap: z.array(zodHeatmapSchema).optional(), // optional heatmap associated with the score
274
283
  created_at: z.number().optional(), // creation date
275
284
  updated_at: z.number().optional(), // last update date
@@ -308,6 +317,8 @@ export const zodScenarioSchema = z.object({
308
317
  });
309
318
 
310
319
  export const zodSendEmailSchema = z.object({
320
+ user_id: z.string(), // user identifier
321
+ priority: z.enum(notificationPriorityList), // priority of the email
311
322
  timestamp: z.number(), // timestamp for when the email should be sent
312
323
  from_service: z.string(), // name of the service sending the email
313
324
  to: z.array(z.string().email()), // recipient email address