@webitel/api-services 26.8.91 → 26.8.92
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/cases/cases.ts +1 -0
- package/src/gen/_models/contactsIMClient.ts +6 -0
- package/src/gen/_models/contactsInputIMClient.ts +5 -0
- package/src/gen/_models/contactsSearchParams.ts +4 -0
- package/src/gen/_models/delContactLanguagesParams.ts +1 -0
- package/src/gen/_models/deleteContactGroupsParams.ts +1 -0
- package/src/gen/_models/deleteEmailsParams.ts +1 -0
- package/src/gen/_models/deleteLabelsParams.ts +1 -0
- package/src/gen/_models/deleteManagersParams.ts +1 -0
- package/src/gen/_models/deletePhonesParams.ts +1 -0
- package/src/gen/_models/deletePhotosParams.ts +1 -0
- package/src/gen/_models/deleteTimezonesParams.ts +1 -0
- package/src/gen/_models/deleteVariablesParams.ts +1 -0
- package/src/gen/_models/iMClientsLinkIMContactBody.ts +17 -0
- package/src/gen/_models/index.ts +5 -0
- package/src/gen/_models/protobufNullValue.ts +8 -3
- package/src/gen/_models/threadManagementSearchParams.ts +10 -0
- package/src/gen/_models/webitelImApiGatewayV1Contact.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1DeletedMessage.ts +18 -0
- package/src/gen/_models/webitelImApiGatewayV1SetCrmContactResponse.ts +10 -0
- package/src/gen/_models/webitelImApiGatewayV1Thread.ts +8 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.ts +11 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadTags.ts +13 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +12 -1
- package/src/gen-wire/_models/contactsIMClient.ts +6 -0
- package/src/gen-wire/_models/contactsInputIMClient.ts +5 -0
- package/src/gen-wire/_models/contactsSearchParams.ts +4 -0
- package/src/gen-wire/_models/delContactLanguagesParams.ts +1 -0
- package/src/gen-wire/_models/deleteContactGroupsParams.ts +1 -0
- package/src/gen-wire/_models/deleteEmailsParams.ts +1 -0
- package/src/gen-wire/_models/deleteLabelsParams.ts +1 -0
- package/src/gen-wire/_models/deleteManagersParams.ts +1 -0
- package/src/gen-wire/_models/deletePhonesParams.ts +1 -0
- package/src/gen-wire/_models/deletePhotosParams.ts +1 -0
- package/src/gen-wire/_models/deleteTimezonesParams.ts +1 -0
- package/src/gen-wire/_models/deleteVariablesParams.ts +1 -0
- package/src/gen-wire/_models/iMClientsLinkIMContactBody.ts +17 -0
- package/src/gen-wire/_models/index.ts +5 -0
- package/src/gen-wire/_models/protobufNullValue.ts +8 -3
- package/src/gen-wire/_models/threadManagementSearchParams.ts +10 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1Contact.ts +2 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1DeletedMessage.ts +18 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1SetCrmContactResponse.ts +10 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1Thread.ts +8 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.ts +11 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadTags.ts +13 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +12 -1
- package/src/gen-wire/contact-groups/contact-groups.zod.ts +4 -1
- package/src/gen-wire/contacts/contacts.zod.ts +60 -0
- package/src/gen-wire/emails/emails.zod.ts +1 -0
- package/src/gen-wire/groups/groups.zod.ts +12 -0
- package/src/gen-wire/imclients/imclients.ts +20 -0
- package/src/gen-wire/imclients/imclients.zod.ts +146 -0
- package/src/gen-wire/index.ts +6 -0
- package/src/gen-wire/labels/labels.zod.ts +1 -0
- package/src/gen-wire/languages/languages.zod.ts +1 -0
- package/src/gen-wire/managers/managers.zod.ts +4 -1
- package/src/gen-wire/phones/phones.zod.ts +4 -1
- package/src/gen-wire/photos/photos.zod.ts +4 -1
- package/src/gen-wire/presence/presence.zod.ts +2 -2
- package/src/gen-wire/timezones/timezones.zod.ts +4 -1
- package/src/gen-wire/variables/variables.zod.ts +1 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.ts +2 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +64 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.ts +20 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +253 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.ts +3 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.ts +49 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.zod.ts +34 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +236 -2
- package/types/.tsbuildinfo +1 -1
- package/types/gen/_models/contactsIMClient.d.ts +6 -0
- package/types/gen/_models/contactsInputIMClient.d.ts +5 -0
- package/types/gen/_models/contactsSearchParams.d.ts +4 -0
- package/types/gen/_models/delContactLanguagesParams.d.ts +1 -0
- package/types/gen/_models/deleteContactGroupsParams.d.ts +1 -0
- package/types/gen/_models/deleteEmailsParams.d.ts +1 -0
- package/types/gen/_models/deleteLabelsParams.d.ts +1 -0
- package/types/gen/_models/deleteManagersParams.d.ts +1 -0
- package/types/gen/_models/deletePhonesParams.d.ts +1 -0
- package/types/gen/_models/deletePhotosParams.d.ts +1 -0
- package/types/gen/_models/deleteTimezonesParams.d.ts +1 -0
- package/types/gen/_models/deleteVariablesParams.d.ts +1 -0
- package/types/gen/_models/iMClientsLinkIMContactBody.d.ts +16 -0
- package/types/gen/_models/index.d.ts +5 -0
- package/types/gen/_models/protobufNullValue.d.ts +8 -3
- package/types/gen/_models/threadManagementSearchParams.d.ts +10 -0
- package/types/gen/_models/webitelImApiGatewayV1Contact.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1DeletedMessage.d.ts +17 -0
- package/types/gen/_models/webitelImApiGatewayV1SetCrmContactResponse.d.ts +9 -0
- package/types/gen/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.d.ts +10 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadTags.d.ts +12 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +12 -1
- package/types/gen-wire/_models/contactsIMClient.d.ts +6 -0
- package/types/gen-wire/_models/contactsInputIMClient.d.ts +5 -0
- package/types/gen-wire/_models/contactsSearchParams.d.ts +4 -0
- package/types/gen-wire/_models/delContactLanguagesParams.d.ts +1 -0
- package/types/gen-wire/_models/deleteContactGroupsParams.d.ts +1 -0
- package/types/gen-wire/_models/deleteEmailsParams.d.ts +1 -0
- package/types/gen-wire/_models/deleteLabelsParams.d.ts +1 -0
- package/types/gen-wire/_models/deleteManagersParams.d.ts +1 -0
- package/types/gen-wire/_models/deletePhonesParams.d.ts +1 -0
- package/types/gen-wire/_models/deletePhotosParams.d.ts +1 -0
- package/types/gen-wire/_models/deleteTimezonesParams.d.ts +1 -0
- package/types/gen-wire/_models/deleteVariablesParams.d.ts +1 -0
- package/types/gen-wire/_models/iMClientsLinkIMContactBody.d.ts +16 -0
- package/types/gen-wire/_models/index.d.ts +5 -0
- package/types/gen-wire/_models/protobufNullValue.d.ts +8 -3
- package/types/gen-wire/_models/threadManagementSearchParams.d.ts +10 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1Contact.d.ts +2 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1DeletedMessage.d.ts +17 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1SetCrmContactResponse.d.ts +9 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.d.ts +10 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadTags.d.ts +12 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +12 -1
- package/types/gen-wire/contacts/contacts.zod.d.ts +11 -0
- package/types/gen-wire/groups/groups.zod.d.ts +2 -0
- package/types/gen-wire/imclients/imclients.d.ts +3 -1
- package/types/gen-wire/imclients/imclients.zod.d.ts +46 -0
- package/types/gen-wire/index.d.ts +2 -2
- package/types/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.d.ts +2 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +16 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.d.ts +3 -1
- package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +81 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.d.ts +3 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.d.ts +6 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.zod.d.ts +28 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +76 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ThreadTags is the caller's own tags on a thread.
|
|
10
|
+
*/
|
|
11
|
+
export interface WebitelImApiGatewayV1ThreadTags {
|
|
12
|
+
items?: string[];
|
|
13
|
+
}
|
|
@@ -4,15 +4,26 @@
|
|
|
4
4
|
* Webitel API
|
|
5
5
|
* OpenAPI spec version: 24.04.0
|
|
6
6
|
*/
|
|
7
|
+
import type { WebitelImApiGatewayV1DeletedMessage } from './webitelImApiGatewayV1DeletedMessage';
|
|
7
8
|
import type { WebitelImApiGatewayV1MemberReadState } from './webitelImApiGatewayV1MemberReadState';
|
|
8
9
|
import type { WebitelImApiGatewayV1Thread } from './webitelImApiGatewayV1Thread';
|
|
9
10
|
import type { WebitelImApiGatewayV1ThreadMemberChange } from './webitelImApiGatewayV1ThreadMemberChange';
|
|
11
|
+
import type { WebitelImApiGatewayV1ThreadTags } from './webitelImApiGatewayV1ThreadTags';
|
|
10
12
|
import type { WebitelImApiGatewayV1UpdatedMessage } from './webitelImApiGatewayV1UpdatedMessage';
|
|
11
13
|
|
|
12
14
|
export interface WebitelImApiGatewayV1ThreadUpdates {
|
|
15
|
+
/**
|
|
16
|
+
* The caller's current tags on the thread, set only when they changed since cursor; replace the
|
|
17
|
+
* cached ones. Absent means unchanged, empty items means every tag was removed.
|
|
18
|
+
*/
|
|
19
|
+
tags?: WebitelImApiGatewayV1ThreadTags;
|
|
20
|
+
/** Ids of deleted_messages, kept for older clients; prefer deleted_messages. */
|
|
13
21
|
deleted_message_ids?: string[];
|
|
22
|
+
/** Messages deleted since cursor, with when and who deleted them; drop them by id. */
|
|
23
|
+
deleted_messages?: WebitelImApiGatewayV1DeletedMessage[];
|
|
14
24
|
/**
|
|
15
|
-
* The thread itself, set when it is new to the caller (created or joined since cursor)
|
|
25
|
+
* The thread itself, set when it is new to the caller (created or joined since cursor)
|
|
26
|
+
* or when its attributes changed since cursor (e.g. crm_contact_id); replace the cached thread.
|
|
16
27
|
* Same model as the thread list, except last_msg and updates_cursor are never set here.
|
|
17
28
|
*/
|
|
18
29
|
dialog?: WebitelImApiGatewayV1Thread;
|
|
@@ -18,7 +18,10 @@ export const DeleteContactGroupsQueryParams = zod.object({
|
|
|
18
18
|
.array(zod.string())
|
|
19
19
|
.optional()
|
|
20
20
|
.describe('Fields to be retrieved as a result.'),
|
|
21
|
-
etag: zod
|
|
21
|
+
etag: zod
|
|
22
|
+
.array(zod.string())
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('Set of unique ID(s) to remove.'),
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export const DeleteContactGroupsResponse = zod
|
|
@@ -569,6 +569,12 @@ export const SearchContactsResponse = zod
|
|
|
569
569
|
.describe(
|
|
570
570
|
'The unique ID of the association. Never changes.',
|
|
571
571
|
),
|
|
572
|
+
im_contact_id: zod
|
|
573
|
+
.string()
|
|
574
|
+
.optional()
|
|
575
|
+
.describe(
|
|
576
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
577
|
+
),
|
|
572
578
|
protocol: zod
|
|
573
579
|
.string()
|
|
574
580
|
.optional()
|
|
@@ -1477,6 +1483,12 @@ export const CreateContactBody = zod
|
|
|
1477
1483
|
.string()
|
|
1478
1484
|
.optional()
|
|
1479
1485
|
.describe('App (Text-Gateway) used to connect the IM client.'),
|
|
1486
|
+
im_contact_id: zod
|
|
1487
|
+
.string()
|
|
1488
|
+
.optional()
|
|
1489
|
+
.describe(
|
|
1490
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
|
|
1491
|
+
),
|
|
1480
1492
|
protocol: zod.string().optional(),
|
|
1481
1493
|
via: zod
|
|
1482
1494
|
.string()
|
|
@@ -2087,6 +2099,12 @@ export const CreateContactResponse = zod
|
|
|
2087
2099
|
.string()
|
|
2088
2100
|
.optional()
|
|
2089
2101
|
.describe('The unique ID of the association. Never changes.'),
|
|
2102
|
+
im_contact_id: zod
|
|
2103
|
+
.string()
|
|
2104
|
+
.optional()
|
|
2105
|
+
.describe(
|
|
2106
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
2107
|
+
),
|
|
2090
2108
|
protocol: zod
|
|
2091
2109
|
.string()
|
|
2092
2110
|
.optional()
|
|
@@ -2943,6 +2961,12 @@ export const CreateContactsBodyItem = zod
|
|
|
2943
2961
|
.string()
|
|
2944
2962
|
.optional()
|
|
2945
2963
|
.describe('App (Text-Gateway) used to connect the IM client.'),
|
|
2964
|
+
im_contact_id: zod
|
|
2965
|
+
.string()
|
|
2966
|
+
.optional()
|
|
2967
|
+
.describe(
|
|
2968
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
|
|
2969
|
+
),
|
|
2946
2970
|
protocol: zod.string().optional(),
|
|
2947
2971
|
via: zod
|
|
2948
2972
|
.string()
|
|
@@ -3584,6 +3608,12 @@ export const CreateContactsResponse = zod
|
|
|
3584
3608
|
.describe(
|
|
3585
3609
|
'The unique ID of the association. Never changes.',
|
|
3586
3610
|
),
|
|
3611
|
+
im_contact_id: zod
|
|
3612
|
+
.string()
|
|
3613
|
+
.optional()
|
|
3614
|
+
.describe(
|
|
3615
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
3616
|
+
),
|
|
3587
3617
|
protocol: zod
|
|
3588
3618
|
.string()
|
|
3589
3619
|
.optional()
|
|
@@ -4500,6 +4530,12 @@ export const CreateContactsResponse = zod
|
|
|
4500
4530
|
.describe(
|
|
4501
4531
|
'App (Text-Gateway) used to connect the IM client.',
|
|
4502
4532
|
),
|
|
4533
|
+
im_contact_id: zod
|
|
4534
|
+
.string()
|
|
4535
|
+
.optional()
|
|
4536
|
+
.describe(
|
|
4537
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
|
|
4538
|
+
),
|
|
4503
4539
|
protocol: zod.string().optional(),
|
|
4504
4540
|
via: zod
|
|
4505
4541
|
.string()
|
|
@@ -5170,6 +5206,12 @@ export const DeleteContactResponse = zod
|
|
|
5170
5206
|
.string()
|
|
5171
5207
|
.optional()
|
|
5172
5208
|
.describe('The unique ID of the association. Never changes.'),
|
|
5209
|
+
im_contact_id: zod
|
|
5210
|
+
.string()
|
|
5211
|
+
.optional()
|
|
5212
|
+
.describe(
|
|
5213
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
5214
|
+
),
|
|
5173
5215
|
protocol: zod
|
|
5174
5216
|
.string()
|
|
5175
5217
|
.optional()
|
|
@@ -6318,6 +6360,12 @@ export const LocateContactResponse = zod
|
|
|
6318
6360
|
.string()
|
|
6319
6361
|
.optional()
|
|
6320
6362
|
.describe('The unique ID of the association. Never changes.'),
|
|
6363
|
+
im_contact_id: zod
|
|
6364
|
+
.string()
|
|
6365
|
+
.optional()
|
|
6366
|
+
.describe(
|
|
6367
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
6368
|
+
),
|
|
6321
6369
|
protocol: zod
|
|
6322
6370
|
.string()
|
|
6323
6371
|
.optional()
|
|
@@ -7167,6 +7215,12 @@ export const UpdateContactBody = zod.object({
|
|
|
7167
7215
|
.string()
|
|
7168
7216
|
.optional()
|
|
7169
7217
|
.describe('App (Text-Gateway) used to connect the IM client.'),
|
|
7218
|
+
im_contact_id: zod
|
|
7219
|
+
.string()
|
|
7220
|
+
.optional()
|
|
7221
|
+
.describe(
|
|
7222
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
|
|
7223
|
+
),
|
|
7170
7224
|
protocol: zod.string().optional(),
|
|
7171
7225
|
via: zod
|
|
7172
7226
|
.string()
|
|
@@ -7771,6 +7825,12 @@ export const UpdateContactResponse = zod
|
|
|
7771
7825
|
.string()
|
|
7772
7826
|
.optional()
|
|
7773
7827
|
.describe('The unique ID of the association. Never changes.'),
|
|
7828
|
+
im_contact_id: zod
|
|
7829
|
+
.string()
|
|
7830
|
+
.optional()
|
|
7831
|
+
.describe(
|
|
7832
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
7833
|
+
),
|
|
7774
7834
|
protocol: zod
|
|
7775
7835
|
.string()
|
|
7776
7836
|
.optional()
|
|
@@ -791,6 +791,12 @@ export const AddContactsToGroupsResponse = zod
|
|
|
791
791
|
.describe(
|
|
792
792
|
'The unique ID of the association. Never changes.',
|
|
793
793
|
),
|
|
794
|
+
im_contact_id: zod
|
|
795
|
+
.string()
|
|
796
|
+
.optional()
|
|
797
|
+
.describe(
|
|
798
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
799
|
+
),
|
|
794
800
|
protocol: zod
|
|
795
801
|
.string()
|
|
796
802
|
.optional()
|
|
@@ -2002,6 +2008,12 @@ export const RemoveContactsFromGroupResponse = zod
|
|
|
2002
2008
|
.describe(
|
|
2003
2009
|
'The unique ID of the association. Never changes.',
|
|
2004
2010
|
),
|
|
2011
|
+
im_contact_id: zod
|
|
2012
|
+
.string()
|
|
2013
|
+
.optional()
|
|
2014
|
+
.describe(
|
|
2015
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
2016
|
+
),
|
|
2005
2017
|
protocol: zod
|
|
2006
2018
|
.string()
|
|
2007
2019
|
.optional()
|
|
@@ -10,7 +10,9 @@ import axios from '../../api/axios/genClient';
|
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
12
|
ContactsEmptyResponse,
|
|
13
|
+
ContactsIMClient,
|
|
13
14
|
ContactsIMClientList,
|
|
15
|
+
IMClientsLinkIMContactBody,
|
|
14
16
|
ListIMClientsParams,
|
|
15
17
|
} from '../_models';
|
|
16
18
|
|
|
@@ -38,6 +40,22 @@ export const // --- title start
|
|
|
38
40
|
},
|
|
39
41
|
});
|
|
40
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* @summary Link an IM-stack contact (im-contact-service UUID) with the Contact.
|
|
45
|
+
If the IM contact is already linked to another Contact
|
|
46
|
+
within the domain, the link is reassigned to this Contact.
|
|
47
|
+
*/
|
|
48
|
+
const linkIMContact = (
|
|
49
|
+
contactId: string,
|
|
50
|
+
iMClientsLinkIMContactBody: IMClientsLinkIMContactBody,
|
|
51
|
+
options?: AxiosRequestConfig,
|
|
52
|
+
): Promise<AxiosResponse<ContactsIMClient>> => {
|
|
53
|
+
return axiosInstance.post(
|
|
54
|
+
`/contacts/${contactId}/imclients`,
|
|
55
|
+
iMClientsLinkIMContactBody,
|
|
56
|
+
options,
|
|
57
|
+
);
|
|
58
|
+
};
|
|
41
59
|
const deleteIMClient = (
|
|
42
60
|
contactId: string,
|
|
43
61
|
id: string,
|
|
@@ -52,10 +70,12 @@ export const // --- title start
|
|
|
52
70
|
// --- footer start
|
|
53
71
|
return {
|
|
54
72
|
listIMClients,
|
|
73
|
+
linkIMContact,
|
|
55
74
|
deleteIMClient,
|
|
56
75
|
};
|
|
57
76
|
};
|
|
58
77
|
export type ListIMClientsResult = AxiosResponse<ContactsIMClientList>;
|
|
78
|
+
export type LinkIMContactResult = AxiosResponse<ContactsIMClient>;
|
|
59
79
|
export type DeleteIMClientResult = AxiosResponse<ContactsEmptyResponse>;
|
|
60
80
|
|
|
61
81
|
// --- footer end
|
|
@@ -98,6 +98,12 @@ export const ListIMClientsResponse = zod.object({
|
|
|
98
98
|
.string()
|
|
99
99
|
.optional()
|
|
100
100
|
.describe('The unique ID of the association. Never changes.'),
|
|
101
|
+
im_contact_id: zod
|
|
102
|
+
.string()
|
|
103
|
+
.optional()
|
|
104
|
+
.describe(
|
|
105
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
106
|
+
),
|
|
101
107
|
protocol: zod
|
|
102
108
|
.string()
|
|
103
109
|
.optional()
|
|
@@ -163,6 +169,146 @@ export const ListIMClientsResponse = zod.object({
|
|
|
163
169
|
page: zod.int().optional().describe('The page number of the partial result.'),
|
|
164
170
|
});
|
|
165
171
|
|
|
172
|
+
/**
|
|
173
|
+
* @summary Link an IM-stack contact (im-contact-service UUID) with the Contact.
|
|
174
|
+
If the IM contact is already linked to another Contact
|
|
175
|
+
within the domain, the link is reassigned to this Contact.
|
|
176
|
+
*/
|
|
177
|
+
export const LinkIMContactParams = zod.object({
|
|
178
|
+
contact_id: zod.string().describe('Link contact ID (or etag).'),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export const LinkIMContactBody = zod.object({
|
|
182
|
+
gateway_id: zod
|
|
183
|
+
.string()
|
|
184
|
+
.optional()
|
|
185
|
+
.describe('App (gateway) the IM contact is connected through. Optional.'),
|
|
186
|
+
im_contact_id: zod
|
|
187
|
+
.string()
|
|
188
|
+
.optional()
|
|
189
|
+
.describe(
|
|
190
|
+
'IM-stack contact ID (UUID) from the im-contact-service. Required.',
|
|
191
|
+
),
|
|
192
|
+
protocol: zod
|
|
193
|
+
.string()
|
|
194
|
+
.optional()
|
|
195
|
+
.describe(
|
|
196
|
+
'Protocol (provider type) of the IM conversation, e.g. "telegram". Required.',
|
|
197
|
+
),
|
|
198
|
+
via: zod
|
|
199
|
+
.string()
|
|
200
|
+
.optional()
|
|
201
|
+
.describe(
|
|
202
|
+
'[Via] App(-specific) peer(-id) to connect[from] the IM contact. Optional.',
|
|
203
|
+
),
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export const LinkIMContactResponse = zod
|
|
207
|
+
.object({
|
|
208
|
+
app: zod
|
|
209
|
+
.object({
|
|
210
|
+
id: zod.string().optional().describe('Reference Object unique ID.'),
|
|
211
|
+
name: zod
|
|
212
|
+
.string()
|
|
213
|
+
.optional()
|
|
214
|
+
.describe('Reference Object display name.'),
|
|
215
|
+
type: zod
|
|
216
|
+
.string()
|
|
217
|
+
.optional()
|
|
218
|
+
.describe('Reference Object well-known type.'),
|
|
219
|
+
})
|
|
220
|
+
.optional()
|
|
221
|
+
.describe(
|
|
222
|
+
'App (Text-Gateway) used to connect the IM client.\nId will be internal id of gateway.\nName will be name of the gateway.',
|
|
223
|
+
),
|
|
224
|
+
created_at: zod
|
|
225
|
+
.string()
|
|
226
|
+
.optional()
|
|
227
|
+
.describe('The user who created this Field.'),
|
|
228
|
+
created_by: zod
|
|
229
|
+
.object({
|
|
230
|
+
id: zod.string().optional().describe('Reference Object unique ID.'),
|
|
231
|
+
name: zod
|
|
232
|
+
.string()
|
|
233
|
+
.optional()
|
|
234
|
+
.describe('Reference Object display name.'),
|
|
235
|
+
type: zod
|
|
236
|
+
.string()
|
|
237
|
+
.optional()
|
|
238
|
+
.describe('Reference Object well-known type.'),
|
|
239
|
+
})
|
|
240
|
+
.optional()
|
|
241
|
+
.describe('Timestamp(milli) of the Field creation.'),
|
|
242
|
+
etag: zod
|
|
243
|
+
.string()
|
|
244
|
+
.optional()
|
|
245
|
+
.describe(
|
|
246
|
+
'Unique ID of the latest version of the update.\nThis ID changes after any update to the underlying value(s).',
|
|
247
|
+
),
|
|
248
|
+
external_id: zod.string().optional().describe('External user id.'),
|
|
249
|
+
id: zod
|
|
250
|
+
.string()
|
|
251
|
+
.optional()
|
|
252
|
+
.describe('The unique ID of the association. Never changes.'),
|
|
253
|
+
im_contact_id: zod
|
|
254
|
+
.string()
|
|
255
|
+
.optional()
|
|
256
|
+
.describe(
|
|
257
|
+
'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
|
|
258
|
+
),
|
|
259
|
+
protocol: zod
|
|
260
|
+
.string()
|
|
261
|
+
.optional()
|
|
262
|
+
.describe('Protocol used to connect the IM client.'),
|
|
263
|
+
updated_at: zod
|
|
264
|
+
.string()
|
|
265
|
+
.optional()
|
|
266
|
+
.describe(
|
|
267
|
+
'Timestamp(milli) of the last Field update.\nTake part in Etag generation.',
|
|
268
|
+
),
|
|
269
|
+
updated_by: zod
|
|
270
|
+
.object({
|
|
271
|
+
id: zod.string().optional().describe('Reference Object unique ID.'),
|
|
272
|
+
name: zod
|
|
273
|
+
.string()
|
|
274
|
+
.optional()
|
|
275
|
+
.describe('Reference Object display name.'),
|
|
276
|
+
type: zod
|
|
277
|
+
.string()
|
|
278
|
+
.optional()
|
|
279
|
+
.describe('Reference Object well-known type.'),
|
|
280
|
+
})
|
|
281
|
+
.optional()
|
|
282
|
+
.describe('The user who performed last Update.'),
|
|
283
|
+
user: zod
|
|
284
|
+
.object({
|
|
285
|
+
id: zod.string().optional().describe('Reference Object unique ID.'),
|
|
286
|
+
name: zod
|
|
287
|
+
.string()
|
|
288
|
+
.optional()
|
|
289
|
+
.describe('Reference Object display name.'),
|
|
290
|
+
type: zod
|
|
291
|
+
.string()
|
|
292
|
+
.optional()
|
|
293
|
+
.describe('Reference Object well-known type.'),
|
|
294
|
+
})
|
|
295
|
+
.optional()
|
|
296
|
+
.describe(
|
|
297
|
+
'External user which contacted to us.\nId will be from external service.\nName will be from external service.',
|
|
298
|
+
),
|
|
299
|
+
ver: zod
|
|
300
|
+
.int()
|
|
301
|
+
.optional()
|
|
302
|
+
.describe('Version of the latest update. Numeric sequence.'),
|
|
303
|
+
via: zod
|
|
304
|
+
.string()
|
|
305
|
+
.optional()
|
|
306
|
+
.describe(
|
|
307
|
+
'[Via] App(-specific) peer(-id) to connect[from] the IM client.',
|
|
308
|
+
),
|
|
309
|
+
})
|
|
310
|
+
.describe("A contact's [I]nstant[M]essaging client.");
|
|
311
|
+
|
|
166
312
|
export const DeleteIMClientParams = zod.object({
|
|
167
313
|
contact_id: zod.string(),
|
|
168
314
|
id: zod.string(),
|
package/src/gen-wire/index.ts
CHANGED
|
@@ -1252,6 +1252,9 @@ export * from './imclients/imclients';
|
|
|
1252
1252
|
export {
|
|
1253
1253
|
DeleteIMClientParams,
|
|
1254
1254
|
DeleteIMClientResponse,
|
|
1255
|
+
LinkIMContactBody,
|
|
1256
|
+
LinkIMContactParams,
|
|
1257
|
+
LinkIMContactResponse,
|
|
1255
1258
|
ListIMClientsParams,
|
|
1256
1259
|
ListIMClientsQueryParams,
|
|
1257
1260
|
ListIMClientsResponse,
|
|
@@ -2742,6 +2745,9 @@ export {
|
|
|
2742
2745
|
ThreadManagementSearchResponse,
|
|
2743
2746
|
ThreadManagementSearchVariablesQueryParams,
|
|
2744
2747
|
ThreadManagementSearchVariablesResponse,
|
|
2748
|
+
ThreadManagementSetCrmContactBody,
|
|
2749
|
+
ThreadManagementSetCrmContactParams,
|
|
2750
|
+
ThreadManagementSetCrmContactResponse,
|
|
2745
2751
|
ThreadManagementSetVariablesBody,
|
|
2746
2752
|
ThreadManagementSetVariablesParams,
|
|
2747
2753
|
ThreadManagementSetVariablesResponse,
|
|
@@ -18,7 +18,10 @@ export const DeleteManagersQueryParams = zod.object({
|
|
|
18
18
|
.array(zod.string())
|
|
19
19
|
.optional()
|
|
20
20
|
.describe('Fields to be retrieved as a result.'),
|
|
21
|
-
etag: zod
|
|
21
|
+
etag: zod
|
|
22
|
+
.array(zod.string())
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('Set of unique ID(s) to remove.'),
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export const DeleteManagersResponseItem = zod
|
|
@@ -18,7 +18,10 @@ export const DeletePhonesQueryParams = zod.object({
|
|
|
18
18
|
.array(zod.string())
|
|
19
19
|
.optional()
|
|
20
20
|
.describe('Fields to be retrieved into result.'),
|
|
21
|
-
etag: zod
|
|
21
|
+
etag: zod
|
|
22
|
+
.array(zod.string())
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('Set of linked ID(s) to be removed.'),
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export const DeletePhonesResponse = zod
|
|
@@ -18,7 +18,10 @@ export const DeletePhotosQueryParams = zod.object({
|
|
|
18
18
|
.array(zod.string())
|
|
19
19
|
.optional()
|
|
20
20
|
.describe('Fields to be retrieved into result of changes.'),
|
|
21
|
-
etag: zod
|
|
21
|
+
etag: zod
|
|
22
|
+
.array(zod.string())
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('Set of linked ID(s) to be removed.'),
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export const DeletePhotosResponse = zod
|
|
@@ -37,7 +37,7 @@ export const SetStatus2Response = zod.object({
|
|
|
37
37
|
.array(zod.unknown())
|
|
38
38
|
.optional()
|
|
39
39
|
.describe(
|
|
40
|
-
'// FIXME: well-known types ?\
|
|
40
|
+
'// FIXME: well-known types ?\n repeated Dialog call = 9;\n repeated Sipreg sip = 9;\n repeated Websock wss = 9;',
|
|
41
41
|
),
|
|
42
42
|
priority: zod.int().optional(),
|
|
43
43
|
sequence: zod.string().optional(),
|
|
@@ -79,7 +79,7 @@ export const SetStatusResponse = zod.object({
|
|
|
79
79
|
.array(zod.unknown())
|
|
80
80
|
.optional()
|
|
81
81
|
.describe(
|
|
82
|
-
'// FIXME: well-known types ?\
|
|
82
|
+
'// FIXME: well-known types ?\n repeated Dialog call = 9;\n repeated Sipreg sip = 9;\n repeated Websock wss = 9;',
|
|
83
83
|
),
|
|
84
84
|
priority: zod.int().optional(),
|
|
85
85
|
sequence: zod.string().optional(),
|
|
@@ -18,7 +18,10 @@ export const DeleteTimezonesQueryParams = zod.object({
|
|
|
18
18
|
.array(zod.string())
|
|
19
19
|
.optional()
|
|
20
20
|
.describe('Fields to be retrieved as a result.'),
|
|
21
|
-
etag: zod
|
|
21
|
+
etag: zod
|
|
22
|
+
.array(zod.string())
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('Set of unique ID(s) to remove.'),
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export const DeleteTimezonesResponse = zod
|
package/src/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.ts
CHANGED
|
@@ -38,6 +38,7 @@ export const ContactsSearchQueryParams = zod.object({
|
|
|
38
38
|
.optional()
|
|
39
39
|
.describe('Filter by internal system subjects/user IDs.'),
|
|
40
40
|
only_bots: zod.boolean().optional(),
|
|
41
|
+
ids: zod.array(zod.string()).optional().describe('Filter by contact IDs.'),
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
export const ContactsSearchResponse = zod
|
|
@@ -56,6 +57,7 @@ export const ContactsSearchResponse = zod
|
|
|
56
57
|
.describe(
|
|
57
58
|
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
58
59
|
),
|
|
60
|
+
id: zod.string().optional().describe('Unique contact identifier.'),
|
|
59
61
|
is_bot: zod
|
|
60
62
|
.boolean()
|
|
61
63
|
.optional()
|