Skip to content
Merged
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
7 changes: 7 additions & 0 deletions dotcom-rendering/src/frontend/feFront.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ export type FECollection = {
};

export type FEFrontConfig = {
/**
* Server-side AB tests. Optional from `frontend`; a default of
* `{}` is applied by AJV during request validation (see `useDefaults` in
* `validate.ts`), so this is always present after enhancing.
*
* @default {}
*/
abTests: ServerSideTests;
adUnit: string;
ajaxUrl: string;
Expand Down
3 changes: 2 additions & 1 deletion dotcom-rendering/src/frontend/schemas/feArticle.json
Original file line number Diff line number Diff line change
Expand Up @@ -5164,7 +5164,8 @@
"type": "object",
"properties": {
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"adUnit": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@
"type": "string"
},
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"ajaxUrl": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@
"type": "string"
},
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"ajaxUrl": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"type": "string"
},
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"ajaxUrl": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@
"type": "string"
},
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"ajaxUrl": {
Expand Down
3 changes: 2 additions & 1 deletion dotcom-rendering/src/frontend/schemas/feFront.json
Original file line number Diff line number Diff line change
Expand Up @@ -3479,7 +3479,8 @@
"type": "object",
"properties": {
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"adUnit": {
Expand Down
3 changes: 2 additions & 1 deletion dotcom-rendering/src/frontend/schemas/feTagPage.json
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,8 @@
"type": "object",
"properties": {
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"adUnit": {
Expand Down
3 changes: 2 additions & 1 deletion dotcom-rendering/src/model/newsletter-page-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
"$ref": "#/definitions/Switches"
},
"abTests": {
"description": "Narrowest representation of the server-side tests\nobject shape, which is [defined in `frontend`](https://github.com/guardian/frontend/blob/23743723030a041e4f4f59fa265ee2be0bb51825/common/app/experiments/ExperimentsDefinition.scala#L24-L26).\n\n**Note:** This type is not support by JSON-schema, it evaluates as `object`",
"description": "Server-side AB tests. Optional from `frontend`; a default of\n`{}` is applied by AJV during request validation (see `useDefaults` in\n`validate.ts`), so this is always present after enhancing.",
"default": {},
"type": "object"
},
"serverSideABTests": {
Expand Down
7 changes: 7 additions & 0 deletions dotcom-rendering/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ export interface Switches {
* this data could eventually be defined in dotcom-rendering
*/
export interface ConfigType extends CommercialConfigType, LegacyConfig {
/**
* Server-side AB tests. Optional from `frontend`; a default of
* `{}` is applied by AJV during request validation (see `useDefaults` in
* `validate.ts`), so this is always present after enhancing.
*
* @default {}
*/
abTests: ServerSideTests;
adUnit: string;
ajaxUrl: string;
Expand Down
7 changes: 7 additions & 0 deletions dotcom-rendering/src/types/newslettersPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ type FENewslettersConfigType = {
sentryHost: string;
dcrSentryDsn: string; // used in dotcom-rendering/src/client/sentryLoader/sentry.ts
switches: Switches;
/**
* Server-side AB tests. Optional from `frontend`; a default of
* `{}` is applied by AJV during request validation (see `useDefaults` in
* `validate.ts`), so this is always present after enhancing.
*
* @default {}
*/
abTests: ServerSideTests;
serverSideABTests: Record<string, string>;
dfpAccountId: string;
Expand Down
Loading