asfur 1.0.132 → 1.0.133

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
@@ -953,3 +953,43 @@ export declare const MongoPolygonSchema: Schema<any, import("mongoose").Model<an
953
953
  } & {
954
954
  __v: number;
955
955
  }>;
956
+ export declare const MongoUserRequestSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
957
+ versionKey: false;
958
+ toJSON: {
959
+ virtuals: true;
960
+ };
961
+ toObject: {
962
+ virtuals: true;
963
+ };
964
+ }, {
965
+ user_id: string;
966
+ created_at: number;
967
+ updated_at: number;
968
+ request_type: string;
969
+ request: string;
970
+ status?: string | null | undefined;
971
+ file_url?: string | null | undefined;
972
+ admin_notes?: string | null | undefined;
973
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
974
+ user_id: string;
975
+ created_at: number;
976
+ updated_at: number;
977
+ request_type: string;
978
+ request: string;
979
+ status?: string | null | undefined;
980
+ file_url?: string | null | undefined;
981
+ admin_notes?: string | null | undefined;
982
+ }>, {}> & import("mongoose").FlatRecord<{
983
+ user_id: string;
984
+ created_at: number;
985
+ updated_at: number;
986
+ request_type: string;
987
+ request: string;
988
+ status?: string | null | undefined;
989
+ file_url?: string | null | undefined;
990
+ admin_notes?: string | null | undefined;
991
+ }> & {
992
+ _id: import("mongoose").Types.ObjectId;
993
+ } & {
994
+ __v: number;
995
+ }>;
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.MongoPolygonSchema = exports.MongoFavoriteEventSchema = exports.MongoGeoSelectionGroupSchema = exports.MongoPredefinedQuerySchema = exports.MongoSendWhatsappSchema = exports.MongoSendEmailSchema = exports.MongoMessageSchema = exports.MongoHeatmapSchema = exports.MongoScenarioScoreSchema = exports.MongoScenarioSchema = exports.MongoNotificationSchema = exports.MongoReportSchema = exports.MongoApiKeySchema = exports.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoInstructionsSchema = void 0;
17
+ exports.MongoUserRequestSchema = exports.MongoPolygonSchema = exports.MongoFavoriteEventSchema = exports.MongoGeoSelectionGroupSchema = exports.MongoPredefinedQuerySchema = exports.MongoSendWhatsappSchema = exports.MongoSendEmailSchema = exports.MongoMessageSchema = exports.MongoHeatmapSchema = exports.MongoScenarioScoreSchema = exports.MongoScenarioSchema = exports.MongoNotificationSchema = exports.MongoReportSchema = exports.MongoApiKeySchema = exports.MongoJobSchema = exports.MongoConversationSchema = exports.MongoUserSettingsSchema = exports.MongoQuerySchema = exports.MongoInstructionsSchema = void 0;
18
18
  // Export types for consumers
19
19
  __exportStar(require("./types"), exports);
20
20
  const mongoose_1 = require("mongoose");
@@ -370,3 +370,17 @@ exports.MongoPolygonSchema = new mongoose_1.Schema({
370
370
  toJSON: { virtuals: true },
371
371
  toObject: { virtuals: true },
372
372
  });
373
+ exports.MongoUserRequestSchema = new mongoose_1.Schema({
374
+ user_id: { type: String, required: true },
375
+ request_type: { type: String, required: true },
376
+ request: { type: String, required: true },
377
+ file_url: { type: String },
378
+ created_at: { type: Number, default: Date.now },
379
+ updated_at: { type: Number, default: Date.now },
380
+ status: { type: String },
381
+ admin_notes: { type: String }, // internal notes for admins regarding the user request
382
+ }, {
383
+ versionKey: false,
384
+ toJSON: { virtuals: true },
385
+ toObject: { virtuals: true },
386
+ });
package/dist/types.d.ts CHANGED
@@ -2325,6 +2325,37 @@ export declare const zodPolygonSchema: z.ZodObject<{
2325
2325
  description?: string | undefined;
2326
2326
  color?: string | undefined;
2327
2327
  }>;
