@webitel/api-services 0.0.86 → 0.0.88

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm run gen:api && npm version patch && (npm run build:types || true) && (npm run format:all || true) && npm run publish-lib",
@@ -79,6 +79,11 @@ export const downloadFile = (id) => {
79
79
  document.body.removeChild(link);
80
80
  };
81
81
 
82
+ export const getCallMediaUrl = (id, { download = false }) => {
83
+ const accessToken = localStorage.getItem('access-token');
84
+ return `${baseUrl}/storage/recordings/${id}/${download ? 'download' : 'stream'}?access_token=${accessToken}`;
85
+ }
86
+
82
87
  export const getMediaUrl = (id, isThumb = false) => {
83
88
  const accessToken = localStorage.getItem('access-token'); // after auth token variable is null
84
89
  const url = `${baseUrl}/storage/file/${id}/stream?access_token=${accessToken}&fetch_thumbnail=${isThumb}`;
@@ -1075,8 +1075,8 @@ export * from './searchRoutingSchemaTypeItem';
1075
1075
  export * from './searchRoutingVariableParams';
1076
1076
  export * from './searchSchemaVariableParams';
1077
1077
  export * from './searchSchemaVersionParams';
1078
- export * from './searchScreenRecordingsByAgentChannel';
1079
1078
  export * from './searchScreenRecordingsByAgentParams';
1079
+ export * from './searchScreenRecordingsByAgentType';
1080
1080
  export * from './searchScreenRecordingsParams';
1081
1081
  export * from './searchScreenRecordingsType';
1082
1082
  export * from './searchSkillAgentParams';
@@ -4,7 +4,7 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
- import type { SearchScreenRecordingsByAgentChannel } from './searchScreenRecordingsByAgentChannel';
7
+ import type { SearchScreenRecordingsByAgentType } from './searchScreenRecordingsByAgentType';
8
8
 
9
9
  export type SearchScreenRecordingsByAgentParams = {
10
10
  page?: number;
@@ -18,8 +18,5 @@ uploadedAtTo?: string;
18
18
  referenceId?: string[];
19
19
  retentionUntilFrom?: string;
20
20
  retentionUntilTo?: string;
21
- /**
22
- * - ScreenRecordingChannel: ScreenshotChannel = 8; // deprecated
23
- */
24
- channel?: SearchScreenRecordingsByAgentChannel;
21
+ type?: SearchScreenRecordingsByAgentType;
25
22
  };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v7.17.0 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+
8
+ export type SearchScreenRecordingsByAgentType = typeof SearchScreenRecordingsByAgentType[keyof typeof SearchScreenRecordingsByAgentType];
9
+
10
+
11
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
12
+ export const SearchScreenRecordingsByAgentType = {
13
+ PDF: 'PDF',
14
+ SCREENSHOT: 'SCREENSHOT',
15
+ SCREENSHARING: 'SCREENSHARING',
16
+ } as const;
@@ -64,7 +64,7 @@ export const searchScreenRecordingsByAgentParams = zod.object({
64
64
  "agent_id": zod.string()
65
65
  })
66
66
 
67
- export const searchScreenRecordingsByAgentQueryChannelDefault = "UnknownChannel";
67
+ export const searchScreenRecordingsByAgentQueryTypeDefault = "PDF";
68
68
 
69
69
  export const searchScreenRecordingsByAgentQueryParams = zod.object({
70
70
  "page": zod.number().optional(),
@@ -78,7 +78,7 @@ export const searchScreenRecordingsByAgentQueryParams = zod.object({
78
78
  "referenceId": zod.array(zod.string()).optional(),
79
79
  "retentionUntilFrom": zod.string().optional(),
80
80
  "retentionUntilTo": zod.string().optional(),
81
- "channel": zod.enum(['UnknownChannel', 'ChatChannel', 'MailChannel', 'CallChannel', 'LogChannel', 'MediaChannel', 'KnowledgebaseChannel', 'CasesChannel', 'ScreenRecordingChannel']).default(searchScreenRecordingsByAgentQueryChannelDefault).describe(' - ScreenRecordingChannel: ScreenshotChannel = 8; // deprecated')
81
+ "type": zod.enum(['PDF', 'SCREENSHOT', 'SCREENSHARING']).default(searchScreenRecordingsByAgentQueryTypeDefault)
82
82
  })
83
83
 
84
84
  export const searchScreenRecordingsByAgentResponseItemsItemChannelDefault = "UnknownChannel";
@@ -1,5 +1,8 @@
1
1
  export declare const downloadMedia: (id: any) => Promise<import("axios").AxiosResponse<any, any, {}>>;
2
2
  export declare const downloadFile: (id: any) => void;
3
+ export declare const getCallMediaUrl: (id: any, { download }: {
4
+ download?: boolean;
5
+ }) => string;
3
6
  export declare const getMediaUrl: (id: any, isThumb?: boolean) => string;
4
7
  export declare const MediaAPI: {
5
8
  getList: (params: any) => Promise<{
@@ -4,7 +4,7 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
- import type { SearchScreenRecordingsByAgentChannel } from './searchScreenRecordingsByAgentChannel';
7
+ import type { SearchScreenRecordingsByAgentType } from './searchScreenRecordingsByAgentType';
8
8
  export type SearchScreenRecordingsByAgentParams = {
9
9
  page?: number;
10
10
  size?: number;
@@ -17,8 +17,5 @@ export type SearchScreenRecordingsByAgentParams = {
17
17
  referenceId?: string[];
18
18
  retentionUntilFrom?: string;
19
19
  retentionUntilTo?: string;
20
- /**
21
- * - ScreenRecordingChannel: ScreenshotChannel = 8; // deprecated
22
- */
23
- channel?: SearchScreenRecordingsByAgentChannel;
20
+ type?: SearchScreenRecordingsByAgentType;
24
21
  };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v7.17.0 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ export type SearchScreenRecordingsByAgentType = typeof SearchScreenRecordingsByAgentType[keyof typeof SearchScreenRecordingsByAgentType];
8
+ export declare const SearchScreenRecordingsByAgentType: {
9
+ readonly PDF: "PDF";
10
+ readonly SCREENSHOT: "SCREENSHOT";
11
+ readonly SCREENSHARING: "SCREENSHARING";
12
+ };
@@ -77,7 +77,7 @@ export declare const searchFilesByCallResponse: zod.ZodObject<{
77
77
  export declare const searchScreenRecordingsByAgentParams: zod.ZodObject<{
78
78
  agent_id: zod.ZodString;
79
79
  }, zod.z.core.$strip>;
80
- export declare const searchScreenRecordingsByAgentQueryChannelDefault = "UnknownChannel";
80
+ export declare const searchScreenRecordingsByAgentQueryTypeDefault = "PDF";
81
81
  export declare const searchScreenRecordingsByAgentQueryParams: zod.ZodObject<{
82
82
  page: zod.ZodOptional<zod.ZodNumber>;
83
83
  size: zod.ZodOptional<zod.ZodNumber>;
@@ -90,16 +90,10 @@ export declare const searchScreenRecordingsByAgentQueryParams: zod.ZodObject<{
90
90
  referenceId: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
91
91
  retentionUntilFrom: zod.ZodOptional<zod.ZodString>;
92
92
  retentionUntilTo: zod.ZodOptional<zod.ZodString>;
93
- channel: zod.ZodDefault<zod.ZodEnum<{
94
- UnknownChannel: "UnknownChannel";
95
- ChatChannel: "ChatChannel";
96
- MailChannel: "MailChannel";
97
- CallChannel: "CallChannel";
98
- LogChannel: "LogChannel";
99
- MediaChannel: "MediaChannel";
100
- KnowledgebaseChannel: "KnowledgebaseChannel";
101
- CasesChannel: "CasesChannel";
102
- ScreenRecordingChannel: "ScreenRecordingChannel";
93
+ type: zod.ZodDefault<zod.ZodEnum<{
94
+ PDF: "PDF";
95
+ SCREENSHOT: "SCREENSHOT";
96
+ SCREENSHARING: "SCREENSHARING";
103
97
  }>>;
104
98
  }, zod.z.core.$strip>;
105
99
  export declare const searchScreenRecordingsByAgentResponseItemsItemChannelDefault = "UnknownChannel";
@@ -1,22 +0,0 @@
1
- /**
2
- * Generated by orval v7.17.0 🍺
3
- * Do not edit manually.
4
- * Webitel API
5
- * OpenAPI spec version: 24.04.0
6
- */
7
-
8
- export type SearchScreenRecordingsByAgentChannel = typeof SearchScreenRecordingsByAgentChannel[keyof typeof SearchScreenRecordingsByAgentChannel];
9
-
10
-
11
- // eslint-disable-next-line @typescript-eslint/no-redeclare
12
- export const SearchScreenRecordingsByAgentChannel = {
13
- UnknownChannel: 'UnknownChannel',
14
- ChatChannel: 'ChatChannel',
15
- MailChannel: 'MailChannel',
16
- CallChannel: 'CallChannel',
17
- LogChannel: 'LogChannel',
18
- MediaChannel: 'MediaChannel',
19
- KnowledgebaseChannel: 'KnowledgebaseChannel',
20
- CasesChannel: 'CasesChannel',
21
- ScreenRecordingChannel: 'ScreenRecordingChannel',
22
- } as const;
@@ -1,18 +0,0 @@
1
- /**
2
- * Generated by orval v7.17.0 🍺
3
- * Do not edit manually.
4
- * Webitel API
5
- * OpenAPI spec version: 24.04.0
6
- */
7
- export type SearchScreenRecordingsByAgentChannel = typeof SearchScreenRecordingsByAgentChannel[keyof typeof SearchScreenRecordingsByAgentChannel];
8
- export declare const SearchScreenRecordingsByAgentChannel: {
9
- readonly UnknownChannel: "UnknownChannel";
10
- readonly ChatChannel: "ChatChannel";
11
- readonly MailChannel: "MailChannel";
12
- readonly CallChannel: "CallChannel";
13
- readonly LogChannel: "LogChannel";
14
- readonly MediaChannel: "MediaChannel";
15
- readonly KnowledgebaseChannel: "KnowledgebaseChannel";
16
- readonly CasesChannel: "CasesChannel";
17
- readonly ScreenRecordingChannel: "ScreenRecordingChannel";
18
- };