@pack/hydrogen 2.0.0-beta.2 → 2.0.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.
@@ -44,6 +44,11 @@ declare class PackTestSession {
44
44
  setExpireAt(expireAt: string | undefined): void;
45
45
  clearTestData(): void;
46
46
  hasTestData(): boolean;
47
+ getTestRulesCache(): any[] | undefined;
48
+ getTestRulesCacheTimestamp(): number | undefined;
49
+ setTestRulesCache(rules: any[], timestamp: number): void;
50
+ clearTestRulesCache(): void;
51
+ isTestRulesCacheValid(cacheDurationMs?: number): boolean;
47
52
  hasChanges(): boolean;
48
53
  commit(): Promise<string>;
49
54
  destroy(): Promise<string>;
@@ -72,13 +77,18 @@ interface CreatePackClientOptions extends EnvironmentOptions {
72
77
  contentEnvironment?: string;
73
78
  /** Default theme data to use when no token is provided */
74
79
  defaultThemeData?: DefaultThemeData;
80
+ /**
81
+ * Initial request to extract query parameters from.
82
+ * If not provided, it will be captured from the first handleRequest call.
83
+ * @deprecated Pass request to handleRequest instead of createPackClient
84
+ */
85
+ request?: Request;
75
86
  }
76
87
  type Variables = Record<string, any>;
77
88
  interface QueryOptions {
78
89
  variables?: Variables;
79
90
  cache?: CachingStrategy;
80
91
  test?: TestInput;
81
- request: Request;
82
92
  }
83
93
  interface QueryError {
84
94
  message: string;