@gscdump/contracts 4.2.2 → 4.3.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.
@@ -10,17 +10,19 @@ export interface NormalizedFilterV1 {
10
10
  }>;
11
11
  _nestedGroups?: NormalizedFilterV1[];
12
12
  _groupType?: 'and' | 'or';
13
+ /** Type-level marker the `gscdump/query` operators emit; `{}` at runtime and ignored. */
14
+ _constraints?: object;
13
15
  }
14
16
  export declare const GSCDUMP_V1_ANALYTICS_DIMENSIONS: readonly ["page", "query", "queryCanonical", "country", "device", "date", "searchAppearance", "hour"];
15
17
  export declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schemas): {
16
18
  analyticsRowsRequest: z.ZodObject<{
17
19
  dimensions: z.ZodArray<z.ZodEnum<{
18
- date: "date";
19
20
  page: "page";
20
21
  query: "query";
21
22
  queryCanonical: "queryCanonical";
22
23
  country: "country";
23
24
  device: "device";
25
+ date: "date";
24
26
  searchAppearance: "searchAppearance";
25
27
  hour: "hour";
26
28
  }>>;
@@ -30,8 +32,8 @@ export declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: Realtime
30
32
  ctr: "ctr";
31
33
  position: "position";
32
34
  }>>>;
33
- filter: z.ZodOptional<z.ZodType<NormalizedFilterV1, unknown, z.core.$ZodTypeInternals<NormalizedFilterV1, unknown>>>;
34
- prefilter: z.ZodOptional<z.ZodType<NormalizedFilterV1, unknown, z.core.$ZodTypeInternals<NormalizedFilterV1, unknown>>>;
35
+ filter: z.ZodOptional<z.ZodType<NormalizedFilterV1, NormalizedFilterV1, z.core.$ZodTypeInternals<NormalizedFilterV1, NormalizedFilterV1>>>;
36
+ prefilter: z.ZodOptional<z.ZodType<NormalizedFilterV1, NormalizedFilterV1, z.core.$ZodTypeInternals<NormalizedFilterV1, NormalizedFilterV1>>>;
35
37
  orderBy: z.ZodOptional<z.ZodObject<{
36
38
  column: z.ZodEnum<{
37
39
  date: "date";
@@ -163,14 +163,17 @@ function createGscdumpV1BrowserSchemas(realtimeSchemas = createRealtimeV1Schemas
163
163
  expression: z.string(),
164
164
  expression2: z.string()
165
165
  })]);
166
+ const filterConstraints = z.strictObject({}).optional();
166
167
  const normalizedFilter = z.lazy(() => z.union([z.strictObject({
167
168
  _filters: z.array(normalizedFilterLeaf).min(1),
168
169
  _nestedGroups: z.array(normalizedFilter).optional(),
169
- _groupType: z.enum(["and", "or"]).optional()
170
+ _groupType: z.enum(["and", "or"]).optional(),
171
+ _constraints: filterConstraints
170
172
  }), z.strictObject({
171
173
  _filters: z.array(normalizedFilterLeaf).max(0),
172
174
  _nestedGroups: z.array(normalizedFilter).min(1),
173
- _groupType: z.enum(["and", "or"]).optional()
175
+ _groupType: z.enum(["and", "or"]).optional(),
176
+ _constraints: filterConstraints
174
177
  })]));
175
178
  const analyticsRowsRequest = z.strictObject({
176
179
  dimensions: z.array(z.enum(dimensions)).min(1),