@webitel/api-services 0.0.27 → 0.0.28

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.
Files changed (93) hide show
  1. package/package.json +42 -26
  2. package/src/api/clients/_shared/generatePermissionsApi.ts +4 -3
  3. package/src/api/clients/agents/agentChats.ts +5 -7
  4. package/src/api/clients/agents/agents.ts +4 -3
  5. package/src/api/clients/buckets/buckets.ts +4 -3
  6. package/src/api/clients/calendars/calendars.ts +4 -3
  7. package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.ts +4 -3
  8. package/src/api/clients/caseCloseReasons/caseCloseReasons.ts +4 -3
  9. package/src/api/clients/casePriorities/casePriorities.ts +4 -3
  10. package/src/api/clients/caseServiceCatalogs/serviceCatalogs.ts +9 -9
  11. package/src/api/clients/caseServices/services.ts +4 -3
  12. package/src/api/clients/caseSources/caseSources.ts +8 -12
  13. package/src/api/clients/caseStatusConditions/caseStatusConditions.ts +6 -5
  14. package/src/api/clients/caseStatuses/caseStatuses.ts +4 -3
  15. package/src/api/clients/catalog/catalog.ts +2 -5
  16. package/src/api/clients/chatGateways/chatGateways.ts +2 -2
  17. package/src/api/clients/communications/communications.ts +9 -7
  18. package/src/api/clients/configurations/configurations.ts +4 -3
  19. package/src/api/clients/contactGroups/contactGroups.ts +4 -3
  20. package/src/api/clients/flows/flow.ts +4 -3
  21. package/src/api/clients/gateways/gateways.ts +4 -3
  22. package/src/api/clients/history/transcript/callTranscript.ts +79 -0
  23. package/src/api/clients/index.ts +34 -68
  24. package/src/api/clients/labels/labels.ts +4 -3
  25. package/src/api/clients/lists/blacklists.ts +4 -3
  26. package/src/api/clients/media/media.ts +4 -3
  27. package/src/api/clients/object/object.ts +4 -3
  28. package/src/api/clients/queues/queues.ts +5 -4
  29. package/src/api/clients/quickReplies/quickReplies.ts +8 -12
  30. package/src/api/clients/roles/roles.ts +4 -3
  31. package/src/api/clients/skills/skills.ts +4 -3
  32. package/src/api/clients/slaConditions/slaConditions.ts +4 -3
  33. package/src/api/clients/slas/slas.ts +4 -3
  34. package/src/api/clients/teams/teams.ts +4 -3
  35. package/src/api/clients/users/users.ts +4 -3
  36. package/src/api/clients/wtTypes/index.ts +2 -0
  37. package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +2 -1
  38. package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +3 -2
  39. package/src/api/clients//321/201ontacts/contactChatMessagesHistory.ts +5 -7
  40. package/src/api/clients//321/201ontacts/contacts.ts +5 -4
  41. package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.ts +1 -3
  42. package/src/api/clients//321/201ontacts/index.ts +3 -5
  43. package/src/api/defaults/index.ts +4 -11
  44. package/src/api/interceptors/request/index.ts +1 -1
  45. package/src/api/interceptors/response/index.ts +1 -1
  46. package/src/api/transformers/camelToSnake/camelToSnake.transformer.ts +1 -1
  47. package/src/api/transformers/notify/notify.transformer.ts +3 -3
  48. package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.ts +1 -1
  49. package/src/api/transformers/starToSearch/starToSearch.transformer.ts +2 -4
  50. package/src/config/config.ts +13 -0
  51. package/src/gen/_docs/.nojekyll +1 -0
  52. package/src/gen/_docs/html/assets/hierarchy.js +1 -1
  53. package/src/gen/_docs/html/assets/highlight.css +101 -76
  54. package/src/gen/_docs/html/assets/icons.js +20 -17
  55. package/src/gen/_docs/html/assets/main.js +2503 -6
  56. package/src/gen/_docs/html/assets/navigation.js +2 -1
  57. package/src/gen/_docs/html/assets/search.js +2 -1
  58. package/src/gen/_docs/html/assets/style.css +1623 -1634
  59. package/src/index.ts +2 -2
  60. package/src/utils/api/caseConverters.ts +77 -0
  61. package/src/utils/api/index.ts +1 -0
  62. package/src/utils/gen/index.ts +19 -1
  63. package/src/utils/index.ts +1 -20
  64. package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +2 -1
  65. package/types/api/clients/history/transcript/callTranscript.d.ts +11 -0
  66. package/types/api/clients/index.d.ts +31 -33
  67. package/types/api/clients/media/media.d.ts +2 -2
  68. package/types/api/clients/wtTypes/index.d.ts +2 -0
  69. package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +1 -1
  70. package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +1 -2
  71. package/types/api/clients//321/201ontacts/index.d.ts +3 -4
  72. package/types/api/defaults/index.d.ts +4 -5
  73. package/types/api/interceptors/request/index.d.ts +1 -1
  74. package/types/api/interceptors/response/index.d.ts +1 -1
  75. package/types/config/config.d.ts +7 -0
  76. package/types/gen/_models/casesCaseCustom.d.ts +12 -0
  77. package/types/gen/_models/casesInputCaseCustom.d.ts +12 -0
  78. package/types/gen/_models/casesInputCreateCaseCustom.d.ts +12 -0
  79. package/types/gen/_models/engineTriggerObjectType.d.ts +1 -0
  80. package/types/gen/_models/fileServiceSearchFilesChannelItem.d.ts +2 -0
  81. package/types/gen/_models/protobufNullValue.d.ts +18 -0
  82. package/types/gen/_models/storageUploadFileChannel.d.ts +2 -0
  83. package/types/gen/file-policies-service/file-policies-service.zod.gen.d.ts +18 -0
  84. package/types/gen/file-service/file-service.api.gen.d.ts +3 -1
  85. package/types/gen/file-service/file-service.msw.api.gen.d.ts +3 -1
  86. package/types/gen/file-service/file-service.zod.gen.d.ts +18 -0
  87. package/types/gen/trigger-service/trigger-service.zod.gen.d.ts +9 -0
  88. package/types/index.d.ts +2 -2
  89. package/types/utils/api/caseConverters.d.ts +9 -0
  90. package/types/utils/api/index.d.ts +1 -0
  91. package/types/utils/index.d.ts +1 -7
  92. package/types/gen/_models/googleRpcStatus.d.ts +0 -12
  93. package/types/gen/_models/webitelCasesStatus.d.ts +0 -16
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './gen';
2
- export * from './utils/gen';
1
+ export type { ApiServicesConfig } from './config/config';
2
+ export { setConfig } from './config/config';
@@ -0,0 +1,77 @@
1
+ export const snakeToCamel = (str) =>
2
+ str.replace(/([a-z])([_])([a-z])/g, (_group, p1, _p2, p3) =>
3
+ [p1, p3.toUpperCase()].join(''),
4
+ );
5
+
6
+ export const camelToSnake = (str) =>
7
+ str.replace(/([a-z])([A-Z])/g, (_group, p1, p2) =>
8
+ [p1, '_', p2.toLowerCase()].join(''),
9
+ );
10
+
11
+ export const kebabToCamel = (str) =>
12
+ str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', ''));
13
+
14
+ export const camelToKebab = (str) =>
15
+ str.replace(/([A-Z])/g, (group) => group.toLowerCase().replace('', '-'));
16
+
17
+ export const kebabToSnake = (str) =>
18
+ str.replace(/([-_][a-z])/g, (group) => group.replace('-', '_'));
19
+
20
+ export const snakeToKebab = (str) =>
21
+ str.replace(/([-_][a-z])/g, (group) => group.replace('_', '-'));
22
+
23
+ const convertObject =
24
+ ({ self, converter }) =>
25
+ (obj, skipKeys) => {
26
+ if (!obj) return obj;
27
+ const newObj = {};
28
+ if (Array.isArray(obj)) {
29
+ return obj.map((value) => {
30
+ if (typeof value === 'object') {
31
+ return self(value, skipKeys);
32
+ }
33
+ if (typeof value === 'string') return converter(value);
34
+ return value; // number
35
+ });
36
+ }
37
+ Object.keys(obj).forEach((oldKey) => {
38
+ if (skipKeys.includes(oldKey)) {
39
+ newObj[oldKey] = obj[oldKey];
40
+ } else {
41
+ const newKey = converter(oldKey);
42
+ let value = obj[oldKey];
43
+ if (
44
+ Array.isArray(value) ||
45
+ (value !== null &&
46
+ value !== undefined &&
47
+ value.constructor === Object)
48
+ ) {
49
+ value = self(value, skipKeys);
50
+ }
51
+ newObj[newKey] = value;
52
+ }
53
+ });
54
+
55
+ return newObj;
56
+ };
57
+
58
+ export const objSnakeToCamel = (obj, skipKeys = []) => {
59
+ return convertObject({
60
+ self: objSnakeToCamel,
61
+ converter: snakeToCamel,
62
+ })(obj, skipKeys);
63
+ };
64
+
65
+ export const objCamelToSnake = (obj, skipKeys = []) => {
66
+ return convertObject({
67
+ self: objCamelToSnake,
68
+ converter: camelToSnake,
69
+ })(obj, skipKeys);
70
+ };
71
+
72
+ export const objCamelToKebab = (obj, skipKeys = []) => {
73
+ return convertObject({
74
+ self: objCamelToKebab,
75
+ converter: camelToKebab,
76
+ })(obj, skipKeys);
77
+ };
@@ -0,0 +1 @@
1
+ export * from './caseConverters';
@@ -1,4 +1,4 @@
1
- import z from 'zod';
1
+ import { z } from 'zod/v4';
2
2
 
