asfur 1.0.141 → 1.0.143

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
@@ -834,9 +834,9 @@ export declare const MongoGeoSelectionGroupSchema: Schema<any, import("mongoose"
834
834
  };
835
835
  }, {
836
836
  title: string;
837
+ region_id: string;
837
838
  created_at: number;
838
839
  updated_at: number;
839
- region_id: string;
840
840
  geo_selections_ids: string[];
841
841
  geo_selections: any[];
842
842
  user_id?: string | null | undefined;
@@ -844,9 +844,9 @@ export declare const MongoGeoSelectionGroupSchema: Schema<any, import("mongoose"
844
844
  notes?: string | null | undefined;
845
845
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
846
846
  title: string;
847
+ region_id: string;
847
848
  created_at: number;
848
849
  updated_at: number;
849
- region_id: string;
850
850
  geo_selections_ids: string[];
851
851
  geo_selections: any[];
852
852
  user_id?: string | null | undefined;
@@ -854,9 +854,9 @@ export declare const MongoGeoSelectionGroupSchema: Schema<any, import("mongoose"
854
854
  notes?: string | null | undefined;
855
855
  }>, {}> & import("mongoose").FlatRecord<{
856
856
  title: string;
857
+ region_id: string;
857
858
  created_at: number;
858
859
  updated_at: number;
859
- region_id: string;
860
860
  geo_selections_ids: string[];
861
861
  geo_selections: any[];
862
862
  user_id?: string | null | undefined;
@@ -906,9 +906,9 @@ export declare const MongoPolygonSchema: Schema<any, import("mongoose").Model<an
906
906
  }, {
907
907
  title: string;
908
908
  user_id: string;
909
+ region_id: string;
909
910
  created_at: number;
910
911
  updated_at: number;
911
- region_id: string;
912
912
  coordinates: import("mongoose").Types.DocumentArray<{
913
913
  [x: number]: number[];
914
914
  }, import("mongoose").Types.Subdocument<unknown, any, {
@@ -921,9 +921,9 @@ export declare const MongoPolygonSchema: Schema<any, import("mongoose").Model<an
921
921
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
922
922
  title: string;
923
923
  user_id: string;
924
+ region_id: string;
924
925
  created_at: number;
925
926
  updated_at: number;
926
- region_id: string;
927
927
  coordinates: import("mongoose").Types.DocumentArray<{
928
928
  [x: number]: number[];
929
929
  }, import("mongoose").Types.Subdocument<unknown, any, {
@@ -936,9 +936,9 @@ export declare const MongoPolygonSchema: Schema<any, import("mongoose").Model<an
936
936
  }>, {}> & import("mongoose").FlatRecord<{
937
937
  title: string;
938
938
  user_id: string;
939
+ region_id: string;
939
940
  created_at: number;
940
941
  updated_at: number;
941
- region_id: string;
942
942
  coordinates: import("mongoose").Types.DocumentArray<{
943
943
  [x: number]: number[];
944
944
  }, import("mongoose").Types.Subdocument<unknown, any, {
@@ -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
@@ -119,6 +119,7 @@ export declare const zodQuerySchema: z.ZodObject<{
119
119
  timestamp: z.ZodOptional<z.ZodNumber>;
120
120
  job_id: z.ZodOptional<z.ZodString>;
121
121
  requested_content: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "table", "heatmap"]>, "many">>;
122
+ region_id: z.ZodOptional<z.ZodString>;
122
123
  }, "strip", z.ZodTypeAny, {
123
124
  time_range: {
124
125
  type: "relative";
@@ -141,6 +142,7 @@ export declare const zodQuerySchema: z.ZodObject<{
141
142
  timestamp?: number | undefined;
142
143
  job_id?: string | undefined;
143
144
  requested_content?: ("text" | "table" | "heatmap")[] | undefined;
145
+ region_id?: string | undefined;
144
146
  }, {
145
147
  time_range: {
146
148
  type: "relative";
@@ -163,6 +165,7 @@ export declare const zodQuerySchema: z.ZodObject<{
163
165
  timestamp?: number | undefined;
164
166
  job_id?: string | undefined;
165
167
  requested_content?: ("text" | "table" | "heatmap")[] | undefined;
168
+ region_id?: string | undefined;
166
169
  }>;
167
170
  export declare const zodInstructionsSchema: z.ZodObject<{
168
171
  _id: z.ZodOptional<z.ZodString>;
@@ -344,6 +347,7 @@ export declare const zodJobSchema: z.ZodObject<{
344
347
  timestamp: z.ZodOptional<z.ZodNumber>;
345
348
  job_id: z.ZodOptional<z.ZodString>;
346
349
  requested_content: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "table", "heatmap"]>, "many">>;
350
+ region_id: z.ZodOptional<z.ZodString>;
347
351
  }, "strip", z.ZodTypeAny, {
348
352
  time_range: {
349
353
  type: "relative";
@@ -366,6 +370,7 @@ export declare const zodJobSchema: z.ZodObject<{
366
370
  timestamp?: number | undefined;
367
371
  job_id?: string | undefined;
368
372
  requested_content?: ("text" | "table" | "heatmap")[] | undefined;
373
+ region_id?: string | undefined;
369
374
  }, {
370
375
  time_range: {
371
376
  type: "relative";
@@ -388,6 +393,7 @@ export declare const zodJobSchema: z.ZodObject<{
388
393
  timestamp?: number | undefined;
389
394
  job_id?: string | undefined;
390
395
  requested_content?: ("text" | "table" | "heatmap")[] | undefined;
396
+ region_id?: string | undefined;
391
397
  }>;
392
398
  active_until: z.ZodOptional<z.ZodNumber>;
393
399
  conversation_id: z.ZodOptional<z.ZodString>;
@@ -478,6 +484,7 @@ export declare const zodJobSchema: z.ZodObject<{
478
484
  timestamp?: number | undefined;
479
485
  job_id?: string | undefined;
480
486
  requested_content?: ("text" | "table" | "heatmap")[] | undefined;
487
+ region_id?: string | undefined;
481
488
  };
482
489
  user_id: string;
483
490
  job_name: string;
@@ -535,6 +542,7 @@ export declare const zodJobSchema: z.ZodObject<{
535
542
  timestamp?: number | undefined;
536
543
  job_id?: string | undefined;
537
544
  requested_content?: ("text" | "table" | "heatmap")[] | undefined;
545
+ region_id?: string | undefined;
538
546
  };
539
547
  user_id: string;
540
548
  job_name: string;
@@ -2373,10 +2381,13 @@ export declare const zodTierSchema: z.ZodObject<{
2373
2381
  features: z.ZodObject<{
2374
2382
  events: z.ZodObject<{
2375
2383
  has_access: z.ZodDefault<z.ZodBoolean>;
2384
+ include_sources: z.ZodDefault<z.ZodBoolean>;
2376
2385
  }, "strip", z.ZodTypeAny, {
2377
2386
  has_access: boolean;
2387
+ include_sources: boolean;
2378
2388
  }, {
2379
2389
  has_access?: boolean | undefined;
2390
+ include_sources?: boolean | undefined;
2380
2391
  }>;
2381
2392
  ask: z.ZodObject<{
2382
2393
  has_access: z.ZodDefault<z.ZodBoolean>;
@@ -2423,6 +2434,7 @@ export declare const zodTierSchema: z.ZodObject<{
2423
2434
  }, "strip", z.ZodTypeAny, {
2424
2435
  events: {
2425
2436
  has_access: boolean;
2437
+ include_sources: boolean;
2426
2438
  };
2427
2439
  ask: {
2428
2440
  has_access: boolean;
@@ -2443,6 +2455,7 @@ export declare const zodTierSchema: z.ZodObject<{
2443
2455
  }, {
2444
2456
  events: {
2445
2457
  has_access?: boolean | undefined;
2458
+ include_sources?: boolean | undefined;
2446
2459
  };
2447
2460
  ask: {
2448
2461
  has_access?: boolean | undefined;
@@ -2468,6 +2481,7 @@ export declare const zodTierSchema: z.ZodObject<{
2468
2481
  features: {
2469
2482
  events: {
2470
2483
  has_access: boolean;
2484
+ include_sources: boolean;
2471
2485
  };
2472
2486
  ask: {
2473
2487
  has_access: boolean;
@@ -2496,6 +2510,7 @@ export declare const zodTierSchema: z.ZodObject<{
2496
2510
  features: {
2497
2511
  events: {
2498
2512
  has_access?: boolean | undefined;
2513
+ include_sources?: boolean | undefined;
2499
2514
  };
2500
2515
  ask: {
2501
2516
  has_access?: boolean | undefined;
@@ -2520,6 +2535,28 @@ export declare const zodTierSchema: z.ZodObject<{
2520
2535
  description?: string | undefined;
2521
2536
  badge?: string | undefined;
2522
2537
  }>;
2538
+ export declare const zodEventsObservationSchema: z.ZodObject<{
2539
+ _id: z.ZodOptional<z.ZodString>;
2540
+ user_id: z.ZodString;
2541
+ event_id: z.ZodString;
2542
+ observation: z.ZodString;
2543
+ created_at: z.ZodOptional<z.ZodNumber>;
2544
+ updated_at: z.ZodOptional<z.ZodNumber>;
2545
+ }, "strip", z.ZodTypeAny, {
2546
+ user_id: string;
2547
+ event_id: string;
2548
+ observation: string;
2549
+ _id?: string | undefined;
2550
+ created_at?: number | undefined;
2551
+ updated_at?: number | undefined;
2552
+ }, {
2553
+ user_id: string;
2554
+ event_id: string;
2555
+ observation: string;
2556
+ _id?: string | undefined;
2557
+ created_at?: number | undefined;
2558
+ updated_at?: number | undefined;
2559
+ }>;
2523
2560
  /**
2524
2561
  * 'approved' - active and approved sources,
2525
2562
  * 'back_to_business' - sources that were paused and now resumed,
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'];
@@ -58,7 +58,8 @@ exports.zodQuerySchema = zod_1.z.object({
58
58
  user_time_zone: zod_1.z.string().optional(),
59
59
  timestamp: zod_1.z.number().optional(),
60
60
  job_id: zod_1.z.string().optional(),
61
- requested_content: zod_1.z.array(zod_1.z.enum(exports.requestedContentList)).optional(), // array of requested content types
61
+ requested_content: zod_1.z.array(zod_1.z.enum(exports.requestedContentList)).optional(),
62
+ region_id: zod_1.z.string().optional(), // optional region ID associated with the query
62
63
  });
63
64
  exports.zodInstructionsSchema = zod_1.z.object({
64
65
  _id: zod_1.z.string().optional(),
@@ -362,7 +363,8 @@ exports.zodTierSchema = zod_1.z.object({
362
363
  badge: zod_1.z.string().optional(),
363
364
  features: zod_1.z.object({
364
365
  events: zod_1.z.object({
365
- has_access: zod_1.z.boolean().default(false), // true if the tier has access to events data
366
+ has_access: zod_1.z.boolean().default(false),
367
+ include_sources: zod_1.z.boolean().default(false), // true if the tier includes sources data in events
366
368
  }),
367
369
  ask: zod_1.z.object({
368
370
  has_access: zod_1.z.boolean().default(false),
@@ -384,3 +386,11 @@ exports.zodTierSchema = zod_1.z.object({
384
386
  created_at: zod_1.z.number().optional(),
385
387
  updated_at: zod_1.z.number().optional(), // last update date
386
388
  });
389
+ exports.zodEventsObservationSchema = zod_1.z.object({
390
+ _id: zod_1.z.string().optional(),
391
+ user_id: zod_1.z.string(),
392
+ event_id: zod_1.z.string(),
393
+ observation: zod_1.z.string(),
394
+ created_at: zod_1.z.number().optional(),
395
+ updated_at: zod_1.z.number().optional(), // last update date
396
+ });
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.141",
3
+ "version": "1.0.143",
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
@@ -86,6 +86,7 @@ export const zodQuerySchema = z.object({
86
86
  timestamp: z.number().optional(), // creation date
87
87
  job_id: z.string().optional(), // optional job ID associated with the query
88
88
  requested_content: z.array(z.enum(requestedContentList)).optional(), // array of requested content types
89
+ region_id: z.string().optional(), // optional region ID associated with the query
89
90
  });
90
91
 
91
92
  export const zodInstructionsSchema = z.object({
@@ -421,6 +422,7 @@ export const zodTierSchema = z.object({
421
422
  features: z.object({
422
423
  events: z.object({
423
424
  has_access: z.boolean().default(false), // true if the tier has access to events data
425
+ include_sources: z.boolean().default(false), // true if the tier includes sources data in events
424
426
  }),
425
427
  ask: z.object({
426
428
  has_access: z.boolean().default(false), // true if the tier has access to ask feature
@@ -443,6 +445,15 @@ export const zodTierSchema = z.object({
443
445
  updated_at: z.number().optional(), // last update date
444
446
  });
445
447
 
448
+ export const zodEventsObservationSchema = z.object({
449
+ _id: z.string().optional(),
450
+ user_id: z.string(), // user identifier
451
+ event_id: z.string(), // event identifier
452
+ observation: z.string(), // observation text
453
+ created_at: z.number().optional(), // creation date
454
+ updated_at: z.number().optional(), // last update date
455
+ })
456
+
446
457
  /**
447
458
  * 'approved' - active and approved sources,
448
459
  * 'back_to_business' - sources that were paused and now resumed,