@webitel/api-services 26.12.32 → 26.12.34

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 (40) hide show
  1. package/package.json +1 -1
  2. package/src/api/clients/blacklists/blacklistNumbers.ts +5 -1
  3. package/src/api/clients/devices/devices.ts +9 -2
  4. package/src/api/clients/media/media.ts +15 -2
  5. package/src/api/clients/outboundResources/resourceDisplays.ts +5 -1
  6. package/src/api/clients/queues/queueMembers.ts +13 -1
  7. package/src/api/clients/users/users.ts +9 -2
  8. package/src/api/transformers/index.ts +2 -1
  9. package/src/api/transformers/notify/__tests__/notify.spec.ts +65 -0
  10. package/src/api/transformers/notify/__tests__/notifyServerError.spec.ts +43 -0
  11. package/src/api/transformers/notify/notify.transformer.ts +33 -2
  12. package/src/locale/en/en.ts +4 -0
  13. package/src/locale/es/es.ts +4 -0
  14. package/src/locale/kz/kz.ts +4 -0
  15. package/src/locale/pl/pl.ts +4 -0
  16. package/src/locale/ro/ro.ts +4 -0
  17. package/src/locale/ru/ru.ts +4 -0
  18. package/src/locale/uk/uk.ts +4 -0
  19. package/src/locale/uz/uz.ts +4 -0
  20. package/src/locale/vi/vi.ts +4 -0
  21. package/types/.tsbuildinfo +1 -1
  22. package/types/api/clients/blacklists/blacklistNumbers.d.ts +2 -1
  23. package/types/api/clients/devices/devices.d.ts +3 -1
  24. package/types/api/clients/media/media.d.ts +4 -1
  25. package/types/api/clients/outboundResources/resourceDisplays.d.ts +2 -1
  26. package/types/api/clients/queues/queueMembers.d.ts +3 -1
  27. package/types/api/clients/users/users.d.ts +3 -1
  28. package/types/api/transformers/index.d.ts +2 -2
  29. package/types/api/transformers/notify/notify.transformer.d.ts +5 -0
  30. package/types/gen-wire/trigger-service/trigger-service.zod.d.ts +9 -9
  31. package/types/locale/en/en.d.ts +3 -0
  32. package/types/locale/es/es.d.ts +3 -0
  33. package/types/locale/index.d.ts +27 -0
  34. package/types/locale/kz/kz.d.ts +3 -0
  35. package/types/locale/pl/pl.d.ts +3 -0
  36. package/types/locale/ro/ro.d.ts +3 -0
  37. package/types/locale/ru/ru.d.ts +3 -0
  38. package/types/locale/uk/uk.d.ts +3 -0
  39. package/types/locale/uz/uz.d.ts +3 -0
  40. package/types/locale/vi/vi.d.ts +3 -0
@@ -6,9 +6,10 @@ export declare const BlacklistNumbersAPI: {
6
6
  }>;
7
7
  get: ({ parentId, itemId: id, }: NestedGetItemParams) => Promise<any>;
8
8
  add: ({ parentId, itemInstance, }: NestedAddItemParams) => Promise<any>;
