@webitel/api-services 0.1.71 → 0.1.72
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/emails/emails.ts +50 -49
- package/src/api/clients/imClients/imClients.ts +102 -0
- package/src/api/clients/index.ts +2 -0
- package/src/api/clients/phones/phones.ts +148 -104
- package/src/api/clients/queues/queueLogs.ts +2 -1
- package/src/api/clients/queues/queueMembers.ts +12 -3
- package/src/api/clients/variables/variables.ts +293 -0
- package/src/api/clients//321/201ontacts/index.ts +1 -0
- package/src/api/clients//321/201ontacts/types/ContactEntity.types.ts +25 -0
- package/src/validations/contact/contact.validations.ts +13 -0
- package/src/validations/contactEmail/contactEmail.validations.ts +9 -0
- package/src/validations/contactPhone/contactPhone.validations.ts +9 -0
- package/src/validations/index.ts +4 -0
- package/src/validations/variable/variable.validations.ts +8 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/emails/emails.d.ts +10 -9
- package/types/api/clients/imClients/imClients.d.ts +19 -0
- package/types/api/clients/index.d.ts +2 -0
- package/types/api/clients/phones/phones.d.ts +29 -39
- package/types/api/clients/variables/variables.d.ts +51 -0
- package/types/api/clients//321/201ontacts/index.d.ts +1 -0
- package/types/api/clients//321/201ontacts/types/ContactEntity.types.d.ts +14 -0
- package/types/validations/contact/contact.validations.d.ts +25 -0
- package/types/validations/contactEmail/contactEmail.validations.d.ts +14 -0
- package/types/validations/contactPhone/contactPhone.validations.d.ts +14 -0
- package/types/validations/index.d.ts +4 -0
- package/types/validations/variable/variable.validations.d.ts +12 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ApiId, ApiParams } from '../_shared/types';
|
|
2
2
|
export declare const EmailsAPI: {
|
|
3
|
-
getList: (
|
|
3
|
+
getList: ({ parentId, ...rest }: ApiParams & {
|
|
4
|
+
parentId: ApiId;
|
|
5
|
+
}) => Promise<{
|
|
4
6
|
items: any;
|
|
5
7
|
next: any;
|
|
6
8
|
}>;
|
|
@@ -8,15 +10,14 @@ export declare const EmailsAPI: {
|
|
|
8
10
|
itemId: ApiId;
|
|
9
11
|
parentId: ApiId;
|
|
10
12
|
}) => Promise<any>;
|
|
11
|
-
add: ({
|
|
12
|
-
|
|
13
|
-
emails: ApiParams[];
|
|
14
|
-
params: ApiParams;
|
|
15
|
-
options: ApiParams;
|
|
16
|
-
}) => Promise<any>;
|
|
17
|
-
update: ({ itemInstance, etag: id, parentId, }: {
|
|
13
|
+
add: ({ parentId, itemInstance, }: {
|
|
14
|
+
parentId: ApiId;
|
|
18
15
|
itemInstance: ApiParams;
|
|
19
|
-
|
|
16
|
+
}) => Promise<any>;
|
|
17
|
+
update: ({ itemInstance, parentId, }: {
|
|
18
|
+
itemInstance: ApiParams & {
|
|
19
|
+
etag: string;
|
|
20
|
+
};
|
|
20
21
|
parentId: ApiId;
|
|
21
22
|
}) => Promise<any>;
|
|
22
23
|
patch: ({ parentId, changes, etag, }: {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ApiId, ApiParams } from '../_shared/types';
|
|
2
|
+
export declare const IMClientsAPI: {
|
|
3
|
+
getList: ({ parentId, ...rest }: ApiParams & {
|
|
4
|
+
parentId: ApiId;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
items: any;
|
|
7
|
+
next: any;
|
|
8
|
+
}>;
|
|
9
|
+
delete: ({ id, parentId, }: {
|
|
10
|
+
id: ApiId;
|
|
11
|
+
parentId: ApiId;
|
|
12
|
+
}) => Promise<any>;
|
|
13
|
+
getLookup: (params: ApiParams & {
|
|
14
|
+
parentId: ApiId;
|
|
15
|
+
}) => Promise<{
|
|
16
|
+
items: any;
|
|
17
|
+
next: any;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
@@ -28,6 +28,7 @@ export * from './fileServices/fileServices';
|
|
|
28
28
|
export * from './flows/flow';
|
|
29
29
|
export * from './gateways/gateways';
|
|
30
30
|
export * from './history/transcript/callTranscript';
|
|
31
|
+
export * from './imClients/imClients';
|
|
31
32
|
export * from './labels/labels';
|
|
32
33
|
export * from './lists/blacklists';
|
|
33
34
|
export * from './media/media';
|
|
@@ -53,6 +54,7 @@ export * from './slas/slas';
|
|
|
53
54
|
export * from './teams/teams';
|
|
54
55
|
export * from './userSettings/userSettings';
|
|
55
56
|
export * from './users/users';
|
|
57
|
+
export * from './variables/variables';
|
|
56
58
|
export * from './wtTypes/adjunctTypeRecords/adjunctTypeRecords';
|
|
57
59
|
export * from './wtTypes/adjunctTypes/adjunctTypes';
|
|
58
60
|
export * from './wtTypes/sysTypes/sysTypes';
|
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
import type { DeletePhonesParams } from '@webitel/api-services/gen/models';
|
|
2
2
|
import type { ApiId, ApiParams } from '../_shared/types';
|
|
3
|
-
declare const getPhonesList: ({ contactId, options, ...params }: {
|
|
4
|
-
contactId: ApiId;
|
|
5
|
-
options: ApiParams;
|
|
6
|
-
} & ApiParams) => Promise<{
|
|
7
|
-
items: any;
|
|
8
|
-
next: any;
|
|
9
|
-
}>;
|
|
10
3
|
export declare const PhonesAPI: {
|
|
11
|
-
getList: ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & ApiParams) => Promise<{
|
|
4
|
+
getList: ({ parentId, ...rest }: ApiParams & {
|
|
5
|
+
parentId: ApiId;
|
|
6
|
+
}) => Promise<{
|
|
15
7
|
items: any;
|
|
16
8
|
next: any;
|
|
17
9
|
}>;
|
|
18
|
-
|
|
10
|
+
get: ({ itemId, parentId, }: {
|
|
11
|
+
itemId: ApiId;
|
|
12
|
+
parentId: ApiId;
|
|
13
|
+
}) => Promise<any>;
|
|
14
|
+
add: ({ parentId, itemInstance, }: {
|
|
15
|
+
parentId: ApiId;
|
|
16
|
+
itemInstance: ApiParams;
|
|
17
|
+
}) => Promise<any>;
|
|
18
|
+
update: ({ itemInstance, parentId, }: {
|
|
19
|
+
itemInstance: ApiParams & {
|
|
20
|
+
etag: string;
|
|
21
|
+
};
|
|
22
|
+
parentId: ApiId;
|
|
23
|
+
}) => Promise<any>;
|
|
24
|
+
patch: ({ parentId, changes, etag, }: {
|
|
25
|
+
parentId: ApiId;
|
|
26
|
+
changes: ApiParams;
|
|
27
|
+
etag: string;
|
|
28
|
+
}) => Promise<any>;
|
|
29
|
+
delete: ({ etag, parentId, }: {
|
|
30
|
+
etag: string;
|
|
31
|
+
parentId: ApiId;
|
|
32
|
+
}) => Promise<any>;
|
|
33
|
+
getLookup: (params: ApiParams & {
|
|
34
|
+
parentId: ApiId;
|
|
35
|
+
}) => Promise<{
|
|
19
36
|
items: any;
|
|
20
37
|
next: any;
|
|
21
38
|
}>;
|
|
@@ -36,31 +53,4 @@ export declare const PhonesAPI: {
|
|
|
36
53
|
params: DeletePhonesParams;
|
|
37
54
|
options: ApiParams;
|
|
38
55
|
}) => Promise<any>;
|
|
39
|
-
get: ({ contactId, etag, params, options, }: {
|
|
40
|
-
contactId: ApiId;
|
|
41
|
-
etag: string;
|
|
42
|
-
params: ApiParams;
|
|
43
|
-
options: ApiParams;
|
|
44
|
-
}) => Promise<any>;
|
|
45
|
-
update: ({ contactId, etag, data, params, options, }: {
|
|
46
|
-
contactId: ApiId;
|
|
47
|
-
etag: string;
|
|
48
|
-
data: ApiParams;
|
|
49
|
-
params: ApiParams;
|
|
50
|
-
options: ApiParams;
|
|
51
|
-
}) => Promise<any>;
|
|
52
|
-
patch: ({ contactId, etag, changes, params, options, }: {
|
|
53
|
-
contactId: ApiId;
|
|
54
|
-
etag: string;
|
|
55
|
-
changes: ApiParams;
|
|
56
|
-
params: ApiParams;
|
|
57
|
-
options: ApiParams;
|
|
58
|
-
}) => Promise<any>;
|
|
59
|
-
delete: ({ contactId, etag, params, options, }: {
|
|
60
|
-
contactId: ApiId;
|
|
61
|
-
etag: string;
|
|
62
|
-
params: ApiParams;
|
|
63
|
-
options: ApiParams;
|
|
64
|
-
}) => Promise<any>;
|
|
65
56
|
};
|
|
66
|
-
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ContactsInputVariable, DeleteVariablesParams, MergeVariablesParams, ResetVariablesParams } from '@webitel/api-services/gen/models';
|
|
2
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
3
|
+
export declare const VariablesAPI: {
|
|
4
|
+
getList: ({ parentId, ...rest }: Record<string, unknown> & {
|
|
5
|
+
parentId: string;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
items: any;
|
|
8
|
+
next: any;
|
|
9
|
+
}>;
|
|
10
|
+
get: ({ itemId, parentId, }: {
|
|
11
|
+
itemId: string;
|
|
12
|
+
parentId: string;
|
|
13
|
+
}) => Promise<any>;
|
|
14
|
+
add: ({ parentId, itemInstance, }: {
|
|
15
|
+
parentId: string;
|
|
16
|
+
itemInstance: Record<string, unknown>;
|
|
17
|
+
}) => Promise<any>;
|
|
18
|
+
update: ({ itemInstance, parentId, }: {
|
|
19
|
+
itemInstance: Record<string, unknown> & {
|
|
20
|
+
etag: string;
|
|
21
|
+
};
|
|
22
|
+
parentId: string;
|
|
23
|
+
}) => Promise<any>;
|
|
24
|
+
delete: ({ etag, parentId, }: {
|
|
25
|
+
etag: string;
|
|
26
|
+
parentId: string;
|
|
27
|
+
}) => Promise<any>;
|
|
28
|
+
getLookup: (params: Record<string, unknown> & {
|
|
29
|
+
parentId: string;
|
|
30
|
+
}) => Promise<{
|
|
31
|
+
items: any;
|
|
32
|
+
next: any;
|
|
33
|
+
}>;
|
|
34
|
+
merge: ({ contactId, variables, params, options, }: {
|
|
35
|
+
contactId: string;
|
|
36
|
+
variables: ContactsInputVariable[];
|
|
37
|
+
params?: MergeVariablesParams;
|
|
38
|
+
options?: AxiosRequestConfig;
|
|
39
|
+
}) => Promise<any>;
|
|
40
|
+
reset: ({ contactId, variables, params, options, }: {
|
|
41
|
+
contactId: string;
|
|
42
|
+
variables: ContactsInputVariable[];
|
|
43
|
+
params?: ResetVariablesParams;
|
|
44
|
+
options?: AxiosRequestConfig;
|
|
45
|
+
}) => Promise<any>;
|
|
46
|
+
deleteMany: ({ contactId, params, options, }: {
|
|
47
|
+
contactId: string;
|
|
48
|
+
params: DeleteVariablesParams;
|
|
49
|
+
options?: AxiosRequestConfig;
|
|
50
|
+
}) => Promise<any>;
|
|
51
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ContactsManager, ContactsTimezone, WebitelContactsContact, WebitelContactsLabel, WebitelContactsLookup } from '@webitel/api-services/gen/models';
|
|
2
|
+
/**
|
|
3
|
+
* `ContactsAPI` (../contacts.ts) unwraps the generated `WebitelContactsContact`'s
|
|
4
|
+
* paginated `{data:[...]}` envelopes for these fields into plain arrays (and
|
|
5
|
+
* `name` into a plain string) on read, and wraps them back on write. This type
|
|
6
|
+
* reflects that actual runtime shape.
|
|
7
|
+
*/
|
|
8
|
+
export interface ContactEntity extends Omit<WebitelContactsContact, 'name' | 'timezones' | 'managers' | 'labels' | 'groups'> {
|
|
9
|
+
name?: string;
|
|
10
|
+
timezones?: ContactsTimezone[];
|
|
11
|
+
managers?: ContactsManager[];
|
|
12
|
+
labels?: WebitelContactsLabel[];
|
|
13
|
+
groups?: WebitelContactsLookup[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const contactSchema: z.ZodObject<{
|
|
3
|
+
name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
4
|
+
timezones?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
5
|
+
managers?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
6
|
+
labels?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
7
|
+
groups?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
8
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
9
|
+
mode?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
10
|
+
user?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
11
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
12
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
13
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
14
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
15
|
+
etag?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
16
|
+
ver?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
17
|
+
domain?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
18
|
+
variables?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
19
|
+
comments?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
20
|
+
about?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
21
|
+
emails?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
22
|
+
imclients?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
23
|
+
phones?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
24
|
+
photos?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
25
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const contactEmailSchema: z.ZodObject<{
|
|
3
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
4
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
5
|
+
email?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
6
|
+
etag?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
7
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
8
|
+
primary?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
9
|
+
type?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
10
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
11
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
12
|
+
ver?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
13
|
+
verified?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
14
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const contactPhoneSchema: z.ZodObject<{
|
|
3
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
4
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
5
|
+
etag?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
6
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
7
|
+
number?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
8
|
+
primary?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
9
|
+
type?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
10
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
11
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
12
|
+
ver?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
13
|
+
verified?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
14
|
+
}, z.core.$strip>;
|
|
@@ -12,8 +12,11 @@ export * from './caseServiceCatalog/caseServiceCatalog.validations';
|
|
|
12
12
|
export * from './caseSource/caseSource.validations';
|
|
13
13
|
export * from './caseStatus/caseStatus.validations';
|
|
14
14
|
export * from './caseStatusCondition/caseStatusCondition.validations';
|
|
15
|
+
export * from './contact/contact.validations';
|
|
16
|
+
export * from './contactEmail/contactEmail.validations';
|
|
15
17
|
export * from './contactGroup/contactGroup.validations';
|
|
16
18
|
export * from './contactGroupCondition/contactGroupCondition.validations';
|
|
19
|
+
export * from './contactPhone/contactPhone.validations';
|
|
17
20
|
export * from './OAuth/OAuth.validations';
|
|
18
21
|
export * from './onlineSkill/onlineSkill.validations';
|
|
19
22
|
export * from './queue/queue.rules';
|
|
@@ -30,3 +33,4 @@ export * from './queueSkill/queueSkill.validations';
|
|
|
30
33
|
export * from './sla/sla.validations';
|
|
31
34
|
export * from './slaCondition/slaCondition.validations';
|
|
32
35
|
export * from './types';
|
|
36
|
+
export * from './variable/variable.validations';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const variableSchema: z.ZodObject<{
|
|
3
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
4
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
5
|
+
etag?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
6
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
7
|
+
key?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
8
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
9
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
10
|
+
value?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
11
|
+
ver?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
12
|
+
}, z.core.$strip>;
|