@timardex/cluemart-server-shared 2.5.0 → 3.0.0

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,7 +1,7 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { OwnerType, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, AffiliateType, AffiliateResourceType, AffiliateRewardType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from './index-CmtBYjpi.js';
4
+ import { O as ObjectId } from './index-BptxBl9x.mjs';
5
5
 
6
6
  type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
7
7
  postId: ObjectId;
@@ -352,6 +352,9 @@ type SchemaUserType = Omit<UserType, "vendor" | "coupon" | "events" | "partner"
352
352
  events: ObjectId[];
353
353
  game: ObjectId;
354
354
  partner: ObjectId;
355
+ /** Server-only hashed refresh tokens; never exposed to clients. */
356
+ refreshTokenAdmin?: string | null;
357
+ refreshTokenMobile?: string | null;
355
358
  school: ObjectId;
356
359
  stripe?: SchemaStripeSubscription;
357
360
  vendor: ObjectId;
@@ -393,6 +396,9 @@ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mon
393
396
  events: ObjectId[];
394
397
  game: ObjectId;
395
398
  partner: ObjectId;
399
+ /** Server-only hashed refresh tokens; never exposed to clients. */
400
+ refreshTokenAdmin?: string | null;
401
+ refreshTokenMobile?: string | null;
396
402
  school: ObjectId;
397
403
  stripe?: SchemaStripeSubscription;
398
404
  vendor: ObjectId;
@@ -1,7 +1,7 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { OwnerType, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, AffiliateType, AffiliateResourceType, AffiliateRewardType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from './index-CmtBYjpi.mjs';
4
+ import { O as ObjectId } from './index-BptxBl9x.js';
5
5
 
6
6
  type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
7
7
  postId: ObjectId;
@@ -352,6 +352,9 @@ type SchemaUserType = Omit<UserType, "vendor" | "coupon" | "events" | "partner"
352
352
  events: ObjectId[];
353
353
  game: ObjectId;
354
354
  partner: ObjectId;
355
+ /** Server-only hashed refresh tokens; never exposed to clients. */
356
+ refreshTokenAdmin?: string | null;
357
+ refreshTokenMobile?: string | null;
355
358
  school: ObjectId;
356
359
  stripe?: SchemaStripeSubscription;
357
360
  vendor: ObjectId;
@@ -393,6 +396,9 @@ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mon
393
396
  events: ObjectId[];
394
397
  game: ObjectId;
395
398
  partner: ObjectId;
399
+ /** Server-only hashed refresh tokens; never exposed to clients. */
400
+ refreshTokenAdmin?: string | null;
401
+ refreshTokenMobile?: string | null;
396
402
  school: ObjectId;
397
403
  stripe?: SchemaStripeSubscription;
398
404
  vendor: ObjectId;
@@ -14,4 +14,4 @@ export {
14
14
  mongoose,
15
15
  EnumPubSubEvents
16
16
  };
17
- //# sourceMappingURL=chunk-TMPPPLIW.mjs.map
17
+ //# sourceMappingURL=chunk-F54NB7VH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/index.ts"],"sourcesContent":["import { EnumUserRole } from \"@timardex/cluemart-shared\";\nimport { NotificationCount } from \"@timardex/cluemart-shared/types\";\nimport express from \"express\";\nimport mongoose from \"mongoose\";\n\nimport { SchemaChatType } from \"../mongoose/chat/Chat\";\nimport { SchemaNotificationType } from \"../mongoose/Notification\";\n\n// chnage to export type ObjectId = mongoose.Types.ObjectId;\n// chnage in server when setting decideGameType\nexport type ObjectId = mongoose.Types.ObjectId;\n\nexport enum EnumPubSubEvents {\n GET_CHAT_MESSAGE = \"GET_CHAT_MESSAGE\",\n GET_NOTIFICATIONS = \"GET_NOTIFICATIONS\",\n GET_NOTIFICATIONS_COUNT = \"GET_NOTIFICATIONS_COUNT\",\n USER_TYPING = \"USER_TYPING\",\n}\n\n/** Clients that own their own refresh-token slot on the user document. */\nexport type AuthTokenClient = \"mobile\" | \"admin\";\n\nexport interface AuthUser {\n email: string;\n roles: EnumUserRole[];\n userId: ObjectId;\n /**\n * Which client slot this token belongs to. Absent only on tokens issued\n * before the per-client rollout; those can no longer refresh.\n */\n client?: AuthTokenClient;\n /** Set when this token represents an impersonation session. */\n impersonationSessionId?: string;\n /** The SUPER_ADMIN who started the impersonation session. */\n impersonatorUserId?: ObjectId;\n}\n\nexport interface SubscriptionPayload {\n getChatMessage?: SchemaChatType;\n userTyping?: SchemaChatType; // NOT USED\n getNotifications?: SchemaNotificationType[];\n // Used only for filtering; not part of the GraphQL schema output\n getNotificationsUserId?: ObjectId;\n getNotificationsCount?: NotificationCount & { userId: ObjectId };\n}\n\nexport interface GraphQLContext {\n appVersion: string | null;\n user: AuthUser | null;\n pubsub: {\n publish: (\n eventName: EnumPubSubEvents,\n payload: SubscriptionPayload,\n ) => void;\n subscribe: (eventName: EnumPubSubEvents) => AsyncIterable<any>;\n };\n request: express.Request;\n response: express.Response;\n}\n\nexport { mongoose, express };\n"],"mappings":";AAEA,OAAO,aAAa;AACpB,OAAO,cAAc;AASd,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;","names":["EnumPubSubEvents"]}