@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":"BatchExperienceEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/BatchExperienceEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAkB7B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAQ/B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAAgC,CAAA;AAEtE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
* Partial schema capturing an anonymous identifier.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* This object is merged into each event type in a batch to associate the
|
|
14
|
+
* event with an `anonymousId`.
|
|
15
|
+
*/
|
|
16
|
+
const Anon = { anonymousId: z.string() };
|
|
17
|
+
/**
|
|
18
|
+
* Zod schema describing each valid experience/personalization event within a batch.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This is a discriminated union on the `type` field that supports all event
|
|
22
|
+
* types used in batch ingestion, each extended with an `anonymousId`.
|
|
23
|
+
*/
|
|
24
|
+
export const BatchExperienceEvent = z.discriminatedUnion('type', [
|
|
25
|
+
z.extend(AliasEvent, Anon),
|
|
26
|
+
z.extend(ComponentViewEvent, Anon),
|
|
27
|
+
z.extend(GroupEvent, Anon),
|
|
28
|
+
z.extend(IdentifyEvent, Anon),
|
|
29
|
+
z.extend(PageViewEvent, Anon),
|
|
30
|
+
z.extend(ScreenViewEvent, Anon),
|
|
31
|
+
z.extend(TrackEvent, Anon),
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Zod schema describing an array of {@link BatchExperienceEvent} items.
|
|
35
|
+
*/
|
|
36
|
+
export const BatchExperienceEventArray = z.array(BatchExperienceEvent);
|
|
37
|
+
//# sourceMappingURL=BatchExperienceEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchExperienceEvent.js","sourceRoot":"","sources":["../../../src/experience/event/BatchExperienceEvent.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,IAAI,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAA;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC/D,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC;IAClC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC;IAC7B,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC;IAC7B,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC;IAC/B,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;CAC3B,CAAC,CAAA;AAOF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schema describing a `component` view event.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Component view events track exposure of individual components such as
|
|
7
|
+
* entries or variables within a personalized experience.
|
|
8
|
+
*
|
|
9
|
+
* Extends {@link UniversalEventProperties}.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ComponentViewEvent: z.ZodMiniObject<{
|
|
12
|
+
channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
|
|
13
|
+
context: z.ZodMiniObject<{
|
|
14
|
+
app: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
15
|
+
name: z.ZodMiniString<string>;
|
|
16
|
+
version: z.ZodMiniString<string>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
campaign: z.ZodMiniObject<{
|
|
19
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
20
|
+
source: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
21
|
+
medium: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
22
|
+
term: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
23
|
+
content: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
gdpr: z.ZodMiniObject<{
|
|
26
|
+
isConsentGiven: z.ZodMiniBoolean<boolean>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
library: z.ZodMiniObject<{
|
|
29
|
+
name: z.ZodMiniString<string>;
|
|
30
|
+
version: z.ZodMiniString<string>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
locale: z.ZodMiniString<string>;
|
|
33
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
34
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
35
|
+
latitude: z.ZodMiniNumber<number>;
|
|
36
|
+
longitude: z.ZodMiniNumber<number>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
39
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
41
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
42
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
userAgent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
48
|
+
page: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
49
|
+
path: z.ZodMiniString<string>;
|
|
50
|
+
query: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
51
|
+
referrer: z.ZodMiniString<string>;
|
|
52
|
+
search: z.ZodMiniString<string>;
|
|
53
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
54
|
+
url: z.ZodMiniString<string>;
|
|
55
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
56
|
+
screen: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
57
|
+
name: z.ZodMiniString<string>;
|
|
58
|
+
}, z.core.$catchall<z.ZodMiniJSONSchema>>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
messageId: z.ZodMiniString<string>;
|
|
61
|
+
originalTimestamp: z.iso.ZodMiniISODateTime;
|
|
62
|
+
sentAt: z.iso.ZodMiniISODateTime;
|
|
63
|
+
timestamp: z.iso.ZodMiniISODateTime;
|
|
64
|
+
userId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
65
|
+
type: z.ZodMiniLiteral<"component">;
|
|
66
|
+
componentType: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"Entry">, z.ZodMiniLiteral<"Variable">]>;
|
|
67
|
+
componentId: z.ZodMiniString<string>;
|
|
68
|
+
experienceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
69
|
+
variantIndex: z.ZodMiniNumber<number>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
/**
|
|
72
|
+
* TypeScript type inferred from {@link ComponentViewEvent}.
|
|
73
|
+
*/
|
|
74
|
+
export type ComponentViewEvent = z.infer<typeof ComponentViewEvent>;
|
|
75
|
+
//# sourceMappingURL=ComponentViewEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentViewEvent.d.ts","sourceRoot":"","sources":["../../../src/experience/event/ComponentViewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAG7B;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC7B,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import { UniversalEventProperties } from './UniversalEventProperties';
|
|
3
|
+
/**
|
|
4
|
+
* Zod schema describing a `component` view event.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Component view events track exposure of individual components such as
|
|
8
|
+
* entries or variables within a personalized experience.
|
|
9
|
+
*
|
|
10
|
+
* Extends {@link UniversalEventProperties}.
|
|
11
|
+
*/
|
|
12
|
+
export const ComponentViewEvent = z.extend(UniversalEventProperties, {
|
|
13
|
+
/**
|
|
14
|
+
* Discriminator indicating that this event is a component view.
|
|
15
|
+
*/
|
|
16
|
+
type: z.literal('component'),
|
|
17
|
+
/**
|
|
18
|
+
* Type of component that was viewed.
|
|
19
|
+
*
|
|
20
|
+
* - `'Entry'` — A content entry component.
|
|
21
|
+
* - `'Variable'` — A variable or inline value component.
|
|
22
|
+
*/
|
|
23
|
+
componentType: z.union([z.literal('Entry'), z.literal('Variable')]),
|
|
24
|
+
/**
|
|
25
|
+
* Contentful entry ID corresponding to the component that was viewed.
|
|
26
|
+
*/
|
|
27
|
+
componentId: z.string(),
|
|
28
|
+
/**
|
|
29
|
+
* Identifier of the experience that rendered this component.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Optional; component views may occur outside of a specific experience/personalization.
|
|
33
|
+
*/
|
|
34
|
+
experienceId: z.optional(z.string()),
|
|
35
|
+
/**
|
|
36
|
+
* Index of the variant associated with this component view.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Typically corresponds to the index of the selected personalization entry.
|
|
40
|
+
*/
|
|
41
|
+
variantIndex: z.number(),
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=ComponentViewEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentViewEvent.js","sourceRoot":"","sources":["../../../src/experience/event/ComponentViewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,EAAE;IACnE;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAEnE;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IAEvB;;;;;OAKG;IACH,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAEpC;;;;;OAKG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAA"}
|