Skip to content

feat: Add ContentAi configuration entity to the API Service #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 23, 2025
30 changes: 15 additions & 15 deletions docs/index.html

Large diffs are not rendered by default.

39 changes: 28 additions & 11 deletions docs/openapi/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ Config:
handlers:
description: Optional. The Alert configuration
$ref: '#/HandlerConfig'
contentAiConfig:
description: Optional. The ContentAi configuration
$ref: '#/ContentAiConfig'
ContentAiConfig:
type: object
properties:
index:
description: Optional. The index name for website in the content AI service
type: string
OrganizationConfig:
allOf:
- $ref: '#/Config'
Expand Down Expand Up @@ -203,6 +212,8 @@ Organization:
slack:
- '@user5'
- '@user6'
contentAiConfig:
index: 'example-index-name'
createdAt: '2023-12-15T09:30:00Z'
updatedAt: '2024-01-19T11:20:00Z'
OrganizationList:
Expand Down Expand Up @@ -242,6 +253,8 @@ OrganizationCreate:
slack:
- '@user5'
- '@user6'
contentAiConfig:
index: 'example-index-name'
OrganizationUpdate:
type: object
properties:
Expand All @@ -261,17 +274,19 @@ OrganizationUpdate:
slack:
channel: '#example-channel'
workspace: 'example-workspace'
handlers:
'404':
mentions:
slack:
- '@user3'
- '@user4'
'cwv':
mentions:
slack:
- '@user5'
- '@user6'
handlers:
'404':
mentions:
slack:
- '@user3'
- '@user4'
'cwv':
mentions:
slack:
- '@user5'
- '@user6'
contentAiConfig:
index: 'example-index-name'
Site:
type: object
properties:
Expand Down Expand Up @@ -355,6 +370,8 @@ Site:
pattern:
description: Pattern representing the URL path structure to group
type: string
contentAiConfig:
index: 'example-index-name'
createdAt: '2023-12-15T09:30:00Z'
updatedAt: '2024-01-19T11:20:00Z'
SiteWithLatestAudit:
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@adobe/helix-shared-wrap": "2.0.2",
"@adobe/helix-status": "10.1.5",
"@adobe/helix-universal-logger": "3.0.24",
"@adobe/spacecat-shared-data-access": "2.14.1",
"@adobe/spacecat-shared-data-access": "2.15.2",
"@adobe/spacecat-shared-gpt-client": "1.5.8",
"@adobe/spacecat-shared-http-utils": "1.10.3",
"@adobe/spacecat-shared-ims-client": "1.7.2",
Expand Down
11 changes: 11 additions & 0 deletions test/controllers/audits.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: {} }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getImports: () => [],
getHandlers: () => (({ [auditType]: {} })),
getFetchConfig: () => {},
Expand Down Expand Up @@ -444,6 +445,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
getFetchConfig: () => {},
Expand Down Expand Up @@ -480,6 +482,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
getFetchConfig: () => {},
Expand Down Expand Up @@ -519,6 +522,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
getFetchConfig: () => {},
Expand Down Expand Up @@ -599,6 +603,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
getFetchConfig: () => {},
Expand Down Expand Up @@ -639,6 +644,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
getFetchConfig: () => {},
Expand Down Expand Up @@ -679,6 +685,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
});
Expand Down Expand Up @@ -716,6 +723,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
getImports: () => [],
});
Expand Down Expand Up @@ -753,6 +761,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
});

Expand Down Expand Up @@ -790,6 +799,7 @@ describe('Audits Controller', () => {
...handlerTypeConfig,
getHandlerConfig: (type) => ({ [type]: handlerTypeConfig }),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => (({ [auditType]: {} })),
});

Expand All @@ -812,6 +822,7 @@ describe('Audits Controller', () => {
getGroupedURLs: sandbox.stub(),
updateGroupedURLs: sandbox.stub(),
getSlackConfig: () => {},
getContentAiConfig: () => {},
getHandlers: () => {},
getImports: () => {},
getFetchConfig: () => {},
Expand Down
1 change: 1 addition & 0 deletions  .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.14.0