asfur 1.0.81 → 1.0.83

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/types.d.ts CHANGED
@@ -2,32 +2,9 @@ import { z } from 'zod';
2
2
  export declare const platformsList: readonly ["telegram", "facebook", "instagram", "tiktok", "website", "document", "other"];
3
3
  export declare const statusList: readonly ["approved", "back_to_business", "pending", "inactive", "in_review"];
4
4
  export declare const generalStatusList: readonly ["active", "inactive"];
5
- export declare const geoSelectionRegionsList: {
6
- iran: {
7
- title: string;
8
- index: string;
9
- };
10
- gaza: {
11
- title: string;
12
- index: string;
13
- };
14
- west_bank: {
15
- title: string;
16
- index: string;
17
- };
18
- us_mexico_border: {
19
- title: string;
20
- index: string;
21
- };
22
- lebanon: {
23
- title: string;
24
- index: string;
25
- };
26
- };
27
- export type GeoSelectionRegionsType = keyof typeof geoSelectionRegionsList;
28
- export type GeoSelectionByRegion = {
29
- [region in GeoSelectionRegionsType]: GeoSelectionType[];
30
- };
5
+ export interface GeoSelectionByRegion {
6
+ [region: string]: GeoSelectionType[];
7
+ }
31
8
  export declare const zodGeoSchema: z.ZodObject<{
32
9
  _id: z.ZodOptional<z.ZodString>;
33
10
  geo_text: z.ZodOptional<z.ZodString>;
@@ -692,3 +669,21 @@ export type CronScheduleResponseType = z.infer<typeof zodCronScheduleResponseSch
692
669
  export type GeoType = z.infer<typeof zodGeoSchema>;
693
670
  export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
694
671
  export type ApiKeyType = z.infer<typeof zodApiKeySchema>;
672
+ export type UserPublicMetadata = {
673
+ is_admin?: boolean;
674
+ regions?: {
675
+ name: string;
676
+ _id: string;
677
+ }[];
678
+ notes?: string;
679
+ };
680
+ export type MessageMetaData = {
681
+ geoLocations?: string[];
682
+ startDate?: string;
683
+ endDate?: string;
684
+ documents?: number;
685
+ userInstructions?: string;
686
+ sourceDocumentCounts?: {
687
+ [key: string]: number;
688
+ };
689
+ };
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodApiKeySchema = exports.zodCronScheduleResponseSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.zodGeoSelectionSchema = exports.zodGeoSchema = exports.geoSelectionRegionsList = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
3
+ exports.zodApiKeySchema = exports.zodCronScheduleResponseSchema = exports.zodJobSchema = exports.zodConversationSchema = exports.zodUserSettingsSchema = exports.zodInstructionsSchema = exports.zodQuerySchema = exports.zodAbsoluteTimeRangeSchema = exports.zodRelativeTimeRangeSchema = exports.relativeTimeRangeList = exports.zodDataSchema = exports.zodSourceSchema = exports.zodGeoSelectionSchema = exports.zodGeoSchema = exports.generalStatusList = exports.statusList = exports.platformsList = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.platformsList = [
6
6
  'telegram',
@@ -19,28 +19,6 @@ exports.statusList = [
19
19
  'in_review', // sources that are under review
20
20
  ];
21
21
  exports.generalStatusList = ['active', 'inactive'];
22
- exports.geoSelectionRegionsList = {
23
- iran: {
24
- title: 'Iran',
25
- index: 'iran',
26
- },
27
- gaza: {
28
- title: 'Gaza',
29
- index: 'gaza',
30
- },
31
- west_bank: {
32
- title: 'West Bank',
33
- index: 'west_bank',
34
- },
35
- us_mexico_border: {
36
- title: 'US-Mexico Border',
37
- index: 'us_mexico_border',
38
- },
39
- lebanon: {
40
- title: 'Lebanon',
41
- index: 'lebanon',
42
- },
43
- };
44
22
  exports.zodGeoSchema = zod_1.z.object({
45
23
  _id: zod_1.z.string().optional(),
46
24
  geo_text: zod_1.z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
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
@@ -20,35 +20,10 @@ export const statusList = [
20
20
 
21
21
  export const generalStatusList = ['active', 'inactive'] as const;
22
22
 
23
- export const geoSelectionRegionsList = {
24
- iran: {
25
- title: 'Iran',
26
- index: 'iran',
27
- },
28
- gaza: {
29
- title: 'Gaza',
30
- index: 'gaza',
31
- },
32
- west_bank: {
33
- title: 'West Bank',
34
- index: 'west_bank',
35
- },
36
- us_mexico_border: {
37
- title: 'US-Mexico Border',
38
- index: 'us_mexico_border',
39
- },
40
- lebanon: {
41
- title: 'Lebanon',
42
- index: 'lebanon',
43
- },
23
+ export interface GeoSelectionByRegion {
24
+ [region: string]: GeoSelectionType[];
44
25
  }
45
26
 
46
- export type GeoSelectionRegionsType = keyof typeof geoSelectionRegionsList;
47
-
48
- export type GeoSelectionByRegion = {
49
- [region in GeoSelectionRegionsType]: GeoSelectionType[];
50
- };
51
-
52
27
  export const zodGeoSchema = z.object({
53
28
  _id: z.string().optional(),
54
29
  geo_text: z.string().optional(), // e.g., "New York, USA"
@@ -268,4 +243,22 @@ export type CronScheduleResponseType = z.infer<
268
243
  >;
269
244
  export type GeoType = z.infer<typeof zodGeoSchema>;
270
245
  export type GeoSelectionType = z.infer<typeof zodGeoSelectionSchema>;
271
- export type ApiKeyType = z.infer<typeof zodApiKeySchema>;
246
+ export type ApiKeyType = z.infer<typeof zodApiKeySchema>;
247
+
248
+ export type UserPublicMetadata = {
249
+ is_admin?: boolean;
250
+ regions?: {
251
+ name: string;
252
+ _id: string;
253
+ }[];
254
+ notes?: string;
255
+ };
256
+
257
+ export type MessageMetaData = {
258
+ geoLocations?: string[];
259
+ startDate?: string;
260
+ endDate?: string;
261
+ documents?: number;
262
+ userInstructions?: string;
263
+ sourceDocumentCounts?: { [key: string]: number };
264
+ };