@webitel/api-services 1.0.5 → 1.0.7
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 +2 -1
- package/src/api/clients/caseComments/caseComments.ts +141 -0
- package/src/api/clients/caseFiles/caseFiles.ts +79 -0
- package/src/api/clients/caseLinks/caseLinks.ts +150 -0
- package/src/api/clients/caseRelatedCases/caseRelatedCases.ts +125 -0
- package/src/api/clients/caseServices/services.ts +38 -72
- package/src/api/clients/cases/_internals/ftsService.ts +67 -0
- package/src/api/clients/cases/_internals/stringifyCaseFilters.ts +156 -0
- package/src/api/clients/cases/cases.ts +360 -0
- package/src/api/clients/chatMessagesHistory/chatMessagesHistory.ts +64 -0
- package/src/api/clients/configurations/configurations.ts +56 -39
- package/src/api/clients/contactCases/contactCases.ts +109 -0
- package/src/api/clients/emails/emails.ts +11 -7
- package/src/api/clients/index.ts +9 -0
- package/src/api/clients/labels/labels.ts +24 -29
- package/src/api/clients/phones/phones.ts +11 -7
- package/src/api/clients/timeline/timeline.ts +124 -0
- package/src/api/clients/variables/variables.ts +10 -5
- package/src/api/clients/wtTypes/_shared/utils/assignFieldPositions.ts +28 -0
- package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +7 -9
- package/src/api/clients/wtTypes/adjunctTypeRecords/adjunctTypeRecords.ts +19 -16
- package/src/api/clients/wtTypes/adjunctTypes/adjunctTypes.ts +4 -0
- package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +21 -31
- package/src/api/clients//321/201ontacts/contacts.ts +103 -234
- package/src/api/clients//321/201ontacts/getContactAccessFromMode.ts +9 -0
- package/src/api/clients//321/201ontacts/index.ts +1 -1
- package/src/gen/_models/contactsCallFile.ts +3 -0
- package/src/gen/_models/contactsCallFileType.ts +18 -0
- package/src/gen/_models/index.ts +9 -0
- package/src/gen/_models/webitelCasesCallFile.ts +3 -0
- package/src/gen/_models/webitelCasesCallFileType.ts +18 -0
- package/src/gen-wire/_models/contactsCallFile.ts +3 -0
- package/src/gen-wire/_models/contactsCallFileType.ts +18 -0
- package/src/gen-wire/_models/index.ts +2 -0
- package/src/gen-wire/_models/webitelCasesCallFile.ts +3 -0
- package/src/gen-wire/_models/webitelCasesCallFileType.ts +18 -0
- package/src/gen-wire/access-store/access-store.ts +1 -1
- package/src/gen-wire/agent-absence-service/agent-absence-service.ts +1 -1
- package/src/gen-wire/agent-chat-service/agent-chat-service.ts +1 -1
- package/src/gen-wire/agent-pause-cause-service/agent-pause-cause-service.ts +1 -1
- package/src/gen-wire/agent-service/agent-service.ts +1 -1
- package/src/gen-wire/agent-skill-service/agent-skill-service.ts +1 -1
- package/src/gen-wire/agent-team-service/agent-team-service.ts +1 -1
- package/src/gen-wire/agent-working-conditions-service/agent-working-conditions-service.ts +1 -1
- package/src/gen-wire/agent-working-schedule-service/agent-working-schedule-service.ts +1 -1
- package/src/gen-wire/articles/articles.ts +1 -1
- package/src/gen-wire/attachments/attachments.ts +1 -1
- package/src/gen-wire/audit-form-service/audit-form-service.ts +1 -1
- package/src/gen-wire/auth/auth.ts +1 -1
- package/src/gen-wire/backend-profile-service/backend-profile-service.ts +1 -1
- package/src/gen-wire/bucket-service/bucket-service.ts +1 -1
- package/src/gen-wire/calendar-service/calendar-service.ts +1 -1
- package/src/gen-wire/call-service/call-service.ts +1 -1
- package/src/gen-wire/case-comments/case-comments.ts +1 -1
- package/src/gen-wire/case-communications/case-communications.ts +1 -1
- package/src/gen-wire/case-files/case-files.ts +1 -1
- package/src/gen-wire/case-links/case-links.ts +1 -1
- package/src/gen-wire/case-timeline/case-timeline.ts +1 -1
- package/src/gen-wire/case-timeline/case-timeline.zod.ts +14 -0
- package/src/gen-wire/cases/cases.ts +1 -1
- package/src/gen-wire/cases-chat-catalog/cases-chat-catalog.ts +1 -1
- package/src/gen-wire/catalogs/catalogs.ts +1 -1
- package/src/gen-wire/classes/classes.ts +1 -1
- package/src/gen-wire/close-reason-groups/close-reason-groups.ts +1 -1
- package/src/gen-wire/close-reasons/close-reasons.ts +1 -1
- package/src/gen-wire/cognitive-profile-service/cognitive-profile-service.ts +1 -1
- package/src/gen-wire/comments/comments.ts +1 -1
- package/src/gen-wire/communication-type-service/communication-type-service.ts +1 -1
- package/src/gen-wire/config-service/config-service.ts +1 -1
- package/src/gen-wire/contact-groups/contact-groups.ts +1 -1
- package/src/gen-wire/contact-linking-service/contact-linking-service.ts +1 -1
- package/src/gen-wire/contacts/contacts.ts +1 -1
- package/src/gen-wire/contacts-chat-catalog/contacts-chat-catalog.ts +1 -1
- package/src/gen-wire/customer/customer.ts +1 -1
- package/src/gen-wire/customers/customers.ts +1 -1
- package/src/gen-wire/devices/devices.ts +1 -1
- package/src/gen-wire/dictionaries/dictionaries.ts +1 -1
- package/src/gen-wire/domains/domains.ts +1 -1
- package/src/gen-wire/dynamic-conditions/dynamic-conditions.ts +1 -1
- package/src/gen-wire/dynamic-groups/dynamic-groups.ts +1 -1
- package/src/gen-wire/email-profile-service/email-profile-service.ts +1 -1
- package/src/gen-wire/emails/emails.ts +1 -1
- package/src/gen-wire/embedding-models/embedding-models.ts +1 -1
- package/src/gen-wire/extensions/extensions.ts +1 -1
- package/src/gen-wire/feedback-service/feedback-service.ts +1 -1
- package/src/gen-wire/file-policies-service/file-policies-service.ts +1 -1
- package/src/gen-wire/file-service/file-service.ts +1 -1
- package/src/gen-wire/file-transcript-service/file-transcript-service.ts +1 -1
- package/src/gen-wire/forecast-calculation-service/forecast-calculation-service.ts +1 -1
- package/src/gen-wire/ftsservice/ftsservice.ts +1 -1
- package/src/gen-wire/groups/groups.ts +1 -1
- package/src/gen-wire/im-service-provider-v1-telegrambotservice/im-service-provider-v1-telegrambotservice.ts +1 -1
- package/src/gen-wire/imclients/imclients.ts +1 -1
- package/src/gen-wire/import-template-service/import-template-service.ts +1 -1
- package/src/gen-wire/index.ts +2 -0
- package/src/gen-wire/knowledgebase-search/knowledgebase-search.ts +1 -1
- package/src/gen-wire/labels/labels.ts +1 -1
- package/src/gen-wire/languages/languages.ts +1 -1
- package/src/gen-wire/ldap/ldap.ts +1 -1
- package/src/gen-wire/list-service/list-service.ts +1 -1
- package/src/gen-wire/logger-service/logger-service.ts +1 -1
- package/src/gen-wire/managers/managers.ts +1 -1
- package/src/gen-wire/media-file-service/media-file-service.ts +1 -1
- package/src/gen-wire/meeting-service/meeting-service.ts +1 -1
- package/src/gen-wire/member-service/member-service.ts +1 -1
- package/src/gen-wire/messages/messages.ts +1 -1
- package/src/gen-wire/oauth2-federation/oauth2-federation.ts +1 -1
- package/src/gen-wire/online-skills/online-skills.ts +1 -1
- package/src/gen-wire/outbound-resource-group-service/outbound-resource-group-service.ts +1 -1
- package/src/gen-wire/outbound-resource-service/outbound-resource-service.ts +1 -1
- package/src/gen-wire/pause-template-service/pause-template-service.ts +1 -1
- package/src/gen-wire/pdf-service/pdf-service.ts +1 -1
- package/src/gen-wire/permissions/permissions.ts +1 -1
- package/src/gen-wire/phones/phones.ts +1 -1
- package/src/gen-wire/photos/photos.ts +1 -1
- package/src/gen-wire/presence/presence.ts +1 -1
- package/src/gen-wire/preset-query-service/preset-query-service.ts +1 -1
- package/src/gen-wire/priorities/priorities.ts +1 -1
- package/src/gen-wire/queue-bucket-service/queue-bucket-service.ts +1 -1
- package/src/gen-wire/queue-hook-service/queue-hook-service.ts +1 -1
- package/src/gen-wire/queue-resources-service/queue-resources-service.ts +1 -1
- package/src/gen-wire/queue-service/queue-service.ts +1 -1
- package/src/gen-wire/queue-skill-service/queue-skill-service.ts +1 -1
- package/src/gen-wire/quick-replies-service/quick-replies-service.ts +1 -1
- package/src/gen-wire/records/records.ts +1 -1
- package/src/gen-wire/region-service/region-service.ts +1 -1
- package/src/gen-wire/related-cases/related-cases.ts +1 -1
- package/src/gen-wire/retrieval/retrieval.ts +1 -1
- package/src/gen-wire/routing-chat-plan-service/routing-chat-plan-service.ts +1 -1
- package/src/gen-wire/routing-outbound-call-service/routing-outbound-call-service.ts +1 -1
- package/src/gen-wire/routing-schema-service/routing-schema-service.ts +1 -1
- package/src/gen-wire/routing-variable-service/routing-variable-service.ts +1 -1
- package/src/gen-wire/schema-variables-service/schema-variables-service.ts +1 -1
- package/src/gen-wire/schema-version-service/schema-version-service.ts +1 -1
- package/src/gen-wire/services/services.ts +1 -1
- package/src/gen-wire/shift-template-service/shift-template-service.ts +1 -1
- package/src/gen-wire/skill-service/skill-service.ts +1 -1
- package/src/gen-wire/slaconditions/slaconditions.ts +1 -1
- package/src/gen-wire/slas/slas.ts +1 -1
- package/src/gen-wire/sources/sources.ts +1 -1
- package/src/gen-wire/spaces/spaces.ts +1 -1
- package/src/gen-wire/status-conditions/status-conditions.ts +1 -1
- package/src/gen-wire/statuses/statuses.ts +1 -1
- package/src/gen-wire/system-setting-service/system-setting-service.ts +1 -1
- package/src/gen-wire/tags/tags.ts +1 -1
- package/src/gen-wire/team-hook-service/team-hook-service.ts +1 -1
- package/src/gen-wire/team-trigger-service/team-trigger-service.ts +1 -1
- package/src/gen-wire/timeline/timeline.ts +1 -1
- package/src/gen-wire/timeline/timeline.zod.ts +14 -0
- package/src/gen-wire/timezones/timezones.ts +1 -1
- package/src/gen-wire/trigger-service/trigger-service.ts +1 -1
- package/src/gen-wire/two-factor-authentication/two-factor-authentication.ts +1 -1
- package/src/gen-wire/types/types.ts +1 -1
- package/src/gen-wire/user-access-tokens/user-access-tokens.ts +1 -1
- package/src/gen-wire/user-helper-service/user-helper-service.ts +1 -1
- package/src/gen-wire/users/users.ts +1 -1
- package/src/gen-wire/variables/variables.ts +1 -1
- package/src/gen-wire/versions/versions.ts +1 -1
- package/src/gen-wire/web-hook-service/web-hook-service.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-account/webitel-im-api-gateway-v1-account.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-bots/webitel-im-api-gateway-v1-bots.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-contactsettingsmanagement/webitel-im-api-gateway-v1-contactsettingsmanagement.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.ts +1 -1
- package/src/gen-wire/webitel-im-api-gateway-v1-threadpermission/webitel-im-api-gateway-v1-threadpermission.ts +1 -1
- package/src/gen-wire/webitel-im-api-provider-v1-facebookservice/webitel-im-api-provider-v1-facebookservice.ts +1 -1
- package/src/gen-wire/webitel-im-api-provider-v1-instagramservice/webitel-im-api-provider-v1-instagramservice.ts +1 -1
- package/src/gen-wire/webitel-im-api-provider-v1-metaappservice/webitel-im-api-provider-v1-metaappservice.ts +1 -1
- package/src/gen-wire/webitel-im-api-provider-v1-metaoauthservice/webitel-im-api-provider-v1-metaoauthservice.ts +1 -1
- package/src/gen-wire/webitel-im-api-provider-v1-whatsappservice/webitel-im-api-provider-v1-whatsappservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-facebookservice/webitel-im-provider-v1-facebookservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-gateservice/webitel-im-provider-v1-gateservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-gatetemplateservice/webitel-im-provider-v1-gatetemplateservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-instagramservice/webitel-im-provider-v1-instagramservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-metaappservice/webitel-im-provider-v1-metaappservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-metaoauthservice/webitel-im-provider-v1-metaoauthservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-providermessageservice/webitel-im-provider-v1-providermessageservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-viberservice/webitel-im-provider-v1-viberservice.ts +1 -1
- package/src/gen-wire/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.ts +1 -1
- package/src/gen-wire/working-condition-service/working-condition-service.ts +1 -1
- package/src/gen-wire/working-schedule-service/working-schedule-service.ts +1 -1
- package/src/validations/adjunctType/adjunctType.validations.ts +18 -0
- package/src/validations/case/case.validations.ts +33 -0
- package/src/validations/caseClose/caseClose.validations.ts +30 -0
- package/src/validations/caseExportOptions/caseExportOptions.validations.ts +27 -0
- package/src/validations/contact/contact.validations.ts +12 -7
- package/src/validations/index.ts +5 -0
- package/src/validations/typeExtension/typeExtension.validations.ts +8 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/caseComments/caseComments.d.ts +20 -0
- package/types/api/clients/caseFiles/caseFiles.d.ts +10 -0
- package/types/api/clients/caseLinks/caseLinks.d.ts +22 -0
- package/types/api/clients/caseRelatedCases/caseRelatedCases.d.ts +14 -0
- package/types/api/clients/caseServices/services.d.ts +3 -12
- package/types/api/clients/cases/_internals/ftsService.d.ts +7 -0
- package/types/api/clients/cases/_internals/stringifyCaseFilters.d.ts +2 -0
- package/types/api/clients/cases/cases.d.ts +35 -0
- package/types/api/clients/chatMessagesHistory/chatMessagesHistory.d.ts +15 -0
- package/types/api/clients/contactCases/contactCases.d.ts +9 -0
- package/types/api/clients/index.d.ts +9 -0
- package/types/api/clients/labels/labels.d.ts +2 -2
- package/types/api/clients/timeline/timeline.d.ts +16 -0
- package/types/api/clients/wtTypes/_shared/utils/assignFieldPositions.d.ts +2 -0
- package/types/api/clients/wtTypes/_shared/utils/sortDynamicFields.d.ts +2 -2
- package/types/api/clients/wtTypes/adjunctTypeRecords/adjunctTypeRecords.d.ts +11 -11
- package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +1 -1
- package/types/api/clients//321/201ontacts/getContactAccessFromMode.d.ts +5 -0
- package/types/api/clients//321/201ontacts/index.d.ts +1 -1
- package/types/gen/_models/contactsCallFile.d.ts +3 -0
- package/types/gen/_models/contactsCallFileType.d.ts +15 -0
- package/types/gen/_models/index.d.ts +8 -0
- package/types/gen/_models/webitelCasesCallFile.d.ts +3 -0
- package/types/gen/_models/webitelCasesCallFileType.d.ts +15 -0
- package/types/gen-wire/_models/contactsCallFile.d.ts +3 -0
- package/types/gen-wire/_models/contactsCallFileType.d.ts +15 -0
- package/types/gen-wire/_models/index.d.ts +2 -0
- package/types/gen-wire/_models/webitelCasesCallFile.d.ts +3 -0
- package/types/gen-wire/_models/webitelCasesCallFileType.d.ts +15 -0
- package/types/gen-wire/case-timeline/case-timeline.zod.d.ts +10 -0
- package/types/gen-wire/index.d.ts +2 -2
- package/types/gen-wire/timeline/timeline.zod.d.ts +10 -0
- package/types/validations/adjunctType/adjunctType.validations.d.ts +11 -0
- package/types/validations/case/case.validations.d.ts +31 -0
- package/types/validations/caseClose/caseClose.validations.d.ts +8 -0
- package/types/validations/caseExportOptions/caseExportOptions.validations.d.ts +9 -0
- package/types/validations/contact/contact.validations.d.ts +15 -15
- package/types/validations/index.d.ts +5 -0
- package/types/validations/typeExtension/typeExtension.validations.d.ts +20 -0
- package/src/api/clients//321/201ontacts/types/ContactEntity.types.ts +0 -25
- package/types/api/clients//321/201ontacts/types/ContactEntity.types.d.ts +0 -14
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DataInputDictionary } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { ZodShape } from '../types';
|
|
5
|
+
|
|
6
|
+
export const adjunctTypeSchema = z.object<ZodShape<DataInputDictionary>>({
|
|
7
|
+
name: z.string().min(1),
|
|
8
|
+
repo: z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/),
|
|
12
|
+
about: z.string().optional(),
|
|
13
|
+
administered: z.boolean().optional(),
|
|
14
|
+
primary: z.string().optional(),
|
|
15
|
+
display: z.string().optional(),
|
|
16
|
+
fields: z.array(z.any()).optional(),
|
|
17
|
+
indexes: z.any().optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WebitelCasesCase } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import { lookupSchema } from '../_shared/lookup.validations';
|
|
5
|
+
|
|
6
|
+
const lookupShape = () => lookupSchema.passthrough().default({});
|
|
7
|
+
|
|
8
|
+
const statusConditionShape = () =>
|
|
9
|
+
z
|
|
10
|
+
.object({
|
|
11
|
+
id: z
|
|
12
|
+
.union([
|
|
13
|
+
z.string(),
|
|
14
|
+
z.number(),
|
|
15
|
+
])
|
|
16
|
+
.optional(),
|
|
17
|
+
name: z.string().optional(),
|
|
18
|
+
final: z.boolean().optional(),
|
|
19
|
+
initial: z.boolean().optional(),
|
|
20
|
+
})
|
|
21
|
+
.passthrough()
|
|
22
|
+
.default({});
|
|
23
|
+
|
|
24
|
+
export const caseSchema = z.object({
|
|
25
|
+
subject: z.string().default(''),
|
|
26
|
+
source: lookupShape(),
|
|
27
|
+
priority: lookupShape(),
|
|
28
|
+
reporter: lookupShape(),
|
|
29
|
+
service: lookupShape(),
|
|
30
|
+
statusCondition: statusConditionShape(),
|
|
31
|
+
closeReason: lookupShape(),
|
|
32
|
+
closeResult: z.string().default(''),
|
|
33
|
+
} satisfies Partial<Record<keyof WebitelCasesCase, z.ZodType>>);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const caseCloseSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
reason: z
|
|
6
|
+
.object({
|
|
7
|
+
id: z.union([
|
|
8
|
+
z.string(),
|
|
9
|
+
z.number(),
|
|
10
|
+
]),
|
|
11
|
+
})
|
|
12
|
+
.passthrough()
|
|
13
|
+
.nullable(),
|
|
14
|
+
result: z.string().nullable(),
|
|
15
|
+
})
|
|
16
|
+
.superRefine((data, ctx) => {
|
|
17
|
+
if (!data.reason?.id) {
|
|
18
|
+
ctx.addIssue({
|
|
19
|
+
code: 'custom',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!data.result) {
|
|
24
|
+
ctx.addIssue({
|
|
25
|
+
code: 'custom',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export type CaseClose = z.infer<typeof caseCloseSchema>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const caseExportOptionsSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
type: z
|
|
6
|
+
.object({
|
|
7
|
+
name: z.string(),
|
|
8
|
+
value: z.string(),
|
|
9
|
+
})
|
|
10
|
+
.nullable(),
|
|
11
|
+
separator: z.string().nullable(),
|
|
12
|
+
})
|
|
13
|
+
.superRefine((data, ctx) => {
|
|
14
|
+
if (!data.type) {
|
|
15
|
+
ctx.addIssue({
|
|
16
|
+
code: 'custom',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (data.type?.value === 'csv' && !data.separator) {
|
|
21
|
+
ctx.addIssue({
|
|
22
|
+
code: 'custom',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type CaseExportOptions = z.infer<typeof caseExportOptionsSchema>;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import type { WebitelContactsContact } from '@webitel/api-services/gen/models';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import type { ContactEntity } from '../../api/clients/сontacts/types/ContactEntity.types';
|
|
3
3
|
import type { ZodShape } from '../types';
|
|
4
4
|
|
|
5
|
-
export const contactSchema = z.object<ZodShape<
|
|
6
|
-
name: z
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export const contactSchema = z.object<ZodShape<WebitelContactsContact>>({
|
|
6
|
+
name: z
|
|
7
|
+
.object({
|
|
8
|
+
commonName: z.string().optional(),
|
|
9
|
+
})
|
|
10
|
+
.passthrough()
|
|
11
|
+
.optional(),
|
|
12
|
+
timezones: z.any().optional(),
|
|
13
|
+
managers: z.any().optional(),
|
|
14
|
+
groups: z.any().optional(),
|
|
15
|
+
labels: z.any().optional(),
|
|
11
16
|
about: z.string().nullish(),
|
|
12
17
|
user: z.any().nullish(),
|
|
13
18
|
});
|
package/src/validations/index.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export * from './_shared/duration.validations';
|
|
2
2
|
export * from './_shared/lookup.validations';
|
|
3
3
|
export * from './_shared/variablePair.validations';
|
|
4
|
+
export * from './adjunctType/adjunctType.validations';
|
|
4
5
|
export * from './auditForm/auditForm.validations';
|
|
5
6
|
export * from './bucket/bucket.validations';
|
|
6
7
|
export * from './calendar/calendar.validations';
|
|
8
|
+
export * from './case/case.validations';
|
|
9
|
+
export * from './caseClose/caseClose.validations';
|
|
7
10
|
export * from './caseCloseReason/caseCloseReason.validations';
|
|
8
11
|
export * from './caseCloseReasonGroup/caseCloseReasonGroup.validations';
|
|
12
|
+
export * from './caseExportOptions/caseExportOptions.validations';
|
|
9
13
|
export * from './casePriority/casePriority.validations';
|
|
10
14
|
export * from './caseService/caseService.validations';
|
|
11
15
|
export * from './caseServiceCatalog/caseServiceCatalog.validations';
|
|
@@ -32,5 +36,6 @@ export * from './queueResGroup/queueResGroup.validations';
|
|
|
32
36
|
export * from './queueSkill/queueSkill.validations';
|
|
33
37
|
export * from './sla/sla.validations';
|
|
34
38
|
export * from './slaCondition/slaCondition.validations';
|
|
39
|
+
export * from './typeExtension/typeExtension.validations';
|
|
35
40
|
export * from './types';
|
|
36
41
|
export * from './variable/variable.validations';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProtoDataStruct } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { ZodShape } from '../types';
|
|
5
|
+
|
|
6
|
+
export const typeExtensionSchema = z.object<ZodShape<ProtoDataStruct>>({
|
|
7
|
+
fields: z.array(z.any()).optional(),
|
|
8
|
+
});
|