founder-schema 0.18.0 → 0.20.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.
Files changed (156) hide show
  1. package/README.md +110 -3
  2. package/dist/access/permissions.d.ts +3 -3
  3. package/dist/access/permissions.d.ts.map +1 -1
  4. package/dist/access/permissions.js.map +1 -1
  5. package/dist/core/common.d.ts +49 -28
  6. package/dist/core/common.d.ts.map +1 -1
  7. package/dist/core/common.js +65 -26
  8. package/dist/core/common.js.map +1 -1
  9. package/dist/core/deletion.d.ts +40 -0
  10. package/dist/core/deletion.d.ts.map +1 -0
  11. package/dist/core/deletion.js +39 -0
  12. package/dist/core/deletion.js.map +1 -0
  13. package/dist/core/limits.d.ts +25 -0
  14. package/dist/core/limits.d.ts.map +1 -1
  15. package/dist/core/limits.js +25 -0
  16. package/dist/core/limits.js.map +1 -1
  17. package/dist/core/validation.d.ts +13 -0
  18. package/dist/core/validation.d.ts.map +1 -1
  19. package/dist/core/validation.js +13 -0
  20. package/dist/core/validation.js.map +1 -1
  21. package/dist/domains/audit/audit.d.ts +36 -12
  22. package/dist/domains/audit/audit.d.ts.map +1 -1
  23. package/dist/domains/audit/audit.js +9 -10
  24. package/dist/domains/audit/audit.js.map +1 -1
  25. package/dist/domains/billing/billing.d.ts +29 -13
  26. package/dist/domains/billing/billing.d.ts.map +1 -1
  27. package/dist/domains/billing/billing.js +2 -3
  28. package/dist/domains/billing/billing.js.map +1 -1
  29. package/dist/domains/chat/chat.d.ts +19 -5
  30. package/dist/domains/chat/chat.d.ts.map +1 -1
  31. package/dist/domains/chat/chat.js +10 -10
  32. package/dist/domains/chat/chat.js.map +1 -1
  33. package/dist/domains/communities/communities.d.ts +95 -57
  34. package/dist/domains/communities/communities.d.ts.map +1 -1
  35. package/dist/domains/contributions/contributions.d.ts +28 -12
  36. package/dist/domains/contributions/contributions.d.ts.map +1 -1
  37. package/dist/domains/contributions/contributions.js +3 -0
  38. package/dist/domains/contributions/contributions.js.map +1 -1
  39. package/dist/domains/discover/discover.d.ts +2 -2
  40. package/dist/domains/feed/feed.d.ts +111 -63
  41. package/dist/domains/feed/feed.d.ts.map +1 -1
  42. package/dist/domains/feed/feed.js +3 -0
  43. package/dist/domains/feed/feed.js.map +1 -1
  44. package/dist/domains/location/areas.d.ts +338 -0
  45. package/dist/domains/location/areas.d.ts.map +1 -0
  46. package/dist/domains/location/areas.js +241 -0
  47. package/dist/domains/location/areas.js.map +1 -0
  48. package/dist/domains/location/india.d.ts +31 -123
  49. package/dist/domains/location/india.d.ts.map +1 -1
  50. package/dist/domains/location/india.js +98 -64
  51. package/dist/domains/location/india.js.map +1 -1
  52. package/dist/domains/media/media.d.ts +22 -0
  53. package/dist/domains/media/media.d.ts.map +1 -1
  54. package/dist/domains/media/media.js +20 -0
  55. package/dist/domains/media/media.js.map +1 -1
  56. package/dist/domains/members/members.d.ts +26 -9
  57. package/dist/domains/members/members.d.ts.map +1 -1
  58. package/dist/domains/members/members.js +9 -10
  59. package/dist/domains/members/members.js.map +1 -1
  60. package/dist/domains/membership/membership.d.ts +19 -0
  61. package/dist/domains/membership/membership.d.ts.map +1 -1
  62. package/dist/domains/membership/membership.js +10 -0
  63. package/dist/domains/membership/membership.js.map +1 -1
  64. package/dist/domains/moderation/moderation.d.ts +8 -2
  65. package/dist/domains/moderation/moderation.d.ts.map +1 -1
  66. package/dist/domains/moderation/moderation.js +3 -6
  67. package/dist/domains/moderation/moderation.js.map +1 -1
  68. package/dist/domains/notifications/notifications.d.ts +10 -6
  69. package/dist/domains/notifications/notifications.d.ts.map +1 -1
  70. package/dist/domains/onboarding/onboarding-answers.d.ts +9 -12
  71. package/dist/domains/onboarding/onboarding-answers.d.ts.map +1 -1
  72. package/dist/domains/onboarding/onboarding-answers.js +12 -19
  73. package/dist/domains/onboarding/onboarding-answers.js.map +1 -1
  74. package/dist/domains/onboarding/onboarding.d.ts +121 -98
  75. package/dist/domains/onboarding/onboarding.d.ts.map +1 -1
  76. package/dist/domains/onboarding/onboarding.js +30 -28
  77. package/dist/domains/onboarding/onboarding.js.map +1 -1
  78. package/dist/domains/people/person.d.ts +54 -0
  79. package/dist/domains/people/person.d.ts.map +1 -0
  80. package/dist/domains/people/person.js +73 -0
  81. package/dist/domains/people/person.js.map +1 -0
  82. package/dist/domains/products/products.d.ts +62 -33
  83. package/dist/domains/products/products.d.ts.map +1 -1
  84. package/dist/domains/products/products.js +3 -0
  85. package/dist/domains/products/products.js.map +1 -1
  86. package/dist/domains/profile/founder-profile.d.ts +93 -60
  87. package/dist/domains/profile/founder-profile.d.ts.map +1 -1
  88. package/dist/domains/profile/founder-profile.js +55 -25
  89. package/dist/domains/profile/founder-profile.js.map +1 -1
  90. package/dist/domains/reviews/reviews.d.ts +25 -15
  91. package/dist/domains/reviews/reviews.d.ts.map +1 -1
  92. package/dist/domains/support/support.d.ts +47 -10
  93. package/dist/domains/support/support.d.ts.map +1 -1
  94. package/dist/domains/support/support.js +4 -2
  95. package/dist/domains/support/support.js.map +1 -1
  96. package/dist/domains/team/team.d.ts +9 -3
  97. package/dist/domains/team/team.d.ts.map +1 -1
  98. package/dist/domains/team/team.js +3 -6
  99. package/dist/domains/team/team.js.map +1 -1
  100. package/dist/index.d.ts +13 -10
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +17 -11
  103. package/dist/index.js.map +1 -1
  104. package/package.json +3 -2
  105. package/dist/account.d.ts +0 -40
  106. package/dist/account.d.ts.map +0 -1
  107. package/dist/account.js +0 -39
  108. package/dist/account.js.map +0 -1
  109. package/dist/chat.d.ts +0 -187
  110. package/dist/chat.d.ts.map +0 -1
  111. package/dist/chat.js +0 -189
  112. package/dist/chat.js.map +0 -1
  113. package/dist/common.d.ts +0 -304
  114. package/dist/common.d.ts.map +0 -1
  115. package/dist/common.js +0 -340
  116. package/dist/common.js.map +0 -1
  117. package/dist/discover.d.ts +0 -245
  118. package/dist/discover.d.ts.map +0 -1
  119. package/dist/discover.js +0 -68
  120. package/dist/discover.js.map +0 -1
  121. package/dist/errors.d.ts +0 -85
  122. package/dist/errors.d.ts.map +0 -1
  123. package/dist/errors.js +0 -89
  124. package/dist/errors.js.map +0 -1
  125. package/dist/feed.d.ts +0 -1658
  126. package/dist/feed.d.ts.map +0 -1
  127. package/dist/feed.js +0 -623
  128. package/dist/feed.js.map +0 -1
  129. package/dist/founder-profile.d.ts +0 -387
  130. package/dist/founder-profile.d.ts.map +0 -1
  131. package/dist/founder-profile.js +0 -180
  132. package/dist/founder-profile.js.map +0 -1
  133. package/dist/limits.d.ts +0 -76
  134. package/dist/limits.d.ts.map +0 -1
  135. package/dist/limits.js +0 -84
  136. package/dist/limits.js.map +0 -1
  137. package/dist/onboarding.d.ts +0 -1018
  138. package/dist/onboarding.d.ts.map +0 -1
  139. package/dist/onboarding.js +0 -717
  140. package/dist/onboarding.js.map +0 -1
  141. package/dist/responses/common.d.ts +0 -167
  142. package/dist/responses/common.d.ts.map +0 -1
  143. package/dist/responses/common.js +0 -67
  144. package/dist/responses/common.js.map +0 -1
  145. package/dist/responses/index.d.ts +0 -7
  146. package/dist/responses/index.d.ts.map +0 -1
  147. package/dist/responses/index.js +0 -7
  148. package/dist/responses/index.js.map +0 -1
  149. package/dist/uploads.d.ts +0 -113
  150. package/dist/uploads.d.ts.map +0 -1
  151. package/dist/uploads.js +0 -106
  152. package/dist/uploads.js.map +0 -1
  153. package/dist/validation.d.ts +0 -136
  154. package/dist/validation.d.ts.map +0 -1
  155. package/dist/validation.js +0 -142
  156. package/dist/validation.js.map +0 -1
@@ -127,6 +127,13 @@ export declare const productTeamRoleSchema: z.ZodEnum<{
127
127
  cofounder: "cofounder";
128
128
  }>;
129
129
  export type ProductTeamRole = z.infer<typeof productTeamRoleSchema>;
130
+ /** A team row's state: invited, not yet answered, or on the team. The backend's storage's own values, from here like every other list (0.20.0). */
131
+ export declare const PRODUCT_MEMBER_STATUS_VALUES: readonly ["invited", "active"];
132
+ export declare const productMemberStatusSchema: z.ZodEnum<{
133
+ active: "active";
134
+ invited: "invited";
135
+ }>;
136
+ export type ProductMemberStatus = z.infer<typeof productMemberStatusSchema>;
130
137
  /** The roles an invitation (or a role change) may give. Ownership is handed over, never invited. */
131
138
  export declare const PRODUCT_INVITABLE_ROLE_VALUES: readonly ["cofounder", "team"];
