@contentful/optimization-api-schemas 0.1.0-alpha
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/LICENSE +21 -0
- package/README.md +127 -0
- package/dist/contentful/AudienceEntry.d.ts +73 -0
- package/dist/contentful/AudienceEntry.d.ts.map +1 -0
- package/dist/contentful/AudienceEntry.js +41 -0
- package/dist/contentful/AudienceEntry.js.map +1 -0
- package/dist/contentful/CtflEntry.d.ts +206 -0
- package/dist/contentful/CtflEntry.d.ts.map +1 -0
- package/dist/contentful/CtflEntry.js +122 -0
- package/dist/contentful/CtflEntry.js.map +1 -0
- package/dist/contentful/MergeTagEntry.d.ts +68 -0
- package/dist/contentful/MergeTagEntry.d.ts.map +1 -0
- package/dist/contentful/MergeTagEntry.js +38 -0
- package/dist/contentful/MergeTagEntry.js.map +1 -0
- package/dist/contentful/PersonalizationConfig.d.ts +437 -0
- package/dist/contentful/PersonalizationConfig.d.ts.map +1 -0
- package/dist/contentful/PersonalizationConfig.js +164 -0
- package/dist/contentful/PersonalizationConfig.js.map +1 -0
- package/dist/contentful/PersonalizationEntry.d.ts +541 -0
- package/dist/contentful/PersonalizationEntry.d.ts.map +1 -0
- package/dist/contentful/PersonalizationEntry.js +95 -0
- package/dist/contentful/PersonalizationEntry.js.map +1 -0
- package/dist/contentful/PersonalizedEntry.d.ts +244 -0
- package/dist/contentful/PersonalizedEntry.d.ts.map +1 -0
- package/dist/contentful/PersonalizedEntry.js +27 -0
- package/dist/contentful/PersonalizedEntry.js.map +1 -0
- package/dist/contentful/index.d.ts +7 -0
- package/dist/contentful/index.d.ts.map +1 -0
- package/dist/contentful/index.js +7 -0
- package/dist/contentful/index.js.map +1 -0
- package/dist/experience/BatchExperienceResponse.d.ts +110 -0
- package/dist/experience/BatchExperienceResponse.d.ts.map +1 -0
- package/dist/experience/BatchExperienceResponse.js +25 -0
- package/dist/experience/BatchExperienceResponse.js.map +1 -0
- package/dist/experience/ExperienceRequest.d.ts +440 -0
- package/dist/experience/ExperienceRequest.d.ts.map +1 -0
- package/dist/experience/ExperienceRequest.js +36 -0
- package/dist/experience/ExperienceRequest.js.map +1 -0
- package/dist/experience/ExperienceResponse.d.ts +173 -0
- package/dist/experience/ExperienceResponse.d.ts.map +1 -0
- package/dist/experience/ExperienceResponse.js +38 -0
- package/dist/experience/ExperienceResponse.js.map +1 -0
- package/dist/experience/ResponseEnvelope.d.ts +35 -0
- package/dist/experience/ResponseEnvelope.d.ts.map +1 -0
- package/dist/experience/ResponseEnvelope.js +31 -0
- package/dist/experience/ResponseEnvelope.js.map +1 -0
- package/dist/experience/change/Change.d.ts +138 -0
- package/dist/experience/change/Change.d.ts.map +1 -0
- package/dist/experience/change/Change.js +102 -0
- package/dist/experience/change/Change.js.map +1 -0
- package/dist/experience/change/index.d.ts +2 -0
- package/dist/experience/change/index.d.ts.map +1 -0
- package/dist/experience/change/index.js +2 -0
- package/dist/experience/change/index.js.map +1 -0
- package/dist/experience/event/AliasEvent.d.ts +73 -0
- package/dist/experience/event/AliasEvent.d.ts.map +1 -0
- package/dist/experience/event/AliasEvent.js +20 -0
- package/dist/experience/event/AliasEvent.js.map +1 -0
- package/dist/experience/event/BatchExperienceEvent.d.ts +820 -0
- package/dist/experience/event/BatchExperienceEvent.d.ts.map +1 -0
- package/dist/experience/event/BatchExperienceEvent.js +37 -0
- package/dist/experience/event/BatchExperienceEvent.js.map +1 -0
- package/dist/experience/event/ComponentViewEvent.d.ts +75 -0
- package/dist/experience/event/ComponentViewEvent.d.ts.map +1 -0
- package/dist/experience/event/ComponentViewEvent.js +43 -0
- package/dist/experience/event/ComponentViewEvent.js.map +1 -0
- package/dist/experience/event/ExperienceEvent.d.ts +810 -0
- package/dist/experience/event/ExperienceEvent.d.ts.map +1 -0
- package/dist/experience/event/ExperienceEvent.js +29 -0
- package/dist/experience/event/ExperienceEvent.js.map +1 -0
- package/dist/experience/event/GroupEvent.d.ts +73 -0
- package/dist/experience/event/GroupEvent.d.ts.map +1 -0
- package/dist/experience/event/GroupEvent.js +20 -0
- package/dist/experience/event/GroupEvent.js.map +1 -0
- package/dist/experience/event/IdentifyEvent.d.ts +71 -0
- package/dist/experience/event/IdentifyEvent.d.ts.map +1 -0
- package/dist/experience/event/IdentifyEvent.js +24 -0
- package/dist/experience/event/IdentifyEvent.js.map +1 -0
- package/dist/experience/event/PageViewEvent.d.ts +128 -0
- package/dist/experience/event/PageViewEvent.d.ts.map +1 -0
- package/dist/experience/event/PageViewEvent.js +44 -0
- package/dist/experience/event/PageViewEvent.js.map +1 -0
- package/dist/experience/event/ScreenViewEvent.d.ts +111 -0
- package/dist/experience/event/ScreenViewEvent.d.ts.map +1 -0
- package/dist/experience/event/ScreenViewEvent.js +43 -0
- package/dist/experience/event/ScreenViewEvent.js.map +1 -0
- package/dist/experience/event/TrackEvent.d.ts +73 -0
- package/dist/experience/event/TrackEvent.d.ts.map +1 -0
- package/dist/experience/event/TrackEvent.js +27 -0
- package/dist/experience/event/TrackEvent.js.map +1 -0
- package/dist/experience/event/UniversalEventProperties.d.ts +175 -0
- package/dist/experience/event/UniversalEventProperties.d.ts.map +1 -0
- package/dist/experience/event/UniversalEventProperties.js +100 -0
- package/dist/experience/event/UniversalEventProperties.js.map +1 -0
- package/dist/experience/event/index.d.ts +12 -0
- package/dist/experience/event/index.d.ts.map +1 -0
- package/dist/experience/event/index.js +12 -0
- package/dist/experience/event/index.js.map +1 -0
- package/dist/experience/event/properties/App.d.ts +25 -0
- package/dist/experience/event/properties/App.d.ts.map +1 -0
- package/dist/experience/event/properties/App.js +21 -0
- package/dist/experience/event/properties/App.js.map +1 -0
- package/dist/experience/event/properties/Campaign.d.ts +34 -0
- package/dist/experience/event/properties/Campaign.d.ts.map +1 -0
- package/dist/experience/event/properties/Campaign.js +30 -0
- package/dist/experience/event/properties/Campaign.js.map +1 -0
- package/dist/experience/event/properties/Channel.d.ts +17 -0
- package/dist/experience/event/properties/Channel.d.ts.map +1 -0
- package/dist/experience/event/properties/Channel.js +13 -0
- package/dist/experience/event/properties/Channel.js.map +1 -0
- package/dist/experience/event/properties/Dictionary.d.ts +13 -0
- package/dist/experience/event/properties/Dictionary.d.ts.map +1 -0
- package/dist/experience/event/properties/Dictionary.js +9 -0
- package/dist/experience/event/properties/Dictionary.js.map +1 -0
- package/dist/experience/event/properties/GeoLocation.d.ts +66 -0
- package/dist/experience/event/properties/GeoLocation.d.ts.map +1 -0
- package/dist/experience/event/properties/GeoLocation.js +76 -0
- package/dist/experience/event/properties/GeoLocation.js.map +1 -0
- package/dist/experience/event/properties/Library.d.ts +22 -0
- package/dist/experience/event/properties/Library.d.ts.map +1 -0
- package/dist/experience/event/properties/Library.js +18 -0
- package/dist/experience/event/properties/Library.js.map +1 -0
- package/dist/experience/event/properties/Page.d.ts +39 -0
- package/dist/experience/event/properties/Page.d.ts.map +1 -0
- package/dist/experience/event/properties/Page.js +36 -0
- package/dist/experience/event/properties/Page.js.map +1 -0
- package/dist/experience/event/properties/Properties.d.ts +13 -0
- package/dist/experience/event/properties/Properties.d.ts.map +1 -0
- package/dist/experience/event/properties/Properties.js +9 -0
- package/dist/experience/event/properties/Properties.js.map +1 -0
- package/dist/experience/event/properties/Screen.d.ts +19 -0
- package/dist/experience/event/properties/Screen.d.ts.map +1 -0
- package/dist/experience/event/properties/Screen.js +15 -0
- package/dist/experience/event/properties/Screen.js.map +1 -0
- package/dist/experience/event/properties/Traits.d.ts +14 -0
- package/dist/experience/event/properties/Traits.d.ts.map +1 -0
- package/dist/experience/event/properties/Traits.js +10 -0
- package/dist/experience/event/properties/Traits.js.map +1 -0
- package/dist/experience/event/properties/index.d.ts +11 -0
- package/dist/experience/event/properties/index.d.ts.map +1 -0
- package/dist/experience/event/properties/index.js +11 -0
- package/dist/experience/event/properties/index.js.map +1 -0
- package/dist/experience/index.d.ts +8 -0
- package/dist/experience/index.d.ts.map +1 -0
- package/dist/experience/index.js +8 -0
- package/dist/experience/index.js.map +1 -0
- package/dist/experience/personalization/SelectedPersonalization.d.ts +86 -0
- package/dist/experience/personalization/SelectedPersonalization.d.ts.map +1 -0
- package/dist/experience/personalization/SelectedPersonalization.js +48 -0
- package/dist/experience/personalization/SelectedPersonalization.js.map +1 -0
- package/dist/experience/personalization/index.d.ts +2 -0
- package/dist/experience/personalization/index.d.ts.map +1 -0
- package/dist/experience/personalization/index.js +2 -0
- package/dist/experience/personalization/index.js.map +1 -0
- package/dist/experience/profile/Profile.d.ts +104 -0
- package/dist/experience/profile/Profile.d.ts.map +1 -0
- package/dist/experience/profile/Profile.js +72 -0
- package/dist/experience/profile/Profile.js.map +1 -0
- package/dist/experience/profile/index.d.ts +3 -0
- package/dist/experience/profile/index.d.ts.map +1 -0
- package/dist/experience/profile/index.js +3 -0
- package/dist/experience/profile/index.js.map +1 -0
- package/dist/experience/profile/properties/SessionStatistics.d.ts +60 -0
- package/dist/experience/profile/properties/SessionStatistics.d.ts.map +1 -0
- package/dist/experience/profile/properties/SessionStatistics.js +50 -0
- package/dist/experience/profile/properties/SessionStatistics.js.map +1 -0
- package/dist/experience/profile/properties/index.d.ts +2 -0
- package/dist/experience/profile/properties/index.d.ts.map +1 -0
- package/dist/experience/profile/properties/index.js +2 -0
- package/dist/experience/profile/properties/index.js.map +1 -0
- package/dist/index.cjs +684 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +425 -0
- package/dist/index.mjs.map +1 -0
- package/dist/insights/event/BatchInsightsEvent.d.ts +173 -0
- package/dist/insights/event/BatchInsightsEvent.d.ts.map +1 -0
- package/dist/insights/event/BatchInsightsEvent.js +32 -0
- package/dist/insights/event/BatchInsightsEvent.js.map +1 -0
- package/dist/insights/event/InsightsEvent.d.ts +145 -0
- package/dist/insights/event/InsightsEvent.d.ts.map +1 -0
- package/dist/insights/event/InsightsEvent.js +16 -0
- package/dist/insights/event/InsightsEvent.js.map +1 -0
- package/dist/insights/event/index.d.ts +3 -0
- package/dist/insights/event/index.d.ts.map +1 -0
- package/dist/insights/event/index.js +3 -0
- package/dist/insights/event/index.js.map +1 -0
- package/dist/insights/index.d.ts +2 -0
- package/dist/insights/index.d.ts.map +1 -0
- package/dist/insights/index.js +2 -0
- package/dist/insights/index.js.map +1 -0
- package/package.json +25 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing optional configuration for an experience request.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* These options can be used to enable or filter specific features when
|
|
7
|
+
* evaluating experiences.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ExperienceRequestOptions: z.ZodMiniObject<{
|
|
10
|
+
/**
|
|
11
|
+
* Features or capabilities to enable for this request.
|
|
12
|
+
*/
|
|
13
|
+
features: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/**
|
|
16
|
+
* TypeScript type inferred from {@link ExperienceRequestOptions}.
|
|
17
|
+
*/
|
|
18
|
+
export type ExperienceRequestOptions = z.infer<typeof ExperienceRequestOptions>;
|
|
19
|
+
/**
|
|
20
|
+
* Zod schema describing the data payload for an experience request.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Contains the list of events to be evaluated plus optional request
|
|
24
|
+
* configuration.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ExperienceRequestData: z.ZodMiniObject<{
|
|
27
|
+
/**
|
|
28
|
+
* Experience events that should be evaluated by the Experience API.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Must contain at least one event.
|
|
32
|
+
*/
|
|
33
|
+
events: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
34
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
35
|
+
context: z.ZodMiniObject<{
|
|
36
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
37
|
+
name: z.ZodMiniString<string>;
|
|
38
|
+
version: z.ZodMiniString<string>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
campaign: z.ZodMiniObject<{
|
|
41
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
42
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
gdpr: z.ZodMiniObject<{
|
|
48
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
library: z.ZodMiniObject<{
|
|
51
|
+
name: z.ZodMiniString<string>;
|
|
52
|
+
version: z.ZodMiniString<string>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
locale: z.ZodMiniString<string>;
|
|
55
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
56
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
57
|
+
latitude: z.ZodMiniNumber<number>;
|
|
58
|
+
longitude: z.ZodMiniNumber<number>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
61
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
62
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
63
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
64
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
65
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
66
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
67
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
70
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
71
|
+
path: z.ZodMiniString<string>;
|
|
72
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
73
|
+
referrer: z.ZodMiniString<string>;
|
|
74
|
+
search: z.ZodMiniString<string>;
|
|
75
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
76
|
+
url: z.ZodMiniString<string>;
|
|
77
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
78
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
79
|
+
name: z.ZodMiniString<string>;
|
|
80
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
messageId: z.ZodMiniString<string>;
|
|
83
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
84
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
85
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
86
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
87
|
+
type: z.ZodMiniLiteral<"alias">;
|
|
88
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
89
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
90
|
+
context: z.ZodMiniObject<{
|
|
91
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
92
|
+
name: z.ZodMiniString<string>;
|
|
93
|
+
version: z.ZodMiniString<string>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
campaign: z.ZodMiniObject<{
|
|
96
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
97
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
98
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
99
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
100
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
gdpr: z.ZodMiniObject<{
|
|
103
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
library: z.ZodMiniObject<{
|
|
106
|
+
name: z.ZodMiniString<string>;
|
|
107
|
+
version: z.ZodMiniString<string>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
locale: z.ZodMiniString<string>;
|
|
110
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
111
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
112
|
+
latitude: z.ZodMiniNumber<number>;
|
|
113
|
+
longitude: z.ZodMiniNumber<number>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
116
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
117
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
118
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
119
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
120
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
121
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
122
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
125
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
126
|
+
path: z.ZodMiniString<string>;
|
|
127
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
128
|
+
referrer: z.ZodMiniString<string>;
|
|
129
|
+
search: z.ZodMiniString<string>;
|
|
130
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
|
+
url: z.ZodMiniString<string>;
|
|
132
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
133
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
134
|
+
name: z.ZodMiniString<string>;
|
|
135
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
messageId: z.ZodMiniString<string>;
|
|
138
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
139
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
140
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
141
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
142
|
+
type: z.ZodMiniLiteral<"component">;
|
|
143
|
+
componentType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"Entry">, z.ZodMiniLiteral<"Variable">]>;
|
|
144
|
+
componentId: z.ZodMiniString<string>;
|
|
145
|
+
experienceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
146
|
+
variantIndex: z.ZodMiniNumber<number>;
|
|
147
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
148
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
149
|
+
context: z.ZodMiniObject<{
|
|
150
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
151
|
+
name: z.ZodMiniString<string>;
|
|
152
|
+
version: z.ZodMiniString<string>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
campaign: z.ZodMiniObject<{
|
|
155
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
156
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
157
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
158
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
159
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
gdpr: z.ZodMiniObject<{
|
|
162
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
library: z.ZodMiniObject<{
|
|
165
|
+
name: z.ZodMiniString<string>;
|
|
166
|
+
version: z.ZodMiniString<string>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
locale: z.ZodMiniString<string>;
|
|
169
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
170
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
171
|
+
latitude: z.ZodMiniNumber<number>;
|
|
172
|
+
longitude: z.ZodMiniNumber<number>;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
175
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
176
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
177
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
178
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
179
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
180
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
181
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
184
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
185
|
+
path: z.ZodMiniString<string>;
|
|
186
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
187
|
+
referrer: z.ZodMiniString<string>;
|
|
188
|
+
search: z.ZodMiniString<string>;
|
|
189
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
190
|
+
url: z.ZodMiniString<string>;
|
|
191
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
192
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
193
|
+
name: z.ZodMiniString<string>;
|
|
194
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
messageId: z.ZodMiniString<string>;
|
|
197
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
198
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
199
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
200
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
201
|
+
type: z.ZodMiniLiteral<"group">;
|
|
202
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
203
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
204
|
+
context: z.ZodMiniObject<{
|
|
205
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
206
|
+
name: z.ZodMiniString<string>;
|
|
207
|
+
version: z.ZodMiniString<string>;
|
|
208
|
+
}, z.core.$strip>>;
|
|
209
|
+
campaign: z.ZodMiniObject<{
|
|
210
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
211
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
212
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
213
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
214
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
gdpr: z.ZodMiniObject<{
|
|
217
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
library: z.ZodMiniObject<{
|
|
220
|
+
name: z.ZodMiniString<string>;
|
|
221
|
+
version: z.ZodMiniString<string>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
locale: z.ZodMiniString<string>;
|
|
224
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
225
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
226
|
+
latitude: z.ZodMiniNumber<number>;
|
|
227
|
+
longitude: z.ZodMiniNumber<number>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
230
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
231
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
232
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
233
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
234
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
235
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
236
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
237
|
+
}, z.core.$strip>>;
|
|
238
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
239
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
240
|
+
path: z.ZodMiniString<string>;
|
|
241
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
242
|
+
referrer: z.ZodMiniString<string>;
|
|
243
|
+
search: z.ZodMiniString<string>;
|
|
244
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
245
|
+
url: z.ZodMiniString<string>;
|
|
246
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
247
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
248
|
+
name: z.ZodMiniString<string>;
|
|
249
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
messageId: z.ZodMiniString<string>;
|
|
252
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
253
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
254
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
255
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
256
|
+
type: z.ZodMiniLiteral<"identify">;
|
|
257
|
+
traits: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>;
|
|
258
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
259
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
260
|
+
messageId: z.ZodMiniString<string>;
|
|
261
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
262
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
263
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
264
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
265
|
+
type: z.ZodMiniLiteral<"page">;
|
|
266
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
267
|
+
properties: z.ZodMiniObject<{
|
|
268
|
+
path: z.ZodMiniString<string>;
|
|
269
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
270
|
+
referrer: z.ZodMiniString<string>;
|
|
271
|
+
search: z.ZodMiniString<string>;
|
|
272
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
273
|
+
url: z.ZodMiniString<string>;
|
|
274
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
275
|
+
context: z.ZodMiniObject<{
|
|
276
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
277
|
+
name: z.ZodMiniString<string>;
|
|
278
|
+
version: z.ZodMiniString<string>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
campaign: z.ZodMiniObject<{
|
|
281
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
282
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
283
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
284
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
285
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
gdpr: z.ZodMiniObject<{
|
|
288
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
library: z.ZodMiniObject<{
|
|
291
|
+
name: z.ZodMiniString<string>;
|
|
292
|
+
version: z.ZodMiniString<string>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
locale: z.ZodMiniString<string>;
|
|
295
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
296
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
297
|
+
latitude: z.ZodMiniNumber<number>;
|
|
298
|
+
longitude: z.ZodMiniNumber<number>;
|
|
299
|
+
}, z.core.$strip>>;
|
|
300
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
301
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
302
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
303
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
304
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
305
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
306
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
307
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
310
|
+
page: z.ZodMiniObject<{
|
|
311
|
+
path: z.ZodMiniString<string>;
|
|
312
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
313
|
+
referrer: z.ZodMiniString<string>;
|
|
314
|
+
search: z.ZodMiniString<string>;
|
|
315
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
316
|
+
url: z.ZodMiniString<string>;
|
|
317
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
320
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
321
|
+
messageId: z.ZodMiniString<string>;
|
|
322
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
323
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
324
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
325
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
326
|
+
type: z.ZodMiniLiteral<"screen">;
|
|
327
|
+
name: z.ZodMiniString<string>;
|
|
328
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>>;
|
|
329
|
+
context: z.ZodMiniObject<{
|
|
330
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
331
|
+
name: z.ZodMiniString<string>;
|
|
332
|
+
version: z.ZodMiniString<string>;
|
|
333
|
+
}, z.core.$strip>>;
|
|
334
|
+
campaign: z.ZodMiniObject<{
|
|
335
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
336
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
337
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
338
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
339
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
gdpr: z.ZodMiniObject<{
|
|
342
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
library: z.ZodMiniObject<{
|
|
345
|
+
name: z.ZodMiniString<string>;
|
|
346
|
+
version: z.ZodMiniString<string>;
|
|
347
|
+
}, z.core.$strip>;
|
|
348
|
+
locale: z.ZodMiniString<string>;
|
|
349
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
350
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
351
|
+
latitude: z.ZodMiniNumber<number>;
|
|
352
|
+
longitude: z.ZodMiniNumber<number>;
|
|
353
|
+
}, z.core.$strip>>;
|
|
354
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
355
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
356
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
357
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
358
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
359
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
360
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
361
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
362
|
+
}, z.core.$strip>>;
|
|
363
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
364
|
+
screen: z.ZodMiniObject<{
|
|
365
|
+
name: z.ZodMiniString<string>;
|
|
366
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
369
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
370
|
+
context: z.ZodMiniObject<{
|
|
371
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
372
|
+
name: z.ZodMiniString<string>;
|
|
373
|
+
version: z.ZodMiniString<string>;
|
|
374
|
+
}, z.core.$strip>>;
|
|
375
|
+
campaign: z.ZodMiniObject<{
|
|
376
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
377
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
378
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
379
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
380
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
gdpr: z.ZodMiniObject<{
|
|
383
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
library: z.ZodMiniObject<{
|
|
386
|
+
name: z.ZodMiniString<string>;
|
|
387
|
+
version: z.ZodMiniString<string>;
|
|
388
|
+
}, z.core.$strip>;
|
|
389
|
+
locale: z.ZodMiniString<string>;
|
|
390
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
391
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
392
|
+
latitude: z.ZodMiniNumber<number>;
|
|
393
|
+
longitude: z.ZodMiniNumber<number>;
|
|
394
|
+
}, z.core.$strip>>;
|
|
395
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
396
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
397
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
398
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
399
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
400
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
401
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
402
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
403
|
+
}, z.core.$strip>>;
|
|
404
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
405
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
406
|
+
path: z.ZodMiniString<string>;
|
|
407
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
408
|
+
referrer: z.ZodMiniString<string>;
|
|
409
|
+
search: z.ZodMiniString<string>;
|
|
410
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
411
|
+
url: z.ZodMiniString<string>;
|
|
412
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
413
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
414
|
+
name: z.ZodMiniString<string>;
|
|
415
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
416
|
+
}, z.core.$strip>;
|
|
417
|
+
messageId: z.ZodMiniString<string>;
|
|
418
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
419
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
420
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
421
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
422
|
+
type: z.ZodMiniLiteral<"track">;
|
|
423
|
+
event: z.ZodMiniString<string>;
|
|
424
|
+
properties: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>;
|
|
425
|
+
}, z.core.$strip>], "type">>;
|
|
426
|
+
/**
|
|
427
|
+
* Optional configuration for this experience request.
|
|
428
|
+
*/
|
|
429
|
+
options: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
430
|
+
/**
|
|
431
|
+
* Features or capabilities to enable for this request.
|
|
432
|
+
*/
|
|
433
|
+
features: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
434
|
+
}, z.core.$strip>>;
|
|
435
|
+
}, z.core.$strip>;
|
|
436
|
+
/**
|
|
437
|
+
* TypeScript type inferred from {@link ExperienceRequestData}.
|
|
438
|
+
*/
|
|
439
|
+
export type ExperienceRequestData = z.infer<typeof ExperienceRequestData>;
|
|
440
|
+
//# sourceMappingURL=ExperienceRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExperienceRequest.d.ts","sourceRoot":"","sources":["../../src/experience/ExperienceRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAG7B;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;IACnC;;OAEG;;iBAEH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;IAChC;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;OAEG;;QA7BH;;WAEG;;;iBA6BH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { ExperienceEventArray } from './event';
|
|
3
|
+
/**
|
|
4
|
+
* Zod schema describing optional configuration for an experience request.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* These options can be used to enable or filter specific features when
|
|
8
|
+
* evaluating experiences.
|
|
9
|
+
*/
|
|
10
|
+
export const ExperienceRequestOptions = z.object({
|
|
11
|
+
/**
|
|
12
|
+
* Features or capabilities to enable for this request.
|
|
13
|
+
*/
|
|
14
|
+
features: z.optional(z.array(z.string())),
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Zod schema describing the data payload for an experience request.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Contains the list of events to be evaluated plus optional request
|
|
21
|
+
* configuration.
|
|
22
|
+
*/
|
|
23
|
+
export const ExperienceRequestData = z.object({
|
|
24
|
+
/**
|
|
25
|
+
* Experience events that should be evaluated by the Experience API.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Must contain at least one event.
|
|
29
|
+
*/
|
|
30
|
+
events: ExperienceEventArray.check(z.minLength(1)),
|
|
31
|
+
/**
|
|
32
|
+
* Optional configuration for this experience request.
|
|
33
|
+
*/
|
|
34
|
+
options: z.optional(ExperienceRequestOptions),
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=ExperienceRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExperienceRequest.js","sourceRoot":"","sources":["../../src/experience/ExperienceRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC,CAAA;AAOF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C;;;;;OAKG;IACH,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElD;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CAC9C,CAAC,CAAA"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { SelectedPersonalizationArray } from './personalization';
|
|
3
|
+
/**
|
|
4
|
+
* Zod schema describing the `data` payload of a standard Experience API response.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Contains the evaluated profile, selected personalizations, and computed
|
|
8
|
+
* changes that should be applied on the client.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ExperienceData: z.ZodMiniObject<{
|
|
11
|
+
/**
|
|
12
|
+
* Profile associated with the evaluated events.
|
|
13
|
+
*/
|
|
14
|
+
profile: z.ZodMiniObject<{
|
|
15
|
+
id: z.ZodMiniString<string>;
|
|
16
|
+
stableId: z.ZodMiniString<string>;
|
|
17
|
+
random: z.ZodMiniNumber<number>;
|
|
18
|
+
audiences: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
19
|
+
traits: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>;
|
|
20
|
+
location: z.ZodMiniObject<{
|
|
21
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
22
|
+
latitude: z.ZodMiniNumber<number>;
|
|
23
|
+
longitude: z.ZodMiniNumber<number>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
28
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
29
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
30
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
32
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
session: z.ZodMiniObject<{
|
|
35
|
+
id: z.ZodMiniString<string>;
|
|
36
|
+
isReturningVisitor: z.ZodMiniBoolean<boolean>;
|
|
37
|
+
landingPage: z.ZodMiniObject<{
|
|
38
|
+
path: z.ZodMiniString<string>;
|
|
39
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
40
|
+
referrer: z.ZodMiniString<string>;
|
|
41
|
+
search: z.ZodMiniString<string>;
|
|
42
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
url: z.ZodMiniString<string>;
|
|
44
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
45
|
+
count: z.ZodMiniNumber<number>;
|
|
46
|
+
activeSessionLength: z.ZodMiniNumber<number>;
|
|
47
|
+
averageSessionLength: z.ZodMiniNumber<number>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
/**
|
|
51
|
+
* Selected experiences and variants for the profile.
|
|
52
|
+
*
|
|
53
|
+
* @see {@link SelectedPersonalizationArray}
|
|
54
|
+
*/
|
|
55
|
+
experiences: z.ZodMiniArray<z.ZodMiniObject<{
|
|
56
|
+
experienceId: z.ZodMiniString<string>;
|
|
57
|
+
variantIndex: z.ZodMiniNumber<number>;
|
|
58
|
+
variants: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
59
|
+
sticky: z.ZodMiniOptional<z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
/**
|
|
62
|
+
* Currently used for Custom Flags.
|
|
63
|
+
*
|
|
64
|
+
* @see {@link ChangeArray}
|
|
65
|
+
*/
|
|
66
|
+
changes: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
67
|
+
key: z.ZodMiniString<string>;
|
|
68
|
+
meta: z.ZodMiniObject<{
|
|
69
|
+
experienceId: z.ZodMiniString<string>;
|
|
70
|
+
variantIndex: z.ZodMiniNumber<number>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
type: z.ZodMiniLiteral<"Variable">;
|
|
73
|
+
value: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniNumber<number>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>]>;
|
|
74
|
+
}, z.core.$strip>], "type">>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
/**
|
|
77
|
+
* TypeScript type inferred from {@link ExperienceData}.
|
|
78
|
+
*/
|
|
79
|
+
export type ExperienceData = z.infer<typeof ExperienceData>;
|
|
80
|
+
/**
|
|
81
|
+
* Zod schema describing a full Experience API response.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Extends {@link ResponseEnvelope} with {@link ExperienceData} as the `data` payload.
|
|
85
|
+
*/
|
|
86
|
+
export declare const ExperienceResponse: z.ZodMiniObject<{
|
|
87
|
+
message: z.ZodMiniString<string>;
|
|
88
|
+
error: z.ZodMiniNullable<z.ZodMiniBoolean<boolean>>;
|
|
89
|
+
data: z.ZodMiniObject<{
|
|
90
|
+
/**
|
|
91
|
+
* Profile associated with the evaluated events.
|
|
92
|
+
*/
|
|
93
|
+
profile: z.ZodMiniObject<{
|
|
94
|
+
id: z.ZodMiniString<string>;
|
|
95
|
+
stableId: z.ZodMiniString<string>;
|
|
96
|
+
random: z.ZodMiniNumber<number>;
|
|
97
|
+
audiences: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
98
|
+
traits: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>;
|
|
99
|
+
location: z.ZodMiniObject<{
|
|
100
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
101
|
+
latitude: z.ZodMiniNumber<number>;
|
|
102
|
+
longitude: z.ZodMiniNumber<number>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
105
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
106
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
107
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
108
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
109
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
110
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
111
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
session: z.ZodMiniObject<{
|
|
114
|
+
id: z.ZodMiniString<string>;
|
|
115
|
+
isReturningVisitor: z.ZodMiniBoolean<boolean>;
|
|
116
|
+
landingPage: z.ZodMiniObject<{
|
|
117
|
+
path: z.ZodMiniString<string>;
|
|
118
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
119
|
+
referrer: z.ZodMiniString<string>;
|
|
120
|
+
search: z.ZodMiniString<string>;
|
|
121
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
122
|
+
url: z.ZodMiniString<string>;
|
|
123
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
124
|
+
count: z.ZodMiniNumber<number>;
|
|
125
|
+
activeSessionLength: z.ZodMiniNumber<number>;
|
|
126
|
+
averageSessionLength: z.ZodMiniNumber<number>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
/**
|
|
130
|
+
* Selected experiences and variants for the profile.
|
|
131
|
+
*
|
|
132
|
+
* @see {@link SelectedPersonalizationArray}
|
|
133
|
+
*/
|
|
134
|
+
experiences: z.ZodMiniArray<z.ZodMiniObject<{
|
|
135
|
+
experienceId: z.ZodMiniString<string>;
|
|
136
|
+
variantIndex: z.ZodMiniNumber<number>;
|
|
137
|
+
variants: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
138
|
+
sticky: z.ZodMiniOptional<z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
/**
|
|
141
|
+
* Currently used for Custom Flags.
|
|
142
|
+
*
|
|
143
|
+
* @see {@link ChangeArray}
|
|
144
|
+
*/
|
|
145
|
+
changes: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
146
|
+
key: z.ZodMiniString<string>;
|
|
147
|
+
meta: z.ZodMiniObject<{
|
|
148
|
+
experienceId: z.ZodMiniString<string>;
|
|
149
|
+
variantIndex: z.ZodMiniNumber<number>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
type: z.ZodMiniLiteral<"Variable">;
|
|
152
|
+
value: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniNumber<number>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>]>;
|
|
153
|
+
}, z.core.$strip>], "type">>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
/**
|
|
157
|
+
* TypeScript type inferred from {@link ExperienceResponse}.
|
|
158
|
+
*/
|
|
159
|
+
export type ExperienceResponse = z.infer<typeof ExperienceResponse>;
|
|
160
|
+
/**
|
|
161
|
+
* Optimization data shape used for compatibility outside the API adapter.
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* This type mirrors {@link ExperienceData} but replaces the `experiences`
|
|
165
|
+
* field with `personalizations` while preserving the rest of the structure.
|
|
166
|
+
*/
|
|
167
|
+
export type OptimizationData = Omit<ExperienceData, 'experiences'> & {
|
|
168
|
+
/**
|
|
169
|
+
* Selected personalizations for the profile.
|
|
170
|
+
*/
|
|
171
|
+
personalizations: SelectedPersonalizationArray;
|
|
172
|
+
};
|
|
173
|
+
//# sourceMappingURL=ExperienceResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExperienceResponse.d.ts","sourceRoot":"","sources":["../../src/experience/ExperienceResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAA;AAIhE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;IACzB;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;OAIG;;;;;;;IAGH;;;;OAIG;;;;;;;;;;iBAEH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;QA/B7B;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAGH;;;;WAIG;;;;;;;QAGH;;;;WAIG;;;;;;;;;;;iBAeiF,CAAA;AAEtF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,GAAG;IACnE;;OAEG;IACH,gBAAgB,EAAE,4BAA4B,CAAA;CAC/C,CAAA"}
|