@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.
Files changed (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +127 -0
  3. package/dist/contentful/AudienceEntry.d.ts +73 -0
  4. package/dist/contentful/AudienceEntry.d.ts.map +1 -0
  5. package/dist/contentful/AudienceEntry.js +41 -0
  6. package/dist/contentful/AudienceEntry.js.map +1 -0
  7. package/dist/contentful/CtflEntry.d.ts +206 -0
  8. package/dist/contentful/CtflEntry.d.ts.map +1 -0
  9. package/dist/contentful/CtflEntry.js +122 -0
  10. package/dist/contentful/CtflEntry.js.map +1 -0
  11. package/dist/contentful/MergeTagEntry.d.ts +68 -0
  12. package/dist/contentful/MergeTagEntry.d.ts.map +1 -0
  13. package/dist/contentful/MergeTagEntry.js +38 -0
  14. package/dist/contentful/MergeTagEntry.js.map +1 -0
  15. package/dist/contentful/PersonalizationConfig.d.ts +437 -0
  16. package/dist/contentful/PersonalizationConfig.d.ts.map +1 -0
  17. package/dist/contentful/PersonalizationConfig.js +164 -0
  18. package/dist/contentful/PersonalizationConfig.js.map +1 -0
  19. package/dist/contentful/PersonalizationEntry.d.ts +541 -0
  20. package/dist/contentful/PersonalizationEntry.d.ts.map +1 -0
  21. package/dist/contentful/PersonalizationEntry.js +95 -0
  22. package/dist/contentful/PersonalizationEntry.js.map +1 -0
  23. package/dist/contentful/PersonalizedEntry.d.ts +244 -0
  24. package/dist/contentful/PersonalizedEntry.d.ts.map +1 -0
  25. package/dist/contentful/PersonalizedEntry.js +27 -0
  26. package/dist/contentful/PersonalizedEntry.js.map +1 -0
  27. package/dist/contentful/index.d.ts +7 -0
  28. package/dist/contentful/index.d.ts.map +1 -0
  29. package/dist/contentful/index.js +7 -0
  30. package/dist/contentful/index.js.map +1 -0
  31. package/dist/experience/BatchExperienceResponse.d.ts +110 -0
  32. package/dist/experience/BatchExperienceResponse.d.ts.map +1 -0
  33. package/dist/experience/BatchExperienceResponse.js +25 -0
  34. package/dist/experience/BatchExperienceResponse.js.map +1 -0
  35. package/dist/experience/ExperienceRequest.d.ts +440 -0
  36. package/dist/experience/ExperienceRequest.d.ts.map +1 -0
  37. package/dist/experience/ExperienceRequest.js +36 -0
  38. package/dist/experience/ExperienceRequest.js.map +1 -0
  39. package/dist/experience/ExperienceResponse.d.ts +173 -0
  40. package/dist/experience/ExperienceResponse.d.ts.map +1 -0
  41. package/dist/experience/ExperienceResponse.js +38 -0
  42. package/dist/experience/ExperienceResponse.js.map +1 -0
  43. package/dist/experience/ResponseEnvelope.d.ts +35 -0
  44. package/dist/experience/ResponseEnvelope.d.ts.map +1 -0
  45. package/dist/experience/ResponseEnvelope.js +31 -0
  46. package/dist/experience/ResponseEnvelope.js.map +1 -0
  47. package/dist/experience/change/Change.d.ts +138 -0
  48. package/dist/experience/change/Change.d.ts.map +1 -0
  49. package/dist/experience/change/Change.js +102 -0
  50. package/dist/experience/change/Change.js.map +1 -0
  51. package/dist/experience/change/index.d.ts +2 -0
  52. package/dist/experience/change/index.d.ts.map +1 -0
  53. package/dist/experience/change/index.js +2 -0
  54. package/dist/experience/change/index.js.map +1 -0
  55. package/dist/experience/event/AliasEvent.d.ts +73 -0
  56. package/dist/experience/event/AliasEvent.d.ts.map +1 -0
  57. package/dist/experience/event/AliasEvent.js +20 -0
  58. package/dist/experience/event/AliasEvent.js.map +1 -0
  59. package/dist/experience/event/BatchExperienceEvent.d.ts +820 -0
  60. package/dist/experience/event/BatchExperienceEvent.d.ts.map +1 -0
  61. package/dist/experience/event/BatchExperienceEvent.js +37 -0
  62. package/dist/experience/event/BatchExperienceEvent.js.map +1 -0
  63. package/dist/experience/event/ComponentViewEvent.d.ts +75 -0
  64. package/dist/experience/event/ComponentViewEvent.d.ts.map +1 -0
  65. package/dist/experience/event/ComponentViewEvent.js +43 -0
  66. package/dist/experience/event/ComponentViewEvent.js.map +1 -0
  67. package/dist/experience/event/ExperienceEvent.d.ts +810 -0
  68. package/dist/experience/event/ExperienceEvent.d.ts.map +1 -0
  69. package/dist/experience/event/ExperienceEvent.js +29 -0
  70. package/dist/experience/event/ExperienceEvent.js.map +1 -0
  71. package/dist/experience/event/GroupEvent.d.ts +73 -0
  72. package/dist/experience/event/GroupEvent.d.ts.map +1 -0
  73. package/dist/experience/event/GroupEvent.js +20 -0
  74. package/dist/experience/event/GroupEvent.js.map +1 -0
  75. package/dist/experience/event/IdentifyEvent.d.ts +71 -0
  76. package/dist/experience/event/IdentifyEvent.d.ts.map +1 -0
  77. package/dist/experience/event/IdentifyEvent.js +24 -0
  78. package/dist/experience/event/IdentifyEvent.js.map +1 -0
  79. package/dist/experience/event/PageViewEvent.d.ts +128 -0
  80. package/dist/experience/event/PageViewEvent.d.ts.map +1 -0
  81. package/dist/experience/event/PageViewEvent.js +44 -0
  82. package/dist/experience/event/PageViewEvent.js.map +1 -0
  83. package/dist/experience/event/ScreenViewEvent.d.ts +111 -0
  84. package/dist/experience/event/ScreenViewEvent.d.ts.map +1 -0
  85. package/dist/experience/event/ScreenViewEvent.js +43 -0
  86. package/dist/experience/event/ScreenViewEvent.js.map +1 -0
  87. package/dist/experience/event/TrackEvent.d.ts +73 -0
  88. package/dist/experience/event/TrackEvent.d.ts.map +1 -0
  89. package/dist/experience/event/TrackEvent.js +27 -0
  90. package/dist/experience/event/TrackEvent.js.map +1 -0
  91. package/dist/experience/event/UniversalEventProperties.d.ts +175 -0
  92. package/dist/experience/event/UniversalEventProperties.d.ts.map +1 -0
  93. package/dist/experience/event/UniversalEventProperties.js +100 -0
  94. package/dist/experience/event/UniversalEventProperties.js.map +1 -0
  95. package/dist/experience/event/index.d.ts +12 -0
  96. package/dist/experience/event/index.d.ts.map +1 -0
  97. package/dist/experience/event/index.js +12 -0
  98. package/dist/experience/event/index.js.map +1 -0
  99. package/dist/experience/event/properties/App.d.ts +25 -0
  100. package/dist/experience/event/properties/App.d.ts.map +1 -0
  101. package/dist/experience/event/properties/App.js +21 -0
  102. package/dist/experience/event/properties/App.js.map +1 -0
  103. package/dist/experience/event/properties/Campaign.d.ts +34 -0
  104. package/dist/experience/event/properties/Campaign.d.ts.map +1 -0
  105. package/dist/experience/event/properties/Campaign.js +30 -0
  106. package/dist/experience/event/properties/Campaign.js.map +1 -0
  107. package/dist/experience/event/properties/Channel.d.ts +17 -0
  108. package/dist/experience/event/properties/Channel.d.ts.map +1 -0
  109. package/dist/experience/event/properties/Channel.js +13 -0
  110. package/dist/experience/event/properties/Channel.js.map +1 -0
  111. package/dist/experience/event/properties/Dictionary.d.ts +13 -0
  112. package/dist/experience/event/properties/Dictionary.d.ts.map +1 -0
  113. package/dist/experience/event/properties/Dictionary.js +9 -0
  114. package/dist/experience/event/properties/Dictionary.js.map +1 -0
  115. package/dist/experience/event/properties/GeoLocation.d.ts +66 -0
  116. package/dist/experience/event/properties/GeoLocation.d.ts.map +1 -0
  117. package/dist/experience/event/properties/GeoLocation.js +76 -0
  118. package/dist/experience/event/properties/GeoLocation.js.map +1 -0
  119. package/dist/experience/event/properties/Library.d.ts +22 -0
  120. package/dist/experience/event/properties/Library.d.ts.map +1 -0
  121. package/dist/experience/event/properties/Library.js +18 -0
  122. package/dist/experience/event/properties/Library.js.map +1 -0
  123. package/dist/experience/event/properties/Page.d.ts +39 -0
  124. package/dist/experience/event/properties/Page.d.ts.map +1 -0
  125. package/dist/experience/event/properties/Page.js +36 -0
  126. package/dist/experience/event/properties/Page.js.map +1 -0
  127. package/dist/experience/event/properties/Properties.d.ts +13 -0
  128. package/dist/experience/event/properties/Properties.d.ts.map +1 -0
  129. package/dist/experience/event/properties/Properties.js +9 -0
  130. package/dist/experience/event/properties/Properties.js.map +1 -0
  131. package/dist/experience/event/properties/Screen.d.ts +19 -0
  132. package/dist/experience/event/properties/Screen.d.ts.map +1 -0
  133. package/dist/experience/event/properties/Screen.js +15 -0
  134. package/dist/experience/event/properties/Screen.js.map +1 -0
  135. package/dist/experience/event/properties/Traits.d.ts +14 -0
  136. package/dist/experience/event/properties/Traits.d.ts.map +1 -0
  137. package/dist/experience/event/properties/Traits.js +10 -0
  138. package/dist/experience/event/properties/Traits.js.map +1 -0
  139. package/dist/experience/event/properties/index.d.ts +11 -0
  140. package/dist/experience/event/properties/index.d.ts.map +1 -0
  141. package/dist/experience/event/properties/index.js +11 -0
  142. package/dist/experience/event/properties/index.js.map +1 -0
  143. package/dist/experience/index.d.ts +8 -0
  144. package/dist/experience/index.d.ts.map +1 -0
  145. package/dist/experience/index.js +8 -0
  146. package/dist/experience/index.js.map +1 -0
  147. package/dist/experience/personalization/SelectedPersonalization.d.ts +86 -0
  148. package/dist/experience/personalization/SelectedPersonalization.d.ts.map +1 -0
  149. package/dist/experience/personalization/SelectedPersonalization.js +48 -0
  150. package/dist/experience/personalization/SelectedPersonalization.js.map +1 -0
  151. package/dist/experience/personalization/index.d.ts +2 -0
  152. package/dist/experience/personalization/index.d.ts.map +1 -0
  153. package/dist/experience/personalization/index.js +2 -0
  154. package/dist/experience/personalization/index.js.map +1 -0
  155. package/dist/experience/profile/Profile.d.ts +104 -0
  156. package/dist/experience/profile/Profile.d.ts.map +1 -0
  157. package/dist/experience/profile/Profile.js +72 -0
  158. package/dist/experience/profile/Profile.js.map +1 -0
  159. package/dist/experience/profile/index.d.ts +3 -0
  160. package/dist/experience/profile/index.d.ts.map +1 -0
  161. package/dist/experience/profile/index.js +3 -0
  162. package/dist/experience/profile/index.js.map +1 -0
  163. package/dist/experience/profile/properties/SessionStatistics.d.ts +60 -0
  164. package/dist/experience/profile/properties/SessionStatistics.d.ts.map +1 -0
  165. package/dist/experience/profile/properties/SessionStatistics.js +50 -0
  166. package/dist/experience/profile/properties/SessionStatistics.js.map +1 -0
  167. package/dist/experience/profile/properties/index.d.ts +2 -0
  168. package/dist/experience/profile/properties/index.d.ts.map +1 -0
  169. package/dist/experience/profile/properties/index.js +2 -0
  170. package/dist/experience/profile/properties/index.js.map +1 -0
  171. package/dist/index.cjs +684 -0
  172. package/dist/index.cjs.map +1 -0
  173. package/dist/index.d.ts +4 -0
  174. package/dist/index.d.ts.map +1 -0
  175. package/dist/index.js +4 -0
  176. package/dist/index.js.map +1 -0
  177. package/dist/index.mjs +425 -0
  178. package/dist/index.mjs.map +1 -0
  179. package/dist/insights/event/BatchInsightsEvent.d.ts +173 -0
  180. package/dist/insights/event/BatchInsightsEvent.d.ts.map +1 -0
  181. package/dist/insights/event/BatchInsightsEvent.js +32 -0
  182. package/dist/insights/event/BatchInsightsEvent.js.map +1 -0
  183. package/dist/insights/event/InsightsEvent.d.ts +145 -0
  184. package/dist/insights/event/InsightsEvent.d.ts.map +1 -0
  185. package/dist/insights/event/InsightsEvent.js +16 -0
  186. package/dist/insights/event/InsightsEvent.js.map +1 -0
  187. package/dist/insights/event/index.d.ts +3 -0
  188. package/dist/insights/event/index.d.ts.map +1 -0
  189. package/dist/insights/event/index.js +3 -0
  190. package/dist/insights/event/index.js.map +1 -0
  191. package/dist/insights/index.d.ts +2 -0
  192. package/dist/insights/index.d.ts.map +1 -0
  193. package/dist/insights/index.js +2 -0
  194. package/dist/insights/index.js.map +1 -0
  195. 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,3 @@
1
+ export * from './Profile';
2
+ export * from './properties';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,3 @@
1
+ export * from './Profile';
2
+ export * from './properties';
3
+ //# sourceMappingURL=index.js.map
@@ -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,2 @@
1
+ export * from './SessionStatistics';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export * from './SessionStatistics';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/experience/profile/properties/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}