@86d-app/reviews 0.0.4 → 0.0.13

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 (104) hide show
  1. package/.turbo/turbo-build.log +1 -0
  2. package/AGENTS.md +54 -18
  3. package/README.md +150 -41
  4. package/dist/__tests__/controllers.test.d.ts +2 -0
  5. package/dist/__tests__/controllers.test.d.ts.map +1 -0
  6. package/dist/__tests__/endpoint-security.test.d.ts +2 -0
  7. package/dist/__tests__/endpoint-security.test.d.ts.map +1 -0
  8. package/dist/__tests__/new-features.test.d.ts +2 -0
  9. package/dist/__tests__/new-features.test.d.ts.map +1 -0
  10. package/dist/__tests__/service-impl.test.d.ts +2 -0
  11. package/dist/__tests__/service-impl.test.d.ts.map +1 -0
  12. package/dist/admin/components/index.d.ts +4 -0
  13. package/dist/admin/components/index.d.ts.map +1 -0
  14. package/dist/admin/components/review-analytics.d.ts +2 -0
  15. package/dist/admin/components/review-analytics.d.ts.map +1 -0
  16. package/dist/admin/components/review-list.d.ts +2 -0
  17. package/dist/admin/components/review-list.d.ts.map +1 -0
  18. package/dist/admin/components/review-moderation.d.ts +6 -0
  19. package/dist/admin/components/review-moderation.d.ts.map +1 -0
  20. package/dist/admin/endpoints/approve-review.d.ts +16 -0
  21. package/dist/admin/endpoints/approve-review.d.ts.map +1 -0
  22. package/dist/admin/endpoints/delete-review.d.ts +16 -0
  23. package/dist/admin/endpoints/delete-review.d.ts.map +1 -0
  24. package/dist/admin/endpoints/get-review.d.ts +16 -0
  25. package/dist/admin/endpoints/get-review.d.ts.map +1 -0
  26. package/dist/admin/endpoints/index.d.ts +167 -0
  27. package/dist/admin/endpoints/index.d.ts.map +1 -0
  28. package/dist/admin/endpoints/list-reports.d.ts +17 -0
  29. package/dist/admin/endpoints/list-reports.d.ts.map +1 -0
  30. package/dist/admin/endpoints/list-review-requests.d.ts +11 -0
  31. package/dist/admin/endpoints/list-review-requests.d.ts.map +1 -0
  32. package/dist/admin/endpoints/list-reviews.d.ts +18 -0
  33. package/dist/admin/endpoints/list-reviews.d.ts.map +1 -0
  34. package/dist/admin/endpoints/reject-review.d.ts +16 -0
  35. package/dist/admin/endpoints/reject-review.d.ts.map +1 -0
  36. package/dist/admin/endpoints/respond-review.d.ts +19 -0
  37. package/dist/admin/endpoints/respond-review.d.ts.map +1 -0
  38. package/dist/admin/endpoints/review-analytics.d.ts +6 -0
  39. package/dist/admin/endpoints/review-analytics.d.ts.map +1 -0
  40. package/dist/admin/endpoints/review-request-stats.d.ts +6 -0
  41. package/dist/admin/endpoints/review-request-stats.d.ts.map +1 -0
  42. package/dist/admin/endpoints/send-review-request.d.ts +23 -0
  43. package/dist/admin/endpoints/send-review-request.d.ts.map +1 -0
  44. package/dist/admin/endpoints/update-report.d.ts +22 -0
  45. package/dist/admin/endpoints/update-report.d.ts.map +1 -0
  46. package/dist/index.d.ts +8 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/schema.d.ts +136 -0
  49. package/dist/schema.d.ts.map +1 -0
  50. package/dist/service-impl.d.ts +6 -0
  51. package/dist/service-impl.d.ts.map +1 -0
  52. package/dist/service.d.ts +149 -0
  53. package/dist/service.d.ts.map +1 -0
  54. package/dist/store/components/_hooks.d.ts +6 -0
  55. package/dist/store/components/_hooks.d.ts.map +1 -0
  56. package/dist/store/components/_utils.d.ts +3 -0
  57. package/dist/store/components/_utils.d.ts.map +1 -0
  58. package/dist/store/components/distribution-bars.d.ts +5 -0
  59. package/dist/store/components/distribution-bars.d.ts.map +1 -0
  60. package/dist/store/components/index.d.ts +18 -0
  61. package/dist/store/components/index.d.ts.map +1 -0
  62. package/dist/store/components/product-reviews.d.ts +5 -0
  63. package/dist/store/components/product-reviews.d.ts.map +1 -0
  64. package/dist/store/components/review-card.d.ts +18 -0
  65. package/dist/store/components/review-card.d.ts.map +1 -0
  66. package/dist/store/components/review-form.d.ts +5 -0
  67. package/dist/store/components/review-form.d.ts.map +1 -0
  68. package/dist/store/components/reviews-summary.d.ts +4 -0
  69. package/dist/store/components/reviews-summary.d.ts.map +1 -0
  70. package/dist/store/components/star-display.d.ts +5 -0
  71. package/dist/store/components/star-display.d.ts.map +1 -0
  72. package/dist/store/components/star-picker.d.ts +5 -0
  73. package/dist/store/components/star-picker.d.ts.map +1 -0
  74. package/dist/store/endpoints/index.d.ts +116 -0
  75. package/dist/store/endpoints/index.d.ts.map +1 -0
  76. package/dist/store/endpoints/list-my-reviews.d.ts +30 -0
  77. package/dist/store/endpoints/list-my-reviews.d.ts.map +1 -0
  78. package/dist/store/endpoints/list-product-reviews.d.ts +23 -0
  79. package/dist/store/endpoints/list-product-reviews.d.ts.map +1 -0
  80. package/dist/store/endpoints/mark-helpful.d.ts +18 -0
  81. package/dist/store/endpoints/mark-helpful.d.ts.map +1 -0
  82. package/dist/store/endpoints/report-review.d.ts +27 -0
  83. package/dist/store/endpoints/report-review.d.ts.map +1 -0
  84. package/dist/store/endpoints/submit-review.d.ts +25 -0
  85. package/dist/store/endpoints/submit-review.d.ts.map +1 -0
  86. package/package.json +3 -3
  87. package/src/__tests__/controllers.test.ts +1074 -0
  88. package/src/__tests__/endpoint-security.test.ts +559 -0
  89. package/src/__tests__/new-features.test.ts +618 -0
  90. package/src/__tests__/service-impl.test.ts +1 -1
  91. package/src/admin/endpoints/index.ts +4 -0
  92. package/src/admin/endpoints/list-reports.ts +25 -0
  93. package/src/admin/endpoints/update-report.ts +22 -0
  94. package/src/index.ts +7 -1
  95. package/src/schema.ts +28 -0
  96. package/src/service-impl.ts +151 -3
  97. package/src/service.ts +61 -0
  98. package/src/store/endpoints/index.ts +2 -0
  99. package/src/store/endpoints/list-my-reviews.ts +1 -1
  100. package/src/store/endpoints/list-product-reviews.ts +6 -2
  101. package/src/store/endpoints/mark-helpful.ts +21 -2
  102. package/src/store/endpoints/report-review.ts +38 -0
  103. package/src/store/endpoints/submit-review.ts +33 -7
  104. package/COMPONENTS.md +0 -34
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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AAG,SAAS,CAAC;QAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1B,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE5B,kBAAkB,CACjB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,YAAY,GAClB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAEhC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,eAAe;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,MAAM,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,6 @@
1
+ export declare function useReviewsApi(): {
2
+ submitReview: import("@86d-app/core/client").AnyEndpointHook;
3
+ listProductReviews: import("@86d-app/core/client").AnyEndpointHook;
4
+ markHelpful: import("@86d-app/core/client").AnyEndpointHook;
5
+ };
6
+ //# sourceMappingURL=_hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_hooks.d.ts","sourceRoot":"","sources":["../../../src/store/components/_hooks.ts"],"names":[],"mappings":"AAIA,wBAAgB,aAAa;;;;EAQ5B"}
@@ -0,0 +1,3 @@
1
+ export declare function formatDate(iso: string): string;
2
+ export declare function extractError(error: Error | null, fallback: string): string;
3
+ //# sourceMappingURL=_utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../../../src/store/components/_utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO1E"}
@@ -0,0 +1,5 @@
1
+ export declare function DistributionBars({ distribution, total, }: {
2
+ distribution: Record<string, number>;
3
+ total: number;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=distribution-bars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distribution-bars.d.ts","sourceRoot":"","sources":["../../../src/store/components/distribution-bars.tsx"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,EAChC,YAAY,EACZ,KAAK,GACL,EAAE;IACF,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;CACd,+BAEA"}
@@ -0,0 +1,18 @@
1
+ import { DistributionBars } from "./distribution-bars";
2
+ import { ProductReviews } from "./product-reviews";
3
+ import { ReviewCard } from "./review-card";
4
+ import { ReviewForm } from "./review-form";
5
+ import { ReviewsSummary } from "./reviews-summary";
6
+ import { StarDisplay } from "./star-display";
7
+ import { StarPicker } from "./star-picker";
8
+ declare const _default: {
9
+ ReviewsSummary: typeof ReviewsSummary;
10
+ ProductReviews: typeof ProductReviews;
11
+ StarDisplay: typeof StarDisplay;
12
+ StarPicker: typeof StarPicker;
13
+ ReviewCard: typeof ReviewCard;
14
+ ReviewForm: typeof ReviewForm;
15
+ DistributionBars: typeof DistributionBars;
16
+ };
17
+ export default _default;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/components/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;AAE3C,wBAQ0B"}
@@ -0,0 +1,5 @@
1
+ export declare function ProductReviews({ productId, title, }: {
2
+ productId: string;
3
+ title?: string | undefined;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=product-reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-reviews.d.ts","sourceRoot":"","sources":["../../../src/store/components/product-reviews.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,cAAc,CAAC,EAC9B,SAAS,EACT,KAA0B,GAC1B,EAAE;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,+BAgIA"}
@@ -0,0 +1,18 @@
1
+ interface Review {
2
+ id: string;
3
+ authorName: string;
4
+ rating: number;
5
+ title?: string | undefined;
6
+ body: string;
7
+ isVerifiedPurchase: boolean;
8
+ helpfulCount: number;
9
+ merchantResponse?: string | undefined;
10
+ merchantResponseAt?: string | undefined;
11
+ createdAt: string;
12
+ }
13
+ export declare function ReviewCard({ review, onMarkHelpful, }: {
14
+ review: Review;
15
+ onMarkHelpful?: ((id: string) => Promise<void>) | undefined;
16
+ }): import("react").JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=review-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-card.d.ts","sourceRoot":"","sources":["../../../src/store/components/review-card.tsx"],"names":[],"mappings":"AAOA,UAAU,MAAM;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,UAAU,CAAC,EAC1B,MAAM,EACN,aAAa,GACb,EAAE;IACF,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;CAC5D,+BA4DA"}
@@ -0,0 +1,5 @@
1
+ export declare function ReviewForm({ productId, onSuccess, }: {
2
+ productId: string;
3
+ onSuccess: () => void;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=review-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-form.d.ts","sourceRoot":"","sources":["../../../src/store/components/review-form.tsx"],"names":[],"mappings":"AAQA,wBAAgB,UAAU,CAAC,EAC1B,SAAS,EACT,SAAS,GACT,EAAE;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,IAAI,CAAC;CACtB,+BAqDA"}
@@ -0,0 +1,4 @@
1
+ export declare function ReviewsSummary({ productId }: {
2
+ productId: string;
3
+ }): import("react").JSX.Element | null;
4
+ //# sourceMappingURL=reviews-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviews-summary.d.ts","sourceRoot":"","sources":["../../../src/store/components/reviews-summary.tsx"],"names":[],"mappings":"AAYA,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,sCAiBlE"}
@@ -0,0 +1,5 @@
1
+ export declare function StarDisplay({ rating, size, }: {
2
+ rating: number;
3
+ size?: "sm" | "md" | "lg";
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=star-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"star-display.d.ts","sourceRoot":"","sources":["../../../src/store/components/star-display.tsx"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,IAAW,GACX,EAAE;IACF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC1B,+BAiBA"}
@@ -0,0 +1,5 @@
1
+ export declare function StarPicker({ value, onChange, }: {
2
+ value: number;
3
+ onChange: (n: number) => void;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=star-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"star-picker.d.ts","sourceRoot":"","sources":["../../../src/store/components/star-picker.tsx"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,QAAQ,GACR,EAAE;IACF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,+BAWA"}
@@ -0,0 +1,116 @@
1
+ export declare const storeEndpoints: {
2
+ "/reviews": import("better-call").StrictEndpoint<"/reviews", {
3
+ method: "POST";
4
+ body: import("zod").ZodObject<{
5
+ productId: import("zod").ZodString;
6
+ authorName: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7
+ authorEmail: import("zod").ZodString;
8
+ rating: import("zod").ZodNumber;
9
+ title: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>>;
10
+ body: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
11
+ images: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
12
+ url: import("zod").ZodString;
13
+ caption: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>>;
14
+ }, import("zod/v4/core").$strip>>>;
15
+ }, import("zod/v4/core").$strip>;
16
+ }, {
17
+ error: string;
18
+ status: number;
19
+ review?: never;
20
+ } | {
21
+ review: import("../..").Review;
22
+ error?: never;
23
+ status?: never;
24
+ }>;
25
+ "/reviews/me": import("better-call").StrictEndpoint<"/reviews/me", {
26
+ method: "GET";
27
+ query: import("zod").ZodObject<{
28
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
29
+ limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>>;
30
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
31
+ pending: "pending";
32
+ approved: "approved";
33
+ rejected: "rejected";
34
+ }>>;
35
+ }, import("zod/v4/core").$strip>;
36
+ }, {
37
+ error: string;
38
+ status: number;
39
+ reviews?: never;
40
+ total?: never;
41
+ page?: never;
42
+ limit?: never;
43
+ pages?: never;
44
+ } | {
45
+ reviews: import("../..").Review[];
46
+ total: number;
47
+ page: number;
48
+ limit: number;
49
+ pages: number;
50
+ error?: never;
51
+ status?: never;
52
+ }>;
53
+ "/reviews/products/:productId": import("better-call").StrictEndpoint<"/reviews/products/:productId", {
54
+ method: "GET";
55
+ params: import("zod").ZodObject<{
56
+ productId: import("zod").ZodString;
57
+ }, import("zod/v4/core").$strip>;
58
+ query: import("zod").ZodObject<{
59
+ take: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
60
+ skip: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
61
+ sortBy: import("zod").ZodOptional<import("zod").ZodEnum<{
62
+ recent: "recent";
63
+ oldest: "oldest";
64
+ highest: "highest";
65
+ lowest: "lowest";
66
+ helpful: "helpful";
67
+ }>>;
68
+ }, import("zod/v4/core").$strip>;
69
+ }, {
70
+ reviews: import("../..").Review[];
71
+ summary: import("../..").RatingSummary;
72
+ total: number;
73
+ }>;
74
+ "/reviews/:id/helpful": import("better-call").StrictEndpoint<"/reviews/:id/helpful", {
75
+ method: "POST";
76
+ params: import("zod").ZodObject<{
77
+ id: import("zod").ZodString;
78
+ }, import("zod/v4/core").$strip>;
79
+ }, {
80
+ error: string;
81
+ status: number;
82
+ helpfulCount?: never;
83
+ alreadyVoted?: never;
84
+ } | {
85
+ helpfulCount: number;
86
+ alreadyVoted: boolean;
87
+ error?: never;
88
+ status?: never;
89
+ }>;
90
+ "/reviews/:id/report": import("better-call").StrictEndpoint<"/reviews/:id/report", {
91
+ method: "POST";
92
+ params: import("zod").ZodObject<{
93
+ id: import("zod").ZodString;
94
+ }, import("zod/v4/core").$strip>;
95
+ body: import("zod").ZodObject<{
96
+ reason: import("zod").ZodEnum<{
97
+ spam: "spam";
98
+ offensive: "offensive";
99
+ fake: "fake";
100
+ irrelevant: "irrelevant";
101
+ harassment: "harassment";
102
+ other: "other";
103
+ }>;
104
+ details: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>>;
105
+ }, import("zod/v4/core").$strip>;
106
+ }, {
107
+ error: string;
108
+ status: number;
109
+ report?: never;
110
+ } | {
111
+ report: import("../..").ReviewReport;
112
+ error?: never;
113
+ status?: never;
114
+ }>;
115
+ };
116
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/endpoints/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM1B,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { z } from "@86d-app/core";
2
+ export declare const listMyReviews: import("better-call").StrictEndpoint<"/reviews/me", {
3
+ method: "GET";
4
+ query: z.ZodObject<{
5
+ page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
6
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
7
+ status: z.ZodOptional<z.ZodEnum<{
8
+ pending: "pending";
9
+ approved: "approved";
10
+ rejected: "rejected";
11
+ }>>;
12
+ }, z.core.$strip>;
13
+ }, {
14
+ error: string;
15
+ status: number;
16
+ reviews?: never;
17
+ total?: never;
18
+ page?: never;
19
+ limit?: never;
20
+ pages?: never;
21
+ } | {
22
+ reviews: import("../..").Review[];
23
+ total: number;
24
+ page: number;
25
+ limit: number;
26
+ pages: number;
27
+ error?: never;
28
+ status?: never;
29
+ }>;
30
+ //# sourceMappingURL=list-my-reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-my-reviews.d.ts","sourceRoot":"","sources":["../../../src/store/endpoints/list-my-reviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from "@86d-app/core";
2
+ export declare const listProductReviews: import("better-call").StrictEndpoint<"/reviews/products/:productId", {
3
+ method: "GET";
4
+ params: z.ZodObject<{
5
+ productId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ query: z.ZodObject<{
8
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
9
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
10
+ sortBy: z.ZodOptional<z.ZodEnum<{
11
+ recent: "recent";
12
+ oldest: "oldest";
13
+ highest: "highest";
14
+ lowest: "lowest";
15
+ helpful: "helpful";
16
+ }>>;
17
+ }, z.core.$strip>;
18
+ }, {
19
+ reviews: import("../..").Review[];
20
+ summary: import("../..").RatingSummary;
21
+ total: number;
22
+ }>;
23
+ //# sourceMappingURL=list-product-reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-product-reviews.d.ts","sourceRoot":"","sources":["../../../src/store/endpoints/list-product-reviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;EA0B9B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from "@86d-app/core";
2
+ export declare const markHelpful: import("better-call").StrictEndpoint<"/reviews/:id/helpful", {
3
+ method: "POST";
4
+ params: z.ZodObject<{
5
+ id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ }, {
8
+ error: string;
9
+ status: number;
10
+ helpfulCount?: never;
11
+ alreadyVoted?: never;
12
+ } | {
13
+ helpfulCount: number;
14
+ alreadyVoted: boolean;
15
+ error?: never;
16
+ status?: never;
17
+ }>;
18
+ //# sourceMappingURL=mark-helpful.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mark-helpful.d.ts","sourceRoot":"","sources":["../../../src/store/endpoints/mark-helpful.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EA+BvB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { z } from "@86d-app/core";
2
+ export declare const reportReview: import("better-call").StrictEndpoint<"/reviews/:id/report", {
3
+ method: "POST";
4
+ params: z.ZodObject<{
5
+ id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ body: z.ZodObject<{
8
+ reason: z.ZodEnum<{
9
+ spam: "spam";
10
+ offensive: "offensive";
11
+ fake: "fake";
12
+ irrelevant: "irrelevant";
13
+ harassment: "harassment";
14
+ other: "other";
15
+ }>;
16
+ details: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
17
+ }, z.core.$strip>;
18
+ }, {
19
+ error: string;
20
+ status: number;
21
+ report?: never;
22
+ } | {
23
+ report: import("../..").ReviewReport;
24
+ error?: never;
25
+ status?: never;
26
+ }>;
27
+ //# sourceMappingURL=report-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-review.d.ts","sourceRoot":"","sources":["../../../src/store/endpoints/report-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,CAAC,EAAE,MAAM,eAAe,CAAC;AAGrE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAkCxB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { z } from "@86d-app/core";
2
+ export declare const submitReview: import("better-call").StrictEndpoint<"/reviews", {
3
+ method: "POST";
4
+ body: z.ZodObject<{
5
+ productId: z.ZodString;
6
+ authorName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7
+ authorEmail: z.ZodString;
8
+ rating: z.ZodNumber;
9
+ title: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
10
+ body: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
11
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
12
+ url: z.ZodString;
13
+ caption: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
14
+ }, z.core.$strip>>>;
15
+ }, z.core.$strip>;
16
+ }, {
17
+ error: string;
18
+ status: number;
19
+ review?: never;
20
+ } | {
21
+ review: import("../..").Review;
22
+ error?: never;
23
+ status?: never;
24
+ }>;
25
+ //# sourceMappingURL=submit-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submit-review.d.ts","sourceRoot":"","sources":["../../../src/store/endpoints/submit-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,CAAC,EAAE,MAAM,eAAe,CAAC;AAQrE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;EAkDxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@86d-app/reviews",
3
- "version": "0.0.4",
3
+ "version": "0.0.13",
4
4
  "description": "Product reviews and ratings module for 86d commerce platform",
5
5
  "keywords": [
6
6
  "commerce",
@@ -16,7 +16,7 @@
16
16
  "url": "https://github.com/86d-app/86d.git",
17
17
  "directory": "modules/reviews"
18
18
  },
19
- "homepage": "https://github.com/86d-app/86d/tree/main/modules/reviews",
19
+ "homepage": "https://86d.app",
20
20
  "type": "module",
21
21
  "exports": {
22
22
  "./components": "./src/store/components",
@@ -43,4 +43,4 @@
43
43
  "typescript": "catalog:",
44
44
  "vitest": "catalog:vite"
45
45
  }
46
- }
46
+ }