@silexpert/core 2.0.58 → 2.0.59-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.
Files changed (50) hide show
  1. package/dist/api/resources/Docoon.d.ts +2 -2
  2. package/dist/api/resources/Docoon.d.ts.map +1 -1
  3. package/dist/api/resources/Docoon.js +2 -2
  4. package/dist/api/resources/Docoon.js.map +1 -1
  5. package/dist/api/resources/zendesk/Ticket.d.ts +12 -0
  6. package/dist/api/resources/zendesk/Ticket.d.ts.map +1 -0
  7. package/dist/api/resources/zendesk/Ticket.js +40 -0
  8. package/dist/api/resources/zendesk/Ticket.js.map +1 -0
  9. package/dist/api/resources.d.ts +2 -0
  10. package/dist/api/resources.d.ts.map +1 -1
  11. package/dist/api/resources.js +2 -0
  12. package/dist/api/resources.js.map +1 -1
  13. package/dist/types/Enum/Kyc.d.ts +9 -0
  14. package/dist/types/Enum/Kyc.d.ts.map +1 -0
  15. package/dist/types/Enum/Kyc.js +10 -0
  16. package/dist/types/Enum/Kyc.js.map +1 -0
  17. package/dist/types/Enum/Zendesk.d.ts +40 -0
  18. package/dist/types/Enum/Zendesk.d.ts.map +1 -0
  19. package/dist/types/Enum/Zendesk.js +40 -0
  20. package/dist/types/Enum/Zendesk.js.map +1 -0
  21. package/dist/types/Interface/api/docoon/Query.d.ts +3 -0
  22. package/dist/types/Interface/api/docoon/Query.d.ts.map +1 -1
  23. package/dist/types/Interface/api/docoon/Query.js +9 -0
  24. package/dist/types/Interface/api/docoon/Query.js.map +1 -1
  25. package/dist/types/Interface/api/docoon/Read.d.ts +1 -1
  26. package/dist/types/Interface/api/docoon/Read.d.ts.map +1 -1
  27. package/dist/types/Interface/api/docoon/Read.js.map +1 -1
  28. package/dist/types/Interface/api/zendesk/QueryTicket.d.ts +39 -0
  29. package/dist/types/Interface/api/zendesk/QueryTicket.d.ts.map +1 -0
  30. package/dist/types/Interface/api/zendesk/QueryTicket.js +244 -0
  31. package/dist/types/Interface/api/zendesk/QueryTicket.js.map +1 -0
  32. package/dist/types/Interface/api/zendesk/ReadTicket.d.ts +99 -0
  33. package/dist/types/Interface/api/zendesk/ReadTicket.d.ts.map +1 -0
  34. package/dist/types/Interface/api/zendesk/ReadTicket.js +2 -0
  35. package/dist/types/Interface/api/zendesk/ReadTicket.js.map +1 -0
  36. package/dist/types/index.d.ts +4 -0
  37. package/dist/types/index.d.ts.map +1 -1
  38. package/dist/types/index.js +4 -0
  39. package/dist/types/index.js.map +1 -1
  40. package/package.json +1 -1
  41. package/ts/api/resources/Docoon.ts +3 -2
  42. package/ts/api/resources/zendesk/Ticket.ts +58 -0
  43. package/ts/api/resources.ts +2 -0
  44. package/ts/types/Enum/Kyc.ts +8 -0
  45. package/ts/types/Enum/Zendesk.ts +56 -0
  46. package/ts/types/Interface/api/docoon/Query.ts +7 -0
  47. package/ts/types/Interface/api/docoon/Read.ts +1 -1
  48. package/ts/types/Interface/api/zendesk/QueryTicket.ts +192 -0
  49. package/ts/types/Interface/api/zendesk/ReadTicket.ts +110 -0
  50. package/ts/types/index.ts +4 -0
@@ -4,6 +4,7 @@ import {
4
4
  ReadDocoonDirectoryLineAdded,
5
5
  ReadDocoonTenantDirectoryLines,
6
6
  RelaunchDirectoryLine,
7
+ QueryDirectoryLineById,
7
8
  } from '../../types/index.js';
8
9
  import { Resource } from '../Resource.js';
9
10
 
@@ -16,8 +17,8 @@ export class Docoon extends Resource {
16
17
  return this.axios.$get(`/societies/${idSociety}/docoon/directory-line`, { params });
17
18
  }
18
19
 
