@techzunction/sdk 0.3.1 → 0.5.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.
package/dist/index.d.cts CHANGED
@@ -515,6 +515,80 @@ interface WatchSessionSummary {
515
515
  hitCap: boolean;
516
516
  balancePaise: number;
517
517
  }
518
+ type WatchRoomStatus = 'waiting' | 'live' | 'ended';
519
+ type WatchRoomPrivacy = 'public' | 'private';
520
+ type WatchRoomVibe = 'chill' | 'serious' | 'party' | 'commentary';
521
+ type WatchRoomViewerMode = 'sync' | 'solo';
522
+ interface WatchRoom {
523
+ id: string;
524
+ name: string;
525
+ hostId: string;
526
+ hostName: string;
527
+ hostAvatarUrl: string | null;
528
+ tmdbId: number;
529
+ movieTitle: string;
530
+ posterUrl: string | null;
531
+ gdriveFileId: string;
532
+ privacy: WatchRoomPrivacy;
533
+ vibe: WatchRoomVibe;
534
+ ratePerMinPaise: number;
535
+ maxViewers: number;
536
+ viewerCount: number;
537
+ syncCount: number;
538
+ soloCount: number;
539
+ status: WatchRoomStatus;
540
+ createdAt: string;
541
+ startedAt: string | null;
542
+ endedAt: string | null;
543
+ }
544
+ interface WatchRoomViewer {
545
+ id: string;
546
+ endUserId: string;
547
+ name: string;
548
+ avatarUrl: string | null;
549
+ mode: WatchRoomViewerMode;
550
+ joinedAt: string;
551
+ }
552
+ interface WatchRoomMessage {
553
+ id: string;
554
+ userId: string;
555
+ userName: string;
556
+ text: string;
557
+ mode: WatchRoomViewerMode;
558
+ isHost: boolean;
559
+ timestamp: number;
560
+ }
561
+ interface WatchRoomPlaybackState {
562
+ playing: boolean;
563
+ currentTime: number;
564
+ playbackRate: number;
565
+ updatedAt: number;
566
+ }
567
+ interface WatchRoomJoinResponse {
568
+ room: WatchRoom;
569
+ viewers: WatchRoomViewer[];
570
+ playbackState: WatchRoomPlaybackState | null;
571
+ recentMessages: WatchRoomMessage[];
572
+ ablyToken: string;
573
+ }
574
+ interface HostEarning {
575
+ id: string;
576
+ roomId: string;
577
+ movieTitle: string;
578
+ posterUrl: string | null;
579
+ totalViewerMinutes: number;
580
+ grossPaise: number;
581
+ hostSharePaise: number;
582
+ platformSharePaise: number;
583
+ status: 'pending' | 'paid';
584
+ createdAt: string;
585
+ }
586
+ interface EarningsSummary {
587
+ totalPaise: number;
588
+ pendingPaise: number;
589
+ paidPaise: number;
590
+ totalRooms: number;
591
+ }
518
592
  interface UploadResult {
519
593
  url: string;
520
594
  publicId: string;
@@ -1094,6 +1168,32 @@ interface StartWatchSessionDto {
1094
1168
  movieTitle: string;
1095
1169
  ratePerMinPaise: number;
1096
1170
  meterCapPaise: number;
1171
+ roomId?: string;
1172
+ mode?: 'sync' | 'solo';
1173
+ }
1174
+ interface CreateWatchRoomDto {
1175
+ tmdbId: number;
1176
+ movieTitle: string;
1177
+ posterUrl?: string | null;
1178
+ gdriveFileId: string;
1179
+ name: string;
1180
+ privacy?: 'public' | 'private';
1181
+ vibe?: 'chill' | 'serious' | 'party' | 'commentary';
1182
+ ratePerMinPaise: number;
1183
+ maxViewers?: number;
1184
+ }
1185
+ interface JoinWatchRoomDto {
1186
+ mode: 'sync' | 'solo';
1187
+ }
1188
+ interface SwitchWatchRoomModeDto {
1189
+ mode: 'sync' | 'solo';
1190
+ }
1191
+ interface ListWatchRoomsQuery extends PaginatedQuery {
1192
+ tmdbId?: number;
1193
+ status?: 'waiting' | 'live';
1194
+ }
1195
+ interface ListEarningsQuery extends PaginatedQuery {
1196
+ status?: 'pending' | 'paid';
1097
1197
  }
1098
1198
 
1099
1199
  interface StaffRegisterDto {
@@ -1812,6 +1912,20 @@ declare const TZ: {
1812
1912
  list(): TZQuery<HelpArticle[]>;
1813
1913
  getBySlug(slug: string): TZQuery<HelpArticle>;
1814
1914
  };
1915
+ rooms: {
1916
+ create(data: CreateWatchRoomDto): TZQuery<WatchRoom>;
1917
+ get(roomId: string): TZQuery<WatchRoom>;
1918
+ join(roomId: string, data: JoinWatchRoomDto): TZQuery<WatchRoomJoinResponse>;
1919
+ leave(roomId: string): TZQuery<void>;
1920
+ switchMode(roomId: string, data: SwitchWatchRoomModeDto): TZQuery<void>;
1921
+ end(roomId: string): TZQuery<void>;
1922
+ listLive(params?: ListWatchRoomsQuery): TZPaginatedQuery<WatchRoom>;
1923
+ listForMovie(tmdbId: number): TZQuery<WatchRoom[]>;
1924
+ };
1925
+ earnings: {
1926
+ getSummary(): TZQuery<EarningsSummary>;
1927
+ getHistory(params?: ListEarningsQuery): TZPaginatedQuery<HostEarning>;
1928
+ };
1815
1929
  };
1816
1930
  /** Admin namespace — all staff/org-admin APIs */
1817
1931
  readonly admin: {
@@ -2529,6 +2643,20 @@ declare function createTZ(options?: TZInitOptions): {
2529
2643
  list(): TZQuery<HelpArticle[]>;
2530
2644
  getBySlug(slug: string): TZQuery<HelpArticle>;
2531
2645
  };
2646
+ rooms: {
2647
+ create(data: CreateWatchRoomDto): TZQuery<WatchRoom>;
2648
+ get(roomId: string): TZQuery<WatchRoom>;
2649
+ join(roomId: string, data: JoinWatchRoomDto): TZQuery<WatchRoomJoinResponse>;
2650
+ leave(roomId: string): TZQuery<void>;
2651
+ switchMode(roomId: string, data: SwitchWatchRoomModeDto): TZQuery<void>;
2652
+ end(roomId: string): TZQuery<void>;
2653
+ listLive(params?: ListWatchRoomsQuery): TZPaginatedQuery<WatchRoom>;
2654
+ listForMovie(tmdbId: number): TZQuery<WatchRoom[]>;
2655
+ };
2656
+ earnings: {
2657
+ getSummary(): TZQuery<EarningsSummary>;
2658
+ getHistory(params?: ListEarningsQuery): TZPaginatedQuery<HostEarning>;
2659
+ };
2532
2660
  };
2533
2661
  admin: {
2534
2662
  auth: {
@@ -2989,4 +3117,4 @@ declare function createTZ(options?: TZInitOptions): {
2989
3117
  }>;
2990
3118
  };
2991
3119
 
2992
- export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminMealSubscription, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type Ingredient, type Institution, type InviteStaffUserDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePurchaseOrderDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
3120
+ export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminMealSubscription, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type CreateWatchRoomDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EarningsSummary, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type HostEarning, type Ingredient, type Institution, type InviteStaffUserDto, type JoinWatchRoomDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEarningsQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type ListWatchRoomsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, type SwitchWatchRoomModeDto, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePurchaseOrderDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchRoom, type WatchRoomJoinResponse, type WatchRoomMessage, type WatchRoomPlaybackState, type WatchRoomPrivacy, type WatchRoomStatus, type WatchRoomVibe, type WatchRoomViewer, type WatchRoomViewerMode, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
package/dist/index.d.ts CHANGED
@@ -515,6 +515,80 @@ interface WatchSessionSummary {
515
515
  hitCap: boolean;
516
516
  balancePaise: number;
517
517
  }
518
+ type WatchRoomStatus = 'waiting' | 'live' | 'ended';
519
+ type WatchRoomPrivacy = 'public' | 'private';
520
+ type WatchRoomVibe = 'chill' | 'serious' | 'party' | 'commentary';
521
+ type WatchRoomViewerMode = 'sync' | 'solo';
522
+ interface WatchRoom {
523
+ id: string;
524
+ name: string;
525
+ hostId: string;
526
+ hostName: string;
527
+ hostAvatarUrl: string | null;
528
+ tmdbId: number;
529
+ movieTitle: string;
530
+ posterUrl: string | null;
531
+ gdriveFileId: string;
532
+ privacy: WatchRoomPrivacy;
533
+ vibe: WatchRoomVibe;
534
+ ratePerMinPaise: number;
535
+ maxViewers: number;
536
+ viewerCount: number;
537
+ syncCount: number;
538
+ soloCount: number;
539
+ status: WatchRoomStatus;
540
+ createdAt: string;
541
+ startedAt: string | null;
542
+ endedAt: string | null;
543
+ }
544
+ interface WatchRoomViewer {
545
+ id: string;
546
+ endUserId: string;
547
+ name: string;
548
+ avatarUrl: string | null;
549
+ mode: WatchRoomViewerMode;
550
+ joinedAt: string;
551
+ }
552
+ interface WatchRoomMessage {
553
+ id: string;
554
+ userId: string;
555
+ userName: string;
556
+ text: string;
557
+ mode: WatchRoomViewerMode;
558
+ isHost: boolean;
559
+ timestamp: number;
560
+ }
561
+ interface WatchRoomPlaybackState {
562
+ playing: boolean;
563
+ currentTime: number;
564
+ playbackRate: number;
565
+ updatedAt: number;
566
+ }
567
+ interface WatchRoomJoinResponse {
568
+ room: WatchRoom;
569
+ viewers: WatchRoomViewer[];
570
+ playbackState: WatchRoomPlaybackState | null;
571
+ recentMessages: WatchRoomMessage[];
572
+ ablyToken: string;
573
+ }
574
+ interface HostEarning {
575
+ id: string;
576
+ roomId: string;
577
+ movieTitle: string;
578
+ posterUrl: string | null;
579
+ totalViewerMinutes: number;
580
+ grossPaise: number;
581
+ hostSharePaise: number;
582
+ platformSharePaise: number;
583
+ status: 'pending' | 'paid';
584
+ createdAt: string;
585
+ }
586
+ interface EarningsSummary {
587
+ totalPaise: number;
588
+ pendingPaise: number;
589
+ paidPaise: number;
590
+ totalRooms: number;
591
+ }
518
592
  interface UploadResult {
519
593
  url: string;
520
594
  publicId: string;
@@ -1094,6 +1168,32 @@ interface StartWatchSessionDto {
1094
1168
  movieTitle: string;
1095
1169
  ratePerMinPaise: number;
1096
1170
  meterCapPaise: number;
1171
+ roomId?: string;
1172
+ mode?: 'sync' | 'solo';
1173
+ }
1174
+ interface CreateWatchRoomDto {
1175
+ tmdbId: number;
1176
+ movieTitle: string;
1177
+ posterUrl?: string | null;
1178
+ gdriveFileId: string;
1179
+ name: string;
1180
+ privacy?: 'public' | 'private';
1181
+ vibe?: 'chill' | 'serious' | 'party' | 'commentary';
1182
+ ratePerMinPaise: number;
1183
+ maxViewers?: number;
1184
+ }
1185
+ interface JoinWatchRoomDto {
1186
+ mode: 'sync' | 'solo';
1187
+ }
1188
+ interface SwitchWatchRoomModeDto {
1189
+ mode: 'sync' | 'solo';
1190
+ }
1191
+ interface ListWatchRoomsQuery extends PaginatedQuery {
1192
+ tmdbId?: number;
1193
+ status?: 'waiting' | 'live';
1194
+ }
1195
+ interface ListEarningsQuery extends PaginatedQuery {
1196
+ status?: 'pending' | 'paid';
1097
1197
  }
1098
1198
 
1099
1199
  interface StaffRegisterDto {
@@ -1812,6 +1912,20 @@ declare const TZ: {
1812
1912
  list(): TZQuery<HelpArticle[]>;
1813
1913
  getBySlug(slug: string): TZQuery<HelpArticle>;
1814
1914
  };
1915
+ rooms: {
1916
+ create(data: CreateWatchRoomDto): TZQuery<WatchRoom>;
1917
+ get(roomId: string): TZQuery<WatchRoom>;
1918
+ join(roomId: string, data: JoinWatchRoomDto): TZQuery<WatchRoomJoinResponse>;
1919
+ leave(roomId: string): TZQuery<void>;
1920
+ switchMode(roomId: string, data: SwitchWatchRoomModeDto): TZQuery<void>;
1921
+ end(roomId: string): TZQuery<void>;
1922
+ listLive(params?: ListWatchRoomsQuery): TZPaginatedQuery<WatchRoom>;
1923
+ listForMovie(tmdbId: number): TZQuery<WatchRoom[]>;
1924
+ };
1925
+ earnings: {
1926
+ getSummary(): TZQuery<EarningsSummary>;
1927
+ getHistory(params?: ListEarningsQuery): TZPaginatedQuery<HostEarning>;
1928
+ };
1815
1929
  };
1816
1930
  /** Admin namespace — all staff/org-admin APIs */
1817
1931
  readonly admin: {
@@ -2529,6 +2643,20 @@ declare function createTZ(options?: TZInitOptions): {
2529
2643
  list(): TZQuery<HelpArticle[]>;
2530
2644
  getBySlug(slug: string): TZQuery<HelpArticle>;
2531
2645
  };
2646
+ rooms: {
2647
+ create(data: CreateWatchRoomDto): TZQuery<WatchRoom>;
2648
+ get(roomId: string): TZQuery<WatchRoom>;
2649
+ join(roomId: string, data: JoinWatchRoomDto): TZQuery<WatchRoomJoinResponse>;
2650
+ leave(roomId: string): TZQuery<void>;
2651
+ switchMode(roomId: string, data: SwitchWatchRoomModeDto): TZQuery<void>;
2652
+ end(roomId: string): TZQuery<void>;
2653
+ listLive(params?: ListWatchRoomsQuery): TZPaginatedQuery<WatchRoom>;
2654
+ listForMovie(tmdbId: number): TZQuery<WatchRoom[]>;
2655
+ };
2656
+ earnings: {
2657
+ getSummary(): TZQuery<EarningsSummary>;
2658
+ getHistory(params?: ListEarningsQuery): TZPaginatedQuery<HostEarning>;
2659
+ };
2532
2660
  };
2533
2661
  admin: {
2534
2662
  auth: {
@@ -2989,4 +3117,4 @@ declare function createTZ(options?: TZInitOptions): {
2989
3117
  }>;
2990
3118
  };
2991
3119
 
2992
- export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminMealSubscription, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type Ingredient, type Institution, type InviteStaffUserDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePurchaseOrderDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
3120
+ export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminMealSubscription, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type CreateWatchRoomDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EarningsSummary, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type HostEarning, type Ingredient, type Institution, type InviteStaffUserDto, type JoinWatchRoomDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEarningsQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type ListWatchRoomsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, type SwitchWatchRoomModeDto, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePurchaseOrderDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchRoom, type WatchRoomJoinResponse, type WatchRoomMessage, type WatchRoomPlaybackState, type WatchRoomPrivacy, type WatchRoomStatus, type WatchRoomVibe, type WatchRoomViewer, type WatchRoomViewerMode, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
package/dist/index.js CHANGED
@@ -992,6 +992,48 @@ function createStorefrontHelp(c) {
992
992
  };
993
993
  }
994
994
 
995
+ // src/storefront/rooms.ts
996
+ function createStorefrontRooms(c) {
997
+ return {
998
+ create(data) {
999
+ return c.post("/rooms", data, "enduser");
1000
+ },
1001
+ get(roomId) {
1002
+ return c.get(`/rooms/${roomId}`);
1003
+ },
1004
+ join(roomId, data) {
1005
+ return c.post(`/rooms/${roomId}/join`, data, "enduser");
1006
+ },
1007
+ leave(roomId) {
1008
+ return c.post(`/rooms/${roomId}/leave`, void 0, "enduser");
1009
+ },
1010
+ switchMode(roomId, data) {
1011
+ return c.post(`/rooms/${roomId}/switch-mode`, data, "enduser");
1012
+ },
1013
+ end(roomId) {
1014
+ return c.post(`/rooms/${roomId}/end`, void 0, "enduser");
1015
+ },
1016
+ listLive(params) {
1017
+ return c.paginated("/rooms/live", params);
1018
+ },
1019
+ listForMovie(tmdbId) {
1020
+ return c.get(`/rooms/movie/${tmdbId}`);
1021
+ }
1022
+ };
1023
+ }
1024
+
1025
+ // src/storefront/earnings.ts
1026
+ function createStorefrontEarnings(c) {
1027
+ return {
1028
+ getSummary() {
1029
+ return c.get("/earnings/summary", "enduser");
1030
+ },
1031
+ getHistory(params) {
1032
+ return c.paginated("/earnings/history", params);
1033
+ }
1034
+ };
1035
+ }
1036
+
995
1037
  // src/storefront/index.ts
996
1038
  function createStorefront(c) {
997
1039
  return {
@@ -1022,7 +1064,9 @@ function createStorefront(c) {
1022
1064
  wallet: createStorefrontWallet(c),
1023
1065
  student: createStorefrontStudent(c),
1024
1066
  mealPlans: createStorefrontMealPlans(c),
1025
- help: createStorefrontHelp(c)
1067
+ help: createStorefrontHelp(c),
1068
+ rooms: createStorefrontRooms(c),
1069
+ earnings: createStorefrontEarnings(c)
1026
1070
  };
1027
1071
  }
1028
1072