asfur 1.0.140 → 1.0.142

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
@@ -1019,6 +1019,7 @@ export declare const MongoTierSchema: Schema<any, import("mongoose").Model<any,
1019
1019
  features?: {
1020
1020
  events?: {
1021
1021
  has_access: boolean;
1022
+ include_sources: boolean;
1022
1023
  } | null | undefined;
1023
1024
  ask?: {
1024
1025
  has_access: boolean;
@@ -1046,6 +1047,7 @@ export declare const MongoTierSchema: Schema<any, import("mongoose").Model<any,
1046
1047
  features?: {
1047
1048
  events?: {
1048
1049
  has_access: boolean;
1050
+ include_sources: boolean;
1049
1051
  } | null | undefined;
1050
1052
  ask?: {
1051
1053
  has_access: boolean;
@@ -1073,6 +1075,7 @@ export declare const MongoTierSchema: Schema<any, import("mongoose").Model<any,
1073
1075
  features?: {
1074
1076
  events?: {
1075
1077
  has_access: boolean;
1078
+ include_sources: boolean;
1076
1079
  } | null | undefined;
1077
1080
  ask?: {
1078
1081
  has_access: boolean;
package/dist/index.js CHANGED
@@ -393,7 +393,8 @@ exports.MongoTierSchema = new mongoose_1.Schema({
393
393
  badge: { type: String },
394
394
  features: {
395
395
  events: {
396
- has_access: { type: Boolean, default: true }, // true if the tier has access to events data
396
+ has_access: { type: Boolean, default: true },
397
+ include_sources: { type: Boolean, default: false }, // true if the tier includes sources data in events
397
398
  },
398
399
  ask: {
399
400
  has_access: { type: Boolean, default: false },
package/dist/types.d.ts CHANGED
@@ -2373,10 +2373,13 @@ export declare const zodTierSchema: z.ZodObject<{
2373
2373
  features: z.ZodObject<{
2374
2374
  events: z.ZodObject<{
2375
2375
  has_access: z.ZodDefault<z.ZodBoolean>;
2376
+ include_sources: z.ZodDefault<z.ZodBoolean>;
2376
2377
  }, "strip", z.ZodTypeAny, {
2377
2378
  has_access: boolean;
2379
+ include_sources: boolean;
2378
2380
  }, {
2379
2381
  has_access?: boolean | undefined;
2382
+ include_sources?: boolean | undefined;
2380
2383
  }>;
2381
2384
  ask: z.ZodObject<{
2382
2385
  has_access: z.ZodDefault<z.ZodBoolean>;
@@ -2423,6 +2426,7 @@ export declare const zodTierSchema: z.ZodObject<{
2423
2426
  }, "strip", z.ZodTypeAny, {
2424
2427
  events: {
2425
2428
  has_access: boolean;
2429
+ include_sources: boolean;
2426
2430
  };
2427
2431
  ask: {
2428
2432
  has_access: boolean;
@@ -2443,6 +2447,7 @@ export declare const zodTierSchema: z.ZodObject<{
2443
2447
  }, {
2444
2448
  events: {
2445
2449
  has_access?: boolean | undefined;
2450
+ include_sources?: boolean | undefined;
2446
2451
  };
2447
2452
  ask: {
2448
2453
  has_access?: boolean | undefined;
@@ -2468,6 +2473,7 @@ export declare const zodTierSchema: z.ZodObject<{
2468
2473
  features: {
2469
2474
  events: {
2470
2475
  has_access: boolean;
2476
+ include_sources: boolean;
2471
2477
  };
2472
2478
  ask: {
2473
2479
  has_access: boolean;
@@ -2496,6 +2502,7 @@ export declare const zodTierSchema: z.ZodObject<{
2496
2502
  features: {
2497
2503
  events: {
2498
2504
  has_access?: boolean | undefined;
2505
+ include_sources?: boolean | undefined;
2499
2506
  };
2500
2507
  ask: {
2501
2508
  has_access?: boolean | undefined;
@@ -2520,6 +2527,28 @@ export declare const zodTierSchema: z.ZodObject<{
2520
2527
  description?: string | undefined;
2521
2528
  badge?: string | undefined;
2522
2529
  }>;
2530
+ export declare const zodEventsObservationSchema: z.ZodObject<{
2531
+ _id: z.ZodOptional<z.ZodString>;
2532
+ user_id: z.ZodString;
2533
+ event_id: z.ZodString;
2534
+ observation: z.ZodString;
2535
+ created_at: z.ZodOptional<z.ZodNumber>;
2536
+ updated_at: z.ZodOptional<z.ZodNumber>;
2537
+ }, "strip", z.ZodTypeAny, {
2538
+ user_id: string;
2539
+ event_id: string;
2540
+ observation: string;
2541
+ _id?: string | undefined;
2542
+ created_at?: number | undefined;
2543
+ updated_at?: number | undefined;
2544
+ }, {
2545
+ user_id: string;
2546
+ event_id: string;
2547
+ observation: string;
2548
+ _id?: string | undefined;
2549
+ created_at?: number | undefined;
2550
+ updated_at?: number | undefined;
2551
+ }>;
2523
2552
  /**
2524
2553
  * 'approved' - active and approved sources,
2525
2554
  * 'back_to_business' - sources that were paused and now resumed,
@@ -2573,3 +2602,10 @@ export type MessageMetaData = {
2573
2602
  [key: string]: number;
2574
2603
  };
2575
2604
  };
2605
+ export type UsersReportRequestType = {
2606
+ users: {
2607
+ user_id: string;
2608
+ slug: string;
2609
+ }[];
2610
+ time_range: number;
2611
+ };
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodTierSchema = exports.zodUserRequestSchema = exports.zodPolygonSchema = exports.zodFavoriteEventSchema = exports.zodGeoSelectionGroupSchema = exports.zodPredefinedQuerySchema = exports.zodSendWhatsappSchema = exports.zodSendEmailSchema = exports.zodScenarioSchema = exports.zodScenarioScoreSchema = exports.scenarioScoreTypeList = exports.zodNotificationSchema = exports.notificationPriorityList = exports.zodReportSchema = exports.reportProcessStatusList = exports.zodApiKeySchema = exports.zodCronScheduleResponseSchema = exports.zodMessageSchema = exports.zodHeatmapSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAlertSchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.requestedContentList = exports.relativeTimeRangeList = exports.jobRunStatusList = exports.generalStatusList = void 0;
3
+ exports.zodEventsObservationSchema = exports.zodTierSchema = exports.zodUserRequestSchema = exports.zodPolygonSchema = exports.zodFavoriteEventSchema = exports.zodGeoSelectionGroupSchema = exports.zodPredefinedQuerySchema = exports.zodSendWhatsappSchema = exports.zodSendEmailSchema = exports.zodScenarioSchema = exports.zodScenarioScoreSchema = exports.scenarioScoreTypeList = exports.zodNotificationSchema = exports.notificationPriorityList = exports.zodReportSchema = exports.reportProcessStatusList = exports.zodApiKeySchema = exports.zodCronScheduleResponseSchema = exports.zodMessageSchema = exports.zodHeatmapSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAlertSchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.requestedContentList = exports.relativeTimeRangeList = exports.jobRunStatusList = exports.generalStatusList = void 0;
4
4
  const harvester_sdk_1 = require("harvester_sdk");
5
5
  const zod_1 = require("zod");
6
6
  exports.generalStatusList = ['active', 'inactive'];
@@ -362,7 +362,8 @@ exports.zodTierSchema = zod_1.z.object({
362
362
  badge: zod_1.z.string().optional(),
363
363
  features: zod_1.z.object({
364
364
  events: zod_1.z.object({
365
- has_access: zod_1.z.boolean().default(false), // true if the tier has access to events data
365
+ has_access: zod_1.z.boolean().default(false),
366
+ include_sources: zod_1.z.boolean().default(false), // true if the tier includes sources data in events
366
367
  }),
367
368
  ask: zod_1.z.object({
368
369
  has_access: zod_1.z.boolean().default(false),
@@ -384,3 +385,11 @@ exports.zodTierSchema = zod_1.z.object({
384
385
  created_at: zod_1.z.number().optional(),
385
386
  updated_at: zod_1.z.number().optional(), // last update date
386
387
  });
388
+ exports.zodEventsObservationSchema = zod_1.z.object({
389
+ _id: zod_1.z.string().optional(),
390
+ user_id: zod_1.z.string(),
391
+ event_id: zod_1.z.string(),
392
+ observation: zod_1.z.string(),
393
+ created_at: zod_1.z.number().optional(),
394
+ updated_at: zod_1.z.number().optional(), // last update date
395
+ });
package/index.ts CHANGED
@@ -461,6 +461,7 @@ export const MongoTierSchema = new Schema(
461
461
  features: {
462
462
  events: {
463
463
  has_access: { type: Boolean, default: true }, // true if the tier has access to events data
464
+ include_sources: { type: Boolean, default: false }, // true if the tier includes sources data in events
464
465
  },
465
466
  ask: {
466
467
  has_access: { type: Boolean, default: false }, // true if the tier has access to ask feature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.140",
3
+ "version": "1.0.142",
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
@@ -421,6 +421,7 @@ export const zodTierSchema = z.object({
421
421
  features: z.object({
422
422
  events: z.object({
423
423
  has_access: z.boolean().default(false), // true if the tier has access to events data
424
+ include_sources: z.boolean().default(false), // true if the tier includes sources data in events
424
425
  }),
425
426
  ask: z.object({
426
427
  has_access: z.boolean().default(false), // true if the tier has access to ask feature
@@ -443,6 +444,15 @@ export const zodTierSchema = z.object({
443
444
  updated_at: z.number().optional(), // last update date
444
445
  });
445
446
 
447
+ export const zodEventsObservationSchema = z.object({
448
+ _id: z.string().optional(),
449
+ user_id: z.string(), // user identifier
450
+ event_id: z.string(), // event identifier
451
+ observation: z.string(), // observation text
452
+ created_at: z.number().optional(), // creation date
453
+ updated_at: z.number().optional(), // last update date
454
+ })
455
+
446
456
  /**
447
457
  * 'approved' - active and approved sources,
448
458
  * 'back_to_business' - sources that were paused and now resumed,
@@ -500,3 +510,11 @@ export type MessageMetaData = {
500
510
  userInstructions?: string;
501
511
  sourceDocumentCounts?: { [key: string]: number };
502
512
  };
513
+
514
+ export type UsersReportRequestType = {
515
+ users: {
516
+ user_id: string;
517
+ slug: string;
518
+ }[],
519
+ time_range: number; // e.g., last 30 days
520
+ }