19
- getDirectoryLinesById(idSociety: number): Promise<ReadDocoonTenantDirectoryLines> {
20
- return this.axios.$get(`/societies/${idSociety}/docoon/tenant/directory-line`, {});
20
+ getDirectoryLinesById(idSociety: number, params: QueryDirectoryLineById): Promise<ReadDocoonTenantDirectoryLines> {
21
+ return this.axios.$get(`/societies/${idSociety}/docoon/tenant/directory-line`, { params });
21
22
  }
22
23
 
23
24
  relaunchDirectoryLine(params: RelaunchDirectoryLine): Promise<ReadDocoonDirectoryLineAdded> {
@@ -0,0 +1,58 @@
1
+ import {
2
+ CreateZendeskTicket,
3
+ UpdateZendeskTicket,
4
+ ListZendeskTickets,
5
+ TicketZendeskResponse,
6
+ SearchZendeskResponse,
7
+ TicketFormEnriched,
8
+ TicketZendesk,
9
+ } from '../../../index.js';
10
+ import { Resource } from '../../Resource.js';
11
+
12
+ export class ZendeskTicket extends Resource {
13
+ getPaginate(query: ListZendeskTickets): Promise<TicketZendeskResponse | SearchZendeskResponse> {
14
+ return this.axios.$get('connectors/zendesk/tickets', { params: query });
15
+ }
16
+
17
+ getForms(): Promise<TicketFormEnriched[]> {
18
+ return this.axios.$get('connectors/zendesk/tickets/forms');
19
+ }
20
+
21
+ get(id: number): Promise<TicketZendesk> {
22
+ return this.axios.$get(`connectors/zendesk/tickets/${id}`);
23
+ }
24
+
25
+ create(data: CreateZendeskTicket, file?: File): Promise<TicketZendesk> {
26
+ const formData = new FormData();
27
+ Object.entries(data).forEach(([key, value]) => {
28
+ if (value) {
29
+ formData.append(key, `${value}`);
30
+ }
31
+ });
32
+
33
+ if (file) {
34
+ formData.append('file', file);
35
+ }
36
+
37
+ return this.axios.$post('connectors/zendesk/tickets', formData, {
38
+ headers: { 'Content-Type': 'multipart/form-data' },
39
+ });
40
+ }
41
+
42
+ update(id: number, data: UpdateZendeskTicket): Promise<TicketZendesk> {
43
+ return this.axios.$put(`connectors/zendesk/tickets/${id}`, data);
44
+ }
45
+
46
+ delete(id: number): Promise<void> {
47
+ return this.axios.$delete(`connectors/zendesk/tickets/${id}`);
48
+ }
49
+
50
+ uploadAttachment(file: File): Promise<string> {
51
+ const formData = new FormData();
52
+ formData.append('file', file);
53
+
54
+ return this.axios.$post(`connectors/zendesk/tickets/upload`, formData, {
55
+ headers: { 'Content-Type': 'multipart/form-data' },
56
+ });
57
+ }
58
+ }
@@ -191,6 +191,7 @@ import { Acd } from './resources/Acd.js';
191
191
  import { UsersHistory } from './resources/UsersHistory.js';
192
192
  import { Zendesk } from './resources/zendesk/Zendesk.js';
193
193
  import { Formalism } from './resources/Formalism.js';
194
+ import { ZendeskTicket } from './resources/zendesk/Ticket.js';
194
195
  import { Vialink } from './resources/Vialink.js';
195
196
  import { KycMandate } from './resources/KycMandate.js';
196
197
 
@@ -388,6 +389,7 @@ export const resources = {
388
389
  acd: Acd,
389
390
  zendesk: Zendesk,
390
391
  formalism: Formalism,
392
+ zendeskTicket: ZendeskTicket,
391
393
  vialink: Vialink,
392
394
  kycMandate: KycMandate,
393
395
  };
@@ -0,0 +1,8 @@
1
+ export enum MandateStatus {
2
+ PASS = 'PASS',
3
+ REJECTED_FROM_KYC_PROCESS = 'REJECTED_FROM_KYC_PROCESS',
4
+ REJECTED_PARTICIPANT = 'REJECTED_PARTICIPANT',
5
+ REJECTED_ATTACHED_MANDATE_LEGAL_ENTITY = 'REJECTED_ATTACHED_MANDATE_LEGAL_ENTITY',
6
+ REJECTED_STEP = 'REJECTED_STEP',
7
+ REJECTED_DUPLICATE = 'REJECTED_DUPLICATE',
8
+ }
@@ -0,0 +1,56 @@
1
+ export type ZendeskTicketStatus = 'new' | 'open' | 'pending' | 'hold' | 'solved' | 'closed';
2
+ export type ZendeskTicketPriority = 'urgent' | 'high' | 'normal' | 'low';
3
+ export type ZendeskTicketType = 'problem' | 'incident' | 'question' | 'task';
4
+ export type ZendeskTicketChannel =
5
+ | 'api'
6
+ | 'chat'
7
+ | 'email'
8
+ | 'facebook'
9
+ | 'mobile'
10
+ | 'native_messaging'
11
+ | 'sample_ticket'
12
+ | 'sms'
13
+ | 'twitter'
14
+ | 'voice'
15
+ | 'web'
16
+ | 'web_service'
17
+ | 'whatsapp';
18
+
19
+ export enum ZendeskTicketStatusEnum {
20
+ NEW = 'new',
21
+ OPEN = 'open',
22
+ PENDING = 'pending',
23
+ HOLD = 'hold',
24
+ SOLVED = 'solved',
25
+ CLOSED = 'closed',
26
+ }
27
+
28
+ export enum ZendeskTicketPriorityEnum {
29
+ URGENT = 'urgent',
30
+ HIGH = 'high',
31
+ NORMAL = 'normal',
32
+ LOW = 'low',
33
+ }
34
+
35
+ export enum ZendeskTicketTypeEnum {
36
+ PROBLEM = 'problem',
37
+ INCIDENT = 'incident',
38
+ QUESTION = 'question',
39
+ TASK = 'task',
40
+ }
41
+
42
+ export enum ZendeskTicketChannelEnum {
43
+ API = 'api',
44
+ CHAT = 'chat',
45
+ EMAIL = 'email',
46
+ FACEBOOK = 'facebook',
47
+ MOBILE = 'mobile',
48
+ NATIVE_MESSAGING = 'native_messaging',
49
+ SAMPLE_TICKET = 'sample_ticket',
50
+ SMS = 'sms',
51
+ TWITTER = 'twitter',
52
+ VOICE = 'voice',
53
+ WEB = 'web',
54
+ WEB_SERVICE = 'web_service',
55
+ WHATSAPP = 'whatsapp',
56
+ }
@@ -10,3 +10,10 @@ export class QueryDirectoryLine {
10
10
  @IsOptional()
11
11
  offset?: number;
12
12
  }
13
+
14
+ export class QueryDirectoryLineById {
15
+ @ApiPropertyOptional()
16
+ @IsString()
17
+ @IsOptional()
18
+ directoryLineId?: string;
19
+ }
@@ -170,7 +170,7 @@ export interface ReadDocoonLegalEntityListResponse {
170
170
 
171
171
  export interface ReadDocoonLegalEntityResponse {
172
172
  data: {
173
- legalEntityItems: ReadDocoonLegalEntity[];
173
+ addLegalEntity: ReadDocoonLegalEntity;
174
174
  };
175
175
  }
176
176
 
@@ -0,0 +1,192 @@
1
+ import {
2
+ IsString,
3
+ IsNotEmpty,
4
+ IsOptional,
5
+ IsEnum,
6
+ IsArray,
7
+ IsNumber,
8
+ MinLength,
9
+ IsInt,
10
+ Min,
11
+ Max,
12
+ } from 'class-validator';
13
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
14
+ import {
15
+ ZendeskTicketChannel,
16
+ ZendeskTicketChannelEnum,
17
+ ZendeskTicketPriority,
18
+ ZendeskTicketPriorityEnum,
19
+ ZendeskTicketStatus,
20
+ ZendeskTicketStatusEnum,
21
+ ZendeskTicketType,
22
+ ZendeskTicketTypeEnum,
23
+ } from '../../../../types/Enum/Zendesk.js';
24
+
25
+ export class CreateZendeskTicket {
26
+ @ApiProperty()
27
+ @IsString()
28
+ @IsNotEmpty()
29
+ @MinLength(3)
30
+ subject: string;
31
+
32
+ @ApiProperty()
33
+ @IsString()
34
+ @IsNotEmpty()
35
+ body: string;
36
+
37
+ @ApiPropertyOptional()
38
+ @IsOptional()
39
+ @IsArray()
40
+ @IsString({ each: true })
41
+ attachments?: string[];
42
+
43
+ @ApiPropertyOptional()
44
+ @IsOptional()
45
+ @IsEnum(ZendeskTicketStatusEnum)
46
+ status?: ZendeskTicketStatus;
47
+
48
+ @ApiPropertyOptional()
49
+ @IsOptional()
50
+ @IsEnum(ZendeskTicketPriorityEnum)
51
+ priority?: ZendeskTicketPriority;
52
+
53
+ @ApiPropertyOptional()
54
+ @IsOptional()
55
+ @IsEnum(ZendeskTicketTypeEnum)
56
+ type?: ZendeskTicketType;
57
+
58
+ @ApiPropertyOptional()
59
+ @IsOptional()
60
+ @IsArray()
61
+ @IsString({ each: true })
62
+ tags?: string[];
63
+
64
+ @ApiPropertyOptional()
65
+ @IsOptional()
66
+ @IsNumber()
67
+ requesterId?: number;
68
+
69
+ @ApiPropertyOptional()
70
+ @IsOptional()
71
+ @IsNumber()
72
+ assigneeId?: number;
73
+
74
+ @ApiPropertyOptional()
75
+ @IsOptional()
76
+ @IsNumber()
77
+ groupId?: number;
78
+
79
+ @ApiPropertyOptional()
80
+ @IsOptional()
81
+ @IsNumber()
82
+ organizationId?: number;
83
+ }
84
+
85
+ export class UpdateZendeskTicket {
86
+ @ApiPropertyOptional()
87
+ @IsOptional()
88
+ @IsString()
89
+ @MinLength(3)
90
+ subject?: string;
91
+
92
+ @ApiPropertyOptional()
93
+ @IsOptional()
94
+ @IsString()
95
+ body?: string;
96
+
97
+ @ApiPropertyOptional()
98
+ @IsOptional()
99
+ @IsArray()
100
+ @IsString({ each: true })
101
+ attachments?: string[];
102
+
103
+ @ApiPropertyOptional()
104
+ @IsOptional()
105
+ @IsEnum(ZendeskTicketStatusEnum)
106
+ status?: ZendeskTicketStatus;
107
+
108
+ @ApiPropertyOptional()
109
+ @IsOptional()
110
+ @IsEnum(ZendeskTicketPriorityEnum)
111
+ priority?: ZendeskTicketPriority;
112
+
113
+ @ApiPropertyOptional()
114
+ @IsOptional()
115
+ @IsEnum(ZendeskTicketTypeEnum)
116
+ type?: ZendeskTicketType;
117
+
118
+ @ApiPropertyOptional()
119
+ @IsOptional()
120
+ @IsArray()
121
+ @IsString({ each: true })
122
+ tags?: string[];
123
+
124
+ @ApiPropertyOptional()
125
+ @IsOptional()
126
+ @IsNumber()
127
+ assigneeId?: number;
128
+
129
+ @ApiPropertyOptional()
130
+ @IsOptional()
131
+ @IsNumber()
132
+ groupId?: number;
133
+
134
+ @ApiPropertyOptional()
135
+ @IsOptional()
136
+ @IsNumber()
137
+ organizationId?: number;
138
+
139
+ @ApiPropertyOptional()
140
+ @IsOptional()
141
+ @IsNumber()
142
+ authorId?: number;
143
+ }
144
+
145
+ export class ListZendeskTickets {
146
+ @ApiProperty()
147
+ @IsEnum(ZendeskTicketChannelEnum)
148
+ channel: ZendeskTicketChannel;
149
+
150
+ @ApiPropertyOptional()
151
+ @IsOptional()
152
+ @IsEnum(ZendeskTicketStatusEnum)
153
+ status?: ZendeskTicketStatus;
154
+
155
+ @ApiPropertyOptional()
156
+ @IsOptional()
157
+ @IsInt()
158
+ @Min(1)
159
+ page?: number = 1;
160
+
161
+ @ApiPropertyOptional()
162
+ @IsOptional()
163
+ @IsInt()
164
+ @Min(1)
165
+ @Max(100)
166
+ limit?: number = 25;
167
+
168
+ @ApiPropertyOptional()
169
+ @IsOptional()
170
+ @IsString()
171
+ search?: string;
172
+
173
+ @ApiPropertyOptional()
174
+ @IsOptional()
175
+ @IsString()
176
+ startDate?: string;
177
+
178
+ @ApiPropertyOptional()
179
+ @IsOptional()
180
+ @IsString()
181
+ endDate?: string;
182
+
183
+ @ApiPropertyOptional()
184
+ @IsOptional()
185
+ @IsString()
186
+ sortBy?: string;
187
+
188
+ @ApiPropertyOptional()
189
+ @IsOptional()
190
+ @IsEnum(['asc', 'desc'])
191
+ sortOrder?: 'asc' | 'desc';
192
+ }
@@ -0,0 +1,110 @@
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
+ comments: TicketComment[];
14
+ status: ZendeskTicketStatus;
15
+ priority: ZendeskTicketPriority | null;
16
+ type: ZendeskTicketType | null;
17
+ tags: string[];
18
+ via: { channel: ZendeskTicketChannel };
19
+ requesterId: number;
20
+ assigneeId: number | null;
21
+ groupId: number | null;
22
+ organizationId: number | null;
23
+ createdAt: string;
24
+ updatedAt: string;
25
+ }
26
+
27
+ export interface SearchZendeskResponse {
28
+ results: TicketZendesk[];
29
+ count: number;
30
+ nextPage: string | null;
31
+ previousPage: string | null;
32
+ }
33
+
34
+ export interface TicketZendeskResponse {
35
+ results: TicketZendesk[];
36
+ count: number;
37
+ nextPage: string | null;
38
+ previousPage: string | null;
39
+ }
40
+
41
+ export interface CustomFieldZendeskOption {
42
+ id: number;
43
+ name: string;
44
+ rawName: string;
45
+ value: string;
46
+ default: boolean;
47
+ }
48
+
49
+ export interface TicketFieldZendesk {
50
+ id: number;
51
+ url: string;
52
+ type: string;
53
+ title: string;
54
+ rawTitle: string;
55
+ description: string;
56
+ position: number;
57
+ active: boolean;
58
+ required: boolean;
59
+ requiredInPortal: boolean;
60
+ visibleInPortal: boolean;
61
+ editableInPortal: boolean;
62
+ tag: string | null;
63
+ customFieldOptions: CustomFieldZendeskOption[];
64
+ }
65
+
66
+ export interface TicketFormZendesk {
67
+ id: number;
68
+ url: string;
69
+ name: string;
70
+ rawName: string;
71
+ displayName: string;
72
+ rawDisplayName: string;
73
+ endUserVisible: boolean;
74
+ position: number;
75
+ active: boolean;
76
+ default: boolean;
77
+ inAllBrands: boolean;
78
+ restrictedBrandIds: number[];
79
+ ticketFieldIds: number[];
80
+ createdAt: string;
81
+ updatedAt: string;
82
+ }
83
+
84
+ export interface TicketFormEnriched extends Omit<TicketFormZendesk, 'ticketFieldIds'> {
85
+ fields: TicketFieldZendesk[];
86
+ }
87
+
88
+ export interface TicketAttachment {
89
+ id: number;
90
+ fileName: string;
91
+ contentUrl: string;
92
+ contentType: string;
93
+ size: number;
94
+ createdAt: string;
95
+ updatedAt: string;
96
+ }
97
+
98
+ export interface TicketComment {
99
+ id: number;
100
+ type: string;
101
+ authorId: number;
102
+ author: any;
103
+ body: string;
104
+ htmlBody: string;
105
+ plainBody: string;
106
+ public: boolean;
107
+ attachments: TicketAttachment[];
108
+ createdAt: string;
109
+ updatedAt: string;
110
+ }
package/ts/types/index.ts CHANGED
@@ -502,6 +502,7 @@ export * from './Enum/EquipmentAvailability.js';
502
502
  export * from './Enum/SpecialDayType.js';
503
503
  export * from './Enum/Degree.js';
504
504
  export * from './Enum/Brevo.js';
505
+ export * from './Enum/Zendesk.js';
505
506
  export * from './Enum/ZoneCode.js';
506
507
  export * from './Enum/TimeSlot.js';
507
508
  export * from './Enum/StateSynchro.js';
@@ -535,6 +536,7 @@ export * from './Enum/EbookIntention.js';
535
536
  export * from './Enum/UsersHistory.js';
536
537
  export * from './Enum/UrgencyLevel.js';
537
538
  export * from './Enum/Formalism.js';
539
+ export * from './Enum/Kyc.js';
538
540
 
539
541
  // Interfaces API
540
542
  export * from './Interface/api/accountingTransaction/Create.js';
@@ -830,6 +832,8 @@ export * from './Interface/api/loan/ReadLoan.js';
830
832
  export * from './Interface/api/stock/StocksType.js';
831
833
  export * from './Interface/api/lettering/QueryRegroupLettering.js';
832
834
  export * from './Interface/api/loan/UpdateLoan.js';
835
+ export * from './Interface/api/zendesk/QueryTicket.js';
836
+ export * from './Interface/api/zendesk/ReadTicket.js';
833
837
  export * from './Interface/api/zticket/CreateZTicket.js';
834
838
  export * from './Interface/api/zticket/QueryZTicket.js';
835
839
  export * from './Interface/api/balanceSheetModule/CreateBalanceSheetModule.js';