@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 @@
|
|
|
1
|
+
{"version":3,"file":"ExperienceEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/ExperienceEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAS7B;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAQ1B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE7D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAA2B,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { AliasEvent } from './AliasEvent';
|
|
3
|
+
import { ComponentViewEvent } from './ComponentViewEvent';
|
|
4
|
+
import { GroupEvent } from './GroupEvent';
|
|
5
|
+
import { IdentifyEvent } from './IdentifyEvent';
|
|
6
|
+
import { PageViewEvent } from './PageViewEvent';
|
|
7
|
+
import { ScreenViewEvent } from './ScreenViewEvent';
|
|
8
|
+
import { TrackEvent } from './TrackEvent';
|
|
9
|
+
/**
|
|
10
|
+
* Zod schema describing any supported experience/personalization event.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* This discriminated union aggregates all event types used by the
|
|
14
|
+
* personalization/experience tracking system.
|
|
15
|
+
*/
|
|
16
|
+
export const ExperienceEvent = z.discriminatedUnion('type', [
|
|
17
|
+
AliasEvent,
|
|
18
|
+
ComponentViewEvent,
|
|
19
|
+
GroupEvent,
|
|
20
|
+
IdentifyEvent,
|
|
21
|
+
PageViewEvent,
|
|
22
|
+
ScreenViewEvent,
|
|
23
|
+
TrackEvent,
|
|
24
|
+
]);
|
|
25
|
+
/**
|
|
26
|
+
* Zod schema describing an array of {@link ExperienceEvent} items.
|
|
27
|
+
*/
|
|
28
|
+
export const ExperienceEventArray = z.array(ExperienceEvent);
|
|
29
|
+
//# sourceMappingURL=ExperienceEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExperienceEvent.js","sourceRoot":"","sources":["../../../src/experience/event/ExperienceEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC1D,UAAU;IACV,kBAAkB;IAClB,UAAU;IACV,aAAa;IACb,aAAa;IACb,eAAe;IACf,UAAU;CACX,CAAC,CAAA;AAYF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing a `group` event.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Currently unused.
|
|
7
|
+
*
|
|
8
|
+
* Group events typically associate a user with an organization, account,
|
|
9
|
+
* or other grouping construct.
|
|
10
|
+
*
|
|
11
|
+
* Extends {@link UniversalEventProperties}.
|
|
12
|
+
*/
|
|
13
|
+
export declare const GroupEvent: z.ZodMiniObject<{
|
|
14
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
15
|
+
context: z.ZodMiniObject<{
|
|
16
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
17
|
+
name: z.ZodMiniString<string>;
|
|
18
|
+
version: z.ZodMiniString<string>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
campaign: z.ZodMiniObject<{
|
|
21
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
22
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
23
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
25
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
gdpr: z.ZodMiniObject<{
|
|
28
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
library: z.ZodMiniObject<{
|
|
31
|
+
name: z.ZodMiniString<string>;
|
|
32
|
+
version: z.ZodMiniString<string>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
locale: z.ZodMiniString<string>;
|
|
35
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
36
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
37
|
+
latitude: z.ZodMiniNumber<number>;
|
|
38
|
+
longitude: z.ZodMiniNumber<number>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
41
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
42
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
47
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
50
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
51
|
+
path: z.ZodMiniString<string>;
|
|
52
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
53
|
+
referrer: z.ZodMiniString<string>;
|
|
54
|
+
search: z.ZodMiniString<string>;
|
|
55
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
|
+
url: z.ZodMiniString<string>;
|
|
57
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
58
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
59
|
+
name: z.ZodMiniString<string>;
|
|
60
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
messageId: z.ZodMiniString<string>;
|
|
63
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
64
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
65
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
66
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
67
|
+
type: z.ZodMiniLiteral<"group">;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
/**
|
|
70
|
+
* TypeScript type inferred from {@link GroupEvent}.
|
|
71
|
+
*/
|
|
72
|
+
export type GroupEvent = z.infer<typeof GroupEvent>;
|
|
73
|
+
//# sourceMappingURL=GroupEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/GroupEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAG7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKrB,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { UniversalEventProperties } from './UniversalEventProperties';
|
|
3
|
+
/**
|
|
4
|
+
* Zod schema describing a `group` event.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Currently unused.
|
|
8
|
+
*
|
|
9
|
+
* Group events typically associate a user with an organization, account,
|
|
10
|
+
* or other grouping construct.
|
|
11
|
+
*
|
|
12
|
+
* Extends {@link UniversalEventProperties}.
|
|
13
|
+
*/
|
|
14
|
+
export const GroupEvent = z.extend(UniversalEventProperties, {
|
|
15
|
+
/**
|
|
16
|
+
* Discriminator indicating that this event is a group event.
|
|
17
|
+
*/
|
|
18
|
+
type: z.literal('group'),
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=GroupEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupEvent.js","sourceRoot":"","sources":["../../../src/experience/event/GroupEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,EAAE;IAC3D;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;CACzB,CAAC,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing an `identify` event.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Identify events attach user traits to a known identity.
|
|
7
|
+
*
|
|
8
|
+
* Extends {@link UniversalEventProperties} with a `traits` payload.
|
|
9
|
+
*/
|
|
10
|
+
export declare const IdentifyEvent: z.ZodMiniObject<{
|
|
11
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
12
|
+
context: z.ZodMiniObject<{
|
|
13
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
14
|
+
name: z.ZodMiniString<string>;
|
|
15
|
+
version: z.ZodMiniString<string>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
campaign: z.ZodMiniObject<{
|
|
18
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
19
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
20
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
21
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
22
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
gdpr: z.ZodMiniObject<{
|
|
25
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
library: z.ZodMiniObject<{
|
|
28
|
+
name: z.ZodMiniString<string>;
|
|
29
|
+
version: z.ZodMiniString<string>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
locale: z.ZodMiniString<string>;
|
|
32
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
33
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
34
|
+
latitude: z.ZodMiniNumber<number>;
|
|
35
|
+
longitude: z.ZodMiniNumber<number>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
38
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
39
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
41
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
42
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
47
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
48
|
+
path: z.ZodMiniString<string>;
|
|
49
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
50
|
+
referrer: z.ZodMiniString<string>;
|
|
51
|
+
search: z.ZodMiniString<string>;
|
|
52
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
53
|
+
url: z.ZodMiniString<string>;
|
|
54
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
55
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
56
|
+
name: z.ZodMiniString<string>;
|
|
57
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
messageId: z.ZodMiniString<string>;
|
|
60
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
61
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
62
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
63
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
64
|
+
type: z.ZodMiniLiteral<"identify">;
|
|
65
|
+
traits: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
/**
|
|
68
|
+
* TypeScript type inferred from {@link IdentifyEvent}.
|
|
69
|
+
*/
|
|
70
|
+
export type IdentifyEvent = z.infer<typeof IdentifyEvent>;
|
|
71
|
+
//# sourceMappingURL=IdentifyEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentifyEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/IdentifyEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYxB,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { UniversalEventProperties } from './UniversalEventProperties';
|
|
3
|
+
import { Traits } from './properties/Traits';
|
|
4
|
+
/**
|
|
5
|
+
* Zod schema describing an `identify` event.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Identify events attach user traits to a known identity.
|
|
9
|
+
*
|
|
10
|
+
* Extends {@link UniversalEventProperties} with a `traits` payload.
|
|
11
|
+
*/
|
|
12
|
+
export const IdentifyEvent = z.extend(UniversalEventProperties, {
|
|
13
|
+
/**
|
|
14
|
+
* Discriminator indicating that this event is an identify event.
|
|
15
|
+
*/
|
|
16
|
+
type: z.literal('identify'),
|
|
17
|
+
/**
|
|
18
|
+
* Traits describing the user.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link Traits}
|
|
21
|
+
*/
|
|
22
|
+
traits: Traits,
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=IdentifyEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentifyEvent.js","sourceRoot":"","sources":["../../../src/experience/event/IdentifyEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,EAAE;IAC9D;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAE3B;;;;OAIG;IACH,MAAM,EAAE,MAAM;CACf,CAAC,CAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing event context properties specific to page events
|
|
4
|
+
*/
|
|
5
|
+
export declare const PageEventContext: z.ZodMiniObject<{
|
|
6
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
7
|
+
name: z.ZodMiniString<string>;
|
|
8
|
+
version: z.ZodMiniString<string>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
campaign: z.ZodMiniObject<{
|
|
11
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
12
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
13
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
15
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
gdpr: z.ZodMiniObject<{
|
|
18
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
library: z.ZodMiniObject<{
|
|
21
|
+
name: z.ZodMiniString<string>;
|
|
22
|
+
version: z.ZodMiniString<string>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
locale: z.ZodMiniString<string>;
|
|
25
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
26
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
27
|
+
latitude: z.ZodMiniNumber<number>;
|
|
28
|
+
longitude: z.ZodMiniNumber<number>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
32
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
33
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
34
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
35
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
36
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
page: z.ZodMiniObject<{
|
|
41
|
+
path: z.ZodMiniString<string>;
|
|
42
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
43
|
+
referrer: z.ZodMiniString<string>;
|
|
44
|
+
search: z.ZodMiniString<string>;
|
|
45
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
url: z.ZodMiniString<string>;
|
|
47
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
/**
|
|
50
|
+
* TypeScript type inferred from {@link PageEventContext}.
|
|
51
|
+
*/
|
|
52
|
+
export type PageEventContext = z.infer<typeof PageEventContext>;
|
|
53
|
+
/**
|
|
54
|
+
* Zod schema describing a `page` view event.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Page view events track visits to web pages and associated context.
|
|
58
|
+
*
|
|
59
|
+
* Extends {@link UniversalEventProperties} with optional `name` and
|
|
60
|
+
* page-level {@link Page} properties.
|
|
61
|
+
*/
|
|
62
|
+
export declare const PageViewEvent: z.ZodMiniObject<{
|
|
63
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
64
|
+
messageId: z.ZodMiniString<string>;
|
|
65
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
66
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
67
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
68
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
69
|
+
type: z.ZodMiniLiteral<"page">;
|
|
70
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
71
|
+
properties: z.ZodMiniObject<{
|
|
72
|
+
path: z.ZodMiniString<string>;
|
|
73
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
74
|
+
referrer: z.ZodMiniString<string>;
|
|
75
|
+
search: z.ZodMiniString<string>;
|
|
76
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
77
|
+
url: z.ZodMiniString<string>;
|
|
78
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
79
|
+
context: z.ZodMiniObject<{
|
|
80
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
81
|
+
name: z.ZodMiniString<string>;
|
|
82
|
+
version: z.ZodMiniString<string>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
campaign: z.ZodMiniObject<{
|
|
85
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
86
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
87
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
88
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
89
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
gdpr: z.ZodMiniObject<{
|
|
92
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
library: z.ZodMiniObject<{
|
|
95
|
+
name: z.ZodMiniString<string>;
|
|
96
|
+
version: z.ZodMiniString<string>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
locale: z.ZodMiniString<string>;
|
|
99
|
+
location: z.ZodMiniOptional<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
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
114
|
+
page: z.ZodMiniObject<{
|
|
115
|
+
path: z.ZodMiniString<string>;
|
|
116
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
117
|
+
referrer: z.ZodMiniString<string>;
|
|
118
|
+
search: z.ZodMiniString<string>;
|
|
119
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
120
|
+
url: z.ZodMiniString<string>;
|
|
121
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
/**
|
|
125
|
+
* TypeScript type inferred from {@link PageViewEvent}.
|
|
126
|
+
*/
|
|
127
|
+
export type PageViewEvent = z.infer<typeof PageViewEvent>;
|
|
128
|
+
//# sourceMappingURL=PageViewEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageViewEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/PageViewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK3B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE/D;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBxB,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { UniversalEventContext, UniversalEventProperties } from './UniversalEventProperties';
|
|
3
|
+
import { Page } from './properties';
|
|
4
|
+
/**
|
|
5
|
+
* Zod schema describing event context properties specific to page events
|
|
6
|
+
*/
|
|
7
|
+
export const PageEventContext = z.extend(UniversalEventContext, {
|
|
8
|
+
/**
|
|
9
|
+
* Page context for events that occur within a web page.
|
|
10
|
+
*/
|
|
11
|
+
page: Page,
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Zod schema describing a `page` view event.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Page view events track visits to web pages and associated context.
|
|
18
|
+
*
|
|
19
|
+
* Extends {@link UniversalEventProperties} with optional `name` and
|
|
20
|
+
* page-level {@link Page} properties.
|
|
21
|
+
*/
|
|
22
|
+
export const PageViewEvent = z.extend(UniversalEventProperties, {
|
|
23
|
+
/**
|
|
24
|
+
* Discriminator indicating that this event is a page view.
|
|
25
|
+
*/
|
|
26
|
+
type: z.literal('page'),
|
|
27
|
+
/**
|
|
28
|
+
* Optional name for the page.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Useful when the logical page name differs from the URL or title.
|
|
32
|
+
*/
|
|
33
|
+
name: z.optional(z.string()),
|
|
34
|
+
/**
|
|
35
|
+
* Page-level properties such as URL, path, and referrer.
|
|
36
|
+
*/
|
|
37
|
+
properties: Page,
|
|
38
|
+
/*
|
|
39
|
+
* Override the context property of {@link UniversalEventProperties}
|
|
40
|
+
* with a page-specific context
|
|
41
|
+
*/
|
|
42
|
+
context: PageEventContext,
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=PageViewEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageViewEvent.js","sourceRoot":"","sources":["../../../src/experience/event/PageViewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,qBAAqB,EAAE;IAC9D;;OAEG;IACH,IAAI,EAAE,IAAI;CACX,CAAC,CAAA;AAOF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,EAAE;IAC9D;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,UAAU,EAAE,IAAI;IAEhB;;;OAGG;IACH,OAAO,EAAE,gBAAgB;CAC1B,CAAC,CAAA"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing event context properties specific to screen events
|
|
4
|
+
*/
|
|
5
|
+
export declare const ScreenEventContext: z.ZodMiniObject<{
|
|
6
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
7
|
+
name: z.ZodMiniString<string>;
|
|
8
|
+
version: z.ZodMiniString<string>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
campaign: z.ZodMiniObject<{
|
|
11
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
12
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
13
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
15
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
gdpr: z.ZodMiniObject<{
|
|
18
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
library: z.ZodMiniObject<{
|
|
21
|
+
name: z.ZodMiniString<string>;
|
|
22
|
+
version: z.ZodMiniString<string>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
locale: z.ZodMiniString<string>;
|
|
25
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
26
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
27
|
+
latitude: z.ZodMiniNumber<number>;
|
|
28
|
+
longitude: z.ZodMiniNumber<number>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
32
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
33
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
34
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
35
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
36
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
screen: z.ZodMiniObject<{
|
|
41
|
+
name: z.ZodMiniString<string>;
|
|
42
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
/**
|
|
45
|
+
* TypeScript type inferred from {@link ScreenEventContext}.
|
|
46
|
+
*/
|
|
47
|
+
export type ScreenEventContext = z.infer<typeof ScreenEventContext>;
|
|
48
|
+
/**
|
|
49
|
+
* Zod schema describing a `screen` view event.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Screen view events are typically used by mobile or TV applications
|
|
53
|
+
* to track navigation between screens.
|
|
54
|
+
*
|
|
55
|
+
* Extends {@link UniversalEventProperties}.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ScreenViewEvent: z.ZodMiniObject<{
|
|
58
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
59
|
+
messageId: z.ZodMiniString<string>;
|
|
60
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
61
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
62
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
63
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
64
|
+
type: z.ZodMiniLiteral<"screen">;
|
|
65
|
+
name: z.ZodMiniString<string>;
|
|
66
|
+
properties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniJSONSchema>>;
|
|
67
|
+
context: z.ZodMiniObject<{
|
|
68
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
69
|
+
name: z.ZodMiniString<string>;
|
|
70
|
+
version: z.ZodMiniString<string>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
campaign: z.ZodMiniObject<{
|
|
73
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
74
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
75
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
76
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
77
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
gdpr: z.ZodMiniObject<{
|
|
80
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
library: z.ZodMiniObject<{
|
|
83
|
+
name: z.ZodMiniString<string>;
|
|
84
|
+
version: z.ZodMiniString<string>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
locale: z.ZodMiniString<string>;
|
|
87
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
88
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
89
|
+
latitude: z.ZodMiniNumber<number>;
|
|
90
|
+
longitude: z.ZodMiniNumber<number>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
93
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
94
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
95
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
96
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
97
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
98
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
99
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
102
|
+
screen: z.ZodMiniObject<{
|
|
103
|
+
name: z.ZodMiniString<string>;
|
|
104
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
/**
|
|
108
|
+
* TypeScript type inferred from {@link ScreenViewEvent}.
|
|
109
|
+
*/
|
|
110
|
+
export type ScreenViewEvent = z.infer<typeof ScreenViewEvent>;
|
|
111
|
+
//# sourceMappingURL=ScreenViewEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenViewEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/ScreenViewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK7B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEnE;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB1B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { UniversalEventContext, UniversalEventProperties } from './UniversalEventProperties';
|
|
3
|
+
import { Properties, Screen } from './properties';
|
|
4
|
+
/**
|
|
5
|
+
* Zod schema describing event context properties specific to screen events
|
|
6
|
+
*/
|
|
7
|
+
export const ScreenEventContext = z.extend(UniversalEventContext, {
|
|
8
|
+
/**
|
|
9
|
+
* Screen context for events that occur within a web page.
|
|
10
|
+
*/
|
|
11
|
+
screen: Screen,
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Zod schema describing a `screen` view event.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Screen view events are typically used by mobile or TV applications
|
|
18
|
+
* to track navigation between screens.
|
|
19
|
+
*
|
|
20
|
+
* Extends {@link UniversalEventProperties}.
|
|
21
|
+
*/
|
|
22
|
+
export const ScreenViewEvent = z.extend(UniversalEventProperties, {
|
|
23
|
+
/**
|
|
24
|
+
* Discriminator indicating that this event is a screen view.
|
|
25
|
+
*/
|
|
26
|
+
type: z.literal('screen'),
|
|
27
|
+
/**
|
|
28
|
+
* Name of the screen being viewed.
|
|
29
|
+
*/
|
|
30
|
+
name: z.string(),
|
|
31
|
+
/**
|
|
32
|
+
* Optional properties describing the screen context.
|
|
33
|
+
*
|
|
34
|
+
* @see Properties
|
|
35
|
+
*/
|
|
36
|
+
properties: z.optional(Properties),
|
|
37
|
+
/*
|
|
38
|
+
* Override the context property of {@link UniversalEventProperties}
|
|
39
|
+
* with a screen-specific context
|
|
40
|
+
*/
|
|
41
|
+
context: ScreenEventContext,
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=ScreenViewEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenViewEvent.js","sourceRoot":"","sources":["../../../src/experience/event/ScreenViewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,qBAAqB,EAAE;IAChE;;OAEG;IACH,MAAM,EAAE,MAAM;CACf,CAAC,CAAA;AAOF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,EAAE;IAChE;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAEhB;;;;OAIG;IACH,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;IAElC;;;OAGG;IACH,OAAO,EAAE,kBAAkB;CAC5B,CAAC,CAAA"}
|