3
3
  /**
4
4
  * @description
@@ -47,3 +47,21 @@ export const getFieldsToSendFromZodSchema = <T extends z.ZodTypeAny>(
47
47
  // return empty array
48
48
  return [];
49
49
  };
50
+
51
+ /**
52
+ * @author @dlohvinov
53
+ * @description
54
+ * Get default value for schema. Could be anything: object with default fields values, or primitive.
55
+ */
56
+ export const getDefaultsFromZodSchema = (
57
+ schema: z.ZodType,
58
+ value?: unknown,
59
+ ): unknown => {
60
+ return (
61
+ schema
62
+ /* zod validates passed value and throws err before returning defaults,
63
+ so we should skip error throwing and return value instead */
64
+ .catch(({ value: validatedValue }) => validatedValue)
65
+ .parse(value)
66
+ );
67
+ };
@@ -1,21 +1,2 @@
1
- import type { z } from 'zod/v4';
2
-
1
+ export * from './api';
3
2
  export * from './gen';
4
-
5
- /**
6
- * @author @dlohvinov
7
- * @description
8
- * Get default value for schema. Could be anything: object with default fields values, or primitive.
9
- */
10
- export const getDefaultsFromZodSchema = (
11
- schema: z.ZodType,
12
- value?: unknown,
13
- ): unknown => {
14
- return (
15
- schema
16
- /* zod validates passed value and throws err before returning defaults,
17
- so we should skip error throwing and return value instead */
18
- .catch(({ value: validatedValue }) => validatedValue)
19
- .parse(value)
20
- );
21
- };
@@ -1,6 +1,7 @@
1
1
  export declare const CaseStatusConditionsAPI: {
2
- getList: ({ parentId, ...rest }: {
2
+ getList: ({ statusId, parentId, ...rest }: {
3
3
  [x: string]: any;
4
+ statusId: any;
4
5
  parentId: any;
5
6
  }) => Promise<{
6
7
  items: any;
@@ -0,0 +1,11 @@
1
+ export declare const CallTranscriptAPI: {
2
+ create: ({ callId }: {
3
+ callId: any;
4
+ }) => Promise<any>;
5
+ get: ({ id, page, size }: {
6
+ id: any;
7
+ page?: number;
8
+ size?: number;
9
+ }) => Promise<any>;
10
+ delete: (item: any) => Promise<any>;
11
+ };
@@ -1,33 +1,31 @@
1
- import agentChats from './agents/agentChats';
2
- import agents from './agents/agents';
3
- import buckets from './buckets/buckets';
4
- import calendars from './calendars/calendars';
5
- import caseCloseReasonGroups from './caseCloseReasonGroups/caseCloseReasonGroups';
6
- import caseCloseReasons from './caseCloseReasons/caseCloseReasons';
7
- import casePriorities from './casePriorities/casePriorities';
8
- import caseServiceCatalogs from './caseServiceCatalogs/serviceCatalogs';
9
- import caseSources from './caseSources/caseSources';
10
- import caseStatusConditions from './caseStatusConditions/caseStatusConditions';
11
- import caseStatuses from './caseStatuses/caseStatuses';
12
- import catalog from './catalog/catalog';
13
- import chatGateways from './chatGateways/chatGateways';
14
- import communications from './communications/communications';
15
- import configurations from './configurations/configurations';
16
- import contactGroups from './contactGroups/contactGroups';
17
- import flows from './flows/flow';
18
- import gateways from './gateways/gateways';
19
- import labels from './labels/labels';
20
- import lists from './lists/blacklists';
21
- import media from './media/media';
22
- import object from './object/object';
23
- import queues from './queues/queues';
24
- import quickReplies from './quickReplies/quickReplies';
25
- import roles from './roles/roles';
26
- import skills from './skills/skills';
27
- import slas from './slas/slas';
28
- import teams from './teams/teams';
29
- import users from './users/users';
30
- import sysTypes from './wtTypes/sysTypes/sysTypes';
31
- import typeExtensions from './wtTypes/typeExtensions/typeExtensions';
32
- import { contactChatMessagesHistory, contacts } from './сontacts/index';
33
- export { agentChats, agents, buckets, calendars, caseCloseReasonGroups, caseCloseReasons, casePriorities, caseServiceCatalogs, caseSources, caseStatusConditions, caseStatuses, catalog, chatGateways, communications, configurations, contactChatMessagesHistory, contactGroups, contacts, flows, gateways, labels, lists, media, object, queues, quickReplies, roles, skills, slas, sysTypes, teams, typeExtensions, users, };
1
+ export * from './_shared/generatePermissionsApi';
2
+ export * from './agents/agentChats';
3
+ export * from './buckets/buckets';
4
+ export * from './calendars/calendars';
5
+ export * from './caseCloseReasonGroups/caseCloseReasonGroups';
6
+ export * from './caseCloseReasons/caseCloseReasons';
7
+ export * from './casePriorities/casePriorities';
8
+ export * from './caseServiceCatalogs/serviceCatalogs';
9
+ export * from './caseSources/caseSources';
10
+ export * from './caseStatusConditions/caseStatusConditions';
11
+ export * from './caseStatuses/caseStatuses';
12
+ export * from './catalog/catalog';
13
+ export * from './communications/communications';
14
+ export * from './configurations/configurations';
15
+ export * from './contactGroups/contactGroups';
16
+ export * from './flows/flow';
17
+ export * from './gateways/gateways';
18
+ export * from './history/transcript/callTranscript';
19
+ export * from './labels/labels';
20
+ export * from './lists/blacklists';
21
+ export * from './media/media';
22
+ export * from './object/object';
23
+ export * from './queues/queues';
24
+ export * from './quickReplies/quickReplies';
25
+ export * from './skills/skills';
26
+ export * from './slas/slas';
27
+ export * from './teams/teams';
28
+ export * from './users/users';
29
+ export * from './wtTypes/sysTypes/sysTypes';
30
+ export * from './wtTypes/typeExtensions/typeExtensions';
31
+ export * from './сontacts';
@@ -1,4 +1,4 @@
1
- export declare const downloadMedia: (id: any) => Promise<any>;
1
+ export declare const downloadMedia: (id: any) => Promise<import("axios").AxiosResponse<any, any>>;
2
2
  export declare const MediaAPI: {
3
3
  getList: (params: any) => Promise<{
4
4
  items: any;
@@ -6,7 +6,7 @@ export declare const MediaAPI: {
6
6
  }>;
7
7
  get: ({ itemId }: {
8
8
  itemId: any;
9
- }) => Promise<any>;
9
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
10
10
  add: (params: any) => Promise<import("axios").AxiosResponse<any, any>>;
11
11
  delete: ({ id }: {
12
12
  id: any;
@@ -0,0 +1,2 @@
1
+ export * from './sysTypes/sysTypes';
2
+ export * from './typeExtensions/typeExtensions';
@@ -1,4 +1,4 @@
1
- export declare const WtTypeExtensionApi: {
1
+ export declare const WtTypeExtensionAPI: {
2
2
  getList: ({ itemId: typeRepo }: {
3
3
  itemId: any;
4
4
  }) => Promise<any>;
@@ -1,8 +1,7 @@
1
- declare const ContactsSearchMode: Readonly<{
1
+ export declare const ContactsSearchMode: Readonly<{
2
2
  NAME: "name";
3
3
  LABELS: "labels";
4
4
  ABOUT: "about";
5
5
  VARIABLES: "variables";
6
6
  DESTINATION: "destination";
7
7
  }>;
8
- export default ContactsSearchMode;
@@ -1,4 +1,3 @@
1
- import contactChatMessagesHistory from './contactChatMessagesHistory';
2
- import contacts from './contacts';
3
- import ContactsSearchMode from './enums/ContactsSearchMode';
4
- export { contactChatMessagesHistory, contacts, ContactsSearchMode };
1
+ export * from './contactChatMessagesHistory';
2
+ export * from './contacts';
3
+ export * from './enums/ContactsSearchMode';
@@ -1,5 +1,4 @@
1
- import getDefaultGetListResponse from './getDefaultGetListResponse/getDefaultGetListResponse';
2
- import getDefaultGetParams from './getDefaultGetParams/getDefaultGetParams';
3
- import getDefaultInstance from './getDefaultInstance/getDefaultInstance';
4
- import getDefaultOpenAPIConfig from './getDefaultOpenAPIConfig/getDefaultOpenAPIConfig';
5
- export { getDefaultGetListResponse, getDefaultGetParams, getDefaultInstance, getDefaultOpenAPIConfig, };
1
+ export * from './getDefaultGetListResponse/getDefaultGetListResponse';
2
+ export * from './getDefaultGetParams/getDefaultGetParams';
3
+ export * from './getDefaultInstance/getDefaultInstance';
4
+ export * from './getDefaultOpenAPIConfig/getDefaultOpenAPIConfig';
@@ -1 +1 @@
1
- export { default as updateTokenInterceptor } from './updateToken.interceptor';
1
+ export { updateTokenInterceptor } from './updateToken.interceptor';
@@ -1 +1 @@
1
- export { default as handleUnauthorizedInterceptor } from './handleUnauthorized.interceptor';
1
+ export { handleUnauthorizedInterceptor } from './handleUnauthorized.interceptor';
@@ -0,0 +1,7 @@
1
+ export type ApiServicesConfig = {
2
+ eventBus?: {
3
+ $emit: (event: string, payload: unknown) => unknown;
4
+ };
5
+ };
6
+ export declare const config: ApiServicesConfig;
7
+ export declare const setConfig: (conf: ApiServicesConfig) => void;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v7.9.0 🍺
3
+ * Do not edit manually.
4
+ * service.proto
5
+ * OpenAPI spec version: version not set
6
+ */
7
+ /**
8
+ * Custom data extension fields ..
9
+ */
10
+ export type CasesCaseCustom = {
11
+ [key: string]: unknown;
12
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v7.9.0 🍺
3
+ * Do not edit manually.
4
+ * service.proto
5
+ * OpenAPI spec version: version not set
6
+ */
7
+ /**
8
+ * Custom data extension fields ..
9
+ */
10
+ export type CasesInputCaseCustom = {
11
+ [key: string]: unknown;
12
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v7.9.0 🍺
3
+ * Do not edit manually.
4
+ * service.proto
5
+ * OpenAPI spec version: version not set
6
+ */
7
+ /**
8
+ * Custom data extension fields ..
9
+ */
10
+ export type CasesInputCreateCaseCustom = {
11
+ [key: string]: unknown;
12
+ };
@@ -11,4 +11,5 @@ export declare const EngineTriggerObjectType: {
11
11
  readonly CaseFiles: "case_files";
12
12
  readonly CaseComments: "case_comments";
13
13
  readonly CaseLinks: "case_links";
14
+ readonly RelatedCases: "related_cases";
14
15
  };
@@ -14,4 +14,6 @@ export declare const FileServiceSearchFilesChannelItem: {
14
14
  readonly MediaChannel: "MediaChannel";
15
15
  readonly KnowledgebaseChannel: "KnowledgebaseChannel";
16
16
  readonly CasesChannel: "CasesChannel";
17
+ readonly ScreenshotChannel: "ScreenshotChannel";
18
+ readonly ScreenSharingChannel: "ScreenSharingChannel";
17
19
  };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated by orval v7.9.0 🍺
3
+ * Do not edit manually.
4
+ * service.proto
5
+ * OpenAPI spec version: version not set
6
+ */
7
+ /**
8
+ * `NullValue` is a singleton enumeration to represent the null value for the
9
+ `Value` type union.
10
+
11
+ The JSON representation for `NullValue` is JSON `null`.
12
+
13
+ - NULL_VALUE: Null value.
14
+ */
15
+ export type ProtobufNullValue = (typeof ProtobufNullValue)[keyof typeof ProtobufNullValue];
16
+ export declare const ProtobufNullValue: {
17
+ readonly NullValue: "NULL_VALUE";
18
+ };
@@ -14,4 +14,6 @@ export declare const StorageUploadFileChannel: {
14
14
  readonly MediaChannel: "MediaChannel";
15
15
  readonly KnowledgebaseChannel: "KnowledgebaseChannel";
16
16
  readonly CasesChannel: "CasesChannel";
17
+ readonly ScreenshotChannel: "ScreenshotChannel";
18
+ readonly ScreenSharingChannel: "ScreenSharingChannel";
17
19
  };
@@ -28,6 +28,8 @@ export declare const filePoliciesServiceSearchFilePoliciesResponse: zod.ZodObjec
28
28
  MediaChannel: "MediaChannel";
29
29
  KnowledgebaseChannel: "KnowledgebaseChannel";
30
30
  CasesChannel: "CasesChannel";
31
+ ScreenshotChannel: "ScreenshotChannel";
32
+ ScreenSharingChannel: "ScreenSharingChannel";
31
33
  }>>>;
32
34
  createdAt: zod.ZodOptional<zod.ZodString>;
33
35
  createdBy: zod.ZodOptional<zod.ZodObject<{
@@ -67,6 +69,8 @@ export declare const filePoliciesServiceCreateFilePolicyBody: zod.ZodObject<{
67
69
  MediaChannel: "MediaChannel";
68
70
  KnowledgebaseChannel: "KnowledgebaseChannel";
69
71
  CasesChannel: "CasesChannel";
72
+ ScreenshotChannel: "ScreenshotChannel";
73
+ ScreenSharingChannel: "ScreenSharingChannel";
70
74
  }>>>;
71
75
  description: zod.ZodOptional<zod.ZodString>;
72
76
  enabled: zod.ZodOptional<zod.ZodBoolean>;
@@ -89,6 +93,8 @@ export declare const filePoliciesServiceCreateFilePolicyResponse: zod.ZodObject<
89
93
  MediaChannel: "MediaChannel";
90
94
  KnowledgebaseChannel: "KnowledgebaseChannel";
91
95
  CasesChannel: "CasesChannel";
96
+ ScreenshotChannel: "ScreenshotChannel";
97
+ ScreenSharingChannel: "ScreenSharingChannel";
92
98
  }>>>;
93
99
  createdAt: zod.ZodOptional<zod.ZodString>;
94
100
  createdBy: zod.ZodOptional<zod.ZodObject<{
@@ -140,6 +146,8 @@ export declare const filePoliciesServiceDeleteFilePolicyResponse: zod.ZodObject<
140
146
  MediaChannel: "MediaChannel";
141
147
  KnowledgebaseChannel: "KnowledgebaseChannel";
142
148
  CasesChannel: "CasesChannel";
149
+ ScreenshotChannel: "ScreenshotChannel";
150
+ ScreenSharingChannel: "ScreenSharingChannel";
143
151
  }>>>;
144
152
  createdAt: zod.ZodOptional<zod.ZodString>;
145
153
  createdBy: zod.ZodOptional<zod.ZodObject<{
@@ -180,6 +188,8 @@ export declare const filePoliciesServiceReadFilePolicyResponse: zod.ZodObject<{
180
188
  MediaChannel: "MediaChannel";
181
189
  KnowledgebaseChannel: "KnowledgebaseChannel";
182
190
  CasesChannel: "CasesChannel";
191
+ ScreenshotChannel: "ScreenshotChannel";
192
+ ScreenSharingChannel: "ScreenSharingChannel";
183
193
  }>>>;
184
194
  createdAt: zod.ZodOptional<zod.ZodString>;
185
195
  createdBy: zod.ZodOptional<zod.ZodObject<{
@@ -220,6 +230,8 @@ export declare const filePoliciesServicePatchFilePolicyBody: zod.ZodObject<{
220
230
  MediaChannel: "MediaChannel";
221
231
  KnowledgebaseChannel: "KnowledgebaseChannel";
222
232
  CasesChannel: "CasesChannel";
233
+ ScreenshotChannel: "ScreenshotChannel";
234
+ ScreenSharingChannel: "ScreenSharingChannel";
223
235
  }>>>;
224
236
  description: zod.ZodOptional<zod.ZodString>;
225
237
  enabled: zod.ZodOptional<zod.ZodBoolean>;
@@ -244,6 +256,8 @@ export declare const filePoliciesServicePatchFilePolicyResponse: zod.ZodObject<{
244
256
  MediaChannel: "MediaChannel";
245
257
  KnowledgebaseChannel: "KnowledgebaseChannel";
246
258
  CasesChannel: "CasesChannel";
259
+ ScreenshotChannel: "ScreenshotChannel";
260
+ ScreenSharingChannel: "ScreenSharingChannel";
247
261
  }>>>;
248
262
  createdAt: zod.ZodOptional<zod.ZodString>;
249
263
  createdBy: zod.ZodOptional<zod.ZodObject<{
@@ -284,6 +298,8 @@ export declare const filePoliciesServiceUpdateFilePolicyBody: zod.ZodObject<{
284
298
  MediaChannel: "MediaChannel";
285
299
  KnowledgebaseChannel: "KnowledgebaseChannel";
286
300
  CasesChannel: "CasesChannel";
301
+ ScreenshotChannel: "ScreenshotChannel";
302
+ ScreenSharingChannel: "ScreenSharingChannel";
287
303
  }>>>;
288
304
  description: zod.ZodOptional<zod.ZodString>;
289
305
  enabled: zod.ZodOptional<zod.ZodBoolean>;
@@ -307,6 +323,8 @@ export declare const filePoliciesServiceUpdateFilePolicyResponse: zod.ZodObject<
307
323
  MediaChannel: "MediaChannel";
308
324
  KnowledgebaseChannel: "KnowledgebaseChannel";
309
325
  CasesChannel: "CasesChannel";
326
+ ScreenshotChannel: "ScreenshotChannel";
327
+ ScreenSharingChannel: "ScreenSharingChannel";
310
328
  }>>>;
311
329
  createdAt: zod.ZodOptional<zod.ZodString>;
312
330
  createdBy: zod.ZodOptional<zod.ZodObject<{
@@ -1,9 +1,11 @@
1
1
  import type { AxiosRequestConfig, AxiosResponse } from 'axios';
2
- import type { FileServiceSearchFilesParams, StorageDeleteFilesRequest, StorageDeleteFilesResponse, StorageListFile } from '.././_models';
2
+ import type { FileServiceSearchFilesParams, StorageDeleteFilesRequest, StorageDeleteFilesResponse, StorageListFile, StorageUploadP2PVideoRequest, StorageUploadP2PVideoResponse } from '.././_models';
3
3
  export declare const // --- title start
4
4
  getFileService: () => {
5
5
  fileServiceDeleteFiles: <TData = AxiosResponse<StorageDeleteFilesResponse, any>>(storageDeleteFilesRequest: StorageDeleteFilesRequest, options?: AxiosRequestConfig) => Promise<TData>;
6
6
  fileServiceSearchFiles: <TData = AxiosResponse<StorageListFile, any>>(params?: FileServiceSearchFilesParams, options?: AxiosRequestConfig) => Promise<TData>;
7
+ fileServiceUploadP2PVideo: <TData = AxiosResponse<StorageUploadP2PVideoResponse, any>>(storageUploadP2PVideoRequest: StorageUploadP2PVideoRequest, options?: AxiosRequestConfig) => Promise<TData>;
7
8
  };
8
9
  export type FileServiceDeleteFilesResult = AxiosResponse<StorageDeleteFilesResponse>;
9
10
  export type FileServiceSearchFilesResult = AxiosResponse<StorageListFile>;
11
+ export type FileServiceUploadP2PVideoResult = AxiosResponse<StorageUploadP2PVideoResponse>;
@@ -1,7 +1,9 @@
1
1
  import { http } from 'msw';
2
- import type { StorageDeleteFilesResponse, StorageListFile } from '.././_models';
2
+ import type { StorageDeleteFilesResponse, StorageListFile, StorageUploadP2PVideoResponse } from '.././_models';
3
3
  export declare const getFileServiceDeleteFilesResponseMock: () => StorageDeleteFilesResponse;
4
4
  export declare const getFileServiceSearchFilesResponseMock: (overrideResponse?: Partial<StorageListFile>) => StorageListFile;
5
+ export declare const getFileServiceUploadP2PVideoResponseMock: (overrideResponse?: Partial<StorageUploadP2PVideoResponse>) => StorageUploadP2PVideoResponse;
5
6
  export declare const getFileServiceDeleteFilesMockHandler: (overrideResponse?: StorageDeleteFilesResponse | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<StorageDeleteFilesResponse> | StorageDeleteFilesResponse)) => import("msw").HttpHandler;
6
7
  export declare const getFileServiceSearchFilesMockHandler: (overrideResponse?: StorageListFile | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<StorageListFile> | StorageListFile)) => import("msw").HttpHandler;
8
+ export declare const getFileServiceUploadP2PVideoMockHandler: (overrideResponse?: StorageUploadP2PVideoResponse | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<StorageUploadP2PVideoResponse> | StorageUploadP2PVideoResponse)) => import("msw").HttpHandler;
7
9
  export declare const getFileServiceMock: () => import("msw").HttpHandler[];
@@ -29,6 +29,8 @@ export declare const fileServiceSearchFilesQueryParams: zod.ZodObject<{
29
29
  MediaChannel: "MediaChannel";
30
30
  KnowledgebaseChannel: "KnowledgebaseChannel";
31
31
  CasesChannel: "CasesChannel";
32
+ ScreenshotChannel: "ScreenshotChannel";
33
+ ScreenSharingChannel: "ScreenSharingChannel";
32
34
  }>>>;
33
35
  retentionUntilFrom: zod.ZodOptional<zod.ZodString>;
34
36
  retentionUntilTo: zod.ZodOptional<zod.ZodString>;
@@ -45,6 +47,8 @@ export declare const fileServiceSearchFilesResponse: zod.ZodObject<{
45
47
  MediaChannel: "MediaChannel";
46
48
  KnowledgebaseChannel: "KnowledgebaseChannel";
47
49
  CasesChannel: "CasesChannel";
50
+ ScreenshotChannel: "ScreenshotChannel";
51
+ ScreenSharingChannel: "ScreenSharingChannel";
48
52
  }>>;
49
53
  id: zod.ZodOptional<zod.ZodString>;
50
54
  mimeType: zod.ZodOptional<zod.ZodString>;
@@ -68,3 +72,17 @@ export declare const fileServiceSearchFilesResponse: zod.ZodObject<{
68
72
  }, zod.core.$strip>>>;
69
73
  next: zod.ZodOptional<zod.ZodBoolean>;
70
74
  }, zod.core.$strip>;
75
+ export declare const fileServiceUploadP2PVideoBody: zod.ZodObject<{
76
+ iceServers: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
77
+ credential: zod.ZodOptional<zod.ZodString>;
78
+ credentialType: zod.ZodOptional<zod.ZodNumber>;
79
+ urls: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
80
+ username: zod.ZodOptional<zod.ZodString>;
81
+ }, zod.core.$strip>>>;
82
+ name: zod.ZodOptional<zod.ZodString>;
83
+ sdpOffer: zod.ZodOptional<zod.ZodString>;
84
+ uuid: zod.ZodOptional<zod.ZodString>;
85
+ }, zod.core.$strip>;
86
+ export declare const fileServiceUploadP2PVideoResponse: zod.ZodObject<{
87
+ sdpAnswer: zod.ZodOptional<zod.ZodString>;
88
+ }, zod.core.$strip>;
@@ -40,6 +40,7 @@ export declare const searchTriggerResponse: zod.ZodObject<{
40
40
  empty_trigger_object: "empty_trigger_object";
41
41
  case_files: "case_files";
42
42
  case_links: "case_links";
43
+ related_cases: "related_cases";
43
44
  }>>;
44
45
  schema: zod.ZodOptional<zod.ZodObject<{
45
46
  id: zod.ZodOptional<zod.ZodString>;
@@ -83,6 +84,7 @@ export declare const createTriggerBody: zod.ZodObject<{
83
84
  empty_trigger_object: "empty_trigger_object";
84
85
  case_files: "case_files";
85
86
  case_links: "case_links";
87
+ related_cases: "related_cases";
86
88
  }>>;
87
89
  schema: zod.ZodOptional<zod.ZodObject<{
88
90
  id: zod.ZodOptional<zod.ZodString>;
@@ -122,6 +124,7 @@ export declare const createTriggerResponse: zod.ZodObject<{
122
124
  empty_trigger_object: "empty_trigger_object";
123
125
  case_files: "case_files";
124
126
  case_links: "case_links";
127
+ related_cases: "related_cases";
125
128
  }>>;
126
129
  schema: zod.ZodOptional<zod.ZodObject<{
127
130
  id: zod.ZodOptional<zod.ZodString>;
@@ -167,6 +170,7 @@ export declare const deleteTriggerResponse: zod.ZodObject<{
167
170
  empty_trigger_object: "empty_trigger_object";
168
171
  case_files: "case_files";
169
172
  case_links: "case_links";
173
+ related_cases: "related_cases";
170
174
  }>>;
171
175
  schema: zod.ZodOptional<zod.ZodObject<{
172
176
  id: zod.ZodOptional<zod.ZodString>;
@@ -212,6 +216,7 @@ export declare const readTriggerResponse: zod.ZodObject<{
212
216
  empty_trigger_object: "empty_trigger_object";
213
217
  case_files: "case_files";
214
218
  case_links: "case_links";
219
+ related_cases: "related_cases";
215
220
  }>>;
216
221
  schema: zod.ZodOptional<zod.ZodObject<{
217
222
  id: zod.ZodOptional<zod.ZodString>;
@@ -254,6 +259,7 @@ export declare const patchTriggerBody: zod.ZodObject<{
254
259
  empty_trigger_object: "empty_trigger_object";
255
260
  case_files: "case_files";
256
261
  case_links: "case_links";
262
+ related_cases: "related_cases";
257
263
  }>>;
258
264
  schema: zod.ZodOptional<zod.ZodObject<{
259
265
  id: zod.ZodOptional<zod.ZodString>;
@@ -293,6 +299,7 @@ export declare const patchTriggerResponse: zod.ZodObject<{
293
299
  empty_trigger_object: "empty_trigger_object";
294
300
  case_files: "case_files";
295
301
  case_links: "case_links";
302
+ related_cases: "related_cases";
296
303
  }>>;
297
304
  schema: zod.ZodOptional<zod.ZodObject<{
298
305
  id: zod.ZodOptional<zod.ZodString>;
@@ -337,6 +344,7 @@ export declare const updateTriggerBody: zod.ZodObject<{
337
344
  empty_trigger_object: "empty_trigger_object";
338
345
  case_files: "case_files";
339
346
  case_links: "case_links";
347
+ related_cases: "related_cases";
340
348
  }>>;
341
349
  schema: zod.ZodOptional<zod.ZodObject<{
342
350
  id: zod.ZodOptional<zod.ZodString>;
@@ -376,6 +384,7 @@ export declare const updateTriggerResponse: zod.ZodObject<{
376
384
  empty_trigger_object: "empty_trigger_object";
377
385
  case_files: "case_files";
378
386
  case_links: "case_links";
387
+ related_cases: "related_cases";
379
388
  }>>;
380
389
  schema: zod.ZodOptional<zod.ZodObject<{
381
390
  id: zod.ZodOptional<zod.ZodString>;
package/types/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './gen';
2
- export * from './utils/gen';
1
+ export type { ApiServicesConfig } from './config/config';
2
+ export { setConfig } from './config/config';
@@ -0,0 +1,9 @@
1
+ export declare const snakeToCamel: (str: any) => any;
2
+ export declare const camelToSnake: (str: any) => any;
3
+ export declare const kebabToCamel: (str: any) => any;
4
+ export declare const camelToKebab: (str: any) => any;
5
+ export declare const kebabToSnake: (str: any) => any;
6
+ export declare const snakeToKebab: (str: any) => any;
7
+ export declare const objSnakeToCamel: (obj: any, skipKeys?: any[]) => any;
8
+ export declare const objCamelToSnake: (obj: any, skipKeys?: any[]) => any;
9
+ export declare const objCamelToKebab: (obj: any, skipKeys?: any[]) => any;
@@ -0,0 +1 @@
1
+ export * from './caseConverters';
@@ -1,8 +1,2 @@
1
- import type { z } from 'zod/v4';
1
+ export * from './api';
2
2
  export * from './gen';
3
- /**
4
- * @author @dlohvinov
5
- * @description
6
- * Get default value for schema. Could be anything: object with default fields values, or primitive.
7
- */
8
- export declare const getDefaultsFromZodSchema: (schema: z.ZodType, value?: unknown) => unknown;