Skip to content

Commit 6947479

Browse files
committed
Add Site title & description
1 parent 0aaf28e commit 6947479

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

packages/spacecat-shared-data-access/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/spacecat-shared-data-access",
3-
"version": "3.33.0",
3+
"version": "3.34.0",
44
"description": "Shared modules of the Spacecat Services - Data Access",
55
"type": "module",
66
"engines": {

packages/spacecat-shared-data-access/src/models/plg-onboarding/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export interface PlgOnboarding extends BaseModel {
3232
getBotBlocker(): object | null;
3333
getWaitlistReason(): string | null;
3434
getCompletedAt(): string | null;
35+
getSiteTitle(): string | null;
36+
getSiteDescription(): string | null;
3537
setStatus(status: PlgOnboardingStatus): PlgOnboarding;
3638
setSiteId(siteId: string): PlgOnboarding;
3739
setOrganizationId(organizationId: string): PlgOnboarding;
@@ -40,6 +42,8 @@ export interface PlgOnboarding extends BaseModel {
4042
setBotBlocker(botBlocker: object): PlgOnboarding;
4143
setWaitlistReason(waitlistReason: string): PlgOnboarding;
4244
setCompletedAt(completedAt: string): PlgOnboarding;
45+
setSiteTitle(siteTitle: string | null): PlgOnboarding;
46+
setSiteDescription(siteDescription: string | null): PlgOnboarding;
4347
}
4448

4549
export interface PlgOnboardingCollection extends BaseCollection<PlgOnboarding> {

packages/spacecat-shared-data-access/src/models/plg-onboarding/plg-onboarding.schema.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ const schema = new SchemaBuilder(PlgOnboarding, PlgOnboardingCollection)
9090
type: 'string',
9191
validate: (value) => !value || isIsoDate(value),
9292
})
93+
.addAttribute('siteTitle', {
94+
type: 'string',
95+
required: false,
96+
})
97+
.addAttribute('siteDescription', {
98+
type: 'string',
99+
required: false,
100+
})
93101
// Index: by imsOrgId (PK=imsOrgId, SK=updatedAt) → allByImsOrgId / findByImsOrgId
94102
.addIndex(
95103
{ composite: ['imsOrgId'] },

packages/spacecat-shared-data-access/test/unit/models/plg-onboarding/plg-onboarding.model.test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ describe('PlgOnboardingModel', () => {
4040
botBlocker: null,
4141
waitlistReason: null,
4242
completedAt: null,
43+
siteTitle: null,
44+
siteDescription: null,
4345
createdAt: '2026-03-09T12:00:00.000Z',
4446
updatedAt: '2026-03-09T12:00:00.000Z',
4547
updatedBy: 'system',
@@ -127,6 +129,14 @@ describe('PlgOnboardingModel', () => {
127129
it('gets completedAt', () => {
128130
expect(instance.getCompletedAt()).to.be.null;
129131
});
132+
133+
it('gets siteTitle', () => {
134+
expect(instance.getSiteTitle()).to.be.null;
135+
});
136+
137+
it('gets siteDescription', () => {
138+
expect(instance.getSiteDescription()).to.be.null;
139+
});
130140
});
131141

132142
describe('setters', () => {
@@ -186,5 +196,15 @@ describe('PlgOnboardingModel', () => {
186196
instance.setCompletedAt('2026-03-09T15:00:00.000Z');
187197
expect(instance.getCompletedAt()).to.equal('2026-03-09T15:00:00.000Z');
188198
});
199+
200+
it('sets siteTitle', () => {
201+
instance.setSiteTitle('Example Store');
202+
expect(instance.getSiteTitle()).to.equal('Example Store');
203+
});
204+
205+
it('sets siteDescription', () => {
206+
instance.setSiteDescription('Quality goods since 1999.');
207+
expect(instance.getSiteDescription()).to.equal('Quality goods since 1999.');
208+
});
189209
});
190210
});

0 commit comments

Comments
 (0)