@webitel/api-services 0.1.64 → 0.1.66
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/package.json +1 -1
- package/src/api/clients/contactGroups/contactGroups.ts +57 -58
- package/src/api/clients/dynamicConditions/dynamicConditions.ts +179 -0
- package/src/api/clients/dynamicGroups/dynamicGroups.ts +191 -0
- package/src/api/clients/index.ts +2 -0
- package/src/api/clients/onlineSkills/onlineSkills.ts +3 -0
- package/src/locale/en/en.ts +15 -0
- package/src/locale/es/es.ts +15 -0
- package/src/locale/kz/kz.ts +15 -0
- package/src/locale/pl/pl.ts +15 -0
- package/src/locale/ro/ro.ts +15 -0
- package/src/locale/ru/ru.ts +15 -0
- package/src/locale/uk/uk.ts +15 -0
- package/src/locale/uz/uz.ts +15 -0
- package/src/locale/vi/vi.ts +15 -0
- package/src/validations/contactGroup/contactGroup.validations.ts +34 -0
- package/src/validations/contactGroupCondition/contactGroupCondition.validations.ts +15 -0
- package/src/validations/index.ts +3 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/contactGroups/contactGroups.d.ts +3 -3
- package/types/api/clients/dynamicConditions/dynamicConditions.d.ts +27 -0
- package/types/api/clients/dynamicGroups/dynamicGroups.d.ts +27 -0
- package/types/api/clients/index.d.ts +2 -0
- package/types/locale/en/en.d.ts +11 -0
- package/types/locale/es/es.d.ts +11 -0
- package/types/locale/index.d.ts +90 -0
- package/types/locale/kz/kz.d.ts +11 -0
- package/types/locale/pl/pl.d.ts +11 -0
- package/types/locale/ro/ro.d.ts +11 -0
- package/types/locale/ru/ru.d.ts +11 -0
- package/types/locale/uk/uk.d.ts +11 -0
- package/types/locale/uz/uz.d.ts +11 -0
- package/types/locale/vi/vi.d.ts +11 -0
- package/types/validations/contactGroup/contactGroup.validations.d.ts +28 -0
- package/types/validations/contactGroupCondition/contactGroupCondition.validations.d.ts +7 -0
- package/types/validations/index.d.ts +3 -0
package/src/locale/pl/pl.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MessageContext } from 'vue-i18n';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
backendErrors: {
|
|
3
5
|
app: {
|
|
@@ -9,5 +11,18 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
},
|
|
14
|
+
sqlstore: {
|
|
15
|
+
onlineSkillsStore: {
|
|
16
|
+
create: {
|
|
17
|
+
alreadyExists: 'Typ aktywności o tej nazwie już istnieje',
|
|
18
|
+
},
|
|
19
|
+
update: {
|
|
20
|
+
alreadyExists: ({ linked }: MessageContext) =>
|
|
21
|
+
linked(
|
|
22
|
+
'backendErrors.sqlstore.onlineSkillsStore.create.alreadyExists',
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
12
27
|
},
|
|
13
28
|
};
|
package/src/locale/ro/ro.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MessageContext } from 'vue-i18n';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
backendErrors: {
|
|
3
5
|
app: {
|
|
@@ -9,5 +11,18 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
},
|
|
14
|
+
sqlstore: {
|
|
15
|
+
onlineSkillsStore: {
|
|
16
|
+
create: {
|
|
17
|
+
alreadyExists: 'Există deja un tip de activitate cu acest nume',
|
|
18
|
+
},
|
|
19
|
+
update: {
|
|
20
|
+
alreadyExists: ({ linked }: MessageContext) =>
|
|
21
|
+
linked(
|
|
22
|
+
'backendErrors.sqlstore.onlineSkillsStore.create.alreadyExists',
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
12
27
|
},
|
|
13
28
|
};
|
package/src/locale/ru/ru.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MessageContext } from 'vue-i18n';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
backendErrors: {
|
|
3
5
|
app: {
|
|
@@ -9,5 +11,18 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
},
|
|
14
|
+
sqlstore: {
|
|
15
|
+
onlineSkillsStore: {
|
|
16
|
+
create: {
|
|
17
|
+
alreadyExists: 'Тип активности с таким названием уже существует',
|
|
18
|
+
},
|
|
19
|
+
update: {
|
|
20
|
+
alreadyExists: ({ linked }: MessageContext) =>
|
|
21
|
+
linked(
|
|
22
|
+
'backendErrors.sqlstore.onlineSkillsStore.create.alreadyExists',
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
12
27
|
},
|
|
13
28
|
};
|
package/src/locale/uk/uk.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MessageContext } from 'vue-i18n';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
backendErrors: {
|
|
3
5
|
app: {
|
|
@@ -9,5 +11,18 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
},
|
|
14
|
+
sqlstore: {
|
|
15
|
+
onlineSkillsStore: {
|
|
16
|
+
create: {
|
|
17
|
+
alreadyExists: 'Тип активності з такою назвою вже існує',
|
|
18
|
+
},
|
|
19
|
+
update: {
|
|
20
|
+
alreadyExists: ({ linked }: MessageContext) =>
|
|
21
|
+
linked(
|
|
22
|
+
'backendErrors.sqlstore.onlineSkillsStore.create.alreadyExists',
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
12
27
|
},
|
|
13
28
|
};
|
package/src/locale/uz/uz.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MessageContext } from 'vue-i18n';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
backendErrors: {
|
|
3
5
|
app: {
|
|
@@ -9,5 +11,18 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
},
|
|
14
|
+
sqlstore: {
|
|
15
|
+
onlineSkillsStore: {
|
|
16
|
+
create: {
|
|
17
|
+
alreadyExists: 'Bu nomdagi faoliyat turi allaqachon mavjud',
|
|
18
|
+
},
|
|
19
|
+
update: {
|
|
20
|
+
alreadyExists: ({ linked }: MessageContext) =>
|
|
21
|
+
linked(
|
|
22
|
+
'backendErrors.sqlstore.onlineSkillsStore.create.alreadyExists',
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
12
27
|
},
|
|
13
28
|
};
|
package/src/locale/vi/vi.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MessageContext } from 'vue-i18n';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
backendErrors: {
|
|
3
5
|
app: {
|
|
@@ -9,5 +11,18 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
},
|
|
14
|
+
sqlstore: {
|
|
15
|
+
onlineSkillsStore: {
|
|
16
|
+
create: {
|
|
17
|
+
alreadyExists: 'Loại hoạt động với tên này đã tồn tại',
|
|
18
|
+
},
|
|
19
|
+
update: {
|
|
20
|
+
alreadyExists: ({ linked }: MessageContext) =>
|
|
21
|
+
linked(
|
|
22
|
+
'backendErrors.sqlstore.onlineSkillsStore.create.alreadyExists',
|
|
23
|
+
),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
12
27
|
},
|
|
13
28
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ContactsGroup } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { ContactsGroupType } from '@webitel/api-services/gen/models';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import {
|
|
5
|
+
lookupSchema,
|
|
6
|
+
requiredLookupSchema,
|
|
7
|
+
} from '../_shared/lookup.validations';
|
|
8
|
+
import type { ZodShape } from '../types';
|
|
9
|
+
|
|
10
|
+
const baseSchema = {
|
|
11
|
+
name: z.string().min(1),
|
|
12
|
+
description: z.string().optional(),
|
|
13
|
+
enabled: z.boolean().optional(),
|
|
14
|
+
type: z.string().optional(),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const staticSchema = z.object<ZodShape<ContactsGroup>>({
|
|
18
|
+
...baseSchema,
|
|
19
|
+
defaultGroup: lookupSchema.optional(),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const dynamicSchema = z.object<ZodShape<ContactsGroup>>({
|
|
23
|
+
...baseSchema,
|
|
24
|
+
defaultGroup: requiredLookupSchema,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const contactGroupSchema = z.discriminatedUnion('type', [
|
|
28
|
+
staticSchema.extend({
|
|
29
|
+
type: z.literal(ContactsGroupType.Static),
|
|
30
|
+
}),
|
|
31
|
+
dynamicSchema.extend({
|
|
32
|
+
type: z.literal(ContactsGroupType.Dynamic),
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContactsDynamicCondition } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import {
|
|
4
|
+
lookupSchema,
|
|
5
|
+
requiredLookupSchema,
|
|
6
|
+
} from '../_shared/lookup.validations';
|
|
7
|
+
import type { ZodShape } from '../types';
|
|
8
|
+
|
|
9
|
+
export const contactGroupConditionSchema = z.object<
|
|
10
|
+
ZodShape<ContactsDynamicCondition>
|
|
11
|
+
>({
|
|
12
|
+
expression: z.string().min(1),
|
|
13
|
+
group: requiredLookupSchema,
|
|
14
|
+
assignee: lookupSchema.optional(),
|
|
15
|
+
});
|
package/src/validations/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './_shared/lookup.validations';
|
|
1
2
|
export * from './auditForm/auditForm.validations';
|
|
2
3
|
export * from './bucket/bucket.validations';
|
|
3
4
|
export * from './calendar/calendar.validations';
|
|
@@ -5,6 +6,8 @@ export * from './casePriority/casePriority.validations';
|
|
|
5
6
|
export * from './caseSource/caseSource.validations';
|
|
6
7
|
export * from './caseStatus/caseStatus.validations';
|
|
7
8
|
export * from './caseStatusCondition/caseStatusCondition.validations';
|
|
9
|
+
export * from './contactGroup/contactGroup.validations';
|
|
10
|
+
export * from './contactGroupCondition/contactGroupCondition.validations';
|
|
8
11
|
export * from './OAuth/OAuth.validations';
|
|
9
12
|
export * from './onlineSkill/onlineSkill.validations';
|
|
10
13
|
export * from './types';
|