@reactionary/core 0.0.30 → 0.0.32

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.
@@ -1,12 +1,9 @@
1
1
  import { z } from 'zod';
2
- export declare const CartQueryByIdSchema: z.MergeInterfaces<z.ZodInterface<{
3
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
4
- }, {
2
+ export declare const CartQueryByIdSchema: z.MergeInterfaces<z.ZodInterface<{}, {
5
3
  optional: never;
6
4
  defaulted: never;
7
5
  extra: Record<string, unknown>;
8
6
  }>, z.ZodInterface<{
9
- query: z.ZodLiteral<"id">;
10
7
  cart: z.ZodInterface<{
11
8
  key: z.ZodNonOptional<z.ZodDefault<z.ZodString>>;
12
9
  }, {
@@ -19,14 +16,11 @@ export declare const CartQueryByIdSchema: z.MergeInterfaces<z.ZodInterface<{
19
16
  defaulted: never;
20
17
  extra: {};
21
18
  }>>;
22
- export declare const CartQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.ZodInterface<{
23
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
24
- }, {
19
+ export declare const CartQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.ZodInterface<{}, {
25
20
  optional: never;
26
21
  defaulted: never;
27
22
  extra: Record<string, unknown>;
28
23
  }>, z.ZodInterface<{
29
- query: z.ZodLiteral<"id">;
30
24
  cart: z.ZodInterface<{
31
25
  key: z.ZodNonOptional<z.ZodDefault<z.ZodString>>;
32
26
  }, {
@@ -40,4 +34,3 @@ export declare const CartQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.Z
40
34
  extra: {};
41
35
  }>>]>;
42
36
  export type CartQueryById = z.infer<typeof CartQueryByIdSchema>;
43
- export type CartQuery = z.infer<typeof CartQuerySchema>;
@@ -1,29 +1,11 @@
1
1
  import { z } from 'zod';
2
- export declare const IdentityQuerySelfSchema: z.MergeInterfaces<z.ZodInterface<{
3
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
4
- }, {
2
+ export declare const IdentityQuerySelfSchema: z.MergeInterfaces<z.ZodInterface<{}, {
5
3
  optional: never;
6
4
  defaulted: never;
7
5
  extra: Record<string, unknown>;
8
- }>, z.ZodInterface<{
9
- query: z.ZodLiteral<"self">;
10
- }, {
6
+ }>, z.ZodInterface<{}, {
11
7
  optional: never;
12
8
  defaulted: never;
13
9
  extra: {};
14
10
  }>>;
15
- export declare const IdentityQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.ZodInterface<{
16
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
17
- }, {
18
- optional: never;
19
- defaulted: never;
20
- extra: Record<string, unknown>;
21
- }>, z.ZodInterface<{
22
- query: z.ZodLiteral<"self">;
23
- }, {
24
- optional: never;
25
- defaulted: never;
26
- extra: {};
27
- }>>]>;
28
- export type IdentityQuery = z.infer<typeof IdentityQuerySchema>;
29
11
  export type IdentityQuerySelf = z.infer<typeof IdentityQuerySelfSchema>;
@@ -1,12 +1,9 @@
1
1
  import { z } from 'zod';
2
- export declare const InventoryQuerySchema: z.MergeInterfaces<z.ZodInterface<{
3
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
4
- }, {
2
+ export declare const InventoryQuerySchema: z.MergeInterfaces<z.ZodInterface<{}, {
5
3
  optional: never;
6
4
  defaulted: never;
7
5
  extra: Record<string, unknown>;
8
6
  }>, z.ZodInterface<{
9
- query: z.ZodLiteral<"sku">;
10
7
  sku: z.ZodString;
11
8
  }, {
12
9
  optional: never;
@@ -1,12 +1,9 @@
1
1
  import { z } from 'zod';
2
- export declare const PriceQueryBySkuSchema: z.MergeInterfaces<z.ZodInterface<{
3
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
4
- }, {
2
+ export declare const PriceQueryBySkuSchema: z.MergeInterfaces<z.ZodInterface<{}, {
5
3
  optional: never;
6
4
  defaulted: never;
7
5
  extra: Record<string, unknown>;
8
6
  }>, z.ZodInterface<{
9
- query: z.ZodLiteral<"sku">;
10
7
  sku: z.ZodInterface<{
11
8
  key: z.ZodNonOptional<z.ZodNonOptional<z.ZodDefault<z.ZodString>>>;
12
9
  }, {
@@ -19,25 +16,4 @@ export declare const PriceQueryBySkuSchema: z.MergeInterfaces<z.ZodInterface<{
19
16
  defaulted: never;
20
17
  extra: {};
21
18
  }>>;
22
- export declare const PriceQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.ZodInterface<{
23
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
24
- }, {
25
- optional: never;
26
- defaulted: never;
27
- extra: Record<string, unknown>;
28
- }>, z.ZodInterface<{
29
- query: z.ZodLiteral<"sku">;
30
- sku: z.ZodInterface<{
31
- key: z.ZodNonOptional<z.ZodNonOptional<z.ZodDefault<z.ZodString>>>;
32
- }, {
33
- optional: never;
34
- defaulted: never;
35
- extra: Record<string, unknown>;
36
- }>;
37
- }, {
38
- optional: never;
39
- defaulted: never;
40
- extra: {};
41
- }>>]>;
42
19
  export type PriceQueryBySku = z.infer<typeof PriceQueryBySkuSchema>;
43
- export type PriceQuery = z.infer<typeof PriceQuerySchema>;
@@ -1,59 +1,25 @@
1
1
  import { z } from 'zod';
2
- export declare const ProductQueryBySlugSchema: z.MergeInterfaces<z.ZodInterface<{
3
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
4
- }, {
2
+ export declare const ProductQueryBySlugSchema: z.MergeInterfaces<z.ZodInterface<{}, {
5
3
  optional: never;
6
4
  defaulted: never;
7
5
  extra: Record<string, unknown>;
8
6
  }>, z.ZodInterface<{
9
- query: z.ZodLiteral<"slug">;
10
7
  slug: z.ZodString;
11
8
  }, {
12
9
  optional: never;
13
10
  defaulted: never;
14
11
  extra: {};
15
12
  }>>;
16
- export declare const ProductQueryByIdSchema: z.MergeInterfaces<z.ZodInterface<{
17
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
18
- }, {
13
+ export declare const ProductQueryByIdSchema: z.MergeInterfaces<z.ZodInterface<{}, {
19
14
  optional: never;
20
15
  defaulted: never;
21
16
  extra: Record<string, unknown>;
22
17
  }>, z.ZodInterface<{
23
- query: z.ZodLiteral<"id">;
24
18
  id: z.ZodString;
25
19
  }, {
26
20
  optional: never;
27
21
  defaulted: never;
28
22
  extra: {};
29
23
  }>>;
30
- export declare const ProductQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.ZodInterface<{
31
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
32
- }, {
33
- optional: never;
34
- defaulted: never;
35
- extra: Record<string, unknown>;
36
- }>, z.ZodInterface<{
37
- query: z.ZodLiteral<"slug">;
38
- slug: z.ZodString;
39
- }, {
40
- optional: never;
41
- defaulted: never;
42
- extra: {};
43
- }>>, z.MergeInterfaces<z.ZodInterface<{
44
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
45
- }, {
46
- optional: never;
47
- defaulted: never;
48
- extra: Record<string, unknown>;
49
- }>, z.ZodInterface<{
50
- query: z.ZodLiteral<"id">;
51
- id: z.ZodString;
52
- }, {
53
- optional: never;
54
- defaulted: never;
55
- extra: {};
56
- }>>]>;
57
24
  export type ProductQueryBySlug = z.infer<typeof ProductQueryBySlugSchema>;
58
25
  export type ProductQueryById = z.infer<typeof ProductQueryByIdSchema>;
59
- export type ProductQuery = z.infer<typeof ProductQuerySchema>;
@@ -1,12 +1,9 @@
1
1
  import { z } from 'zod';
2
- export declare const SearchQueryByTermSchema: z.MergeInterfaces<z.ZodInterface<{
3
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
4
- }, {
2
+ export declare const SearchQueryByTermSchema: z.MergeInterfaces<z.ZodInterface<{}, {
5
3
  optional: never;
6
4
  defaulted: never;
7
5
  extra: Record<string, unknown>;
8
6
  }>, z.ZodInterface<{
9
- query: z.ZodLiteral<"term">;
10
7
  search: z.ZodInterface<{
11
8
  term: z.ZodNonOptional<z.ZodDefault<z.ZodString>>;
12
9
  page: z.ZodNonOptional<z.ZodDefault<z.ZodNumber>>;
@@ -35,41 +32,4 @@ export declare const SearchQueryByTermSchema: z.MergeInterfaces<z.ZodInterface<{
35
32
  defaulted: never;
36
33
  extra: {};
37
34
  }>>;
38
- export declare const SearchQuerySchema: z.ZodUnion<readonly [z.MergeInterfaces<z.ZodInterface<{
39
- query: z.core.$constructor<z.ZodLiteral<z.core.util.Primitive>, z.core.$ZodLiteralDef>;
40
- }, {
41
- optional: never;
42
- defaulted: never;
43
- extra: Record<string, unknown>;
44
- }>, z.ZodInterface<{
45
- query: z.ZodLiteral<"term">;
46
- search: z.ZodInterface<{
47
- term: z.ZodNonOptional<z.ZodDefault<z.ZodString>>;
48
- page: z.ZodNonOptional<z.ZodDefault<z.ZodNumber>>;
49
- pageSize: z.ZodNonOptional<z.ZodDefault<z.ZodNumber>>;
50
- facets: z.ZodNonOptional<z.ZodDefault<z.ZodArray<z.ZodInterface<{
51
- key: z.ZodNonOptional<z.ZodDefault<z.ZodString>>;
52
- facet: z.ZodNonOptional<z.ZodDefault<z.ZodInterface<{
53
- key: z.ZodNonOptional<z.ZodDefault<z.ZodString>>;
54
- }, {
55
- optional: never;
56
- defaulted: never;
57
- extra: Record<string, unknown>;
58
- }>>>;
59
- }, {
60
- optional: never;
61
- defaulted: never;
62
- extra: Record<string, unknown>;
63
- }>>>>;
64
- }, {
65
- optional: never;
66
- defaulted: never;
67
- extra: Record<string, unknown>;
68
- }>;
69
- }, {
70
- optional: never;
71
- defaulted: never;
72
- extra: {};
73
- }>>]>;
74
- export type SearchQuery = z.infer<typeof SearchQuerySchema>;
75
35
  export type SearchQueryByTerm = z.infer<typeof SearchQueryByTermSchema>;
@@ -1,13 +0,0 @@
1
- import { BaseQuery } from "../schemas/queries/base.query";
2
- import { Session } from "../schemas/session.schema";
3
- export interface CachingStrategyEvaluation {
4
- key: string;
5
- cacheDurationInSeconds: number;
6
- canCache: boolean;
7
- }
8
- export interface CachingStrategy {
9
- get(query: BaseQuery, session: Session): CachingStrategyEvaluation;
10
- }
11
- export declare class BaseCachingStrategy implements CachingStrategy {
12
- get(query: BaseQuery, session: Session): CachingStrategyEvaluation;
13
- }