@reopt-ai/data-contract 0.6.3 → 0.7.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/client.cjs +228 -321
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +57 -71
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.ts +57 -71
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +228 -322
- package/dist/client.js.map +1 -1
- package/dist/control.cjs +158 -54
- package/dist/control.cjs.map +1 -1
- package/dist/control.d.cts +121 -137
- package/dist/control.d.cts.map +1 -0
- package/dist/control.d.ts +121 -137
- package/dist/control.d.ts.map +1 -0
- package/dist/control.js +134 -54
- package/dist/control.js.map +1 -1
- package/dist/events-BUIeU60t.d.cts +142 -0
- package/dist/events-BUIeU60t.d.cts.map +1 -0
- package/dist/events-BUIeU60t.d.ts +142 -0
- package/dist/events-BUIeU60t.d.ts.map +1 -0
- package/dist/events.cjs +110 -15
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +2 -59
- package/dist/events.d.ts +2 -59
- package/dist/events.js +101 -15
- package/dist/events.js.map +1 -1
- package/dist/identity.cjs +150 -55
- package/dist/identity.cjs.map +1 -1
- package/dist/identity.d.cts +21 -20
- package/dist/identity.d.cts.map +1 -0
- package/dist/identity.d.ts +21 -20
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +126 -56
- package/dist/identity.js.map +1 -1
- package/dist/index.cjs +46 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -54
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +37 -54
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -25
- package/dist/index.js.map +1 -1
- package/dist/ingest.cjs +152 -57
- package/dist/ingest.cjs.map +1 -1
- package/dist/ingest.d.cts +182 -193
- package/dist/ingest.d.cts.map +1 -0
- package/dist/ingest.d.ts +182 -193
- package/dist/ingest.d.ts.map +1 -0
- package/dist/ingest.js +126 -57
- package/dist/ingest.js.map +1 -1
- package/dist/query.cjs +284 -84
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +456 -469
- package/dist/query.d.cts.map +1 -0
- package/dist/query.d.ts +456 -469
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +245 -84
- package/dist/query.js.map +1 -1
- package/dist/report.cjs +104 -74
- package/dist/report.cjs.map +1 -1
- package/dist/report.d.cts +182 -136
- package/dist/report.d.cts.map +1 -0
- package/dist/report.d.ts +182 -136
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +93 -74
- package/dist/report.js.map +1 -1
- package/dist/version-B_0qb1_K.cjs +53 -0
- package/dist/version-B_0qb1_K.cjs.map +1 -0
- package/dist/version-C09Cyf4R.js +12 -0
- package/dist/version-C09Cyf4R.js.map +1 -0
- package/dist/{version-DJ2Grb_N.d.ts → version-CGujUGWd.d.cts} +5 -3
- package/dist/version-CGujUGWd.d.cts.map +1 -0
- package/dist/{version-DJ2Grb_N.d.cts → version-CGujUGWd.d.ts} +5 -3
- package/dist/version-CGujUGWd.d.ts.map +1 -0
- package/package.json +69 -28
- package/dist/chunk-3EEANNYN.cjs +0 -62
- package/dist/chunk-3EEANNYN.cjs.map +0 -1
- package/dist/chunk-7W33YGRO.js +0 -160
- package/dist/chunk-7W33YGRO.js.map +0 -1
- package/dist/chunk-F2RNXJGO.cjs +0 -19
- package/dist/chunk-F2RNXJGO.cjs.map +0 -1
- package/dist/chunk-FP2X3PRK.js +0 -62
- package/dist/chunk-FP2X3PRK.js.map +0 -1
- package/dist/chunk-JCEWUSUM.js +0 -53
- package/dist/chunk-JCEWUSUM.js.map +0 -1
- package/dist/chunk-L3JPDRVG.cjs +0 -160
- package/dist/chunk-L3JPDRVG.cjs.map +0 -1
- package/dist/chunk-L4KBQAOO.js +0 -204
- package/dist/chunk-L4KBQAOO.js.map +0 -1
- package/dist/chunk-NJ4JKNBX.js +0 -361
- package/dist/chunk-NJ4JKNBX.js.map +0 -1
- package/dist/chunk-ORNTN6AK.cjs +0 -53
- package/dist/chunk-ORNTN6AK.cjs.map +0 -1
- package/dist/chunk-PSUINLW7.js +0 -19
- package/dist/chunk-PSUINLW7.js.map +0 -1
- package/dist/chunk-RU26QFM2.js +0 -179
- package/dist/chunk-RU26QFM2.js.map +0 -1
- package/dist/chunk-XDH5QQYF.cjs +0 -361
- package/dist/chunk-XDH5QQYF.cjs.map +0 -1
- package/dist/chunk-YCTGHWTP.cjs +0 -204
- package/dist/chunk-YCTGHWTP.cjs.map +0 -1
- package/dist/chunk-ZI6A3WQP.cjs +0 -179
- package/dist/chunk-ZI6A3WQP.cjs.map +0 -1
package/dist/query.d.cts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* `POST /api/v1/query/*` — the read contract.
|
|
7
|
-
*
|
|
8
|
-
* Server credentials, project-scoped: the authenticated client's projectId must
|
|
9
|
-
* equal the `projectId` in the body, or the request is refused. Reads are POSTs
|
|
10
|
-
* because the inputs nest (funnel steps, channel filters) and would not survive
|
|
11
|
-
* a query string; consumers cache on their own side, so HTTP cache semantics
|
|
12
|
-
* buy nothing here.
|
|
13
|
-
*
|
|
14
|
-
* Response shapes mirror the existing dashboard computations exactly — this
|
|
15
|
-
* plane re-exposes them, it does not add new math.
|
|
16
|
-
*/
|
|
17
|
-
|
|
1
|
+
import { zDate, zInstant } from "./index.cjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/query.d.ts
|
|
18
4
|
/** Bucket width for a time series. */
|
|
19
5
|
declare const zGranularity: z.ZodEnum<{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
hour: "hour";
|
|
7
|
+
day: "day";
|
|
8
|
+
week: "week";
|
|
9
|
+
month: "month";
|
|
24
10
|
}>;
|
|
25
11
|
type Granularity = z.infer<typeof zGranularity>;
|
|
26
12
|
/**
|
|
@@ -42,11 +28,11 @@ declare function isValidTimeZone(value: string): boolean;
|
|
|
42
28
|
* `channelFilterSchema` field-for-field.
|
|
43
29
|
*/
|
|
44
30
|
declare const zChannelFilter: z.ZodOptional<z.ZodObject<{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
31
|
+
referrerTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
channelTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
utmSources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
utmMediums: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
utmCampaigns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
36
|
}, z.core.$strip>>;
|
|
51
37
|
type ChannelFilter = z.infer<typeof zChannelFilter>;
|
|
52
38
|
/**
|
|
@@ -56,53 +42,53 @@ type ChannelFilter = z.infer<typeof zChannelFilter>;
|
|
|
56
42
|
* response is an "aggregating" badge, not a refresh.
|
|
57
43
|
*/
|
|
58
44
|
declare const zQuerySource: z.ZodEnum<{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
rollup: "rollup";
|
|
46
|
+
raw: "raw";
|
|
47
|
+
mixed: "mixed";
|
|
62
48
|
}>;
|
|
63
49
|
type QuerySource = z.infer<typeof zQuerySource>;
|
|
64
50
|
declare const zQueryMeta: z.ZodObject<{
|
|
51
|
+
projectId: z.ZodString;
|
|
52
|
+
computedAt: z.ZodString;
|
|
53
|
+
cacheAgeSeconds: z.ZodNumber;
|
|
54
|
+
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
ingestLagStatus: z.ZodEnum<{
|
|
56
|
+
unknown: "unknown";
|
|
57
|
+
known: "known";
|
|
58
|
+
}>;
|
|
59
|
+
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
60
|
+
cached: z.ZodBoolean;
|
|
61
|
+
timezone: z.ZodString;
|
|
62
|
+
source: z.ZodEnum<{
|
|
63
|
+
rollup: "rollup";
|
|
64
|
+
raw: "raw";
|
|
65
|
+
mixed: "mixed";
|
|
66
|
+
}>;
|
|
67
|
+
requestId: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
type QueryMeta = z.infer<typeof zQueryMeta>;
|
|
70
|
+
/** Every query response is `{ data, meta }`. */
|
|
71
|
+
declare function zQueryEnvelope<T extends z.ZodTypeAny>(data: T): z.ZodObject<{
|
|
72
|
+
data: T;
|
|
73
|
+
meta: z.ZodObject<{
|
|
65
74
|
projectId: z.ZodString;
|
|
66
75
|
computedAt: z.ZodString;
|
|
67
76
|
cacheAgeSeconds: z.ZodNumber;
|
|
68
77
|
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
69
78
|
ingestLagStatus: z.ZodEnum<{
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
unknown: "unknown";
|
|
80
|
+
known: "known";
|
|
72
81
|
}>;
|
|
73
82
|
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
74
83
|
cached: z.ZodBoolean;
|
|
75
84
|
timezone: z.ZodString;
|
|
76
85
|
source: z.ZodEnum<{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
rollup: "rollup";
|
|
87
|
+
raw: "raw";
|
|
88
|
+
mixed: "mixed";
|
|
80
89
|
}>;
|
|
81
90
|
requestId: z.ZodString;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
|
-
type QueryMeta = z.infer<typeof zQueryMeta>;
|
|
84
|
-
/** Every query response is `{ data, meta }`. */
|
|
85
|
-
declare function zQueryEnvelope<T extends z.ZodTypeAny>(data: T): z.ZodObject<{
|
|
86
|
-
data: T;
|
|
87
|
-
meta: z.ZodObject<{
|
|
88
|
-
projectId: z.ZodString;
|
|
89
|
-
computedAt: z.ZodString;
|
|
90
|
-
cacheAgeSeconds: z.ZodNumber;
|
|
91
|
-
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
92
|
-
ingestLagStatus: z.ZodEnum<{
|
|
93
|
-
unknown: "unknown";
|
|
94
|
-
known: "known";
|
|
95
|
-
}>;
|
|
96
|
-
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
97
|
-
cached: z.ZodBoolean;
|
|
98
|
-
timezone: z.ZodString;
|
|
99
|
-
source: z.ZodEnum<{
|
|
100
|
-
raw: "raw";
|
|
101
|
-
rollup: "rollup";
|
|
102
|
-
mixed: "mixed";
|
|
103
|
-
}>;
|
|
104
|
-
requestId: z.ZodString;
|
|
105
|
-
}, z.core.$strip>;
|
|
91
|
+
}, z.core.$strip>;
|
|
106
92
|
}, z.core.$strip>;
|
|
107
93
|
/**
|
|
108
94
|
* v1 breaks down by `properties` JSON keys only. Built-in columns
|
|
@@ -110,42 +96,42 @@ declare function zQueryEnvelope<T extends z.ZodTypeAny>(data: T): z.ZodObject<{
|
|
|
110
96
|
* no *time series* variant, and this plane does not add new computations.
|
|
111
97
|
*/
|
|
112
98
|
declare const zTimeseriesBreakdown: z.ZodObject<{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
99
|
+
kind: z.ZodLiteral<"property">;
|
|
100
|
+
key: z.ZodString;
|
|
101
|
+
topN: z.ZodDefault<z.ZodNumber>;
|
|
116
102
|
}, z.core.$strip>;
|
|
117
103
|
type TimeseriesBreakdown = z.infer<typeof zTimeseriesBreakdown>;
|
|
118
104
|
/** Exact-match filter for a top-level event `properties` key. Multiple filters are ANDed. */
|
|
119
105
|
declare const zEventPropertyFilter: z.ZodObject<{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
106
|
+
key: z.ZodString;
|
|
107
|
+
operator: z.ZodDefault<z.ZodLiteral<"eq">>;
|
|
108
|
+
value: z.ZodString;
|
|
123
109
|
}, z.core.$strip>;
|
|
124
110
|
type EventPropertyFilter = z.infer<typeof zEventPropertyFilter>;
|
|
125
111
|
declare const zEventsTimeseriesInput: z.ZodObject<{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
112
|
+
projectId: z.ZodString;
|
|
113
|
+
startDate: z.ZodString;
|
|
114
|
+
endDate: z.ZodString;
|
|
115
|
+
granularity: z.ZodDefault<z.ZodEnum<{
|
|
116
|
+
hour: "hour";
|
|
117
|
+
day: "day";
|
|
118
|
+
week: "week";
|
|
119
|
+
month: "month";
|
|
120
|
+
}>>;
|
|
121
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
122
|
+
propertyFilters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
|
+
key: z.ZodString;
|
|
124
|
+
operator: z.ZodDefault<z.ZodLiteral<"eq">>;
|
|
125
|
+
value: z.ZodString;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
breakdown: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"property">;
|
|
129
|
+
key: z.ZodString;
|
|
130
|
+
topN: z.ZodDefault<z.ZodNumber>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
segmentId: z.ZodOptional<z.ZodString>;
|
|
133
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
134
|
+
includeInternal: z.ZodDefault<z.ZodBoolean>;
|
|
149
135
|
}, z.core.$strip>;
|
|
150
136
|
type EventsTimeseriesInput = z.input<typeof zEventsTimeseriesInput>;
|
|
151
137
|
/**
|
|
@@ -163,261 +149,261 @@ type EventsTimeseriesInput = z.input<typeof zEventsTimeseriesInput>;
|
|
|
163
149
|
*/
|
|
164
150
|
declare const zBucketStart: z.ZodString;
|
|
165
151
|
declare const zTimeseriesPoint: z.ZodObject<{
|
|
166
|
-
|
|
167
|
-
|
|
152
|
+
date: z.ZodString;
|
|
153
|
+
count: z.ZodNumber;
|
|
168
154
|
}, z.core.$strip>;
|
|
169
155
|
type TimeseriesPoint = z.infer<typeof zTimeseriesPoint>;
|
|
170
156
|
declare const zEventsTimeseriesData: z.ZodObject<{
|
|
157
|
+
granularity: z.ZodEnum<{
|
|
158
|
+
hour: "hour";
|
|
159
|
+
day: "day";
|
|
160
|
+
week: "week";
|
|
161
|
+
month: "month";
|
|
162
|
+
}>;
|
|
163
|
+
timezone: z.ZodString;
|
|
164
|
+
series: z.ZodArray<z.ZodObject<{
|
|
165
|
+
date: z.ZodString;
|
|
166
|
+
count: z.ZodNumber;
|
|
167
|
+
}, z.core.$strip>>;
|
|
168
|
+
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
169
|
+
value: z.ZodString;
|
|
170
|
+
points: z.ZodArray<z.ZodObject<{
|
|
171
|
+
date: z.ZodString;
|
|
172
|
+
count: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
}, z.core.$strip>>>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
type EventsTimeseriesData = z.infer<typeof zEventsTimeseriesData>;
|
|
177
|
+
declare const zEventsTimeseriesResponse: z.ZodObject<{
|
|
178
|
+
data: z.ZodObject<{
|
|
171
179
|
granularity: z.ZodEnum<{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
hour: "hour";
|
|
181
|
+
day: "day";
|
|
182
|
+
week: "week";
|
|
183
|
+
month: "month";
|
|
176
184
|
}>;
|
|
177
185
|
timezone: z.ZodString;
|
|
178
186
|
series: z.ZodArray<z.ZodObject<{
|
|
179
|
-
|
|
180
|
-
|
|
187
|
+
date: z.ZodString;
|
|
188
|
+
count: z.ZodNumber;
|
|
181
189
|
}, z.core.$strip>>;
|
|
182
190
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
value: z.ZodString;
|
|
192
|
+
points: z.ZodArray<z.ZodObject<{
|
|
193
|
+
date: z.ZodString;
|
|
194
|
+
count: z.ZodNumber;
|
|
195
|
+
}, z.core.$strip>>;
|
|
188
196
|
}, z.core.$strip>>>;
|
|
189
|
-
}, z.core.$strip>;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}, z.core.$strip>>;
|
|
210
|
-
}, z.core.$strip>>>;
|
|
211
|
-
}, z.core.$strip>;
|
|
212
|
-
meta: z.ZodObject<{
|
|
213
|
-
projectId: z.ZodString;
|
|
214
|
-
computedAt: z.ZodString;
|
|
215
|
-
cacheAgeSeconds: z.ZodNumber;
|
|
216
|
-
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
217
|
-
ingestLagStatus: z.ZodEnum<{
|
|
218
|
-
unknown: "unknown";
|
|
219
|
-
known: "known";
|
|
220
|
-
}>;
|
|
221
|
-
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
222
|
-
cached: z.ZodBoolean;
|
|
223
|
-
timezone: z.ZodString;
|
|
224
|
-
source: z.ZodEnum<{
|
|
225
|
-
raw: "raw";
|
|
226
|
-
rollup: "rollup";
|
|
227
|
-
mixed: "mixed";
|
|
228
|
-
}>;
|
|
229
|
-
requestId: z.ZodString;
|
|
230
|
-
}, z.core.$strip>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
meta: z.ZodObject<{
|
|
199
|
+
projectId: z.ZodString;
|
|
200
|
+
computedAt: z.ZodString;
|
|
201
|
+
cacheAgeSeconds: z.ZodNumber;
|
|
202
|
+
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
203
|
+
ingestLagStatus: z.ZodEnum<{
|
|
204
|
+
unknown: "unknown";
|
|
205
|
+
known: "known";
|
|
206
|
+
}>;
|
|
207
|
+
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
208
|
+
cached: z.ZodBoolean;
|
|
209
|
+
timezone: z.ZodString;
|
|
210
|
+
source: z.ZodEnum<{
|
|
211
|
+
rollup: "rollup";
|
|
212
|
+
raw: "raw";
|
|
213
|
+
mixed: "mixed";
|
|
214
|
+
}>;
|
|
215
|
+
requestId: z.ZodString;
|
|
216
|
+
}, z.core.$strip>;
|
|
231
217
|
}, z.core.$strip>;
|
|
232
218
|
type EventsTimeseriesResponse = z.infer<typeof zEventsTimeseriesResponse>;
|
|
233
219
|
declare const zFunnelInput: z.ZodObject<{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
220
|
+
projectId: z.ZodString;
|
|
221
|
+
steps: z.ZodArray<z.ZodString>;
|
|
222
|
+
startDate: z.ZodString;
|
|
223
|
+
endDate: z.ZodString;
|
|
224
|
+
windowSeconds: z.ZodDefault<z.ZodNumber>;
|
|
225
|
+
segmentId: z.ZodOptional<z.ZodString>;
|
|
226
|
+
channelFilter: z.ZodOptional<z.ZodObject<{
|
|
227
|
+
referrerTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
228
|
+
channelTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
229
|
+
utmSources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
230
|
+
utmMediums: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
231
|
+
utmCampaigns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
234
|
+
includeInternal: z.ZodDefault<z.ZodBoolean>;
|
|
249
235
|
}, z.core.$strip>;
|
|
250
236
|
type FunnelInput = z.input<typeof zFunnelInput>;
|
|
251
237
|
declare const zFunnelStep: z.ZodObject<{
|
|
238
|
+
step: z.ZodNumber;
|
|
239
|
+
name: z.ZodString;
|
|
240
|
+
users: z.ZodNumber;
|
|
241
|
+
conversionRate: z.ZodNumber;
|
|
242
|
+
dropoffRate: z.ZodNumber;
|
|
243
|
+
dropoffUsers: z.ZodNumber;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
declare const zFunnelData: z.ZodObject<{
|
|
246
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
252
247
|
step: z.ZodNumber;
|
|
253
248
|
name: z.ZodString;
|
|
254
249
|
users: z.ZodNumber;
|
|
255
250
|
conversionRate: z.ZodNumber;
|
|
256
251
|
dropoffRate: z.ZodNumber;
|
|
257
252
|
dropoffUsers: z.ZodNumber;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
totalUsers: z.ZodNumber;
|
|
255
|
+
overallConversionRate: z.ZodNumber;
|
|
258
256
|
}, z.core.$strip>;
|
|
259
|
-
|
|
257
|
+
type FunnelData = z.infer<typeof zFunnelData>;
|
|
258
|
+
declare const zFunnelResponse: z.ZodObject<{
|
|
259
|
+
data: z.ZodObject<{
|
|
260
260
|
steps: z.ZodArray<z.ZodObject<{
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
261
|
+
step: z.ZodNumber;
|
|
262
|
+
name: z.ZodString;
|
|
263
|
+
users: z.ZodNumber;
|
|
264
|
+
conversionRate: z.ZodNumber;
|
|
265
|
+
dropoffRate: z.ZodNumber;
|
|
266
|
+
dropoffUsers: z.ZodNumber;
|
|
267
267
|
}, z.core.$strip>>;
|
|
268
268
|
totalUsers: z.ZodNumber;
|
|
269
269
|
overallConversionRate: z.ZodNumber;
|
|
270
|
-
}, z.core.$strip>;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
ingestLagStatus: z.ZodEnum<{
|
|
291
|
-
unknown: "unknown";
|
|
292
|
-
known: "known";
|
|
293
|
-
}>;
|
|
294
|
-
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
295
|
-
cached: z.ZodBoolean;
|
|
296
|
-
timezone: z.ZodString;
|
|
297
|
-
source: z.ZodEnum<{
|
|
298
|
-
raw: "raw";
|
|
299
|
-
rollup: "rollup";
|
|
300
|
-
mixed: "mixed";
|
|
301
|
-
}>;
|
|
302
|
-
requestId: z.ZodString;
|
|
303
|
-
}, z.core.$strip>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
meta: z.ZodObject<{
|
|
272
|
+
projectId: z.ZodString;
|
|
273
|
+
computedAt: z.ZodString;
|
|
274
|
+
cacheAgeSeconds: z.ZodNumber;
|
|
275
|
+
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
276
|
+
ingestLagStatus: z.ZodEnum<{
|
|
277
|
+
unknown: "unknown";
|
|
278
|
+
known: "known";
|
|
279
|
+
}>;
|
|
280
|
+
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
281
|
+
cached: z.ZodBoolean;
|
|
282
|
+
timezone: z.ZodString;
|
|
283
|
+
source: z.ZodEnum<{
|
|
284
|
+
rollup: "rollup";
|
|
285
|
+
raw: "raw";
|
|
286
|
+
mixed: "mixed";
|
|
287
|
+
}>;
|
|
288
|
+
requestId: z.ZodString;
|
|
289
|
+
}, z.core.$strip>;
|
|
304
290
|
}, z.core.$strip>;
|
|
305
291
|
type FunnelResponse = z.infer<typeof zFunnelResponse>;
|
|
306
292
|
declare const zRetentionInterval: z.ZodEnum<{
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
293
|
+
day: "day";
|
|
294
|
+
week: "week";
|
|
295
|
+
month: "month";
|
|
310
296
|
}>;
|
|
311
297
|
declare const zRetentionInput: z.ZodObject<{
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
298
|
+
projectId: z.ZodString;
|
|
299
|
+
startDate: z.ZodString;
|
|
300
|
+
endDate: z.ZodString;
|
|
301
|
+
interval: z.ZodDefault<z.ZodEnum<{
|
|
302
|
+
day: "day";
|
|
303
|
+
week: "week";
|
|
304
|
+
month: "month";
|
|
305
|
+
}>>;
|
|
306
|
+
periods: z.ZodDefault<z.ZodNumber>;
|
|
307
|
+
startEvent: z.ZodOptional<z.ZodString>;
|
|
308
|
+
returnEvent: z.ZodOptional<z.ZodString>;
|
|
309
|
+
retentionType: z.ZodDefault<z.ZodEnum<{
|
|
310
|
+
bounded: "bounded";
|
|
311
|
+
unbounded: "unbounded";
|
|
312
|
+
}>>;
|
|
313
|
+
cohortMode: z.ZodDefault<z.ZodEnum<{
|
|
314
|
+
"first-ever": "first-ever";
|
|
315
|
+
"first-in-window": "first-in-window";
|
|
316
|
+
}>>;
|
|
317
|
+
segmentId: z.ZodOptional<z.ZodString>;
|
|
318
|
+
channelFilter: z.ZodOptional<z.ZodObject<{
|
|
319
|
+
referrerTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
320
|
+
channelTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
321
|
+
utmSources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
322
|
+
utmMediums: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
|
+
utmCampaigns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
326
|
+
includeInternal: z.ZodDefault<z.ZodBoolean>;
|
|
341
327
|
}, z.core.$strip>;
|
|
342
328
|
type RetentionInput = z.input<typeof zRetentionInput>;
|
|
343
329
|
declare const zRetentionCell: z.ZodObject<{
|
|
330
|
+
period: z.ZodNumber;
|
|
331
|
+
users: z.ZodNumber;
|
|
332
|
+
rate: z.ZodNumber;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
declare const zRetentionData: z.ZodObject<{
|
|
335
|
+
matrix: z.ZodArray<z.ZodObject<{
|
|
336
|
+
cohortDate: z.ZodString;
|
|
337
|
+
cohortSize: z.ZodNumber;
|
|
338
|
+
retention: z.ZodArray<z.ZodObject<{
|
|
339
|
+
period: z.ZodNumber;
|
|
340
|
+
users: z.ZodNumber;
|
|
341
|
+
rate: z.ZodNumber;
|
|
342
|
+
}, z.core.$strip>>;
|
|
343
|
+
}, z.core.$strip>>;
|
|
344
|
+
averageRetention: z.ZodArray<z.ZodObject<{
|
|
344
345
|
period: z.ZodNumber;
|
|
345
|
-
users: z.ZodNumber;
|
|
346
346
|
rate: z.ZodNumber;
|
|
347
|
+
}, z.core.$strip>>;
|
|
348
|
+
interval: z.ZodEnum<{
|
|
349
|
+
day: "day";
|
|
350
|
+
week: "week";
|
|
351
|
+
month: "month";
|
|
352
|
+
}>;
|
|
353
|
+
periods: z.ZodNumber;
|
|
354
|
+
retentionType: z.ZodEnum<{
|
|
355
|
+
bounded: "bounded";
|
|
356
|
+
unbounded: "unbounded";
|
|
357
|
+
}>;
|
|
358
|
+
timezone: z.ZodString;
|
|
347
359
|
}, z.core.$strip>;
|
|
348
|
-
|
|
360
|
+
type RetentionData = z.infer<typeof zRetentionData>;
|
|
361
|
+
declare const zRetentionResponse: z.ZodObject<{
|
|
362
|
+
data: z.ZodObject<{
|
|
349
363
|
matrix: z.ZodArray<z.ZodObject<{
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
period: z.ZodNumber;
|
|
354
|
-
users: z.ZodNumber;
|
|
355
|
-
rate: z.ZodNumber;
|
|
356
|
-
}, z.core.$strip>>;
|
|
357
|
-
}, z.core.$strip>>;
|
|
358
|
-
averageRetention: z.ZodArray<z.ZodObject<{
|
|
364
|
+
cohortDate: z.ZodString;
|
|
365
|
+
cohortSize: z.ZodNumber;
|
|
366
|
+
retention: z.ZodArray<z.ZodObject<{
|
|
359
367
|
period: z.ZodNumber;
|
|
368
|
+
users: z.ZodNumber;
|
|
360
369
|
rate: z.ZodNumber;
|
|
370
|
+
}, z.core.$strip>>;
|
|
371
|
+
}, z.core.$strip>>;
|
|
372
|
+
averageRetention: z.ZodArray<z.ZodObject<{
|
|
373
|
+
period: z.ZodNumber;
|
|
374
|
+
rate: z.ZodNumber;
|
|
361
375
|
}, z.core.$strip>>;
|
|
362
376
|
interval: z.ZodEnum<{
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
377
|
+
day: "day";
|
|
378
|
+
week: "week";
|
|
379
|
+
month: "month";
|
|
366
380
|
}>;
|
|
367
381
|
periods: z.ZodNumber;
|
|
368
382
|
retentionType: z.ZodEnum<{
|
|
369
|
-
|
|
370
|
-
|
|
383
|
+
bounded: "bounded";
|
|
384
|
+
unbounded: "unbounded";
|
|
371
385
|
}>;
|
|
372
386
|
timezone: z.ZodString;
|
|
373
|
-
}, z.core.$strip>;
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
week: "week";
|
|
394
|
-
}>;
|
|
395
|
-
periods: z.ZodNumber;
|
|
396
|
-
retentionType: z.ZodEnum<{
|
|
397
|
-
bounded: "bounded";
|
|
398
|
-
unbounded: "unbounded";
|
|
399
|
-
}>;
|
|
400
|
-
timezone: z.ZodString;
|
|
401
|
-
}, z.core.$strip>;
|
|
402
|
-
meta: z.ZodObject<{
|
|
403
|
-
projectId: z.ZodString;
|
|
404
|
-
computedAt: z.ZodString;
|
|
405
|
-
cacheAgeSeconds: z.ZodNumber;
|
|
406
|
-
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
407
|
-
ingestLagStatus: z.ZodEnum<{
|
|
408
|
-
unknown: "unknown";
|
|
409
|
-
known: "known";
|
|
410
|
-
}>;
|
|
411
|
-
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
412
|
-
cached: z.ZodBoolean;
|
|
413
|
-
timezone: z.ZodString;
|
|
414
|
-
source: z.ZodEnum<{
|
|
415
|
-
raw: "raw";
|
|
416
|
-
rollup: "rollup";
|
|
417
|
-
mixed: "mixed";
|
|
418
|
-
}>;
|
|
419
|
-
requestId: z.ZodString;
|
|
420
|
-
}, z.core.$strip>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
meta: z.ZodObject<{
|
|
389
|
+
projectId: z.ZodString;
|
|
390
|
+
computedAt: z.ZodString;
|
|
391
|
+
cacheAgeSeconds: z.ZodNumber;
|
|
392
|
+
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
393
|
+
ingestLagStatus: z.ZodEnum<{
|
|
394
|
+
unknown: "unknown";
|
|
395
|
+
known: "known";
|
|
396
|
+
}>;
|
|
397
|
+
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
398
|
+
cached: z.ZodBoolean;
|
|
399
|
+
timezone: z.ZodString;
|
|
400
|
+
source: z.ZodEnum<{
|
|
401
|
+
rollup: "rollup";
|
|
402
|
+
raw: "raw";
|
|
403
|
+
mixed: "mixed";
|
|
404
|
+
}>;
|
|
405
|
+
requestId: z.ZodString;
|
|
406
|
+
}, z.core.$strip>;
|
|
421
407
|
}, z.core.$strip>;
|
|
422
408
|
type RetentionResponse = z.infer<typeof zRetentionResponse>;
|
|
423
409
|
/**
|
|
@@ -427,125 +413,147 @@ type RetentionResponse = z.infer<typeof zRetentionResponse>;
|
|
|
427
413
|
* "visitor" is the vocabulary the dashboards already use.
|
|
428
414
|
*/
|
|
429
415
|
declare const zTrafficOverviewInput: z.ZodObject<{
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
416
|
+
projectId: z.ZodString;
|
|
417
|
+
startDate: z.ZodString;
|
|
418
|
+
endDate: z.ZodString;
|
|
419
|
+
granularity: z.ZodDefault<z.ZodEnum<{
|
|
420
|
+
hour: "hour";
|
|
421
|
+
day: "day";
|
|
422
|
+
week: "week";
|
|
423
|
+
month: "month";
|
|
424
|
+
}>>;
|
|
425
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
440
426
|
}, z.core.$strip>;
|
|
441
427
|
type TrafficOverviewInput = z.input<typeof zTrafficOverviewInput>;
|
|
442
428
|
declare const zTrafficTotals: z.ZodObject<{
|
|
429
|
+
sessions: z.ZodNumber;
|
|
430
|
+
pageviews: z.ZodNumber;
|
|
431
|
+
newVisitors: z.ZodNumber;
|
|
432
|
+
returningVisitors: z.ZodNumber;
|
|
433
|
+
bounceRate: z.ZodNumber;
|
|
434
|
+
}, z.core.$strip>;
|
|
435
|
+
type TrafficTotals = z.infer<typeof zTrafficTotals>;
|
|
436
|
+
declare const zTrafficSeriesPoint: z.ZodObject<{
|
|
437
|
+
sessions: z.ZodNumber;
|
|
438
|
+
pageviews: z.ZodNumber;
|
|
439
|
+
newVisitors: z.ZodNumber;
|
|
440
|
+
returningVisitors: z.ZodNumber;
|
|
441
|
+
bounceRate: z.ZodNumber;
|
|
442
|
+
date: z.ZodString;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
declare const zTrafficOverviewData: z.ZodObject<{
|
|
445
|
+
granularity: z.ZodEnum<{
|
|
446
|
+
hour: "hour";
|
|
447
|
+
day: "day";
|
|
448
|
+
week: "week";
|
|
449
|
+
month: "month";
|
|
450
|
+
}>;
|
|
451
|
+
timezone: z.ZodString;
|
|
452
|
+
totals: z.ZodObject<{
|
|
443
453
|
sessions: z.ZodNumber;
|
|
444
454
|
pageviews: z.ZodNumber;
|
|
445
455
|
newVisitors: z.ZodNumber;
|
|
446
456
|
returningVisitors: z.ZodNumber;
|
|
447
457
|
bounceRate: z.ZodNumber;
|
|
448
|
-
}, z.core.$strip>;
|
|
449
|
-
|
|
450
|
-
declare const zTrafficSeriesPoint: z.ZodObject<{
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
series: z.ZodArray<z.ZodObject<{
|
|
451
460
|
sessions: z.ZodNumber;
|
|
452
461
|
pageviews: z.ZodNumber;
|
|
453
462
|
newVisitors: z.ZodNumber;
|
|
454
463
|
returningVisitors: z.ZodNumber;
|
|
455
464
|
bounceRate: z.ZodNumber;
|
|
456
465
|
date: z.ZodString;
|
|
466
|
+
}, z.core.$strip>>;
|
|
457
467
|
}, z.core.$strip>;
|
|
458
|
-
|
|
468
|
+
type TrafficOverviewData = z.infer<typeof zTrafficOverviewData>;
|
|
469
|
+
declare const zTrafficOverviewResponse: z.ZodObject<{
|
|
470
|
+
data: z.ZodObject<{
|
|
459
471
|
granularity: z.ZodEnum<{
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
472
|
+
hour: "hour";
|
|
473
|
+
day: "day";
|
|
474
|
+
week: "week";
|
|
475
|
+
month: "month";
|
|
464
476
|
}>;
|
|
465
477
|
timezone: z.ZodString;
|
|
466
478
|
totals: z.ZodObject<{
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
479
|
+
sessions: z.ZodNumber;
|
|
480
|
+
pageviews: z.ZodNumber;
|
|
481
|
+
newVisitors: z.ZodNumber;
|
|
482
|
+
returningVisitors: z.ZodNumber;
|
|
483
|
+
bounceRate: z.ZodNumber;
|
|
472
484
|
}, z.core.$strip>;
|
|
473
485
|
series: z.ZodArray<z.ZodObject<{
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
486
|
+
sessions: z.ZodNumber;
|
|
487
|
+
pageviews: z.ZodNumber;
|
|
488
|
+
newVisitors: z.ZodNumber;
|
|
489
|
+
returningVisitors: z.ZodNumber;
|
|
490
|
+
bounceRate: z.ZodNumber;
|
|
491
|
+
date: z.ZodString;
|
|
480
492
|
}, z.core.$strip>>;
|
|
481
|
-
}, z.core.$strip>;
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
pageviews: z.ZodNumber;
|
|
502
|
-
newVisitors: z.ZodNumber;
|
|
503
|
-
returningVisitors: z.ZodNumber;
|
|
504
|
-
bounceRate: z.ZodNumber;
|
|
505
|
-
date: z.ZodString;
|
|
506
|
-
}, z.core.$strip>>;
|
|
507
|
-
}, z.core.$strip>;
|
|
508
|
-
meta: z.ZodObject<{
|
|
509
|
-
projectId: z.ZodString;
|
|
510
|
-
computedAt: z.ZodString;
|
|
511
|
-
cacheAgeSeconds: z.ZodNumber;
|
|
512
|
-
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
513
|
-
ingestLagStatus: z.ZodEnum<{
|
|
514
|
-
unknown: "unknown";
|
|
515
|
-
known: "known";
|
|
516
|
-
}>;
|
|
517
|
-
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
518
|
-
cached: z.ZodBoolean;
|
|
519
|
-
timezone: z.ZodString;
|
|
520
|
-
source: z.ZodEnum<{
|
|
521
|
-
raw: "raw";
|
|
522
|
-
rollup: "rollup";
|
|
523
|
-
mixed: "mixed";
|
|
524
|
-
}>;
|
|
525
|
-
requestId: z.ZodString;
|
|
526
|
-
}, z.core.$strip>;
|
|
493
|
+
}, z.core.$strip>;
|
|
494
|
+
meta: z.ZodObject<{
|
|
495
|
+
projectId: z.ZodString;
|
|
496
|
+
computedAt: z.ZodString;
|
|
497
|
+
cacheAgeSeconds: z.ZodNumber;
|
|
498
|
+
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
499
|
+
ingestLagStatus: z.ZodEnum<{
|
|
500
|
+
unknown: "unknown";
|
|
501
|
+
known: "known";
|
|
502
|
+
}>;
|
|
503
|
+
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
504
|
+
cached: z.ZodBoolean;
|
|
505
|
+
timezone: z.ZodString;
|
|
506
|
+
source: z.ZodEnum<{
|
|
507
|
+
rollup: "rollup";
|
|
508
|
+
raw: "raw";
|
|
509
|
+
mixed: "mixed";
|
|
510
|
+
}>;
|
|
511
|
+
requestId: z.ZodString;
|
|
512
|
+
}, z.core.$strip>;
|
|
527
513
|
}, z.core.$strip>;
|
|
528
514
|
type TrafficOverviewResponse = z.infer<typeof zTrafficOverviewResponse>;
|
|
529
515
|
declare const zTrafficDimension: z.ZodEnum<{
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
516
|
+
referrer: "referrer";
|
|
517
|
+
channel: "channel";
|
|
518
|
+
utm: "utm";
|
|
533
519
|
}>;
|
|
534
520
|
type TrafficDimension = z.infer<typeof zTrafficDimension>;
|
|
535
521
|
declare const zTrafficSourcesInput: z.ZodObject<{
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
522
|
+
projectId: z.ZodString;
|
|
523
|
+
startDate: z.ZodString;
|
|
524
|
+
endDate: z.ZodString;
|
|
525
|
+
dimension: z.ZodEnum<{
|
|
526
|
+
referrer: "referrer";
|
|
527
|
+
channel: "channel";
|
|
528
|
+
utm: "utm";
|
|
529
|
+
}>;
|
|
530
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
531
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
546
532
|
}, z.core.$strip>;
|
|
547
533
|
type TrafficSourcesInput = z.input<typeof zTrafficSourcesInput>;
|
|
548
534
|
declare const zTrafficSourceRow: z.ZodObject<{
|
|
535
|
+
sessions: z.ZodNumber;
|
|
536
|
+
pageviews: z.ZodNumber;
|
|
537
|
+
newVisitors: z.ZodNumber;
|
|
538
|
+
returningVisitors: z.ZodNumber;
|
|
539
|
+
bounceRate: z.ZodNumber;
|
|
540
|
+
key: z.ZodString;
|
|
541
|
+
channelType: z.ZodOptional<z.ZodString>;
|
|
542
|
+
referrerName: z.ZodOptional<z.ZodString>;
|
|
543
|
+
referrerType: z.ZodOptional<z.ZodString>;
|
|
544
|
+
utmSource: z.ZodOptional<z.ZodString>;
|
|
545
|
+
utmMedium: z.ZodOptional<z.ZodString>;
|
|
546
|
+
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
547
|
+
}, z.core.$strip>;
|
|
548
|
+
type TrafficSourceRow = z.infer<typeof zTrafficSourceRow>;
|
|
549
|
+
declare const zTrafficSourcesData: z.ZodObject<{
|
|
550
|
+
dimension: z.ZodEnum<{
|
|
551
|
+
referrer: "referrer";
|
|
552
|
+
channel: "channel";
|
|
553
|
+
utm: "utm";
|
|
554
|
+
}>;
|
|
555
|
+
timezone: z.ZodString;
|
|
556
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
549
557
|
sessions: z.ZodNumber;
|
|
550
558
|
pageviews: z.ZodNumber;
|
|
551
559
|
newVisitors: z.ZodNumber;
|
|
@@ -558,77 +566,69 @@ declare const zTrafficSourceRow: z.ZodObject<{
|
|
|
558
566
|
utmSource: z.ZodOptional<z.ZodString>;
|
|
559
567
|
utmMedium: z.ZodOptional<z.ZodString>;
|
|
560
568
|
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.core.$strip>>;
|
|
561
570
|
}, z.core.$strip>;
|
|
562
|
-
type
|
|
563
|
-
declare const
|
|
571
|
+
type TrafficSourcesData = z.infer<typeof zTrafficSourcesData>;
|
|
572
|
+
declare const zTrafficSourcesResponse: z.ZodObject<{
|
|
573
|
+
data: z.ZodObject<{
|
|
564
574
|
dimension: z.ZodEnum<{
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
575
|
+
referrer: "referrer";
|
|
576
|
+
channel: "channel";
|
|
577
|
+
utm: "utm";
|
|
568
578
|
}>;
|
|
569
579
|
timezone: z.ZodString;
|
|
570
580
|
rows: z.ZodArray<z.ZodObject<{
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
sessions: z.ZodNumber;
|
|
582
|
+
pageviews: z.ZodNumber;
|
|
583
|
+
newVisitors: z.ZodNumber;
|
|
584
|
+
returningVisitors: z.ZodNumber;
|
|
585
|
+
bounceRate: z.ZodNumber;
|
|
586
|
+
key: z.ZodString;
|
|
587
|
+
channelType: z.ZodOptional<z.ZodString>;
|
|
588
|
+
referrerName: z.ZodOptional<z.ZodString>;
|
|
589
|
+
referrerType: z.ZodOptional<z.ZodString>;
|
|
590
|
+
utmSource: z.ZodOptional<z.ZodString>;
|
|
591
|
+
utmMedium: z.ZodOptional<z.ZodString>;
|
|
592
|
+
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
583
593
|
}, z.core.$strip>>;
|
|
584
|
-
}, z.core.$strip>;
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
utmSource: z.ZodOptional<z.ZodString>;
|
|
605
|
-
utmMedium: z.ZodOptional<z.ZodString>;
|
|
606
|
-
utmCampaign: z.ZodOptional<z.ZodString>;
|
|
607
|
-
}, z.core.$strip>>;
|
|
608
|
-
}, z.core.$strip>;
|
|
609
|
-
meta: z.ZodObject<{
|
|
610
|
-
projectId: z.ZodString;
|
|
611
|
-
computedAt: z.ZodString;
|
|
612
|
-
cacheAgeSeconds: z.ZodNumber;
|
|
613
|
-
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
614
|
-
ingestLagStatus: z.ZodEnum<{
|
|
615
|
-
unknown: "unknown";
|
|
616
|
-
known: "known";
|
|
617
|
-
}>;
|
|
618
|
-
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
619
|
-
cached: z.ZodBoolean;
|
|
620
|
-
timezone: z.ZodString;
|
|
621
|
-
source: z.ZodEnum<{
|
|
622
|
-
raw: "raw";
|
|
623
|
-
rollup: "rollup";
|
|
624
|
-
mixed: "mixed";
|
|
625
|
-
}>;
|
|
626
|
-
requestId: z.ZodString;
|
|
627
|
-
}, z.core.$strip>;
|
|
594
|
+
}, z.core.$strip>;
|
|
595
|
+
meta: z.ZodObject<{
|
|
596
|
+
projectId: z.ZodString;
|
|
597
|
+
computedAt: z.ZodString;
|
|
598
|
+
cacheAgeSeconds: z.ZodNumber;
|
|
599
|
+
ingestLagSeconds: z.ZodNullable<z.ZodNumber>;
|
|
600
|
+
ingestLagStatus: z.ZodEnum<{
|
|
601
|
+
unknown: "unknown";
|
|
602
|
+
known: "known";
|
|
603
|
+
}>;
|
|
604
|
+
ingestDeadLetterCount: z.ZodNullable<z.ZodNumber>;
|
|
605
|
+
cached: z.ZodBoolean;
|
|
606
|
+
timezone: z.ZodString;
|
|
607
|
+
source: z.ZodEnum<{
|
|
608
|
+
rollup: "rollup";
|
|
609
|
+
raw: "raw";
|
|
610
|
+
mixed: "mixed";
|
|
611
|
+
}>;
|
|
612
|
+
requestId: z.ZodString;
|
|
613
|
+
}, z.core.$strip>;
|
|
628
614
|
}, z.core.$strip>;
|
|
629
615
|
type TrafficSourcesResponse = z.infer<typeof zTrafficSourcesResponse>;
|
|
630
616
|
declare const QUERY_ERROR_CODES: readonly ["unauthorized", "project_scope_mismatch", "query_scope_missing", "validation_failed", "unsupported_combination", "project_purging", "rate_limited", "query_timeout", "internal_error"];
|
|
631
617
|
declare const zQueryErrorCode: z.ZodEnum<{
|
|
618
|
+
validation_failed: "validation_failed";
|
|
619
|
+
unauthorized: "unauthorized";
|
|
620
|
+
rate_limited: "rate_limited";
|
|
621
|
+
project_purging: "project_purging";
|
|
622
|
+
internal_error: "internal_error";
|
|
623
|
+
project_scope_mismatch: "project_scope_mismatch";
|
|
624
|
+
query_scope_missing: "query_scope_missing";
|
|
625
|
+
unsupported_combination: "unsupported_combination";
|
|
626
|
+
query_timeout: "query_timeout";
|
|
627
|
+
}>;
|
|
628
|
+
type QueryErrorCode = z.infer<typeof zQueryErrorCode>;
|
|
629
|
+
declare const zQueryError: z.ZodObject<{
|
|
630
|
+
status: z.ZodNumber;
|
|
631
|
+
code: z.ZodEnum<{
|
|
632
632
|
validation_failed: "validation_failed";
|
|
633
633
|
unauthorized: "unauthorized";
|
|
634
634
|
rate_limited: "rate_limited";
|
|
@@ -638,34 +638,21 @@ declare const zQueryErrorCode: z.ZodEnum<{
|
|
|
638
638
|
query_scope_missing: "query_scope_missing";
|
|
639
639
|
unsupported_combination: "unsupported_combination";
|
|
640
640
|
query_timeout: "query_timeout";
|
|
641
|
-
}>;
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
validation_failed: "validation_failed";
|
|
647
|
-
unauthorized: "unauthorized";
|
|
648
|
-
rate_limited: "rate_limited";
|
|
649
|
-
project_purging: "project_purging";
|
|
650
|
-
internal_error: "internal_error";
|
|
651
|
-
project_scope_mismatch: "project_scope_mismatch";
|
|
652
|
-
query_scope_missing: "query_scope_missing";
|
|
653
|
-
unsupported_combination: "unsupported_combination";
|
|
654
|
-
query_timeout: "query_timeout";
|
|
655
|
-
}>;
|
|
656
|
-
error: z.ZodString;
|
|
657
|
-
message: z.ZodOptional<z.ZodString>;
|
|
658
|
-
errors: z.ZodOptional<z.ZodUnknown>;
|
|
659
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
641
|
+
}>;
|
|
642
|
+
error: z.ZodString;
|
|
643
|
+
message: z.ZodOptional<z.ZodString>;
|
|
644
|
+
errors: z.ZodOptional<z.ZodUnknown>;
|
|
645
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
660
646
|
}, z.core.$strip>;
|
|
661
647
|
type QueryError = z.infer<typeof zQueryError>;
|
|
662
648
|
/** Paths, so the client and the route handlers cannot drift apart. */
|
|
663
649
|
declare const QUERY_API_PATHS: {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
650
|
+
readonly eventsTimeseries: "/api/v1/query/events/timeseries";
|
|
651
|
+
readonly funnel: "/api/v1/query/funnel";
|
|
652
|
+
readonly retention: "/api/v1/query/retention";
|
|
653
|
+
readonly trafficOverview: "/api/v1/query/traffic/overview";
|
|
654
|
+
readonly trafficSources: "/api/v1/query/traffic/sources";
|
|
669
655
|
};
|
|
670
|
-
|
|
671
|
-
export {
|
|
656
|
+
//#endregion
|
|
657
|
+
export { ChannelFilter, EventPropertyFilter, EventsTimeseriesData, EventsTimeseriesInput, EventsTimeseriesResponse, FunnelData, FunnelInput, FunnelResponse, Granularity, QUERY_API_PATHS, QUERY_ERROR_CODES, QueryError, QueryErrorCode, QueryMeta, QuerySource, RetentionData, RetentionInput, RetentionResponse, TimeseriesBreakdown, TimeseriesPoint, TrafficDimension, TrafficOverviewData, TrafficOverviewInput, TrafficOverviewResponse, TrafficSourceRow, TrafficSourcesData, TrafficSourcesInput, TrafficSourcesResponse, TrafficTotals, isValidTimeZone, zBucketStart, zChannelFilter, zDate, zEventPropertyFilter, zEventsTimeseriesData, zEventsTimeseriesInput, zEventsTimeseriesResponse, zFunnelData, zFunnelInput, zFunnelResponse, zFunnelStep, zGranularity, zInstant, zQueryEnvelope, zQueryError, zQueryErrorCode, zQueryMeta, zQuerySource, zRetentionCell, zRetentionData, zRetentionInput, zRetentionInterval, zRetentionResponse, zTimeseriesBreakdown, zTimeseriesPoint, zTimezone, zTrafficDimension, zTrafficOverviewData, zTrafficOverviewInput, zTrafficOverviewResponse, zTrafficSeriesPoint, zTrafficSourceRow, zTrafficSourcesData, zTrafficSourcesInput, zTrafficSourcesResponse, zTrafficTotals };
|
|
658
|
+
//# sourceMappingURL=query.d.cts.map
|