@webitel/api-services 0.1.41 → 0.1.43
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 -2
- package/src/gen/_models/apiGeneratePasswordRequest.ts +12 -0
- package/src/gen/_models/apiGeneratePasswordRequest.zod.ts +12 -0
- package/src/gen/_models/{updateUser2BodyProfile.ts → apiGeneratePasswordResponse.ts} +3 -3
- package/src/gen/_models/{updateUser2BodyProfile.zod.ts → apiGeneratePasswordResponse.zod.ts} +3 -3
- package/src/gen/_models/{updateUserBody.ts → apiInputUser.ts} +9 -15
- package/src/gen/_models/{updateUserBody.zod.ts → apiInputUser.zod.ts} +9 -15
- package/src/gen/_models/apiInputUserBody.ts +12 -0
- package/src/gen/_models/apiInputUserBody.zod.ts +12 -0
- package/src/gen/_models/apiInputUserDevice.ts +13 -0
- package/src/gen/_models/apiInputUserDevice.zod.ts +13 -0
- package/src/gen/_models/{updateUserBodyProfile.ts → apiInputUserProfile.ts} +1 -1
- package/src/gen/_models/{updateUserBodyProfile.zod.ts → apiInputUserProfile.zod.ts} +1 -1
- package/src/gen/_models/apiUser.ts +7 -7
- package/src/gen/_models/apiUser.zod.ts +7 -7
- package/src/gen/_models/apiUserinfo.ts +1 -0
- package/src/gen/_models/apiUserinfo.zod.ts +1 -0
- package/src/gen/_models/contactsCreateContactError.ts +20 -0
- package/src/gen/_models/contactsCreateContactError.zod.ts +20 -0
- package/src/gen/_models/contactsCreateContactsBulkResponse.ts +20 -0
- package/src/gen/_models/contactsCreateContactsBulkResponse.zod.ts +20 -0
- package/src/gen/_models/createContactsParams.ts +13 -0
- package/src/gen/_models/createContactsParams.zod.ts +13 -0
- package/src/gen/_models/createUserParams.ts +31 -0
- package/src/gen/_models/createUserParams.zod.ts +31 -0
- package/src/gen/_models/engineSystemSettingName.ts +2 -0
- package/src/gen/_models/engineSystemSettingName.zod.ts +2 -0
- package/src/gen/_models/index.ts +15 -9
- package/src/gen/_models/index.zod.ts +15 -9
- package/src/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.ts +49 -0
- package/src/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.zod.ts +49 -0
- package/src/gen/_models/searchSystemSettingNameItem.ts +2 -0
- package/src/gen/_models/searchSystemSettingNameItem.zod.ts +2 -0
- package/src/gen/_models/signupParams.ts +5 -0
- package/src/gen/_models/signupParams.zod.ts +5 -0
- package/src/gen/_models/webitelCasesInputPriority.ts +5 -2
- package/src/gen/_models/webitelCasesInputPriority.zod.ts +5 -2
- package/src/gen/_models/webitelCasesPriority.ts +10 -7
- package/src/gen/_models/webitelCasesPriority.zod.ts +10 -7
- package/src/gen/_models/webitelImApiGatewayV1SendContactRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendContactRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendDocumentRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendDocumentRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendImageRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendImageRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendLocationRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendLocationRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendTextRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendTextRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImProviderV1CreateGateRequest.ts +17 -0
- package/src/gen/_models/webitelImProviderV1CreateGateRequest.zod.ts +17 -0
- package/src/gen/_models/webitelImProviderV1CreateWABAGateRequest.ts +14 -0
- package/src/gen/_models/webitelImProviderV1CreateWABAGateRequest.zod.ts +14 -0
- package/src/gen/_models/webitelImProviderV1GateResponse.ts +21 -0
- package/src/gen/_models/webitelImProviderV1GateResponse.zod.ts +21 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.zod.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendImageRequest.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendImageRequest.zod.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendTextRequest.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendTextRequest.zod.ts +1 -0
- package/src/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.ts +16 -0
- package/src/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.zod.ts +16 -0
- package/src/gen/auth/auth.msw.ts +18 -0
- package/src/gen/auth/auth.zod.ts +8 -0
- package/src/gen/cases/cases.msw.ts +1093 -1387
- package/src/gen/cases/cases.zod.ts +210 -245
- package/src/gen/catalogs/catalogs.msw.ts +836 -1088
- package/src/gen/catalogs/catalogs.zod.ts +198 -216
- package/src/gen/contacts/contacts.msw.ts +2900 -1
- package/src/gen/contacts/contacts.ts +21 -0
- package/src/gen/contacts/contacts.zod.ts +2083 -0
- package/src/gen/priorities/priorities.msw.ts +408 -534
- package/src/gen/priorities/priorities.zod.ts +108 -113
- package/src/gen/services/services.msw.ts +613 -802
- package/src/gen/services/services.zod.ts +96 -108
- package/src/gen/system-setting-service/system-setting-service.zod.ts +16 -0
- package/src/gen/users/users.msw.ts +434 -397
- package/src/gen/users/users.ts +46 -57
- package/src/gen/users/users.zod.ts +443 -459
- package/src/gen/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.zod.ts +42 -0
- package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.msw.ts +931 -0
- package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.ts +27 -0
- package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +576 -0
- package/src/gen/webitel-im-provider-v1-providermessageservice/webitel-im-provider-v1-providermessageservice.zod.ts +3 -0
- package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.msw.ts +94 -19
- package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.ts +6 -8
- package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.zod.ts +64 -42
- package/src/validations/casePriority/casePriority.validations.ts +9 -0
- package/src/validations/caseSource/caseSource.validations.ts +7 -16
- package/src/validations/caseStatus/caseStatus.validations.ts +8 -0
- package/src/validations/caseStatusCondition/caseStatusCondition.validations.ts +10 -0
- package/src/validations/index.ts +4 -0
- package/src/validations/types.ts +9 -0
- package/types/gen/_models/apiGeneratePasswordRequest.d.ts +11 -0
- package/types/gen/_models/apiGeneratePasswordRequest.zod.d.ts +11 -0
- package/types/gen/_models/apiGeneratePasswordResponse.d.ts +9 -0
- package/types/gen/_models/apiGeneratePasswordResponse.zod.d.ts +9 -0
- package/types/gen/_models/{updateUserBody.d.ts → apiInputUser.d.ts} +9 -15
- package/types/gen/_models/{updateUserBody.zod.d.ts → apiInputUser.zod.d.ts} +9 -15
- package/types/gen/_models/apiInputUserBody.d.ts +11 -0
- package/types/gen/_models/apiInputUserBody.zod.d.ts +11 -0
- package/types/gen/_models/apiInputUserDevice.d.ts +12 -0
- package/types/gen/_models/apiInputUserDevice.zod.d.ts +12 -0
- package/types/gen/_models/{updateUserBodyProfile.d.ts → apiInputUserProfile.d.ts} +1 -1
- package/types/gen/_models/{updateUserBodyProfile.zod.d.ts → apiInputUserProfile.zod.d.ts} +1 -1
- package/types/gen/_models/apiUser.d.ts +7 -7
- package/types/gen/_models/apiUser.zod.d.ts +7 -7
- package/types/gen/_models/apiUserinfo.d.ts +1 -0
- package/types/gen/_models/apiUserinfo.zod.d.ts +1 -0
- package/types/gen/_models/contactsCreateContactError.d.ts +19 -0
- package/types/gen/_models/contactsCreateContactError.zod.d.ts +19 -0
- package/types/gen/_models/contactsCreateContactsBulkResponse.d.ts +19 -0
- package/types/gen/_models/contactsCreateContactsBulkResponse.zod.d.ts +19 -0
- package/types/gen/_models/createContactsParams.d.ts +12 -0
- package/types/gen/_models/createContactsParams.zod.d.ts +12 -0
- package/types/gen/_models/createUserParams.d.ts +30 -0
- package/types/gen/_models/createUserParams.zod.d.ts +30 -0
- package/types/gen/_models/engineSystemSettingName.d.ts +2 -0
- package/types/gen/_models/engineSystemSettingName.zod.d.ts +2 -0
- package/types/gen/_models/index.zod.d.ts +15 -9
- package/types/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.d.ts +48 -0
- package/types/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.zod.d.ts +48 -0
- package/types/gen/_models/searchSystemSettingNameItem.d.ts +2 -0
- package/types/gen/_models/searchSystemSettingNameItem.zod.d.ts +2 -0
- package/types/gen/_models/signupParams.d.ts +5 -0
- package/types/gen/_models/signupParams.zod.d.ts +5 -0
- package/types/gen/_models/webitelCasesInputPriority.d.ts +5 -2
- package/types/gen/_models/webitelCasesInputPriority.zod.d.ts +5 -2
- package/types/gen/_models/webitelCasesPriority.d.ts +10 -7
- package/types/gen/_models/webitelCasesPriority.zod.d.ts +10 -7
- package/types/gen/_models/webitelImApiGatewayV1SendContactRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendContactRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendDocumentRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendDocumentRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendImageRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendImageRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendLocationRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendLocationRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendTextRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendTextRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImProviderV1CreateGateRequest.d.ts +16 -0
- package/types/gen/_models/webitelImProviderV1CreateGateRequest.zod.d.ts +16 -0
- package/types/gen/_models/webitelImProviderV1CreateWABAGateRequest.d.ts +13 -0
- package/types/gen/_models/webitelImProviderV1CreateWABAGateRequest.zod.d.ts +13 -0
- package/types/gen/_models/webitelImProviderV1GateResponse.d.ts +20 -0
- package/types/gen/_models/webitelImProviderV1GateResponse.zod.d.ts +20 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.zod.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendImageRequest.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendImageRequest.zod.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendTextRequest.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendTextRequest.zod.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.d.ts +15 -0
- package/types/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.zod.d.ts +15 -0
- package/types/gen/auth/auth.zod.d.ts +3 -0
- package/types/gen/cases/cases.zod.d.ts +126 -126
- package/types/gen/catalogs/catalogs.zod.d.ts +108 -108
- package/types/gen/contacts/contacts.d.ts +3 -1
- package/types/gen/contacts/contacts.msw.d.ts +3 -1
- package/types/gen/contacts/contacts.zod.d.ts +665 -0
- package/types/gen/priorities/priorities.zod.d.ts +60 -60
- package/types/gen/services/services.zod.d.ts +54 -54
- package/types/gen/system-setting-service/system-setting-service.zod.d.ts +16 -0
- package/types/gen/users/users.d.ts +8 -25
- package/types/gen/users/users.msw.d.ts +7 -5
- package/types/gen/users/users.zod.d.ts +136 -139
- package/types/gen/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.zod.d.ts +30 -0
- package/types/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.d.ts +3 -1
- package/types/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.msw.d.ts +2 -0
- package/types/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +167 -0
- package/types/gen/webitel-im-provider-v1-providermessageservice/webitel-im-provider-v1-providermessageservice.zod.d.ts +3 -0
- package/types/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.d.ts +3 -3
- package/types/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.msw.d.ts +3 -3
- package/types/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.zod.d.ts +40 -17
- package/types/validations/casePriority/casePriority.validations.d.ts +11 -0
- package/types/validations/caseSource/caseSource.validations.d.ts +11 -1
- package/types/validations/caseStatus/caseStatus.validations.d.ts +10 -0
- package/types/validations/caseStatusCondition/caseStatusCondition.validations.d.ts +13 -0
- package/types/validations/index.d.ts +4 -0
- package/types/validations/types.d.ts +8 -0
- package/src/gen/_models/apiCreateUserRequest.ts +0 -13
- package/src/gen/_models/apiCreateUserRequest.zod.ts +0 -13
- package/src/gen/_models/updateUser2Body.ts +0 -45
- package/src/gen/_models/updateUser2Body.zod.ts +0 -45
- package/src/gen/_models/updateUserUserBody.ts +0 -45
- package/src/gen/_models/updateUserUserBody.zod.ts +0 -45
- package/src/gen/_models/updateUserUserBodyProfile.ts +0 -10
- package/src/gen/_models/updateUserUserBodyProfile.zod.ts +0 -10
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.ts +0 -17
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.zod.ts +0 -17
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.ts +0 -14
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.zod.ts +0 -14
- package/types/gen/_models/apiCreateUserRequest.d.ts +0 -12
- package/types/gen/_models/apiCreateUserRequest.zod.d.ts +0 -12
- package/types/gen/_models/updateUser2Body.d.ts +0 -44
- package/types/gen/_models/updateUser2Body.zod.d.ts +0 -44
- package/types/gen/_models/updateUser2BodyProfile.d.ts +0 -9
- package/types/gen/_models/updateUser2BodyProfile.zod.d.ts +0 -9
- package/types/gen/_models/updateUserUserBody.d.ts +0 -44
- package/types/gen/_models/updateUserUserBody.zod.d.ts +0 -44
- package/types/gen/_models/updateUserUserBodyProfile.d.ts +0 -9
- package/types/gen/_models/updateUserUserBodyProfile.zod.d.ts +0 -9
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.d.ts +0 -16
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.zod.d.ts +0 -16
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.d.ts +0 -13
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.zod.d.ts +0 -13
package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.msw.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { faker } from '@faker-js/faker';
|
|
|
8
8
|
import type { RequestHandlerOptions } from 'msw';
|
|
9
9
|
import { HttpResponse, http } from 'msw';
|
|
10
10
|
import type {
|
|
11
|
-
|
|
11
|
+
WebitelImProviderV1GateResponse,
|
|
12
12
|
WebitelImProviderV1ProviderDeleteWhatsAppGateResponse,
|
|
13
13
|
WebitelImProviderV1ProviderGetWhatsAppGateResponse,
|
|
14
14
|
WebitelImProviderV1ProviderUpdateWhatsAppGateResponse,
|
|
@@ -17,12 +17,12 @@ import { WebitelImProviderV1ProviderStatus } from '../_models';
|
|
|
17
17
|
|
|
18
18
|
export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
19
19
|
overrideResponse: Partial<
|
|
20
|
-
Extract<
|
|
20
|
+
Extract<WebitelImProviderV1GateResponse, object>
|
|
21
21
|
> = {},
|
|
22
|
-
):
|
|
23
|
-
|
|
22
|
+
): WebitelImProviderV1GateResponse => ({
|
|
23
|
+
bot: faker.helpers.arrayElement([
|
|
24
24
|
{
|
|
25
|
-
|
|
25
|
+
iss: faker.helpers.arrayElement([
|
|
26
26
|
faker.string.alpha({
|
|
27
27
|
length: {
|
|
28
28
|
min: 10,
|
|
@@ -31,7 +31,7 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
31
31
|
}),
|
|
32
32
|
undefined,
|
|
33
33
|
]),
|
|
34
|
-
|
|
34
|
+
sub: faker.helpers.arrayElement([
|
|
35
35
|
faker.string.alpha({
|
|
36
36
|
length: {
|
|
37
37
|
min: 10,
|
|
@@ -40,7 +40,79 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
40
40
|
}),
|
|
41
41
|
undefined,
|
|
42
42
|
]),
|
|
43
|
-
|
|
43
|
+
},
|
|
44
|
+
undefined,
|
|
45
|
+
]),
|
|
46
|
+
createdAt: faker.helpers.arrayElement([
|
|
47
|
+
faker.string.alpha({
|
|
48
|
+
length: {
|
|
49
|
+
min: 10,
|
|
50
|
+
max: 20,
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
undefined,
|
|
54
|
+
]),
|
|
55
|
+
createdBy: faker.helpers.arrayElement([
|
|
56
|
+
faker.string.alpha({
|
|
57
|
+
length: {
|
|
58
|
+
min: 10,
|
|
59
|
+
max: 20,
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
undefined,
|
|
63
|
+
]),
|
|
64
|
+
enabled: faker.helpers.arrayElement([
|
|
65
|
+
faker.datatype.boolean(),
|
|
66
|
+
undefined,
|
|
67
|
+
]),
|
|
68
|
+
id: faker.helpers.arrayElement([
|
|
69
|
+
faker.string.alpha({
|
|
70
|
+
length: {
|
|
71
|
+
min: 10,
|
|
72
|
+
max: 20,
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
undefined,
|
|
76
|
+
]),
|
|
77
|
+
name: faker.helpers.arrayElement([
|
|
78
|
+
faker.string.alpha({
|
|
79
|
+
length: {
|
|
80
|
+
min: 10,
|
|
81
|
+
max: 20,
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
84
|
+
undefined,
|
|
85
|
+
]),
|
|
86
|
+
type: faker.helpers.arrayElement([
|
|
87
|
+
faker.string.alpha({
|
|
88
|
+
length: {
|
|
89
|
+
min: 10,
|
|
90
|
+
max: 20,
|
|
91
|
+
},
|
|
92
|
+
}),
|
|
93
|
+
undefined,
|
|
94
|
+
]),
|
|
95
|
+
updatedAt: faker.helpers.arrayElement([
|
|
96
|
+
faker.string.alpha({
|
|
97
|
+
length: {
|
|
98
|
+
min: 10,
|
|
99
|
+
max: 20,
|
|
100
|
+
},
|
|
101
|
+
}),
|
|
102
|
+
undefined,
|
|
103
|
+
]),
|
|
104
|
+
updatedBy: faker.helpers.arrayElement([
|
|
105
|
+
faker.string.alpha({
|
|
106
|
+
length: {
|
|
107
|
+
min: 10,
|
|
108
|
+
max: 20,
|
|
109
|
+
},
|
|
110
|
+
}),
|
|
111
|
+
undefined,
|
|
112
|
+
]),
|
|
113
|
+
waba: faker.helpers.arrayElement([
|
|
114
|
+
{
|
|
115
|
+
accessToken: faker.helpers.arrayElement([
|
|
44
116
|
faker.string.alpha({
|
|
45
117
|
length: {
|
|
46
118
|
min: 10,
|
|
@@ -49,7 +121,7 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
49
121
|
}),
|
|
50
122
|
undefined,
|
|
51
123
|
]),
|
|
52
|
-
|
|
124
|
+
accessTokenExpiresAt: faker.helpers.arrayElement([
|
|
53
125
|
faker.string.alpha({
|
|
54
126
|
length: {
|
|
55
127
|
min: 10,
|
|
@@ -58,7 +130,7 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
58
130
|
}),
|
|
59
131
|
undefined,
|
|
60
132
|
]),
|
|
61
|
-
|
|
133
|
+
businessId: faker.helpers.arrayElement([
|
|
62
134
|
faker.string.alpha({
|
|
63
135
|
length: {
|
|
64
136
|
min: 10,
|
|
@@ -67,7 +139,7 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
67
139
|
}),
|
|
68
140
|
undefined,
|
|
69
141
|
]),
|
|
70
|
-
|
|
142
|
+
id: faker.helpers.arrayElement([
|
|
71
143
|
faker.string.alpha({
|
|
72
144
|
length: {
|
|
73
145
|
min: 10,
|
|
@@ -76,13 +148,16 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
76
148
|
}),
|
|
77
149
|
undefined,
|
|
78
150
|
]),
|
|
79
|
-
|
|
80
|
-
faker.
|
|
81
|
-
|
|
82
|
-
|
|
151
|
+
metaAppId: faker.helpers.arrayElement([
|
|
152
|
+
faker.string.alpha({
|
|
153
|
+
length: {
|
|
154
|
+
min: 10,
|
|
155
|
+
max: 20,
|
|
156
|
+
},
|
|
157
|
+
}),
|
|
83
158
|
undefined,
|
|
84
159
|
]),
|
|
85
|
-
|
|
160
|
+
phoneNumber: faker.helpers.arrayElement([
|
|
86
161
|
faker.string.alpha({
|
|
87
162
|
length: {
|
|
88
163
|
min: 10,
|
|
@@ -91,7 +166,7 @@ export const getWhatsAppServiceCreateWhatsAppGateResponseMock = (
|
|
|
91
166
|
}),
|
|
92
167
|
undefined,
|
|
93
168
|
]),
|
|
94
|
-
|
|
169
|
+
phoneNumberId: faker.helpers.arrayElement([
|
|
95
170
|
faker.string.alpha({
|
|
96
171
|
length: {
|
|
97
172
|
min: 10,
|
|
@@ -381,12 +456,12 @@ export const getWhatsAppServiceUpdateWhatsAppGateResponseMock = (
|
|
|
381
456
|
|
|
382
457
|
export const getWhatsAppServiceCreateWhatsAppGateMockHandler = (
|
|
383
458
|
overrideResponse?:
|
|
384
|
-
|
|
|
459
|
+
| WebitelImProviderV1GateResponse
|
|
385
460
|
| ((
|
|
386
461
|
info: Parameters<Parameters<typeof http.post>[1]>[0],
|
|
387
462
|
) =>
|
|
388
|
-
| Promise<
|
|
389
|
-
|
|
|
463
|
+
| Promise<WebitelImProviderV1GateResponse>
|
|
464
|
+
| WebitelImProviderV1GateResponse),
|
|
390
465
|
options?: RequestHandlerOptions,
|
|
391
466
|
) => {
|
|
392
467
|
return http.post(
|
package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.ts
CHANGED
|
@@ -9,8 +9,8 @@ import axios from '@aliasedDeps/api-services/axios';
|
|
|
9
9
|
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
WebitelImProviderV1CreateGateRequest,
|
|
13
|
+
WebitelImProviderV1GateResponse,
|
|
14
14
|
WebitelImProviderV1ProviderDeleteWhatsAppGateResponse,
|
|
15
15
|
WebitelImProviderV1ProviderGetWhatsAppGateResponse,
|
|
16
16
|
WebitelImProviderV1ProviderUpdateWhatsAppGateResponse,
|
|
@@ -29,14 +29,12 @@ export const // --- title start
|
|
|
29
29
|
* @summary / CreateWhatsAppGate registers a WhatsApp Business Account (WABA) gateway.
|
|
30
30
|
*/
|
|
31
31
|
const whatsAppServiceCreateWhatsAppGate = (
|
|
32
|
-
|
|
32
|
+
webitelImProviderV1CreateGateRequest: WebitelImProviderV1CreateGateRequest,
|
|
33
33
|
options?: AxiosRequestConfig,
|
|
34
|
-
): Promise<
|
|
35
|
-
AxiosResponse<WebitelImProviderV1ProviderCreateWhatsAppGateResponse>
|
|
36
|
-
> => {
|
|
34
|
+
): Promise<AxiosResponse<WebitelImProviderV1GateResponse>> => {
|
|
37
35
|
return axiosInstance.post(
|
|
38
36
|
`/im/gates/whatsapp`,
|
|
39
|
-
|
|
37
|
+
webitelImProviderV1CreateGateRequest,
|
|
40
38
|
options,
|
|
41
39
|
);
|
|
42
40
|
};
|
|
@@ -88,7 +86,7 @@ export const // --- title start
|
|
|
88
86
|
};
|
|
89
87
|
};
|
|
90
88
|
export type WhatsAppServiceCreateWhatsAppGateResult =
|
|
91
|
-
AxiosResponse<
|
|
89
|
+
AxiosResponse<WebitelImProviderV1GateResponse>;
|
|
92
90
|
export type WhatsAppServiceDeleteWhatsAppGateResult =
|
|
93
91
|
AxiosResponse<WebitelImProviderV1ProviderDeleteWhatsAppGateResponse>;
|
|
94
92
|
export type WhatsAppServiceGetWhatsAppGateResult =
|
package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.zod.ts
CHANGED
|
@@ -9,49 +9,71 @@ import * as zod from 'zod';
|
|
|
9
9
|
/**
|
|
10
10
|
* @summary / CreateWhatsAppGate registers a WhatsApp Business Account (WABA) gateway.
|
|
11
11
|
*/
|
|
12
|
-
export const WhatsAppServiceCreateWhatsAppGateBody = zod
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
export const WhatsAppServiceCreateWhatsAppGateBody = zod.object({
|
|
13
|
+
bot: zod
|
|
14
|
+
.object({
|
|
15
|
+
iss: zod.string().optional(),
|
|
16
|
+
sub: zod.string().optional(),
|
|
17
|
+
})
|
|
18
|
+
.optional(),
|
|
19
|
+
enabled: zod.boolean().optional(),
|
|
20
|
+
fb: zod
|
|
21
|
+
.object({
|
|
22
|
+
enabled: zod.boolean().optional(),
|
|
23
|
+
metaAppId: zod.string().optional(),
|
|
24
|
+
name: zod.string().optional(),
|
|
25
|
+
pageId: zod.string().optional(),
|
|
26
|
+
pageToken: zod.string().optional(),
|
|
27
|
+
peer: zod
|
|
28
|
+
.object({
|
|
29
|
+
iss: zod.string().optional(),
|
|
30
|
+
sub: zod.string().optional(),
|
|
31
|
+
})
|
|
32
|
+
.optional(),
|
|
33
|
+
})
|
|
34
|
+
.optional()
|
|
35
|
+
.describe(
|
|
36
|
+
'/ ProviderCreateFacebookGateRequest links a specific Facebook Page as a messaging gateway.',
|
|
37
|
+
),
|
|
38
|
+
name: zod.string().optional(),
|
|
39
|
+
waba: zod
|
|
40
|
+
.object({
|
|
41
|
+
accessToken: zod.string().optional(),
|
|
42
|
+
businessId: zod.string().optional(),
|
|
43
|
+
metaAppId: zod.string().optional(),
|
|
44
|
+
phoneNumber: zod.string().optional(),
|
|
45
|
+
phoneNumberId: zod.string().optional(),
|
|
46
|
+
})
|
|
47
|
+
.optional(),
|
|
48
|
+
});
|
|
25
49
|
|
|
26
|
-
export const WhatsAppServiceCreateWhatsAppGateResponse = zod
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'/ ProviderCreateWhatsAppGateResponse returns the registered WhatsApp provider.',
|
|
54
|
-
);
|
|
50
|
+
export const WhatsAppServiceCreateWhatsAppGateResponse = zod.object({
|
|
51
|
+
bot: zod
|
|
52
|
+
.object({
|
|
53
|
+
iss: zod.string().optional(),
|
|
54
|
+
sub: zod.string().optional(),
|
|
55
|
+
})
|
|
56
|
+
.optional(),
|
|
57
|
+
createdAt: zod.string().optional(),
|
|
58
|
+
createdBy: zod.string().optional(),
|
|
59
|
+
enabled: zod.boolean().optional(),
|
|
60
|
+
id: zod.string().optional(),
|
|
61
|
+
name: zod.string().optional(),
|
|
62
|
+
type: zod.string().optional(),
|
|
63
|
+
updatedAt: zod.string().optional(),
|
|
64
|
+
updatedBy: zod.string().optional(),
|
|
65
|
+
waba: zod
|
|
66
|
+
.object({
|
|
67
|
+
accessToken: zod.string().optional(),
|
|
68
|
+
accessTokenExpiresAt: zod.string().optional(),
|
|
69
|
+
businessId: zod.string().optional(),
|
|
70
|
+
id: zod.string().optional(),
|
|
71
|
+
metaAppId: zod.string().optional(),
|
|
72
|
+
phoneNumber: zod.string().optional(),
|
|
73
|
+
phoneNumberId: zod.string().optional(),
|
|
74
|
+
})
|
|
75
|
+
.optional(),
|
|
76
|
+
});
|
|
55
77
|
|
|
56
78
|
/**
|
|
57
79
|
* @summary / DeleteWhatsAppGate removes the WhatsApp gateway integration.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WebitelCasesPriority } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { ZodShape } from '../types';
|
|
4
|
+
|
|
5
|
+
export const casePrioritySchema = z.object<ZodShape<WebitelCasesPriority>>({
|
|
6
|
+
name: z.string().min(1),
|
|
7
|
+
color: z.string().min(1),
|
|
8
|
+
description: z.string().optional(),
|
|
9
|
+
});
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WebitelCasesSource } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { ZodShape } from '../types';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* Previously, orval ignored `default` values and generated plain `ZodObject`.
|
|
9
|
-
* Now schemas are wrapped with `.default(...)`, which transforms
|
|
10
|
-
* `CreateSourceBody` from `ZodObject` into `ZodDefault<ZodObject>`.
|
|
11
|
-
*/
|
|
12
|
-
const innerSchema = genCaseSourceSchema.unwrap();
|
|
13
|
-
|
|
14
|
-
export const caseSourceSchema = innerSchema.extend({
|
|
15
|
-
name: innerSchema.shape.name.unwrap().default(''),
|
|
16
|
-
description: innerSchema.shape.description.default(''),
|
|
17
|
-
type: innerSchema.shape.type.unwrap(),
|
|
5
|
+
export const caseSourceSchema = z.object<ZodShape<WebitelCasesSource>>({
|
|
6
|
+
name: z.string().min(1),
|
|
7
|
+
description: z.string().optional(),
|
|
8
|
+
type: z.string().min(1),
|
|
18
9
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WebitelCasesStatus } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { ZodShape } from '../types';
|
|
4
|
+
|
|
5
|
+
export const caseStatusSchema = z.object<ZodShape<WebitelCasesStatus>>({
|
|
6
|
+
name: z.string().min(1),
|
|
7
|
+
description: z.string().optional(),
|
|
8
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WebitelCasesStatusCondition } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { ZodShape } from '../types';
|
|
4
|
+
|
|
5
|
+
export const caseStatusConditionSchema = z.object<
|
|
6
|
+
ZodShape<WebitelCasesStatusCondition>
|
|
7
|
+
>({
|
|
8
|
+
name: z.string().min(1),
|
|
9
|
+
description: z.string().optional(),
|
|
10
|
+
});
|
package/src/validations/index.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Maps every key of T to a ZodType, suitable for use as a `z.object<ZodShape<T>>()` generic.
|
|
5
|
+
* Ensures the schema covers all fields of T without importing from generated code.
|
|
6
|
+
*/
|
|
7
|
+
export type ZodShape<T> = {
|
|
8
|
+
[K in keyof T]?: z.ZodType;
|
|
9
|
+
};
|
|
@@ -4,24 +4,22 @@
|
|
|
4
4
|
* Webitel API
|
|
5
5
|
* OpenAPI spec version: 24.04.0
|
|
6
6
|
*/
|
|
7
|
+
import type { ApiInputUserProfile } from './apiInputUserProfile';
|
|
7
8
|
import type { ApiLicenseUser } from './apiLicenseUser';
|
|
8
9
|
import type { ApiObjectId } from './apiObjectId';
|
|
9
10
|
import type { ApiPermission } from './apiPermission';
|
|
10
|
-
import type { ApiUserId } from './apiUserId';
|
|
11
11
|
import type { ApiUserPresence } from './apiUserPresence';
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Input of the User profile for Create/Update operations.
|
|
14
|
+
Mirrors `User` field numbers 1:1 (wire-compatible), but excludes
|
|
15
|
+
system-managed read-only fields (id, audit metadata).
|
|
16
|
+
*/
|
|
17
|
+
export interface ApiInputUser {
|
|
14
18
|
/** The "chat_name" field is used to store the name displayed externally on the platform.
|
|
15
19
|
For example, "chat_name" is shown when an agent connects to chats with clients. */
|
|
16
20
|
chatName?: string;
|
|
17
|
-
/** [optional] contact connected to this user */
|
|
18
21
|
contact?: ApiObjectId;
|
|
19
|
-
readonly createdAt?: string;
|
|
20
|
-
readonly createdBy?: ApiUserId;
|
|
21
|
-
readonly deletedAt?: string;
|
|
22
|
-
readonly deletedBy?: ApiUserId;
|
|
23
22
|
device?: ApiObjectId;
|
|
24
|
-
/** [editable] list of unique `regular` devices, attached to this user */
|
|
25
23
|
devices?: ApiObjectId[];
|
|
26
24
|
email?: string;
|
|
27
25
|
extension?: string;
|
|
@@ -32,13 +30,9 @@ For example, "chat_name" is shown when an agent connects to chats with clients.
|
|
|
32
30
|
name?: string;
|
|
33
31
|
password?: string;
|
|
34
32
|
permissions?: ApiPermission[];
|
|
35
|
-
/** string presence = 7; // unique set of <user> presentity <status:basic> tuples open[ed]
|
|
36
|
-
string status = 8; // short display status (short description) */
|
|
37
33
|
presence?: ApiUserPresence;
|
|
38
|
-
profile?:
|
|
34
|
+
profile?: ApiInputUserProfile;
|
|
39
35
|
roles?: ApiObjectId[];
|
|
40
36
|
totpUrl?: string;
|
|
41
|
-
readonly updatedAt?: string;
|
|
42
|
-
readonly updatedBy?: ApiUserId;
|
|
43
37
|
username?: string;
|
|
44
|
-
}
|
|
38
|
+
}
|
|
@@ -4,24 +4,22 @@
|
|
|
4
4
|
* Webitel API
|
|
5
5
|
* OpenAPI spec version: 24.04.0
|
|
6
6
|
*/
|
|
7
|
+
import type { ApiInputUserProfile } from './apiInputUserProfile';
|
|
7
8
|
import type { ApiLicenseUser } from './apiLicenseUser';
|
|
8
9
|
import type { ApiObjectId } from './apiObjectId';
|
|
9
10
|
import type { ApiPermission } from './apiPermission';
|
|
10
|
-
import type { ApiUserId } from './apiUserId';
|
|
11
11
|
import type { ApiUserPresence } from './apiUserPresence';
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Input of the User profile for Create/Update operations.
|
|
14
|
+
Mirrors `User` field numbers 1:1 (wire-compatible), but excludes
|
|
15
|
+
system-managed read-only fields (id, audit metadata).
|
|
16
|
+
*/
|
|
17
|
+
export interface ApiInputUser {
|
|
14
18
|
/** The "chat_name" field is used to store the name displayed externally on the platform.
|
|
15
19
|
For example, "chat_name" is shown when an agent connects to chats with clients. */
|
|
16
20
|
chatName?: string;
|
|
17
|
-
/** [optional] contact connected to this user */
|
|
18
21
|
contact?: ApiObjectId;
|
|
19
|
-
readonly createdAt?: string;
|
|
20
|
-
readonly createdBy?: ApiUserId;
|
|
21
|
-
readonly deletedAt?: string;
|
|
22
|
-
readonly deletedBy?: ApiUserId;
|
|
23
22
|
device?: ApiObjectId;
|
|
24
|
-
/** [editable] list of unique `regular` devices, attached to this user */
|
|
25
23
|
devices?: ApiObjectId[];
|
|
26
24
|
email?: string;
|
|
27
25
|
extension?: string;
|
|
@@ -32,13 +30,9 @@ For example, "chat_name" is shown when an agent connects to chats with clients.
|
|
|
32
30
|
name?: string;
|
|
33
31
|
password?: string;
|
|
34
32
|
permissions?: ApiPermission[];
|
|
35
|
-
/** string presence = 7; // unique set of <user> presentity <status:basic> tuples open[ed]
|
|
36
|
-
string status = 8; // short display status (short description) */
|
|
37
33
|
presence?: ApiUserPresence;
|
|
38
|
-
profile?:
|
|
34
|
+
profile?: ApiInputUserProfile;
|
|
39
35
|
roles?: ApiObjectId[];
|
|
40
36
|
totpUrl?: string;
|
|
41
|
-
readonly updatedAt?: string;
|
|
42
|
-
readonly updatedBy?: ApiUserId;
|
|
43
37
|
username?: string;
|
|
44
|
-
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { ApiInputUser } from './apiInputUser';
|
|
8
|
+
/**
|
|
9
|
+
* body: modifications/changes
|
|
10
|
+
*/
|
|
11
|
+
export type ApiInputUserBody = ApiInputUser;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { ApiInputUser } from './apiInputUser';
|
|
8
|
+
/**
|
|
9
|
+
* body: modifications/changes
|
|
10
|
+
*/
|
|
11
|
+
export type ApiInputUserBody = ApiInputUser;
|
|
@@ -19,10 +19,10 @@ For example, "chat_name" is shown when an agent connects to chats with clients.
|
|
|
19
19
|
chatName?: string;
|
|
20
20
|
/** [optional] contact connected to this user */
|
|
21
21
|
contact?: ApiObjectId;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
createdAt?: string;
|
|
23
|
+
createdBy?: ApiUserId;
|
|
24
|
+
deletedAt?: string;
|
|
25
|
+
deletedBy?: ApiUserId;
|
|
26
26
|
device?: ApiObjectId;
|
|
27
27
|
/** [editable] list of unique `regular` devices, attached to this user */
|
|
28
28
|
devices?: ApiObjectId[];
|
|
@@ -31,7 +31,7 @@ For example, "chat_name" is shown when an agent connects to chats with clients.
|
|
|
31
31
|
/** When set to true, the user will be required to change their password on next login. */
|
|
32
32
|
forcePasswordChange?: boolean;
|
|
33
33
|
hotdesks?: ApiObjectId[];
|
|
34
|
-
|
|
34
|
+
id?: string;
|
|
35
35
|
license?: ApiLicenseUser[];
|
|
36
36
|
name?: string;
|
|
37
37
|
password?: string;
|
|
@@ -42,7 +42,7 @@ For example, "chat_name" is shown when an agent connects to chats with clients.
|
|
|
42
42
|
profile?: ApiUserProfile;
|
|
43
43
|
roles?: ApiObjectId[];
|
|
44
44
|
totpUrl?: string;
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
updatedAt?: string;
|
|
46
|
+
updatedBy?: ApiUserId;
|
|
47
47
|
username?: string;
|
|
48
48
|
}
|