@reactionary/core 0.3.4 → 0.3.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/core",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { IdentityIdentifierSchema, WebStoreIdentifierSchema } from "./models/identifiers.model.js";
2
+ import { WebStoreIdentifierSchema } from "./models/identifiers.model.js";
3
3
  import { CurrencySchema } from "./models/currency.model.js";
4
4
  import { IdentitySchema } from "./models/identity.model.js";
5
5
  const LanguageContextSchema = z.looseObject({
@@ -9,11 +9,11 @@ const LanguageContextSchema = z.looseObject({
9
9
  const IdentityContextSchema = z.looseObject({
10
10
  identity: IdentitySchema,
11
11
  personalizationKey: z.string(),
12
- lastUpdated: z.date()
12
+ lastUpdated: z.coerce.date()
13
13
  });
14
- const SessionSchema = z.record(z.string(), z.any()).and(z.object({
14
+ const SessionSchema = z.looseObject({
15
15
  identityContext: IdentityContextSchema
16
- }));
16
+ });
17
17
  const TaxJurisdictionSchema = z.object({
18
18
  countryCode: z.string().default("US"),
19
19
  stateCode: z.string().default(""),
@@ -203,9 +203,9 @@ export declare const IdentityContextSchema: z.ZodObject<{
203
203
  type: z.ZodLiteral<"Registered">;
204
204
  }, z.core.$loose>], "type">;
205
205
  personalizationKey: z.ZodString;
206
- lastUpdated: z.ZodDate;
206
+ lastUpdated: z.ZodCoercedDate<unknown>;
207
207
  }, z.core.$loose>;
208
- export declare const SessionSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodObject<{
208
+ export declare const SessionSchema: z.ZodObject<{
209
209
  identityContext: z.ZodObject<{
210
210
  identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
211
211
  type: z.ZodLiteral<"Anonymous">;
@@ -221,9 +221,9 @@ export declare const SessionSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z
221
221
  type: z.ZodLiteral<"Registered">;
222
222
  }, z.core.$loose>], "type">;
223
223
  personalizationKey: z.ZodString;
224
- lastUpdated: z.ZodDate;
224
+ lastUpdated: z.ZodCoercedDate<unknown>;
225
225
  }, z.core.$loose>;
226
- }, z.core.$strip>>;
226
+ }, z.core.$loose>;
227
227
  export declare const TaxJurisdictionSchema: z.ZodObject<{
228
228
  countryCode: z.ZodDefault<z.ZodString>;
229
229
  stateCode: z.ZodDefault<z.ZodString>;
@@ -231,7 +231,7 @@ export declare const TaxJurisdictionSchema: z.ZodObject<{
231
231
  cityCode: z.ZodDefault<z.ZodString>;
232
232
  }, z.core.$strip>;
233
233
  export declare const RequestContextSchema: z.ZodObject<{
234
- session: z.ZodDefault<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodObject<{
234
+ session: z.ZodDefault<z.ZodObject<{
235
235
  identityContext: z.ZodObject<{
236
236
  identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
237
237
  type: z.ZodLiteral<"Anonymous">;
@@ -247,9 +247,9 @@ export declare const RequestContextSchema: z.ZodObject<{
247
247
  type: z.ZodLiteral<"Registered">;
248
248
  }, z.core.$loose>], "type">;
249
249
  personalizationKey: z.ZodString;
250
- lastUpdated: z.ZodDate;
250
+ lastUpdated: z.ZodCoercedDate<unknown>;
251
251
  }, z.core.$loose>;
252
- }, z.core.$strip>>>;
252
+ }, z.core.$loose>>;
253
253
  languageContext: z.ZodDefault<z.ZodObject<{
254
254
  locale: z.ZodDefault<z.ZodString>;
255
255
  currencyCode: z.ZodDefault<z.ZodEnum<{