Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packages/js-sdk": "4.3.3",
"packages/enums": "2.3.0",
"packages/types": "3.9.0",
"packages/types": "3.10.0",
"packages/utils": "2.2.3",
"packages/event": "2.1.3",
"packages/bucketing": "3.1.2",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"devDependencies": {
"@types/eslint-plugin-mocha": "^10",
"eslint-plugin-mocha": "^11.2.0",
"eslint-plugin-prettier": "^5.5.4"
"eslint-plugin-prettier": "^5.5.4",
"prettier": "^3.6.2"
},
"resolutions": {
"form-data": ">=4.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/enums/src/dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const MESSAGES = {
SEGMENTATION_NOT_RESTRICTED: 'Segmentation not restricted',
RULE_NOT_MATCH: 'Rule does not match',
RULE_MATCH: 'Found matched rule at OR block #',
RULE_MATCH_AND: 'AND block rule macthed',
RULE_MATCH_AND: 'AND block rule matched',
RULE_MATCH_START: 'About to evaluate rule #',
LOCATION_ACTIVATED: 'Location # activated',
LOCATION_DEACTIVATED: 'Location # deactivated',
Expand Down
3 changes: 2 additions & 1 deletion packages/enums/src/segments/source-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export enum SourceType {
CAMPAIGN = 'campaign',
SEARCH = 'search',
REFERRAL = 'referral',
DIRECT = 'direct'
DIRECT = 'direct',
AI_TOOL = 'ai_tool'
}
17 changes: 8 additions & 9 deletions packages/rules/src/rule-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,16 @@ export class RuleManager implements RuleManagerInterface {
) {
for (let i = 0, l = rulesSubset.AND.length; i < l; i++) {
match = this._processORWHEN(data, rulesSubset.AND[i]);
if (match === false) {
return false;
// AND requires ALL to explicitly return true
if (match !== true) {
return match;
}
}
if (match !== false) {
this._loggerManager?.info?.(
'RuleManager._processAND()',
MESSAGES.RULE_MATCH_AND
);
}
return match;
this._loggerManager?.info?.(
'RuleManager._processAND()',
MESSAGES.RULE_MATCH_AND
);
return true;
} else {
this._loggerManager?.warn?.(
'RuleManager._processAND()',
Expand Down
8 changes: 8 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [3.10.0](https://github.com/convertcom/javascript-sdk/compare/js-sdk-types-v3.9.0...js-sdk-types-v3.10.0) (2025-11-12)


### Features

* automated TS Serving API update ([c363a57](https://github.com/convertcom/javascript-sdk/commit/c363a577a01bd3787b7ee1936e853608b6805e7d))
* automated TS Serving API update ([f844627](https://github.com/convertcom/javascript-sdk/commit/f8446274208db0f241745117e3f6088fd04826bf))

## [3.9.0](https://github.com/convertcom/javascript-sdk/compare/js-sdk-types-v3.8.1...js-sdk-types-v3.9.0) (2025-09-05)


Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"typescript-eslint": "^8.46.4",
"webpack": "^5.102.1"
},
"version": "3.9.0",
"version": "3.10.0",
"peerDependencies": {
"@convertcom/js-sdk-enums": ">=2.3.0"
}
Expand Down
16 changes: 14 additions & 2 deletions packages/types/src/config/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,11 @@ export type RuleObjectAudience = {
*/
OR?: Array<{
/**
* An array of OR_WHEN-blocks.
* This describes a colections of logical blocks which are evaluated using AND's between them
*/
AND?: Array<{
/**
* An array of individual rule elements that do not involve URL matching.
* This describes a colections of logical blocks which are evaluated using OR's between them
*/
OR_WHEN?: Array<RuleElementAudience>;
}>;
Expand Down Expand Up @@ -1816,6 +1816,10 @@ export type ConfigExperience = {
*/
products_ordered_count?: (NumericOutlier);
};
/**
* List of placeholders used by this experience (from changes, global_js, and global_css)
*/
placeholders?: Array<(string)>;
/**
* A couple of settings only applicable to Split URL experiments
*/
Expand Down Expand Up @@ -2171,6 +2175,10 @@ export type ClicksElementGoalSettings = {
* Css selector that identifies the DOM element(s) on which will track clicks in order to fire the goal.
*/
selector: string;
/**
* If true, triggers only on pages where the associated experience runs (Experience Location). Does not apply sitewide or to unrelated pages.
*/
only_where_experience_runs?: boolean;
};

/**
Expand Down Expand Up @@ -2485,6 +2493,10 @@ export type ConfigProject = {
* List of active placeholders which are used in experiences for the project
*/
placeholders?: Array<(string)>;
/**
* List of placeholders used in project's Global JavaScript (convertPlaceholders.<key>)
*/
global_javascript_placeholders?: Array<(string)>;
} & ConfigProjectMinimalSettings);
};

Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26013,6 +26013,7 @@ __metadata:
"@types/eslint-plugin-mocha": "npm:^10"
eslint-plugin-mocha: "npm:^11.2.0"
eslint-plugin-prettier: "npm:^5.5.4"
prettier: "npm:^3.6.2"
languageName: unknown
linkType: soft

Expand Down
Loading