@timardex/cluemart-server-shared 2.5.1 → 3.0.1

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.
@@ -1,10 +1,10 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { AdType, AdDailyPriceType, AdBookingType, AdMetricsType, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, DateTimeType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, EnumResourceType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from '../index-CmtBYjpi.mjs';
5
- export { C as ChatModel, N as NotificationModel, S as SchemaChatMessageReactionType, a as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, d as SchemaChatType, e as SchemaCreateBulkNotificationInput, f as SchemaNotificationType, g as SchemaParticipantType } from '../index-CmtBYjpi.mjs';
6
- import { S as SchemaOwnerType } from '../Affiliate-DIAzxxfs.mjs';
7
- export { A as AffiliateModel, C as CategorySchema, a as ContactDetailsSchema, O as OwnerTypeSchema, R as RelationModel, b as RelationTypeSchema, c as ResourceImageTypeSchema, d as SchemaAffiliateResourceType, e as SchemaAffiliateReward, f as SchemaRelatedPostType, g as SchemaRelationType, h as SchemaStripeSubscription, i as SchemaUserActivityEvent, j as SchemaUserType, k as SocialMediaTypeSchema, U as UserModel, l as baseResourceFields, m as dateTimeSchema, n as locationGeoSchema, o as locationsSchema, r as relatedPostSchema, p as relationDatesSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-DIAzxxfs.mjs';
4
+ import { O as ObjectId } from '../index-BptxBl9x.mjs';
5
+ export { C as ChatModel, N as NotificationModel, S as SchemaChatMessageReactionType, a as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, d as SchemaChatType, e as SchemaCreateBulkNotificationInput, f as SchemaNotificationType, g as SchemaParticipantType } from '../index-BptxBl9x.mjs';
6
+ import { S as SchemaOwnerType } from '../Affiliate-CpoM9_Bb.mjs';
7
+ export { A as AffiliateModel, C as CategorySchema, a as ContactDetailsSchema, O as OwnerTypeSchema, R as RelationModel, b as RelationTypeSchema, c as ResourceImageTypeSchema, d as SchemaAffiliateResourceType, e as SchemaAffiliateReward, f as SchemaRelatedPostType, g as SchemaRelationType, h as SchemaStripeSubscription, i as SchemaUserActivityEvent, j as SchemaUserType, k as SocialMediaTypeSchema, U as UserModel, l as baseResourceFields, m as dateTimeSchema, n as locationGeoSchema, o as locationsSchema, r as relatedPostSchema, p as relationDatesSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-CpoM9_Bb.mjs';
8
8
  import '@timardex/cluemart-shared/types';
9
9
  import 'express';
10
10
 
@@ -336,6 +336,28 @@ declare const AppSettingModel: mongoose__default.Model<SchemaAppSettingsType, {}
336
336
  __v: number;
337
337
  }, any>;
338
338
 
339
+ /**
340
+ * Single-use record backing a WebView auto-login handoff.
341
+ *
342
+ * The app mints a short-lived signed token and opens the admin site with it;
343
+ * the admin site exchanges the token for its own admin-slot session. Keeping
344
+ * the `jti` here (with an atomic `usedAt` update) makes the token replay-proof
345
+ * across server instances — a purely in-memory store would not.
346
+ */
347
+ interface AuthHandoffTokenType {
348
+ createdAt: Date;
349
+ expiresAt: Date;
350
+ jti: string;
351
+ updatedAt: Date;
352
+ usedAt: Date | null;
353
+ userId: ObjectId;
354
+ }
355
+ declare const AuthHandoffTokenModel: mongoose__default.Model<AuthHandoffTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, AuthHandoffTokenType, {}, {}> & AuthHandoffTokenType & {
356
+ _id: mongoose__default.Types.ObjectId;
357
+ } & {
358
+ __v: number;
359
+ }, any>;
360
+
339
361
  type SchemaGameType = Omit<GameType, "_id"> & {
340
362
  _id: ObjectId;
341
363
  };
@@ -406,4 +428,4 @@ declare const ImpersonationAuditModel: mongoose__default.Model<SchemaImpersonati
406
428
  __v: number;
407
429
  }, any>;
408
430
 
409
- export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
431
+ export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AppSettingModel, AuthHandoffTokenModel, type AuthHandoffTokenType, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
@@ -1,10 +1,10 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { AdType, AdDailyPriceType, AdBookingType, AdMetricsType, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, DateTimeType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, EnumResourceType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from '../index-CmtBYjpi.js';
5
- export { C as ChatModel, N as NotificationModel, S as SchemaChatMessageReactionType, a as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, d as SchemaChatType, e as SchemaCreateBulkNotificationInput, f as SchemaNotificationType, g as SchemaParticipantType } from '../index-CmtBYjpi.js';
6
- import { S as SchemaOwnerType } from '../Affiliate-zioeZDyH.js';
7
- export { A as AffiliateModel, C as CategorySchema, a as ContactDetailsSchema, O as OwnerTypeSchema, R as RelationModel, b as RelationTypeSchema, c as ResourceImageTypeSchema, d as SchemaAffiliateResourceType, e as SchemaAffiliateReward, f as SchemaRelatedPostType, g as SchemaRelationType, h as SchemaStripeSubscription, i as SchemaUserActivityEvent, j as SchemaUserType, k as SocialMediaTypeSchema, U as UserModel, l as baseResourceFields, m as dateTimeSchema, n as locationGeoSchema, o as locationsSchema, r as relatedPostSchema, p as relationDatesSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-zioeZDyH.js';
4
+ import { O as ObjectId } from '../index-BptxBl9x.js';
5
+ export { C as ChatModel, N as NotificationModel, S as SchemaChatMessageReactionType, a as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, d as SchemaChatType, e as SchemaCreateBulkNotificationInput, f as SchemaNotificationType, g as SchemaParticipantType } from '../index-BptxBl9x.js';
6
+ import { S as SchemaOwnerType } from '../Affiliate-YoKkDGxN.js';
7
+ export { A as AffiliateModel, C as CategorySchema, a as ContactDetailsSchema, O as OwnerTypeSchema, R as RelationModel, b as RelationTypeSchema, c as ResourceImageTypeSchema, d as SchemaAffiliateResourceType, e as SchemaAffiliateReward, f as SchemaRelatedPostType, g as SchemaRelationType, h as SchemaStripeSubscription, i as SchemaUserActivityEvent, j as SchemaUserType, k as SocialMediaTypeSchema, U as UserModel, l as baseResourceFields, m as dateTimeSchema, n as locationGeoSchema, o as locationsSchema, r as relatedPostSchema, p as relationDatesSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-YoKkDGxN.js';
8
8
  import '@timardex/cluemart-shared/types';
9
9
  import 'express';
10
10
 
@@ -336,6 +336,28 @@ declare const AppSettingModel: mongoose__default.Model<SchemaAppSettingsType, {}
336
336
  __v: number;
337
337
  }, any>;
338
338
 
339
+ /**
340
+ * Single-use record backing a WebView auto-login handoff.
341
+ *
342
+ * The app mints a short-lived signed token and opens the admin site with it;
343
+ * the admin site exchanges the token for its own admin-slot session. Keeping
344
+ * the `jti` here (with an atomic `usedAt` update) makes the token replay-proof
345
+ * across server instances — a purely in-memory store would not.
346
+ */
347
+ interface AuthHandoffTokenType {
348
+ createdAt: Date;
349
+ expiresAt: Date;
350
+ jti: string;
351
+ updatedAt: Date;
352
+ usedAt: Date | null;
353
+ userId: ObjectId;
354
+ }
355
+ declare const AuthHandoffTokenModel: mongoose__default.Model<AuthHandoffTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, AuthHandoffTokenType, {}, {}> & AuthHandoffTokenType & {
356
+ _id: mongoose__default.Types.ObjectId;
357
+ } & {
358
+ __v: number;
359
+ }, any>;
360
+
339
361
  type SchemaGameType = Omit<GameType, "_id"> & {
340
362
  _id: ObjectId;
341
363
  };
@@ -406,4 +428,4 @@ declare const ImpersonationAuditModel: mongoose__default.Model<SchemaImpersonati
406
428
  __v: number;
407
429
  }, any>;
408
430
 
409
- export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
431
+ export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, AdMetricsModel, AdModel, AppSettingModel, AuthHandoffTokenModel, type AuthHandoffTokenType, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, ImpersonationAuditModel, ImpersonationSessionModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaImpersonationAuditType, type SchemaImpersonationSessionType, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
@@ -7,6 +7,7 @@ import {
7
7
  AdModel,
8
8
  AffiliateModel,
9
9
  AppSettingModel,
10
+ AuthHandoffTokenModel,
10
11
  BILLING_CATALOG_COLLECTION_NAME,
11
12
  BillingCatalogModel,
12
13
  CategorySchema,
@@ -52,7 +53,7 @@ import {
52
53
  termsAgreementSchema,
53
54
  userLicenseSchema,
54
55
  vendorProductTypeSchema
55
- } from "../chunk-X76LYIOC.mjs";
56
+ } from "../chunk-GDXPPYDN.mjs";
56
57
  export {
57
58
  AD_BILLING_CATALOG_COLLECTION_NAME,
58
59
  APP_SETTINGS_ID,
@@ -62,6 +63,7 @@ export {
62
63
  AdModel,
63
64
  AffiliateModel,
64
65
  AppSettingModel,
66
+ AuthHandoffTokenModel,
65
67
  BILLING_CATALOG_COLLECTION_NAME,
66
68
  BillingCatalogModel,
67
69
  CategorySchema,