@breign/client 1.0.164 → 1.0.166
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/apis/InboxApi.d.ts +61 -0
- package/dist/apis/InboxApi.js +156 -0
- package/dist/apis/KnowledgeApi.d.ts +43 -1
- package/dist/apis/KnowledgeApi.js +104 -0
- package/dist/apis/ProjectsApi.d.ts +113 -0
- package/dist/apis/ProjectsApi.js +278 -0
- package/dist/apis/TicketsApi.d.ts +288 -0
- package/dist/apis/TicketsApi.js +690 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/models/AcceptTicketProposalRequestUio.d.ts +72 -0
- package/dist/models/AcceptTicketProposalRequestUio.js +64 -0
- package/dist/models/ActorRefUio.d.ts +39 -0
- package/dist/models/ActorRefUio.js +55 -0
- package/dist/models/ActorTypeUio.d.ts +26 -0
- package/dist/models/ActorTypeUio.js +52 -0
- package/dist/models/AddKnowledgeSiteExclusionRequestUio.d.ts +32 -0
- package/dist/models/AddKnowledgeSiteExclusionRequestUio.js +50 -0
- package/dist/models/AddKnowledgeSiteExclusionResponseUio.d.ts +44 -0
- package/dist/models/AddKnowledgeSiteExclusionResponseUio.js +58 -0
- package/dist/models/AgentTicketActivityUio.d.ts +69 -0
- package/dist/models/AgentTicketActivityUio.js +75 -0
- package/dist/models/AgentTicketCreationUio.d.ts +25 -0
- package/dist/models/AgentTicketCreationUio.js +51 -0
- package/dist/models/ChatMessageUio.d.ts +7 -0
- package/dist/models/ChatMessageUio.js +3 -0
- package/dist/models/ConversationTicketProposalUio.d.ts +71 -0
- package/dist/models/ConversationTicketProposalUio.js +77 -0
- package/dist/models/CreateProjectRequestUio.d.ts +70 -0
- package/dist/models/CreateProjectRequestUio.js +66 -0
- package/dist/models/CreateTicketArtifactRequestUio.d.ts +44 -0
- package/dist/models/CreateTicketArtifactRequestUio.js +56 -0
- package/dist/models/CreateTicketArtifactResponseUio.d.ts +40 -0
- package/dist/models/CreateTicketArtifactResponseUio.js +56 -0
- package/dist/models/CreateTicketEventRequestUio.d.ts +38 -0
- package/dist/models/CreateTicketEventRequestUio.js +52 -0
- package/dist/models/CreateTicketRequestUio.d.ts +85 -0
- package/dist/models/CreateTicketRequestUio.js +71 -0
- package/dist/models/FileCreationResponseUio.d.ts +7 -0
- package/dist/models/FileCreationResponseUio.js +2 -0
- package/dist/models/FileUio.d.ts +7 -0
- package/dist/models/FileUio.js +2 -0
- package/dist/models/FileWithDownloadUrlUio.d.ts +7 -0
- package/dist/models/FileWithDownloadUrlUio.js +2 -0
- package/dist/models/InboxCountUio.d.ts +38 -0
- package/dist/models/InboxCountUio.js +54 -0
- package/dist/models/InboxItemKindUio.d.ts +28 -0
- package/dist/models/InboxItemKindUio.js +54 -0
- package/dist/models/InboxItemProjectUio.d.ts +44 -0
- package/dist/models/InboxItemProjectUio.js +58 -0
- package/dist/models/InboxItemStatusUio.d.ts +25 -0
- package/dist/models/InboxItemStatusUio.js +51 -0
- package/dist/models/InboxItemTicketUio.d.ts +44 -0
- package/dist/models/InboxItemTicketUio.js +58 -0
- package/dist/models/InboxItemUio.d.ts +107 -0
- package/dist/models/InboxItemUio.js +99 -0
- package/dist/models/InboxTabUio.d.ts +26 -0
- package/dist/models/InboxTabUio.js +52 -0
- package/dist/models/KnowledgeFileUio.d.ts +7 -0
- package/dist/models/KnowledgeFileUio.js +2 -0
- package/dist/models/KnowledgeSiteExclusionsUio.d.ts +32 -0
- package/dist/models/KnowledgeSiteExclusionsUio.js +50 -0
- package/dist/models/KnowledgeSitePagesRemovalUio.d.ts +38 -0
- package/dist/models/KnowledgeSitePagesRemovalUio.js +54 -0
- package/dist/models/MemberRefUio.d.ts +39 -0
- package/dist/models/MemberRefUio.js +55 -0
- package/dist/models/MemberTypeUio.d.ts +25 -0
- package/dist/models/MemberTypeUio.js +51 -0
- package/dist/models/ProjectActivityUio.d.ts +51 -0
- package/dist/models/ProjectActivityUio.js +63 -0
- package/dist/models/ProjectAttentionUio.d.ts +50 -0
- package/dist/models/ProjectAttentionUio.js +62 -0
- package/dist/models/ProjectCountsUio.d.ts +68 -0
- package/dist/models/ProjectCountsUio.js +74 -0
- package/dist/models/ProjectMemberRoleUio.d.ts +25 -0
- package/dist/models/ProjectMemberRoleUio.js +51 -0
- package/dist/models/ProjectMemberUio.d.ts +53 -0
- package/dist/models/ProjectMemberUio.js +63 -0
- package/dist/models/ProjectOverviewUio.d.ts +68 -0
- package/dist/models/ProjectOverviewUio.js +76 -0
- package/dist/models/ProjectSettingsUio.d.ts +40 -0
- package/dist/models/ProjectSettingsUio.js +56 -0
- package/dist/models/ProjectSummaryUio.d.ts +128 -0
- package/dist/models/ProjectSummaryUio.js +116 -0
- package/dist/models/ProjectUio.d.ts +100 -0
- package/dist/models/ProjectUio.js +96 -0
- package/dist/models/SetProjectMembersRequestUio.d.ts +33 -0
- package/dist/models/SetProjectMembersRequestUio.js +51 -0
- package/dist/models/SetTicketAssigneesRequestUio.d.ts +40 -0
- package/dist/models/SetTicketAssigneesRequestUio.js +54 -0
- package/dist/models/StartKnowledgeBaseScrappingRequestUio.d.ts +1 -0
- package/dist/models/TicketArtifactDownloadUrlUio.d.ts +32 -0
- package/dist/models/TicketArtifactDownloadUrlUio.js +50 -0
- package/dist/models/TicketArtifactSourceUio.d.ts +25 -0
- package/dist/models/TicketArtifactSourceUio.js +51 -0
- package/dist/models/TicketArtifactStatusUio.d.ts +25 -0
- package/dist/models/TicketArtifactStatusUio.js +51 -0
- package/dist/models/TicketArtifactUio.d.ts +83 -0
- package/dist/models/TicketArtifactUio.js +85 -0
- package/dist/models/TicketAssigneeInputUio.d.ts +39 -0
- package/dist/models/TicketAssigneeInputUio.js +55 -0
- package/dist/models/TicketAssigneeStateUio.d.ts +29 -0
- package/dist/models/TicketAssigneeStateUio.js +55 -0
- package/dist/models/TicketAssigneeUio.d.ts +58 -0
- package/dist/models/TicketAssigneeUio.js +68 -0
- package/dist/models/TicketBoardColumnUio.d.ts +46 -0
- package/dist/models/TicketBoardColumnUio.js +60 -0
- package/dist/models/TicketBoardUio.d.ts +33 -0
- package/dist/models/TicketBoardUio.js +51 -0
- package/dist/models/TicketEventKindUio.d.ts +27 -0
- package/dist/models/TicketEventKindUio.js +53 -0
- package/dist/models/TicketEventUio.d.ts +78 -0
- package/dist/models/TicketEventUio.js +80 -0
- package/dist/models/TicketPriorityUio.d.ts +26 -0
- package/dist/models/TicketPriorityUio.js +52 -0
- package/dist/models/TicketProposalPayloadUio.d.ts +72 -0
- package/dist/models/TicketProposalPayloadUio.js +78 -0
- package/dist/models/TicketProposalStatusUio.d.ts +27 -0
- package/dist/models/TicketProposalStatusUio.js +53 -0
- package/dist/models/TicketReviewDecisionUio.d.ts +25 -0
- package/dist/models/TicketReviewDecisionUio.js +51 -0
- package/dist/models/TicketReviewRequestUio.d.ts +39 -0
- package/dist/models/TicketReviewRequestUio.js +53 -0
- package/dist/models/TicketStartModeUio.d.ts +25 -0
- package/dist/models/TicketStartModeUio.js +51 -0
- package/dist/models/TicketStatusUio.d.ts +28 -0
- package/dist/models/TicketStatusUio.js +54 -0
- package/dist/models/TicketUio.d.ts +163 -0
- package/dist/models/TicketUio.js +139 -0
- package/dist/models/UpdateProjectRequestUio.d.ts +63 -0
- package/dist/models/UpdateProjectRequestUio.js +59 -0
- package/dist/models/UpdateTicketRequestUio.d.ts +77 -0
- package/dist/models/UpdateTicketRequestUio.js +65 -0
- package/dist/models/index.d.ts +56 -0
- package/dist/models/index.js +56 -0
- package/dist/openapi.json +4942 -2075
- package/package.json +1 -1
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brain-client
|
|
6
|
+
* Api ands models for brain-app and brain-app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.TicketsApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class TicketsApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Crée le ticket proposé par l\'agent, avec les corrections éventuelles. projectId est obligatoire si l\'agent n\'en a pas proposé.
|
|
58
|
+
* Accept a ticket proposal
|
|
59
|
+
*/
|
|
60
|
+
async acceptTicketProposalRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['proposalId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter "proposalId" was null or undefined when calling acceptTicketProposal().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['acceptTicketProposalRequestUio'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('acceptTicketProposalRequestUio', 'Required parameter "acceptTicketProposalRequestUio" was null or undefined when calling acceptTicketProposal().');
|
|
66
|
+
}
|
|
67
|
+
const queryParameters = {};
|
|
68
|
+
const headerParameters = {};
|
|
69
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
70
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
71
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/ticket-proposals/{proposalId}/accept`.replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters['proposalId']))),
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
body: (0, index_1.AcceptTicketProposalRequestUioToJSON)(requestParameters['acceptTicketProposalRequestUio']),
|
|
79
|
+
}, initOverrides);
|
|
80
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Crée le ticket proposé par l\'agent, avec les corrections éventuelles. projectId est obligatoire si l\'agent n\'en a pas proposé.
|
|
84
|
+
* Accept a ticket proposal
|
|
85
|
+
*/
|
|
86
|
+
async acceptTicketProposal(proposalId, acceptTicketProposalRequestUio, initOverrides) {
|
|
87
|
+
const response = await this.acceptTicketProposalRaw({ proposalId: proposalId, acceptTicketProposalRequestUio: acceptTicketProposalRequestUio }, initOverrides);
|
|
88
|
+
return await response.value();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Annule un ticket créé sans confirmation : le ticket est supprimé tant que personne n\'y a travaillé.
|
|
92
|
+
* Cancel a ticket created directly by an agent
|
|
93
|
+
*/
|
|
94
|
+
async cancelTicketProposalRaw(requestParameters, initOverrides) {
|
|
95
|
+
if (requestParameters['proposalId'] == null) {
|
|
96
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter "proposalId" was null or undefined when calling cancelTicketProposal().');
|
|
97
|
+
}
|
|
98
|
+
const queryParameters = {};
|
|
99
|
+
const headerParameters = {};
|
|
100
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
101
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
102
|
+
}
|
|
103
|
+
const response = await this.request({
|
|
104
|
+
path: `/ticket-proposals/{proposalId}/cancel`.replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters['proposalId']))),
|
|
105
|
+
method: 'POST',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
}, initOverrides);
|
|
109
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConversationTicketProposalUioFromJSON)(jsonValue));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Annule un ticket créé sans confirmation : le ticket est supprimé tant que personne n\'y a travaillé.
|
|
113
|
+
* Cancel a ticket created directly by an agent
|
|
114
|
+
*/
|
|
115
|
+
async cancelTicketProposal(proposalId, initOverrides) {
|
|
116
|
+
const response = await this.cancelTicketProposalRaw({ proposalId: proposalId }, initOverrides);
|
|
117
|
+
return await response.value();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Crée un ticket dans le projet ; son numéro suit la séquence du projet.
|
|
121
|
+
* Create a ticket
|
|
122
|
+
*/
|
|
123
|
+
async createTicketRaw(requestParameters, initOverrides) {
|
|
124
|
+
if (requestParameters['projectId'] == null) {
|
|
125
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createTicket().');
|
|
126
|
+
}
|
|
127
|
+
if (requestParameters['createTicketRequestUio'] == null) {
|
|
128
|
+
throw new runtime.RequiredError('createTicketRequestUio', 'Required parameter "createTicketRequestUio" was null or undefined when calling createTicket().');
|
|
129
|
+
}
|
|
130
|
+
const queryParameters = {};
|
|
131
|
+
const headerParameters = {};
|
|
132
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
133
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
134
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
135
|
+
}
|
|
136
|
+
const response = await this.request({
|
|
137
|
+
path: `/projects/{projectId}/tickets`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
138
|
+
method: 'POST',
|
|
139
|
+
headers: headerParameters,
|
|
140
|
+
query: queryParameters,
|
|
141
|
+
body: (0, index_1.CreateTicketRequestUioToJSON)(requestParameters['createTicketRequestUio']),
|
|
142
|
+
}, initOverrides);
|
|
143
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Crée un ticket dans le projet ; son numéro suit la séquence du projet.
|
|
147
|
+
* Create a ticket
|
|
148
|
+
*/
|
|
149
|
+
async createTicket(projectId, createTicketRequestUio, initOverrides) {
|
|
150
|
+
const response = await this.createTicketRaw({ projectId: projectId, createTicketRequestUio: createTicketRequestUio }, initOverrides);
|
|
151
|
+
return await response.value();
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Déclare un fichier et renvoie l\'URL présignée où le téléverser.
|
|
155
|
+
* Attach a file to a ticket
|
|
156
|
+
*/
|
|
157
|
+
async createTicketArtifactRaw(requestParameters, initOverrides) {
|
|
158
|
+
if (requestParameters['ticketId'] == null) {
|
|
159
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling createTicketArtifact().');
|
|
160
|
+
}
|
|
161
|
+
if (requestParameters['createTicketArtifactRequestUio'] == null) {
|
|
162
|
+
throw new runtime.RequiredError('createTicketArtifactRequestUio', 'Required parameter "createTicketArtifactRequestUio" was null or undefined when calling createTicketArtifact().');
|
|
163
|
+
}
|
|
164
|
+
const queryParameters = {};
|
|
165
|
+
const headerParameters = {};
|
|
166
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
167
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
168
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
169
|
+
}
|
|
170
|
+
const response = await this.request({
|
|
171
|
+
path: `/tickets/{ticketId}/artifacts`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
172
|
+
method: 'POST',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters,
|
|
175
|
+
body: (0, index_1.CreateTicketArtifactRequestUioToJSON)(requestParameters['createTicketArtifactRequestUio']),
|
|
176
|
+
}, initOverrides);
|
|
177
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateTicketArtifactResponseUioFromJSON)(jsonValue));
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Déclare un fichier et renvoie l\'URL présignée où le téléverser.
|
|
181
|
+
* Attach a file to a ticket
|
|
182
|
+
*/
|
|
183
|
+
async createTicketArtifact(ticketId, createTicketArtifactRequestUio, initOverrides) {
|
|
184
|
+
const response = await this.createTicketArtifactRaw({ ticketId: ticketId, createTicketArtifactRequestUio: createTicketArtifactRequestUio }, initOverrides);
|
|
185
|
+
return await response.value();
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Ajoute un commentaire ; chaque @mention crée un élément dans l\'onglet Mentions du destinataire.
|
|
189
|
+
* Comment on a ticket
|
|
190
|
+
*/
|
|
191
|
+
async createTicketCommentRaw(requestParameters, initOverrides) {
|
|
192
|
+
if (requestParameters['ticketId'] == null) {
|
|
193
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling createTicketComment().');
|
|
194
|
+
}
|
|
195
|
+
if (requestParameters['createTicketEventRequestUio'] == null) {
|
|
196
|
+
throw new runtime.RequiredError('createTicketEventRequestUio', 'Required parameter "createTicketEventRequestUio" was null or undefined when calling createTicketComment().');
|
|
197
|
+
}
|
|
198
|
+
const queryParameters = {};
|
|
199
|
+
const headerParameters = {};
|
|
200
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
201
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
202
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
203
|
+
}
|
|
204
|
+
const response = await this.request({
|
|
205
|
+
path: `/tickets/{ticketId}/events`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
206
|
+
method: 'POST',
|
|
207
|
+
headers: headerParameters,
|
|
208
|
+
query: queryParameters,
|
|
209
|
+
body: (0, index_1.CreateTicketEventRequestUioToJSON)(requestParameters['createTicketEventRequestUio']),
|
|
210
|
+
}, initOverrides);
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketEventUioFromJSON)(jsonValue));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Ajoute un commentaire ; chaque @mention crée un élément dans l\'onglet Mentions du destinataire.
|
|
215
|
+
* Comment on a ticket
|
|
216
|
+
*/
|
|
217
|
+
async createTicketComment(ticketId, createTicketEventRequestUio, initOverrides) {
|
|
218
|
+
const response = await this.createTicketCommentRaw({ ticketId: ticketId, createTicketEventRequestUio: createTicketEventRequestUio }, initOverrides);
|
|
219
|
+
return await response.value();
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Retire l\'artefact et supprime le fichier téléversé.
|
|
223
|
+
* Remove an artifact from a ticket
|
|
224
|
+
*/
|
|
225
|
+
async deleteTicketArtifactRaw(requestParameters, initOverrides) {
|
|
226
|
+
if (requestParameters['ticketId'] == null) {
|
|
227
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling deleteTicketArtifact().');
|
|
228
|
+
}
|
|
229
|
+
if (requestParameters['artifactId'] == null) {
|
|
230
|
+
throw new runtime.RequiredError('artifactId', 'Required parameter "artifactId" was null or undefined when calling deleteTicketArtifact().');
|
|
231
|
+
}
|
|
232
|
+
const queryParameters = {};
|
|
233
|
+
const headerParameters = {};
|
|
234
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
235
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
236
|
+
}
|
|
237
|
+
const response = await this.request({
|
|
238
|
+
path: `/tickets/{ticketId}/artifacts/{artifactId}`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))).replace(`{${"artifactId"}}`, encodeURIComponent(String(requestParameters['artifactId']))),
|
|
239
|
+
method: 'DELETE',
|
|
240
|
+
headers: headerParameters,
|
|
241
|
+
query: queryParameters,
|
|
242
|
+
}, initOverrides);
|
|
243
|
+
return new runtime.VoidApiResponse(response);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Retire l\'artefact et supprime le fichier téléversé.
|
|
247
|
+
* Remove an artifact from a ticket
|
|
248
|
+
*/
|
|
249
|
+
async deleteTicketArtifact(ticketId, artifactId, initOverrides) {
|
|
250
|
+
await this.deleteTicketArtifactRaw({ ticketId: ticketId, artifactId: artifactId }, initOverrides);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Tickets par colonne. Les colonnes ouvertes sont complètes ; done ne contient que les tickets terminés les plus récents, son total compte tous les terminés.
|
|
254
|
+
* Get the board of a project
|
|
255
|
+
*/
|
|
256
|
+
async getProjectBoardRaw(requestParameters, initOverrides) {
|
|
257
|
+
if (requestParameters['projectId'] == null) {
|
|
258
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getProjectBoard().');
|
|
259
|
+
}
|
|
260
|
+
const queryParameters = {};
|
|
261
|
+
if (requestParameters['doneLimit'] != null) {
|
|
262
|
+
queryParameters['doneLimit'] = requestParameters['doneLimit'];
|
|
263
|
+
}
|
|
264
|
+
const headerParameters = {};
|
|
265
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
266
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
267
|
+
}
|
|
268
|
+
const response = await this.request({
|
|
269
|
+
path: `/projects/{projectId}/board`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
270
|
+
method: 'GET',
|
|
271
|
+
headers: headerParameters,
|
|
272
|
+
query: queryParameters,
|
|
273
|
+
}, initOverrides);
|
|
274
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketBoardUioFromJSON)(jsonValue));
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Tickets par colonne. Les colonnes ouvertes sont complètes ; done ne contient que les tickets terminés les plus récents, son total compte tous les terminés.
|
|
278
|
+
* Get the board of a project
|
|
279
|
+
*/
|
|
280
|
+
async getProjectBoard(projectId, doneLimit, initOverrides) {
|
|
281
|
+
const response = await this.getProjectBoardRaw({ projectId: projectId, doneLimit: doneLimit }, initOverrides);
|
|
282
|
+
return await response.value();
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Ticket avec ses assignés et leurs états.
|
|
286
|
+
* Get a ticket
|
|
287
|
+
*/
|
|
288
|
+
async getTicketRaw(requestParameters, initOverrides) {
|
|
289
|
+
if (requestParameters['ticketId'] == null) {
|
|
290
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling getTicket().');
|
|
291
|
+
}
|
|
292
|
+
const queryParameters = {};
|
|
293
|
+
const headerParameters = {};
|
|
294
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
295
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
296
|
+
}
|
|
297
|
+
const response = await this.request({
|
|
298
|
+
path: `/tickets/{ticketId}`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
299
|
+
method: 'GET',
|
|
300
|
+
headers: headerParameters,
|
|
301
|
+
query: queryParameters,
|
|
302
|
+
}, initOverrides);
|
|
303
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Ticket avec ses assignés et leurs états.
|
|
307
|
+
* Get a ticket
|
|
308
|
+
*/
|
|
309
|
+
async getTicket(ticketId, initOverrides) {
|
|
310
|
+
const response = await this.getTicketRaw({ ticketId: ticketId }, initOverrides);
|
|
311
|
+
return await response.value();
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* URL présignée de téléchargement, valable quelques minutes.
|
|
315
|
+
* Get a download URL for an artifact
|
|
316
|
+
*/
|
|
317
|
+
async getTicketArtifactDownloadUrlRaw(requestParameters, initOverrides) {
|
|
318
|
+
if (requestParameters['ticketId'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling getTicketArtifactDownloadUrl().');
|
|
320
|
+
}
|
|
321
|
+
if (requestParameters['artifactId'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('artifactId', 'Required parameter "artifactId" was null or undefined when calling getTicketArtifactDownloadUrl().');
|
|
323
|
+
}
|
|
324
|
+
const queryParameters = {};
|
|
325
|
+
const headerParameters = {};
|
|
326
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
327
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
328
|
+
}
|
|
329
|
+
const response = await this.request({
|
|
330
|
+
path: `/tickets/{ticketId}/artifacts/{artifactId}/download-url`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))).replace(`{${"artifactId"}}`, encodeURIComponent(String(requestParameters['artifactId']))),
|
|
331
|
+
method: 'GET',
|
|
332
|
+
headers: headerParameters,
|
|
333
|
+
query: queryParameters,
|
|
334
|
+
}, initOverrides);
|
|
335
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketArtifactDownloadUrlUioFromJSON)(jsonValue));
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* URL présignée de téléchargement, valable quelques minutes.
|
|
339
|
+
* Get a download URL for an artifact
|
|
340
|
+
*/
|
|
341
|
+
async getTicketArtifactDownloadUrl(ticketId, artifactId, initOverrides) {
|
|
342
|
+
const response = await this.getTicketArtifactDownloadUrlRaw({ ticketId: ticketId, artifactId: artifactId }, initOverrides);
|
|
343
|
+
return await response.value();
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Ticket désigné par sa clé (BRN-142) dans une organisation.
|
|
347
|
+
* Get a ticket by its key
|
|
348
|
+
*/
|
|
349
|
+
async getTicketByKeyRaw(requestParameters, initOverrides) {
|
|
350
|
+
if (requestParameters['organizationId'] == null) {
|
|
351
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getTicketByKey().');
|
|
352
|
+
}
|
|
353
|
+
if (requestParameters['ticketKey'] == null) {
|
|
354
|
+
throw new runtime.RequiredError('ticketKey', 'Required parameter "ticketKey" was null or undefined when calling getTicketByKey().');
|
|
355
|
+
}
|
|
356
|
+
const queryParameters = {};
|
|
357
|
+
const headerParameters = {};
|
|
358
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
359
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
360
|
+
}
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: `/organizations/{organizationId}/tickets/{ticketKey}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"ticketKey"}}`, encodeURIComponent(String(requestParameters['ticketKey']))),
|
|
363
|
+
method: 'GET',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
}, initOverrides);
|
|
367
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Ticket désigné par sa clé (BRN-142) dans une organisation.
|
|
371
|
+
* Get a ticket by its key
|
|
372
|
+
*/
|
|
373
|
+
async getTicketByKey(organizationId, ticketKey, initOverrides) {
|
|
374
|
+
const response = await this.getTicketByKeyRaw({ organizationId: organizationId, ticketKey: ticketKey }, initOverrides);
|
|
375
|
+
return await response.value();
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Feu vert à un assigné en attente (held) : il passe à assigned et peut commencer.
|
|
379
|
+
* Give the go-ahead to an assignee
|
|
380
|
+
*/
|
|
381
|
+
async giveTicketGoAheadRaw(requestParameters, initOverrides) {
|
|
382
|
+
if (requestParameters['ticketId'] == null) {
|
|
383
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling giveTicketGoAhead().');
|
|
384
|
+
}
|
|
385
|
+
if (requestParameters['assigneeType'] == null) {
|
|
386
|
+
throw new runtime.RequiredError('assigneeType', 'Required parameter "assigneeType" was null or undefined when calling giveTicketGoAhead().');
|
|
387
|
+
}
|
|
388
|
+
if (requestParameters['assigneeId'] == null) {
|
|
389
|
+
throw new runtime.RequiredError('assigneeId', 'Required parameter "assigneeId" was null or undefined when calling giveTicketGoAhead().');
|
|
390
|
+
}
|
|
391
|
+
const queryParameters = {};
|
|
392
|
+
const headerParameters = {};
|
|
393
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
394
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
395
|
+
}
|
|
396
|
+
const response = await this.request({
|
|
397
|
+
path: `/tickets/{ticketId}/assignees/{assigneeType}/{assigneeId}/go-ahead`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))).replace(`{${"assigneeType"}}`, encodeURIComponent(String(requestParameters['assigneeType']))).replace(`{${"assigneeId"}}`, encodeURIComponent(String(requestParameters['assigneeId']))),
|
|
398
|
+
method: 'POST',
|
|
399
|
+
headers: headerParameters,
|
|
400
|
+
query: queryParameters,
|
|
401
|
+
}, initOverrides);
|
|
402
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Feu vert à un assigné en attente (held) : il passe à assigned et peut commencer.
|
|
406
|
+
* Give the go-ahead to an assignee
|
|
407
|
+
*/
|
|
408
|
+
async giveTicketGoAhead(ticketId, assigneeType, assigneeId, initOverrides) {
|
|
409
|
+
const response = await this.giveTicketGoAheadRaw({ ticketId: ticketId, assigneeType: assigneeType, assigneeId: assigneeId }, initOverrides);
|
|
410
|
+
return await response.value();
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Liste paginée. Filtrée sur done, elle est triée du plus récemment terminé au plus ancien ; sinon de la plus récente activité à la plus ancienne.
|
|
414
|
+
* List the tickets of a project
|
|
415
|
+
*/
|
|
416
|
+
async listProjectTicketsRaw(requestParameters, initOverrides) {
|
|
417
|
+
if (requestParameters['projectId'] == null) {
|
|
418
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling listProjectTickets().');
|
|
419
|
+
}
|
|
420
|
+
const queryParameters = {};
|
|
421
|
+
if (requestParameters['status'] != null) {
|
|
422
|
+
queryParameters['status'] = requestParameters['status'];
|
|
423
|
+
}
|
|
424
|
+
if (requestParameters['mine'] != null) {
|
|
425
|
+
queryParameters['mine'] = requestParameters['mine'];
|
|
426
|
+
}
|
|
427
|
+
if (requestParameters['attention'] != null) {
|
|
428
|
+
queryParameters['attention'] = requestParameters['attention'];
|
|
429
|
+
}
|
|
430
|
+
if (requestParameters['agentsWorking'] != null) {
|
|
431
|
+
queryParameters['agentsWorking'] = requestParameters['agentsWorking'];
|
|
432
|
+
}
|
|
433
|
+
if (requestParameters['search'] != null) {
|
|
434
|
+
queryParameters['search'] = requestParameters['search'];
|
|
435
|
+
}
|
|
436
|
+
if (requestParameters['page'] != null) {
|
|
437
|
+
queryParameters['page'] = requestParameters['page'];
|
|
438
|
+
}
|
|
439
|
+
if (requestParameters['limit'] != null) {
|
|
440
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
441
|
+
}
|
|
442
|
+
const headerParameters = {};
|
|
443
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
444
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
445
|
+
}
|
|
446
|
+
const response = await this.request({
|
|
447
|
+
path: `/projects/{projectId}/tickets`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
448
|
+
method: 'GET',
|
|
449
|
+
headers: headerParameters,
|
|
450
|
+
query: queryParameters,
|
|
451
|
+
}, initOverrides);
|
|
452
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TicketUioFromJSON));
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Liste paginée. Filtrée sur done, elle est triée du plus récemment terminé au plus ancien ; sinon de la plus récente activité à la plus ancienne.
|
|
456
|
+
* List the tickets of a project
|
|
457
|
+
*/
|
|
458
|
+
async listProjectTickets(projectId, status, mine, attention, agentsWorking, search, page, limit, initOverrides) {
|
|
459
|
+
const response = await this.listProjectTicketsRaw({ projectId: projectId, status: status, mine: mine, attention: attention, agentsWorking: agentsWorking, search: search, page: page, limit: limit }, initOverrides);
|
|
460
|
+
return await response.value();
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Artefacts joints au ticket, les plus récents d\'abord.
|
|
464
|
+
* List the artifacts of a ticket
|
|
465
|
+
*/
|
|
466
|
+
async listTicketArtifactsRaw(requestParameters, initOverrides) {
|
|
467
|
+
if (requestParameters['ticketId'] == null) {
|
|
468
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling listTicketArtifacts().');
|
|
469
|
+
}
|
|
470
|
+
const queryParameters = {};
|
|
471
|
+
const headerParameters = {};
|
|
472
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
473
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
474
|
+
}
|
|
475
|
+
const response = await this.request({
|
|
476
|
+
path: `/tickets/{ticketId}/artifacts`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
477
|
+
method: 'GET',
|
|
478
|
+
headers: headerParameters,
|
|
479
|
+
query: queryParameters,
|
|
480
|
+
}, initOverrides);
|
|
481
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TicketArtifactUioFromJSON));
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Artefacts joints au ticket, les plus récents d\'abord.
|
|
485
|
+
* List the artifacts of a ticket
|
|
486
|
+
*/
|
|
487
|
+
async listTicketArtifacts(ticketId, initOverrides) {
|
|
488
|
+
const response = await this.listTicketArtifactsRaw({ ticketId: ticketId }, initOverrides);
|
|
489
|
+
return await response.value();
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Fil du ticket, du plus ancien au plus récent : commentaires, rapports, questions et événements.
|
|
493
|
+
* List the activity of a ticket
|
|
494
|
+
*/
|
|
495
|
+
async listTicketEventsRaw(requestParameters, initOverrides) {
|
|
496
|
+
if (requestParameters['ticketId'] == null) {
|
|
497
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling listTicketEvents().');
|
|
498
|
+
}
|
|
499
|
+
const queryParameters = {};
|
|
500
|
+
if (requestParameters['page'] != null) {
|
|
501
|
+
queryParameters['page'] = requestParameters['page'];
|
|
502
|
+
}
|
|
503
|
+
if (requestParameters['limit'] != null) {
|
|
504
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
505
|
+
}
|
|
506
|
+
const headerParameters = {};
|
|
507
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
508
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
509
|
+
}
|
|
510
|
+
const response = await this.request({
|
|
511
|
+
path: `/tickets/{ticketId}/events`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
512
|
+
method: 'GET',
|
|
513
|
+
headers: headerParameters,
|
|
514
|
+
query: queryParameters,
|
|
515
|
+
}, initOverrides);
|
|
516
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TicketEventUioFromJSON));
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Fil du ticket, du plus ancien au plus récent : commentaires, rapports, questions et événements.
|
|
520
|
+
* List the activity of a ticket
|
|
521
|
+
*/
|
|
522
|
+
async listTicketEvents(ticketId, page, limit, initOverrides) {
|
|
523
|
+
const response = await this.listTicketEventsRaw({ ticketId: ticketId, page: page, limit: limit }, initOverrides);
|
|
524
|
+
return await response.value();
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Confirme le téléversement : l\'artefact passe à ready.
|
|
528
|
+
* Mark an artifact as uploaded
|
|
529
|
+
*/
|
|
530
|
+
async markTicketArtifactUploadedRaw(requestParameters, initOverrides) {
|
|
531
|
+
if (requestParameters['ticketId'] == null) {
|
|
532
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling markTicketArtifactUploaded().');
|
|
533
|
+
}
|
|
534
|
+
if (requestParameters['artifactId'] == null) {
|
|
535
|
+
throw new runtime.RequiredError('artifactId', 'Required parameter "artifactId" was null or undefined when calling markTicketArtifactUploaded().');
|
|
536
|
+
}
|
|
537
|
+
const queryParameters = {};
|
|
538
|
+
const headerParameters = {};
|
|
539
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
540
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
541
|
+
}
|
|
542
|
+
const response = await this.request({
|
|
543
|
+
path: `/tickets/{ticketId}/artifacts/{artifactId}/uploaded`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))).replace(`{${"artifactId"}}`, encodeURIComponent(String(requestParameters['artifactId']))),
|
|
544
|
+
method: 'POST',
|
|
545
|
+
headers: headerParameters,
|
|
546
|
+
query: queryParameters,
|
|
547
|
+
}, initOverrides);
|
|
548
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketArtifactUioFromJSON)(jsonValue));
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Confirme le téléversement : l\'artefact passe à ready.
|
|
552
|
+
* Mark an artifact as uploaded
|
|
553
|
+
*/
|
|
554
|
+
async markTicketArtifactUploaded(ticketId, artifactId, initOverrides) {
|
|
555
|
+
const response = await this.markTicketArtifactUploadedRaw({ ticketId: ticketId, artifactId: artifactId }, initOverrides);
|
|
556
|
+
return await response.value();
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Écarte la proposition ; aucun ticket n\'est créé.
|
|
560
|
+
* Reject a ticket proposal
|
|
561
|
+
*/
|
|
562
|
+
async rejectTicketProposalRaw(requestParameters, initOverrides) {
|
|
563
|
+
if (requestParameters['proposalId'] == null) {
|
|
564
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter "proposalId" was null or undefined when calling rejectTicketProposal().');
|
|
565
|
+
}
|
|
566
|
+
const queryParameters = {};
|
|
567
|
+
const headerParameters = {};
|
|
568
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
569
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
570
|
+
}
|
|
571
|
+
const response = await this.request({
|
|
572
|
+
path: `/ticket-proposals/{proposalId}/reject`.replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters['proposalId']))),
|
|
573
|
+
method: 'POST',
|
|
574
|
+
headers: headerParameters,
|
|
575
|
+
query: queryParameters,
|
|
576
|
+
}, initOverrides);
|
|
577
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConversationTicketProposalUioFromJSON)(jsonValue));
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Écarte la proposition ; aucun ticket n\'est créé.
|
|
581
|
+
* Reject a ticket proposal
|
|
582
|
+
*/
|
|
583
|
+
async rejectTicketProposal(proposalId, initOverrides) {
|
|
584
|
+
const response = await this.rejectTicketProposalRaw({ proposalId: proposalId }, initOverrides);
|
|
585
|
+
return await response.value();
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Décision du relecteur : approve passe le ticket à done ; changes le renvoie à doing avec le commentaire.
|
|
589
|
+
* Review a ticket
|
|
590
|
+
*/
|
|
591
|
+
async reviewTicketRaw(requestParameters, initOverrides) {
|
|
592
|
+
if (requestParameters['ticketId'] == null) {
|
|
593
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling reviewTicket().');
|
|
594
|
+
}
|
|
595
|
+
if (requestParameters['ticketReviewRequestUio'] == null) {
|
|
596
|
+
throw new runtime.RequiredError('ticketReviewRequestUio', 'Required parameter "ticketReviewRequestUio" was null or undefined when calling reviewTicket().');
|
|
597
|
+
}
|
|
598
|
+
const queryParameters = {};
|
|
599
|
+
const headerParameters = {};
|
|
600
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
601
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
602
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
603
|
+
}
|
|
604
|
+
const response = await this.request({
|
|
605
|
+
path: `/tickets/{ticketId}/review`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
606
|
+
method: 'POST',
|
|
607
|
+
headers: headerParameters,
|
|
608
|
+
query: queryParameters,
|
|
609
|
+
body: (0, index_1.TicketReviewRequestUioToJSON)(requestParameters['ticketReviewRequestUio']),
|
|
610
|
+
}, initOverrides);
|
|
611
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Décision du relecteur : approve passe le ticket à done ; changes le renvoie à doing avec le commentaire.
|
|
615
|
+
* Review a ticket
|
|
616
|
+
*/
|
|
617
|
+
async reviewTicket(ticketId, ticketReviewRequestUio, initOverrides) {
|
|
618
|
+
const response = await this.reviewTicketRaw({ ticketId: ticketId, ticketReviewRequestUio: ticketReviewRequestUio }, initOverrides);
|
|
619
|
+
return await response.value();
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Remplace les assignés. Les nouveaux agents démarrent selon startMode (réglage du projet par défaut) ; en hold, un feu vert est demandé.
|
|
623
|
+
* Replace the assignees of a ticket
|
|
624
|
+
*/
|
|
625
|
+
async setTicketAssigneesRaw(requestParameters, initOverrides) {
|
|
626
|
+
if (requestParameters['ticketId'] == null) {
|
|
627
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling setTicketAssignees().');
|
|
628
|
+
}
|
|
629
|
+
if (requestParameters['setTicketAssigneesRequestUio'] == null) {
|
|
630
|
+
throw new runtime.RequiredError('setTicketAssigneesRequestUio', 'Required parameter "setTicketAssigneesRequestUio" was null or undefined when calling setTicketAssignees().');
|
|
631
|
+
}
|
|
632
|
+
const queryParameters = {};
|
|
633
|
+
const headerParameters = {};
|
|
634
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
635
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
636
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
637
|
+
}
|
|
638
|
+
const response = await this.request({
|
|
639
|
+
path: `/tickets/{ticketId}/assignees`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
640
|
+
method: 'PUT',
|
|
641
|
+
headers: headerParameters,
|
|
642
|
+
query: queryParameters,
|
|
643
|
+
body: (0, index_1.SetTicketAssigneesRequestUioToJSON)(requestParameters['setTicketAssigneesRequestUio']),
|
|
644
|
+
}, initOverrides);
|
|
645
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Remplace les assignés. Les nouveaux agents démarrent selon startMode (réglage du projet par défaut) ; en hold, un feu vert est demandé.
|
|
649
|
+
* Replace the assignees of a ticket
|
|
650
|
+
*/
|
|
651
|
+
async setTicketAssignees(ticketId, setTicketAssigneesRequestUio, initOverrides) {
|
|
652
|
+
const response = await this.setTicketAssigneesRaw({ ticketId: ticketId, setTicketAssigneesRequestUio: setTicketAssigneesRequestUio }, initOverrides);
|
|
653
|
+
return await response.value();
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Mise à jour partielle. Passer à done alors qu\'un relecteur est défini et n\'a pas approuvé est refusé (409).
|
|
657
|
+
* Update a ticket
|
|
658
|
+
*/
|
|
659
|
+
async updateTicketRaw(requestParameters, initOverrides) {
|
|
660
|
+
if (requestParameters['ticketId'] == null) {
|
|
661
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling updateTicket().');
|
|
662
|
+
}
|
|
663
|
+
if (requestParameters['updateTicketRequestUio'] == null) {
|
|
664
|
+
throw new runtime.RequiredError('updateTicketRequestUio', 'Required parameter "updateTicketRequestUio" was null or undefined when calling updateTicket().');
|
|
665
|
+
}
|
|
666
|
+
const queryParameters = {};
|
|
667
|
+
const headerParameters = {};
|
|
668
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
669
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
670
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
671
|
+
}
|
|
672
|
+
const response = await this.request({
|
|
673
|
+
path: `/tickets/{ticketId}`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))),
|
|
674
|
+
method: 'PATCH',
|
|
675
|
+
headers: headerParameters,
|
|
676
|
+
query: queryParameters,
|
|
677
|
+
body: (0, index_1.UpdateTicketRequestUioToJSON)(requestParameters['updateTicketRequestUio']),
|
|
678
|
+
}, initOverrides);
|
|
679
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Mise à jour partielle. Passer à done alors qu\'un relecteur est défini et n\'a pas approuvé est refusé (409).
|
|
683
|
+
* Update a ticket
|
|
684
|
+
*/
|
|
685
|
+
async updateTicket(ticketId, updateTicketRequestUio, initOverrides) {
|
|
686
|
+
const response = await this.updateTicketRaw({ ticketId: ticketId, updateTicketRequestUio: updateTicketRequestUio }, initOverrides);
|
|
687
|
+
return await response.value();
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
exports.TicketsApi = TicketsApi;
|