asfur 1.0.135 → 1.0.137
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 +82 -0
- package/dist/index.js +29 -1
- package/dist/types.d.ts +133 -0
- package/dist/types.js +26 -1
- package/index.ts +32 -0
- package/package.json +1 -1
- package/types.ts +28 -1
package/dist/index.d.ts
CHANGED
|
@@ -1002,3 +1002,85 @@ export declare const MongoUserRequestSchema: Schema<any, import("mongoose").Mode
|
|
|
1002
1002
|
} & {
|
|
1003
1003
|
__v: number;
|
|
1004
1004
|
}>;
|
|
1005
|
+
export declare const MongoTierSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1006
|
+
versionKey: false;
|
|
1007
|
+
toJSON: {
|
|
1008
|
+
virtuals: true;
|
|
1009
|
+
};
|
|
1010
|
+
toObject: {
|
|
1011
|
+
virtuals: true;
|
|
1012
|
+
};
|
|
1013
|
+
}, {
|
|
1014
|
+
created_at: number;
|
|
1015
|
+
updated_at: number;
|
|
1016
|
+
name: string;
|
|
1017
|
+
description?: string | null | undefined;
|
|
1018
|
+
features?: {
|
|
1019
|
+
events?: {
|
|
1020
|
+
has_access: boolean;
|
|
1021
|
+
} | null | undefined;
|
|
1022
|
+
ask?: {
|
|
1023
|
+
has_access: boolean;
|
|
1024
|
+
has_limit: boolean;
|
|
1025
|
+
asks_limit?: number | null | undefined;
|
|
1026
|
+
} | null | undefined;
|
|
1027
|
+
jobs?: {
|
|
1028
|
+
has_access: boolean;
|
|
1029
|
+
active_jobs_limit?: number | null | undefined;
|
|
1030
|
+
} | null | undefined;
|
|
1031
|
+
scenarios?: {
|
|
1032
|
+
has_access: boolean;
|
|
1033
|
+
active_scenarios_limit?: number | null | undefined;
|
|
1034
|
+
} | null | undefined;
|
|
1035
|
+
} | null | undefined;
|
|
1036
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
1037
|
+
created_at: number;
|
|
1038
|
+
updated_at: number;
|
|
1039
|
+
name: string;
|
|
1040
|
+
description?: string | null | undefined;
|
|
1041
|
+
features?: {
|
|
1042
|
+
events?: {
|
|
1043
|
+
has_access: boolean;
|
|
1044
|
+
} | null | undefined;
|
|
1045
|
+
ask?: {
|
|
1046
|
+
has_access: boolean;
|
|
1047
|
+
has_limit: boolean;
|
|
1048
|
+
asks_limit?: number | null | undefined;
|
|
1049
|
+
} | null | undefined;
|
|
1050
|
+
jobs?: {
|
|
1051
|
+
has_access: boolean;
|
|
1052
|
+
active_jobs_limit?: number | null | undefined;
|
|
1053
|
+
} | null | undefined;
|
|
1054
|
+
scenarios?: {
|
|
1055
|
+
has_access: boolean;
|
|
1056
|
+
active_scenarios_limit?: number | null | undefined;
|
|
1057
|
+
} | null | undefined;
|
|
1058
|
+
} | null | undefined;
|
|
1059
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
1060
|
+
created_at: number;
|
|
1061
|
+
updated_at: number;
|
|
1062
|
+
name: string;
|
|
1063
|
+
description?: string | null | undefined;
|
|
1064
|
+
features?: {
|
|
1065
|
+
events?: {
|
|
1066
|
+
has_access: boolean;
|
|
1067
|
+
} | null | undefined;
|
|
1068
|
+
ask?: {
|
|
1069
|
+
has_access: boolean;
|
|
1070
|
+
has_limit: boolean;
|
|
1071
|
+
asks_limit?: number | null | undefined;
|
|
1072
|
+
} | null | undefined;
|
|
1073
|
+
jobs?: {
|
|
1074
|
+
has_access: boolean;
|
|
1075
|
+
active_jobs_limit?: number | null | undefined;
|
|
1076
|
+
} | null | undefined;
|
|
1077
|
+
scenarios?: {
|
|
1078
|
+
has_access: boolean;
|
|
1079
|
+
active_scenarios_limit?: number | null | undefined;
|
|
1080
|
+
} | null | undefined;
|
|
1081
|
+
} | null | undefined;
|
|
1082
|
+
}> & {
|
|
1083
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1084
|
+
} & {
|
|
1085
|
+
__v: number;
|
|
1086
|
+
}>;
|
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.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;
|
|
17
|
+
exports.MongoTierSchema = 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");
|
|
@@ -387,3 +387,31 @@ exports.MongoUserRequestSchema = new mongoose_1.Schema({
|
|
|
387
387
|
toJSON: { virtuals: true },
|
|
388
388
|
toObject: { virtuals: true },
|
|
389
389
|
});
|
|
390
|
+
exports.MongoTierSchema = new mongoose_1.Schema({
|
|
391
|
+
name: { type: String, required: true },
|
|
392
|
+
description: { type: String },
|
|
393
|
+
features: {
|
|
394
|
+
events: {
|
|
395
|
+
has_access: { type: Boolean, default: true }, // true if the tier has access to events data
|
|
396
|
+
},
|
|
397
|
+
ask: {
|
|
398
|
+
has_access: { type: Boolean, default: false },
|
|
399
|
+
has_limit: { type: Boolean, default: false },
|
|
400
|
+
asks_limit: { type: Number }, // maximum number of asks allowed for the tier
|
|
401
|
+
},
|
|
402
|
+
jobs: {
|
|
403
|
+
has_access: { type: Boolean, default: false },
|
|
404
|
+
active_jobs_limit: { type: Number }, // maximum number of active jobs allowed for the tier
|
|
405
|
+
},
|
|
406
|
+
scenarios: {
|
|
407
|
+
has_access: { type: Boolean, default: false },
|
|
408
|
+
active_scenarios_limit: { type: Number }, // maximum number of active scenarios allowed for the tier
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
created_at: { type: Number, default: Date.now },
|
|
412
|
+
updated_at: { type: Number, default: Date.now }, // last update date
|
|
413
|
+
}, {
|
|
414
|
+
versionKey: false,
|
|
415
|
+
toJSON: { virtuals: true },
|
|
416
|
+
toObject: { virtuals: true },
|
|
417
|
+
});
|
package/dist/types.d.ts
CHANGED
|
@@ -2365,6 +2365,137 @@ export declare const zodUserRequestSchema: z.ZodObject<{
|
|
|
2365
2365
|
file_url?: string | undefined;
|
|
2366
2366
|
admin_notes?: string | undefined;
|
|
2367
2367
|
}>;
|
|
2368
|
+
export declare const zodTierSchema: z.ZodObject<{
|
|
2369
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
2370
|
+
name: z.ZodString;
|
|
2371
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2372
|
+
features: z.ZodObject<{
|
|
2373
|
+
events: z.ZodObject<{
|
|
2374
|
+
has_access: z.ZodDefault<z.ZodBoolean>;
|
|
2375
|
+
}, "strip", z.ZodTypeAny, {
|
|
2376
|
+
has_access: boolean;
|
|
2377
|
+
}, {
|
|
2378
|
+
has_access?: boolean | undefined;
|
|
2379
|
+
}>;
|
|
2380
|
+
ask: z.ZodObject<{
|
|
2381
|
+
has_access: z.ZodDefault<z.ZodBoolean>;
|
|
2382
|
+
has_limit: z.ZodDefault<z.ZodBoolean>;
|
|
2383
|
+
asks_limit: z.ZodOptional<z.ZodNumber>;
|
|
2384
|
+
}, "strip", z.ZodTypeAny, {
|
|
2385
|
+
has_access: boolean;
|
|
2386
|
+
has_limit: boolean;
|
|
2387
|
+
asks_limit?: number | undefined;
|
|
2388
|
+
}, {
|
|
2389
|
+
has_access?: boolean | undefined;
|
|
2390
|
+
has_limit?: boolean | undefined;
|
|
2391
|
+
asks_limit?: number | undefined;
|
|
2392
|
+
}>;
|
|
2393
|
+
jobs: z.ZodObject<{
|
|
2394
|
+
has_access: z.ZodDefault<z.ZodBoolean>;
|
|
2395
|
+
active_jobs_limit: z.ZodOptional<z.ZodNumber>;
|
|
2396
|
+
}, "strip", z.ZodTypeAny, {
|
|
2397
|
+
has_access: boolean;
|
|
2398
|
+
active_jobs_limit?: number | undefined;
|
|
2399
|
+
}, {
|
|
2400
|
+
active_jobs_limit?: number | undefined;
|
|
2401
|
+
has_access?: boolean | undefined;
|
|
2402
|
+
}>;
|
|
2403
|
+
scenarios: z.ZodObject<{
|
|
2404
|
+
has_access: z.ZodDefault<z.ZodBoolean>;
|
|
2405
|
+
active_scenarios_limit: z.ZodOptional<z.ZodNumber>;
|
|
2406
|
+
}, "strip", z.ZodTypeAny, {
|
|
2407
|
+
has_access: boolean;
|
|
2408
|
+
active_scenarios_limit?: number | undefined;
|
|
2409
|
+
}, {
|
|
2410
|
+
has_access?: boolean | undefined;
|
|
2411
|
+
active_scenarios_limit?: number | undefined;
|
|
2412
|
+
}>;
|
|
2413
|
+
}, "strip", z.ZodTypeAny, {
|
|
2414
|
+
events: {
|
|
2415
|
+
has_access: boolean;
|
|
2416
|
+
};
|
|
2417
|
+
ask: {
|
|
2418
|
+
has_access: boolean;
|
|
2419
|
+
has_limit: boolean;
|
|
2420
|
+
asks_limit?: number | undefined;
|
|
2421
|
+
};
|
|
2422
|
+
jobs: {
|
|
2423
|
+
has_access: boolean;
|
|
2424
|
+
active_jobs_limit?: number | undefined;
|
|
2425
|
+
};
|
|
2426
|
+
scenarios: {
|
|
2427
|
+
has_access: boolean;
|
|
2428
|
+
active_scenarios_limit?: number | undefined;
|
|
2429
|
+
};
|
|
2430
|
+
}, {
|
|
2431
|
+
events: {
|
|
2432
|
+
has_access?: boolean | undefined;
|
|
2433
|
+
};
|
|
2434
|
+
ask: {
|
|
2435
|
+
has_access?: boolean | undefined;
|
|
2436
|
+
has_limit?: boolean | undefined;
|
|
2437
|
+
asks_limit?: number | undefined;
|
|
2438
|
+
};
|
|
2439
|
+
jobs: {
|
|
2440
|
+
active_jobs_limit?: number | undefined;
|
|
2441
|
+
has_access?: boolean | undefined;
|
|
2442
|
+
};
|
|
2443
|
+
scenarios: {
|
|
2444
|
+
has_access?: boolean | undefined;
|
|
2445
|
+
active_scenarios_limit?: number | undefined;
|
|
2446
|
+
};
|
|
2447
|
+
}>;
|
|
2448
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
2449
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
2450
|
+
}, "strip", z.ZodTypeAny, {
|
|
2451
|
+
name: string;
|
|
2452
|
+
features: {
|
|
2453
|
+
events: {
|
|
2454
|
+
has_access: boolean;
|
|
2455
|
+
};
|
|
2456
|
+
ask: {
|
|
2457
|
+
has_access: boolean;
|
|
2458
|
+
has_limit: boolean;
|
|
2459
|
+
asks_limit?: number | undefined;
|
|
2460
|
+
};
|
|
2461
|
+
jobs: {
|
|
2462
|
+
has_access: boolean;
|
|
2463
|
+
active_jobs_limit?: number | undefined;
|
|
2464
|
+
};
|
|
2465
|
+
scenarios: {
|
|
2466
|
+
has_access: boolean;
|
|
2467
|
+
active_scenarios_limit?: number | undefined;
|
|
2468
|
+
};
|
|
2469
|
+
};
|
|
2470
|
+
_id?: string | undefined;
|
|
2471
|
+
created_at?: number | undefined;
|
|
2472
|
+
updated_at?: number | undefined;
|
|
2473
|
+
description?: string | undefined;
|
|
2474
|
+
}, {
|
|
2475
|
+
name: string;
|
|
2476
|
+
features: {
|
|
2477
|
+
events: {
|
|
2478
|
+
has_access?: boolean | undefined;
|
|
2479
|
+
};
|
|
2480
|
+
ask: {
|
|
2481
|
+
has_access?: boolean | undefined;
|
|
2482
|
+
has_limit?: boolean | undefined;
|
|
2483
|
+
asks_limit?: number | undefined;
|
|
2484
|
+
};
|
|
2485
|
+
jobs: {
|
|
2486
|
+
active_jobs_limit?: number | undefined;
|
|
2487
|
+
has_access?: boolean | undefined;
|
|
2488
|
+
};
|
|
2489
|
+
scenarios: {
|
|
2490
|
+
has_access?: boolean | undefined;
|
|
2491
|
+
active_scenarios_limit?: number | undefined;
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
_id?: string | undefined;
|
|
2495
|
+
created_at?: number | undefined;
|
|
2496
|
+
updated_at?: number | undefined;
|
|
2497
|
+
description?: string | undefined;
|
|
2498
|
+
}>;
|
|
2368
2499
|
/**
|
|
2369
2500
|
* 'approved' - active and approved sources,
|
|
2370
2501
|
* 'back_to_business' - sources that were paused and now resumed,
|
|
@@ -2396,6 +2527,7 @@ export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
|
|
|
2396
2527
|
export type FavoriteEventType = z.infer<typeof zodFavoriteEventSchema>;
|
|
2397
2528
|
export type PolygonType = z.infer<typeof zodPolygonSchema>;
|
|
2398
2529
|
export type UserRequestType = z.infer<typeof zodUserRequestSchema>;
|
|
2530
|
+
export type TierType = z.infer<typeof zodTierSchema>;
|
|
2399
2531
|
export type UserPublicMetadata = {
|
|
2400
2532
|
is_admin?: boolean;
|
|
2401
2533
|
regions?: {
|
|
@@ -2404,6 +2536,7 @@ export type UserPublicMetadata = {
|
|
|
2404
2536
|
is_primary?: boolean;
|
|
2405
2537
|
}[];
|
|
2406
2538
|
notes?: string;
|
|
2539
|
+
tier_id?: string;
|
|
2407
2540
|
} & UserSettingsType;
|
|
2408
2541
|
export type MessageMetaData = {
|
|
2409
2542
|
geoLocations?: string[];
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
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;
|
|
4
4
|
const harvester_sdk_1 = require("harvester_sdk");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.generalStatusList = ['active', 'inactive'];
|
|
@@ -355,3 +355,28 @@ exports.zodUserRequestSchema = zod_1.z.object({
|
|
|
355
355
|
status: zod_1.z.string().optional(),
|
|
356
356
|
admin_notes: zod_1.z.string().optional(), // internal notes for admins regarding the user request
|
|
357
357
|
});
|
|
358
|
+
exports.zodTierSchema = zod_1.z.object({
|
|
359
|
+
_id: zod_1.z.string().optional(),
|
|
360
|
+
name: zod_1.z.string(),
|
|
361
|
+
description: zod_1.z.string().optional(),
|
|
362
|
+
features: zod_1.z.object({
|
|
363
|
+
events: zod_1.z.object({
|
|
364
|
+
has_access: zod_1.z.boolean().default(false), // true if the tier has access to events data
|
|
365
|
+
}),
|
|
366
|
+
ask: zod_1.z.object({
|
|
367
|
+
has_access: zod_1.z.boolean().default(false),
|
|
368
|
+
has_limit: zod_1.z.boolean().default(false),
|
|
369
|
+
asks_limit: zod_1.z.number().optional(), // maximum number of asks allowed for the tier
|
|
370
|
+
}),
|
|
371
|
+
jobs: zod_1.z.object({
|
|
372
|
+
has_access: zod_1.z.boolean().default(false),
|
|
373
|
+
active_jobs_limit: zod_1.z.number().optional(), // maximum number of active jobs allowed for the tier
|
|
374
|
+
}),
|
|
375
|
+
scenarios: zod_1.z.object({
|
|
376
|
+
has_access: zod_1.z.boolean().default(false),
|
|
377
|
+
active_scenarios_limit: zod_1.z.number().optional(), // maximum number of active scenarios allowed for the tier
|
|
378
|
+
}),
|
|
379
|
+
}),
|
|
380
|
+
created_at: zod_1.z.number().optional(),
|
|
381
|
+
updated_at: zod_1.z.number().optional(), // last update date
|
|
382
|
+
});
|
package/index.ts
CHANGED
|
@@ -453,4 +453,36 @@ export const MongoUserRequestSchema = new Schema(
|
|
|
453
453
|
},
|
|
454
454
|
);
|
|
455
455
|
|
|
456
|
+
export const MongoTierSchema = new Schema(
|
|
457
|
+
{
|
|
458
|
+
name: { type: String, required: true }, // name of the tier (e.g., "free", "pro", "enterprise")
|
|
459
|
+
description: { type: String }, // optional description of the tier
|
|
460
|
+
features: {
|
|
461
|
+
events: {
|
|
462
|
+
has_access: { type: Boolean, default: true }, // true if the tier has access to events data
|
|
463
|
+
},
|
|
464
|
+
ask: {
|
|
465
|
+
has_access: { type: Boolean, default: false }, // true if the tier has access to ask feature
|
|
466
|
+
has_limit: { type: Boolean, default: false }, // true if there is a limit on the number of asks for the tier
|
|
467
|
+
asks_limit: { type: Number }, // maximum number of asks allowed for the tier
|
|
468
|
+
},
|
|
469
|
+
jobs: {
|
|
470
|
+
has_access: { type: Boolean, default: false }, // true if the tier has access to jobs feature
|
|
471
|
+
active_jobs_limit: { type: Number }, // maximum number of active jobs allowed for the tier
|
|
472
|
+
},
|
|
473
|
+
scenarios: {
|
|
474
|
+
has_access: { type: Boolean, default: false }, // true if the tier has access to scenarios feature
|
|
475
|
+
active_scenarios_limit: { type: Number }, // maximum number of active scenarios allowed for the tier
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
created_at: { type: Number, default: Date.now }, // creation date
|
|
479
|
+
updated_at: { type: Number, default: Date.now }, // last update date
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
versionKey: false,
|
|
483
|
+
toJSON: { virtuals: true },
|
|
484
|
+
toObject: { virtuals: true },
|
|
485
|
+
},
|
|
486
|
+
);
|
|
487
|
+
|
|
456
488
|
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -413,6 +413,32 @@ export const zodUserRequestSchema = z.object({
|
|
|
413
413
|
admin_notes: z.string().optional(), // internal notes for admins regarding the user request
|
|
414
414
|
});
|
|
415
415
|
|
|
416
|
+
export const zodTierSchema = z.object({
|
|
417
|
+
_id: z.string().optional(),
|
|
418
|
+
name: z.string(), // name of the tier (e.g., "free", "pro", "enterprise")
|
|
419
|
+
description: z.string().optional(), // optional description of the tier
|
|
420
|
+
features: z.object({
|
|
421
|
+
events: z.object({
|
|
422
|
+
has_access: z.boolean().default(false), // true if the tier has access to events data
|
|
423
|
+
}),
|
|
424
|
+
ask: z.object({
|
|
425
|
+
has_access: z.boolean().default(false), // true if the tier has access to ask feature
|
|
426
|
+
has_limit: z.boolean().default(false), // true if there is a limit on the number of asks for the tier
|
|
427
|
+
asks_limit: z.number().optional(), // maximum number of asks allowed for the tier
|
|
428
|
+
}),
|
|
429
|
+
jobs: z.object({
|
|
430
|
+
has_access: z.boolean().default(false), // true if the tier has access to jobs feature
|
|
431
|
+
active_jobs_limit: z.number().optional(), // maximum number of active jobs allowed for the tier
|
|
432
|
+
}),
|
|
433
|
+
scenarios: z.object({
|
|
434
|
+
has_access: z.boolean().default(false), // true if the tier has access to scenarios feature
|
|
435
|
+
active_scenarios_limit: z.number().optional(), // maximum number of active scenarios allowed for the tier
|
|
436
|
+
}),
|
|
437
|
+
}),
|
|
438
|
+
created_at: z.number().optional(), // creation date
|
|
439
|
+
updated_at: z.number().optional(), // last update date
|
|
440
|
+
});
|
|
441
|
+
|
|
416
442
|
/**
|
|
417
443
|
* 'approved' - active and approved sources,
|
|
418
444
|
* 'back_to_business' - sources that were paused and now resumed,
|
|
@@ -449,7 +475,7 @@ export type GeoSelectionGroupType = z.infer<typeof zodGeoSelectionGroupSchema>;
|
|
|
449
475
|
export type FavoriteEventType = z.infer<typeof zodFavoriteEventSchema>;
|
|
450
476
|
export type PolygonType = z.infer<typeof zodPolygonSchema>;
|
|
451
477
|
export type UserRequestType = z.infer<typeof zodUserRequestSchema>;
|
|
452
|
-
|
|
478
|
+
export type TierType = z.infer<typeof zodTierSchema>;
|
|
453
479
|
export type UserPublicMetadata = {
|
|
454
480
|
is_admin?: boolean;
|
|
455
481
|
regions?: {
|
|
@@ -458,6 +484,7 @@ export type UserPublicMetadata = {
|
|
|
458
484
|
is_primary?: boolean;
|
|
459
485
|
}[];
|
|
460
486
|
notes?: string;
|
|
487
|
+
tier_id?: string;
|
|
461
488
|
} & UserSettingsType;
|
|
462
489
|
|
|
463
490
|
export type MessageMetaData = {
|