@86d-app/search 0.0.6 → 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.
@@ -17,8 +17,8 @@ export declare const storeEndpoints: {
17
17
  method: "GET";
18
18
  query: import("zod").ZodObject<{
19
19
  q: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
20
- type: import("zod").ZodOptional<import("zod").ZodString>;
21
- tags: import("zod").ZodOptional<import("zod").ZodString>;
20
+ type: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>>;
21
+ tags: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>>;
22
22
  sort: import("zod").ZodOptional<import("zod").ZodEnum<{
23
23
  relevance: "relevance";
24
24
  newest: "newest";
@@ -3,8 +3,8 @@ export declare const searchEndpoint: import("better-call").StrictEndpoint<"/sear
3
3
  method: "GET";
4
4
  query: z.ZodObject<{
5
5
  q: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6
- type: z.ZodOptional<z.ZodString>;
7
- tags: z.ZodOptional<z.ZodString>;
6
+ type: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
7
+ tags: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
8
8
  sort: z.ZodOptional<z.ZodEnum<{
9
9
  relevance: "relevance";
10
10
  newest: "newest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@86d-app/search",
3
- "version": "0.0.6",
3
+ "version": "0.0.13",
4
4
  "description": "Unified search, autocomplete, and search analytics module for 86d commerce platform",
5
5
  "keywords": [
6
6
  "commerce",
@@ -6,7 +6,7 @@ export const recentEndpoint = createStoreEndpoint(
6
6
  {
7
7
  method: "GET",
8
8
  query: z.object({
9
- sessionId: z.string().min(1),
9
+ sessionId: z.string().min(1).max(128),
10
10
  limit: z.coerce.number().int().min(1).max(20).optional(),
11
11
  }),
12
12
  },
@@ -15,8 +15,8 @@ export const searchEndpoint = createStoreEndpoint(
15
15
  method: "GET",
16
16
  query: z.object({
17
17
  q: z.string().min(1).max(500).transform(sanitizeText),
18
- type: z.string().max(100).optional(),
19
- tags: z.string().max(2000).optional(),
18
+ type: z.string().max(100).transform(sanitizeText).optional(),
19
+ tags: z.string().max(2000).transform(sanitizeText).optional(),
20
20
  sort: z.enum(sortFields).optional(),
21
21
  fuzzy: z.coerce.boolean().optional(),
22
22
  limit: z.coerce.number().int().min(1).max(100).optional(),
@@ -7,7 +7,7 @@ export const storeSearch = createStoreEndpoint(
7
7
  method: "GET",
8
8
  query: z.object({
9
9
  q: z.string().min(0).max(500),
10
- limit: z.string().optional(),
10
+ limit: z.string().max(10).optional(),
11
11
  }),
12
12
  },
13
13
  async (ctx) => {