@homespot-sdk/core 0.0.318 → 0.0.319

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.
@@ -608,6 +608,279 @@ export const zUserContextViewResponse = z.object({
608
608
  user: zUserSummaryViewResponse,
609
609
  organizations: z.array(zOrganizationSummaryViewResponse),
610
610
  });
611
+ export const zExpiringAgreement = z.object({
612
+ propertyId: z.optional(z.coerce
613
+ .bigint()
614
+ .min(BigInt('-9223372036854775808'), {
615
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
616
+ })
617
+ .max(BigInt('9223372036854775807'), {
618
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
619
+ })),
620
+ externalId: z.optional(z.uuid()),
621
+ title: z.optional(z.string()),
622
+ expiresAt: z.optional(z.iso.date()),
623
+ });
624
+ export const zExpiringPlatformListing = z.object({
625
+ platform: z.optional(z.string()),
626
+ platformId: z.optional(z.coerce
627
+ .bigint()
628
+ .min(BigInt('-9223372036854775808'), {
629
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
630
+ })
631
+ .max(BigInt('9223372036854775807'), {
632
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
633
+ })),
634
+ propertyTitle: z.optional(z.string()),
635
+ expiresAt: z.optional(z.iso.date()),
636
+ });
637
+ export const zListingTypeAgg = z.object({
638
+ listingType: z.optional(z.string()),
639
+ count: z.optional(z.coerce
640
+ .bigint()
641
+ .min(BigInt('-9223372036854775808'), {
642
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
643
+ })
644
+ .max(BigInt('9223372036854775807'), {
645
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
646
+ })),
647
+ pipelineValue: z.optional(z.number()),
648
+ estimatedCommission: z.optional(z.number()),
649
+ });
650
+ export const zSlice = z.object({
651
+ key: z.optional(z.string()),
652
+ count: z.optional(z.coerce
653
+ .bigint()
654
+ .min(BigInt('-9223372036854775808'), {
655
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
656
+ })
657
+ .max(BigInt('9223372036854775807'), {
658
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
659
+ })),
660
+ });
661
+ export const zPortfolioStats = z.object({
662
+ propertiesByState: z.optional(z.array(zSlice)),
663
+ listings: z.optional(z.array(zListingTypeAgg)),
664
+ expiringAgreementsCount: z.optional(z.coerce
665
+ .bigint()
666
+ .min(BigInt('-9223372036854775808'), {
667
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
668
+ })
669
+ .max(BigInt('9223372036854775807'), {
670
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
671
+ })),
672
+ expiringAgreements: z.optional(z.array(zExpiringAgreement)),
673
+ expiringPlatformCount: z.optional(z.coerce
674
+ .bigint()
675
+ .min(BigInt('-9223372036854775808'), {
676
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
677
+ })
678
+ .max(BigInt('9223372036854775807'), {
679
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
680
+ })),
681
+ expiringPlatformListings: z.optional(z.array(zExpiringPlatformListing)),
682
+ });
683
+ export const zStatsEnvelopePortfolioStats = z.object({
684
+ period: z.optional(z.string()),
685
+ computedAt: z.optional(z.iso.datetime()),
686
+ data: z.optional(zPortfolioStats),
687
+ });
688
+ export const zTrendPoint = z.object({
689
+ date: z.optional(z.iso.date()),
690
+ count: z.optional(z.coerce
691
+ .bigint()
692
+ .min(BigInt('-9223372036854775808'), {
693
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
694
+ })
695
+ .max(BigInt('9223372036854775807'), {
696
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
697
+ })),
698
+ });
699
+ export const zPipelineStats = z.object({
700
+ total: z.optional(z.coerce
701
+ .bigint()
702
+ .min(BigInt('-9223372036854775808'), {
703
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
704
+ })
705
+ .max(BigInt('9223372036854775807'), {
706
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
707
+ })),
708
+ won: z.optional(z.coerce
709
+ .bigint()
710
+ .min(BigInt('-9223372036854775808'), {
711
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
712
+ })
713
+ .max(BigInt('9223372036854775807'), {
714
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
715
+ })),
716
+ conversionRatePercent: z.optional(z.number()),
717
+ unassigned: z.optional(z.coerce
718
+ .bigint()
719
+ .min(BigInt('-9223372036854775808'), {
720
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
721
+ })
722
+ .max(BigInt('9223372036854775807'), {
723
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
724
+ })),
725
+ newContactsTrend: z.optional(z.array(zTrendPoint)),
726
+ status: z.optional(z.array(zSlice)),
727
+ sourceAttribution: z.optional(z.array(zSlice)),
728
+ lostReasons: z.optional(z.array(zSlice)),
729
+ });
730
+ export const zStatsEnvelopePipelineStats = z.object({
731
+ period: z.optional(z.string()),
732
+ computedAt: z.optional(z.iso.datetime()),
733
+ data: z.optional(zPipelineStats),
734
+ });
735
+ export const zRow = z.object({
736
+ memberId: z.optional(z.uuid()),
737
+ firstName: z.optional(z.string()),
738
+ lastName: z.optional(z.string()),
739
+ photo: z.optional(z.string()),
740
+ contactsAssigned: z.optional(z.coerce
741
+ .bigint()
742
+ .min(BigInt('-9223372036854775808'), {
743
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
744
+ })
745
+ .max(BigInt('9223372036854775807'), {
746
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
747
+ })),
748
+ converted: z.optional(z.coerce
749
+ .bigint()
750
+ .min(BigInt('-9223372036854775808'), {
751
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
752
+ })
753
+ .max(BigInt('9223372036854775807'), {
754
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
755
+ })),
756
+ conversionRatePct: z.optional(z.number()),
757
+ recommendationsSent: z.optional(z.coerce
758
+ .bigint()
759
+ .min(BigInt('-9223372036854775808'), {
760
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
761
+ })
762
+ .max(BigInt('9223372036854775807'), {
763
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
764
+ })),
765
+ recommendationsRated: z.optional(z.coerce
766
+ .bigint()
767
+ .min(BigInt('-9223372036854775808'), {
768
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
769
+ })
770
+ .max(BigInt('9223372036854775807'), {
771
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
772
+ })),
773
+ likeRatePct: z.optional(z.number()),
774
+ });
775
+ export const zLeaderboardStats = z.object({
776
+ rows: z.optional(z.array(zRow)),
777
+ });
778
+ export const zStatsEnvelopeLeaderboardStats = z.object({
779
+ period: z.optional(z.string()),
780
+ computedAt: z.optional(z.iso.datetime()),
781
+ data: z.optional(zLeaderboardStats),
782
+ });
783
+ export const zAwaitingConversation = z.object({
784
+ conversationId: z.optional(z.uuid()),
785
+ contactId: z.optional(z.coerce
786
+ .bigint()
787
+ .min(BigInt('-9223372036854775808'), {
788
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
789
+ })
790
+ .max(BigInt('9223372036854775807'), {
791
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
792
+ })),
793
+ channelType: z.optional(z.string()),
794
+ lastMessagePreview: z.optional(z.string()),
795
+ lastInboundAt: z.optional(z.iso.datetime()),
796
+ unreadCount: z.optional(z
797
+ .int()
798
+ .min(-2147483648, {
799
+ error: 'Invalid value: Expected int32 to be >= -2147483648',
800
+ })
801
+ .max(2147483647, {
802
+ error: 'Invalid value: Expected int32 to be <= 2147483647',
803
+ })),
804
+ });
805
+ export const zInboxStats = z.object({
806
+ openConversations: z.optional(z.coerce
807
+ .bigint()
808
+ .min(BigInt('-9223372036854775808'), {
809
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
810
+ })
811
+ .max(BigInt('9223372036854775807'), {
812
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
813
+ })),
814
+ unreadMessages: z.optional(z.coerce
815
+ .bigint()
816
+ .min(BigInt('-9223372036854775808'), {
817
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
818
+ })
819
+ .max(BigInt('9223372036854775807'), {
820
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
821
+ })),
822
+ awaitingReplyCount: z.optional(z.coerce
823
+ .bigint()
824
+ .min(BigInt('-9223372036854775808'), {
825
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
826
+ })
827
+ .max(BigInt('9223372036854775807'), {
828
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
829
+ })),
830
+ awaitingReply: z.optional(z.array(zAwaitingConversation)),
831
+ medianResponseSeconds: z.optional(z.coerce
832
+ .bigint()
833
+ .min(BigInt('-9223372036854775808'), {
834
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
835
+ })
836
+ .max(BigInt('9223372036854775807'), {
837
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
838
+ })),
839
+ inboundByChannel: z.optional(z.array(zSlice)),
840
+ });
841
+ export const zStatsEnvelopeInboxStats = z.object({
842
+ period: z.optional(z.string()),
843
+ computedAt: z.optional(z.iso.datetime()),
844
+ data: z.optional(zInboxStats),
845
+ });
846
+ export const zDistrictDemand = z.object({
847
+ districtId: z.optional(z.coerce
848
+ .bigint()
849
+ .min(BigInt('-9223372036854775808'), {
850
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
851
+ })
852
+ .max(BigInt('9223372036854775807'), {
853
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
854
+ })),
855
+ name: z.optional(z.string()),
856
+ count: z.optional(z.coerce
857
+ .bigint()
858
+ .min(BigInt('-9223372036854775808'), {
859
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
860
+ })
861
+ .max(BigInt('9223372036854775807'), {
862
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
863
+ })),
864
+ });
865
+ export const zDemandStats = z.object({
866
+ activeInterests: z.optional(z.coerce
867
+ .bigint()
868
+ .min(BigInt('-9223372036854775808'), {
869
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
870
+ })
871
+ .max(BigInt('9223372036854775807'), {
872
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
873
+ })),
874
+ byListingType: z.optional(z.array(zSlice)),
875
+ byPropertyType: z.optional(z.array(zSlice)),
876
+ budgetBuckets: z.optional(z.array(zSlice)),
877
+ topDistricts: z.optional(z.array(zDistrictDemand)),
878
+ });
879
+ export const zStatsEnvelopeDemandStats = z.object({
880
+ period: z.optional(z.string()),
881
+ computedAt: z.optional(z.iso.datetime()),
882
+ data: z.optional(zDemandStats),
883
+ });
611
884
  export const zPageMetadata = z.object({
612
885
  size: z.optional(z.coerce
613
886
  .bigint()
@@ -3027,6 +3300,78 @@ export const zGetUserMeData = z.object({
3027
3300
  * OK
3028
3301
  */
3029
3302
  export const zGetUserMeResponse = zUserContextViewResponse;
3303
+ export const zGetStatisticsPortfolioData = z.object({
3304
+ body: z.optional(z.never()),
3305
+ path: z.optional(z.never()),
3306
+ query: z.optional(z.object({
3307
+ agreementWindowDays: z
3308
+ .optional(z
3309
+ .int()
3310
+ .min(-2147483648, {
3311
+ error: 'Invalid value: Expected int32 to be >= -2147483648',
3312
+ })
3313
+ .max(2147483647, {
3314
+ error: 'Invalid value: Expected int32 to be <= 2147483647',
3315
+ }))
3316
+ .default(30),
3317
+ platformWindowDays: z
3318
+ .optional(z
3319
+ .int()
3320
+ .min(-2147483648, {
3321
+ error: 'Invalid value: Expected int32 to be >= -2147483648',
3322
+ })
3323
+ .max(2147483647, {
3324
+ error: 'Invalid value: Expected int32 to be <= 2147483647',
3325
+ }))
3326
+ .default(7),
3327
+ })),
3328
+ });
3329
+ /**
3330
+ * OK
3331
+ */
3332
+ export const zGetStatisticsPortfolioResponse = zStatsEnvelopePortfolioStats;
3333
+ export const zGetStatisticsPipelineData = z.object({
3334
+ body: z.optional(z.never()),
3335
+ path: z.optional(z.never()),
3336
+ query: z.optional(z.object({
3337
+ period: z.optional(z.string()).default('30d'),
3338
+ })),
3339
+ });
3340
+ /**
3341
+ * OK
3342
+ */
3343
+ export const zGetStatisticsPipelineResponse = zStatsEnvelopePipelineStats;
3344
+ export const zGetStatisticsLeaderboardData = z.object({
3345
+ body: z.optional(z.never()),
3346
+ path: z.optional(z.never()),
3347
+ query: z.optional(z.object({
3348
+ period: z.optional(z.string()).default('30d'),
3349
+ })),
3350
+ });
3351
+ /**
3352
+ * OK
3353
+ */
3354
+ export const zGetStatisticsLeaderboardResponse = zStatsEnvelopeLeaderboardStats;
3355
+ export const zGetStatisticsInboxData = z.object({
3356
+ body: z.optional(z.never()),
3357
+ path: z.optional(z.never()),
3358
+ query: z.optional(z.object({
3359
+ period: z.optional(z.string()).default('30d'),
3360
+ })),
3361
+ });
3362
+ /**
3363
+ * OK
3364
+ */
3365
+ export const zGetStatisticsInboxResponse = zStatsEnvelopeInboxStats;
3366
+ export const zGetStatisticsDemandData = z.object({
3367
+ body: z.optional(z.never()),
3368
+ path: z.optional(z.never()),
3369
+ query: z.optional(z.never()),
3370
+ });
3371
+ /**
3372
+ * OK
3373
+ */
3374
+ export const zGetStatisticsDemandResponse = zStatsEnvelopeDemandStats;
3030
3375
  export const zGetPublicRecomendationsByTokenItemsData = z.object({
3031
3376
  body: z.optional(z.never()),
3032
3377
  path: z.object({