Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 9 additions & 47 deletions packages/types/src/config/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,6 @@ export enum ConfigAudienceTypes {
TRANSIENT = 'transient'
}

/**
* Account billing status
*/
export type PlanStatus = 'paid' | 'trial' | 'trialExpired' | 'canceled' | 'paused';

/**
* Account billing status
*/
export const PlanStatus = {
PAID: 'paid',
TRIAL: 'trial',
TRIAL_EXPIRED: 'trialExpired',
CANCELED: 'canceled',
PAUSED: 'paused'
} as const;

/**
* The Convert product line this billing plan pertains to.
* - `experiences`: Relates to A/B testing, MVT, Split URL, and personalization features.
* - `deploy`: Relates to the "Deploy" feature for rolling out changes to specific audiences without A/B testing reports. Knowledge Base: "Deployments have the potential to contain small segments...and this could be interpreted by Privacy Authorities in Europe as identification of data subjects."
* - `addons`: Relates to add-on products that extend the core platform capabilities.
*
*/
export type Products = 'experiences' | 'deploy' | 'addons';

/**
* The Convert product line this billing plan pertains to.
* - `experiences`: Relates to A/B testing, MVT, Split URL, and personalization features.
* - `deploy`: Relates to the "Deploy" feature for rolling out changes to specific audiences without A/B testing reports. Knowledge Base: "Deployments have the potential to contain small segments...and this could be interpreted by Privacy Authorities in Europe as identification of data subjects."
* - `addons`: Relates to add-on products that extend the core platform capabilities.
*
*/
export const Products = {
EXPERIENCES: 'experiences',
DEPLOY: 'deploy',
ADDONS: 'addons'
} as const;

export type PageNumber = {
/**
* The page number for paginated results. For example, if `results_per_page` is 30, `page: 2` will retrieve items 31-60.
Expand Down Expand Up @@ -1916,14 +1878,14 @@ export type ConfigGoalBase = {
/**
* List of goal types to be returned
*/
type?: Array<GoalTypes>;
type?: GoalTypes;
Comment on lines 1878 to +1881

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The change from Array<GoalTypes> to GoalTypes is too restrictive. Several goal types that extend ConfigGoalBase (such as GaGoal, SubmitsFormGoal, ClicksLinkGoal, and ClicksElementGoal) use type strings that are not present in the GoalTypes enum, which will lead to TypeScript errors. Additionally, the JSDoc comment 'List of goal types to be returned' should be updated to reflect that it is now a single value.

rules?: ((RuleObject) | null);
};

export type ConfigGoal = DomInteractionGoal | ScrollPercentageGoal | RevenueGoal | NoSettingsGoal | GaGoal | SubmitsFormGoal | ClicksLinkGoal | ClicksElementGoal;

export type DomInteractionGoal = ConfigGoalBase & {
type?: 'dom_interaction';
type?: GoalTypes.DOM_INTERACTION;
settings?: DomInteractionGoalSettings;
};

Expand All @@ -1932,7 +1894,7 @@ export enum type11 {
}

export type ScrollPercentageGoal = ConfigGoalBase & {
type?: 'scroll_percentage';
type?: GoalTypes.SCROLL_PERCENTAGE;
settings?: ScrollPercentageGoalSettings;
};

Expand All @@ -1941,7 +1903,7 @@ export enum type12 {
}

export type RevenueGoal = ConfigGoalBase & {
type?: 'revenue';
type?: GoalTypes.REVENUE;
settings?: RevenueGoalSettings;
};

Expand All @@ -1950,7 +1912,7 @@ export enum type13 {
}

export type NoSettingsGoal = ConfigGoalBase & {
type?: 'advanced' | 'visits_page' | 'code_trigger';
type?: GoalTypes.ADVANCED | 'visits_page' | GoalTypes.CODE_TRIGGER;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line mixes enum members (GoalTypes.ADVANCED, GoalTypes.CODE_TRIGGER) with a string literal ('visits_page'). For consistency and better type safety, visits_page should be added to the GoalTypes enum and used here.

};

export enum type14 {
Expand Down Expand Up @@ -2115,15 +2077,15 @@ export type LocationTriggerBase = {
};

export type LocationTriggerUponRun = LocationTriggerBase & {
type?: 'upon_run';
type?: LocationTriggerTypes.UPON_RUN;
};

export enum type19 {
UPON_RUN = 'upon_run'
}

export type LocationTriggerManual = LocationTriggerBase & {
type?: 'manual';
type?: LocationTriggerTypes.MANUAL;
};

export enum type20 {
Expand All @@ -2146,7 +2108,7 @@ export enum LocationDomTriggerEvents {
}

export type LocationTriggerDomElement = LocationTriggerBase & {
type?: 'dom_element';
type?: LocationTriggerTypes.DOM_ELEMENT;
/**
* Describes html selector
*/
Expand All @@ -2162,7 +2124,7 @@ export enum type21 {
}

export type LocationTriggerCallback = LocationTriggerBase & {
type?: 'callback';
type?: LocationTriggerTypes.CALLBACK;
/**
* Describes the js callback that will be executed in order to fire the experience.
*
Expand Down
Loading