diff --git a/api/src/utils/test/fixtures/category.ts b/api/src/utils/test/fixtures/category.ts index 0b573980..0c77070e 100644 --- a/api/src/utils/test/fixtures/category.ts +++ b/api/src/utils/test/fixtures/category.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -19,7 +19,7 @@ export type TCategoryFixtures = FixturesTypeBuilder< CategoryCreateDto >; -export const fieldsWithDefaultValues: TCategoryFixtures['defaultValues'] = { +export const categoryDefaultValues: TCategoryFixtures['defaultValues'] = { builtin: false, zoom: 100, offset: [0, 0], @@ -38,7 +38,7 @@ export const categoryFixtures = getFixturesWithDefaultValues< TCategoryFixtures['values'] >({ fixtures: categories, - defaultValues: fieldsWithDefaultValues, + defaultValues: categoryDefaultValues, }); export const installCategoryFixtures = async () => { diff --git a/api/src/utils/test/fixtures/content.ts b/api/src/utils/test/fixtures/content.ts index ecf9ca39..ddf46a4d 100644 --- a/api/src/utils/test/fixtures/content.ts +++ b/api/src/utils/test/fixtures/content.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -19,7 +19,7 @@ import { installContentTypeFixtures } from './contenttype'; type TContentFixtures = FixturesTypeBuilder; -export const fieldsWithDefaultValues: TContentFixtures['defaultValues'] = { +export const contentDefaultValues: TContentFixtures['defaultValues'] = { status: true, }; @@ -141,7 +141,7 @@ export const contentFixtures = getFixturesWithDefaultValues< TContentFixtures['values'] >({ fixtures: contents, - defaultValues: fieldsWithDefaultValues, + defaultValues: contentDefaultValues, }); export const installContentFixtures = async () => { diff --git a/api/src/utils/test/fixtures/contenttype.ts b/api/src/utils/test/fixtures/contenttype.ts index 0b0b4817..8c295b05 100644 --- a/api/src/utils/test/fixtures/contenttype.ts +++ b/api/src/utils/test/fixtures/contenttype.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -22,7 +22,7 @@ type TContentTypeFixtures = FixturesTypeBuilder< ContentTypeCreateDto >; -export const fieldsWithDefaultValues: TContentTypeFixtures['defaultValues'] = { +export const contentTypeDefaultValues: TContentTypeFixtures['defaultValues'] = { fields: [ { name: 'title', @@ -124,7 +124,7 @@ export const contentTypeFixtures = getFixturesWithDefaultValues< TContentTypeFixtures['values'] >({ fixtures: contentTypes, - defaultValues: fieldsWithDefaultValues, + defaultValues: contentTypeDefaultValues, }); export const installContentTypeFixtures = async () => { diff --git a/api/src/utils/test/fixtures/contextvar.ts b/api/src/utils/test/fixtures/contextvar.ts index 576c662c..6cb188f9 100644 --- a/api/src/utils/test/fixtures/contextvar.ts +++ b/api/src/utils/test/fixtures/contextvar.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -16,7 +16,7 @@ import { FixturesTypeBuilder } from '../types'; type TContentVarFixtures = FixturesTypeBuilder; -export const fieldsWithDefaultValues: TContentVarFixtures['defaultValues'] = { +export const contentVarDefaultValues: TContentVarFixtures['defaultValues'] = { permanent: false, }; @@ -35,7 +35,7 @@ export const contextVarFixtures = getFixturesWithDefaultValues< TContentVarFixtures['values'] >({ fixtures: contextVars, - defaultValues: fieldsWithDefaultValues, + defaultValues: contentVarDefaultValues, }); export const installContextVarFixtures = async () => { diff --git a/api/src/utils/test/fixtures/label.ts b/api/src/utils/test/fixtures/label.ts index 5c46189b..7621272a 100644 --- a/api/src/utils/test/fixtures/label.ts +++ b/api/src/utils/test/fixtures/label.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -16,7 +16,7 @@ import { FixturesTypeBuilder } from '../types'; type TLabelFixtures = FixturesTypeBuilder; -export const fieldsWithDefaultValues: TLabelFixtures['defaultValues'] = { +export const contentLabelDefaultValues: TLabelFixtures['defaultValues'] = { builtin: false, }; @@ -49,7 +49,7 @@ export const labelFixtures = getFixturesWithDefaultValues< TLabelFixtures['values'] >({ fixtures: labels, - defaultValues: fieldsWithDefaultValues, + defaultValues: contentLabelDefaultValues, }); export const installLabelFixtures = async () => { diff --git a/api/src/utils/test/fixtures/nlpsample.ts b/api/src/utils/test/fixtures/nlpsample.ts index 00958b77..b62ce7e9 100644 --- a/api/src/utils/test/fixtures/nlpsample.ts +++ b/api/src/utils/test/fixtures/nlpsample.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -19,7 +19,7 @@ import { installLanguageFixtures } from './language'; type TNlpSampleFixtures = FixturesTypeBuilder; -export const fieldsWithDefaultValues: TNlpSampleFixtures['defaultValues'] = { +export const nlpSampleDefaultValues: TNlpSampleFixtures['defaultValues'] = { type: NlpSampleState.train, trained: false, }; @@ -49,7 +49,7 @@ export const nlpSampleFixtures = getFixturesWithDefaultValues< TNlpSampleFixtures['values'] >({ fixtures: nlpSamples, - defaultValues: fieldsWithDefaultValues, + defaultValues: nlpSampleDefaultValues, }); export const installNlpSampleFixtures = async () => { diff --git a/api/src/utils/test/fixtures/subscriber.ts b/api/src/utils/test/fixtures/subscriber.ts index 2cffaefd..0f11f32d 100644 --- a/api/src/utils/test/fixtures/subscriber.ts +++ b/api/src/utils/test/fixtures/subscriber.ts @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -12,19 +12,20 @@ import { SubscriberCreateDto } from '@/chat/dto/subscriber.dto'; import { Subscriber, SubscriberModel } from '@/chat/schemas/subscriber.schema'; import { getFixturesWithDefaultValues } from '../defaultValues'; -import { FixturesTypeBuilder, TFixturesDefaultValues } from '../types'; +import { FixturesTypeBuilder } from '../types'; import { installLabelFixtures } from './label'; import { installUserFixtures } from './user'; type TSubscriberFixtures = FixturesTypeBuilder; -export const fieldsWithDefaultValues: TSubscriberFixtures['defaultValues'] = { - context: {}, - avatar: null, - assignedAt: null, - assignedTo: null, +export const subscriberDefaultValues: TSubscriberFixtures['defaultValues'] = { timezone: 0, + assignedTo: null, + assignedAt: null, + lastvisit: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), + retainedFrom: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), + avatar: null, }; const subscribers: TSubscriberFixtures['values'][] = [ @@ -90,15 +91,6 @@ const subscribers: TSubscriberFixtures['values'][] = [ }, ]; -export const subscriberDefaultValues: TFixturesDefaultValues = { - timezone: 0, - assignedTo: null, - assignedAt: null, - lastvisit: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), - retainedFrom: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), - avatar: null, -}; - export const subscriberFixtures = getFixturesWithDefaultValues< TSubscriberFixtures['values'] >({