2328
+ export declare const zodUserRequestSchema: z.ZodObject<{
2329
+ _id: z.ZodOptional<z.ZodString>;
2330
+ user_id: z.ZodString;
2331
+ request_type: z.ZodString;
2332
+ request: z.ZodString;
2333
+ file_url: z.ZodOptional<z.ZodString>;
2334
+ created_at: z.ZodOptional<z.ZodNumber>;
2335
+ updated_at: z.ZodOptional<z.ZodNumber>;
2336
+ status: z.ZodOptional<z.ZodString>;
2337
+ admin_notes: z.ZodOptional<z.ZodString>;
2338
+ }, "strip", z.ZodTypeAny, {
2339
+ user_id: string;
2340
+ request_type: string;
2341
+ request: string;
2342
+ status?: string | undefined;
2343
+ _id?: string | undefined;
2344
+ created_at?: number | undefined;
2345
+ updated_at?: number | undefined;
2346
+ file_url?: string | undefined;
2347
+ admin_notes?: string | undefined;
2348
+ }, {
2349
+ user_id: string;
2350
+ request_type: string;
2351
+ request: string;
2352
+ status?: string | undefined;
2353
+ _id?: string | undefined;
2354
+ created_at?: number | undefined;
2355
+ updated_at?: number | undefined;
2356
+ file_url?: string | undefined;
2357
+ admin_notes?: string | undefined;
2358
+ }>;
2328
2359
  /**
2329
2360
  * 'approved' - active and approved sources,
2330
2361
  * 'back_to_business' - sources that were paused and now resumed,
@@ -2355,6 +2386,7 @@ export type PredefinedQueryType = z.infer<typeof zodPredefinedQuerySchema>;
2355
2386
  export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
2356
2387
  export type FavoriteEventType = z.infer<typeof zodFavoriteEventSchema>;
2357
2388
  export type PolygonType = z.infer<typeof zodPolygonSchema>;
2389
+ export type UserRequestType = z.infer<typeof zodUserRequestSchema>;
2358
2390
  export type UserPublicMetadata = {
2359
2391
  is_admin?: boolean;
2360
2392
  regions?: {
package/dist/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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'];
@@ -341,3 +341,14 @@ exports.zodPolygonSchema = zod_1.z.object({
341
341
  updated_at: zod_1.z.number().optional(),
342
342
  color: zod_1.z.string().optional(), // optional color for displaying the polygon on the map
343
343
  });
344
+ exports.zodUserRequestSchema = zod_1.z.object({
345
+ _id: zod_1.z.string().optional(),
346
+ user_id: zod_1.z.string(),
347
+ request_type: zod_1.z.string(),
348
+ request: zod_1.z.string(),
349
+ file_url: zod_1.z.string().url().optional(),
350
+ created_at: zod_1.z.number().optional(),
351
+ updated_at: zod_1.z.number().optional(),
352
+ status: zod_1.z.string().optional(),
353
+ admin_notes: zod_1.z.string().optional(), // internal notes for admins regarding the user request
354
+ });
package/index.ts CHANGED
@@ -432,4 +432,22 @@ export const MongoPolygonSchema = new Schema(
432
432
  },
433
433
  );
434
434
 
435
+ export const MongoUserRequestSchema = new Schema(
436
+ {
437
+ user_id: { type: String, required: true }, // user identifier
438
+ request_type: { type: String, required: true },
439
+ request: { type: String, required: true }, // user request or feedback
440
+ file_url: { type: String }, // optional URL for any file attached to the request
441
+ created_at: { type: Number, default: Date.now }, // creation date
442
+ updated_at: { type: Number, default: Date.now }, // last update date
443
+ status: { type: String }, // status of the user request (e.g., "pending", "in_progress", "resolved")
444
+ admin_notes: { type: String }, // internal notes for admins regarding the user request
445
+ },
446
+ {
447
+ versionKey: false,
448
+ toJSON: { virtuals: true },
449
+ toObject: { virtuals: true },
450
+ },
451
+ );
452
+
435
453
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asfur",
3
- "version": "1.0.132",
3
+ "version": "1.0.133",
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
@@ -398,6 +398,18 @@ export const zodPolygonSchema = z.object({
398
398
  color: z.string().optional(), // optional color for displaying the polygon on the map
399
399
  });
400
400
 
401
+ export const zodUserRequestSchema = z.object({
402
+ _id: z.string().optional(),
403
+ user_id: z.string(), // user identifier
404
+ request_type: z.string(),
405
+ request: z.string(), // user request or feedback
406
+ file_url: z.string().url().optional(), // optional URL for any file attached to the request
407
+ created_at: z.number().optional(), // creation date
408
+ updated_at: z.number().optional(), // last update date
409
+ status: z.string().optional(), // status of the user request (e.g., "pending", "in_progress", "resolved")
410
+ admin_notes: z.string().optional(), // internal notes for admins regarding the user request
411
+ });
412
+
401
413
  /**
402
414
  * 'approved' - active and approved sources,
403
415
  * 'back_to_business' - sources that were paused and now resumed,
@@ -433,6 +445,7 @@ export type PredefinedQueryType = z.infer<typeof zodPredefinedQuerySchema>;
433
445
  export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
434
446
  export type FavoriteEventType = z.infer<typeof zodFavoriteEventSchema>;
435
447
  export type PolygonType = z.infer<typeof zodPolygonSchema>;
448
+ export type UserRequestType = z.infer<typeof zodUserRequestSchema>;
436
449
 
437
450
  export type UserPublicMetadata = {
438
451
  is_admin?: boolean;