@kakadu/types-play 1.0.0 → 1.0.1
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/build/index.d.mts +210 -0
- package/build/index.d.ts +210 -0
- package/{dist → build}/index.js +69 -59
- package/build/index.js.map +1 -0
- package/{dist → build}/index.mjs +57 -49
- package/build/index.mjs.map +1 -0
- package/package.json +11 -11
- package/dist/index.d.mts +0 -1186
- package/dist/index.d.ts +0 -1186
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @maxLength 50
|
|
5
|
+
*/
|
|
6
|
+
type Id = string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @schema string().url().startsWith("https://")
|
|
10
|
+
*/
|
|
11
|
+
type Url = string;
|
|
12
|
+
|
|
13
|
+
type Image = {
|
|
14
|
+
url: Url;
|
|
15
|
+
/**
|
|
16
|
+
* @schema number().int().min(1).optional()
|
|
17
|
+
*/
|
|
18
|
+
width?: number;
|
|
19
|
+
/**
|
|
20
|
+
* @schema number().int().min(1).optional()
|
|
21
|
+
*/
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @maxLength 450
|
|
27
|
+
*/
|
|
28
|
+
type Name = string;
|
|
29
|
+
|
|
30
|
+
type DatabasePlayStepTarget = {
|
|
31
|
+
Id: string;
|
|
32
|
+
RecipeStepId: string;
|
|
33
|
+
X: number;
|
|
34
|
+
Y: number;
|
|
35
|
+
W: number;
|
|
36
|
+
H: number;
|
|
37
|
+
};
|
|
38
|
+
type PlayStepTarget = {
|
|
39
|
+
id: Id;
|
|
40
|
+
playStepId: Id;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
type ClientPlayStepTarget = Omit<PlayStepTarget, 'playStepId'>;
|
|
47
|
+
|
|
48
|
+
type DatabasePlayStep = {
|
|
49
|
+
Id: string;
|
|
50
|
+
RecipeId: string;
|
|
51
|
+
Order: number;
|
|
52
|
+
Description: string;
|
|
53
|
+
ImagePath: string;
|
|
54
|
+
};
|
|
55
|
+
type PlayStep = {
|
|
56
|
+
id: Id;
|
|
57
|
+
playId: Id;
|
|
58
|
+
order: number;
|
|
59
|
+
description?: Name;
|
|
60
|
+
image?: Image;
|
|
61
|
+
};
|
|
62
|
+
type ClientPlayStep = Omit<PlayStep, 'playId' | 'order'> & {
|
|
63
|
+
target?: ClientPlayStepTarget;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type DatabasePlay = {
|
|
67
|
+
Id: string;
|
|
68
|
+
CreatedDate: Date;
|
|
69
|
+
CustomerId: string;
|
|
70
|
+
Locale: string;
|
|
71
|
+
Status?: 'Published' | 'Listed' | 'Private';
|
|
72
|
+
Title: string;
|
|
73
|
+
Slug: string;
|
|
74
|
+
Description: string;
|
|
75
|
+
ImagePath: string;
|
|
76
|
+
IsDeleted: boolean;
|
|
77
|
+
};
|
|
78
|
+
type Play = {
|
|
79
|
+
id: Id;
|
|
80
|
+
organizationId: Id;
|
|
81
|
+
locale: string;
|
|
82
|
+
title?: Name;
|
|
83
|
+
slug: Name;
|
|
84
|
+
description?: Name;
|
|
85
|
+
image?: Image;
|
|
86
|
+
creationDate: Date;
|
|
87
|
+
};
|
|
88
|
+
type ClientPlay = Omit<Play, 'organizationId'> & {
|
|
89
|
+
urls: {
|
|
90
|
+
page: string;
|
|
91
|
+
embed: string;
|
|
92
|
+
};
|
|
93
|
+
stepsCount: number;
|
|
94
|
+
steps?: ClientPlayStep[];
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare const playSchema: z.ZodType<Play>;
|
|
98
|
+
declare const clientPlaySchema: z.ZodType<ClientPlay>;
|
|
99
|
+
|
|
100
|
+
declare const playStepSchema: z.ZodType<PlayStep>;
|
|
101
|
+
declare const clientPlayStepSchema: z.ZodType<ClientPlayStep>;
|
|
102
|
+
|
|
103
|
+
declare const playStepTargetSchema: z.ZodType<PlayStepTarget>;
|
|
104
|
+
declare const clientPlayStepTargetSchema: z.ZodType<ClientPlayStepTarget>;
|
|
105
|
+
|
|
106
|
+
type DatabasePlayFeedback = {
|
|
107
|
+
Id: string;
|
|
108
|
+
RecipeId: string;
|
|
109
|
+
Positive: boolean;
|
|
110
|
+
Comment?: string;
|
|
111
|
+
VoteDate: Date;
|
|
112
|
+
};
|
|
113
|
+
type PlayFeedback = {
|
|
114
|
+
id: Id;
|
|
115
|
+
playId: Id;
|
|
116
|
+
value: boolean;
|
|
117
|
+
content?: string;
|
|
118
|
+
creationDate: Date;
|
|
119
|
+
};
|
|
120
|
+
type ClientPlayFeedback = Omit<PlayFeedback, 'playId'>;
|
|
121
|
+
|
|
122
|
+
declare const playFeedbackSchema: z.ZodType<PlayFeedback>;
|
|
123
|
+
declare const clientPlayFeedbackSchema: z.ZodType<ClientPlayFeedback>;
|
|
124
|
+
|
|
125
|
+
type PlayAnalyticsMetrics = {
|
|
126
|
+
/** Plausible unique visitors */
|
|
127
|
+
visitors: number;
|
|
128
|
+
/** Plausible visits/sessions */
|
|
129
|
+
visits: number;
|
|
130
|
+
/** Plausible pageview events */
|
|
131
|
+
pageviews: number;
|
|
132
|
+
};
|
|
133
|
+
type PlayAnalyticsGoal = {
|
|
134
|
+
/** Plausible total event count */
|
|
135
|
+
total: number;
|
|
136
|
+
/** Plausible unique visitors */
|
|
137
|
+
visitors: number;
|
|
138
|
+
};
|
|
139
|
+
type PlayAnalyticsData = {
|
|
140
|
+
/** Plausible unique visitors */
|
|
141
|
+
visitors?: number;
|
|
142
|
+
/** Plausible visits/sessions */
|
|
143
|
+
visits?: number;
|
|
144
|
+
/** Plausible pageview events */
|
|
145
|
+
pageviews?: number;
|
|
146
|
+
/** Event count of guide starts. */
|
|
147
|
+
started?: PlayAnalyticsGoal;
|
|
148
|
+
/** Event count of guide finishes. */
|
|
149
|
+
finished?: PlayAnalyticsGoal;
|
|
150
|
+
/** Event count of guide restarts. */
|
|
151
|
+
restarted?: PlayAnalyticsGoal;
|
|
152
|
+
/** Event count of guides printed. */
|
|
153
|
+
printed?: PlayAnalyticsGoal;
|
|
154
|
+
/** Step event counts per step. */
|
|
155
|
+
steps?: number[];
|
|
156
|
+
/** Unique step counts per step. */
|
|
157
|
+
visitorsBySteps?: number[];
|
|
158
|
+
/** Metrics by date, where the key is a date string. */
|
|
159
|
+
metricsByDate?: Record<string, Partial<PlayAnalyticsMetrics>>;
|
|
160
|
+
/** Rate of how many started a guide vs viewed it. */
|
|
161
|
+
startRate?: number;
|
|
162
|
+
/** Rate of how many finished a guide vs started it. */
|
|
163
|
+
completionRate?: number;
|
|
164
|
+
/** Rate of how many restarted a guide vs finished it. */
|
|
165
|
+
restartRate?: number;
|
|
166
|
+
/** Rate of how many left at each step, not including step 1. */
|
|
167
|
+
dropoffRate?: number[];
|
|
168
|
+
/** Average dropoff rate across all steps (excluding step 1). */
|
|
169
|
+
averageDropoffRate?: number;
|
|
170
|
+
/** Rate of how many continued to the next step, not including step 1. */
|
|
171
|
+
continuationRate?: number[];
|
|
172
|
+
/** Average continuation rate across all steps (excluding step 1). */
|
|
173
|
+
averageContinuationRate?: number;
|
|
174
|
+
/** Rate of friction at each step (users moving back and forth). */
|
|
175
|
+
frictionRate?: number[];
|
|
176
|
+
/** Average friction rate across all steps. */
|
|
177
|
+
averageFrictionRate?: number;
|
|
178
|
+
/** On average, how many people from the first step are retained. */
|
|
179
|
+
averageRetention?: number;
|
|
180
|
+
/** How far through the guide (in percent) at least half the visitors get. */
|
|
181
|
+
medianProgress?: number;
|
|
182
|
+
/** Estimated number of visitors that were helped by the guide. */
|
|
183
|
+
estimatedVisitorsHelped?: number;
|
|
184
|
+
/** Estimated customer service hours saved by this guide. */
|
|
185
|
+
estimatedHoursSaved?: number;
|
|
186
|
+
/** User guide feedback. The basis for calculating the satisfaction rate. */
|
|
187
|
+
feedback?: {
|
|
188
|
+
total: number;
|
|
189
|
+
positive: number;
|
|
190
|
+
negative: number;
|
|
191
|
+
};
|
|
192
|
+
/** Rate of how many gave feedback that this guide was good vs bad. */
|
|
193
|
+
satisfactionRate?: number;
|
|
194
|
+
/** A somewhat "subjective" rating of this guide based on a weighted combination of these numbers, where 100 is the best. */
|
|
195
|
+
rating?: number;
|
|
196
|
+
};
|
|
197
|
+
type PlayAnalytics = {
|
|
198
|
+
id: Id;
|
|
199
|
+
data: PlayAnalyticsData;
|
|
200
|
+
play: ClientPlay;
|
|
201
|
+
};
|
|
202
|
+
type ClientPlayAnalytics = PlayAnalytics;
|
|
203
|
+
|
|
204
|
+
declare const playAnalyticsMetricsSchema: z.ZodType<PlayAnalyticsMetrics>;
|
|
205
|
+
declare const playAnalyticsGoalSchema: z.ZodType<PlayAnalyticsGoal>;
|
|
206
|
+
declare const playAnalyticsDataSchema: z.ZodType<PlayAnalyticsData>;
|
|
207
|
+
declare const playAnalyticsSchema: z.ZodType<PlayAnalytics>;
|
|
208
|
+
declare const clientPlayAnalyticsSchema: z.ZodType<ClientPlayAnalytics>;
|
|
209
|
+
|
|
210
|
+
export { type ClientPlay, type ClientPlayAnalytics, type ClientPlayFeedback, type ClientPlayStep, type ClientPlayStepTarget, type DatabasePlay, type DatabasePlayFeedback, type DatabasePlayStep, type DatabasePlayStepTarget, type Play, type PlayAnalytics, type PlayAnalyticsData, type PlayAnalyticsGoal, type PlayAnalyticsMetrics, type PlayFeedback, type PlayStep, type PlayStepTarget, clientPlayAnalyticsSchema, clientPlayFeedbackSchema, clientPlaySchema, clientPlayStepSchema, clientPlayStepTargetSchema, playAnalyticsDataSchema, playAnalyticsGoalSchema, playAnalyticsMetricsSchema, playAnalyticsSchema, playFeedbackSchema, playSchema, playStepSchema, playStepTargetSchema };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @maxLength 50
|
|
5
|
+
*/
|
|
6
|
+
type Id = string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @schema string().url().startsWith("https://")
|
|
10
|
+
*/
|
|
11
|
+
type Url = string;
|
|
12
|
+
|
|
13
|
+
type Image = {
|
|
14
|
+
url: Url;
|
|
15
|
+
/**
|
|
16
|
+
* @schema number().int().min(1).optional()
|
|
17
|
+
*/
|
|
18
|
+
width?: number;
|
|
19
|
+
/**
|
|
20
|
+
* @schema number().int().min(1).optional()
|
|
21
|
+
*/
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @maxLength 450
|
|
27
|
+
*/
|
|
28
|
+
type Name = string;
|
|
29
|
+
|
|
30
|
+
type DatabasePlayStepTarget = {
|
|
31
|
+
Id: string;
|
|
32
|
+
RecipeStepId: string;
|
|
33
|
+
X: number;
|
|
34
|
+
Y: number;
|
|
35
|
+
W: number;
|
|
36
|
+
H: number;
|
|
37
|
+
};
|
|
38
|
+
type PlayStepTarget = {
|
|
39
|
+
id: Id;
|
|
40
|
+
playStepId: Id;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
type ClientPlayStepTarget = Omit<PlayStepTarget, 'playStepId'>;
|
|
47
|
+
|
|
48
|
+
type DatabasePlayStep = {
|
|
49
|
+
Id: string;
|
|
50
|
+
RecipeId: string;
|
|
51
|
+
Order: number;
|
|
52
|
+
Description: string;
|
|
53
|
+
ImagePath: string;
|
|
54
|
+
};
|
|
55
|
+
type PlayStep = {
|
|
56
|
+
id: Id;
|
|
57
|
+
playId: Id;
|
|
58
|
+
order: number;
|
|
59
|
+
description?: Name;
|
|
60
|
+
image?: Image;
|
|
61
|
+
};
|
|
62
|
+
type ClientPlayStep = Omit<PlayStep, 'playId' | 'order'> & {
|
|
63
|
+
target?: ClientPlayStepTarget;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type DatabasePlay = {
|
|
67
|
+
Id: string;
|
|
68
|
+
CreatedDate: Date;
|
|
69
|
+
CustomerId: string;
|
|
70
|
+
Locale: string;
|
|
71
|
+
Status?: 'Published' | 'Listed' | 'Private';
|
|
72
|
+
Title: string;
|
|
73
|
+
Slug: string;
|
|
74
|
+
Description: string;
|
|
75
|
+
ImagePath: string;
|
|
76
|
+
IsDeleted: boolean;
|
|
77
|
+
};
|
|
78
|
+
type Play = {
|
|
79
|
+
id: Id;
|
|
80
|
+
organizationId: Id;
|
|
81
|
+
locale: string;
|
|
82
|
+
title?: Name;
|
|
83
|
+
slug: Name;
|
|
84
|
+
description?: Name;
|
|
85
|
+
image?: Image;
|
|
86
|
+
creationDate: Date;
|
|
87
|
+
};
|
|
88
|
+
type ClientPlay = Omit<Play, 'organizationId'> & {
|
|
89
|
+
urls: {
|
|
90
|
+
page: string;
|
|
91
|
+
embed: string;
|
|
92
|
+
};
|
|
93
|
+
stepsCount: number;
|
|
94
|
+
steps?: ClientPlayStep[];
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare const playSchema: z.ZodType<Play>;
|
|
98
|
+
declare const clientPlaySchema: z.ZodType<ClientPlay>;
|
|
99
|
+
|
|
100
|
+
declare const playStepSchema: z.ZodType<PlayStep>;
|
|
101
|
+
declare const clientPlayStepSchema: z.ZodType<ClientPlayStep>;
|
|
102
|
+
|
|
103
|
+
declare const playStepTargetSchema: z.ZodType<PlayStepTarget>;
|
|
104
|
+
declare const clientPlayStepTargetSchema: z.ZodType<ClientPlayStepTarget>;
|
|
105
|
+
|
|
106
|
+
type DatabasePlayFeedback = {
|
|
107
|
+
Id: string;
|
|
108
|
+
RecipeId: string;
|
|
109
|
+
Positive: boolean;
|
|
110
|
+
Comment?: string;
|
|
111
|
+
VoteDate: Date;
|
|
112
|
+
};
|
|
113
|
+
type PlayFeedback = {
|
|
114
|
+
id: Id;
|
|
115
|
+
playId: Id;
|
|
116
|
+
value: boolean;
|
|
117
|
+
content?: string;
|
|
118
|
+
creationDate: Date;
|
|
119
|
+
};
|
|
120
|
+
type ClientPlayFeedback = Omit<PlayFeedback, 'playId'>;
|
|
121
|
+
|
|
122
|
+
declare const playFeedbackSchema: z.ZodType<PlayFeedback>;
|
|
123
|
+
declare const clientPlayFeedbackSchema: z.ZodType<ClientPlayFeedback>;
|
|
124
|
+
|
|
125
|
+
type PlayAnalyticsMetrics = {
|
|
126
|
+
/** Plausible unique visitors */
|
|
127
|
+
visitors: number;
|
|
128
|
+
/** Plausible visits/sessions */
|
|
129
|
+
visits: number;
|
|
130
|
+
/** Plausible pageview events */
|
|
131
|
+
pageviews: number;
|
|
132
|
+
};
|
|
133
|
+
type PlayAnalyticsGoal = {
|
|
134
|
+
/** Plausible total event count */
|
|
135
|
+
total: number;
|
|
136
|
+
/** Plausible unique visitors */
|
|
137
|
+
visitors: number;
|
|
138
|
+
};
|
|
139
|
+
type PlayAnalyticsData = {
|
|
140
|
+
/** Plausible unique visitors */
|
|
141
|
+
visitors?: number;
|
|
142
|
+
/** Plausible visits/sessions */
|
|
143
|
+
visits?: number;
|
|
144
|
+
/** Plausible pageview events */
|
|
145
|
+
pageviews?: number;
|
|
146
|
+
/** Event count of guide starts. */
|
|
147
|
+
started?: PlayAnalyticsGoal;
|
|
148
|
+
/** Event count of guide finishes. */
|
|
149
|
+
finished?: PlayAnalyticsGoal;
|
|
150
|
+
/** Event count of guide restarts. */
|
|
151
|
+
restarted?: PlayAnalyticsGoal;
|
|
152
|
+
/** Event count of guides printed. */
|
|
153
|
+
printed?: PlayAnalyticsGoal;
|
|
154
|
+
/** Step event counts per step. */
|
|
155
|
+
steps?: number[];
|
|
156
|
+
/** Unique step counts per step. */
|
|
157
|
+
visitorsBySteps?: number[];
|
|
158
|
+
/** Metrics by date, where the key is a date string. */
|
|
159
|
+
metricsByDate?: Record<string, Partial<PlayAnalyticsMetrics>>;
|
|
160
|
+
/** Rate of how many started a guide vs viewed it. */
|
|
161
|
+
startRate?: number;
|
|
162
|
+
/** Rate of how many finished a guide vs started it. */
|
|
163
|
+
completionRate?: number;
|
|
164
|
+
/** Rate of how many restarted a guide vs finished it. */
|
|
165
|
+
restartRate?: number;
|
|
166
|
+
/** Rate of how many left at each step, not including step 1. */
|
|
167
|
+
dropoffRate?: number[];
|
|
168
|
+
/** Average dropoff rate across all steps (excluding step 1). */
|
|
169
|
+
averageDropoffRate?: number;
|
|
170
|
+
/** Rate of how many continued to the next step, not including step 1. */
|
|
171
|
+
continuationRate?: number[];
|
|
172
|
+
/** Average continuation rate across all steps (excluding step 1). */
|
|
173
|
+
averageContinuationRate?: number;
|
|
174
|
+
/** Rate of friction at each step (users moving back and forth). */
|
|
175
|
+
frictionRate?: number[];
|
|
176
|
+
/** Average friction rate across all steps. */
|
|
177
|
+
averageFrictionRate?: number;
|
|
178
|
+
/** On average, how many people from the first step are retained. */
|
|
179
|
+
averageRetention?: number;
|
|
180
|
+
/** How far through the guide (in percent) at least half the visitors get. */
|
|
181
|
+
medianProgress?: number;
|
|
182
|
+
/** Estimated number of visitors that were helped by the guide. */
|
|
183
|
+
estimatedVisitorsHelped?: number;
|
|
184
|
+
/** Estimated customer service hours saved by this guide. */
|
|
185
|
+
estimatedHoursSaved?: number;
|
|
186
|
+
/** User guide feedback. The basis for calculating the satisfaction rate. */
|
|
187
|
+
feedback?: {
|
|
188
|
+
total: number;
|
|
189
|
+
positive: number;
|
|
190
|
+
negative: number;
|
|
191
|
+
};
|
|
192
|
+
/** Rate of how many gave feedback that this guide was good vs bad. */
|
|
193
|
+
satisfactionRate?: number;
|
|
194
|
+
/** A somewhat "subjective" rating of this guide based on a weighted combination of these numbers, where 100 is the best. */
|
|
195
|
+
rating?: number;
|
|
196
|
+
};
|
|
197
|
+
type PlayAnalytics = {
|
|
198
|
+
id: Id;
|
|
199
|
+
data: PlayAnalyticsData;
|
|
200
|
+
play: ClientPlay;
|
|
201
|
+
};
|
|
202
|
+
type ClientPlayAnalytics = PlayAnalytics;
|
|
203
|
+
|
|
204
|
+
declare const playAnalyticsMetricsSchema: z.ZodType<PlayAnalyticsMetrics>;
|
|
205
|
+
declare const playAnalyticsGoalSchema: z.ZodType<PlayAnalyticsGoal>;
|
|
206
|
+
declare const playAnalyticsDataSchema: z.ZodType<PlayAnalyticsData>;
|
|
207
|
+
declare const playAnalyticsSchema: z.ZodType<PlayAnalytics>;
|
|
208
|
+
declare const clientPlayAnalyticsSchema: z.ZodType<ClientPlayAnalytics>;
|
|
209
|
+
|
|
210
|
+
export { type ClientPlay, type ClientPlayAnalytics, type ClientPlayFeedback, type ClientPlayStep, type ClientPlayStepTarget, type DatabasePlay, type DatabasePlayFeedback, type DatabasePlayStep, type DatabasePlayStepTarget, type Play, type PlayAnalytics, type PlayAnalyticsData, type PlayAnalyticsGoal, type PlayAnalyticsMetrics, type PlayFeedback, type PlayStep, type PlayStepTarget, clientPlayAnalyticsSchema, clientPlayFeedbackSchema, clientPlaySchema, clientPlayStepSchema, clientPlayStepTargetSchema, playAnalyticsDataSchema, playAnalyticsGoalSchema, playAnalyticsMetricsSchema, playAnalyticsSchema, playFeedbackSchema, playSchema, playStepSchema, playStepTargetSchema };
|
package/{dist → build}/index.js
RENAMED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
var zod = require('zod');
|
|
4
4
|
|
|
5
|
-
// types/play.ts
|
|
5
|
+
// types/play.zod.ts
|
|
6
6
|
var idSchema = zod.z.string().max(50);
|
|
7
|
-
var
|
|
7
|
+
var urlSchema = zod.z.string().url().startsWith("https://");
|
|
8
|
+
|
|
9
|
+
// ../../primitives/image.zod.ts
|
|
8
10
|
var imageSchema = zod.z.object({
|
|
9
|
-
url:
|
|
10
|
-
width: zod.z.number().int().
|
|
11
|
-
height: zod.z.number().int().
|
|
11
|
+
url: urlSchema,
|
|
12
|
+
width: zod.z.number().int().min(1).optional(),
|
|
13
|
+
height: zod.z.number().int().min(1).optional()
|
|
12
14
|
});
|
|
15
|
+
var nameSchema = zod.z.string().max(450);
|
|
13
16
|
var playStepTargetSchema = zod.z.object({
|
|
14
17
|
id: idSchema,
|
|
15
18
|
playStepId: idSchema,
|
|
@@ -22,7 +25,7 @@ var clientPlayStepTargetSchema = playStepTargetSchema.omit({
|
|
|
22
25
|
playStepId: true
|
|
23
26
|
});
|
|
24
27
|
|
|
25
|
-
// types/play-step.ts
|
|
28
|
+
// types/play-step.zod.ts
|
|
26
29
|
var playStepSchema = zod.z.object({
|
|
27
30
|
id: idSchema,
|
|
28
31
|
playId: idSchema,
|
|
@@ -30,9 +33,13 @@ var playStepSchema = zod.z.object({
|
|
|
30
33
|
description: nameSchema.optional(),
|
|
31
34
|
image: imageSchema.optional()
|
|
32
35
|
});
|
|
33
|
-
var clientPlayStepSchema = playStepSchema.omit({ playId: true, order: true }).
|
|
36
|
+
var clientPlayStepSchema = playStepSchema.omit({ playId: true, order: true }).and(
|
|
37
|
+
zod.z.object({
|
|
38
|
+
target: clientPlayStepTargetSchema.optional()
|
|
39
|
+
})
|
|
40
|
+
);
|
|
34
41
|
|
|
35
|
-
// types/play.ts
|
|
42
|
+
// types/play.zod.ts
|
|
36
43
|
var playSchema = zod.z.object({
|
|
37
44
|
id: idSchema,
|
|
38
45
|
organizationId: idSchema,
|
|
@@ -40,18 +47,31 @@ var playSchema = zod.z.object({
|
|
|
40
47
|
title: nameSchema.optional(),
|
|
41
48
|
slug: nameSchema,
|
|
42
49
|
description: nameSchema.optional(),
|
|
43
|
-
image:
|
|
44
|
-
width: zod.z.number().optional(),
|
|
45
|
-
height: zod.z.number().optional(),
|
|
46
|
-
url: nameSchema
|
|
47
|
-
}).optional(),
|
|
50
|
+
image: imageSchema.optional(),
|
|
48
51
|
creationDate: zod.z.date()
|
|
49
52
|
});
|
|
50
|
-
var clientPlaySchema = playSchema.omit({ organizationId: true }).
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
var clientPlaySchema = playSchema.omit({ organizationId: true }).and(
|
|
54
|
+
zod.z.object({
|
|
55
|
+
urls: zod.z.object({
|
|
56
|
+
page: zod.z.string(),
|
|
57
|
+
embed: zod.z.string()
|
|
58
|
+
}),
|
|
59
|
+
stepsCount: zod.z.number(),
|
|
60
|
+
steps: zod.z.array(clientPlayStepSchema).optional()
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// types/play.schemas.ts
|
|
65
|
+
var playSchema2 = playSchema;
|
|
66
|
+
var clientPlaySchema2 = clientPlaySchema;
|
|
67
|
+
|
|
68
|
+
// types/play-step.schemas.ts
|
|
69
|
+
var playStepSchema2 = playStepSchema;
|
|
70
|
+
var clientPlayStepSchema2 = clientPlayStepSchema;
|
|
71
|
+
|
|
72
|
+
// types/play-step-target.schemas.ts
|
|
73
|
+
var playStepTargetSchema2 = playStepTargetSchema;
|
|
74
|
+
var clientPlayStepTargetSchema2 = clientPlayStepTargetSchema;
|
|
55
75
|
var playFeedbackSchema = zod.z.object({
|
|
56
76
|
id: idSchema,
|
|
57
77
|
playId: idSchema,
|
|
@@ -59,70 +79,50 @@ var playFeedbackSchema = zod.z.object({
|
|
|
59
79
|
content: zod.z.string().optional(),
|
|
60
80
|
creationDate: zod.z.date()
|
|
61
81
|
});
|
|
82
|
+
var clientPlayFeedbackSchema = playFeedbackSchema.omit({ playId: true });
|
|
83
|
+
|
|
84
|
+
// types/play-feedback.schemas.ts
|
|
85
|
+
var playFeedbackSchema2 = playFeedbackSchema;
|
|
86
|
+
var clientPlayFeedbackSchema2 = clientPlayFeedbackSchema;
|
|
62
87
|
var playAnalyticsMetricsSchema = zod.z.object({
|
|
63
|
-
/** Plausible unique visitors */
|
|
64
88
|
visitors: zod.z.number(),
|
|
65
|
-
/** Plausible visits/sessions */
|
|
66
89
|
visits: zod.z.number(),
|
|
67
|
-
/** Plausible pageview events */
|
|
68
90
|
pageviews: zod.z.number()
|
|
69
91
|
});
|
|
70
92
|
var playAnalyticsGoalSchema = zod.z.object({
|
|
71
|
-
/** Plausible total event count */
|
|
72
93
|
total: zod.z.number(),
|
|
73
|
-
/** Plausible unique visitors */
|
|
74
94
|
visitors: zod.z.number()
|
|
75
95
|
});
|
|
76
96
|
var playAnalyticsDataSchema = zod.z.object({
|
|
77
|
-
/** Plausible unique visitors */
|
|
78
97
|
visitors: zod.z.number().optional(),
|
|
79
|
-
/** Plausible visits/sessions */
|
|
80
98
|
visits: zod.z.number().optional(),
|
|
81
|
-
/** Plausible pageview events */
|
|
82
99
|
pageviews: zod.z.number().optional(),
|
|
83
|
-
/** Event count of guide starts. */
|
|
84
100
|
started: playAnalyticsGoalSchema.optional(),
|
|
85
|
-
/** Event count of guide finishes. */
|
|
86
101
|
finished: playAnalyticsGoalSchema.optional(),
|
|
87
|
-
/** Event count of guide restarts. */
|
|
88
102
|
restarted: playAnalyticsGoalSchema.optional(),
|
|
89
|
-
/** Event count of guides printed. */
|
|
90
103
|
printed: playAnalyticsGoalSchema.optional(),
|
|
91
|
-
/** Step event counts per step. */
|
|
92
104
|
steps: zod.z.array(zod.z.number()).optional(),
|
|
93
|
-
/** Unique step counts per step. */
|
|
94
105
|
visitorsBySteps: zod.z.array(zod.z.number()).optional(),
|
|
95
|
-
/** Metrics by date, where the key is a date string. */
|
|
96
106
|
metricsByDate: zod.z.record(zod.z.string(), playAnalyticsMetricsSchema.partial()).optional(),
|
|
97
|
-
/** Rate of how many started a guide vs viewed it. */
|
|
98
107
|
startRate: zod.z.number().optional(),
|
|
99
|
-
/** Rate of how many finished a guide vs started it. */
|
|
100
108
|
completionRate: zod.z.number().optional(),
|
|
101
|
-
/** Rate of how many restarted a guide vs finished it. */
|
|
102
109
|
restartRate: zod.z.number().optional(),
|
|
103
|
-
/** Rate of how many left at each step, not including step 1. */
|
|
104
110
|
dropoffRate: zod.z.array(zod.z.number()).optional(),
|
|
105
|
-
/** Average dropoff rate across all steps (excluding step 1). */
|
|
106
111
|
averageDropoffRate: zod.z.number().optional(),
|
|
107
|
-
/** Rate of how many continued to the next step, not including step 1. */
|
|
108
112
|
continuationRate: zod.z.array(zod.z.number()).optional(),
|
|
109
|
-
/** Average continuation rate across all steps (excluding step 1). */
|
|
110
113
|
averageContinuationRate: zod.z.number().optional(),
|
|
111
|
-
/** Rate of friction at each step (users moving back and forth). */
|
|
112
114
|
frictionRate: zod.z.array(zod.z.number()).optional(),
|
|
113
|
-
/** Average friction rate across all steps. */
|
|
114
115
|
averageFrictionRate: zod.z.number().optional(),
|
|
115
|
-
/** On average, how many people from the first step are retained. */
|
|
116
116
|
averageRetention: zod.z.number().optional(),
|
|
117
|
-
/** How far through the guide (in percent) at least half the visitors get. */
|
|
118
117
|
medianProgress: zod.z.number().optional(),
|
|
119
|
-
/** Estimated number of visitors that were helped by the guide. */
|
|
120
118
|
estimatedVisitorsHelped: zod.z.number().optional(),
|
|
121
|
-
/** Estimated customer service hours saved by this guide. */
|
|
122
119
|
estimatedHoursSaved: zod.z.number().optional(),
|
|
123
|
-
|
|
120
|
+
feedback: zod.z.object({
|
|
121
|
+
total: zod.z.number(),
|
|
122
|
+
positive: zod.z.number(),
|
|
123
|
+
negative: zod.z.number()
|
|
124
|
+
}).optional(),
|
|
124
125
|
satisfactionRate: zod.z.number().optional(),
|
|
125
|
-
/** A somewhat "subjective" rating of this guide based on a weighted combination of these numbers, where 100 is the best. */
|
|
126
126
|
rating: zod.z.number().optional()
|
|
127
127
|
});
|
|
128
128
|
var playAnalyticsSchema = zod.z.object({
|
|
@@ -130,17 +130,27 @@ var playAnalyticsSchema = zod.z.object({
|
|
|
130
130
|
data: playAnalyticsDataSchema,
|
|
131
131
|
play: clientPlaySchema
|
|
132
132
|
});
|
|
133
|
+
var clientPlayAnalyticsSchema = playAnalyticsSchema;
|
|
134
|
+
|
|
135
|
+
// types/play-analytics.schemas.ts
|
|
136
|
+
var playAnalyticsMetricsSchema2 = playAnalyticsMetricsSchema;
|
|
137
|
+
var playAnalyticsGoalSchema2 = playAnalyticsGoalSchema;
|
|
138
|
+
var playAnalyticsDataSchema2 = playAnalyticsDataSchema;
|
|
139
|
+
var playAnalyticsSchema2 = playAnalyticsSchema;
|
|
140
|
+
var clientPlayAnalyticsSchema2 = clientPlayAnalyticsSchema;
|
|
133
141
|
|
|
134
|
-
exports.
|
|
135
|
-
exports.
|
|
136
|
-
exports.
|
|
137
|
-
exports.
|
|
138
|
-
exports.
|
|
139
|
-
exports.
|
|
140
|
-
exports.
|
|
141
|
-
exports.
|
|
142
|
-
exports.
|
|
143
|
-
exports.
|
|
144
|
-
exports.
|
|
142
|
+
exports.clientPlayAnalyticsSchema = clientPlayAnalyticsSchema2;
|
|
143
|
+
exports.clientPlayFeedbackSchema = clientPlayFeedbackSchema2;
|
|
144
|
+
exports.clientPlaySchema = clientPlaySchema2;
|
|
145
|
+
exports.clientPlayStepSchema = clientPlayStepSchema2;
|
|
146
|
+
exports.clientPlayStepTargetSchema = clientPlayStepTargetSchema2;
|
|
147
|
+
exports.playAnalyticsDataSchema = playAnalyticsDataSchema2;
|
|
148
|
+
exports.playAnalyticsGoalSchema = playAnalyticsGoalSchema2;
|
|
149
|
+
exports.playAnalyticsMetricsSchema = playAnalyticsMetricsSchema2;
|
|
150
|
+
exports.playAnalyticsSchema = playAnalyticsSchema2;
|
|
151
|
+
exports.playFeedbackSchema = playFeedbackSchema2;
|
|
152
|
+
exports.playSchema = playSchema2;
|
|
153
|
+
exports.playStepSchema = playStepSchema2;
|
|
154
|
+
exports.playStepTargetSchema = playStepTargetSchema2;
|
|
145
155
|
//# sourceMappingURL=index.js.map
|
|
146
156
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../primitives/id.zod.ts","../../../primitives/url.zod.ts","../../../primitives/image.zod.ts","../../../primitives/name.zod.ts","../types/play-step-target.zod.ts","../types/play-step.zod.ts","../types/play.zod.ts","../types/play.schemas.ts","../types/play-step.schemas.ts","../types/play-step-target.schemas.ts","../types/play-feedback.zod.ts","../types/play-feedback.schemas.ts","../types/play-analytics.zod.ts","../types/play-analytics.schemas.ts"],"names":["z","playSchema","clientPlaySchema","playStepSchema","clientPlayStepSchema","playStepTargetSchema","clientPlayStepTargetSchema","playFeedbackSchema","clientPlayFeedbackSchema","playAnalyticsMetricsSchema","playAnalyticsGoalSchema","playAnalyticsDataSchema","playAnalyticsSchema","clientPlayAnalyticsSchema"],"mappings":";;;;;AAGO,IAAM,QAAA,GAAWA,KAAA,CAAE,MAAA,EAAO,CAAE,IAAI,EAAE,CAAA;ACAlC,IAAM,YAAYA,KAAAA,CAAE,MAAA,GAAS,GAAA,EAAI,CAAE,WAAW,UAAU,CAAA;;;ACExD,IAAM,WAAA,GAAcA,MAAE,MAAA,CAAO;AAAA,EAClC,GAAA,EAAK,SAAA;AAAA,EACL,KAAA,EAAOA,MAAE,MAAA,EAAO,CAAE,KAAI,CAAE,GAAA,CAAI,CAAC,CAAA,CAAE,QAAA,EAAS;AAAA,EACxC,MAAA,EAAQA,MAAE,MAAA,EAAO,CAAE,KAAI,CAAE,GAAA,CAAI,CAAC,CAAA,CAAE,QAAA;AAClC,CAAC,CAAA;ACNM,IAAM,UAAA,GAAaA,KAAAA,CAAE,MAAA,EAAO,CAAE,IAAI,GAAG,CAAA;ACErC,IAAM,oBAAA,GAAuBA,MAAE,MAAA,CAAO;AAAA,EAC3C,EAAA,EAAI,QAAA;AAAA,EACJ,UAAA,EAAY,QAAA;AAAA,EACZ,CAAA,EAAGA,MAAE,MAAA,EAAO;AAAA,EACZ,CAAA,EAAGA,MAAE,MAAA,EAAO;AAAA,EACZ,KAAA,EAAOA,MAAE,MAAA,EAAO;AAAA,EAChB,MAAA,EAAQA,MAAE,MAAA;AACZ,CAAC,CAAA;AAEM,IAAM,0BAAA,GAA6B,qBAAqB,IAAA,CAAK;AAAA,EAClE,UAAA,EAAY;AACd,CAAC,CAAA;;;ACRM,IAAM,cAAA,GAAiBA,MAAE,MAAA,CAAO;A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QAAA,EAAS;AAAA,EAC7C,mBAAA,EAAqBA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACzC,QAAA,EAAUA,MACP,MAAA,CAAO;AAAA,IACN,KAAA,EAAOA,MAAE,MAAA,EAAO;AAAA,IAChB,QAAA,EAAUA,MAAE,MAAA,EAAO;AAAA,IACnB,QAAA,EAAUA,MAAE,MAAA;AAAO,GACpB,EACA,QAAA,EAAS;AAAA,EACZ,gBAAA,EAAkBA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACtC,MAAA,EAAQA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AACrB,CAAC,CAAA;AAEM,IAAM,mBAAA,GAAsBA,MAAE,MAAA,CAAO;AAAA,EAC1C,EAAA,EAAI,QAAA;AAAA,EACJ,IAAA,EAAM,uBAAA;AAAA,EACN,IAAA,EAAM;AACR,CAAC,CAAA;AAEM,IAAM,yBAAA,GAA4B,mBAAA;;;AC3ClC,IAAMS,2BAAAA,GACX;AACK,IAAMC,wBAAAA,GACX;AACK,IAAMC,wBAAAA,GACX;AACK,IAAMC,oBAAAA,GACX;AACK,IAAMC,0BAAAA,GACX","file":"index.js","sourcesContent":["// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const idSchema = z.string().max(50);\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const urlSchema = z.string().url().startsWith('https://');\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {urlSchema} from './url.zod';\n\nexport const imageSchema = z.object({\n url: urlSchema,\n width: z.number().int().min(1).optional(),\n height: z.number().int().min(1).optional(),\n});\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const nameSchema = z.string().max(450);\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\n\nexport const playStepTargetSchema = z.object({\n id: idSchema,\n playStepId: idSchema,\n x: z.number(),\n y: z.number(),\n width: z.number(),\n height: z.number(),\n});\n\nexport const clientPlayStepTargetSchema = playStepTargetSchema.omit({\n playStepId: true,\n});\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {nameSchema} from './../../../primitives/name.zod';\nimport {imageSchema} from './../../../primitives/image.zod';\nimport {clientPlayStepTargetSchema} from './play-step-target.zod';\n\nexport const playStepSchema = z.object({\n id: idSchema,\n playId: idSchema,\n order: z.number(),\n description: nameSchema.optional(),\n image: imageSchema.optional(),\n});\n\nexport const clientPlayStepSchema = playStepSchema\n .omit({playId: true, order: true})\n .and(\n z.object({\n target: clientPlayStepTargetSchema.optional(),\n })\n );\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {imageSchema} from './../../../primitives/image.zod';\nimport {nameSchema} from './../../../primitives/name.zod';\nimport {clientPlayStepSchema} from './play-step.zod';\n\nexport const playSchema = z.object({\n id: idSchema,\n organizationId: idSchema,\n locale: z.string(),\n title: nameSchema.optional(),\n slug: nameSchema,\n description: nameSchema.optional(),\n image: imageSchema.optional(),\n creationDate: z.date(),\n});\n\nexport const clientPlaySchema = playSchema.omit({organizationId: true}).and(\n z.object({\n urls: z.object({\n page: z.string(),\n embed: z.string(),\n }),\n stepsCount: z.number(),\n steps: z.array(clientPlayStepSchema).optional(),\n })\n);\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Play, type ClientPlay} from './play';\nimport {\n playSchema as playSchema_,\n clientPlaySchema as clientPlaySchema_,\n} from './play.zod';\n\nexport const playSchema: z.ZodType<Play> = playSchema_;\nexport const clientPlaySchema: z.ZodType<ClientPlay> = clientPlaySchema_;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type PlayStep, type ClientPlayStep} from './play-step';\nimport {\n playStepSchema as playStepSchema_,\n clientPlayStepSchema as clientPlayStepSchema_,\n} from './play-step.zod';\n\nexport const playStepSchema: z.ZodType<PlayStep> = playStepSchema_;\nexport const clientPlayStepSchema: z.ZodType<ClientPlayStep> =\n clientPlayStepSchema_;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {\n type PlayStepTarget,\n type ClientPlayStepTarget,\n} from './play-step-target';\nimport {\n playStepTargetSchema as playStepTargetSchema_,\n clientPlayStepTargetSchema as clientPlayStepTargetSchema_,\n} from './play-step-target.zod';\n\nexport const playStepTargetSchema: z.ZodType<PlayStepTarget> =\n playStepTargetSchema_;\nexport const clientPlayStepTargetSchema: z.ZodType<ClientPlayStepTarget> =\n clientPlayStepTargetSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\n\nexport const playFeedbackSchema = z.object({\n id: idSchema,\n playId: idSchema,\n value: z.boolean(),\n content: z.string().optional(),\n creationDate: z.date(),\n});\n\nexport const clientPlayFeedbackSchema = playFeedbackSchema.omit({playId: true});\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type PlayFeedback, type ClientPlayFeedback} from './play-feedback';\nimport {\n playFeedbackSchema as playFeedbackSchema_,\n clientPlayFeedbackSchema as clientPlayFeedbackSchema_,\n} from './play-feedback.zod';\n\nexport const playFeedbackSchema: z.ZodType<PlayFeedback> = playFeedbackSchema_;\nexport const clientPlayFeedbackSchema: z.ZodType<ClientPlayFeedback> =\n clientPlayFeedbackSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {clientPlaySchema} from './play.zod';\n\nexport const playAnalyticsMetricsSchema = z.object({\n visitors: z.number(),\n visits: z.number(),\n pageviews: z.number(),\n});\n\nexport const playAnalyticsGoalSchema = z.object({\n total: z.number(),\n visitors: z.number(),\n});\n\nexport const playAnalyticsDataSchema = z.object({\n visitors: z.number().optional(),\n visits: z.number().optional(),\n pageviews: z.number().optional(),\n started: playAnalyticsGoalSchema.optional(),\n finished: playAnalyticsGoalSchema.optional(),\n restarted: playAnalyticsGoalSchema.optional(),\n printed: playAnalyticsGoalSchema.optional(),\n steps: z.array(z.number()).optional(),\n visitorsBySteps: z.array(z.number()).optional(),\n metricsByDate: z\n .record(z.string(), playAnalyticsMetricsSchema.partial())\n .optional(),\n startRate: z.number().optional(),\n completionRate: z.number().optional(),\n restartRate: z.number().optional(),\n dropoffRate: z.array(z.number()).optional(),\n averageDropoffRate: z.number().optional(),\n continuationRate: z.array(z.number()).optional(),\n averageContinuationRate: z.number().optional(),\n frictionRate: z.array(z.number()).optional(),\n averageFrictionRate: z.number().optional(),\n averageRetention: z.number().optional(),\n medianProgress: z.number().optional(),\n estimatedVisitorsHelped: z.number().optional(),\n estimatedHoursSaved: z.number().optional(),\n feedback: z\n .object({\n total: z.number(),\n positive: z.number(),\n negative: z.number(),\n })\n .optional(),\n satisfactionRate: z.number().optional(),\n rating: z.number().optional(),\n});\n\nexport const playAnalyticsSchema = z.object({\n id: idSchema,\n data: playAnalyticsDataSchema,\n play: clientPlaySchema,\n});\n\nexport const clientPlayAnalyticsSchema = playAnalyticsSchema;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {\n type PlayAnalyticsMetrics,\n type PlayAnalyticsGoal,\n type PlayAnalyticsData,\n type PlayAnalytics,\n type ClientPlayAnalytics,\n} from './play-analytics';\nimport {\n playAnalyticsMetricsSchema as playAnalyticsMetricsSchema_,\n playAnalyticsGoalSchema as playAnalyticsGoalSchema_,\n playAnalyticsDataSchema as playAnalyticsDataSchema_,\n playAnalyticsSchema as playAnalyticsSchema_,\n clientPlayAnalyticsSchema as clientPlayAnalyticsSchema_,\n} from './play-analytics.zod';\n\nexport const playAnalyticsMetricsSchema: z.ZodType<PlayAnalyticsMetrics> =\n playAnalyticsMetricsSchema_;\nexport const playAnalyticsGoalSchema: z.ZodType<PlayAnalyticsGoal> =\n playAnalyticsGoalSchema_;\nexport const playAnalyticsDataSchema: z.ZodType<PlayAnalyticsData> =\n playAnalyticsDataSchema_;\nexport const playAnalyticsSchema: z.ZodType<PlayAnalytics> =\n playAnalyticsSchema_;\nexport const clientPlayAnalyticsSchema: z.ZodType<ClientPlayAnalytics> =\n clientPlayAnalyticsSchema_;\n"]}
|