@hexabot-ai/api 3.2.2-alpha.7 → 3.2.2-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/channel.service.js +3 -1
- package/dist/channel/channel.service.js.map +1 -1
- package/dist/channel/lib/__test__/label.mock.js +0 -24
- package/dist/channel/lib/__test__/label.mock.js.map +1 -1
- package/dist/channel/services/source.service.d.ts +2 -0
- package/dist/channel/services/source.service.js +22 -0
- package/dist/channel/services/source.service.js.map +1 -1
- package/dist/chat/dto/label.dto.d.ts +0 -1
- package/dist/chat/dto/label.dto.js +0 -6
- package/dist/chat/dto/label.dto.js.map +1 -1
- package/dist/chat/entities/label-group.entity.d.ts +0 -2
- package/dist/chat/entities/label.entity.d.ts +0 -4
- package/dist/chat/entities/label.entity.js +0 -5
- package/dist/chat/entities/label.entity.js.map +1 -1
- package/dist/chat/services/subscriber.service.d.ts +0 -1
- package/dist/static/assets/{browser-ponyfill-CEwoCVSx.js → browser-ponyfill-Qk7qpw-i.js} +1 -1
- package/dist/static/assets/{cssMode--IlDJz7y.js → cssMode-CdhvY6oD.js} +1 -1
- package/dist/static/assets/{freemarker2-bg_Owo1H.js → freemarker2-BPoURZH1.js} +1 -1
- package/dist/static/assets/{handlebars-CO-ZB4C_.js → handlebars-C4oubER1.js} +1 -1
- package/dist/static/assets/{html-jwF9Nzjc.js → html-CDE5RgVN.js} +1 -1
- package/dist/static/assets/{htmlMode-DRaYXCag.js → htmlMode-C8edIUUq.js} +1 -1
- package/dist/static/assets/{index-C1EyZVnd.js → index-C1NxBXuS.js} +2031 -2031
- package/dist/static/assets/{javascript-BXVcPsQH.js → javascript-Wp5m7adK.js} +1 -1
- package/dist/static/assets/{jsonMode-DnXHebnn.js → jsonMode-0eww5Srr.js} +1 -1
- package/dist/static/assets/{liquid-K9ivjSXd.js → liquid-DTktXITv.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-Bec2yhP4.js → lspLanguageFeatures-BzIRlKhn.js} +1 -1
- package/dist/static/assets/{mdx-CjD0T1se.js → mdx-D508emqD.js} +1 -1
- package/dist/static/assets/{python-DRkLfGvI.js → python-BfhIq2kX.js} +1 -1
- package/dist/static/assets/{razor-DSBkwv0Q.js → razor-C7F8fOds.js} +1 -1
- package/dist/static/assets/{tsMode-F8_-k2jz.js → tsMode-B8zPu6Wl.js} +1 -1
- package/dist/static/assets/{typescript-fuBu-iOB.js → typescript-Dew3VavZ.js} +1 -1
- package/dist/static/assets/{xml-BlB1OdEv.js → xml-B_2tc6Mh.js} +1 -1
- package/dist/static/assets/{yaml-BIRHigS_.js → yaml-pHcw4KrS.js} +1 -1
- package/dist/static/index.html +1 -1
- package/dist/static/locales/en/translation.json +2 -1
- package/dist/static/locales/fr/translation.json +2 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/user/controllers/user.controller.d.ts +0 -2
- package/dist/user/entities/user.entity.d.ts +0 -2
- package/dist/utils/test/fixtures/label-group.d.ts +1 -2
- package/dist/utils/test/fixtures/label.d.ts +1 -2
- package/dist/utils/test/fixtures/label.js +0 -19
- package/dist/utils/test/fixtures/label.js.map +1 -1
- package/package.json +4 -4
- package/src/channel/channel.service.ts +5 -2
- package/src/channel/lib/__test__/label.mock.ts +0 -24
- package/src/channel/services/source.service.ts +38 -1
- package/src/chat/dto/label.dto.ts +1 -12
- package/src/chat/entities/label.entity.ts +0 -4
- package/src/utils/test/fixtures/label.ts +0 -19
|
@@ -103,7 +103,6 @@ export declare class ReadOnlyUserController extends BaseOrmController<UserOrmEnt
|
|
|
103
103
|
title: string;
|
|
104
104
|
name: string;
|
|
105
105
|
builtin: boolean;
|
|
106
|
-
label_id?: Record<string, unknown> | null | undefined;
|
|
107
106
|
description?: string | null | undefined;
|
|
108
107
|
group?: string | null | undefined;
|
|
109
108
|
users?: undefined;
|
|
@@ -237,7 +236,6 @@ export declare class ReadOnlyUserController extends BaseOrmController<UserOrmEnt
|
|
|
237
236
|
title: string;
|
|
238
237
|
name: string;
|
|
239
238
|
builtin: boolean;
|
|
240
|
-
label_id?: Record<string, unknown> | null | undefined;
|
|
241
239
|
description?: string | null | undefined;
|
|
242
240
|
group?: string | null | undefined;
|
|
243
241
|
users?: undefined;
|
|
@@ -109,7 +109,6 @@ export declare class UserOrmEntity extends SubscriberOrmEntity<UserDto> {
|
|
|
109
109
|
title: string;
|
|
110
110
|
name: string;
|
|
111
111
|
builtin: boolean;
|
|
112
|
-
label_id?: Record<string, unknown> | null | undefined;
|
|
113
112
|
description?: string | null | undefined;
|
|
114
113
|
group?: string | null | undefined;
|
|
115
114
|
users?: undefined;
|
|
@@ -120,7 +119,6 @@ export declare class UserOrmEntity extends SubscriberOrmEntity<UserDto> {
|
|
|
120
119
|
title: string;
|
|
121
120
|
name: string;
|
|
122
121
|
builtin: boolean;
|
|
123
|
-
label_id?: Record<string, unknown> | null | undefined;
|
|
124
122
|
description?: string | null | undefined;
|
|
125
123
|
group?: string | null | undefined;
|
|
126
124
|
users?: undefined;
|
|
@@ -15,11 +15,10 @@ export declare const groupedLabelFixtures: import("../types").TFixtures<import("
|
|
|
15
15
|
title: string;
|
|
16
16
|
name: string;
|
|
17
17
|
builtin: boolean;
|
|
18
|
-
label_id?: Record<string, unknown> | null | undefined;
|
|
19
18
|
description?: string | null | undefined;
|
|
20
19
|
group?: string | null | undefined;
|
|
21
20
|
users?: undefined;
|
|
22
|
-
}, "name" | "createdAt" | "description" | "title" | "builtin" | "users" | "group"
|
|
21
|
+
}, "name" | "createdAt" | "description" | "title" | "builtin" | "users" | "group">>[];
|
|
23
22
|
export declare const installLabelGroupFixturesTypeOrm: (dataSource: DataSource) => Promise<{
|
|
24
23
|
labelGroups: LabelGroupOrmEntity[];
|
|
25
24
|
labels: LabelOrmEntity[];
|
|
@@ -13,9 +13,8 @@ export declare const labelFixtures: import("../types").TFixtures<import("../type
|
|
|
13
13
|
title: string;
|
|
14
14
|
name: string;
|
|
15
15
|
builtin: boolean;
|
|
16
|
-
label_id?: Record<string, unknown> | null | undefined;
|
|
17
16
|
description?: string | null | undefined;
|
|
18
17
|
group?: string | null | undefined;
|
|
19
18
|
users?: undefined;
|
|
20
|
-
}, "name" | "createdAt" | "description" | "title" | "builtin" | "users" | "group"
|
|
19
|
+
}, "name" | "createdAt" | "description" | "title" | "builtin" | "users" | "group">>[];
|
|
21
20
|
export declare const installLabelFixturesTypeOrm: (dataSource: DataSource) => Promise<LabelOrmEntity[]>;
|
|
@@ -9,34 +9,16 @@ exports.contentLabelDefaultValues = {
|
|
|
9
9
|
exports.labels = [
|
|
10
10
|
{
|
|
11
11
|
description: 'test description 1',
|
|
12
|
-
label_id: {
|
|
13
|
-
messenger: 'messenger',
|
|
14
|
-
web: 'web',
|
|
15
|
-
twitter: 'twitter',
|
|
16
|
-
dimelo: 'dimelo',
|
|
17
|
-
},
|
|
18
12
|
name: 'TEST_TITLE_1',
|
|
19
13
|
title: 'test title 1',
|
|
20
14
|
},
|
|
21
15
|
{
|
|
22
16
|
description: 'test description 2',
|
|
23
|
-
label_id: {
|
|
24
|
-
messenger: 'messenger',
|
|
25
|
-
web: 'web',
|
|
26
|
-
twitter: 'twitter',
|
|
27
|
-
dimelo: 'dimelo',
|
|
28
|
-
},
|
|
29
17
|
name: 'TEST_TITLE_2',
|
|
30
18
|
title: 'test title 2',
|
|
31
19
|
},
|
|
32
20
|
{
|
|
33
21
|
description: 'test description 3',
|
|
34
|
-
label_id: {
|
|
35
|
-
messenger: 'messenger',
|
|
36
|
-
web: 'web',
|
|
37
|
-
twitter: 'twitter',
|
|
38
|
-
dimelo: 'dimelo',
|
|
39
|
-
},
|
|
40
22
|
name: 'TEST_TITLE_3',
|
|
41
23
|
title: 'test title 3',
|
|
42
24
|
},
|
|
@@ -56,7 +38,6 @@ const installLabelFixturesTypeOrm = async (dataSource) => {
|
|
|
56
38
|
...label,
|
|
57
39
|
builtin: fixture.builtin ?? false,
|
|
58
40
|
description: fixture.description === undefined ? null : fixture.description,
|
|
59
|
-
label_id: fixture.label_id === undefined ? null : fixture.label_id,
|
|
60
41
|
group: group ? { id: group } : null,
|
|
61
42
|
});
|
|
62
43
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/utils/test/fixtures/label.ts"],"names":[],"mappings":";;;AAWA,sEAA8D;AAE9D,oDAAgE;AAKnD,QAAA,yBAAyB,GAAoC;IACxE,OAAO,EAAE,KAAK;CACf,CAAC;AAEW,QAAA,MAAM,GAA+B;IAChD;QACE,WAAW,EAAE,oBAAoB;QACjC,
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/utils/test/fixtures/label.ts"],"names":[],"mappings":";;;AAWA,sEAA8D;AAE9D,oDAAgE;AAKnD,QAAA,yBAAyB,GAAoC;IACxE,OAAO,EAAE,KAAK;CACf,CAAC;AAEW,QAAA,MAAM,GAA+B;IAChD;QACE,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;KACtB;IACD;QACE,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;KACtB;IACD;QACE,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;KACtB;CACF,CAAC;AAEW,QAAA,aAAa,GAAG,IAAA,4CAA4B,EAEvD;IACA,QAAQ,EAAE,cAAM;IAChB,aAAa,EAAE,iCAAyB;CACzC,CAAC,CAAC;AAEI,MAAM,2BAA2B,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAC1E,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,6BAAc,CAAC,CAAC;IAE5D,IAAI,MAAM,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;QAC7B,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,QAAQ,GAAG,qBAAa,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7C,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;QAEpC,OAAO,UAAU,CAAC,MAAM,CAAC;YACvB,GAAG,KAAK;YACR,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK;YACjC,WAAW,EACT,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW;YAChE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAE,EAAE,EAAE,EAAE,KAAK,EAAsC,CAAC,CAAC,CAAC,IAAI;SACzE,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEhC,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;AAClE,CAAC,CAAC;AAtBW,QAAA,2BAA2B,+BAsBtC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hexabot-ai/api",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.2.2-alpha.
|
|
4
|
+
"version": "3.2.2-alpha.9",
|
|
5
5
|
"description": "Hexabot is a solution for creating and managing chatbots across multiple channels, leveraging AI for advanced conversational capabilities. It provides a user-friendly interface for building, training, and deploying chatbots with integrated support for various messaging platforms.",
|
|
6
6
|
"author": "Hexastack",
|
|
7
7
|
"license": "FCL-1.0-ALv2",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"typeorm": "^0.3.28",
|
|
91
91
|
"yaml": "^2.8.3",
|
|
92
92
|
"zod": "^4.3.6",
|
|
93
|
-
"@hexabot-ai/agentic": "3.1.2-alpha.
|
|
94
|
-
"@hexabot-ai/types": "3.0.2-alpha.
|
|
93
|
+
"@hexabot-ai/agentic": "3.1.2-alpha.9",
|
|
94
|
+
"@hexabot-ai/types": "3.0.2-alpha.9"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@compodoc/compodoc": "^1.1.31",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"tsconfig-paths": "^4.2.0",
|
|
143
143
|
"tsconfig-paths-jest": "^0.0.1",
|
|
144
144
|
"typescript": "^5.1.3",
|
|
145
|
-
"@hexabot-ai/frontend": "3.2.2-alpha.
|
|
145
|
+
"@hexabot-ai/frontend": "3.2.2-alpha.9"
|
|
146
146
|
},
|
|
147
147
|
"optionalDependencies": {
|
|
148
148
|
"@css-inline/css-inline-linux-arm64-musl": "^0.14.1",
|
|
@@ -42,9 +42,12 @@ export class ChannelService implements OnApplicationBootstrap {
|
|
|
42
42
|
) {}
|
|
43
43
|
|
|
44
44
|
async onApplicationBootstrap(): Promise<void> {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const registeredChannelNames = this.getAll().map((handler) =>
|
|
46
|
+
handler.getName(),
|
|
47
47
|
);
|
|
48
|
+
|
|
49
|
+
await this.sourceService.ensureDefaultSources(registeredChannelNames);
|
|
50
|
+
await this.sourceService.disableUnregisteredSources(registeredChannelNames);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
public setChannel<T extends ChannelName, C extends ChannelHandler<T>>(
|
|
@@ -12,12 +12,6 @@ const baseLabel: Label = {
|
|
|
12
12
|
...modelInstance,
|
|
13
13
|
title: '',
|
|
14
14
|
name: '',
|
|
15
|
-
label_id: {
|
|
16
|
-
messenger: '',
|
|
17
|
-
web: '',
|
|
18
|
-
dimelo: '',
|
|
19
|
-
twitter: '',
|
|
20
|
-
},
|
|
21
15
|
description: '',
|
|
22
16
|
builtin: false,
|
|
23
17
|
group: null,
|
|
@@ -27,12 +21,6 @@ export const labelMock: Label = {
|
|
|
27
21
|
...baseLabel,
|
|
28
22
|
title: 'Label',
|
|
29
23
|
name: 'label',
|
|
30
|
-
label_id: {
|
|
31
|
-
messenger: 'none',
|
|
32
|
-
web: 'none',
|
|
33
|
-
dimelo: 'none',
|
|
34
|
-
twitter: 'none',
|
|
35
|
-
},
|
|
36
24
|
};
|
|
37
25
|
|
|
38
26
|
export const customerLabelsMock: Label[] = [
|
|
@@ -40,22 +28,10 @@ export const customerLabelsMock: Label[] = [
|
|
|
40
28
|
...baseLabel,
|
|
41
29
|
title: 'Client',
|
|
42
30
|
name: 'client',
|
|
43
|
-
label_id: {
|
|
44
|
-
messenger: 'none',
|
|
45
|
-
web: 'none',
|
|
46
|
-
dimelo: 'none',
|
|
47
|
-
twitter: 'none',
|
|
48
|
-
},
|
|
49
31
|
},
|
|
50
32
|
{
|
|
51
33
|
...baseLabel,
|
|
52
34
|
title: 'Professional',
|
|
53
35
|
name: 'profressional',
|
|
54
|
-
label_id: {
|
|
55
|
-
messenger: 'none',
|
|
56
|
-
web: 'none',
|
|
57
|
-
dimelo: 'none',
|
|
58
|
-
twitter: 'none',
|
|
59
|
-
},
|
|
60
36
|
},
|
|
61
37
|
];
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MethodNotAllowedException,
|
|
12
12
|
NotFoundException,
|
|
13
13
|
} from '@nestjs/common';
|
|
14
|
-
import { FindManyOptions, FindOneOptions } from 'typeorm';
|
|
14
|
+
import { FindManyOptions, FindOneOptions, In, Not } from 'typeorm';
|
|
15
15
|
import { DeleteResult } from 'typeorm/driver/mongodb/typings';
|
|
16
16
|
import z from 'zod';
|
|
17
17
|
|
|
@@ -107,6 +107,12 @@ export class SourceService extends BaseOrmService<SourceOrmEntity> {
|
|
|
107
107
|
return defaultWorkflow;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
private isStateOnlyDisablePayload(payload: SourceUpdateDto): boolean {
|
|
111
|
+
const keys = Object.keys(payload);
|
|
112
|
+
|
|
113
|
+
return keys.length === 1 && keys[0] === 'state' && payload.state === false;
|
|
114
|
+
}
|
|
115
|
+
|
|
110
116
|
private async buildCreatePayload(
|
|
111
117
|
payload: SourceCreateDto,
|
|
112
118
|
): Promise<SourceCreateDto> {
|
|
@@ -141,6 +147,16 @@ export class SourceService extends BaseOrmService<SourceOrmEntity> {
|
|
|
141
147
|
throw new NotFoundException('Source not found');
|
|
142
148
|
}
|
|
143
149
|
|
|
150
|
+
if (!this.channelRegistry.findChannel(existing.channel)) {
|
|
151
|
+
if (this.isStateOnlyDisablePayload(payload)) {
|
|
152
|
+
return await super.updateOne(idOrOptions, { state: false }, options);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
throw new BadRequestException(
|
|
156
|
+
`Channel "${existing.channel}" is not registered`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
144
160
|
const channel = payload.channel ?? existing.channel;
|
|
145
161
|
const shouldResetSettings =
|
|
146
162
|
payload.channel !== undefined && payload.settings === undefined;
|
|
@@ -167,6 +183,27 @@ export class SourceService extends BaseOrmService<SourceOrmEntity> {
|
|
|
167
183
|
);
|
|
168
184
|
}
|
|
169
185
|
|
|
186
|
+
async disableUnregisteredSources(
|
|
187
|
+
registeredChannelNames: string[],
|
|
188
|
+
): Promise<Source[]> {
|
|
189
|
+
const uniqueRegisteredChannelNames = Array.from(
|
|
190
|
+
new Set(registeredChannelNames),
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
return await super.updateMany(
|
|
194
|
+
{
|
|
195
|
+
where:
|
|
196
|
+
uniqueRegisteredChannelNames.length > 0
|
|
197
|
+
? {
|
|
198
|
+
state: true,
|
|
199
|
+
channel: Not(In(uniqueRegisteredChannelNames)),
|
|
200
|
+
}
|
|
201
|
+
: { state: true },
|
|
202
|
+
},
|
|
203
|
+
{ state: false },
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
170
207
|
async findActiveByRef(sourceRef: string): Promise<Source> {
|
|
171
208
|
const normalizedSourceRef = sourceRef.trim();
|
|
172
209
|
const source = await this.findOne(normalizedSourceRef);
|
|
@@ -6,13 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { labelFullSchema, labelSchema } from '@hexabot-ai/types';
|
|
8
8
|
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
|
9
|
-
import {
|
|
10
|
-
IsNotEmpty,
|
|
11
|
-
IsObject,
|
|
12
|
-
IsOptional,
|
|
13
|
-
IsString,
|
|
14
|
-
Matches,
|
|
15
|
-
} from 'class-validator';
|
|
9
|
+
import { IsNotEmpty, IsOptional, IsString, Matches } from 'class-validator';
|
|
16
10
|
|
|
17
11
|
import { IsUUIDv4 } from '@/utils/decorators/is-uuid.decorator';
|
|
18
12
|
import { TDto } from '@/utils/types/dto.types';
|
|
@@ -43,11 +37,6 @@ export class LabelCreateDto {
|
|
|
43
37
|
@IsOptional()
|
|
44
38
|
@IsString()
|
|
45
39
|
description?: string;
|
|
46
|
-
|
|
47
|
-
@ApiPropertyOptional({ description: 'Label id', type: Object })
|
|
48
|
-
@IsOptional()
|
|
49
|
-
@IsObject()
|
|
50
|
-
label_id?: Record<string, any>;
|
|
51
40
|
}
|
|
52
41
|
|
|
53
42
|
export class LabelUpdateDto extends PartialType(LabelCreateDto) {}
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
} from 'typeorm';
|
|
17
17
|
|
|
18
18
|
import { AuditLabel } from '@/audit/decorators/audit-label.decorator';
|
|
19
|
-
import { JsonColumn } from '@/database/decorators/json-column.decorator';
|
|
20
19
|
import { BaseOrmEntity } from '@/database/entities/base.entity';
|
|
21
20
|
import { AsRelation } from '@/utils/decorators/relation-ref.decorator';
|
|
22
21
|
|
|
@@ -51,9 +50,6 @@ export class LabelOrmEntity extends BaseOrmEntity<LabelDto> {
|
|
|
51
50
|
@RelationId((label: LabelOrmEntity) => label.group)
|
|
52
51
|
private readonly groupId?: string | null;
|
|
53
52
|
|
|
54
|
-
@JsonColumn({ nullable: true })
|
|
55
|
-
label_id?: Record<string, any> | null;
|
|
56
|
-
|
|
57
53
|
@Column({ type: 'text', nullable: true })
|
|
58
54
|
description?: string | null;
|
|
59
55
|
|
|
@@ -23,34 +23,16 @@ export const contentLabelDefaultValues: TLabelFixtures['defaultValues'] = {
|
|
|
23
23
|
export const labels: TLabelFixtures['values'][] = [
|
|
24
24
|
{
|
|
25
25
|
description: 'test description 1',
|
|
26
|
-
label_id: {
|
|
27
|
-
messenger: 'messenger',
|
|
28
|
-
web: 'web',
|
|
29
|
-
twitter: 'twitter',
|
|
30
|
-
dimelo: 'dimelo',
|
|
31
|
-
},
|
|
32
26
|
name: 'TEST_TITLE_1',
|
|
33
27
|
title: 'test title 1',
|
|
34
28
|
},
|
|
35
29
|
{
|
|
36
30
|
description: 'test description 2',
|
|
37
|
-
label_id: {
|
|
38
|
-
messenger: 'messenger',
|
|
39
|
-
web: 'web',
|
|
40
|
-
twitter: 'twitter',
|
|
41
|
-
dimelo: 'dimelo',
|
|
42
|
-
},
|
|
43
31
|
name: 'TEST_TITLE_2',
|
|
44
32
|
title: 'test title 2',
|
|
45
33
|
},
|
|
46
34
|
{
|
|
47
35
|
description: 'test description 3',
|
|
48
|
-
label_id: {
|
|
49
|
-
messenger: 'messenger',
|
|
50
|
-
web: 'web',
|
|
51
|
-
twitter: 'twitter',
|
|
52
|
-
dimelo: 'dimelo',
|
|
53
|
-
},
|
|
54
36
|
name: 'TEST_TITLE_3',
|
|
55
37
|
title: 'test title 3',
|
|
56
38
|
},
|
|
@@ -78,7 +60,6 @@ export const installLabelFixturesTypeOrm = async (dataSource: DataSource) => {
|
|
|
78
60
|
builtin: fixture.builtin ?? false,
|
|
79
61
|
description:
|
|
80
62
|
fixture.description === undefined ? null : fixture.description,
|
|
81
|
-
label_id: fixture.label_id === undefined ? null : fixture.label_id,
|
|
82
63
|
group: group ? ({ id: group } as Pick<LabelGroupOrmEntity, 'id'>) : null,
|
|
83
64
|
});
|
|
84
65
|
});
|