@loczer/storefront-sdk 0.155.0 → 0.156.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2494,6 +2494,14 @@ export declare type ResponsePayload = z.infer<typeof responseSchema>;
2494
2494
  export declare const responseSchema: z.ZodObject<{
2495
2495
  success: z.ZodBoolean;
2496
2496
  error: z.ZodOptional<z.ZodString>;
2497
+ emailPayload: z.ZodOptional<z.ZodObject<{
2498
+ from: z.ZodString;
2499
+ replyTo: z.ZodOptional<z.ZodString>;
2500
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
2501
+ subject: z.ZodString;
2502
+ html: z.ZodOptional<z.ZodString>;
2503
+ text: z.ZodOptional<z.ZodString>;
2504
+ }, z.core.$strip>>;
2497
2505
  }, z.core.$strip>;
2498
2506
 
2499
2507
  export declare type RichText = z.infer<typeof richTextSchema>;
@@ -11,6 +11,14 @@ export type RequestPayload = z.infer<typeof requestSchema>;
11
11
  export declare const responseSchema: z.ZodObject<{
12
12
  success: z.ZodBoolean;
13
13
  error: z.ZodOptional<z.ZodString>;
14
+ emailPayload: z.ZodOptional<z.ZodObject<{
15
+ from: z.ZodString;
16
+ replyTo: z.ZodOptional<z.ZodString>;
17
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
18
+ subject: z.ZodString;
19
+ html: z.ZodOptional<z.ZodString>;
20
+ text: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>>;
14
22
  }, z.core.$strip>;
15
23
  export type ResponsePayload = z.infer<typeof responseSchema>;
16
24
  //# sourceMappingURL=contactForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contactForm.d.ts","sourceRoot":"","sources":["../../src/lib/contactForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,wCAAwC,CAAA;AAE1D,eAAO,MAAM,aAAa;;;;;;iBAMxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"contactForm.d.ts","sourceRoot":"","sources":["../../src/lib/contactForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,wCAAwC,CAAA;AAE1D,eAAO,MAAM,aAAa;;;;;;iBAMxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAW1D,eAAO,MAAM,cAAc;;;;;;;;;;;iBAIzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -1,16 +1,24 @@
1
- import { z as r } from "zod";
2
- const e = "/api/public/storefront/contact-form", o = r.object({
3
- storeSlug: r.string().trim().min(1).toLowerCase(),
4
- name: r.string().trim().min(1),
5
- emailAddress: r.string().trim().email(),
6
- phoneNumber: r.string().trim().min(6),
7
- message: r.string().trim().min(1).max(8192)
8
- }), s = r.object({
9
- success: r.boolean(),
10
- error: r.string().optional()
1
+ import { z as t } from "zod";
2
+ const i = "/api/public/storefront/contact-form", n = t.object({
3
+ storeSlug: t.string().trim().min(1).toLowerCase(),
4
+ name: t.string().trim().min(1),
5
+ emailAddress: t.string().trim().email(),
6
+ phoneNumber: t.string().trim().min(6),
7
+ message: t.string().trim().min(1).max(8192)
8
+ }), o = t.object({
9
+ from: t.string(),
10
+ replyTo: t.string().optional(),
11
+ to: t.union([t.string(), t.array(t.string())]),
12
+ subject: t.string(),
13
+ html: t.string().optional(),
14
+ text: t.string().optional()
15
+ }), e = t.object({
16
+ success: t.boolean(),
17
+ error: t.string().optional(),
18
+ emailPayload: o.optional()
11
19
  });
12
20
  export {
13
- e as ROUTE,
14
- o as requestSchema,
15
- s as responseSchema
21
+ i as ROUTE,
22
+ n as requestSchema,
23
+ e as responseSchema
16
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loczer/storefront-sdk",
3
- "version": "0.155.0",
3
+ "version": "0.156.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"