@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,104 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing a full user profile as received from the Experience API.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Represents the server-side view of a profile, including identifiers,
|
|
7
|
+
* traits, audiences, location, and session statistics.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Profile: z.ZodMiniObject<{
|
|
10
|
+
/**
|
|
11
|
+
* Primary identifier of the profile.
|
|
12
|
+
*/
|
|
13
|
+
id: z.ZodMiniString<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Stable, long-lived identifier of the profile.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Intended to remain constant across sessions and devices when possible.
|
|
19
|
+
* Usually equal to `id`.
|
|
20
|
+
*/
|
|
21
|
+
stableId: z.ZodMiniString<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Random value associated with the profile.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Often used for deterministic bucketing (e.g., in experiments).
|
|
27
|
+
*/
|
|
28
|
+
random: z.ZodMiniNumber<number>;
|
|
29
|
+
/**
|
|
30
|
+
* List of audience identifiers that this profile currently belongs to.
|
|
31
|
+
*/
|
|
32
|
+
audiences: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
33
|
+
/**
|
|
34
|
+
* Traits describing the profile (user-level attributes).
|
|
35
|
+
*
|
|
36
|
+
* @see Traits
|
|
37
|
+
*/
|
|
38
|
+
traits: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>;
|
|
39
|
+
/**
|
|
40
|
+
* Geo-location information associated with the profile.
|
|
41
|
+
*
|
|
42
|
+
* @see GeoLocation
|
|
43
|
+
*/
|
|
44
|
+
location: z.ZodMiniObject<{
|
|
45
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
46
|
+
latitude: z.ZodMiniNumber<number>;
|
|
47
|
+
longitude: z.ZodMiniNumber<number>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
50
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
52
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
53
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
54
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
55
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
/**
|
|
59
|
+
* Aggregated session statistics for the profile.
|
|
60
|
+
*
|
|
61
|
+
* @see SessionStatistics
|
|
62
|
+
*/
|
|
63
|
+
session: z.ZodMiniObject<{
|
|
64
|
+
id: z.ZodMiniString<string>;
|
|
65
|
+
isReturningVisitor: z.ZodMiniBoolean<boolean>;
|
|
66
|
+
landingPage: z.ZodMiniObject<{
|
|
67
|
+
path: z.ZodMiniString<string>;
|
|
68
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
69
|
+
referrer: z.ZodMiniString<string>;
|
|
70
|
+
search: z.ZodMiniString<string>;
|
|
71
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
72
|
+
url: z.ZodMiniString<string>;
|
|
73
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
74
|
+
count: z.ZodMiniNumber<number>;
|
|
75
|
+
activeSessionLength: z.ZodMiniNumber<number>;
|
|
76
|
+
averageSessionLength: z.ZodMiniNumber<number>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
/**
|
|
80
|
+
* TypeScript type inferred from {@link Profile}.
|
|
81
|
+
*/
|
|
82
|
+
export type Profile = z.infer<typeof Profile>;
|
|
83
|
+
/**
|
|
84
|
+
* Zod schema describing a partial profile payload used for sending events
|
|
85
|
+
* to the Experience & Insights APIs.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* This schema enforces the presence of an `id` field and allows additional
|
|
89
|
+
* JSON-serializable properties via `z.catchall`.
|
|
90
|
+
*/
|
|
91
|
+
export declare const PartialProfile: z.ZodMiniObject<{
|
|
92
|
+
/**
|
|
93
|
+
* Identifier of the profile.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* Used to associate events with an existing profile.
|
|
97
|
+
*/
|
|
98
|
+
id: z.ZodMiniString<string>;
|
|
99
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
100
|
+
/**
|
|
101
|
+
* TypeScript type inferred from {@link PartialProfile}.
|
|
102
|
+
*/
|
|
103
|
+
export type PartialProfile = z.infer<typeof PartialProfile>;
|
|
104
|
+
//# sourceMappingURL=Profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../src/experience/profile/Profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B;;;;;;GAMG;AACH,eAAO,MAAM,OAAO;IAClB;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;;;;;;;;;;;;;;IAGH;;;;OAIG;;;;;;;;;;;;;;;;iBAEH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;IAEvB;;;;;OAKG;;yCAIN,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { GeoLocation } from '../event/properties';
|
|
3
|
+
import { Traits } from '../event/properties/Traits';
|
|
4
|
+
import { SessionStatistics } from './properties';
|
|
5
|
+
/**
|
|
6
|
+
* Zod schema describing a full user profile as received from the Experience API.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Represents the server-side view of a profile, including identifiers,
|
|
10
|
+
* traits, audiences, location, and session statistics.
|
|
11
|
+
*/
|
|
12
|
+
export const Profile = z.object({
|
|
13
|
+
/**
|
|
14
|
+
* Primary identifier of the profile.
|
|
15
|
+
*/
|
|
16
|
+
id: z.string(),
|
|
17
|
+
/**
|
|
18
|
+
* Stable, long-lived identifier of the profile.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Intended to remain constant across sessions and devices when possible.
|
|
22
|
+
* Usually equal to `id`.
|
|
23
|
+
*/
|
|
24
|
+
stableId: z.string(),
|
|
25
|
+
/**
|
|
26
|
+
* Random value associated with the profile.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Often used for deterministic bucketing (e.g., in experiments).
|
|
30
|
+
*/
|
|
31
|
+
random: z.number(),
|
|
32
|
+
/**
|
|
33
|
+
* List of audience identifiers that this profile currently belongs to.
|
|
34
|
+
*/
|
|
35
|
+
audiences: z.array(z.string()),
|
|
36
|
+
/**
|
|
37
|
+
* Traits describing the profile (user-level attributes).
|
|
38
|
+
*
|
|
39
|
+
* @see Traits
|
|
40
|
+
*/
|
|
41
|
+
traits: Traits,
|
|
42
|
+
/**
|
|
43
|
+
* Geo-location information associated with the profile.
|
|
44
|
+
*
|
|
45
|
+
* @see GeoLocation
|
|
46
|
+
*/
|
|
47
|
+
location: GeoLocation,
|
|
48
|
+
/**
|
|
49
|
+
* Aggregated session statistics for the profile.
|
|
50
|
+
*
|
|
51
|
+
* @see SessionStatistics
|
|
52
|
+
*/
|
|
53
|
+
session: SessionStatistics,
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* Zod schema describing a partial profile payload used for sending events
|
|
57
|
+
* to the Experience & Insights APIs.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* This schema enforces the presence of an `id` field and allows additional
|
|
61
|
+
* JSON-serializable properties via `z.catchall`.
|
|
62
|
+
*/
|
|
63
|
+
export const PartialProfile = z.catchall(z.object({
|
|
64
|
+
/**
|
|
65
|
+
* Identifier of the profile.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* Used to associate events with an existing profile.
|
|
69
|
+
*/
|
|
70
|
+
id: z.string(),
|
|
71
|
+
}), z.json());
|
|
72
|
+
//# sourceMappingURL=Profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../src/experience/profile/Profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B;;OAEG;IACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IAEd;;;;;;OAMG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IAEpB;;;;;OAKG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAElB;;OAEG;IACH,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAE9B;;;;OAIG;IACH,MAAM,EAAE,MAAM;IAEd;;;;OAIG;IACH,QAAQ,EAAE,WAAW;IAErB;;;;OAIG;IACH,OAAO,EAAE,iBAAiB;CAC3B,CAAC,CAAA;AAOF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,QAAQ,CACtC,CAAC,CAAC,MAAM,CAAC;IACP;;;;;OAKG;IACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;CACf,CAAC,EACF,CAAC,CAAC,IAAI,EAAE,CACT,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/experience/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/experience/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing aggregated statistics for a user session.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Captures both per-session metrics (such as `activeSessionLength`) and
|
|
7
|
+
* aggregate metrics (such as `averageSessionLength`) for a given profile.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SessionStatistics: z.ZodMiniObject<{
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for this session statistics record.
|
|
12
|
+
*/
|
|
13
|
+
id: z.ZodMiniString<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the visitor has been seen before.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* `true` typically means the visitor has at least one prior session.
|
|
19
|
+
*/
|
|
20
|
+
isReturningVisitor: z.ZodMiniBoolean<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Landing page for the session.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Represents the first page the user visited in this session.
|
|
26
|
+
*
|
|
27
|
+
* @see Page
|
|
28
|
+
*/
|
|
29
|
+
landingPage: z.ZodMiniObject<{
|
|
30
|
+
path: z.ZodMiniString<string>;
|
|
31
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
32
|
+
referrer: z.ZodMiniString<string>;
|
|
33
|
+
search: z.ZodMiniString<string>;
|
|
34
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
35
|
+
url: z.ZodMiniString<string>;
|
|
36
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
37
|
+
/**
|
|
38
|
+
* Number of sessions associated with this profile or identifier.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Often used in combination with {@link SessionStatistics.averageSessionLength}.
|
|
42
|
+
*/
|
|
43
|
+
count: z.ZodMiniNumber<number>;
|
|
44
|
+
/**
|
|
45
|
+
* Duration of the active session.
|
|
46
|
+
*/
|
|
47
|
+
activeSessionLength: z.ZodMiniNumber<number>;
|
|
48
|
+
/**
|
|
49
|
+
* Average session duration across all sessions represented by this record.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* The unit should match {@link SessionStatistics.activeSessionLength}.
|
|
53
|
+
*/
|
|
54
|
+
averageSessionLength: z.ZodMiniNumber<number>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
/**
|
|
57
|
+
* TypeScript type inferred from {@link SessionStatistics}.
|
|
58
|
+
*/
|
|
59
|
+
export type SessionStatistics = z.infer<typeof SessionStatistics>;
|
|
60
|
+
//# sourceMappingURL=SessionStatistics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionStatistics.d.ts","sourceRoot":"","sources":["../../../../src/experience/profile/properties/SessionStatistics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAG7B;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;IAGH;;;;;OAKG;;IAGH;;;;;;;OAOG;;;;;;;;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;iBAEH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { Page } from '../../event/properties';
|
|
3
|
+
/**
|
|
4
|
+
* Zod schema describing aggregated statistics for a user session.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Captures both per-session metrics (such as `activeSessionLength`) and
|
|
8
|
+
* aggregate metrics (such as `averageSessionLength`) for a given profile.
|
|
9
|
+
*/
|
|
10
|
+
export const SessionStatistics = z.object({
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for this session statistics record.
|
|
13
|
+
*/
|
|
14
|
+
id: z.string(),
|
|
15
|
+
/**
|
|
16
|
+
* Indicates whether the visitor has been seen before.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* `true` typically means the visitor has at least one prior session.
|
|
20
|
+
*/
|
|
21
|
+
isReturningVisitor: z.boolean(),
|
|
22
|
+
/**
|
|
23
|
+
* Landing page for the session.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Represents the first page the user visited in this session.
|
|
27
|
+
*
|
|
28
|
+
* @see Page
|
|
29
|
+
*/
|
|
30
|
+
landingPage: Page,
|
|
31
|
+
/**
|
|
32
|
+
* Number of sessions associated with this profile or identifier.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Often used in combination with {@link SessionStatistics.averageSessionLength}.
|
|
36
|
+
*/
|
|
37
|
+
count: z.number(),
|
|
38
|
+
/**
|
|
39
|
+
* Duration of the active session.
|
|
40
|
+
*/
|
|
41
|
+
activeSessionLength: z.number(),
|
|
42
|
+
/**
|
|
43
|
+
* Average session duration across all sessions represented by this record.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* The unit should match {@link SessionStatistics.activeSessionLength}.
|
|
47
|
+
*/
|
|
48
|
+
averageSessionLength: z.number(),
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=SessionStatistics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionStatistics.js","sourceRoot":"","sources":["../../../../src/experience/profile/properties/SessionStatistics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC;;OAEG;IACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IAEd;;;;;OAKG;IACH,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE;IAE/B;;;;;;;OAOG;IACH,WAAW,EAAE,IAAI;IAEjB;;;;;OAKG;IACH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IAEjB;;OAEG;IACH,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAE/B;;;;;OAKG;IACH,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE;CACjC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/experience/profile/properties/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/experience/profile/properties/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|