asfur 1.0.21 → 1.0.22

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
@@ -516,28 +516,96 @@ export declare const MongoQuerySchema: Schema<{
516
516
  }> & {
517
517
  __v: number;
518
518
  }>;
519
- export declare const MongoUserSettingsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
520
- versionKey: false;
521
- toJSON: {
522
- virtuals: true;
519
+ export declare const MongoUserSettingsSchema: Schema<{
520
+ user_id: string;
521
+ sources: string[];
522
+ time_range: {
523
+ type: "relative";
524
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
525
+ } | {
526
+ type: "absolute";
527
+ start: number | Date;
528
+ end: number | Date;
529
+ };
530
+ _id?: string | undefined;
531
+ }, import("mongoose").Model<{
532
+ user_id: string;
533
+ sources: string[];
534
+ time_range: {
535
+ type: "relative";
536
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
537
+ } | {
538
+ type: "absolute";
539
+ start: number | Date;
540
+ end: number | Date;
523
541
  };
524
- toObject: {
525
- virtuals: true;
542
+ _id?: string | undefined;
543
+ }, any, any, any, import("mongoose").Document<unknown, any, {
544
+ user_id: string;
545
+ sources: string[];
546
+ time_range: {
547
+ type: "relative";
548
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
549
+ } | {
550
+ type: "absolute";
551
+ start: number | Date;
552
+ end: number | Date;
526
553
  };
527
- }, {
554
+ _id?: string | undefined;
555
+ }, any> & {
528
556
  user_id: string;
529
557
  sources: string[];
530
- time_range?: any;
558
+ time_range: {
559
+ type: "relative";
560
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
561
+ } | {
562
+ type: "absolute";
563
+ start: number | Date;
564
+ end: number | Date;
565
+ };
566
+ _id?: string | undefined;
567
+ } & Required<{
568
+ _id: string;
569
+ }> & {
570
+ __v: number;
571
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
572
+ user_id: string;
573
+ sources: string[];
574
+ time_range: {
575
+ type: "relative";
576
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
577
+ } | {
578
+ type: "absolute";
579
+ start: number | Date;
580
+ end: number | Date;
581
+ };
582
+ _id?: string | undefined;
531
583
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
532
584
  user_id: string;
533
585
  sources: string[];
534
- time_range?: any;
586
+ time_range: {
587
+ type: "relative";
588
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
589
+ } | {
590
+ type: "absolute";
591
+ start: number | Date;
592
+ end: number | Date;
593
+ };
594
+ _id?: string | undefined;
535
595
  }>, {}> & import("mongoose").FlatRecord<{
536
596
  user_id: string;
537
597
  sources: string[];
538
- time_range?: any;
598
+ time_range: {
599
+ type: "relative";
600
+ time: "last_12_hours" | "last_24_hours" | "last_48_hours" | "last_72_hours" | "last_week";
601
+ } | {
602
+ type: "absolute";
603
+ start: number | Date;
604
+ end: number | Date;
605
+ };
606
+ _id?: string | undefined;
607
+ }> & Required<{
608
+ _id: string;
539
609
  }> & {
540
- _id: import("mongoose").Types.ObjectId;
541
- } & {
542
610
  __v: number;
543
611
  }>;
package/index.ts CHANGED
@@ -2,7 +2,13 @@
2
2
  export * from './types';
3
3
 
4
4
  import { Schema } from 'mongoose';
5
- import { DataType, InstructionsType, QueryType, SourceType } from './types';
5
+ import {
6
+ DataType,
7
+ InstructionsType,
8
+ QueryType,
9
+ SourceType,
10
+ UserSettingsType,
11
+ } from './types';
6
12
 
7
13
  export const MongoDataSchema = new Schema<DataType>(
8
14
  {
@@ -107,7 +113,7 @@ export const MongoQuerySchema = new Schema<QueryType>(
107
113
  }
108
114
  );
109
115
 
110
- export const MongoUserSettingsSchema = new Schema(
116
+ export const MongoUserSettingsSchema = new Schema<UserSettingsType>(
111
117
  {
112
118
  sources: { type: [String] }, // array of source _id strings
113
119
  time_range: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "SDK for interacting with the Asfur API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",