@contentful/optimization-api-client 2.1.0 → 2.2.0
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/README.md +66 -13
- package/dist/api-schemas.cjs +5 -2
- package/dist/api-schemas.cjs.map +1 -1
- package/dist/api-schemas.d.cts +38 -4
- package/dist/api-schemas.d.mts +38 -4
- package/dist/api-schemas.d.ts +38 -4
- package/dist/api-schemas.mjs +5 -2
- package/dist/api-schemas.mjs.map +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -2
- package/dist/index.d.mts +87 -2
- package/dist/index.d.ts +87 -2
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/api-schemas.d.ts
CHANGED
|
@@ -1163,7 +1163,7 @@ export declare const BatchExperienceRequestData: z.ZodMiniObject<{
|
|
|
1163
1163
|
anonymousId: z.ZodMiniString<string>;
|
|
1164
1164
|
}, z.core.$strip>], "type">>;
|
|
1165
1165
|
/**
|
|
1166
|
-
* Optional configuration
|
|
1166
|
+
* Optional feature configuration. Batch locations belong in each event's `context.location`.
|
|
1167
1167
|
*/
|
|
1168
1168
|
options: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1169
1169
|
features: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
@@ -4121,6 +4121,23 @@ export declare const ExperienceRequestData: z.ZodMiniObject<{
|
|
|
4121
4121
|
* Features or capabilities to enable for this request.
|
|
4122
4122
|
*/
|
|
4123
4123
|
features: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
4124
|
+
/**
|
|
4125
|
+
* Location default for singular profile requests. Event `context.location` fields override it.
|
|
4126
|
+
*/
|
|
4127
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
4128
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
4129
|
+
latitude: z.ZodMiniNumber<number>;
|
|
4130
|
+
longitude: z.ZodMiniNumber<number>;
|
|
4131
|
+
}, z.core.$strip>>;
|
|
4132
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4133
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4134
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4135
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4136
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4137
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4138
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4139
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4140
|
+
}, z.core.$strip>>;
|
|
4124
4141
|
}, z.core.$strip>>;
|
|
4125
4142
|
}, z.core.$strip>;
|
|
4126
4143
|
|
|
@@ -4135,8 +4152,8 @@ export declare type ExperienceRequestData = z.infer<typeof ExperienceRequestData
|
|
|
4135
4152
|
* Zod schema describing optional configuration for an experience request.
|
|
4136
4153
|
*
|
|
4137
4154
|
* @remarks
|
|
4138
|
-
* These options
|
|
4139
|
-
* evaluating experiences.
|
|
4155
|
+
* These options configure feature flags and the request location default when
|
|
4156
|
+
* evaluating experiences through singular profile requests.
|
|
4140
4157
|
*
|
|
4141
4158
|
* @public
|
|
4142
4159
|
*/
|
|
@@ -4145,6 +4162,23 @@ export declare const ExperienceRequestOptions: z.ZodMiniObject<{
|
|
|
4145
4162
|
* Features or capabilities to enable for this request.
|
|
4146
4163
|
*/
|
|
4147
4164
|
features: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
4165
|
+
/**
|
|
4166
|
+
* Location default for singular profile requests. Event `context.location` fields override it.
|
|
4167
|
+
*/
|
|
4168
|
+
location: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
4169
|
+
coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
4170
|
+
latitude: z.ZodMiniNumber<number>;
|
|
4171
|
+
longitude: z.ZodMiniNumber<number>;
|
|
4172
|
+
}, z.core.$strip>>;
|
|
4173
|
+
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4174
|
+
postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4175
|
+
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4176
|
+
regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4177
|
+
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4178
|
+
countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4179
|
+
continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4180
|
+
timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4181
|
+
}, z.core.$strip>>;
|
|
4148
4182
|
}, z.core.$strip>;
|
|
4149
4183
|
|
|
4150
4184
|
/**
|
|
@@ -4294,7 +4328,7 @@ export declare const FragmentChange: z.ZodMiniObject<{
|
|
|
4294
4328
|
export declare type FragmentChange = z.infer<typeof FragmentChange>;
|
|
4295
4329
|
|
|
4296
4330
|
/**
|
|
4297
|
-
* Zod schema describing geo-location properties
|
|
4331
|
+
* Zod schema describing geo-location properties for an event or singular profile request.
|
|
4298
4332
|
*
|
|
4299
4333
|
* @remarks
|
|
4300
4334
|
* All properties are optional and can be derived from IP or device data.
|
package/dist/api-schemas.mjs
CHANGED
|
@@ -159,7 +159,8 @@ const ExperienceEvent = __rspack_external_zod_mini_edc6895a.discriminatedUnion('
|
|
|
159
159
|
]);
|
|
160
160
|
const ExperienceEventArray = __rspack_external_zod_mini_edc6895a.array(ExperienceEvent);
|
|
161
161
|
const ExperienceRequestOptions = __rspack_external_zod_mini_edc6895a.object({
|
|
162
|
-
features: __rspack_external_zod_mini_edc6895a.optional(__rspack_external_zod_mini_edc6895a.array(__rspack_external_zod_mini_edc6895a.string()))
|
|
162
|
+
features: __rspack_external_zod_mini_edc6895a.optional(__rspack_external_zod_mini_edc6895a.array(__rspack_external_zod_mini_edc6895a.string())),
|
|
163
|
+
location: __rspack_external_zod_mini_edc6895a.optional(GeoLocation)
|
|
163
164
|
});
|
|
164
165
|
const ExperienceRequestData = __rspack_external_zod_mini_edc6895a.object({
|
|
165
166
|
events: ExperienceEventArray.check(__rspack_external_zod_mini_edc6895a.minLength(1)),
|
|
@@ -167,7 +168,9 @@ const ExperienceRequestData = __rspack_external_zod_mini_edc6895a.object({
|
|
|
167
168
|
});
|
|
168
169
|
const BatchExperienceRequestData = __rspack_external_zod_mini_edc6895a.object({
|
|
169
170
|
events: BatchExperienceEventArray.check(__rspack_external_zod_mini_edc6895a.minLength(1)),
|
|
170
|
-
options: __rspack_external_zod_mini_edc6895a.optional(ExperienceRequestOptions
|
|
171
|
+
options: __rspack_external_zod_mini_edc6895a.optional(__rspack_external_zod_mini_edc6895a.omit(ExperienceRequestOptions, {
|
|
172
|
+
location: true
|
|
173
|
+
}))
|
|
171
174
|
});
|
|
172
175
|
const SessionStatistics = __rspack_external_zod_mini_edc6895a.object({
|
|
173
176
|
id: __rspack_external_zod_mini_edc6895a.string(),
|
package/dist/api-schemas.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-schemas.mjs","sources":["../src/schemas/experience/event/properties/App.ts","../src/schemas/experience/event/properties/Campaign.ts","../src/schemas/experience/event/properties/Channel.ts","../src/schemas/experience/event/properties/Dictionary.ts","../src/schemas/experience/event/properties/GeoLocation.ts","../src/schemas/experience/event/properties/Library.ts","../src/schemas/experience/event/properties/Page.ts","../src/schemas/experience/event/properties/Properties.ts","../src/schemas/experience/event/properties/Screen.ts","../src/schemas/experience/event/properties/Traits.ts","../src/schemas/experience/event/UniversalEventProperties.ts","../src/schemas/experience/event/ExoEventProperties.ts","../src/schemas/experience/event/ExoViewEvent.ts","../src/schemas/experience/event/IdentifyEvent.ts","../src/schemas/experience/event/PageViewEvent.ts","../src/schemas/experience/event/ScreenViewEvent.ts","../src/schemas/experience/event/TrackEvent.ts","../src/schemas/experience/event/InteractionEventProperties.ts","../src/schemas/experience/event/ViewEvent.ts","../src/schemas/experience/event/BatchExperienceEvent.ts","../src/schemas/experience/event/ExperienceEvent.ts","../src/schemas/experience/ExperienceRequest.ts","../src/schemas/experience/BatchExperienceRequest.ts","../src/schemas/experience/profile/properties/SessionStatistics.ts","../src/schemas/experience/profile/Profile.ts","../src/schemas/experience/ResponseEnvelope.ts","../src/schemas/experience/BatchExperienceResponse.ts","../src/schemas/experience/change/Change.ts","../src/schemas/experience/optimization/SelectedOptimization.ts","../src/schemas/experience/ExperienceResponse.ts","../src/schemas/insights/event/ClickEvent.ts","../src/schemas/insights/event/ExoClickEvent.ts","../src/schemas/insights/event/ExoHoverEvent.ts","../src/schemas/insights/event/HoverEvent.ts","../src/schemas/insights/event/InsightsEvent.ts","../src/schemas/insights/event/BatchInsightsEvent.ts","../src/schemas/validation/parseWithFriendlyError.ts"],"sourcesContent":["import * as z from 'zod/mini'\n\n/**\n * Zod schema describing app-level properties.\n *\n * @remarks\n * These properties typically describe the application that is emitting\n * analytics events, such as its name and version.\n *\n * The entire object is optional; when omitted, no app context is attached.\n *\n * @public\n */\nexport const App = z.optional(\n z.object({\n /**\n * Name of the application.\n */\n name: z.string(),\n\n /**\n * Version of the application.\n */\n version: z.string(),\n }),\n)\n\n/**\n * TypeScript type inferred from {@link App}.\n *\n * @public\n */\nexport type App = z.infer<typeof App>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing campaign attribution properties.\n *\n * @remarks\n * These fields typically mirror UTM parameters used for marketing campaigns.\n *\n * @public\n */\nexport const Campaign = z.object({\n /**\n * Name of the campaign (e.g., `utm_campaign`).\n */\n name: z.optional(z.string()),\n\n /**\n * Campaign source (e.g., `utm_source`).\n */\n source: z.optional(z.string()),\n\n /**\n * Campaign medium (e.g., `utm_medium`).\n */\n medium: z.optional(z.string()),\n\n /**\n * Campaign term (e.g., `utm_term`).\n */\n term: z.optional(z.string()),\n\n /**\n * Campaign content (e.g., `utm_content`).\n */\n content: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link Campaign}.\n *\n * @public\n */\nexport type Campaign = z.infer<typeof Campaign>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing the analytics channel.\n *\n * @remarks\n * Indicates the execution environment where the event originated.\n *\n * - `'mobile'` — Events from native or hybrid mobile apps.\n * - `'server'` — Events emitted from backend/server-side code.\n * - `'web'` — Events from web browsers or web-based clients.\n *\n * @public\n */\nexport const Channel = z.union([z.literal('mobile'), z.literal('server'), z.literal('web')])\n\n/**\n * TypeScript type inferred from {@link Channel}.\n *\n * @public\n */\nexport type Channel = z.infer<typeof Channel>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing a string-to-string dictionary.\n *\n * @remarks\n * Commonly used for query parameters or other small key–value maps.\n *\n * @public\n */\nexport const Dictionary = z.record(z.string(), z.string())\n\n/**\n * TypeScript type inferred from {@link Dictionary}.\n *\n * @public\n */\nexport type Dictionary = z.infer<typeof Dictionary>\n","import * as z from 'zod/mini'\n\n/**\n * Length (in characters) of the expected country code.\n *\n * @remarks\n * Typically corresponds to ISO 3166-1 alpha-2 country codes.\n *\n * @internal\n */\nconst COUNTRY_CODE_LENGTH = 2\n\n/**\n * Zod schema describing geographical coordinates.\n *\n * @remarks\n * Latitude and longitude are expressed in decimal degrees.\n *\n * @internal\n */\nconst Coordinates = z.object({\n /**\n * Latitude component of the coordinates.\n */\n latitude: z.number(),\n\n /**\n * Longitude component of the coordinates.\n */\n longitude: z.number(),\n})\n\n/**\n * Zod schema describing geo-location properties associated with an event.\n *\n * @remarks\n * All properties are optional and can be derived from IP or device data.\n *\n * @public\n */\nexport const GeoLocation = z.object({\n /**\n * Geographical coordinates for the location.\n */\n coordinates: z.optional(Coordinates),\n\n /**\n * City name associated with the location.\n */\n city: z.optional(z.string()),\n\n /**\n * Postal or ZIP code associated with the location.\n */\n postalCode: z.optional(z.string()),\n\n /**\n * Region or state name associated with the location.\n */\n region: z.optional(z.string()),\n\n /**\n * Region or state code associated with the location.\n */\n regionCode: z.optional(z.string()),\n\n /**\n * Country name associated with the location.\n */\n country: z.optional(z.string()),\n\n /**\n * Country code associated with the location.\n *\n * @remarks\n * Validated to exactly COUNTRY_CODE_LENGTH characters, typically\n * an ISO 3166-1 alpha-2 code.\n */\n countryCode: z.optional(z.string().check(z.length(COUNTRY_CODE_LENGTH))),\n\n /**\n * Continent name associated with the location.\n */\n continent: z.optional(z.string()),\n\n /**\n * Time zone identifier associated with the location.\n *\n * @remarks\n * Typically an IANA time zone string (e.g., `\"Europe/Berlin\"`).\n */\n timezone: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link GeoLocation}.\n *\n * @public\n */\nexport type GeoLocation = z.infer<typeof GeoLocation>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing analytics library metadata.\n *\n * @remarks\n * Identifies the client library that produced the event.\n *\n * @public\n */\nexport const Library = z.object({\n /**\n * Name of the SDK/library (e.g., `\"@contentful/optimization-web\"`).\n */\n name: z.string(),\n\n /**\n * Version of the analytics library.\n */\n version: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link Library}.\n *\n * @public\n */\nexport type Library = z.infer<typeof Library>\n","import * as z from 'zod/mini'\nimport { Dictionary } from './Dictionary'\n\n/**\n * Zod schema describing Web page-level properties for events.\n *\n * @remarks\n * The base object describes standard page attributes, while additional\n * JSON properties can be present due to the use of `z.catchall`.\n *\n * @public\n */\nexport const Page = z.catchall(\n z.object({\n /**\n * Path component of the page URL (e.g., `/products/123`).\n */\n path: z.string(),\n\n /**\n * Parsed query parameters for the page.\n */\n query: Dictionary,\n\n /**\n * Referrer URL that led to the current page.\n */\n referrer: z.string(),\n\n /**\n * Raw search string including the leading `?` (e.g., `\"?q=test\"`).\n */\n search: z.string(),\n\n /**\n * Title of the page as seen by the user.\n */\n title: z.optional(z.string()),\n\n /**\n * Full URL of the page.\n */\n url: z.string(),\n }),\n z.json(),\n)\n\n/**\n * TypeScript type inferred from {@link Page}.\n *\n * @public\n */\nexport type Page = z.infer<typeof Page>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing a generic collection of event properties.\n *\n * @remarks\n * Represents an arbitrary JSON-serializable map from string keys to values.\n *\n * @public\n */\nexport const Properties = z.record(z.string(), z.json())\n\n/**\n * TypeScript type inferred from {@link Properties}.\n *\n * @public\n */\nexport type Properties = z.infer<typeof Properties>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing screen-level properties for events.\n *\n * @remarks\n * The base object describes standard screen attributes, while additional\n * JSON properties can be present due to the use of `z.catchall`.\n *\n * @public\n */\nexport const Screen = z.catchall(\n z.object({\n /**\n * Name or label for the screen.\n */\n name: z.string(),\n }),\n z.json(),\n)\n\n/**\n * TypeScript type inferred from {@link Screen}.\n *\n * @public\n */\nexport type Screen = z.infer<typeof Screen>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing user traits / identity properties.\n *\n * @remarks\n * Represents an arbitrary JSON-serializable map from string keys to values.\n * Common traits can include `name`, `plan`, and custom attributes.\n *\n * @public\n */\nexport const Traits = z.record(z.string(), z.json())\n\n/**\n * TypeScript type inferred from {@link Traits}.\n *\n * @public\n */\nexport type Traits = z.infer<typeof Traits>\n","import * as z from 'zod/mini'\nimport { App, Campaign, Channel, GeoLocation, Library, Page, Screen } from './properties'\n\n/**\n * Zod schema describing universal event context properties shared by all\n * analytics events.\n *\n * @remarks\n * The `page` and `screen` properties are optional, but we recommend omitting\n * them for event types that are not `page` or `screen`.\n *\n * @public\n */\nexport const UniversalEventContext = z.object({\n /**\n * Application-level metadata.\n */\n app: App,\n\n /**\n * Campaign attribution metadata.\n */\n campaign: Campaign,\n\n /**\n * GDPR-related consent information.\n */\n gdpr: z.object({\n /**\n * Indicates whether the user has given consent.\n */\n isConsentGiven: z.boolean(),\n }),\n\n /**\n * Analytics library metadata.\n */\n library: Library,\n\n /**\n * Locale identifier of the event (e.g., `\"en-US\"`).\n */\n locale: z.string(),\n\n /**\n * Optional geo-location information associated with the event.\n */\n location: z.optional(GeoLocation),\n\n /**\n * User agent string of the client, if available.\n */\n userAgent: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link UniversalEventContext}.\n *\n * @public\n */\nexport type UniversalEventContext = z.infer<typeof UniversalEventContext>\n\n/**\n * Zod schema describing universal properties shared by all analytics events.\n *\n * @remarks\n * These properties capture common metadata such as channel, context,\n * timestamps, and user identifiers.\n *\n * @public\n */\nexport const UniversalEventProperties = z.object({\n /**\n * Channel from which the event originated.\n *\n * @see {@link Channel}\n */\n channel: Channel,\n\n /**\n * Context object carrying environment and client metadata.\n */\n context: z.extend(UniversalEventContext, {\n page: z.optional(Page),\n screen: z.optional(Screen),\n }),\n\n /**\n * Unique identifier for this message.\n *\n * @remarks\n * Used to deduplicate events across retries and transports.\n */\n messageId: z.string(),\n\n /**\n * Timestamp when the event originally occurred.\n *\n * @remarks\n * ISO 8601 datetime string.\n */\n originalTimestamp: z.iso.datetime(),\n\n /**\n * Timestamp when the event payload was sent.\n *\n * @remarks\n * ISO 8601 datetime string.\n */\n sentAt: z.iso.datetime(),\n\n /**\n * Timestamp when the event was recorded or processed.\n *\n * @remarks\n * ISO 8601 datetime string.\n */\n timestamp: z.iso.datetime(),\n\n /**\n * Identifier of the authenticated user, if known.\n */\n userId: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link UniversalEventProperties}.\n *\n * @public\n */\nexport type UniversalEventProperties = z.infer<typeof UniversalEventProperties>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\n\n/**\n * Zod schema describing the supported kinds of ExO entities.\n *\n * @public\n */\nexport const ExoEntityKind = z.enum(['Experience', 'Fragment', 'InlineFragment', 'InlineComponent'])\n\n/**\n * TypeScript type inferred from {@link ExoEntityKind}.\n *\n * @public\n */\nexport type ExoEntityKind = z.infer<typeof ExoEntityKind>\n\n/**\n * Zod schema describing properties shared by ExO interaction events.\n *\n * @public\n */\nexport const ExoEventProperties = z.extend(UniversalEventProperties, {\n /** Identifier of the rendered ExO entity. */\n entityId: z.string(),\n\n /** Kind of ExO entity represented by this event. */\n entityKind: ExoEntityKind,\n\n /** Optional identifier of the entity's concrete content kind. */\n entityKindId: z.optional(z.string()),\n\n /** Contentful entry identifiers rendered by the entity. */\n entryIds: z.optional(z.array(z.string())),\n\n /** Identifier of the optimization that selected the entity variant, when available. */\n optimizationId: z.optional(z.string()),\n\n /** Parameter values used to render the entity. */\n parameters: z.optional(z.record(z.string(), z.json())),\n\n /** Identifier of the containing experience, when the entity is nested. */\n parentExperienceId: z.optional(z.string()),\n\n /** Selected variant of the root experience, or `default` for its baseline. Omitted on the experience itself. */\n parentVariantId: z.optional(z.string()),\n\n /** Identifier of the selected entity variant, when available. */\n variantId: z.optional(z.string()),\n\n /** Index of the selected variant when available. */\n variantIndex: z.optional(z.number()),\n})\n\n/**\n * TypeScript type inferred from {@link ExoEventProperties}.\n *\n * @public\n */\nexport type ExoEventProperties = z.infer<typeof ExoEventProperties>\n","import * as z from 'zod/mini'\nimport { ExoEventProperties } from './ExoEventProperties'\n\n/**\n * Zod schema describing an `exo_node_view` event.\n *\n * @public\n */\nexport const ExoViewEvent = z.extend(ExoEventProperties, {\n type: z.literal('exo_node_view'),\n viewDurationMs: z.int().check(z.minimum(0)),\n viewId: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link ExoViewEvent}.\n *\n * @public\n */\nexport type ExoViewEvent = z.infer<typeof ExoViewEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\nimport { Traits } from './properties/Traits'\n\n/**\n * Zod schema describing an `identify` event.\n *\n * @remarks\n * Identify events attach user traits to a known identity.\n *\n * Extends {@link UniversalEventProperties} with a `traits` payload.\n *\n * @public\n */\nexport const IdentifyEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is an identify event.\n */\n type: z.literal('identify'),\n\n /**\n * Traits describing the user.\n *\n * @see {@link Traits}\n */\n traits: Traits,\n})\n\n/**\n * TypeScript type inferred from {@link IdentifyEvent}.\n *\n * @public\n */\nexport type IdentifyEvent = z.infer<typeof IdentifyEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventContext, UniversalEventProperties } from './UniversalEventProperties'\nimport { Page } from './properties'\n\n/**\n * Zod schema describing event context properties specific to page events.\n *\n * @public\n */\nexport const PageEventContext = z.extend(UniversalEventContext, {\n /**\n * Page context for events that occur within a web page.\n */\n page: Page,\n})\n\n/**\n * TypeScript type inferred from {@link PageEventContext}.\n *\n * @public\n */\nexport type PageEventContext = z.infer<typeof PageEventContext>\n\n/**\n * Zod schema describing a `page` view event.\n *\n * @remarks\n * Page view events track visits to web pages and associated context.\n *\n * Extends {@link UniversalEventProperties} with optional `name` and\n * page-level {@link Page} properties.\n *\n * @public\n */\nexport const PageViewEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is a page view.\n */\n type: z.literal('page'),\n\n /**\n * Optional name for the page.\n *\n * @remarks\n * Useful when the logical page name differs from the URL or title.\n */\n name: z.optional(z.string()),\n\n /**\n * Page-level properties such as URL, path, and referrer.\n */\n properties: Page,\n\n /**\n * Override the context property of {@link UniversalEventProperties}\n * with a page-specific context.\n */\n context: PageEventContext,\n})\n\n/**\n * TypeScript type inferred from {@link PageViewEvent}.\n *\n * @public\n */\nexport type PageViewEvent = z.infer<typeof PageViewEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventContext, UniversalEventProperties } from './UniversalEventProperties'\nimport { Properties, Screen } from './properties'\n\n/**\n * Zod schema describing event context properties specific to screen events.\n *\n * @public\n */\nexport const ScreenEventContext = z.extend(UniversalEventContext, {\n /**\n * Screen context for events that occur within a mobile or TV application.\n */\n screen: Screen,\n})\n\n/**\n * TypeScript type inferred from {@link ScreenEventContext}.\n *\n * @public\n */\nexport type ScreenEventContext = z.infer<typeof ScreenEventContext>\n\n/**\n * Zod schema describing a `screen` view event.\n *\n * @remarks\n * Screen view events are typically used by mobile or TV applications\n * to track navigation between screens.\n *\n * Extends {@link UniversalEventProperties}.\n *\n * @public\n */\nexport const ScreenViewEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is a screen view.\n */\n type: z.literal('screen'),\n\n /**\n * Name of the screen being viewed.\n */\n name: z.string(),\n\n /**\n * Optional properties describing the screen context.\n *\n * @see {@link Properties}\n */\n properties: z.optional(Properties),\n\n /**\n * Override the context property of {@link UniversalEventProperties}\n * with a screen-specific context.\n */\n context: ScreenEventContext,\n})\n\n/**\n * TypeScript type inferred from {@link ScreenViewEvent}.\n *\n * @public\n */\nexport type ScreenViewEvent = z.infer<typeof ScreenViewEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\nimport { Properties } from './properties'\n\n/**\n * Zod schema describing a custom `track` event.\n *\n * @remarks\n * Track events capture arbitrary user actions that do not fit into\n * the more specific event types (page, screen, identify, etc.).\n *\n * Extends {@link UniversalEventProperties}.\n *\n * @public\n */\nexport const TrackEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is a track event.\n */\n type: z.literal('track'),\n\n /**\n * Name of the event being tracked.\n */\n event: z.string(),\n\n /**\n * Additional properties describing the event.\n */\n properties: Properties,\n})\n\n/**\n * TypeScript type inferred from {@link TrackEvent}.\n *\n * @public\n */\nexport type TrackEvent = z.infer<typeof TrackEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\n\n/**\n * Zod schema describing shared interaction event properties.\n *\n * @public\n */\nexport const InteractionEventProperties = z.extend(UniversalEventProperties, {\n /**\n * Type of tracked optimization target for the interaction event.\n *\n * - `'Entry'` — A content entry.\n * - `'Variable'` — A Custom Flag or other variable-backed optimization target.\n */\n componentType: z.union([z.literal('Entry'), z.literal('Variable')]),\n\n /**\n * Contentful entry ID or flag key corresponding to the interaction.\n */\n componentId: z.string(),\n\n /**\n * Identifier of the experience that rendered this entry or flag.\n *\n * @remarks\n * Optional; interactions can occur outside of a specific experiment/personalization.\n */\n experienceId: z.optional(z.string()),\n\n /**\n * Index of the variant associated with this interaction.\n *\n * @remarks\n * Typically corresponds to the index of the selected optimization entry.\n */\n variantIndex: z.number(),\n})\n\n/**\n * TypeScript type inferred from {@link InteractionEventProperties}.\n *\n * @public\n */\nexport type InteractionEventProperties = z.infer<typeof InteractionEventProperties>\n","import * as z from 'zod/mini'\nimport { InteractionEventProperties } from './InteractionEventProperties'\n\n/**\n * Zod schema describing a `component` view event used for entry and flag exposure tracking.\n *\n * @remarks\n * These events track exposure of entries and variable-backed optimization\n * targets within an optimized experience.\n *\n * Extends {@link InteractionEventProperties}.\n *\n * @public\n */\nexport const ViewEvent = z.extend(InteractionEventProperties, {\n /**\n * Discriminator indicating that this is an entry or flag view event.\n */\n type: z.literal('component'),\n /**\n * Monotonically increasing visible duration for the active view.\n *\n * @remarks\n * This value is updated and re-emitted while the same view remains active.\n */\n viewDurationMs: z.optional(z.number()),\n /**\n * UUID identifying a single active view session.\n *\n * @remarks\n * Multiple events emitted for the same active view share this identifier.\n */\n viewId: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link ViewEvent}.\n *\n * @public\n */\nexport type ViewEvent = z.infer<typeof ViewEvent>\n","import * as z from 'zod/mini'\nimport { ExoViewEvent } from './ExoViewEvent'\nimport { IdentifyEvent } from './IdentifyEvent'\nimport { PageViewEvent } from './PageViewEvent'\nimport { ScreenViewEvent } from './ScreenViewEvent'\nimport { TrackEvent } from './TrackEvent'\nimport { ViewEvent } from './ViewEvent'\n\n/**\n * Partial schema capturing an anonymous identifier.\n *\n * @remarks\n * This object is merged into each event type in a batch to associate the\n * event with an `anonymousId`.\n *\n * @internal\n */\nconst Anon = { anonymousId: z.string() }\n\n/**\n * Zod schema describing each valid Experience API event within a batch.\n *\n * @remarks\n * This is a discriminated union on the `type` field that supports all event\n * types used in batch ingestion, each extended with an `anonymousId`.\n *\n * @public\n */\nexport const BatchExperienceEvent = z.discriminatedUnion('type', [\n z.extend(ViewEvent, Anon),\n z.extend(ExoViewEvent, Anon),\n z.extend(IdentifyEvent, Anon),\n z.extend(PageViewEvent, Anon),\n z.extend(ScreenViewEvent, Anon),\n z.extend(TrackEvent, Anon),\n])\n\n/**\n * TypeScript type inferred from {@link BatchExperienceEvent}.\n *\n * @public\n */\nexport type BatchExperienceEvent = z.infer<typeof BatchExperienceEvent>\n\n/**\n * Zod schema describing an array of {@link BatchExperienceEvent} items.\n *\n * @public\n */\nexport const BatchExperienceEventArray = z.array(BatchExperienceEvent)\n\n/**\n * TypeScript type inferred from {@link BatchExperienceEventArray}.\n *\n * @public\n */\nexport type BatchExperienceEventArray = z.infer<typeof BatchExperienceEventArray>\n","import * as z from 'zod/mini'\nimport { ExoViewEvent } from './ExoViewEvent'\nimport { IdentifyEvent } from './IdentifyEvent'\nimport { PageViewEvent } from './PageViewEvent'\nimport { ScreenViewEvent } from './ScreenViewEvent'\nimport { TrackEvent } from './TrackEvent'\nimport { ViewEvent } from './ViewEvent'\n\n/**\n * Zod schema describing any supported Experience API event.\n *\n * @remarks\n * This discriminated union aggregates all event types used by the\n * personalization/experience tracking system.\n *\n * @public\n */\nexport const ExperienceEvent = z.discriminatedUnion('type', [\n ViewEvent,\n ExoViewEvent,\n IdentifyEvent,\n PageViewEvent,\n ScreenViewEvent,\n TrackEvent,\n])\n\n/**\n * TypeScript type inferred from {@link ExperienceEvent}.\n *\n * @public\n */\nexport type ExperienceEvent = z.infer<typeof ExperienceEvent>\n\n/**\n * Union of all possible `type` values for {@link ExperienceEvent}.\n *\n * @public\n */\nexport type ExperienceEventType = ExperienceEvent['type']\n\n/**\n * Zod schema describing an array of {@link ExperienceEvent} items.\n *\n * @public\n */\nexport const ExperienceEventArray = z.array(ExperienceEvent)\n\n/**\n * TypeScript type inferred from {@link ExperienceEventArray}.\n *\n * @public\n */\nexport type ExperienceEventArray = z.infer<typeof ExperienceEventArray>\n","import * as z from 'zod/mini'\nimport { ExperienceEventArray } from './event'\n\n/**\n * Zod schema describing optional configuration for an experience request.\n *\n * @remarks\n * These options can be used to enable or filter specific features when\n * evaluating experiences.\n *\n * @public\n */\nexport const ExperienceRequestOptions = z.object({\n /**\n * Features or capabilities to enable for this request.\n */\n features: z.optional(z.array(z.string())),\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceRequestOptions}.\n *\n * @public\n */\nexport type ExperienceRequestOptions = z.infer<typeof ExperienceRequestOptions>\n\n/**\n * Zod schema describing the data payload for an experience request.\n *\n * @remarks\n * Contains the list of events to be evaluated plus optional request\n * configuration.\n *\n * @public\n */\nexport const ExperienceRequestData = z.object({\n /**\n * Experience events for the Experience API to evaluate.\n *\n * @remarks\n * Must contain at least one event.\n */\n events: ExperienceEventArray.check(z.minLength(1)),\n\n /**\n * Optional configuration for this experience request.\n */\n options: z.optional(ExperienceRequestOptions),\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceRequestData}.\n *\n * @public\n */\nexport type ExperienceRequestData = z.infer<typeof ExperienceRequestData>\n","import * as z from 'zod/mini'\nimport { BatchExperienceEventArray } from './event'\nimport { ExperienceRequestOptions } from './ExperienceRequest'\n\n/**\n * Zod schema describing the data payload for a batch experience request.\n *\n * @remarks\n * Batch events require an `anonymousId` on each event and must contain at\n * least one event.\n */\nexport const BatchExperienceRequestData = z.object({\n /**\n * Batch experience events for the Experience API to evaluate.\n *\n * @remarks\n * Must contain at least one event.\n */\n events: BatchExperienceEventArray.check(z.minLength(1)),\n\n /**\n * Optional configuration for this experience request.\n */\n options: z.optional(ExperienceRequestOptions),\n})\n\n/**\n * TypeScript type inferred from {@link BatchExperienceRequestData}.\n */\nexport type BatchExperienceRequestData = z.infer<typeof BatchExperienceRequestData>\n","import * as z from 'zod/mini'\nimport { Page } from '../../event/properties'\n\n/**\n * Zod schema describing aggregated statistics for a user session.\n *\n * @remarks\n * Captures both per-session metrics (such as `activeSessionLength`) and\n * aggregate metrics (such as `averageSessionLength`) for a given profile.\n *\n * @public\n */\nexport const SessionStatistics = z.object({\n /**\n * Unique identifier for this session statistics record.\n */\n id: z.string(),\n\n /**\n * Indicates whether the visitor has been seen before.\n *\n * @remarks\n * `true` typically means the visitor has at least one prior session.\n */\n isReturningVisitor: z.boolean(),\n\n /**\n * Landing page for the session.\n *\n * @remarks\n * Represents the first page the user visited in this session.\n *\n * @see {@link Page}\n */\n landingPage: Page,\n\n /**\n * Number of sessions associated with this profile or identifier.\n *\n * @remarks\n * Often used in combination with `SessionStatistics.averageSessionLength`.\n */\n count: z.number(),\n\n /**\n * Duration of the active session.\n */\n activeSessionLength: z.number(),\n\n /**\n * Average session duration across all sessions represented by this record.\n *\n * @remarks\n * The unit must match `SessionStatistics.activeSessionLength`.\n */\n averageSessionLength: z.number(),\n})\n\n/**\n * TypeScript type inferred from {@link SessionStatistics}.\n *\n * @public\n */\nexport type SessionStatistics = z.infer<typeof SessionStatistics>\n","import * as z from 'zod/mini'\nimport { GeoLocation } from '../event/properties'\nimport { Traits } from '../event/properties/Traits'\nimport { SessionStatistics } from './properties'\n\n/**\n * Zod schema describing a full user profile as received from the Experience API.\n *\n * @remarks\n * Represents the server-side view of a profile, including identifiers,\n * traits, audiences, location, and session statistics.\n *\n * @public\n */\nexport const Profile = z.object({\n /**\n * Primary identifier of the profile.\n */\n id: z.string(),\n\n /**\n * Stable, long-lived identifier of the profile.\n *\n * @remarks\n * Intended to remain constant across sessions and devices when possible.\n * Usually equal to `id`.\n */\n stableId: z.string(),\n\n /**\n * Random value associated with the profile.\n *\n * @remarks\n * Often used for deterministic bucketing (e.g., in experiments).\n */\n random: z.number(),\n\n /**\n * List of audience identifiers that this profile belongs to.\n */\n audiences: z.array(z.string()),\n\n /**\n * Traits describing the profile (user-level attributes).\n *\n * @see {@link Traits}\n */\n traits: Traits,\n\n /**\n * Geo-location information associated with the profile.\n *\n * @see {@link GeoLocation}\n */\n location: GeoLocation,\n\n /**\n * Aggregated session statistics for the profile.\n *\n * @see {@link SessionStatistics}\n */\n session: SessionStatistics,\n})\n\n/**\n * TypeScript type inferred from {@link Profile}.\n *\n * @public\n */\nexport type Profile = z.infer<typeof Profile>\n\n/**\n * Zod schema describing a partial profile payload used for sending events\n * to the Experience & Insights APIs.\n *\n * @remarks\n * This schema enforces the presence of an `id` field and allows additional\n * JSON-serializable properties via `z.catchall`.\n *\n * @public\n */\nexport const PartialProfile = z.catchall(\n z.object({\n /**\n * Identifier of the profile.\n *\n * @remarks\n * Used to associate events with an existing profile.\n */\n id: z.string(),\n }),\n z.json(),\n)\n\n/**\n * TypeScript type inferred from {@link PartialProfile}.\n *\n * @public\n */\nexport type PartialProfile = z.infer<typeof PartialProfile>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing the common envelope structure of responses\n * from the Experience API.\n *\n * @remarks\n * Concrete responses extend this schema and refine the `data` property\n * to a more specific shape.\n *\n * @public\n */\nexport const ResponseEnvelope = z.object({\n /**\n * Response payload.\n *\n * @remarks\n * The base schema uses an empty object; specific responses extend this\n * with more detailed structures.\n */\n data: z.object(),\n\n /**\n * Human-readable message accompanying the response.\n */\n message: z.string(),\n\n /**\n * Error details, or `null` when the request succeeded.\n */\n error: z.nullable(z.object({ code: z.string() })),\n})\n\n/**\n * TypeScript type inferred from {@link ResponseEnvelope}.\n *\n * @public\n */\nexport type ResponseEnvelope = z.infer<typeof ResponseEnvelope>\n","import * as z from 'zod/mini'\nimport { Profile } from './profile'\nimport { ResponseEnvelope } from './ResponseEnvelope'\n\n/**\n * Zod schema describing the `data` property of a batch experience response.\n *\n * @remarks\n * A batch request can return zero or more profiles. When no profiles are\n * returned, `profiles` can be omitted or an empty array.\n *\n * @public\n */\nexport const BatchExperienceResponseData = z.object({\n /**\n * Profiles evaluated or affected by the batch experience request.\n */\n profiles: z.optional(z.array(Profile)),\n})\n\n/**\n * TypeScript type inferred from {@link BatchExperienceResponseData}.\n *\n * @public\n */\nexport type BatchExperienceResponseData = z.infer<typeof BatchExperienceResponseData>\n\n/**\n * Zod schema describing a batch experience response from the Experience API.\n *\n * @remarks\n * Extends {@link ResponseEnvelope} with {@link BatchExperienceResponseData} as the\n * `data` payload.\n *\n * @public\n */\nexport const BatchExperienceResponse = z.extend(ResponseEnvelope, {\n data: BatchExperienceResponseData,\n})\n\n/**\n * TypeScript type inferred from {@link BatchExperienceResponse}.\n *\n * @public\n */\nexport type BatchExperienceResponse = z.infer<typeof BatchExperienceResponse>\n","import * as z from 'zod/mini'\n\n/**\n * Enumeration of supported change types.\n *\n * @public\n */\nexport const ChangeType = ['Variable', 'Experience', 'Fragment'] as const\n\n/**\n * Zod schema describing the base shape for a change.\n *\n * @remarks\n * This base is extended by specific change types such as {@link VariableChange}.\n *\n * @internal\n */\nexport const ChangeBase = z.object({\n /**\n * Key identifying the subject of the change.\n */\n key: z.string(),\n\n /**\n * Discriminator for the change type.\n *\n * @remarks\n * Can be one of {@link ChangeType} or an arbitrary string for unknown types.\n */\n type: z.union([z.enum(ChangeType), z.string()]),\n\n /**\n * Metadata describing the originating experience and variant index.\n */\n meta: z.object({\n /**\n * Identifier of the personalization or experiment experience.\n */\n experienceId: z.string(),\n\n /**\n * Index of the variant within the experience configuration.\n *\n * @remarks\n * Typically corresponds to the array index in the experience's distribution.\n */\n variantIndex: z.number(),\n }),\n})\n\n/**\n * Zod schema for the allowed value types of a variable change.\n *\n * @remarks\n * Supports primitives and JSON objects keyed by strings.\n *\n * @public\n */\nexport const VariableChangeValue = z.union([\n z.string(),\n z.boolean(),\n z.null(),\n z.number(),\n z.record(z.string(), z.json()),\n])\n\n/**\n * Zod schema representing an unknown change type.\n *\n * @remarks\n * This can be used to handle forward-compatible change payloads where\n * the `type` is not recognized.\n *\n * @public\n */\nexport const UnknownChange = z.extend(ChangeBase, {\n /**\n * Unconstrained change type string.\n */\n type: z.string(),\n\n /**\n * Payload for the change value, with unknown structure.\n */\n value: z.unknown(),\n})\n\n/**\n * TypeScript type inferred from {@link UnknownChange}.\n *\n * @public\n */\nexport type UnknownChange = z.infer<typeof UnknownChange>\n\n/**\n * Zod schema representing a change whose type is `'Variable'`.\n *\n * @remarks\n * The `value` must conform to {@link VariableChangeValue}.\n *\n * @public\n */\nexport const VariableChange = z.extend(ChangeBase, {\n /**\n * Discriminator for a variable change.\n */\n type: z.literal('Variable'),\n\n /**\n * New value for the variable identified by `ChangeBase.key`.\n */\n value: VariableChangeValue,\n})\n\n/**\n * TypeScript type inferred from {@link VariableChange}.\n *\n * @public\n */\nexport type VariableChange = z.infer<typeof VariableChange>\n\n/**\n * Zod schema describing the base shape shared by entity-based changes\n * ({@link ExperienceChange} and {@link FragmentChange}).\n *\n * @internal\n */\nexport const EntityChangeBase = z.object({\n /**\n * Identifier of the entity affected by the change.\n */\n id: z.string(),\n\n /**\n * Identifier of the selected variant.\n */\n variantId: z.string(),\n\n /**\n * Metadata describing the originating optimization and variant index.\n */\n meta: z.object({\n /**\n * Identifier of the optimization that produced this change.\n */\n optimizationId: z.string(),\n\n /**\n * Index of the variant within the optimization's distribution.\n */\n variantIndex: z.number(),\n }),\n})\n\n/**\n * Zod schema representing a change whose type is `'Experience'`.\n *\n * @public\n */\nexport const ExperienceChange = z.extend(EntityChangeBase, {\n /**\n * Discriminator for an experience change.\n */\n type: z.literal('Experience'),\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceChange}.\n *\n * @public\n */\nexport type ExperienceChange = z.infer<typeof ExperienceChange>\n\n/**\n * Zod schema representing a change whose type is `'Fragment'`.\n *\n * @public\n */\nexport const FragmentChange = z.extend(EntityChangeBase, {\n /**\n * Discriminator for a fragment change.\n */\n type: z.literal('Fragment'),\n})\n\n/**\n * TypeScript type inferred from {@link FragmentChange}.\n *\n * @public\n */\nexport type FragmentChange = z.infer<typeof FragmentChange>\n\n/**\n * JSON value type inferred from {@link z.json}.\n *\n * @remarks\n * Represents any JSON-serializable value.\n *\n * @public\n */\nexport type Json = z.infer<typeof z.json>\n\n/**\n * Map of Custom Flag keys to JSON values.\n *\n * @public\n */\nexport type Flags = Record<string, Json>\n\n/**\n * Union of supported change types.\n *\n * @public\n */\nexport const Change = z.discriminatedUnion('type', [\n VariableChange,\n ExperienceChange,\n FragmentChange,\n])\n\n/**\n * TypeScript type inferred from {@link Change}.\n *\n * @public\n */\nexport type Change = z.infer<typeof Change>\n\n/**\n * Zod schema representing an array of {@link Change} items.\n *\n * @public\n */\nexport const ChangeArray = z.array(Change)\n\n/**\n * TypeScript type inferred from {@link ChangeArray}.\n *\n * @public\n */\nexport type ChangeArray = z.infer<typeof ChangeArray>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing a selected optimization outcome for a user.\n *\n * @remarks\n * Represents the result of choosing a specific variant for a given\n * experience, along with additional metadata such as whether the\n * selection is sticky.\n *\n * @public\n */\nexport const SelectedOptimization = z.object({\n /**\n * Identifier of the personalization or experiment experience.\n */\n experienceId: z.string(),\n\n /**\n * Index of the selected variant within the experience configuration.\n *\n * @remarks\n * Typically corresponds to the index of the selected `OptimizationConfig` entry.\n */\n variantIndex: z.number(),\n\n /**\n * Mapping of baseline entry IDs to their selected variant entry IDs.\n *\n * @remarks\n * The keys are component identifiers and the values are the\n * identifiers of the selected variant for that component.\n */\n variants: z.record(z.string(), z.string()),\n\n /**\n * Indicates whether this optimization selection is sticky for the user.\n *\n * @defaultValue false\n *\n * @remarks\n * Reuse sticky selections on subsequent requests for the same user rather\n * than re-allocating a new variant.\n */\n sticky: z.optional(z.prefault(z.boolean(), false)),\n})\n\n/**\n * TypeScript type inferred from {@link SelectedOptimization}.\n *\n * @public\n */\nexport type SelectedOptimization = z.infer<typeof SelectedOptimization>\n\n/**\n * Zod schema describing an array of {@link SelectedOptimization} items.\n *\n * @remarks\n * Useful when multiple experiences are evaluated at once.\n *\n * @public\n */\nexport const SelectedOptimizationArray = z.array(SelectedOptimization)\n\n/**\n * TypeScript type inferred from {@link SelectedOptimizationArray}.\n *\n * @public\n */\nexport type SelectedOptimizationArray = z.infer<typeof SelectedOptimizationArray>\n","import * as z from 'zod/mini'\nimport { ChangeArray } from './change'\nimport { SelectedOptimizationArray } from './optimization'\nimport { Profile } from './profile'\nimport { ResponseEnvelope } from './ResponseEnvelope'\n\n/**\n * Zod schema describing the `data` payload of a standard Experience API response.\n *\n * @remarks\n * Contains the evaluated profile, selected optimizations, and computed\n * changes to apply on the client.\n *\n * @public\n */\nexport const ExperienceData = z.object({\n /**\n * Profile associated with the evaluated events.\n */\n profile: Profile,\n\n /**\n * Selected experiences and variants for the profile.\n *\n * @see {@link SelectedOptimizationArray}\n */\n experiences: SelectedOptimizationArray,\n\n /**\n * Used for Custom Flags.\n *\n * @see {@link ChangeArray}\n */\n changes: ChangeArray,\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceData}.\n *\n * @public\n */\nexport type ExperienceData = z.infer<typeof ExperienceData>\n\n/**\n * Zod schema describing a full Experience API response.\n *\n * @remarks\n * Extends {@link ResponseEnvelope} with {@link ExperienceData} as the `data` payload.\n *\n * @public\n */\nexport const ExperienceResponse = z.extend(ResponseEnvelope, { data: ExperienceData })\n\n/**\n * TypeScript type inferred from {@link ExperienceResponse}.\n *\n * @public\n */\nexport type ExperienceResponse = z.infer<typeof ExperienceResponse>\n\n/**\n * Optimization data shape used for compatibility outside the API adapter.\n *\n * @remarks\n * This type mirrors {@link ExperienceData} but replaces the `experiences`\n * field with `selectedOptimizations` while preserving the rest of the structure.\n *\n * @public\n */\nexport type OptimizationData = Omit<ExperienceData, 'experiences'> & {\n /**\n * Selected optimizations for the profile.\n */\n selectedOptimizations: SelectedOptimizationArray\n}\n","import * as z from 'zod/mini'\nimport { InteractionEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing a `component_click` event used for entry click tracking.\n *\n * @remarks\n * These events track click interactions for entries within an optimized\n * experience.\n *\n * Extends {@link InteractionEventProperties}.\n *\n * @public\n */\nexport const ClickEvent = z.extend(InteractionEventProperties, {\n /**\n * Discriminator indicating that this is an entry click event.\n */\n type: z.literal('component_click'),\n})\n\n/**\n * TypeScript type inferred from {@link ClickEvent}.\n *\n * @public\n */\nexport type ClickEvent = z.infer<typeof ClickEvent>\n","import * as z from 'zod/mini'\nimport { ExoEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing an `exo_node_click` event.\n *\n * @public\n */\nexport const ExoClickEvent = z.extend(ExoEventProperties, {\n type: z.literal('exo_node_click'),\n})\n\n/**\n * TypeScript type inferred from {@link ExoClickEvent}.\n *\n * @public\n */\nexport type ExoClickEvent = z.infer<typeof ExoClickEvent>\n","import * as z from 'zod/mini'\nimport { ExoEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing an `exo_node_hover` event.\n *\n * @public\n */\nexport const ExoHoverEvent = z.extend(ExoEventProperties, {\n type: z.literal('exo_node_hover'),\n hoverDurationMs: z.int().check(z.minimum(0)),\n hoverId: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link ExoHoverEvent}.\n *\n * @public\n */\nexport type ExoHoverEvent = z.infer<typeof ExoHoverEvent>\n","import * as z from 'zod/mini'\nimport { InteractionEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing a `component_hover` event used for entry hover tracking.\n *\n * @remarks\n * These events track hover interactions for entries within an optimized\n * experience.\n *\n * Extends {@link InteractionEventProperties}.\n *\n * @public\n */\nexport const HoverEvent = z.extend(InteractionEventProperties, {\n /**\n * Discriminator indicating that this is an entry hover event.\n */\n type: z.literal('component_hover'),\n /**\n * Monotonically increasing hover duration for the active hover.\n *\n * @remarks\n * This value is updated and re-emitted while the same hover remains active.\n */\n hoverDurationMs: z.number(),\n /**\n * UUID identifying a single active hover session.\n *\n * @remarks\n * Multiple events emitted for the same active hover share this identifier.\n */\n hoverId: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link HoverEvent}.\n *\n * @public\n */\nexport type HoverEvent = z.infer<typeof HoverEvent>\n","import * as z from 'zod/mini'\nimport { ExoViewEvent, ViewEvent } from '../../experience/event'\nimport { ClickEvent } from './ClickEvent'\nimport { ExoClickEvent } from './ExoClickEvent'\nimport { ExoHoverEvent } from './ExoHoverEvent'\nimport { HoverEvent } from './HoverEvent'\n\n/**\n * Zod schema describing an Insights event.\n *\n * @remarks\n * Insights events include legacy component interactions and ExO node\n * interactions.\n *\n * @public\n */\nexport const InsightsEvent = z.discriminatedUnion('type', [\n ViewEvent,\n ClickEvent,\n HoverEvent,\n ExoViewEvent,\n ExoClickEvent,\n ExoHoverEvent,\n])\n\n/**\n * TypeScript type inferred from {@link InsightsEvent}.\n *\n * @public\n */\nexport type InsightsEvent = z.infer<typeof InsightsEvent>\n\n/**\n * Union of all possible `type` values for {@link InsightsEvent}.\n *\n * @public\n */\nexport type InsightsEventType = InsightsEvent['type']\n\n/**\n * Zod schema describing an array of {@link InsightsEvent} items.\n *\n * @public\n */\nexport const InsightsEventArray = z.array(InsightsEvent)\n\n/**\n * TypeScript type inferred from {@link InsightsEventArray}.\n *\n * @public\n */\nexport type InsightsEventArray = z.infer<typeof InsightsEventArray>\n","import * as z from 'zod/mini'\nimport { PartialProfile } from '../../experience/profile'\nimport { InsightsEventArray } from './InsightsEvent'\n\n/**\n * Zod schema describing a batched Insights event payload.\n *\n * @remarks\n * Combines a {@link PartialProfile} with one or more Insights events\n * to be sent to the Contentful Insights API.\n *\n * @public\n */\nexport const BatchInsightsEvent = z.object({\n /**\n * Partial profile information used to associate events with a user.\n *\n * @see {@link PartialProfile}\n */\n profile: PartialProfile,\n\n /**\n * Insights events to record for this profile.\n *\n * @see {@link InsightsEventArray}\n */\n events: InsightsEventArray,\n})\n\n/**\n * TypeScript type inferred from {@link BatchInsightsEvent}.\n *\n * @public\n */\nexport type BatchInsightsEvent = z.infer<typeof BatchInsightsEvent>\n\n/**\n * Zod schema describing an array of {@link BatchInsightsEvent} items.\n *\n * @remarks\n * Useful when sending multiple profile/event batches in a single request.\n *\n * @public\n */\nexport const BatchInsightsEventArray = z.array(BatchInsightsEvent)\n\n/**\n * TypeScript type inferred from {@link BatchInsightsEventArray}.\n *\n * @public\n */\nexport type BatchInsightsEventArray = z.infer<typeof BatchInsightsEventArray>\n","import * as z from 'zod/mini'\nimport en from 'zod/v4/locales/en.js'\n\nz.config(en())\n\nexport function parseWithFriendlyError<T extends z.ZodMiniType>(\n schema: T,\n data: unknown,\n): z.output<T> {\n const result = schema.safeParse(data)\n if (result.success) return result.data\n\n throw new Error(z.prettifyError(result.error))\n}\n"],"names":["App","z","Campaign","Channel","Dictionary","COUNTRY_CODE_LENGTH","Coordinates","GeoLocation","Library","Page","Properties","Screen","Traits","UniversalEventContext","UniversalEventProperties","ExoEntityKind","ExoEventProperties","ExoViewEvent","IdentifyEvent","PageEventContext","PageViewEvent","ScreenEventContext","ScreenViewEvent","TrackEvent","InteractionEventProperties","ViewEvent","Anon","BatchExperienceEvent","BatchExperienceEventArray","ExperienceEvent","ExperienceEventArray","ExperienceRequestOptions","ExperienceRequestData","BatchExperienceRequestData","SessionStatistics","Profile","PartialProfile","ResponseEnvelope","BatchExperienceResponseData","BatchExperienceResponse","ChangeType","ChangeBase","VariableChangeValue","UnknownChange","VariableChange","EntityChangeBase","ExperienceChange","FragmentChange","Change","ChangeArray","SelectedOptimization","SelectedOptimizationArray","ExperienceData","ExperienceResponse","ClickEvent","ExoClickEvent","ExoHoverEvent","HoverEvent","InsightsEvent","InsightsEventArray","BatchInsightsEvent","BatchInsightsEventArray","en","parseWithFriendlyError","schema","data","result","Error"],"mappings":";;AAaO,MAAMA,MAAMC,oCAAAA,QAAU,CAC3BA,oCAAAA,MAAQ,CAAC;IAIP,MAAMA,oCAAAA,MAAQ;IAKd,SAASA,oCAAAA,MAAQ;AACnB;ACdK,MAAMC,WAAWD,oCAAAA,MAAQ,CAAC;IAI/B,MAAMA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAKzB,QAAQA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAK3B,QAAQA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAK3B,MAAMA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAKzB,SAASA,oCAAAA,QAA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;IACAxC;IACAsC;IACAC;CACD;AAqBM,MAAMG,qBAAqB1D,oCAAAA,KAAO,CAACyD;AC/BnC,MAAME,qBAAqB3D,oCAAAA,MAAQ,CAAC;IAMzC,SAASmC;IAOT,QAAQuB;AACV;AAiBO,MAAME,0BAA0B5D,oCAAAA,KAAO,CAAC2D;ACzC/C3D,oCAAAA,MAAQ,CAAC6D;AAEF,SAASC,uBACdC,MAAS,EACTC,IAAa;IAEb,MAAMC,SAASF,OAAO,SAAS,CAACC;IAChC,IAAIC,OAAO,OAAO,EAAE,OAAOA,OAAO,IAAI;IAEtC,MAAM,IAAIC,MAAMlE,oCAAAA,aAAe,CAACiE,OAAO,KAAK;AAC9C"}
|
|
1
|
+
{"version":3,"file":"api-schemas.mjs","sources":["../src/schemas/experience/event/properties/App.ts","../src/schemas/experience/event/properties/Campaign.ts","../src/schemas/experience/event/properties/Channel.ts","../src/schemas/experience/event/properties/Dictionary.ts","../src/schemas/experience/event/properties/GeoLocation.ts","../src/schemas/experience/event/properties/Library.ts","../src/schemas/experience/event/properties/Page.ts","../src/schemas/experience/event/properties/Properties.ts","../src/schemas/experience/event/properties/Screen.ts","../src/schemas/experience/event/properties/Traits.ts","../src/schemas/experience/event/UniversalEventProperties.ts","../src/schemas/experience/event/ExoEventProperties.ts","../src/schemas/experience/event/ExoViewEvent.ts","../src/schemas/experience/event/IdentifyEvent.ts","../src/schemas/experience/event/PageViewEvent.ts","../src/schemas/experience/event/ScreenViewEvent.ts","../src/schemas/experience/event/TrackEvent.ts","../src/schemas/experience/event/InteractionEventProperties.ts","../src/schemas/experience/event/ViewEvent.ts","../src/schemas/experience/event/BatchExperienceEvent.ts","../src/schemas/experience/event/ExperienceEvent.ts","../src/schemas/experience/ExperienceRequest.ts","../src/schemas/experience/BatchExperienceRequest.ts","../src/schemas/experience/profile/properties/SessionStatistics.ts","../src/schemas/experience/profile/Profile.ts","../src/schemas/experience/ResponseEnvelope.ts","../src/schemas/experience/BatchExperienceResponse.ts","../src/schemas/experience/change/Change.ts","../src/schemas/experience/optimization/SelectedOptimization.ts","../src/schemas/experience/ExperienceResponse.ts","../src/schemas/insights/event/ClickEvent.ts","../src/schemas/insights/event/ExoClickEvent.ts","../src/schemas/insights/event/ExoHoverEvent.ts","../src/schemas/insights/event/HoverEvent.ts","../src/schemas/insights/event/InsightsEvent.ts","../src/schemas/insights/event/BatchInsightsEvent.ts","../src/schemas/validation/parseWithFriendlyError.ts"],"sourcesContent":["import * as z from 'zod/mini'\n\n/**\n * Zod schema describing app-level properties.\n *\n * @remarks\n * These properties typically describe the application that is emitting\n * analytics events, such as its name and version.\n *\n * The entire object is optional; when omitted, no app context is attached.\n *\n * @public\n */\nexport const App = z.optional(\n z.object({\n /**\n * Name of the application.\n */\n name: z.string(),\n\n /**\n * Version of the application.\n */\n version: z.string(),\n }),\n)\n\n/**\n * TypeScript type inferred from {@link App}.\n *\n * @public\n */\nexport type App = z.infer<typeof App>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing campaign attribution properties.\n *\n * @remarks\n * These fields typically mirror UTM parameters used for marketing campaigns.\n *\n * @public\n */\nexport const Campaign = z.object({\n /**\n * Name of the campaign (e.g., `utm_campaign`).\n */\n name: z.optional(z.string()),\n\n /**\n * Campaign source (e.g., `utm_source`).\n */\n source: z.optional(z.string()),\n\n /**\n * Campaign medium (e.g., `utm_medium`).\n */\n medium: z.optional(z.string()),\n\n /**\n * Campaign term (e.g., `utm_term`).\n */\n term: z.optional(z.string()),\n\n /**\n * Campaign content (e.g., `utm_content`).\n */\n content: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link Campaign}.\n *\n * @public\n */\nexport type Campaign = z.infer<typeof Campaign>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing the analytics channel.\n *\n * @remarks\n * Indicates the execution environment where the event originated.\n *\n * - `'mobile'` — Events from native or hybrid mobile apps.\n * - `'server'` — Events emitted from backend/server-side code.\n * - `'web'` — Events from web browsers or web-based clients.\n *\n * @public\n */\nexport const Channel = z.union([z.literal('mobile'), z.literal('server'), z.literal('web')])\n\n/**\n * TypeScript type inferred from {@link Channel}.\n *\n * @public\n */\nexport type Channel = z.infer<typeof Channel>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing a string-to-string dictionary.\n *\n * @remarks\n * Commonly used for query parameters or other small key–value maps.\n *\n * @public\n */\nexport const Dictionary = z.record(z.string(), z.string())\n\n/**\n * TypeScript type inferred from {@link Dictionary}.\n *\n * @public\n */\nexport type Dictionary = z.infer<typeof Dictionary>\n","import * as z from 'zod/mini'\n\n/**\n * Length (in characters) of the expected country code.\n *\n * @remarks\n * Typically corresponds to ISO 3166-1 alpha-2 country codes.\n *\n * @internal\n */\nconst COUNTRY_CODE_LENGTH = 2\n\n/**\n * Zod schema describing geographical coordinates.\n *\n * @remarks\n * Latitude and longitude are expressed in decimal degrees.\n *\n * @internal\n */\nconst Coordinates = z.object({\n /**\n * Latitude component of the coordinates.\n */\n latitude: z.number(),\n\n /**\n * Longitude component of the coordinates.\n */\n longitude: z.number(),\n})\n\n/**\n * Zod schema describing geo-location properties for an event or singular profile request.\n *\n * @remarks\n * All properties are optional and can be derived from IP or device data.\n *\n * @public\n */\nexport const GeoLocation = z.object({\n /**\n * Geographical coordinates for the location.\n */\n coordinates: z.optional(Coordinates),\n\n /**\n * City name associated with the location.\n */\n city: z.optional(z.string()),\n\n /**\n * Postal or ZIP code associated with the location.\n */\n postalCode: z.optional(z.string()),\n\n /**\n * Region or state name associated with the location.\n */\n region: z.optional(z.string()),\n\n /**\n * Region or state code associated with the location.\n */\n regionCode: z.optional(z.string()),\n\n /**\n * Country name associated with the location.\n */\n country: z.optional(z.string()),\n\n /**\n * Country code associated with the location.\n *\n * @remarks\n * Validated to exactly COUNTRY_CODE_LENGTH characters, typically\n * an ISO 3166-1 alpha-2 code.\n */\n countryCode: z.optional(z.string().check(z.length(COUNTRY_CODE_LENGTH))),\n\n /**\n * Continent name associated with the location.\n */\n continent: z.optional(z.string()),\n\n /**\n * Time zone identifier associated with the location.\n *\n * @remarks\n * Typically an IANA time zone string (e.g., `\"Europe/Berlin\"`).\n */\n timezone: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link GeoLocation}.\n *\n * @public\n */\nexport type GeoLocation = z.infer<typeof GeoLocation>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing analytics library metadata.\n *\n * @remarks\n * Identifies the client library that produced the event.\n *\n * @public\n */\nexport const Library = z.object({\n /**\n * Name of the SDK/library (e.g., `\"@contentful/optimization-web\"`).\n */\n name: z.string(),\n\n /**\n * Version of the analytics library.\n */\n version: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link Library}.\n *\n * @public\n */\nexport type Library = z.infer<typeof Library>\n","import * as z from 'zod/mini'\nimport { Dictionary } from './Dictionary'\n\n/**\n * Zod schema describing Web page-level properties for events.\n *\n * @remarks\n * The base object describes standard page attributes, while additional\n * JSON properties can be present due to the use of `z.catchall`.\n *\n * @public\n */\nexport const Page = z.catchall(\n z.object({\n /**\n * Path component of the page URL (e.g., `/products/123`).\n */\n path: z.string(),\n\n /**\n * Parsed query parameters for the page.\n */\n query: Dictionary,\n\n /**\n * Referrer URL that led to the current page.\n */\n referrer: z.string(),\n\n /**\n * Raw search string including the leading `?` (e.g., `\"?q=test\"`).\n */\n search: z.string(),\n\n /**\n * Title of the page as seen by the user.\n */\n title: z.optional(z.string()),\n\n /**\n * Full URL of the page.\n */\n url: z.string(),\n }),\n z.json(),\n)\n\n/**\n * TypeScript type inferred from {@link Page}.\n *\n * @public\n */\nexport type Page = z.infer<typeof Page>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing a generic collection of event properties.\n *\n * @remarks\n * Represents an arbitrary JSON-serializable map from string keys to values.\n *\n * @public\n */\nexport const Properties = z.record(z.string(), z.json())\n\n/**\n * TypeScript type inferred from {@link Properties}.\n *\n * @public\n */\nexport type Properties = z.infer<typeof Properties>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing screen-level properties for events.\n *\n * @remarks\n * The base object describes standard screen attributes, while additional\n * JSON properties can be present due to the use of `z.catchall`.\n *\n * @public\n */\nexport const Screen = z.catchall(\n z.object({\n /**\n * Name or label for the screen.\n */\n name: z.string(),\n }),\n z.json(),\n)\n\n/**\n * TypeScript type inferred from {@link Screen}.\n *\n * @public\n */\nexport type Screen = z.infer<typeof Screen>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing user traits / identity properties.\n *\n * @remarks\n * Represents an arbitrary JSON-serializable map from string keys to values.\n * Common traits can include `name`, `plan`, and custom attributes.\n *\n * @public\n */\nexport const Traits = z.record(z.string(), z.json())\n\n/**\n * TypeScript type inferred from {@link Traits}.\n *\n * @public\n */\nexport type Traits = z.infer<typeof Traits>\n","import * as z from 'zod/mini'\nimport { App, Campaign, Channel, GeoLocation, Library, Page, Screen } from './properties'\n\n/**\n * Zod schema describing universal event context properties shared by all\n * analytics events.\n *\n * @remarks\n * The `page` and `screen` properties are optional, but we recommend omitting\n * them for event types that are not `page` or `screen`.\n *\n * @public\n */\nexport const UniversalEventContext = z.object({\n /**\n * Application-level metadata.\n */\n app: App,\n\n /**\n * Campaign attribution metadata.\n */\n campaign: Campaign,\n\n /**\n * GDPR-related consent information.\n */\n gdpr: z.object({\n /**\n * Indicates whether the user has given consent.\n */\n isConsentGiven: z.boolean(),\n }),\n\n /**\n * Analytics library metadata.\n */\n library: Library,\n\n /**\n * Locale identifier of the event (e.g., `\"en-US\"`).\n */\n locale: z.string(),\n\n /**\n * Optional geo-location information associated with the event.\n */\n location: z.optional(GeoLocation),\n\n /**\n * User agent string of the client, if available.\n */\n userAgent: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link UniversalEventContext}.\n *\n * @public\n */\nexport type UniversalEventContext = z.infer<typeof UniversalEventContext>\n\n/**\n * Zod schema describing universal properties shared by all analytics events.\n *\n * @remarks\n * These properties capture common metadata such as channel, context,\n * timestamps, and user identifiers.\n *\n * @public\n */\nexport const UniversalEventProperties = z.object({\n /**\n * Channel from which the event originated.\n *\n * @see {@link Channel}\n */\n channel: Channel,\n\n /**\n * Context object carrying environment and client metadata.\n */\n context: z.extend(UniversalEventContext, {\n page: z.optional(Page),\n screen: z.optional(Screen),\n }),\n\n /**\n * Unique identifier for this message.\n *\n * @remarks\n * Used to deduplicate events across retries and transports.\n */\n messageId: z.string(),\n\n /**\n * Timestamp when the event originally occurred.\n *\n * @remarks\n * ISO 8601 datetime string.\n */\n originalTimestamp: z.iso.datetime(),\n\n /**\n * Timestamp when the event payload was sent.\n *\n * @remarks\n * ISO 8601 datetime string.\n */\n sentAt: z.iso.datetime(),\n\n /**\n * Timestamp when the event was recorded or processed.\n *\n * @remarks\n * ISO 8601 datetime string.\n */\n timestamp: z.iso.datetime(),\n\n /**\n * Identifier of the authenticated user, if known.\n */\n userId: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link UniversalEventProperties}.\n *\n * @public\n */\nexport type UniversalEventProperties = z.infer<typeof UniversalEventProperties>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\n\n/**\n * Zod schema describing the supported kinds of ExO entities.\n *\n * @public\n */\nexport const ExoEntityKind = z.enum(['Experience', 'Fragment', 'InlineFragment', 'InlineComponent'])\n\n/**\n * TypeScript type inferred from {@link ExoEntityKind}.\n *\n * @public\n */\nexport type ExoEntityKind = z.infer<typeof ExoEntityKind>\n\n/**\n * Zod schema describing properties shared by ExO interaction events.\n *\n * @public\n */\nexport const ExoEventProperties = z.extend(UniversalEventProperties, {\n /** Identifier of the rendered ExO entity. */\n entityId: z.string(),\n\n /** Kind of ExO entity represented by this event. */\n entityKind: ExoEntityKind,\n\n /** Optional identifier of the entity's concrete content kind. */\n entityKindId: z.optional(z.string()),\n\n /** Contentful entry identifiers rendered by the entity. */\n entryIds: z.optional(z.array(z.string())),\n\n /** Identifier of the optimization that selected the entity variant, when available. */\n optimizationId: z.optional(z.string()),\n\n /** Parameter values used to render the entity. */\n parameters: z.optional(z.record(z.string(), z.json())),\n\n /** Identifier of the containing experience, when the entity is nested. */\n parentExperienceId: z.optional(z.string()),\n\n /** Selected variant of the root experience, or `default` for its baseline. Omitted on the experience itself. */\n parentVariantId: z.optional(z.string()),\n\n /** Identifier of the selected entity variant, when available. */\n variantId: z.optional(z.string()),\n\n /** Index of the selected variant when available. */\n variantIndex: z.optional(z.number()),\n})\n\n/**\n * TypeScript type inferred from {@link ExoEventProperties}.\n *\n * @public\n */\nexport type ExoEventProperties = z.infer<typeof ExoEventProperties>\n","import * as z from 'zod/mini'\nimport { ExoEventProperties } from './ExoEventProperties'\n\n/**\n * Zod schema describing an `exo_node_view` event.\n *\n * @public\n */\nexport const ExoViewEvent = z.extend(ExoEventProperties, {\n type: z.literal('exo_node_view'),\n viewDurationMs: z.int().check(z.minimum(0)),\n viewId: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link ExoViewEvent}.\n *\n * @public\n */\nexport type ExoViewEvent = z.infer<typeof ExoViewEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\nimport { Traits } from './properties/Traits'\n\n/**\n * Zod schema describing an `identify` event.\n *\n * @remarks\n * Identify events attach user traits to a known identity.\n *\n * Extends {@link UniversalEventProperties} with a `traits` payload.\n *\n * @public\n */\nexport const IdentifyEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is an identify event.\n */\n type: z.literal('identify'),\n\n /**\n * Traits describing the user.\n *\n * @see {@link Traits}\n */\n traits: Traits,\n})\n\n/**\n * TypeScript type inferred from {@link IdentifyEvent}.\n *\n * @public\n */\nexport type IdentifyEvent = z.infer<typeof IdentifyEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventContext, UniversalEventProperties } from './UniversalEventProperties'\nimport { Page } from './properties'\n\n/**\n * Zod schema describing event context properties specific to page events.\n *\n * @public\n */\nexport const PageEventContext = z.extend(UniversalEventContext, {\n /**\n * Page context for events that occur within a web page.\n */\n page: Page,\n})\n\n/**\n * TypeScript type inferred from {@link PageEventContext}.\n *\n * @public\n */\nexport type PageEventContext = z.infer<typeof PageEventContext>\n\n/**\n * Zod schema describing a `page` view event.\n *\n * @remarks\n * Page view events track visits to web pages and associated context.\n *\n * Extends {@link UniversalEventProperties} with optional `name` and\n * page-level {@link Page} properties.\n *\n * @public\n */\nexport const PageViewEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is a page view.\n */\n type: z.literal('page'),\n\n /**\n * Optional name for the page.\n *\n * @remarks\n * Useful when the logical page name differs from the URL or title.\n */\n name: z.optional(z.string()),\n\n /**\n * Page-level properties such as URL, path, and referrer.\n */\n properties: Page,\n\n /**\n * Override the context property of {@link UniversalEventProperties}\n * with a page-specific context.\n */\n context: PageEventContext,\n})\n\n/**\n * TypeScript type inferred from {@link PageViewEvent}.\n *\n * @public\n */\nexport type PageViewEvent = z.infer<typeof PageViewEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventContext, UniversalEventProperties } from './UniversalEventProperties'\nimport { Properties, Screen } from './properties'\n\n/**\n * Zod schema describing event context properties specific to screen events.\n *\n * @public\n */\nexport const ScreenEventContext = z.extend(UniversalEventContext, {\n /**\n * Screen context for events that occur within a mobile or TV application.\n */\n screen: Screen,\n})\n\n/**\n * TypeScript type inferred from {@link ScreenEventContext}.\n *\n * @public\n */\nexport type ScreenEventContext = z.infer<typeof ScreenEventContext>\n\n/**\n * Zod schema describing a `screen` view event.\n *\n * @remarks\n * Screen view events are typically used by mobile or TV applications\n * to track navigation between screens.\n *\n * Extends {@link UniversalEventProperties}.\n *\n * @public\n */\nexport const ScreenViewEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is a screen view.\n */\n type: z.literal('screen'),\n\n /**\n * Name of the screen being viewed.\n */\n name: z.string(),\n\n /**\n * Optional properties describing the screen context.\n *\n * @see {@link Properties}\n */\n properties: z.optional(Properties),\n\n /**\n * Override the context property of {@link UniversalEventProperties}\n * with a screen-specific context.\n */\n context: ScreenEventContext,\n})\n\n/**\n * TypeScript type inferred from {@link ScreenViewEvent}.\n *\n * @public\n */\nexport type ScreenViewEvent = z.infer<typeof ScreenViewEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\nimport { Properties } from './properties'\n\n/**\n * Zod schema describing a custom `track` event.\n *\n * @remarks\n * Track events capture arbitrary user actions that do not fit into\n * the more specific event types (page, screen, identify, etc.).\n *\n * Extends {@link UniversalEventProperties}.\n *\n * @public\n */\nexport const TrackEvent = z.extend(UniversalEventProperties, {\n /**\n * Discriminator indicating that this event is a track event.\n */\n type: z.literal('track'),\n\n /**\n * Name of the event being tracked.\n */\n event: z.string(),\n\n /**\n * Additional properties describing the event.\n */\n properties: Properties,\n})\n\n/**\n * TypeScript type inferred from {@link TrackEvent}.\n *\n * @public\n */\nexport type TrackEvent = z.infer<typeof TrackEvent>\n","import * as z from 'zod/mini'\nimport { UniversalEventProperties } from './UniversalEventProperties'\n\n/**\n * Zod schema describing shared interaction event properties.\n *\n * @public\n */\nexport const InteractionEventProperties = z.extend(UniversalEventProperties, {\n /**\n * Type of tracked optimization target for the interaction event.\n *\n * - `'Entry'` — A content entry.\n * - `'Variable'` — A Custom Flag or other variable-backed optimization target.\n */\n componentType: z.union([z.literal('Entry'), z.literal('Variable')]),\n\n /**\n * Contentful entry ID or flag key corresponding to the interaction.\n */\n componentId: z.string(),\n\n /**\n * Identifier of the experience that rendered this entry or flag.\n *\n * @remarks\n * Optional; interactions can occur outside of a specific experiment/personalization.\n */\n experienceId: z.optional(z.string()),\n\n /**\n * Index of the variant associated with this interaction.\n *\n * @remarks\n * Typically corresponds to the index of the selected optimization entry.\n */\n variantIndex: z.number(),\n})\n\n/**\n * TypeScript type inferred from {@link InteractionEventProperties}.\n *\n * @public\n */\nexport type InteractionEventProperties = z.infer<typeof InteractionEventProperties>\n","import * as z from 'zod/mini'\nimport { InteractionEventProperties } from './InteractionEventProperties'\n\n/**\n * Zod schema describing a `component` view event used for entry and flag exposure tracking.\n *\n * @remarks\n * These events track exposure of entries and variable-backed optimization\n * targets within an optimized experience.\n *\n * Extends {@link InteractionEventProperties}.\n *\n * @public\n */\nexport const ViewEvent = z.extend(InteractionEventProperties, {\n /**\n * Discriminator indicating that this is an entry or flag view event.\n */\n type: z.literal('component'),\n /**\n * Monotonically increasing visible duration for the active view.\n *\n * @remarks\n * This value is updated and re-emitted while the same view remains active.\n */\n viewDurationMs: z.optional(z.number()),\n /**\n * UUID identifying a single active view session.\n *\n * @remarks\n * Multiple events emitted for the same active view share this identifier.\n */\n viewId: z.optional(z.string()),\n})\n\n/**\n * TypeScript type inferred from {@link ViewEvent}.\n *\n * @public\n */\nexport type ViewEvent = z.infer<typeof ViewEvent>\n","import * as z from 'zod/mini'\nimport { ExoViewEvent } from './ExoViewEvent'\nimport { IdentifyEvent } from './IdentifyEvent'\nimport { PageViewEvent } from './PageViewEvent'\nimport { ScreenViewEvent } from './ScreenViewEvent'\nimport { TrackEvent } from './TrackEvent'\nimport { ViewEvent } from './ViewEvent'\n\n/**\n * Partial schema capturing an anonymous identifier.\n *\n * @remarks\n * This object is merged into each event type in a batch to associate the\n * event with an `anonymousId`.\n *\n * @internal\n */\nconst Anon = { anonymousId: z.string() }\n\n/**\n * Zod schema describing each valid Experience API event within a batch.\n *\n * @remarks\n * This is a discriminated union on the `type` field that supports all event\n * types used in batch ingestion, each extended with an `anonymousId`.\n *\n * @public\n */\nexport const BatchExperienceEvent = z.discriminatedUnion('type', [\n z.extend(ViewEvent, Anon),\n z.extend(ExoViewEvent, Anon),\n z.extend(IdentifyEvent, Anon),\n z.extend(PageViewEvent, Anon),\n z.extend(ScreenViewEvent, Anon),\n z.extend(TrackEvent, Anon),\n])\n\n/**\n * TypeScript type inferred from {@link BatchExperienceEvent}.\n *\n * @public\n */\nexport type BatchExperienceEvent = z.infer<typeof BatchExperienceEvent>\n\n/**\n * Zod schema describing an array of {@link BatchExperienceEvent} items.\n *\n * @public\n */\nexport const BatchExperienceEventArray = z.array(BatchExperienceEvent)\n\n/**\n * TypeScript type inferred from {@link BatchExperienceEventArray}.\n *\n * @public\n */\nexport type BatchExperienceEventArray = z.infer<typeof BatchExperienceEventArray>\n","import * as z from 'zod/mini'\nimport { ExoViewEvent } from './ExoViewEvent'\nimport { IdentifyEvent } from './IdentifyEvent'\nimport { PageViewEvent } from './PageViewEvent'\nimport { ScreenViewEvent } from './ScreenViewEvent'\nimport { TrackEvent } from './TrackEvent'\nimport { ViewEvent } from './ViewEvent'\n\n/**\n * Zod schema describing any supported Experience API event.\n *\n * @remarks\n * This discriminated union aggregates all event types used by the\n * personalization/experience tracking system.\n *\n * @public\n */\nexport const ExperienceEvent = z.discriminatedUnion('type', [\n ViewEvent,\n ExoViewEvent,\n IdentifyEvent,\n PageViewEvent,\n ScreenViewEvent,\n TrackEvent,\n])\n\n/**\n * TypeScript type inferred from {@link ExperienceEvent}.\n *\n * @public\n */\nexport type ExperienceEvent = z.infer<typeof ExperienceEvent>\n\n/**\n * Union of all possible `type` values for {@link ExperienceEvent}.\n *\n * @public\n */\nexport type ExperienceEventType = ExperienceEvent['type']\n\n/**\n * Zod schema describing an array of {@link ExperienceEvent} items.\n *\n * @public\n */\nexport const ExperienceEventArray = z.array(ExperienceEvent)\n\n/**\n * TypeScript type inferred from {@link ExperienceEventArray}.\n *\n * @public\n */\nexport type ExperienceEventArray = z.infer<typeof ExperienceEventArray>\n","import * as z from 'zod/mini'\nimport { ExperienceEventArray } from './event'\nimport { GeoLocation } from './event/properties/GeoLocation'\n\n/**\n * Zod schema describing optional configuration for an experience request.\n *\n * @remarks\n * These options configure feature flags and the request location default when\n * evaluating experiences through singular profile requests.\n *\n * @public\n */\nexport const ExperienceRequestOptions = z.object({\n /**\n * Features or capabilities to enable for this request.\n */\n features: z.optional(z.array(z.string())),\n\n /**\n * Location default for singular profile requests. Event `context.location` fields override it.\n */\n location: z.optional(GeoLocation),\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceRequestOptions}.\n *\n * @public\n */\nexport type ExperienceRequestOptions = z.infer<typeof ExperienceRequestOptions>\n\n/**\n * Zod schema describing the data payload for an experience request.\n *\n * @remarks\n * Contains the list of events to be evaluated plus optional request\n * configuration.\n *\n * @public\n */\nexport const ExperienceRequestData = z.object({\n /**\n * Experience events for the Experience API to evaluate.\n *\n * @remarks\n * Must contain at least one event.\n */\n events: ExperienceEventArray.check(z.minLength(1)),\n\n /**\n * Optional configuration for this experience request.\n */\n options: z.optional(ExperienceRequestOptions),\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceRequestData}.\n *\n * @public\n */\nexport type ExperienceRequestData = z.infer<typeof ExperienceRequestData>\n","import * as z from 'zod/mini'\nimport { BatchExperienceEventArray } from './event'\nimport { ExperienceRequestOptions } from './ExperienceRequest'\n\n/**\n * Zod schema describing the data payload for a batch experience request.\n *\n * @remarks\n * Batch events require an `anonymousId` on each event and must contain at\n * least one event.\n */\nexport const BatchExperienceRequestData = z.object({\n /**\n * Batch experience events for the Experience API to evaluate.\n *\n * @remarks\n * Must contain at least one event.\n */\n events: BatchExperienceEventArray.check(z.minLength(1)),\n\n /**\n * Optional feature configuration. Batch locations belong in each event's `context.location`.\n */\n options: z.optional(z.omit(ExperienceRequestOptions, { location: true })),\n})\n\n/**\n * TypeScript type inferred from {@link BatchExperienceRequestData}.\n */\nexport type BatchExperienceRequestData = z.infer<typeof BatchExperienceRequestData>\n","import * as z from 'zod/mini'\nimport { Page } from '../../event/properties'\n\n/**\n * Zod schema describing aggregated statistics for a user session.\n *\n * @remarks\n * Captures both per-session metrics (such as `activeSessionLength`) and\n * aggregate metrics (such as `averageSessionLength`) for a given profile.\n *\n * @public\n */\nexport const SessionStatistics = z.object({\n /**\n * Unique identifier for this session statistics record.\n */\n id: z.string(),\n\n /**\n * Indicates whether the visitor has been seen before.\n *\n * @remarks\n * `true` typically means the visitor has at least one prior session.\n */\n isReturningVisitor: z.boolean(),\n\n /**\n * Landing page for the session.\n *\n * @remarks\n * Represents the first page the user visited in this session.\n *\n * @see {@link Page}\n */\n landingPage: Page,\n\n /**\n * Number of sessions associated with this profile or identifier.\n *\n * @remarks\n * Often used in combination with `SessionStatistics.averageSessionLength`.\n */\n count: z.number(),\n\n /**\n * Duration of the active session.\n */\n activeSessionLength: z.number(),\n\n /**\n * Average session duration across all sessions represented by this record.\n *\n * @remarks\n * The unit must match `SessionStatistics.activeSessionLength`.\n */\n averageSessionLength: z.number(),\n})\n\n/**\n * TypeScript type inferred from {@link SessionStatistics}.\n *\n * @public\n */\nexport type SessionStatistics = z.infer<typeof SessionStatistics>\n","import * as z from 'zod/mini'\nimport { GeoLocation } from '../event/properties'\nimport { Traits } from '../event/properties/Traits'\nimport { SessionStatistics } from './properties'\n\n/**\n * Zod schema describing a full user profile as received from the Experience API.\n *\n * @remarks\n * Represents the server-side view of a profile, including identifiers,\n * traits, audiences, location, and session statistics.\n *\n * @public\n */\nexport const Profile = z.object({\n /**\n * Primary identifier of the profile.\n */\n id: z.string(),\n\n /**\n * Stable, long-lived identifier of the profile.\n *\n * @remarks\n * Intended to remain constant across sessions and devices when possible.\n * Usually equal to `id`.\n */\n stableId: z.string(),\n\n /**\n * Random value associated with the profile.\n *\n * @remarks\n * Often used for deterministic bucketing (e.g., in experiments).\n */\n random: z.number(),\n\n /**\n * List of audience identifiers that this profile belongs to.\n */\n audiences: z.array(z.string()),\n\n /**\n * Traits describing the profile (user-level attributes).\n *\n * @see {@link Traits}\n */\n traits: Traits,\n\n /**\n * Geo-location information associated with the profile.\n *\n * @see {@link GeoLocation}\n */\n location: GeoLocation,\n\n /**\n * Aggregated session statistics for the profile.\n *\n * @see {@link SessionStatistics}\n */\n session: SessionStatistics,\n})\n\n/**\n * TypeScript type inferred from {@link Profile}.\n *\n * @public\n */\nexport type Profile = z.infer<typeof Profile>\n\n/**\n * Zod schema describing a partial profile payload used for sending events\n * to the Experience & Insights APIs.\n *\n * @remarks\n * This schema enforces the presence of an `id` field and allows additional\n * JSON-serializable properties via `z.catchall`.\n *\n * @public\n */\nexport const PartialProfile = z.catchall(\n z.object({\n /**\n * Identifier of the profile.\n *\n * @remarks\n * Used to associate events with an existing profile.\n */\n id: z.string(),\n }),\n z.json(),\n)\n\n/**\n * TypeScript type inferred from {@link PartialProfile}.\n *\n * @public\n */\nexport type PartialProfile = z.infer<typeof PartialProfile>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing the common envelope structure of responses\n * from the Experience API.\n *\n * @remarks\n * Concrete responses extend this schema and refine the `data` property\n * to a more specific shape.\n *\n * @public\n */\nexport const ResponseEnvelope = z.object({\n /**\n * Response payload.\n *\n * @remarks\n * The base schema uses an empty object; specific responses extend this\n * with more detailed structures.\n */\n data: z.object(),\n\n /**\n * Human-readable message accompanying the response.\n */\n message: z.string(),\n\n /**\n * Error details, or `null` when the request succeeded.\n */\n error: z.nullable(z.object({ code: z.string() })),\n})\n\n/**\n * TypeScript type inferred from {@link ResponseEnvelope}.\n *\n * @public\n */\nexport type ResponseEnvelope = z.infer<typeof ResponseEnvelope>\n","import * as z from 'zod/mini'\nimport { Profile } from './profile'\nimport { ResponseEnvelope } from './ResponseEnvelope'\n\n/**\n * Zod schema describing the `data` property of a batch experience response.\n *\n * @remarks\n * A batch request can return zero or more profiles. When no profiles are\n * returned, `profiles` can be omitted or an empty array.\n *\n * @public\n */\nexport const BatchExperienceResponseData = z.object({\n /**\n * Profiles evaluated or affected by the batch experience request.\n */\n profiles: z.optional(z.array(Profile)),\n})\n\n/**\n * TypeScript type inferred from {@link BatchExperienceResponseData}.\n *\n * @public\n */\nexport type BatchExperienceResponseData = z.infer<typeof BatchExperienceResponseData>\n\n/**\n * Zod schema describing a batch experience response from the Experience API.\n *\n * @remarks\n * Extends {@link ResponseEnvelope} with {@link BatchExperienceResponseData} as the\n * `data` payload.\n *\n * @public\n */\nexport const BatchExperienceResponse = z.extend(ResponseEnvelope, {\n data: BatchExperienceResponseData,\n})\n\n/**\n * TypeScript type inferred from {@link BatchExperienceResponse}.\n *\n * @public\n */\nexport type BatchExperienceResponse = z.infer<typeof BatchExperienceResponse>\n","import * as z from 'zod/mini'\n\n/**\n * Enumeration of supported change types.\n *\n * @public\n */\nexport const ChangeType = ['Variable', 'Experience', 'Fragment'] as const\n\n/**\n * Zod schema describing the base shape for a change.\n *\n * @remarks\n * This base is extended by specific change types such as {@link VariableChange}.\n *\n * @internal\n */\nexport const ChangeBase = z.object({\n /**\n * Key identifying the subject of the change.\n */\n key: z.string(),\n\n /**\n * Discriminator for the change type.\n *\n * @remarks\n * Can be one of {@link ChangeType} or an arbitrary string for unknown types.\n */\n type: z.union([z.enum(ChangeType), z.string()]),\n\n /**\n * Metadata describing the originating experience and variant index.\n */\n meta: z.object({\n /**\n * Identifier of the personalization or experiment experience.\n */\n experienceId: z.string(),\n\n /**\n * Index of the variant within the experience configuration.\n *\n * @remarks\n * Typically corresponds to the array index in the experience's distribution.\n */\n variantIndex: z.number(),\n }),\n})\n\n/**\n * Zod schema for the allowed value types of a variable change.\n *\n * @remarks\n * Supports primitives and JSON objects keyed by strings.\n *\n * @public\n */\nexport const VariableChangeValue = z.union([\n z.string(),\n z.boolean(),\n z.null(),\n z.number(),\n z.record(z.string(), z.json()),\n])\n\n/**\n * Zod schema representing an unknown change type.\n *\n * @remarks\n * This can be used to handle forward-compatible change payloads where\n * the `type` is not recognized.\n *\n * @public\n */\nexport const UnknownChange = z.extend(ChangeBase, {\n /**\n * Unconstrained change type string.\n */\n type: z.string(),\n\n /**\n * Payload for the change value, with unknown structure.\n */\n value: z.unknown(),\n})\n\n/**\n * TypeScript type inferred from {@link UnknownChange}.\n *\n * @public\n */\nexport type UnknownChange = z.infer<typeof UnknownChange>\n\n/**\n * Zod schema representing a change whose type is `'Variable'`.\n *\n * @remarks\n * The `value` must conform to {@link VariableChangeValue}.\n *\n * @public\n */\nexport const VariableChange = z.extend(ChangeBase, {\n /**\n * Discriminator for a variable change.\n */\n type: z.literal('Variable'),\n\n /**\n * New value for the variable identified by `ChangeBase.key`.\n */\n value: VariableChangeValue,\n})\n\n/**\n * TypeScript type inferred from {@link VariableChange}.\n *\n * @public\n */\nexport type VariableChange = z.infer<typeof VariableChange>\n\n/**\n * Zod schema describing the base shape shared by entity-based changes\n * ({@link ExperienceChange} and {@link FragmentChange}).\n *\n * @internal\n */\nexport const EntityChangeBase = z.object({\n /**\n * Identifier of the entity affected by the change.\n */\n id: z.string(),\n\n /**\n * Identifier of the selected variant.\n */\n variantId: z.string(),\n\n /**\n * Metadata describing the originating optimization and variant index.\n */\n meta: z.object({\n /**\n * Identifier of the optimization that produced this change.\n */\n optimizationId: z.string(),\n\n /**\n * Index of the variant within the optimization's distribution.\n */\n variantIndex: z.number(),\n }),\n})\n\n/**\n * Zod schema representing a change whose type is `'Experience'`.\n *\n * @public\n */\nexport const ExperienceChange = z.extend(EntityChangeBase, {\n /**\n * Discriminator for an experience change.\n */\n type: z.literal('Experience'),\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceChange}.\n *\n * @public\n */\nexport type ExperienceChange = z.infer<typeof ExperienceChange>\n\n/**\n * Zod schema representing a change whose type is `'Fragment'`.\n *\n * @public\n */\nexport const FragmentChange = z.extend(EntityChangeBase, {\n /**\n * Discriminator for a fragment change.\n */\n type: z.literal('Fragment'),\n})\n\n/**\n * TypeScript type inferred from {@link FragmentChange}.\n *\n * @public\n */\nexport type FragmentChange = z.infer<typeof FragmentChange>\n\n/**\n * JSON value type inferred from {@link z.json}.\n *\n * @remarks\n * Represents any JSON-serializable value.\n *\n * @public\n */\nexport type Json = z.infer<typeof z.json>\n\n/**\n * Map of Custom Flag keys to JSON values.\n *\n * @public\n */\nexport type Flags = Record<string, Json>\n\n/**\n * Union of supported change types.\n *\n * @public\n */\nexport const Change = z.discriminatedUnion('type', [\n VariableChange,\n ExperienceChange,\n FragmentChange,\n])\n\n/**\n * TypeScript type inferred from {@link Change}.\n *\n * @public\n */\nexport type Change = z.infer<typeof Change>\n\n/**\n * Zod schema representing an array of {@link Change} items.\n *\n * @public\n */\nexport const ChangeArray = z.array(Change)\n\n/**\n * TypeScript type inferred from {@link ChangeArray}.\n *\n * @public\n */\nexport type ChangeArray = z.infer<typeof ChangeArray>\n","import * as z from 'zod/mini'\n\n/**\n * Zod schema describing a selected optimization outcome for a user.\n *\n * @remarks\n * Represents the result of choosing a specific variant for a given\n * experience, along with additional metadata such as whether the\n * selection is sticky.\n *\n * @public\n */\nexport const SelectedOptimization = z.object({\n /**\n * Identifier of the personalization or experiment experience.\n */\n experienceId: z.string(),\n\n /**\n * Index of the selected variant within the experience configuration.\n *\n * @remarks\n * Typically corresponds to the index of the selected `OptimizationConfig` entry.\n */\n variantIndex: z.number(),\n\n /**\n * Mapping of baseline entry IDs to their selected variant entry IDs.\n *\n * @remarks\n * The keys are component identifiers and the values are the\n * identifiers of the selected variant for that component.\n */\n variants: z.record(z.string(), z.string()),\n\n /**\n * Indicates whether this optimization selection is sticky for the user.\n *\n * @defaultValue false\n *\n * @remarks\n * Reuse sticky selections on subsequent requests for the same user rather\n * than re-allocating a new variant.\n */\n sticky: z.optional(z.prefault(z.boolean(), false)),\n})\n\n/**\n * TypeScript type inferred from {@link SelectedOptimization}.\n *\n * @public\n */\nexport type SelectedOptimization = z.infer<typeof SelectedOptimization>\n\n/**\n * Zod schema describing an array of {@link SelectedOptimization} items.\n *\n * @remarks\n * Useful when multiple experiences are evaluated at once.\n *\n * @public\n */\nexport const SelectedOptimizationArray = z.array(SelectedOptimization)\n\n/**\n * TypeScript type inferred from {@link SelectedOptimizationArray}.\n *\n * @public\n */\nexport type SelectedOptimizationArray = z.infer<typeof SelectedOptimizationArray>\n","import * as z from 'zod/mini'\nimport { ChangeArray } from './change'\nimport { SelectedOptimizationArray } from './optimization'\nimport { Profile } from './profile'\nimport { ResponseEnvelope } from './ResponseEnvelope'\n\n/**\n * Zod schema describing the `data` payload of a standard Experience API response.\n *\n * @remarks\n * Contains the evaluated profile, selected optimizations, and computed\n * changes to apply on the client.\n *\n * @public\n */\nexport const ExperienceData = z.object({\n /**\n * Profile associated with the evaluated events.\n */\n profile: Profile,\n\n /**\n * Selected experiences and variants for the profile.\n *\n * @see {@link SelectedOptimizationArray}\n */\n experiences: SelectedOptimizationArray,\n\n /**\n * Used for Custom Flags.\n *\n * @see {@link ChangeArray}\n */\n changes: ChangeArray,\n})\n\n/**\n * TypeScript type inferred from {@link ExperienceData}.\n *\n * @public\n */\nexport type ExperienceData = z.infer<typeof ExperienceData>\n\n/**\n * Zod schema describing a full Experience API response.\n *\n * @remarks\n * Extends {@link ResponseEnvelope} with {@link ExperienceData} as the `data` payload.\n *\n * @public\n */\nexport const ExperienceResponse = z.extend(ResponseEnvelope, { data: ExperienceData })\n\n/**\n * TypeScript type inferred from {@link ExperienceResponse}.\n *\n * @public\n */\nexport type ExperienceResponse = z.infer<typeof ExperienceResponse>\n\n/**\n * Optimization data shape used for compatibility outside the API adapter.\n *\n * @remarks\n * This type mirrors {@link ExperienceData} but replaces the `experiences`\n * field with `selectedOptimizations` while preserving the rest of the structure.\n *\n * @public\n */\nexport type OptimizationData = Omit<ExperienceData, 'experiences'> & {\n /**\n * Selected optimizations for the profile.\n */\n selectedOptimizations: SelectedOptimizationArray\n}\n","import * as z from 'zod/mini'\nimport { InteractionEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing a `component_click` event used for entry click tracking.\n *\n * @remarks\n * These events track click interactions for entries within an optimized\n * experience.\n *\n * Extends {@link InteractionEventProperties}.\n *\n * @public\n */\nexport const ClickEvent = z.extend(InteractionEventProperties, {\n /**\n * Discriminator indicating that this is an entry click event.\n */\n type: z.literal('component_click'),\n})\n\n/**\n * TypeScript type inferred from {@link ClickEvent}.\n *\n * @public\n */\nexport type ClickEvent = z.infer<typeof ClickEvent>\n","import * as z from 'zod/mini'\nimport { ExoEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing an `exo_node_click` event.\n *\n * @public\n */\nexport const ExoClickEvent = z.extend(ExoEventProperties, {\n type: z.literal('exo_node_click'),\n})\n\n/**\n * TypeScript type inferred from {@link ExoClickEvent}.\n *\n * @public\n */\nexport type ExoClickEvent = z.infer<typeof ExoClickEvent>\n","import * as z from 'zod/mini'\nimport { ExoEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing an `exo_node_hover` event.\n *\n * @public\n */\nexport const ExoHoverEvent = z.extend(ExoEventProperties, {\n type: z.literal('exo_node_hover'),\n hoverDurationMs: z.int().check(z.minimum(0)),\n hoverId: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link ExoHoverEvent}.\n *\n * @public\n */\nexport type ExoHoverEvent = z.infer<typeof ExoHoverEvent>\n","import * as z from 'zod/mini'\nimport { InteractionEventProperties } from '../../experience/event'\n\n/**\n * Zod schema describing a `component_hover` event used for entry hover tracking.\n *\n * @remarks\n * These events track hover interactions for entries within an optimized\n * experience.\n *\n * Extends {@link InteractionEventProperties}.\n *\n * @public\n */\nexport const HoverEvent = z.extend(InteractionEventProperties, {\n /**\n * Discriminator indicating that this is an entry hover event.\n */\n type: z.literal('component_hover'),\n /**\n * Monotonically increasing hover duration for the active hover.\n *\n * @remarks\n * This value is updated and re-emitted while the same hover remains active.\n */\n hoverDurationMs: z.number(),\n /**\n * UUID identifying a single active hover session.\n *\n * @remarks\n * Multiple events emitted for the same active hover share this identifier.\n */\n hoverId: z.string(),\n})\n\n/**\n * TypeScript type inferred from {@link HoverEvent}.\n *\n * @public\n */\nexport type HoverEvent = z.infer<typeof HoverEvent>\n","import * as z from 'zod/mini'\nimport { ExoViewEvent, ViewEvent } from '../../experience/event'\nimport { ClickEvent } from './ClickEvent'\nimport { ExoClickEvent } from './ExoClickEvent'\nimport { ExoHoverEvent } from './ExoHoverEvent'\nimport { HoverEvent } from './HoverEvent'\n\n/**\n * Zod schema describing an Insights event.\n *\n * @remarks\n * Insights events include legacy component interactions and ExO node\n * interactions.\n *\n * @public\n */\nexport const InsightsEvent = z.discriminatedUnion('type', [\n ViewEvent,\n ClickEvent,\n HoverEvent,\n ExoViewEvent,\n ExoClickEvent,\n ExoHoverEvent,\n])\n\n/**\n * TypeScript type inferred from {@link InsightsEvent}.\n *\n * @public\n */\nexport type InsightsEvent = z.infer<typeof InsightsEvent>\n\n/**\n * Union of all possible `type` values for {@link InsightsEvent}.\n *\n * @public\n */\nexport type InsightsEventType = InsightsEvent['type']\n\n/**\n * Zod schema describing an array of {@link InsightsEvent} items.\n *\n * @public\n */\nexport const InsightsEventArray = z.array(InsightsEvent)\n\n/**\n * TypeScript type inferred from {@link InsightsEventArray}.\n *\n * @public\n */\nexport type InsightsEventArray = z.infer<typeof InsightsEventArray>\n","import * as z from 'zod/mini'\nimport { PartialProfile } from '../../experience/profile'\nimport { InsightsEventArray } from './InsightsEvent'\n\n/**\n * Zod schema describing a batched Insights event payload.\n *\n * @remarks\n * Combines a {@link PartialProfile} with one or more Insights events\n * to be sent to the Contentful Insights API.\n *\n * @public\n */\nexport const BatchInsightsEvent = z.object({\n /**\n * Partial profile information used to associate events with a user.\n *\n * @see {@link PartialProfile}\n */\n profile: PartialProfile,\n\n /**\n * Insights events to record for this profile.\n *\n * @see {@link InsightsEventArray}\n */\n events: InsightsEventArray,\n})\n\n/**\n * TypeScript type inferred from {@link BatchInsightsEvent}.\n *\n * @public\n */\nexport type BatchInsightsEvent = z.infer<typeof BatchInsightsEvent>\n\n/**\n * Zod schema describing an array of {@link BatchInsightsEvent} items.\n *\n * @remarks\n * Useful when sending multiple profile/event batches in a single request.\n *\n * @public\n */\nexport const BatchInsightsEventArray = z.array(BatchInsightsEvent)\n\n/**\n * TypeScript type inferred from {@link BatchInsightsEventArray}.\n *\n * @public\n */\nexport type BatchInsightsEventArray = z.infer<typeof BatchInsightsEventArray>\n","import * as z from 'zod/mini'\nimport en from 'zod/v4/locales/en.js'\n\nz.config(en())\n\nexport function parseWithFriendlyError<T extends z.ZodMiniType>(\n schema: T,\n data: unknown,\n): z.output<T> {\n const result = schema.safeParse(data)\n if (result.success) return result.data\n\n throw new Error(z.prettifyError(result.error))\n}\n"],"names":["App","z","Campaign","Channel","Dictionary","COUNTRY_CODE_LENGTH","Coordinates","GeoLocation","Library","Page","Properties","Screen","Traits","UniversalEventContext","UniversalEventProperties","ExoEntityKind","ExoEventProperties","ExoViewEvent","IdentifyEvent","PageEventContext","PageViewEvent","ScreenEventContext","ScreenViewEvent","TrackEvent","InteractionEventProperties","ViewEvent","Anon","BatchExperienceEvent","BatchExperienceEventArray","ExperienceEvent","ExperienceEventArray","ExperienceRequestOptions","ExperienceRequestData","BatchExperienceRequestData","SessionStatistics","Profile","PartialProfile","ResponseEnvelope","BatchExperienceResponseData","BatchExperienceResponse","ChangeType","ChangeBase","VariableChangeValue","UnknownChange","VariableChange","EntityChangeBase","ExperienceChange","FragmentChange","Change","ChangeArray","SelectedOptimization","SelectedOptimizationArray","ExperienceData","ExperienceResponse","ClickEvent","ExoClickEvent","ExoHoverEvent","HoverEvent","InsightsEvent","InsightsEventArray","BatchInsightsEvent","BatchInsightsEventArray","en","parseWithFriendlyError","schema","data","result","Error"],"mappings":";;AAaO,MAAMA,MAAMC,oCAAAA,QAAU,CAC3BA,oCAAAA,MAAQ,CAAC;IAIP,MAAMA,oCAAAA,MAAQ;IAKd,SAASA,oCAAAA,MAAQ;AACnB;ACdK,MAAMC,WAAWD,oCAAAA,MAAQ,CAAC;IAI/B,MAAMA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAKzB,QAAQA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAK3B,QAAQA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAK3B,MAAMA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;IAKzB,SAASA,oCAAAA,QAAU,CAACA,oCAAAA,MAAQ;AAC9B;ACrBO,MAAME,UAAUF,oCAAAA,KAAO,CAAC;IAACA,oCAAAA,OAAS,CAAC;IAAWA,oCAAAA,OAAS,CAAC;IAAWA,oCAAAA,OAAS,CAAC;CAAO;ACJpF,MAAMG,aAAaH,oCAAAA,MAAQ,CAACA,oCAAAA,MA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;IAOT,QAAQuB;AACV;AAiBO,MAAME,0BAA0B5D,oCAAAA,KAAO,CAAC2D;ACzC/C3D,oCAAAA,MAAQ,CAAC6D;AAEF,SAASC,uBACdC,MAAS,EACTC,IAAa;IAEb,MAAMC,SAASF,OAAO,SAAS,CAACC;IAChC,IAAIC,OAAO,OAAO,EAAE,OAAOA,OAAO,IAAI;IAEtC,MAAM,IAAIC,MAAMlE,oCAAAA,aAAe,CAACiE,OAAO,KAAK;AAC9C"}
|
package/dist/index.cjs
CHANGED
|
@@ -323,15 +323,17 @@ var __webpack_exports__ = {};
|
|
|
323
323
|
enabledFeatures;
|
|
324
324
|
ip;
|
|
325
325
|
locale;
|
|
326
|
+
location;
|
|
326
327
|
plainText;
|
|
327
328
|
preflight;
|
|
328
329
|
constructor(config){
|
|
329
330
|
super('Experience', config);
|
|
330
|
-
const { baseUrl, enabledFeatures, ip, locale, plainText, preflight } = config;
|
|
331
|
+
const { baseUrl, enabledFeatures, ip, locale, location, plainText, preflight } = config;
|
|
331
332
|
this.baseUrl = baseUrl || EXPERIENCE_BASE_URL;
|
|
332
333
|
this.enabledFeatures = enabledFeatures;
|
|
333
334
|
this.ip = ip;
|
|
334
335
|
this.locale = locale;
|
|
336
|
+
this.location = location;
|
|
335
337
|
this.plainText = plainText;
|
|
336
338
|
this.preflight = preflight;
|
|
337
339
|
}
|
|
@@ -483,9 +485,12 @@ var __webpack_exports__ = {};
|
|
|
483
485
|
return bodyOptions;
|
|
484
486
|
};
|
|
485
487
|
constructExperienceRequestBody(events, options) {
|
|
488
|
+
const bodyOptions = this.constructBodyOptions(options);
|
|
489
|
+
const location = options.location ?? this.location;
|
|
490
|
+
if (void 0 !== location) bodyOptions.location = location;
|
|
486
491
|
return api_schemas_namespaceObject.ExperienceRequestData.parse({
|
|
487
492
|
events: (0, api_schemas_namespaceObject.parseWithFriendlyError)(api_schemas_namespaceObject.ExperienceEventArray, events),
|
|
488
|
-
options:
|
|
493
|
+
options: bodyOptions
|
|
489
494
|
});
|
|
490
495
|
}
|
|
491
496
|
}
|