132
139
  export declare const productInvitableRoleSchema: z.ZodEnum<{
@@ -391,10 +398,12 @@ export declare const productPausedBySchema: z.ZodEnum<{
391
398
  export type ProductPausedBy = z.infer<typeof productPausedBySchema>;
392
399
  /** One person on a product's team, live-joined like every byline. */
393
400
  export declare const productTeamMemberSchema: z.ZodObject<{
394
- userId: z.ZodString;
395
- username: z.ZodString;
401
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
402
+ username: z.ZodNullable<z.ZodString>;
396
403
  displayName: z.ZodString;
397
- avatarUrl: z.ZodOptional<z.ZodURL>;
404
+ firstName: z.ZodString;
405
+ avatarUrl: z.ZodNullable<z.ZodURL>;
406
+ former: z.ZodBoolean;
398
407
  headline: z.ZodOptional<z.ZodString>;
399
408
  role: z.ZodEnum<{
400
409
  team: "team";
@@ -620,10 +629,12 @@ export declare const productSchema: z.ZodObject<{
620
629
  caption: z.ZodOptional<z.ZodString>;
621
630
  }, z.core.$strip>>;
622
631
  team: z.ZodArray<z.ZodObject<{
623
- userId: z.ZodString;
624
- username: z.ZodString;
632
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
633
+ username: z.ZodNullable<z.ZodString>;
625
634
  displayName: z.ZodString;
626
- avatarUrl: z.ZodOptional<z.ZodURL>;
635
+ firstName: z.ZodString;
636
+ avatarUrl: z.ZodNullable<z.ZodURL>;
637
+ former: z.ZodBoolean;
627
638
  headline: z.ZodOptional<z.ZodString>;
628
639
  role: z.ZodEnum<{
629
640
  team: "team";
@@ -675,10 +686,12 @@ export type Product = z.infer<typeof productSchema>;
675
686
  */
676
687
  export declare const productPendingInviteSchema: z.ZodObject<{
677
688
  member: z.ZodObject<{
678
- userId: z.ZodString;
679
- username: z.ZodString;
689
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
690
+ username: z.ZodNullable<z.ZodString>;
680
691
  displayName: z.ZodString;
681
- avatarUrl: z.ZodOptional<z.ZodURL>;
692
+ firstName: z.ZodString;
693
+ avatarUrl: z.ZodNullable<z.ZodURL>;
694
+ former: z.ZodBoolean;
682
695
  headline: z.ZodOptional<z.ZodString>;
683
696
  }, z.core.$strip>;
684
697
  role: z.ZodEnum<{
@@ -686,10 +699,12 @@ export declare const productPendingInviteSchema: z.ZodObject<{
686
699
  cofounder: "cofounder";
687
700
  }>;
688
701
  invitedBy: z.ZodNullable<z.ZodObject<{
689
- userId: z.ZodString;
690
- username: z.ZodString;
702
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
703
+ username: z.ZodNullable<z.ZodString>;
691
704
  displayName: z.ZodString;
692
- avatarUrl: z.ZodOptional<z.ZodURL>;
705
+ firstName: z.ZodString;
706
+ avatarUrl: z.ZodNullable<z.ZodURL>;
707
+ former: z.ZodBoolean;
693
708
  headline: z.ZodOptional<z.ZodString>;
694
709
  }, z.core.$strip>>;
695
710
  invitedAt: z.ZodISODateTime;
@@ -709,10 +724,12 @@ export declare const productInviteSchema: z.ZodObject<{
709
724
  cofounder: "cofounder";
710
725
  }>;
711
726
  invitedBy: z.ZodNullable<z.ZodObject<{
712
- userId: z.ZodString;
713
- username: z.ZodString;
727
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
728
+ username: z.ZodNullable<z.ZodString>;
714
729
  displayName: z.ZodString;
715
- avatarUrl: z.ZodOptional<z.ZodURL>;
730
+ firstName: z.ZodString;
731
+ avatarUrl: z.ZodNullable<z.ZodURL>;
732
+ former: z.ZodBoolean;
716
733
  headline: z.ZodOptional<z.ZodString>;
717
734
  }, z.core.$strip>>;
718
735
  invitedAt: z.ZodISODateTime;
@@ -733,10 +750,12 @@ export declare const productInvitesSchema: z.ZodObject<{
733
750
  cofounder: "cofounder";
734
751
  }>;
735
752
  invitedBy: z.ZodNullable<z.ZodObject<{
736
- userId: z.ZodString;
737
- username: z.ZodString;
753
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
754
+ username: z.ZodNullable<z.ZodString>;
738
755
  displayName: z.ZodString;
739
- avatarUrl: z.ZodOptional<z.ZodURL>;
756
+ firstName: z.ZodString;
757
+ avatarUrl: z.ZodNullable<z.ZodURL>;
758
+ former: z.ZodBoolean;
740
759
  headline: z.ZodOptional<z.ZodString>;
741
760
  }, z.core.$strip>>;
742
761
  invitedAt: z.ZodISODateTime;
@@ -855,10 +874,12 @@ export type MyProducts = z.infer<typeof myProductsSchema>;
855
874
  /** A member the team confirmed tested the product. */
856
875
  export declare const productTesterSchema: z.ZodObject<{
857
876
  member: z.ZodObject<{
858
- userId: z.ZodString;
859
- username: z.ZodString;
877
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
878
+ username: z.ZodNullable<z.ZodString>;
860
879
  displayName: z.ZodString;
861
- avatarUrl: z.ZodOptional<z.ZodURL>;
880
+ firstName: z.ZodString;
881
+ avatarUrl: z.ZodNullable<z.ZodURL>;
882
+ former: z.ZodBoolean;
862
883
  headline: z.ZodOptional<z.ZodString>;
863
884
  }, z.core.$strip>;
864
885
  confirmedAt: z.ZodISODateTime;
@@ -970,10 +991,12 @@ export declare const productCardPageSchema: z.ZodObject<{
970
991
  export type ProductCardPage = z.infer<typeof productCardPageSchema>;
971
992
  export declare const productTeamPageSchema: z.ZodObject<{
972
993
  items: z.ZodArray<z.ZodObject<{
973
- userId: z.ZodString;
974
- username: z.ZodString;
994
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
995
+ username: z.ZodNullable<z.ZodString>;
975
996
  displayName: z.ZodString;
976
- avatarUrl: z.ZodOptional<z.ZodURL>;
997
+ firstName: z.ZodString;
998
+ avatarUrl: z.ZodNullable<z.ZodURL>;
999
+ former: z.ZodBoolean;
977
1000
  headline: z.ZodOptional<z.ZodString>;
978
1001
  role: z.ZodEnum<{
979
1002
  team: "team";
@@ -988,10 +1011,12 @@ export type ProductTeamPage = z.infer<typeof productTeamPageSchema>;
988
1011
  export declare const productTesterPageSchema: z.ZodObject<{
989
1012
  items: z.ZodArray<z.ZodObject<{
990
1013
  member: z.ZodObject<{
991
- userId: z.ZodString;
992
- username: z.ZodString;
1014
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1015
+ username: z.ZodNullable<z.ZodString>;
993
1016
  displayName: z.ZodString;
994
- avatarUrl: z.ZodOptional<z.ZodURL>;
1017
+ firstName: z.ZodString;
1018
+ avatarUrl: z.ZodNullable<z.ZodURL>;
1019
+ former: z.ZodBoolean;
995
1020
  headline: z.ZodOptional<z.ZodString>;
996
1021
  }, z.core.$strip>;
997
1022
  confirmedAt: z.ZodISODateTime;
@@ -1003,10 +1028,12 @@ export type ProductTesterPage = z.infer<typeof productTesterPageSchema>;
1003
1028
  export declare const productPendingInvitePageSchema: z.ZodObject<{
1004
1029
  items: z.ZodArray<z.ZodObject<{
1005
1030
  member: z.ZodObject<{
1006
- userId: z.ZodString;
1007
- username: z.ZodString;
1031
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1032
+ username: z.ZodNullable<z.ZodString>;
1008
1033
  displayName: z.ZodString;
1009
- avatarUrl: z.ZodOptional<z.ZodURL>;
1034
+ firstName: z.ZodString;
1035
+ avatarUrl: z.ZodNullable<z.ZodURL>;
1036
+ former: z.ZodBoolean;
1010
1037
  headline: z.ZodOptional<z.ZodString>;
1011
1038
  }, z.core.$strip>;
1012
1039
  role: z.ZodEnum<{
@@ -1014,10 +1041,12 @@ export declare const productPendingInvitePageSchema: z.ZodObject<{
1014
1041
  cofounder: "cofounder";
1015
1042
  }>;
1016
1043
  invitedBy: z.ZodNullable<z.ZodObject<{
1017
- userId: z.ZodString;
1018
- username: z.ZodString;
1044
+ userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1045
+ username: z.ZodNullable<z.ZodString>;
1019
1046
  displayName: z.ZodString;
1020
- avatarUrl: z.ZodOptional<z.ZodURL>;
1047
+ firstName: z.ZodString;
1048
+ avatarUrl: z.ZodNullable<z.ZodURL>;
1049
+ former: z.ZodBoolean;
1021
1050
  headline: z.ZodOptional<z.ZodString>;
1022
1051
  }, z.core.$strip>>;
1023
1052
  invitedAt: z.ZodISODateTime;
@@ -1 +1 @@
1
- {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../src/domains/products/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EASL,KAAK,yBAAyB,EAK/B,MAAM,sBAAsB,CAAC;AAkB9B,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAKpC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+CAAgD,CAAC;AAClF,eAAO,MAAM,kBAAkB;;;;;EAA+B,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB,gGAS1B,CAAC;AACX,eAAO,MAAM,qBAAqB;;;;;;;;;EAAkC,CAAC;AACrE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,iCAAkC,CAAC;AACzE,eAAO,MAAM,uBAAuB;;;EAAoC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,iCAAkC,CAAC;AACrE,eAAO,MAAM,mBAAmB;;;EAAgC,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AC;AAExE,qGAAqG;AACrG,eAAO,MAAM,wBAAwB;;iBAAwC,CAAC;AAC9E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;iBAAoD,CAAC;AACjG,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,8BAA8B;;;;;iBAAoD,CAAC;AAChG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,0BAA0B;;;;;iBAA4C,CAAC;AACpF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;iBAAkC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;iBAGxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;iBAAiD,CAAC;AAC7F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;iBAAuC,CAAC;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -115,6 +115,9 @@ export const productStatusSchema = z.enum(PRODUCT_STATUS_VALUES);
115
115
  /** One owner per product; see the module note for what each role may do. */
116
116
  export const PRODUCT_TEAM_ROLE_VALUES = ['owner', 'cofounder', 'team'];
117
117
  export const productTeamRoleSchema = z.enum(PRODUCT_TEAM_ROLE_VALUES);
118
+ /** A team row's state: invited, not yet answered, or on the team. The backend's storage's own values, from here like every other list (0.20.0). */
119
+ export const PRODUCT_MEMBER_STATUS_VALUES = ['invited', 'active'];
120
+ export const productMemberStatusSchema = z.enum(PRODUCT_MEMBER_STATUS_VALUES);
118
121
  /** The roles an invitation (or a role change) may give. Ownership is handed over, never invited. */
119
122
  export const PRODUCT_INVITABLE_ROLE_VALUES = ['cofounder', 'team'];
120
123
  export const productInvitableRoleSchema = z.enum(PRODUCT_INVITABLE_ROLE_VALUES);
@@ -1 +1 @@
1
- {"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/domains/products/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,qBAAqB,EAErB,qBAAqB,EACrB,+BAA+B,EAC/B,aAAa,EACb,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBA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AE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Products: what founders build, and the help around it\n *\n * THE IDEA (the user, 2026-10-06): founders help each other with their\n * products. A founder adds what they build; a post or poll can say which of\n * their products it is about and what they want (\"testers wanted\"); every\n * comment on it becomes that product's feedback; the community reviews and\n * upvotes it; and the help a member gives is recognised in their contribution\n * score.\n *\n * THE COMPANY STAYS THE PROFILE'S `venture` (one per founder). There are no\n * company pages: co-founders join a PRODUCT's team, as Product Hunt lists a\n * product's makers. Revisit only if one team running many products finds\n * re-inviting each time tedious.\n *\n * VISIBILITY, two states (the user's ruling): `unlisted` by default, a page\n * anyone signed in can open by its link (on a team member's profile only that\n * member sees it, in their own list); `listed`, also in Discover and on its\n * team's profiles for everyone (`productIsOnDiscover` says whether it shows\n * there now). Listing needs a logo, a tagline and at least one\n * screenshot (`PRODUCT_NOT_LISTABLE` names what is missing), so Discover never\n * shows an empty card.\n *\n * THE TEAM: an owner, co-founders and team members, joined by invitation and\n * acceptance (nobody is put on a team without saying yes), with no limit on\n * its size (the user's ruling). Who may do what:\n *\n * owner co-founder team\n * edit, images, list, invite ✓ ✓\n * tag posts, reply to reviews, ✓ ✓ ✓\n * mark feedback, confirm testers\n * change roles, remove, hand over ✓\n * archive, delete ✓\n *\n * A product's images belong to the product, not to whoever uploaded them.\n * When the owner deletes their account the product passes to the longest-\n * standing co-founder (else team member); with nobody left it is deleted.\n *\n * Routes (all signed in):\n * GET /api/v1/products Discover: productDiscoverQuerySchema\n * GET /api/v1/products/facets productFacetsSchema\n * POST /api/v1/products createProductBodySchema -> IdResponse\n * GET /api/v1/products/mine myProductsSchema\n * GET /api/v1/products/invites productInvitesSchema\n * PUT /api/v1/products/invites/:productId accept -> productSchema\n * DELETE /api/v1/products/invites/:productId decline -> IdResponse\n * GET /api/v1/products/by-member/:userId productCardPageSchema (their teams)\n * GET /api/v1/products/:productId productSchema\n * PATCH /api/v1/products/:productId updateProductBodySchema -> productSchema\n * DELETE /api/v1/products/:productId -> IdResponse (owner)\n * PUT /api/v1/products/:productId/logo setProductLogoBodySchema -> productSchema\n * DELETE /api/v1/products/:productId/logo -> productSchema\n * PUT /api/v1/products/:productId/screenshots setProductScreenshotsBodySchema -> productSchema\n * PUT /api/v1/products/:productId/visibility setProductVisibilityBodySchema -> productSchema\n * PUT /api/v1/products/:productId/status setProductStatusBodySchema -> productSchema\n * PUT /api/v1/products/:productId/live setProductLiveBodySchema -> productSchema (0.12.0)\n * GET /api/v1/products/:productId/team productTeamPageSchema\n * GET /api/v1/products/:productId/invites productPendingInvitePageSchema (managers)\n * POST /api/v1/products/:productId/invites inviteProductMemberBodySchema -> productPendingInviteSchema\n * PUT /api/v1/products/:productId/team/:userId setProductMemberRoleBodySchema -> IdResponse\n * (works on someone still invited too; refetch the team and the invites)\n * DELETE /api/v1/products/:productId/team/:userId remove, cancel an invite, or leave -> IdResponse\n * POST /api/v1/products/:productId/transfer transferProductBodySchema -> productSchema\n * PUT /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * DELETE /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * GET /api/v1/products/:productId/posts FeedPage (posts and polls tagged with it)\n * GET /api/v1/products/:productId/feedback productFeedbackQuerySchema -> productFeedbackPageSchema (feed)\n * GET /api/v1/products/:productId/testers productTesterPageSchema\n * PUT /api/v1/products/:productId/testers/:userId confirm -> productTesterSchema\n * DELETE /api/v1/products/:productId/testers/:userId withdraw -> IdResponse\n * POST /api/v1/products/:productId/report createReportBodySchema -> CreateReportResponse\n * (reviews: `domains/reviews`)\n *\n * @module founder-schema/domains/products\n */\n\nimport { z } from 'zod';\nimport {\n eachOnce,\n emptyStringToUndefined,\n httpUrlOnHosts,\n httpUrlSchema,\n industrySchema,\n multiValueQuery,\n objectIdSchema,\n optionalTrimmedString,\n type ProductListingRequirement,\n paginationQuerySchema,\n productListingRequirementSchema,\n safeUrlSchema,\n youtubeVideoId,\n} from '../../core/common.js';\nimport {\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n PRODUCT_CAPTION_MAX,\n PRODUCT_DESCRIPTION_MAX,\n PRODUCT_NAME_MAX,\n PRODUCT_SCREENSHOTS_MAX,\n PRODUCT_TAGLINE_MAX,\n RATING_MAX,\n RATING_MIN,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** Topics a product carries, as a post does: what interest matching reads. */\nexport const PRODUCT_TOPICS_MAX = 3;\n\n// ─── Vocabulary ──────────────────────────────────────────────────────────────\n// ⚠ Every list below is STORED. Append only; removing a value orphans rows.\n\n/**\n * Where the product is in its life. Its own list, deliberately not the\n * venture's funding stage (`startupStageSchema`): \"seed\" says how a company is\n * funded, \"beta\" says whether you can use the thing. Ordered earliest first.\n */\nexport const PRODUCT_STAGE_VALUES = ['idea', 'building', 'beta', 'live'] as const;\nexport const productStageSchema = z.enum(PRODUCT_STAGE_VALUES);\nexport type ProductStage = z.infer<typeof productStageSchema>;\n\nexport const PRODUCT_PLATFORM_VALUES = [\n 'web',\n 'ios',\n 'android',\n 'desktop',\n 'browser_extension',\n 'api',\n 'hardware',\n 'other',\n] as const;\nexport const productPlatformSchema = z.enum(PRODUCT_PLATFORM_VALUES);\nexport type ProductPlatform = z.infer<typeof productPlatformSchema>;\n\n/** `unlisted` (the default) or `listed` in Discover. See the module note. */\nexport const PRODUCT_VISIBILITY_VALUES = ['unlisted', 'listed'] as const;\nexport const productVisibilitySchema = z.enum(PRODUCT_VISIBILITY_VALUES);\nexport type ProductVisibility = z.infer<typeof productVisibilitySchema>;\n\n/**\n * `archived`: kept, readable and still on its team's profiles, but out of\n * Discover and closed to new posts, reviews and upvotes. Restorable.\n */\nexport const PRODUCT_STATUS_VALUES = ['active', 'archived'] as const;\nexport const productStatusSchema = z.enum(PRODUCT_STATUS_VALUES);\nexport type ProductStatus = z.infer<typeof productStatusSchema>;\n\n/** One owner per product; see the module note for what each role may do. */\nexport const PRODUCT_TEAM_ROLE_VALUES = ['owner', 'cofounder', 'team'] as const;\nexport const productTeamRoleSchema = z.enum(PRODUCT_TEAM_ROLE_VALUES);\nexport type ProductTeamRole = z.infer<typeof productTeamRoleSchema>;\n\n/** The roles an invitation (or a role change) may give. Ownership is handed over, never invited. */\nexport const PRODUCT_INVITABLE_ROLE_VALUES = ['cofounder', 'team'] as const;\nexport const productInvitableRoleSchema = z.enum(PRODUCT_INVITABLE_ROLE_VALUES);\nexport type ProductInvitableRole = z.infer<typeof productInvitableRoleSchema>;\n\n/**\n * What a post or poll about a product ASKS of the community. Optional, and\n * only with a product. Each ask keeps the product on that shelf of Discover\n * for `PRODUCT_ASK_OPEN_DAYS`.\n *\n * feedback \"tell me what you think\"\n * testers \"try it\": confirmed testers are recognised (`/testers`)\n * launch \"it is out\"\n * ideas \"what should it do next\"\n */\nexport const PRODUCT_ASK_VALUES = ['feedback', 'testers', 'launch', 'ideas'] as const;\nexport const productAskSchema = z.enum(PRODUCT_ASK_VALUES);\nexport type ProductAsk = z.infer<typeof productAskSchema>;\n\n/**\n * Discover's orders.\n *\n * trending recent upvotes, reviews and feedback, newer counting more\n * (recomputed every 15 minutes). The default.\n * new newest first by when it was FIRST listed (unlisting and\n * listing again does not move it back to the top)\n * top_rated best rated, pulled toward a neutral 3 stars by 5 imaginary\n * reviews so a few perfect ratings cannot beat many excellent\n * ones; only products with `REVIEW_AVERAGE_MIN_COUNT` reviews\n */\nexport const PRODUCT_SORT_VALUES = ['trending', 'new', 'top_rated'] as const;\nexport const productSortSchema = z.enum(PRODUCT_SORT_VALUES);\nexport type ProductSort = z.infer<typeof productSortSchema>;\n\n/**\n * What listing needs (defined in core, beside the error details that carry it:\n * `PRODUCT_NOT_LISTABLE` returns the missing ones in `details.missing`).\n */\nexport {\n PRODUCT_LISTING_REQUIREMENT_VALUES,\n type ProductListingRequirement,\n productListingRequirementSchema,\n} from '../../core/common.js';\n\n/**\n * What listing still needs, from what a product has (0.18.0, moved from the\n * backend): a logo, a tagline, at least one screenshot. THE rule: the server\n * refuses listing (and refuses taking any of the three from a LISTED product)\n * with it, the page's checklist is it (`viewer.missingForListing`), and a\n * screen asks it with the change applied (\"what would removing the logo\n * leave?\") to know whether to offer the change at all.\n */\nexport function missingForListing(p: {\n hasLogo: boolean;\n tagline?: string | null;\n screenshotCount: number;\n}): ProductListingRequirement[] {\n const missing: ProductListingRequirement[] = [];\n if (!p.hasLogo) missing.push('logo');\n if (!p.tagline?.trim()) missing.push('tagline');\n if (p.screenshotCount === 0) missing.push('screenshot');\n return missing;\n}\n\n// ─── Fields ──────────────────────────────────────────────────────────────────\n\n/**\n * Where to get it. Every link is member-typed, so every one is\n * `httpUrlSchema`, and the store links must also be ON the store: the\n * hostname is parsed and compared exactly (`httpUrlOnHosts`).\n */\nexport const productLinksSchema = z.object({\n website: httpUrlSchema.optional(),\n appStore: httpUrlOnHosts(\n ['apps.apple.com', 'itunes.apple.com'],\n VALIDATION_MESSAGE.appStoreLinkHost,\n ).optional(),\n playStore: httpUrlOnHosts(['play.google.com'], VALIDATION_MESSAGE.playStoreLinkHost).optional(),\n github: httpUrlOnHosts(\n ['github.com', 'www.github.com'],\n VALIDATION_MESSAGE.githubLinkHost,\n ).optional(),\n});\nexport type ProductLinks = z.infer<typeof productLinksSchema>;\n/** A product's links, by key, in order (0.18.0): what the backend's model and its page list. */\nexport const PRODUCT_LINK_KEYS = productLinksSchema.keyof().options;\nexport type ProductLinkKey = (typeof PRODUCT_LINK_KEYS)[number];\n\n/** A product's links as a page READS them: a safe URL each, whatever host rules came later. */\nexport const productLinksReadSchema = z.object({\n website: safeUrlSchema.optional(),\n appStore: safeUrlSchema.optional(),\n playStore: safeUrlSchema.optional(),\n github: safeUrlSchema.optional(),\n});\n\n/**\n * A demo video: a link to one YouTube VIDEO, played in the page (never\n * uploaded). A channel or playlist link is refused: the page cannot embed it\n * (`youtubeVideoId`, 0.7.0).\n */\nexport const productVideoUrlSchema = httpUrlSchema.refine((url) => youtubeVideoId(url) !== null, {\n error: VALIDATION_MESSAGE.videoLinkHost,\n});\n\nconst platformsSchema = z\n .array(productPlatformSchema)\n .max(PRODUCT_PLATFORM_VALUES.length)\n .refine(eachOnce, {\n error: VALIDATION_MESSAGE.platformsDuplicate,\n });\n\n// ─── Read shapes ─────────────────────────────────────────────────────────────\n\n/**\n * A product named on something else: the chip on a post or poll, a\n * notification, a points entry. `logoUrl` is the logo's smallest size.\n */\nexport const productChipSchema = z.object({\n id: objectIdSchema,\n /** For a readable URL, `/products/<id>/<slug>`. The id is what resolves; a renamed product keeps its links. */\n slug: z.string(),\n name: z.string(),\n logoUrl: z.url().optional(),\n});\nexport type ProductChip = z.infer<typeof productChipSchema>;\n\n/**\n * How it is rated. `average` (one decimal) is null until the product has\n * `REVIEW_AVERAGE_MIN_COUNT` reviews: a client shows \"Not enough reviews yet\",\n * never a lone 5.0 from one friend.\n */\nexport const productRatingSchema = z.object({\n count: z.number().int().nonnegative(),\n average: z.number().min(RATING_MIN).max(RATING_MAX).nullable(),\n});\nexport type ProductRating = z.infer<typeof productRatingSchema>;\n\n/** One screenshot: a processed image (every size, ready for `srcset`) and its caption. */\nexport const productScreenshotSchema = mediaImageSchema.extend({\n caption: z.string().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshot = z.infer<typeof productScreenshotSchema>;\n\n/** What this viewer may do on a Discover card. */\nexport const productCardViewerSchema = z.object({\n upvoted: z.boolean(),\n /** Not on its team, and the product is open (not archived). */\n canUpvote: z.boolean(),\n /** Their role on its team, or null. */\n role: productTeamRoleSchema.nullable(),\n /**\n * They may act FOR it now (0.7.0): on its team, and it is neither archived\n * nor hidden by staff. The server's own rule, for a picker such as the\n * composer's \"about which product\" (the page's `viewer.canRepresent`).\n */\n canRepresent: z.boolean().optional(),\n});\n\n/**\n * A product on Discover, on a profile, in \"my products\". `cover` is the first\n * screenshot. `openAsks` are the asks whose window is open now, by the\n * server's clock (\"Testers wanted\").\n */\nexport const productCardSchema = z.object({\n id: objectIdSchema,\n slug: z.string(),\n name: z.string(),\n tagline: z.string().optional(),\n logo: mediaImageSchema.optional(),\n cover: mediaImageSchema.optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: z.array(productPlatformSchema),\n visibility: productVisibilitySchema,\n status: productStatusSchema,\n rating: productRatingSchema,\n upvoteCount: z.number().int().nonnegative(),\n openAsks: z.array(productAskSchema),\n /**\n * Staff hid it (0.7.0). Only ever on a card its team or staff can see (in\n * \"my products\", on a team member's profile): a \"Hidden by moderators\" badge.\n */\n hiddenByStaff: z.boolean().optional(),\n /**\n * Paused (0.12.0): its owner owns more products than their plan keeps\n * live. Like a hidden one, only its team and staff see it at all: a\n * \"Paused\" badge. The owner makes it live again (`PUT .../live`) when a\n * place is free.\n */\n paused: z.boolean().optional(),\n viewer: productCardViewerSchema.optional(),\n});\nexport type ProductCard = z.infer<typeof productCardSchema>;\n\n/**\n * Whether a product shows on Discover now (0.18.0): listed, active, not hidden\n * by staff and not paused. THE rule: the backend's Discover query applies it\n * as a filter (`LISTED_PRODUCT`, pinned to this by a test), and a screen that\n * says \"On Discover\" asks this, never its own reading of the fields.\n */\nexport function productIsOnDiscover(\n p: Pick<ProductCard, 'visibility' | 'status' | 'hiddenByStaff' | 'paused'>,\n): boolean {\n return p.visibility === 'listed' && p.status === 'active' && !p.hiddenByStaff && !p.paused;\n}\n\n/**\n * Why a product is paused (0.12.0). ⚠ Stored: append only.\n * limit over its owner's live places (a plan ended, a refund, joining\n * without one): it comes back by itself when a place frees\n * owner its owner paused it, to free a place for another: it stays\n * paused until they make it live\n */\nexport const PRODUCT_PAUSED_BY_VALUES = ['limit', 'owner'] as const;\nexport const productPausedBySchema = z.enum(PRODUCT_PAUSED_BY_VALUES);\nexport type ProductPausedBy = z.infer<typeof productPausedBySchema>;\n\n/** One person on a product's team, live-joined like every byline. */\nexport const productTeamMemberSchema = memberBylineSchema.extend({\n role: productTeamRoleSchema,\n /** When they accepted (or, for the owner, created the product). */\n joinedAt: z.iso.datetime(),\n});\nexport type ProductTeamMember = z.infer<typeof productTeamMemberSchema>;\n\n/**\n * What THIS viewer may do on the product page, decided by the server and sent\n * as plain answers (the same rule as `viewerStateSchema` on a post).\n */\nexport const productViewerSchema = productCardViewerSchema.extend({\n /** An invitation to the team is waiting for them: offer Accept / Decline. */\n invited: z.boolean(),\n /** Their own review of it, if any, so the page offers Edit instead of Write. */\n reviewId: objectIdSchema.nullable(),\n /** The team confirmed them as a tester. */\n tester: z.boolean(),\n /** Owner and co-founders: details, images, listing, invitations. */\n canEdit: z.boolean(),\n /** Owner: roles, removals, handing over. */\n canManageTeam: z.boolean(),\n /** Owner. */\n canDelete: z.boolean(),\n /**\n * Owner (0.12.0): may pause it, or make it live again. Making it live is\n * refused with `PRODUCT_LIMIT_REACHED` when no live place is free; the page\n * says so from `GET /me/membership`.\n */\n canSetLive: z.boolean(),\n /** Anyone on the team: tag posts with it, reply to reviews, mark feedback, confirm testers. */\n canRepresent: z.boolean(),\n /** Not on its team, no review yet, and the product is open. */\n canReview: z.boolean(),\n canReport: z.boolean(),\n /**\n * For whoever may edit: what listing still needs. Empty means it can be\n * listed (or already is). Lets the page show a checklist before the member\n * tries and is refused.\n */\n missingForListing: z.array(productListingRequirementSchema),\n});\nexport type ProductViewer = z.infer<typeof productViewerSchema>;\n\n/** The product page. */\nexport const productSchema = productCardSchema.extend({\n /** Set with `paused` (0.12.0): who paused it, so the page says why. */\n pausedBy: productPausedBySchema.optional(),\n description: z.string().optional(),\n /**\n * READ leniently (0.18.0): a link is checked by today's host rules when it\n * is WRITTEN (`productLinksSchema`). A page reads what was stored, and a link\n * saved before a rule existed (the store hosts came in 0.7.0) must not make\n * the whole page fail to load.\n */\n links: productLinksReadSchema,\n videoUrl: safeUrlSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX),\n screenshots: z.array(productScreenshotSchema).max(PRODUCT_SCREENSHOTS_MAX),\n /** The owner first, then co-founders, then the team, each by when they joined; at most `PRODUCT_TEAM_SHOWN`. */\n team: z.array(productTeamMemberSchema),\n teamCount: z.number().int().nonnegative(),\n counts: z.object({\n /** Posts and polls tagged with it. */\n posts: z.number().int().nonnegative(),\n /** Comments on those from people outside its team: what the Feedback tab lists. */\n feedback: z.number().int().nonnegative(),\n /** Members the team confirmed as testers. */\n testers: z.number().int().nonnegative(),\n }),\n listedAt: z.iso.datetime().nullable(),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n /**\n * Only for its team and for staff: staff hid it, so everyone else gets 404.\n * The page tells the team why it vanished from Discover.\n */\n hiddenByStaff: z.boolean().optional(),\n viewer: productViewerSchema.optional(),\n});\nexport type Product = z.infer<typeof productSchema>;\n\n/**\n * An invitation the team sent and nobody has answered yet, as its managers see\n * it (`GET /products/:id/invites`): who, for what role, sent by whom. The owner\n * may change its role (`PUT /team/:userId`) or cancel it (`DELETE /team/:userId`).\n */\nexport const productPendingInviteSchema = z.object({\n member: memberBylineSchema,\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductPendingInvite = z.infer<typeof productPendingInviteSchema>;\n\n/** A team invitation waiting for the viewer's answer. */\nexport const productInviteSchema = z.object({\n product: productChipSchema.extend({ tagline: z.string().optional() }),\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductInvite = z.infer<typeof productInviteSchema>;\n\n/** `GET /products/invites`. Never paged: invitations are few, and each needs an answer. */\nexport const productInvitesSchema = z.object({ items: z.array(productInviteSchema) });\nexport type ProductInvites = z.infer<typeof productInvitesSchema>;\n\n/**\n * `GET /products/mine`: every product the viewer is on the team of, archived\n * and paused included, owned first. Not paged: a founder lists few, and joins\n * teams by accepting invitations one at a time, so the list stays short in\n * practice; there is no hard cap on teams joined.\n */\nexport const myProductsSchema = z.object({ items: z.array(productCardSchema) });\nexport type MyProducts = z.infer<typeof myProductsSchema>;\n\n/** A member the team confirmed tested the product. */\nexport const productTesterSchema = z.object({\n member: memberBylineSchema,\n confirmedAt: z.iso.datetime(),\n});\nexport type ProductTester = z.infer<typeof productTesterSchema>;\n\nexport const productCardPageSchema = paginatedSchema(productCardSchema);\nexport type ProductCardPage = z.infer<typeof productCardPageSchema>;\nexport const productTeamPageSchema = paginatedSchema(productTeamMemberSchema);\nexport type ProductTeamPage = z.infer<typeof productTeamPageSchema>;\nexport const productTesterPageSchema = paginatedSchema(productTesterSchema);\nexport type ProductTesterPage = z.infer<typeof productTesterPageSchema>;\n/** Co-founder invitations first, then team; within each, the oldest invitation first. */\nexport const productPendingInvitePageSchema = paginatedSchema(productPendingInviteSchema);\nexport type ProductPendingInvitePage = z.infer<typeof productPendingInvitePageSchema>;\n\n/** `PUT|DELETE /products/:id/upvote`: the state it settled on and the fresh count. */\nexport const productUpvoteResponseSchema = z.object({\n productId: objectIdSchema,\n upvoted: z.boolean(),\n upvoteCount: z.number().int().nonnegative(),\n});\nexport type ProductUpvoteResponse = z.infer<typeof productUpvoteResponseSchema>;\n\n/**\n * Discover's filter drawer for products: every value with how many LISTED\n * products match, zero counts included, in the list's own order.\n */\nconst facetSchema = <T extends z.ZodType>(value: T) =>\n z.array(z.object({ value, count: z.number().int().nonnegative() }));\nexport const productFacetsSchema = z.object({\n industries: facetSchema(industrySchema),\n stages: facetSchema(productStageSchema),\n platforms: facetSchema(productPlatformSchema),\n asks: facetSchema(productAskSchema),\n});\nexport type ProductFacets = z.infer<typeof productFacetsSchema>;\n\n// ─── Queries and params ──────────────────────────────────────────────────────\n\n/** A Discover multi-select (`?industry=a&industry=b`): see `multiValueQuery`. */\nconst multiValue = <T extends z.ZodType>(inner: T) =>\n multiValueQuery(inner, DISCOVER_FILTER_VALUES_MAX);\n\n/**\n * `GET /api/v1/products`: LISTED products only. Filters of one kind mean \"any\n * of\", different kinds combine (\"fintech AND beta\"). `ask` keeps products\n * whose ask is open now. `q` matches the start of the name; an emptied box\n * (`?q=`) is no search, never a 400.\n */\nexport const productDiscoverQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, productSortSchema.default('trending')),\n q: optionalTrimmedString(DISCOVER_TEXT_MAX),\n industry: multiValue(industrySchema),\n stage: multiValue(productStageSchema),\n platform: multiValue(productPlatformSchema),\n ask: z.preprocess(emptyStringToUndefined, productAskSchema.optional()),\n});\nexport type ProductDiscoverQuery = z.infer<typeof productDiscoverQuerySchema>;\nexport type ProductDiscoverQueryInput = z.input<typeof productDiscoverQuerySchema>;\n\n/**\n * `GET /products/:id/feedback`: comments from outside its team on the posts\n * and polls tagged with it, newest first. `helpful=true` narrows to the ones\n * the team marked as having helped.\n */\nexport const productFeedbackQuerySchema = paginationQuerySchema.extend({\n helpful: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type ProductFeedbackQuery = z.infer<typeof productFeedbackQuerySchema>;\nexport type ProductFeedbackQueryInput = z.input<typeof productFeedbackQuerySchema>;\n\nexport const productParamsSchema = z.object({ productId: objectIdSchema });\nexport type ProductParams = z.infer<typeof productParamsSchema>;\n/** `/products/:productId/team/:userId`, `/products/:productId/testers/:userId`. */\nexport const productMemberParamsSchema = z.object({\n productId: objectIdSchema,\n userId: objectIdSchema,\n});\nexport type ProductMemberParams = z.infer<typeof productMemberParamsSchema>;\n/** `/products/by-member/:userId`. */\nexport const productsByMemberParamsSchema = z.object({ userId: objectIdSchema });\nexport type ProductsByMemberParams = z.infer<typeof productsByMemberParamsSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n// Each its own object with NO defaults (see `updateFounderProfileBodySchema`).\n\n/** A screenshot on the way in: an uploaded, processed image id, and its caption. */\nexport const productScreenshotInputSchema = z.object({\n mediaId: objectIdSchema,\n caption: z.string().trim().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshotInput = z.infer<typeof productScreenshotInputSchema>;\n\nconst screenshotsInputSchema = z\n .array(productScreenshotInputSchema)\n .max(PRODUCT_SCREENSHOTS_MAX)\n .refine((list) => eachOnce(list.map((s) => s.mediaId)), {\n error: VALIDATION_MESSAGE.screenshotsDuplicate,\n });\n\n/**\n * `POST /api/v1/products`. Starts `unlisted`, owned by the caller. The logo\n * and screenshots may come now or later (uploaded first, purpose\n * `product_logo` / `product_screenshot`, like a post's images).\n */\nexport const createProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX),\n tagline: z.string().trim().min(1).max(PRODUCT_TAGLINE_MAX).optional(),\n description: z.string().trim().min(1).max(PRODUCT_DESCRIPTION_MAX).optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: productVideoUrlSchema.optional(),\n logoMediaId: objectIdSchema.optional(),\n screenshots: screenshotsInputSchema.optional(),\n});\nexport type CreateProductBody = z.infer<typeof createProductBodySchema>;\n\n/** Text the editor may empty: absent leaves it, `null` clears it, `\"\"` is refused. */\nconst clearable = <T extends z.ZodType>(inner: T) => inner.nullable().optional();\n\n/**\n * `PATCH /api/v1/products/:id`: only the keys that changed. Images, listing\n * and status have their own routes. `links` is sent whole.\n */\nexport const updateProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX).optional(),\n tagline: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_TAGLINE_MAX),\n ),\n description: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_DESCRIPTION_MAX),\n ),\n industry: industrySchema.optional(),\n stage: productStageSchema.optional(),\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: clearable(productVideoUrlSchema),\n});\nexport type UpdateProductBody = z.infer<typeof updateProductBodySchema>;\n\n/** `PUT /products/:id/logo`: a processed `product_logo` upload. The old logo's files are deleted. */\nexport const setProductLogoBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetProductLogoBody = z.infer<typeof setProductLogoBodySchema>;\n\n/**\n * `PUT /products/:id/screenshots`: the WHOLE gallery as it should now be, in\n * order. One call adds, removes, reorders and re-captions: screenshots already\n * on the product stay; new ids must be the caller's processed\n * `product_screenshot` uploads; any left out are deleted from storage.\n */\nexport const setProductScreenshotsBodySchema = z.object({ screenshots: screenshotsInputSchema });\nexport type SetProductScreenshotsBody = z.infer<typeof setProductScreenshotsBodySchema>;\n\nexport const setProductVisibilityBodySchema = z.object({ visibility: productVisibilitySchema });\nexport type SetProductVisibilityBody = z.infer<typeof setProductVisibilityBodySchema>;\n\nexport const setProductStatusBodySchema = z.object({ status: productStatusSchema });\nexport type SetProductStatusBody = z.infer<typeof setProductStatusBodySchema>;\n\n/**\n * `PUT /products/:productId/live` (0.12.0, owner): `false` pauses it (to free\n * a live place for another), `true` makes a paused one live again.\n */\nexport const setProductLiveBodySchema = z.object({ live: z.boolean() });\nexport type SetProductLiveBody = z.infer<typeof setProductLiveBodySchema>;\n\n/**\n * Invite a member to the team; they must accept. `userId` is the member's id\n * as every card carries it (`founderCardSchema.userId`). Someone who cannot\n * join (has not finished onboarding, paused, suspended, deleted) is\n * `PRODUCT_MEMBER_NOT_INVITABLE`; someone already on it or invited,\n * `PRODUCT_ALREADY_MEMBER`.\n */\nexport const inviteProductMemberBodySchema = z.object({\n userId: objectIdSchema,\n role: productInvitableRoleSchema,\n});\nexport type InviteProductMemberBody = z.infer<typeof inviteProductMemberBodySchema>;\n\n/**\n * The owner changes someone's role (on the team or still invited). The\n * owner's own role changes only by handing over (`PRODUCT_OWNER_MUST_TRANSFER`);\n * someone not on the team or invited is `PRODUCT_NOT_ON_TEAM`.\n */\nexport const setProductMemberRoleBodySchema = z.object({ role: productInvitableRoleSchema });\nexport type SetProductMemberRoleBody = z.infer<typeof setProductMemberRoleBodySchema>;\n\n/**\n * The owner hands the product to someone already on its team (not merely\n * invited: `PRODUCT_NOT_ON_TEAM`), who must have a free place on THEIR plan,\n * counted as creating one counts (live and owner-paused products; pausing one\n * frees nothing): otherwise `PRODUCT_LIMIT_REACHED`, and they delete or hand\n * one over, or upgrade. The old owner becomes a co-founder.\n */\nexport const transferProductBodySchema = z.object({ userId: objectIdSchema });\nexport type TransferProductBody = z.infer<typeof transferProductBodySchema>;\n"]}
1
+ {"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/domains/products/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,qBAAqB,EAErB,qBAAqB,EACrB,+BAA+B,EAC/B,aAAa,EACb,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,8EAA8E;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AC,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC,CAAC;AAG7F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Products: what founders build, and the help around it\n *\n * THE IDEA (the user, 2026-10-06): founders help each other with their\n * products. A founder adds what they build; a post or poll can say which of\n * their products it is about and what they want (\"testers wanted\"); every\n * comment on it becomes that product's feedback; the community reviews and\n * upvotes it; and the help a member gives is recognised in their contribution\n * score.\n *\n * THE COMPANY STAYS THE PROFILE'S `venture` (one per founder). There are no\n * company pages: co-founders join a PRODUCT's team, as Product Hunt lists a\n * product's makers. Revisit only if one team running many products finds\n * re-inviting each time tedious.\n *\n * VISIBILITY, two states (the user's ruling): `unlisted` by default, a page\n * anyone signed in can open by its link (on a team member's profile only that\n * member sees it, in their own list); `listed`, also in Discover and on its\n * team's profiles for everyone (`productIsOnDiscover` says whether it shows\n * there now). Listing needs a logo, a tagline and at least one\n * screenshot (`PRODUCT_NOT_LISTABLE` names what is missing), so Discover never\n * shows an empty card.\n *\n * THE TEAM: an owner, co-founders and team members, joined by invitation and\n * acceptance (nobody is put on a team without saying yes), with no limit on\n * its size (the user's ruling). Who may do what:\n *\n * owner co-founder team\n * edit, images, list, invite ✓ ✓\n * tag posts, reply to reviews, ✓ ✓ ✓\n * mark feedback, confirm testers\n * change roles, remove, hand over ✓\n * archive, delete ✓\n *\n * A product's images belong to the product, not to whoever uploaded them.\n * When the owner deletes their account the product passes to the longest-\n * standing co-founder (else team member); with nobody left it is deleted.\n *\n * Routes (all signed in):\n * GET /api/v1/products Discover: productDiscoverQuerySchema\n * GET /api/v1/products/facets productFacetsSchema\n * POST /api/v1/products createProductBodySchema -> IdResponse\n * GET /api/v1/products/mine myProductsSchema\n * GET /api/v1/products/invites productInvitesSchema\n * PUT /api/v1/products/invites/:productId accept -> productSchema\n * DELETE /api/v1/products/invites/:productId decline -> IdResponse\n * GET /api/v1/products/by-member/:userId productCardPageSchema (their teams)\n * GET /api/v1/products/:productId productSchema\n * PATCH /api/v1/products/:productId updateProductBodySchema -> productSchema\n * DELETE /api/v1/products/:productId -> IdResponse (owner)\n * PUT /api/v1/products/:productId/logo setProductLogoBodySchema -> productSchema\n * DELETE /api/v1/products/:productId/logo -> productSchema\n * PUT /api/v1/products/:productId/screenshots setProductScreenshotsBodySchema -> productSchema\n * PUT /api/v1/products/:productId/visibility setProductVisibilityBodySchema -> productSchema\n * PUT /api/v1/products/:productId/status setProductStatusBodySchema -> productSchema\n * PUT /api/v1/products/:productId/live setProductLiveBodySchema -> productSchema (0.12.0)\n * GET /api/v1/products/:productId/team productTeamPageSchema\n * GET /api/v1/products/:productId/invites productPendingInvitePageSchema (managers)\n * POST /api/v1/products/:productId/invites inviteProductMemberBodySchema -> productPendingInviteSchema\n * PUT /api/v1/products/:productId/team/:userId setProductMemberRoleBodySchema -> IdResponse\n * (works on someone still invited too; refetch the team and the invites)\n * DELETE /api/v1/products/:productId/team/:userId remove, cancel an invite, or leave -> IdResponse\n * POST /api/v1/products/:productId/transfer transferProductBodySchema -> productSchema\n * PUT /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * DELETE /api/v1/products/:productId/upvote -> productUpvoteResponseSchema\n * GET /api/v1/products/:productId/posts FeedPage (posts and polls tagged with it)\n * GET /api/v1/products/:productId/feedback productFeedbackQuerySchema -> productFeedbackPageSchema (feed)\n * GET /api/v1/products/:productId/testers productTesterPageSchema\n * PUT /api/v1/products/:productId/testers/:userId confirm -> productTesterSchema\n * DELETE /api/v1/products/:productId/testers/:userId withdraw -> IdResponse\n * POST /api/v1/products/:productId/report createReportBodySchema -> CreateReportResponse\n * (reviews: `domains/reviews`)\n *\n * @module founder-schema/domains/products\n */\n\nimport { z } from 'zod';\nimport {\n eachOnce,\n emptyStringToUndefined,\n httpUrlOnHosts,\n httpUrlSchema,\n industrySchema,\n multiValueQuery,\n objectIdSchema,\n optionalTrimmedString,\n type ProductListingRequirement,\n paginationQuerySchema,\n productListingRequirementSchema,\n safeUrlSchema,\n youtubeVideoId,\n} from '../../core/common.js';\nimport {\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n PRODUCT_CAPTION_MAX,\n PRODUCT_DESCRIPTION_MAX,\n PRODUCT_NAME_MAX,\n PRODUCT_SCREENSHOTS_MAX,\n PRODUCT_TAGLINE_MAX,\n RATING_MAX,\n RATING_MIN,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** Topics a product carries, as a post does: what interest matching reads. */\nexport const PRODUCT_TOPICS_MAX = 3;\n\n// ─── Vocabulary ──────────────────────────────────────────────────────────────\n// ⚠ Every list below is STORED. Append only; removing a value orphans rows.\n\n/**\n * Where the product is in its life. Its own list, deliberately not the\n * venture's funding stage (`startupStageSchema`): \"seed\" says how a company is\n * funded, \"beta\" says whether you can use the thing. Ordered earliest first.\n */\nexport const PRODUCT_STAGE_VALUES = ['idea', 'building', 'beta', 'live'] as const;\nexport const productStageSchema = z.enum(PRODUCT_STAGE_VALUES);\nexport type ProductStage = z.infer<typeof productStageSchema>;\n\nexport const PRODUCT_PLATFORM_VALUES = [\n 'web',\n 'ios',\n 'android',\n 'desktop',\n 'browser_extension',\n 'api',\n 'hardware',\n 'other',\n] as const;\nexport const productPlatformSchema = z.enum(PRODUCT_PLATFORM_VALUES);\nexport type ProductPlatform = z.infer<typeof productPlatformSchema>;\n\n/** `unlisted` (the default) or `listed` in Discover. See the module note. */\nexport const PRODUCT_VISIBILITY_VALUES = ['unlisted', 'listed'] as const;\nexport const productVisibilitySchema = z.enum(PRODUCT_VISIBILITY_VALUES);\nexport type ProductVisibility = z.infer<typeof productVisibilitySchema>;\n\n/**\n * `archived`: kept, readable and still on its team's profiles, but out of\n * Discover and closed to new posts, reviews and upvotes. Restorable.\n */\nexport const PRODUCT_STATUS_VALUES = ['active', 'archived'] as const;\nexport const productStatusSchema = z.enum(PRODUCT_STATUS_VALUES);\nexport type ProductStatus = z.infer<typeof productStatusSchema>;\n\n/** One owner per product; see the module note for what each role may do. */\nexport const PRODUCT_TEAM_ROLE_VALUES = ['owner', 'cofounder', 'team'] as const;\nexport const productTeamRoleSchema = z.enum(PRODUCT_TEAM_ROLE_VALUES);\nexport type ProductTeamRole = z.infer<typeof productTeamRoleSchema>;\n\n/** A team row's state: invited, not yet answered, or on the team. The backend's storage's own values, from here like every other list (0.20.0). */\nexport const PRODUCT_MEMBER_STATUS_VALUES = ['invited', 'active'] as const;\nexport const productMemberStatusSchema = z.enum(PRODUCT_MEMBER_STATUS_VALUES);\nexport type ProductMemberStatus = z.infer<typeof productMemberStatusSchema>;\n\n/** The roles an invitation (or a role change) may give. Ownership is handed over, never invited. */\nexport const PRODUCT_INVITABLE_ROLE_VALUES = ['cofounder', 'team'] as const;\nexport const productInvitableRoleSchema = z.enum(PRODUCT_INVITABLE_ROLE_VALUES);\nexport type ProductInvitableRole = z.infer<typeof productInvitableRoleSchema>;\n\n/**\n * What a post or poll about a product ASKS of the community. Optional, and\n * only with a product. Each ask keeps the product on that shelf of Discover\n * for `PRODUCT_ASK_OPEN_DAYS`.\n *\n * feedback \"tell me what you think\"\n * testers \"try it\": confirmed testers are recognised (`/testers`)\n * launch \"it is out\"\n * ideas \"what should it do next\"\n */\nexport const PRODUCT_ASK_VALUES = ['feedback', 'testers', 'launch', 'ideas'] as const;\nexport const productAskSchema = z.enum(PRODUCT_ASK_VALUES);\nexport type ProductAsk = z.infer<typeof productAskSchema>;\n\n/**\n * Discover's orders.\n *\n * trending recent upvotes, reviews and feedback, newer counting more\n * (recomputed every 15 minutes). The default.\n * new newest first by when it was FIRST listed (unlisting and\n * listing again does not move it back to the top)\n * top_rated best rated, pulled toward a neutral 3 stars by 5 imaginary\n * reviews so a few perfect ratings cannot beat many excellent\n * ones; only products with `REVIEW_AVERAGE_MIN_COUNT` reviews\n */\nexport const PRODUCT_SORT_VALUES = ['trending', 'new', 'top_rated'] as const;\nexport const productSortSchema = z.enum(PRODUCT_SORT_VALUES);\nexport type ProductSort = z.infer<typeof productSortSchema>;\n\n/**\n * What listing needs (defined in core, beside the error details that carry it:\n * `PRODUCT_NOT_LISTABLE` returns the missing ones in `details.missing`).\n */\nexport {\n PRODUCT_LISTING_REQUIREMENT_VALUES,\n type ProductListingRequirement,\n productListingRequirementSchema,\n} from '../../core/common.js';\n\n/**\n * What listing still needs, from what a product has (0.18.0, moved from the\n * backend): a logo, a tagline, at least one screenshot. THE rule: the server\n * refuses listing (and refuses taking any of the three from a LISTED product)\n * with it, the page's checklist is it (`viewer.missingForListing`), and a\n * screen asks it with the change applied (\"what would removing the logo\n * leave?\") to know whether to offer the change at all.\n */\nexport function missingForListing(p: {\n hasLogo: boolean;\n tagline?: string | null;\n screenshotCount: number;\n}): ProductListingRequirement[] {\n const missing: ProductListingRequirement[] = [];\n if (!p.hasLogo) missing.push('logo');\n if (!p.tagline?.trim()) missing.push('tagline');\n if (p.screenshotCount === 0) missing.push('screenshot');\n return missing;\n}\n\n// ─── Fields ──────────────────────────────────────────────────────────────────\n\n/**\n * Where to get it. Every link is member-typed, so every one is\n * `httpUrlSchema`, and the store links must also be ON the store: the\n * hostname is parsed and compared exactly (`httpUrlOnHosts`).\n */\nexport const productLinksSchema = z.object({\n website: httpUrlSchema.optional(),\n appStore: httpUrlOnHosts(\n ['apps.apple.com', 'itunes.apple.com'],\n VALIDATION_MESSAGE.appStoreLinkHost,\n ).optional(),\n playStore: httpUrlOnHosts(['play.google.com'], VALIDATION_MESSAGE.playStoreLinkHost).optional(),\n github: httpUrlOnHosts(\n ['github.com', 'www.github.com'],\n VALIDATION_MESSAGE.githubLinkHost,\n ).optional(),\n});\nexport type ProductLinks = z.infer<typeof productLinksSchema>;\n/** A product's links, by key, in order (0.18.0): what the backend's model and its page list. */\nexport const PRODUCT_LINK_KEYS = productLinksSchema.keyof().options;\nexport type ProductLinkKey = (typeof PRODUCT_LINK_KEYS)[number];\n\n/** A product's links as a page READS them: a safe URL each, whatever host rules came later. */\nexport const productLinksReadSchema = z.object({\n website: safeUrlSchema.optional(),\n appStore: safeUrlSchema.optional(),\n playStore: safeUrlSchema.optional(),\n github: safeUrlSchema.optional(),\n});\n\n/**\n * A demo video: a link to one YouTube VIDEO, played in the page (never\n * uploaded). A channel or playlist link is refused: the page cannot embed it\n * (`youtubeVideoId`, 0.7.0).\n */\nexport const productVideoUrlSchema = httpUrlSchema.refine((url) => youtubeVideoId(url) !== null, {\n error: VALIDATION_MESSAGE.videoLinkHost,\n});\n\nconst platformsSchema = z\n .array(productPlatformSchema)\n .max(PRODUCT_PLATFORM_VALUES.length)\n .refine(eachOnce, {\n error: VALIDATION_MESSAGE.platformsDuplicate,\n });\n\n// ─── Read shapes ─────────────────────────────────────────────────────────────\n\n/**\n * A product named on something else: the chip on a post or poll, a\n * notification, a points entry. `logoUrl` is the logo's smallest size.\n */\nexport const productChipSchema = z.object({\n id: objectIdSchema,\n /** For a readable URL, `/products/<id>/<slug>`. The id is what resolves; a renamed product keeps its links. */\n slug: z.string(),\n name: z.string(),\n logoUrl: z.url().optional(),\n});\nexport type ProductChip = z.infer<typeof productChipSchema>;\n\n/**\n * How it is rated. `average` (one decimal) is null until the product has\n * `REVIEW_AVERAGE_MIN_COUNT` reviews: a client shows \"Not enough reviews yet\",\n * never a lone 5.0 from one friend.\n */\nexport const productRatingSchema = z.object({\n count: z.number().int().nonnegative(),\n average: z.number().min(RATING_MIN).max(RATING_MAX).nullable(),\n});\nexport type ProductRating = z.infer<typeof productRatingSchema>;\n\n/** One screenshot: a processed image (every size, ready for `srcset`) and its caption. */\nexport const productScreenshotSchema = mediaImageSchema.extend({\n caption: z.string().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshot = z.infer<typeof productScreenshotSchema>;\n\n/** What this viewer may do on a Discover card. */\nexport const productCardViewerSchema = z.object({\n upvoted: z.boolean(),\n /** Not on its team, and the product is open (not archived). */\n canUpvote: z.boolean(),\n /** Their role on its team, or null. */\n role: productTeamRoleSchema.nullable(),\n /**\n * They may act FOR it now (0.7.0): on its team, and it is neither archived\n * nor hidden by staff. The server's own rule, for a picker such as the\n * composer's \"about which product\" (the page's `viewer.canRepresent`).\n */\n canRepresent: z.boolean().optional(),\n});\n\n/**\n * A product on Discover, on a profile, in \"my products\". `cover` is the first\n * screenshot. `openAsks` are the asks whose window is open now, by the\n * server's clock (\"Testers wanted\").\n */\nexport const productCardSchema = z.object({\n id: objectIdSchema,\n slug: z.string(),\n name: z.string(),\n tagline: z.string().optional(),\n logo: mediaImageSchema.optional(),\n cover: mediaImageSchema.optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: z.array(productPlatformSchema),\n visibility: productVisibilitySchema,\n status: productStatusSchema,\n rating: productRatingSchema,\n upvoteCount: z.number().int().nonnegative(),\n openAsks: z.array(productAskSchema),\n /**\n * Staff hid it (0.7.0). Only ever on a card its team or staff can see (in\n * \"my products\", on a team member's profile): a \"Hidden by moderators\" badge.\n */\n hiddenByStaff: z.boolean().optional(),\n /**\n * Paused (0.12.0): its owner owns more products than their plan keeps\n * live. Like a hidden one, only its team and staff see it at all: a\n * \"Paused\" badge. The owner makes it live again (`PUT .../live`) when a\n * place is free.\n */\n paused: z.boolean().optional(),\n viewer: productCardViewerSchema.optional(),\n});\nexport type ProductCard = z.infer<typeof productCardSchema>;\n\n/**\n * Whether a product shows on Discover now (0.18.0): listed, active, not hidden\n * by staff and not paused. THE rule: the backend's Discover query applies it\n * as a filter (`LISTED_PRODUCT`, pinned to this by a test), and a screen that\n * says \"On Discover\" asks this, never its own reading of the fields.\n */\nexport function productIsOnDiscover(\n p: Pick<ProductCard, 'visibility' | 'status' | 'hiddenByStaff' | 'paused'>,\n): boolean {\n return p.visibility === 'listed' && p.status === 'active' && !p.hiddenByStaff && !p.paused;\n}\n\n/**\n * Why a product is paused (0.12.0). ⚠ Stored: append only.\n * limit over its owner's live places (a plan ended, a refund, joining\n * without one): it comes back by itself when a place frees\n * owner its owner paused it, to free a place for another: it stays\n * paused until they make it live\n */\nexport const PRODUCT_PAUSED_BY_VALUES = ['limit', 'owner'] as const;\nexport const productPausedBySchema = z.enum(PRODUCT_PAUSED_BY_VALUES);\nexport type ProductPausedBy = z.infer<typeof productPausedBySchema>;\n\n/** One person on a product's team, live-joined like every byline. */\nexport const productTeamMemberSchema = memberBylineSchema.extend({\n role: productTeamRoleSchema,\n /** When they accepted (or, for the owner, created the product). */\n joinedAt: z.iso.datetime(),\n});\nexport type ProductTeamMember = z.infer<typeof productTeamMemberSchema>;\n\n/**\n * What THIS viewer may do on the product page, decided by the server and sent\n * as plain answers (the same rule as `viewerStateSchema` on a post).\n */\nexport const productViewerSchema = productCardViewerSchema.extend({\n /** An invitation to the team is waiting for them: offer Accept / Decline. */\n invited: z.boolean(),\n /** Their own review of it, if any, so the page offers Edit instead of Write. */\n reviewId: objectIdSchema.nullable(),\n /** The team confirmed them as a tester. */\n tester: z.boolean(),\n /** Owner and co-founders: details, images, listing, invitations. */\n canEdit: z.boolean(),\n /** Owner: roles, removals, handing over. */\n canManageTeam: z.boolean(),\n /** Owner. */\n canDelete: z.boolean(),\n /**\n * Owner (0.12.0): may pause it, or make it live again. Making it live is\n * refused with `PRODUCT_LIMIT_REACHED` when no live place is free; the page\n * says so from `GET /me/membership`.\n */\n canSetLive: z.boolean(),\n /** Anyone on the team: tag posts with it, reply to reviews, mark feedback, confirm testers. */\n canRepresent: z.boolean(),\n /** Not on its team, no review yet, and the product is open. */\n canReview: z.boolean(),\n canReport: z.boolean(),\n /**\n * For whoever may edit: what listing still needs. Empty means it can be\n * listed (or already is). Lets the page show a checklist before the member\n * tries and is refused.\n */\n missingForListing: z.array(productListingRequirementSchema),\n});\nexport type ProductViewer = z.infer<typeof productViewerSchema>;\n\n/** The product page. */\nexport const productSchema = productCardSchema.extend({\n /** Set with `paused` (0.12.0): who paused it, so the page says why. */\n pausedBy: productPausedBySchema.optional(),\n description: z.string().optional(),\n /**\n * READ leniently (0.18.0): a link is checked by today's host rules when it\n * is WRITTEN (`productLinksSchema`). A page reads what was stored, and a link\n * saved before a rule existed (the store hosts came in 0.7.0) must not make\n * the whole page fail to load.\n */\n links: productLinksReadSchema,\n videoUrl: safeUrlSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX),\n screenshots: z.array(productScreenshotSchema).max(PRODUCT_SCREENSHOTS_MAX),\n /** The owner first, then co-founders, then the team, each by when they joined; at most `PRODUCT_TEAM_SHOWN`. */\n team: z.array(productTeamMemberSchema),\n teamCount: z.number().int().nonnegative(),\n counts: z.object({\n /** Posts and polls tagged with it. */\n posts: z.number().int().nonnegative(),\n /** Comments on those from people outside its team: what the Feedback tab lists. */\n feedback: z.number().int().nonnegative(),\n /** Members the team confirmed as testers. */\n testers: z.number().int().nonnegative(),\n }),\n listedAt: z.iso.datetime().nullable(),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n /**\n * Only for its team and for staff: staff hid it, so everyone else gets 404.\n * The page tells the team why it vanished from Discover.\n */\n hiddenByStaff: z.boolean().optional(),\n viewer: productViewerSchema.optional(),\n});\nexport type Product = z.infer<typeof productSchema>;\n\n/**\n * An invitation the team sent and nobody has answered yet, as its managers see\n * it (`GET /products/:id/invites`): who, for what role, sent by whom. The owner\n * may change its role (`PUT /team/:userId`) or cancel it (`DELETE /team/:userId`).\n */\nexport const productPendingInviteSchema = z.object({\n member: memberBylineSchema,\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductPendingInvite = z.infer<typeof productPendingInviteSchema>;\n\n/** A team invitation waiting for the viewer's answer. */\nexport const productInviteSchema = z.object({\n product: productChipSchema.extend({ tagline: z.string().optional() }),\n role: productInvitableRoleSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type ProductInvite = z.infer<typeof productInviteSchema>;\n\n/** `GET /products/invites`. Never paged: invitations are few, and each needs an answer. */\nexport const productInvitesSchema = z.object({ items: z.array(productInviteSchema) });\nexport type ProductInvites = z.infer<typeof productInvitesSchema>;\n\n/**\n * `GET /products/mine`: every product the viewer is on the team of, archived\n * and paused included, owned first. Not paged: a founder lists few, and joins\n * teams by accepting invitations one at a time, so the list stays short in\n * practice; there is no hard cap on teams joined.\n */\nexport const myProductsSchema = z.object({ items: z.array(productCardSchema) });\nexport type MyProducts = z.infer<typeof myProductsSchema>;\n\n/** A member the team confirmed tested the product. */\nexport const productTesterSchema = z.object({\n member: memberBylineSchema,\n confirmedAt: z.iso.datetime(),\n});\nexport type ProductTester = z.infer<typeof productTesterSchema>;\n\nexport const productCardPageSchema = paginatedSchema(productCardSchema);\nexport type ProductCardPage = z.infer<typeof productCardPageSchema>;\nexport const productTeamPageSchema = paginatedSchema(productTeamMemberSchema);\nexport type ProductTeamPage = z.infer<typeof productTeamPageSchema>;\nexport const productTesterPageSchema = paginatedSchema(productTesterSchema);\nexport type ProductTesterPage = z.infer<typeof productTesterPageSchema>;\n/** Co-founder invitations first, then team; within each, the oldest invitation first. */\nexport const productPendingInvitePageSchema = paginatedSchema(productPendingInviteSchema);\nexport type ProductPendingInvitePage = z.infer<typeof productPendingInvitePageSchema>;\n\n/** `PUT|DELETE /products/:id/upvote`: the state it settled on and the fresh count. */\nexport const productUpvoteResponseSchema = z.object({\n productId: objectIdSchema,\n upvoted: z.boolean(),\n upvoteCount: z.number().int().nonnegative(),\n});\nexport type ProductUpvoteResponse = z.infer<typeof productUpvoteResponseSchema>;\n\n/**\n * Discover's filter drawer for products: every value with how many LISTED\n * products match, zero counts included, in the list's own order.\n */\nconst facetSchema = <T extends z.ZodType>(value: T) =>\n z.array(z.object({ value, count: z.number().int().nonnegative() }));\nexport const productFacetsSchema = z.object({\n industries: facetSchema(industrySchema),\n stages: facetSchema(productStageSchema),\n platforms: facetSchema(productPlatformSchema),\n asks: facetSchema(productAskSchema),\n});\nexport type ProductFacets = z.infer<typeof productFacetsSchema>;\n\n// ─── Queries and params ──────────────────────────────────────────────────────\n\n/** A Discover multi-select (`?industry=a&industry=b`): see `multiValueQuery`. */\nconst multiValue = <T extends z.ZodType>(inner: T) =>\n multiValueQuery(inner, DISCOVER_FILTER_VALUES_MAX);\n\n/**\n * `GET /api/v1/products`: LISTED products only. Filters of one kind mean \"any\n * of\", different kinds combine (\"fintech AND beta\"). `ask` keeps products\n * whose ask is open now. `q` matches the start of the name; an emptied box\n * (`?q=`) is no search, never a 400.\n */\nexport const productDiscoverQuerySchema = paginationQuerySchema.extend({\n sort: z.preprocess(emptyStringToUndefined, productSortSchema.default('trending')),\n q: optionalTrimmedString(DISCOVER_TEXT_MAX),\n industry: multiValue(industrySchema),\n stage: multiValue(productStageSchema),\n platform: multiValue(productPlatformSchema),\n ask: z.preprocess(emptyStringToUndefined, productAskSchema.optional()),\n});\nexport type ProductDiscoverQuery = z.infer<typeof productDiscoverQuerySchema>;\nexport type ProductDiscoverQueryInput = z.input<typeof productDiscoverQuerySchema>;\n\n/**\n * `GET /products/:id/feedback`: comments from outside its team on the posts\n * and polls tagged with it, newest first. `helpful=true` narrows to the ones\n * the team marked as having helped.\n */\nexport const productFeedbackQuerySchema = paginationQuerySchema.extend({\n helpful: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type ProductFeedbackQuery = z.infer<typeof productFeedbackQuerySchema>;\nexport type ProductFeedbackQueryInput = z.input<typeof productFeedbackQuerySchema>;\n\nexport const productParamsSchema = z.object({ productId: objectIdSchema });\nexport type ProductParams = z.infer<typeof productParamsSchema>;\n/** `/products/:productId/team/:userId`, `/products/:productId/testers/:userId`. */\nexport const productMemberParamsSchema = z.object({\n productId: objectIdSchema,\n userId: objectIdSchema,\n});\nexport type ProductMemberParams = z.infer<typeof productMemberParamsSchema>;\n/** `/products/by-member/:userId`. */\nexport const productsByMemberParamsSchema = z.object({ userId: objectIdSchema });\nexport type ProductsByMemberParams = z.infer<typeof productsByMemberParamsSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n// Each its own object with NO defaults (see `updateFounderProfileBodySchema`).\n\n/** A screenshot on the way in: an uploaded, processed image id, and its caption. */\nexport const productScreenshotInputSchema = z.object({\n mediaId: objectIdSchema,\n caption: z.string().trim().max(PRODUCT_CAPTION_MAX).optional(),\n});\nexport type ProductScreenshotInput = z.infer<typeof productScreenshotInputSchema>;\n\nconst screenshotsInputSchema = z\n .array(productScreenshotInputSchema)\n .max(PRODUCT_SCREENSHOTS_MAX)\n .refine((list) => eachOnce(list.map((s) => s.mediaId)), {\n error: VALIDATION_MESSAGE.screenshotsDuplicate,\n });\n\n/**\n * `POST /api/v1/products`. Starts `unlisted`, owned by the caller. The logo\n * and screenshots may come now or later (uploaded first, purpose\n * `product_logo` / `product_screenshot`, like a post's images).\n */\nexport const createProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX),\n tagline: z.string().trim().min(1).max(PRODUCT_TAGLINE_MAX).optional(),\n description: z.string().trim().min(1).max(PRODUCT_DESCRIPTION_MAX).optional(),\n industry: industrySchema,\n stage: productStageSchema,\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: productVideoUrlSchema.optional(),\n logoMediaId: objectIdSchema.optional(),\n screenshots: screenshotsInputSchema.optional(),\n});\nexport type CreateProductBody = z.infer<typeof createProductBodySchema>;\n\n/** Text the editor may empty: absent leaves it, `null` clears it, `\"\"` is refused. */\nconst clearable = <T extends z.ZodType>(inner: T) => inner.nullable().optional();\n\n/**\n * `PATCH /api/v1/products/:id`: only the keys that changed. Images, listing\n * and status have their own routes. `links` is sent whole.\n */\nexport const updateProductBodySchema = z.object({\n name: z.string().trim().min(1).max(PRODUCT_NAME_MAX).optional(),\n tagline: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_TAGLINE_MAX),\n ),\n description: clearable(\n z.string().trim().min(1, VALIDATION_MESSAGE.clearWithNull).max(PRODUCT_DESCRIPTION_MAX),\n ),\n industry: industrySchema.optional(),\n stage: productStageSchema.optional(),\n platforms: platformsSchema.optional(),\n topics: z.array(topicSchema).max(PRODUCT_TOPICS_MAX).optional(),\n links: productLinksSchema.optional(),\n videoUrl: clearable(productVideoUrlSchema),\n});\nexport type UpdateProductBody = z.infer<typeof updateProductBodySchema>;\n\n/** `PUT /products/:id/logo`: a processed `product_logo` upload. The old logo's files are deleted. */\nexport const setProductLogoBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetProductLogoBody = z.infer<typeof setProductLogoBodySchema>;\n\n/**\n * `PUT /products/:id/screenshots`: the WHOLE gallery as it should now be, in\n * order. One call adds, removes, reorders and re-captions: screenshots already\n * on the product stay; new ids must be the caller's processed\n * `product_screenshot` uploads; any left out are deleted from storage.\n */\nexport const setProductScreenshotsBodySchema = z.object({ screenshots: screenshotsInputSchema });\nexport type SetProductScreenshotsBody = z.infer<typeof setProductScreenshotsBodySchema>;\n\nexport const setProductVisibilityBodySchema = z.object({ visibility: productVisibilitySchema });\nexport type SetProductVisibilityBody = z.infer<typeof setProductVisibilityBodySchema>;\n\nexport const setProductStatusBodySchema = z.object({ status: productStatusSchema });\nexport type SetProductStatusBody = z.infer<typeof setProductStatusBodySchema>;\n\n/**\n * `PUT /products/:productId/live` (0.12.0, owner): `false` pauses it (to free\n * a live place for another), `true` makes a paused one live again.\n */\nexport const setProductLiveBodySchema = z.object({ live: z.boolean() });\nexport type SetProductLiveBody = z.infer<typeof setProductLiveBodySchema>;\n\n/**\n * Invite a member to the team; they must accept. `userId` is the member's id\n * as every card carries it (`founderCardSchema.userId`). Someone who cannot\n * join (has not finished onboarding, paused, suspended, deleted) is\n * `PRODUCT_MEMBER_NOT_INVITABLE`; someone already on it or invited,\n * `PRODUCT_ALREADY_MEMBER`.\n */\nexport const inviteProductMemberBodySchema = z.object({\n userId: objectIdSchema,\n role: productInvitableRoleSchema,\n});\nexport type InviteProductMemberBody = z.infer<typeof inviteProductMemberBodySchema>;\n\n/**\n * The owner changes someone's role (on the team or still invited). The\n * owner's own role changes only by handing over (`PRODUCT_OWNER_MUST_TRANSFER`);\n * someone not on the team or invited is `PRODUCT_NOT_ON_TEAM`.\n */\nexport const setProductMemberRoleBodySchema = z.object({ role: productInvitableRoleSchema });\nexport type SetProductMemberRoleBody = z.infer<typeof setProductMemberRoleBodySchema>;\n\n/**\n * The owner hands the product to someone already on its team (not merely\n * invited: `PRODUCT_NOT_ON_TEAM`), who must have a free place on THEIR plan,\n * counted as creating one counts (live and owner-paused products; pausing one\n * frees nothing): otherwise `PRODUCT_LIMIT_REACHED`, and they delete or hand\n * one over, or upgrade. The old owner becomes a co-founder.\n */\nexport const transferProductBodySchema = z.object({ userId: objectIdSchema });\nexport type TransferProductBody = z.infer<typeof transferProductBodySchema>;\n"]}