From c6050282db7f566818889424d518a1567a6d588b Mon Sep 17 00:00:00 2001 From: JosephSamirL <68662601+JosephSamirL@users.noreply.github.com> Date: Wed, 30 Sep 2026 16:39:17 +0000 Subject: [PATCH] feat: automated TS Serving API update --- packages/types/src/config/types.gen.ts | 77 ++++++++++++++++++-------- 1 file changed, 53 insertions(+), 24 deletions(-) diff --git a/packages/types/src/config/types.gen.ts b/packages/types/src/config/types.gen.ts index 589b2d27..e58c4acb 100644 --- a/packages/types/src/config/types.gen.ts +++ b/packages/types/src/config/types.gen.ts @@ -11,7 +11,7 @@ export type ConfigAudience = { /** * Audience unique key */ - key?: string; + key?: (string) | null; /** * Audience Name */ @@ -409,6 +409,10 @@ export enum SegmentBucketedMatchRulesTypes { BUCKETED_INTO_SEGMENT = 'bucketed_into_segment' } +export enum ExperienceKeyBucketedMatchRulesTypes { + BUCKETED_INTO_EXPERIENCE_KEY = 'bucketed_into_experience_key' +} + export enum DayOfWeekMatchRulesTypes { LOCAL_TIME_DAY_OF_WEEK = 'local_time_day_of_week', PROJECT_TIME_DAY_OF_WEEK = 'project_time_day_of_week' @@ -436,7 +440,7 @@ export enum WeatherConditionMatchRulesTypes { WEATHER_CONDITION = 'weather_condition' } -export type RulesTypes = TextMatchRulesTypes & NumericMatchRulesTypes & BoolMatchRulesTypes & KeyValueMatchRulesTypes & VisitorDataExistsMatchRulesTypes & CookieMatchRulesTypes & CountryMatchRulesTypes & VisitorTypeMatchRulesTypes & LanguageMatchRulesTypes & GoalTriggeredMatchRulesTypes & SegmentBucketedMatchRulesTypes & DayOfWeekMatchRulesTypes & HourOfDayMatchRulesTypes & MinuteOfHourMatchRulesTypes & BrowserNameMatchRulesTypes & OsMatchRulesTypes & WeatherConditionMatchRulesTypes; +export type RulesTypes = TextMatchRulesTypes & NumericMatchRulesTypes & BoolMatchRulesTypes & KeyValueMatchRulesTypes & VisitorDataExistsMatchRulesTypes & CookieMatchRulesTypes & CountryMatchRulesTypes & VisitorTypeMatchRulesTypes & LanguageMatchRulesTypes & GoalTriggeredMatchRulesTypes & SegmentBucketedMatchRulesTypes & ExperienceKeyBucketedMatchRulesTypes & DayOfWeekMatchRulesTypes & HourOfDayMatchRulesTypes & MinuteOfHourMatchRulesTypes & BrowserNameMatchRulesTypes & OsMatchRulesTypes & WeatherConditionMatchRulesTypes; export type GenericTextMatchRule = BaseRuleWithStringValue & { rule_type: TextMatchRulesTypes; @@ -554,6 +558,13 @@ export type SegmentBucketedMatchRule = BaseRuleWithSegmentBucketedValue & { }); }; +export type ExperienceKeyBucketedMatchRule = BaseRuleWithStringValue & { + rule_type: ExperienceKeyBucketedMatchRulesTypes; + matching?: (BaseMatch & { + match_type?: ChoiceMatchingOptions; +}); +}; + export type ExperienceBucketedMatchRule = BaseRuleWithExperienceBucketedValue & { rule_type: string; matching?: (BaseMatch & { @@ -603,11 +614,11 @@ export type WeatherConditionMatchRule = BaseRuleWithWeatherConditionValue & { }); }; -export type RuleElementNoUrl = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | CookieMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule | VisitorDataExistsMatchRule; +export type RuleElementNoUrl = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | CookieMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | ExperienceKeyBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule | VisitorDataExistsMatchRule; -export type RuleElement = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule; +export type RuleElement = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | ExperienceKeyBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule; -export type RuleElementAudience = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule | VisitorDataExistsMatchRule; +export type RuleElementAudience = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | ExperienceKeyBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule | VisitorDataExistsMatchRule; export enum TextMatchingOptions { MATCHES = 'matches', @@ -848,21 +859,25 @@ export type VisitorInsightsBase = { * Higher values collect data from a larger share of traffic and consume allocation faster. * */ - sampling_rate?: 5 | 10 | 20 | 30 | 40 | 50; + sampling_rate?: number; + /** + * Maximum number of visits per variation used when generating a heatmap for this project. + * Applies to newly created heatmaps when an experience is activated. + * + */ + heatmap_visits_limit?: 2500 | 5000 | 10000 | 15000; }; /** - * The percentage of visitors included in sampling for Convert Signals session recordings and Heatmaps for this project. - * Higher values collect data from a larger share of traffic and consume allocation faster. + * Maximum number of visits per variation used when generating a heatmap for this project. + * Applies to newly created heatmaps when an experience is activated. * */ -export enum sampling_rate { - '_5' = 5, - '_10' = 10, - '_20' = 20, - '_30' = 30, - '_40' = 40, - '_50' = 50 +export enum heatmap_visits_limit { + '_2500' = 2500, + '_5000' = 5000, + '_10000' = 10000, + '_15000' = 15000 } /** @@ -970,6 +985,11 @@ export type UploadedFileData = { */ export type ConcurrencyKey = (string) | null; +/** + * Device fingerprint computed by client-side. + */ +export type UserAuthMetaData = string; + /** * Response containing project's config data needed in order to serve experiences */ @@ -1627,7 +1647,7 @@ export type ConfigExperience = { /** * Experience readable key that uniquely identifies this experience */ - key?: string; + key?: (string) | null; /** * List of locations IDs on which this experience is presented. Either this or **site_area** is given but should not be both. */ @@ -1769,7 +1789,7 @@ export type ExperienceVariationConfig = { /** * Variation Key */ - key?: string; + key?: (string) | null; /** * Percentage of traffic allocation for this variation, as a number from 0 to 10000. * For an experience, the sum of the traffic allocations for all variations cannot be greater than 10000. @@ -1827,7 +1847,7 @@ export type ConfigFeature = { /** * A unique per project level identifier */ - key?: string; + key?: (string) | null; /** * An array of user-defined variables of a feature. */ @@ -1874,7 +1894,7 @@ export type ConfigGoalBase = { /** * Goal Key */ - key?: string; + key?: (string) | null; /** * List of goal types to be returned */ @@ -2165,7 +2185,7 @@ export type ConfigLocation = { /** * Location unique key */ - key?: string; + key?: (string) | null; /** * Location Name */ @@ -2391,6 +2411,10 @@ export type ProjectGASettingsBase = GA_SettingsBase & { * Attempt to pull revenue data from Google Analytics Revenue Tracking code. */ auto_revenue_tracking?: boolean; + /** + * When enabled, the experience_impression event is sent only the first time a visitor is exposed to an experience, instead of on every subsequent qualifying page view. Opt-in and disabled by default. + */ + track_first_exposure_only?: boolean; }; export type ProjectIntegrationGA3 = ProjectGASettingsBase & IntegrationGA3; @@ -2415,7 +2439,7 @@ export type ConfigSegment = { /** * Segment unique key */ - key?: string; + key?: (string) | null; /** * Segment Name */ @@ -2451,7 +2475,8 @@ export type SendTrackingEventsRequestData = { visitors?: Array<{ segments?: VisitorSegments; /** - * Id of the visitor tracked + * The ID of the visitor tracked. Only 0-9, a-z, A-Z, ., - and _ are allowed. The tracking server drops a visitor whose ID breaks this rule and still answers 200, so the events never reach reports or Live Logs. Keep the ID to 64 characters or fewer. One longer ID can stop reports from using visitor-level revenue statistics for its whole variation. An ID over 256 characters may not be tracked at all. + * */ visitorId?: string; /** @@ -2558,6 +2583,10 @@ export type VisitorSegments = { * Campaign string */ campaign?: string; + /** + * Content string (ad-creative identifier from utm_content) + */ + content?: string; /** * Type of the visitor */ @@ -2728,7 +2757,7 @@ export type GetVisitorDataData = { */ projectId: number; /** - * ID of the visitor to be retrieved + * ID of the visitor to be retrieved. Use the same visitor ID sent to the tracking endpoints. They accept only 0-9, a-z, A-Z, ., - and _. Keep it to 64 characters or fewer. */ visitorId: string; }; @@ -2741,7 +2770,7 @@ export type GetVisitorDataBySdkKeyData = { */ sdkKey: string; /** - * ID of the visitor to be retrieved + * ID of the visitor to be retrieved. Use the same visitor ID sent to the tracking endpoints. They accept only 0-9, a-z, A-Z, ., - and _. Keep it to 64 characters or fewer. */ visitorId: string; };