@silexpert/core 2.0.42-0 → 2.0.42-zendesk
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/dist/api/resources/zendesk/Ticket.d.ts +11 -0
- package/dist/api/resources/zendesk/Ticket.d.ts.map +1 -0
- package/dist/api/resources/zendesk/Ticket.js +22 -0
- package/dist/api/resources/zendesk/Ticket.js.map +1 -0
- package/dist/api/resources.d.ts +2 -0
- package/dist/api/resources.d.ts.map +1 -1
- package/dist/api/resources.js +2 -0
- package/dist/api/resources.js.map +1 -1
- package/dist/types/Enum/RoleDetail.js +1 -1
- package/dist/types/Enum/RoleDetail.js.map +1 -1
- package/dist/types/Enum/Zendesk.d.ts +40 -0
- package/dist/types/Enum/Zendesk.d.ts.map +1 -0
- package/dist/types/Enum/Zendesk.js +40 -0
- package/dist/types/Enum/Zendesk.js.map +1 -0
- package/dist/types/Interface/api/zendesk/QueryTicket.d.ts +35 -0
- package/dist/types/Interface/api/zendesk/QueryTicket.d.ts.map +1 -0
- package/dist/types/Interface/api/zendesk/QueryTicket.js +215 -0
- package/dist/types/Interface/api/zendesk/QueryTicket.js.map +1 -0
- package/dist/types/Interface/api/zendesk/ReadTicket.d.ts +76 -0
- package/dist/types/Interface/api/zendesk/ReadTicket.d.ts.map +1 -0
- package/dist/types/Interface/api/zendesk/ReadTicket.js +2 -0
- package/dist/types/Interface/api/zendesk/ReadTicket.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/prestation.d.ts +1 -15
- package/dist/utils/prestation.d.ts.map +1 -1
- package/dist/utils/prestation.js +1 -15
- package/dist/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/zendesk/Ticket.ts +36 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/RoleDetail.ts +1 -1
- package/ts/types/Enum/Zendesk.ts +56 -0
- package/ts/types/Interface/api/zendesk/QueryTicket.ts +171 -0
- package/ts/types/Interface/api/zendesk/ReadTicket.ts +85 -0
- package/ts/types/index.ts +3 -0
- package/ts/utils/prestation.ts +0 -24
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ZendeskTicketChannel,
|
|
3
|
+
ZendeskTicketPriority,
|
|
4
|
+
ZendeskTicketStatus,
|
|
5
|
+
ZendeskTicketType,
|
|
6
|
+
} from '#types/Enum/Zendesk.js';
|
|
7
|
+
|
|
8
|
+
export interface TicketZendesk {
|
|
9
|
+
id: number;
|
|
10
|
+
url: string;
|
|
11
|
+
subject: string;
|
|
12
|
+
description: string;
|
|
13
|
+
status: ZendeskTicketStatus;
|
|
14
|
+
priority: ZendeskTicketPriority | null;
|
|
15
|
+
type: ZendeskTicketType | null;
|
|
16
|
+
tags: string[];
|
|
17
|
+
via: { channel: ZendeskTicketChannel };
|
|
18
|
+
requesterId: number;
|
|
19
|
+
assigneeId: number | null;
|
|
20
|
+
groupId: number | null;
|
|
21
|
+
organizationId: number | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SearchZendeskResponse {
|
|
27
|
+
results: TicketZendesk[];
|
|
28
|
+
count: number;
|
|
29
|
+
nextPage: string | null;
|
|
30
|
+
previousPage: string | null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TicketZendeskResponse {
|
|
34
|
+
results: TicketZendesk[];
|
|
35
|
+
count: number;
|
|
36
|
+
nextPage: string | null;
|
|
37
|
+
previousPage: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CustomFieldZendeskOption {
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
rawName: string;
|
|
44
|
+
value: string;
|
|
45
|
+
default: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface TicketFieldZendesk {
|
|
49
|
+
id: number;
|
|
50
|
+
url: string;
|
|
51
|
+
type: string;
|
|
52
|
+
title: string;
|
|
53
|
+
rawTitle: string;
|
|
54
|
+
description: string;
|
|
55
|
+
position: number;
|
|
56
|
+
active: boolean;
|
|
57
|
+
required: boolean;
|
|
58
|
+
requiredInPortal: boolean;
|
|
59
|
+
visibleInPortal: boolean;
|
|
60
|
+
editableInPortal: boolean;
|
|
61
|
+
tag: string | null;
|
|
62
|
+
customFieldOptions: CustomFieldZendeskOption[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface TicketFormZendesk {
|
|
66
|
+
id: number;
|
|
67
|
+
url: string;
|
|
68
|
+
name: string;
|
|
69
|
+
rawName: string;
|
|
70
|
+
displayName: string;
|
|
71
|
+
rawDisplayName: string;
|
|
72
|
+
endUserVisible: boolean;
|
|
73
|
+
position: number;
|
|
74
|
+
active: boolean;
|
|
75
|
+
default: boolean;
|
|
76
|
+
inAllBrands: boolean;
|
|
77
|
+
restrictedBrandIds: number[];
|
|
78
|
+
ticketFieldIds: number[];
|
|
79
|
+
createdAt: string;
|
|
80
|
+
updatedAt: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface TicketFormEnriched extends Omit<TicketFormZendesk, 'ticketFieldIds'> {
|
|
84
|
+
fields: TicketFieldZendesk[];
|
|
85
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -494,6 +494,7 @@ export * from './Enum/EquipmentAvailability.js';
|
|
|
494
494
|
export * from './Enum/SpecialDayType.js';
|
|
495
495
|
export * from './Enum/Degree.js';
|
|
496
496
|
export * from './Enum/Brevo.js';
|
|
497
|
+
export * from './Enum/Zendesk.js';
|
|
497
498
|
export * from './Enum/ZoneCode.js';
|
|
498
499
|
export * from './Enum/TimeSlot.js';
|
|
499
500
|
export * from './Enum/StateSynchro.js';
|
|
@@ -820,6 +821,8 @@ export * from './Interface/api/loan/ReadLoan.js';
|
|
|
820
821
|
export * from './Interface/api/stock/StocksType.js';
|
|
821
822
|
export * from './Interface/api/lettering/QueryRegroupLettering.js';
|
|
822
823
|
export * from './Interface/api/loan/UpdateLoan.js';
|
|
824
|
+
export * from './Interface/api/zendesk/QueryTicket.js';
|
|
825
|
+
export * from './Interface/api/zendesk/ReadTicket.js';
|
|
823
826
|
export * from './Interface/api/zticket/CreateZTicket.js';
|
|
824
827
|
export * from './Interface/api/zticket/QueryZTicket.js';
|
|
825
828
|
export * from './Interface/api/balanceSheetModule/CreateBalanceSheetModule.js';
|
package/ts/utils/prestation.ts
CHANGED
|
@@ -156,28 +156,6 @@ const isSoftwarePrestation = (idPrestationList: number[]): boolean =>
|
|
|
156
156
|
.length; /* &&
|
|
157
157
|
idPrestationList.length === 1 */ // Commenté car si un client résilie un software pour un utre software, condition non prise en charge
|
|
158
158
|
|
|
159
|
-
/**
|
|
160
|
-
* Retourne la première prestation comptable non catalogue trouvée dans une liste.
|
|
161
|
-
*
|
|
162
|
-
* @param prestationsList Liste de prestations de référence.
|
|
163
|
-
* @returns La prestation comptable non catalogue, ou undefined si aucune n'est trouvée.
|
|
164
|
-
*/
|
|
165
|
-
const getComptableNotCatalogPrestation = (
|
|
166
|
-
prestationsList: Array<Partial<IPrestationList>>,
|
|
167
|
-
): Partial<IPrestationList> | undefined =>
|
|
168
|
-
prestationsList.find((prestation) => !!prestation.isComptable && !prestation.isCatalog);
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Retourne la première prestation comptable (isPlannable) trouvée dans la liste.
|
|
172
|
-
*
|
|
173
|
-
* @param prestationsList Liste de prestations de référence.
|
|
174
|
-
* @returns La prestation comptable, ou undefined si aucune n'est trouvée.
|
|
175
|
-
*/
|
|
176
|
-
const getAccountingPrestation = (
|
|
177
|
-
prestationsList: Array<Partial<IPrestationList>>,
|
|
178
|
-
): Partial<IPrestationList> | undefined =>
|
|
179
|
-
prestationsList.find((prestation) => !!prestation.isPlannable);
|
|
180
|
-
|
|
181
159
|
const calculateScoringOfPrestation = (
|
|
182
160
|
idPrestationType: PrestationType,
|
|
183
161
|
prestations: IPrestation[],
|
|
@@ -660,8 +638,6 @@ export {
|
|
|
660
638
|
isExpress,
|
|
661
639
|
isConsultingHour,
|
|
662
640
|
isSoftwarePrestation,
|
|
663
|
-
getComptableNotCatalogPrestation,
|
|
664
|
-
getAccountingPrestation,
|
|
665
641
|
calculateScoringOfPrestation,
|
|
666
642
|
calculatePrestationPrice,
|
|
667
643
|
getPrestationOptions,
|