@contentful/optimization-api-client 2.2.1 → 2.2.2

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/dist/index.d.ts CHANGED
@@ -354,7 +354,7 @@ declare const BatchExperienceEventArray: z.ZodMiniArray<z.ZodMiniDiscriminatedUn
354
354
  variantId: z.ZodMiniOptional<z.ZodMiniString<string>>;
355
355
  variantIndex: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
356
356
  type: z.ZodMiniLiteral<"exo_node_view">;
357
- viewDurationMs: z.ZodMiniNumberFormat;
357
+ viewDurationMs: z.ZodMiniInt;
358
358
  viewId: z.ZodMiniString<string>;
359
359
  anonymousId: z.ZodMiniString<string>;
360
360
  }, z.core.$strip>, z.ZodMiniObject<{
@@ -603,9 +603,6 @@ declare type BatchExperienceEventArray = z.infer<typeof BatchExperienceEventArra
603
603
  * @public
604
604
  */
605
605
  declare const BatchExperienceResponseData: z.ZodMiniObject<{
606
- /**
607
- * Profiles evaluated or affected by the batch experience request.
608
- */
609
606
  profiles: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
610
607
  id: z.ZodMiniString<string>;
611
608
  stableId: z.ZodMiniString<string>;
@@ -660,19 +657,9 @@ declare type BatchExperienceResponseData = z.infer<typeof BatchExperienceRespons
660
657
  * @public
661
658
  */
662
659
  declare const BatchInsightsEventArray: z.ZodMiniArray<z.ZodMiniObject<{
663
- /**
664
- * Partial profile information used to associate events with a user.
665
- *
666
- * @see {@link PartialProfile}
667
- */
668
660
  profile: z.ZodMiniObject<{
669
661
  id: z.ZodMiniString<string>;
670
662
  }, z.core.$catchall<z.ZodMiniJSONSchema>>;
671
- /**
672
- * Insights events to record for this profile.
673
- *
674
- * @see {@link InsightsEventArray}
675
- */
676
663
  events: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
677
664
  channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
678
665
  context: z.ZodMiniObject<{
@@ -922,7 +909,7 @@ declare const BatchInsightsEventArray: z.ZodMiniArray<z.ZodMiniObject<{
922
909
  variantId: z.ZodMiniOptional<z.ZodMiniString<string>>;
923
910
  variantIndex: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
924
911
  type: z.ZodMiniLiteral<"exo_node_view">;
925
- viewDurationMs: z.ZodMiniNumberFormat;
912
+ viewDurationMs: z.ZodMiniInt;
926
913
  viewId: z.ZodMiniString<string>;
927
914
  }, z.core.$strip>, z.ZodMiniObject<{
928
915
  channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
@@ -1060,7 +1047,7 @@ declare const BatchInsightsEventArray: z.ZodMiniArray<z.ZodMiniObject<{
1060
1047
  variantId: z.ZodMiniOptional<z.ZodMiniString<string>>;
1061
1048
  variantIndex: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
1062
1049
  type: z.ZodMiniLiteral<"exo_node_hover">;
1063
- hoverDurationMs: z.ZodMiniNumberFormat;
1050
+ hoverDurationMs: z.ZodMiniInt;
1064
1051
  hoverId: z.ZodMiniString<string>;
1065
1052
  }, z.core.$strip>], "type">>;
1066
1053
  }, z.core.$strip>>;
@@ -1092,16 +1079,7 @@ export declare interface BatchUpdateProfileParams {
1092
1079
  declare const Change: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
1093
1080
  key: z.ZodMiniString<string>;
1094
1081
  meta: z.ZodMiniObject<{
1095
- /**
1096
- * Identifier of the personalization or experiment experience.
1097
- */
1098
1082
  experienceId: z.ZodMiniString<string>;
1099
- /**
1100
- * Index of the variant within the experience configuration.
1101
- *
1102
- * @remarks
1103
- * Typically corresponds to the array index in the experience's distribution.
1104
- */
1105
1083
  variantIndex: z.ZodMiniNumber<number>;
1106
1084
  }, z.core.$strip>;
1107
1085
  type: z.ZodMiniLiteral<"Variable">;
@@ -1110,13 +1088,7 @@ declare const Change: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
1110
1088
  id: z.ZodMiniString<string>;
1111
1089
  variantId: z.ZodMiniString<string>;
1112
1090
  meta: z.ZodMiniObject<{
1113
- /**
1114
- * Identifier of the optimization that produced this change.
1115
- */
1116
1091
  optimizationId: z.ZodMiniString<string>;
1117
- /**
1118
- * Index of the variant within the optimization's distribution.
1119
- */
1120
1092
  variantIndex: z.ZodMiniNumber<number>;
1121
1093
  }, z.core.$strip>;
1122
1094
  type: z.ZodMiniLiteral<"Experience">;
@@ -1124,13 +1096,7 @@ declare const Change: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
1124
1096
  id: z.ZodMiniString<string>;
1125
1097
  variantId: z.ZodMiniString<string>;
1126
1098
  meta: z.ZodMiniObject<{
1127
- /**
1128
- * Identifier of the optimization that produced this change.
1129
- */
1130
1099
  optimizationId: z.ZodMiniString<string>;
1131
- /**
1132
- * Index of the variant within the optimization's distribution.
1133
- */
1134
1100
  variantIndex: z.ZodMiniNumber<number>;
1135
1101
  }, z.core.$strip>;
1136
1102
  type: z.ZodMiniLiteral<"Fragment">;
@@ -1527,9 +1493,6 @@ export declare interface ExperienceApiClientRequestOptions {
1527
1493
  * @public
1528
1494
  */
1529
1495
  declare const ExperienceData: z.ZodMiniObject<{
1530
- /**
1531
- * Profile associated with the evaluated events.
1532
- */
1533
1496
  profile: z.ZodMiniObject<{
1534
1497
  id: z.ZodMiniString<string>;
1535
1498
  stableId: z.ZodMiniString<string>;
@@ -1566,22 +1529,12 @@ declare const ExperienceData: z.ZodMiniObject<{
1566
1529
  averageSessionLength: z.ZodMiniNumber<number>;
1567
1530
  }, z.core.$strip>;
1568
1531
  }, z.core.$strip>;
1569
- /**
1570
- * Selected experiences and variants for the profile.
1571
- *
1572
- * @see {@link SelectedOptimizationArray}
1573
- */
1574
1532
  experiences: z.ZodMiniArray<z.ZodMiniObject<{
1575
1533
  experienceId: z.ZodMiniString<string>;
1576
1534
  variantIndex: z.ZodMiniNumber<number>;
1577
1535
  variants: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
1578
1536
  sticky: z.ZodMiniOptional<z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>>;
1579
1537
  }, z.core.$strip>>;
1580
- /**
1581
- * Used for Custom Flags.
1582
- *
1583
- * @see {@link ChangeArray}
1584
- */
1585
1538
  changes: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
1586
1539
  key: z.ZodMiniString<string>;
1587
1540
  meta: z.ZodMiniObject<{
@@ -1750,7 +1703,7 @@ declare const ExperienceEventArray: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[
1750
1703
  variantId: z.ZodMiniOptional<z.ZodMiniString<string>>;
1751
1704
  variantIndex: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
1752
1705
  type: z.ZodMiniLiteral<"exo_node_view">;
1753
- viewDurationMs: z.ZodMiniNumberFormat;
1706
+ viewDurationMs: z.ZodMiniInt;
1754
1707
  viewId: z.ZodMiniString<string>;
1755
1708
  }, z.core.$strip>, z.ZodMiniObject<{
1756
1709
  channel: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"mobile">, z.ZodMiniLiteral<"server">, z.ZodMiniLiteral<"web">]>;
@@ -2051,57 +2004,17 @@ export declare interface FetchMethodCallbackOptions {
2051
2004
  * @public
2052
2005
  */
2053
2006
  declare const GeoLocation: z.ZodMiniObject<{
2054
- /**
2055
- * Geographical coordinates for the location.
2056
- */
2057
2007
  coordinates: z.ZodMiniOptional<z.ZodMiniObject<{
2058
- /**
2059
- * Latitude component of the coordinates.
2060
- */
2061
2008
  latitude: z.ZodMiniNumber<number>;
2062
- /**
2063
- * Longitude component of the coordinates.
2064
- */
2065
2009
  longitude: z.ZodMiniNumber<number>;
2066
2010
  }, z.core.$strip>>;
2067
- /**
2068
- * City name associated with the location.
2069
- */
2070
2011
  city: z.ZodMiniOptional<z.ZodMiniString<string>>;
2071
- /**
2072
- * Postal or ZIP code associated with the location.
2073
- */
2074
2012
  postalCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
2075
- /**
2076
- * Region or state name associated with the location.
2077
- */
2078
2013
  region: z.ZodMiniOptional<z.ZodMiniString<string>>;
2079
- /**
2080
- * Region or state code associated with the location.
2081
- */
2082
2014
  regionCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
2083
- /**
2084
- * Country name associated with the location.
2085
- */
2086
2015
  country: z.ZodMiniOptional<z.ZodMiniString<string>>;
2087
- /**
2088
- * Country code associated with the location.
2089
- *
2090
- * @remarks
2091
- * Validated to exactly COUNTRY_CODE_LENGTH characters, typically
2092
- * an ISO 3166-1 alpha-2 code.
2093
- */
2094
2016
  countryCode: z.ZodMiniOptional<z.ZodMiniString<string>>;
2095
- /**
2096
- * Continent name associated with the location.
2097
- */
2098
2017
  continent: z.ZodMiniOptional<z.ZodMiniString<string>>;
2099
- /**
2100
- * Time zone identifier associated with the location.
2101
- *
2102
- * @remarks
2103
- * Typically an IANA time zone string (e.g., `"Europe/Berlin"`).
2104
- */
2105
2018
  timezone: z.ZodMiniOptional<z.ZodMiniString<string>>;
2106
2019
  }, z.core.$strip>;
2107
2020
 
@@ -2312,34 +2225,9 @@ export declare interface RetryFetchMethodOptions extends BaseFetchMethodOptions
2312
2225
  * @public
2313
2226
  */
2314
2227
  declare const SelectedOptimizationArray: z.ZodMiniArray<z.ZodMiniObject<{
2315
- /**
2316
- * Identifier of the personalization or experiment experience.
2317
- */
2318
2228
  experienceId: z.ZodMiniString<string>;
2319
- /**
2320
- * Index of the selected variant within the experience configuration.
2321
- *
2322
- * @remarks
2323
- * Typically corresponds to the index of the selected `OptimizationConfig` entry.
2324
- */
2325
2229
  variantIndex: z.ZodMiniNumber<number>;
2326
- /**
2327
- * Mapping of baseline entry IDs to their selected variant entry IDs.
2328
- *
2329
- * @remarks
2330
- * The keys are component identifiers and the values are the
2331
- * identifiers of the selected variant for that component.
2332
- */
2333
2230
  variants: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
2334
- /**
2335
- * Indicates whether this optimization selection is sticky for the user.
2336
- *
2337
- * @defaultValue false
2338
- *
2339
- * @remarks
2340
- * Reuse sticky selections on subsequent requests for the same user rather
2341
- * than re-allocating a new variant.
2342
- */
2343
2231
  sticky: z.ZodMiniOptional<z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>>;
2344
2232
  }, z.core.$strip>>;
2345
2233
 
@@ -2410,16 +2298,7 @@ export declare interface UpsertProfileParams extends CreateProfileParams {
2410
2298
  declare const VariableChange: z.ZodMiniObject<{
2411
2299
  key: z.ZodMiniString<string>;
2412
2300
  meta: z.ZodMiniObject<{
2413
- /**
2414
- * Identifier of the personalization or experiment experience.
2415
- */
2416
2301
  experienceId: z.ZodMiniString<string>;
2417
- /**
2418
- * Index of the variant within the experience configuration.
2419
- *
2420
- * @remarks
2421
- * Typically corresponds to the array index in the experience's distribution.
2422
- */
2423
2302
  variantIndex: z.ZodMiniNumber<number>;
2424
2303
  }, z.core.$strip>;
2425
2304
  type: z.ZodMiniLiteral<"Variable">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentful/optimization-api-client",
3
3
  "description": "API client for Contentful Optimization services",
4
- "version": "2.2.1",
4
+ "version": "2.2.2",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "zod": "^4.3.6"
73
+ "zod": "^4.6.6"
74
74
  },
75
75
  "devDependencies": {
76
76
  "build-tools": "0.0.0",