9
- addBulk: ({ parentId, items, }: {
9
+ addBulk: ({ parentId, items, notifyNetworkError, }: {
10
10
  parentId: ApiId;
11
11
  items: ApiParams[];
12
+ notifyNetworkError?: boolean;
12
13
  }) => Promise<any>;
13
14
  update: ({ parentId, itemInstance, itemId: id, }: NestedUpdateItemParams) => Promise<any>;
14
15
  delete: ({ parentId, id, }: NestedDeleteItemParams) => Promise<any>;
@@ -16,7 +16,9 @@ export declare const DevicesAPI: {
16
16
  next: any;
17
17
  }>;
18
18
  get: ({ itemId: id }: GetItemParams) => Promise<any>;
19
- add: ({ itemInstance }: AddItemParams) => Promise<any>;
19
+ add: ({ itemInstance, notifyNetworkError, }: AddItemParams & {
20
+ notifyNetworkError?: boolean;
21
+ }) => Promise<any>;
20
22
  update: ({ itemInstance, itemId: id }: UpdateItemParams) => Promise<any>;
21
23
  delete: ({ id }: DeleteItemParams) => Promise<any>;
22
24
  getLookup: (params: Parameters<typeof getDevicesList>[0]) => Promise<{
@@ -36,7 +36,10 @@ export declare const MediaAPI: {
36
36
  items: any;
37
37
  next: any;
38
38
  }>;
39
- upload: (files: File[]) => Promise<any>;
39
+ upload: (files: File[], { notifySuccess, notifyNetworkError, }?: {
40
+ notifySuccess?: boolean;
41
+ notifyNetworkError?: boolean;
42
+ }) => Promise<any>;
40
43
  generateTts: (params: TextToSpeechParams) => Promise<Blob>;
41
44
  delete: ({ id }: DeleteItemParams) => Promise<any>;
42
45
  getLookup: (params: Parameters<typeof getMediaList>[0]) => Promise<{
@@ -8,7 +8,8 @@ export declare const ResourceDisplaysAPI: {
8
8
  add: ({ parentId, itemInstance, }: NestedAddItemParams) => Promise<any>;
9
9
  update: ({ parentId, itemInstance, itemId: id, }: NestedUpdateItemParams) => Promise<any>;
10
10
  delete: ({ parentId, id, }: NestedDeleteItemParams) => Promise<any>;
11
- upload: ({ parentId, file, delimiter, map, }: {
11
+ upload: ({ parentId, file, delimiter, map, notifyNetworkError, }: {
12
+ notifyNetworkError?: boolean;
12
13
  parentId: ApiId;
13
14
  file: File;
14
15
  delimiter: string;
@@ -22,10 +22,12 @@ export declare const QueueMembersAPI: {
22
22
  }) => Promise<number>;
23
23
  get: ({ parentId, itemId: id }: NestedGetItemParams) => Promise<any>;
24
24
  add: ({ parentId, itemInstance }: NestedAddItemParams) => Promise<any>;
25
- addBulk: ({ parentId, fileName, items, }: {
25
+ addBulk: ({ parentId, fileName, items, notifySuccess, notifyNetworkError, }: {
26
+ notifyNetworkError?: boolean;
26
27
  parentId: ApiId;
27
28
  fileName: string;
28
29
  items: ApiParams[];
30
+ notifySuccess?: boolean;
29
31
  }) => Promise<any>;
30
32
  update: ({ itemInstance, itemId: id, parentId, }: NestedUpdateItemParams) => Promise<any>;
31
33
  delete: ({ parentId, id }: NestedDeleteItemParams) => Promise<any>;
@@ -16,7 +16,9 @@ export declare const UsersAPI: {
16
16
  next: any;
17
17
  }>;
18
18
  get: ({ itemId: id }: GetItemParams) => Promise<any>;
19
- add: ({ itemInstance }: AddItemParams) => Promise<any>;
19
+ add: ({ itemInstance, notifyNetworkError, }: AddItemParams & {
20
+ notifyNetworkError?: boolean;
21
+ }) => Promise<any>;
20
22
  patch: ({ changes, id }: PatchItemParams) => Promise<any>;
21
23
  update: ({ itemInstance, itemId: id }: UpdateItemParams) => Promise<any>;
22
24
  delete: ({ id }: DeleteItemParams) => Promise<any>;
@@ -5,7 +5,7 @@ import generateUrl from './generateUrl/generateUrl.transformer';
5
5
  import log from './log/log.transformer';
6
6
  import merge from './merge/merge.transformer';
7
7
  import mergeEach from './mergeEach/mergeEach.transformer';
8
- import notify from './notify/notify.transformer';
8
+ import notify, { notifyServerError } from './notify/notify.transformer';
9
9
  import sanitize from './sanitize/sanitize.transformer';
10
10
  import sanitizeToWire from './sanitizeToWire/sanitizeToWire.transformer';
11
11
  import { skipIf } from './skipIf/skipIf';
@@ -13,4 +13,4 @@ import snakeToCamel from './snakeToCamel/snakeToCamel.transformer';
13
13
  import starToSearch from './starToSearch/starToSearch.transformer';
14
14
  import toWireParams from './toWireParams/toWireParams.transformer';
15
15
  import translateError from './translateError/translateError.transformer';
16
- export { addQueryParamsToUrl, applyTransform, camelToSnake, generateUrl, log, merge, mergeEach, notify, sanitize, sanitizeToWire, skipIf, snakeToCamel, starToSearch, toWireParams, translateError, };
16
+ export { addQueryParamsToUrl, applyTransform, camelToSnake, generateUrl, log, merge, mergeEach, notify, notifyServerError, sanitize, sanitizeToWire, skipIf, snakeToCamel, starToSearch, toWireParams, translateError, };
@@ -8,4 +8,9 @@ type StaticNotification = (payload: {
8
8
  }) => void;
9
9
  declare function notifyTransformer(notificationObject: StaticNotification): Transformer;
10
10
  declare function notifyTransformer<T>(notificationObject: T): T;
11
+ /**
12
+ * [Claude] like notify, but silent for network errors (no server response, e.g. offline):
13
+ * for callers that show their own localized error, so the user doesn't also get "AxiosError: Network Error" (WTEL-11052)
14
+ */
15
+ export declare const notifyServerError: <T>(error: T) => T;
11
16
  export default notifyTransformer;
@@ -54,9 +54,9 @@ export declare const SearchTriggerResponse: zod.ZodObject<{
54
54
  name: zod.ZodOptional<zod.ZodString>;
55
55
  }, zod.z.core.$strip>>;
56
56
  type: zod.ZodDefault<zod.ZodEnum<{
57
+ event: "event";
57
58
  default_trigger_type: "default_trigger_type";
58
59
  cron: "cron";
59
- event: "event";
60
60
  }>>;
61
61
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
62
62
  }, zod.z.core.$strip>>>;
@@ -100,9 +100,9 @@ export declare const CreateTriggerBody: zod.ZodObject<{
100
100
  name: zod.ZodOptional<zod.ZodString>;
101
101
  }, zod.z.core.$strip>>;
102
102
  type: zod.ZodDefault<zod.ZodEnum<{
103
+ event: "event";
103
104
  default_trigger_type: "default_trigger_type";
104
105
  cron: "cron";
105
- event: "event";
106
106
  }>>;
107
107
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
108
108
  }, zod.z.core.$strip>;
@@ -142,9 +142,9 @@ export declare const CreateTriggerResponse: zod.ZodObject<{
142
142
  name: zod.ZodOptional<zod.ZodString>;
143
143
  }, zod.z.core.$strip>>;
144
144
  type: zod.ZodDefault<zod.ZodEnum<{
145
+ event: "event";
145
146
  default_trigger_type: "default_trigger_type";
146
147
  cron: "cron";
147
- event: "event";
148
148
  }>>;
149
149
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
150
150
  }, zod.z.core.$strip>;
@@ -190,9 +190,9 @@ export declare const DeleteTriggerResponse: zod.ZodObject<{
190
190
  name: zod.ZodOptional<zod.ZodString>;
191
191
  }, zod.z.core.$strip>>;
192
192
  type: zod.ZodDefault<zod.ZodEnum<{
193
+ event: "event";
193
194
  default_trigger_type: "default_trigger_type";
194
195
  cron: "cron";
195
- event: "event";
196
196
  }>>;
197
197
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
198
198
  }, zod.z.core.$strip>;
@@ -238,9 +238,9 @@ export declare const ReadTriggerResponse: zod.ZodObject<{
238
238
  name: zod.ZodOptional<zod.ZodString>;
239
239
  }, zod.z.core.$strip>>;
240
240
  type: zod.ZodDefault<zod.ZodEnum<{
241
+ event: "event";
241
242
  default_trigger_type: "default_trigger_type";
242
243
  cron: "cron";
243
- event: "event";
244
244
  }>>;
245
245
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
246
246
  }, zod.z.core.$strip>;
@@ -283,9 +283,9 @@ export declare const PatchTriggerBody: zod.ZodObject<{
283
283
  name: zod.ZodOptional<zod.ZodString>;
284
284
  }, zod.z.core.$strip>>;
285
285
  type: zod.ZodDefault<zod.ZodEnum<{
286
+ event: "event";
286
287
  default_trigger_type: "default_trigger_type";
287
288
  cron: "cron";
288
- event: "event";
289
289
  }>>;
290
290
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
291
291
  }, zod.z.core.$strip>;
@@ -325,9 +325,9 @@ export declare const PatchTriggerResponse: zod.ZodObject<{
325
325
  name: zod.ZodOptional<zod.ZodString>;
326
326
  }, zod.z.core.$strip>>;
327
327
  type: zod.ZodDefault<zod.ZodEnum<{
328
+ event: "event";
328
329
  default_trigger_type: "default_trigger_type";
329
330
  cron: "cron";
330
- event: "event";
331
331
  }>>;
332
332
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
333
333
  }, zod.z.core.$strip>;
@@ -372,9 +372,9 @@ export declare const UpdateTriggerBody: zod.ZodObject<{
372
372
  name: zod.ZodOptional<zod.ZodString>;
373
373
  }, zod.z.core.$strip>>;
374
374
  type: zod.ZodDefault<zod.ZodEnum<{
375
+ event: "event";
375
376
  default_trigger_type: "default_trigger_type";
376
377
  cron: "cron";
377
- event: "event";
378
378
  }>>;
379
379
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
380
380
  }, zod.z.core.$strip>;
@@ -414,9 +414,9 @@ export declare const UpdateTriggerResponse: zod.ZodObject<{
414
414
  name: zod.ZodOptional<zod.ZodString>;
415
415
  }, zod.z.core.$strip>>;
416
416
  type: zod.ZodDefault<zod.ZodEnum<{
417
+ event: "event";
417
418
  default_trigger_type: "default_trigger_type";
418
419
  cron: "cron";
419
- event: "event";
420
420
  }>>;
421
421
  variables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
422
422
  }, zod.z.core.$strip>;
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -9,6 +9,9 @@ import uz from './uz/uz';
9
9
  import vi from './vi/vi';
10
10
  export declare const messages: {
11
11
  en: {
12
+ requestErrors: {
13
+ connection: string;
14
+ };
12
15
  backendErrors: {
13
16
  sip: {
14
17
  gateway: {
@@ -87,6 +90,9 @@ export declare const messages: {
87
90
  };
88
91
  };
89
92
  uk: {
93
+ requestErrors: {
94
+ connection: string;
95
+ };
90
96
  backendErrors: {
91
97
  sip: {
92
98
  gateway: {
@@ -165,6 +171,9 @@ export declare const messages: {
165
171
  };
166
172
  };
167
173
  ru: {
174
+ requestErrors: {
175
+ connection: string;
176
+ };
168
177
  backendErrors: {
169
178
  sip: {
170
179
  gateway: {
@@ -243,6 +252,9 @@ export declare const messages: {
243
252
  };
244
253
  };
245
254
  es: {
255
+ requestErrors: {
256
+ connection: string;
257
+ };
246
258
  backendErrors: {
247
259
  sip: {
248
260
  gateway: {
@@ -321,6 +333,9 @@ export declare const messages: {
321
333
  };
322
334
  };
323
335
  pl: {
336
+ requestErrors: {
337
+ connection: string;
338
+ };
324
339
  backendErrors: {
325
340
  sip: {
326
341
  gateway: {
@@ -399,6 +414,9 @@ export declare const messages: {
399
414
  };
400
415
  };
401
416
  ro: {
417
+ requestErrors: {
418
+ connection: string;
419
+ };
402
420
  backendErrors: {
403
421
  sip: {
404
422
  gateway: {
@@ -477,6 +495,9 @@ export declare const messages: {
477
495
  };
478
496
  };
479
497
  kz: {
498
+ requestErrors: {
499
+ connection: string;
500
+ };
480
501
  backendErrors: {
481
502
  sip: {
482
503
  gateway: {
@@ -555,6 +576,9 @@ export declare const messages: {
555
576
  };
556
577
  };
557
578
  uz: {
579
+ requestErrors: {
580
+ connection: string;
581
+ };
558
582
  backendErrors: {
559
583
  sip: {
560
584
  gateway: {
@@ -633,6 +657,9 @@ export declare const messages: {
633
657
  };
634
658
  };
635
659
  vi: {
660
+ requestErrors: {
661
+ connection: string;
662
+ };
636
663
  backendErrors: {
637
664
  sip: {
638
665
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {
@@ -1,5 +1,8 @@
1
1
  import type { MessageContext } from 'vue-i18n';
2
2
  declare const _default: {
3
+ requestErrors: {
4
+ connection: string;
5
+ };
3
6
  backendErrors: {
4
7
  sip: {
5
8
  gateway: {