@outseta/api-client 0.3.37 → 0.3.39
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/index.js +13 -0
- package/package.json +1 -1
- package/src/generated/attribute/attribute.ts +305 -1
- package/src/generated/email/email.ts +9 -0
- package/src/generated/models/caseTagAllOf.ts +0 -3
- package/src/generated/models/{caseTagAllOfCase.ts → caseUpdateCaseBody.ts} +1 -1
- package/src/generated/models/index.ts +5 -1
- package/src/generated/models/tagAddTagBody.ts +7 -0
- package/src/generated/models/tagGetAllTags200.ts +8 -0
- package/src/generated/models/tagGetAllTagsParams.ts +19 -0
- package/src/generated/models/tagUpdateTagBody.ts +7 -0
- package/src/generated/support/support.ts +73 -0
package/dist/index.js
CHANGED
|
@@ -1235,6 +1235,17 @@ var caseGetCase = async (caseUid, options) => {
|
|
|
1235
1235
|
method: "GET"
|
|
1236
1236
|
});
|
|
1237
1237
|
};
|
|
1238
|
+
var getCaseUpdateCaseUrl = (caseUid) => {
|
|
1239
|
+
return `/api/v1/support/cases/${caseUid}`;
|
|
1240
|
+
};
|
|
1241
|
+
var caseUpdateCase = async (caseUid, caseUpdateCaseBody, options) => {
|
|
1242
|
+
return customFetch(getCaseUpdateCaseUrl(caseUid), {
|
|
1243
|
+
...options,
|
|
1244
|
+
method: "PUT",
|
|
1245
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1246
|
+
body: JSON.stringify(caseUpdateCaseBody)
|
|
1247
|
+
});
|
|
1248
|
+
};
|
|
1238
1249
|
var getCaseAddReplyUrl = (caseUid) => {
|
|
1239
1250
|
return `/api/v1/support/cases/${caseUid}/replies`;
|
|
1240
1251
|
};
|
|
@@ -2034,6 +2045,7 @@ export {
|
|
|
2034
2045
|
caseAddReply,
|
|
2035
2046
|
caseGetAllCases,
|
|
2036
2047
|
caseGetCase,
|
|
2048
|
+
caseUpdateCase,
|
|
2037
2049
|
categoryGetAllCategories,
|
|
2038
2050
|
createClient,
|
|
2039
2051
|
customFetch,
|
|
@@ -2097,6 +2109,7 @@ export {
|
|
|
2097
2109
|
getCaseAddReplyUrl,
|
|
2098
2110
|
getCaseGetAllCasesUrl,
|
|
2099
2111
|
getCaseGetCaseUrl,
|
|
2112
|
+
getCaseUpdateCaseUrl,
|
|
2100
2113
|
getCategoryGetAllCategoriesUrl,
|
|
2101
2114
|
getDealAddDealUrl,
|
|
2102
2115
|
getDealDeleteDealUrl,
|
package/package.json
CHANGED
|
@@ -2,11 +2,315 @@
|
|
|
2
2
|
import type {
|
|
3
3
|
Definition,
|
|
4
4
|
DefinitionGetAllDefinitions200,
|
|
5
|
-
DefinitionGetAllDefinitionsParams
|
|
5
|
+
DefinitionGetAllDefinitionsParams,
|
|
6
|
+
Tag,
|
|
7
|
+
TagAddTagBody,
|
|
8
|
+
TagGetAllTags200,
|
|
9
|
+
TagGetAllTagsParams,
|
|
10
|
+
TagUpdateTagBody
|
|
6
11
|
} from '.././models';
|
|
7
12
|
|
|
8
13
|
import { customFetch } from '../../client';
|
|
9
14
|
|
|
15
|
+
// https://stackoverflow.com/questions/49579094/typescript-conditional-types-filter-out-readonly-properties-pick-only-requir/49579497#49579497
|
|
16
|
+
type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <
|
|
17
|
+
T,
|
|
18
|
+
>() => T extends Y ? 1 : 2
|
|
19
|
+
? A
|
|
20
|
+
: B;
|
|
21
|
+
|
|
22
|
+
type WritableKeys<T> = {
|
|
23
|
+
[P in keyof T]-?: IfEquals<
|
|
24
|
+
{ [Q in P]: T[P] },
|
|
25
|
+
{ -readonly [Q in P]: T[P] },
|
|
26
|
+
P
|
|
27
|
+
>;
|
|
28
|
+
}[keyof T];
|
|
29
|
+
|
|
30
|
+
type UnionToIntersection<U> =
|
|
31
|
+
(U extends any ? (k: U)=>void : never) extends ((k: infer I)=>void) ? I : never;
|
|
32
|
+
type DistributeReadOnlyOverUnions<T> = T extends any ? NonReadonly<T> : never;
|
|
33
|
+
|
|
34
|
+
type Writable<T> = Pick<T, WritableKeys<T>>;
|
|
35
|
+
type NonReadonly<T> = [T] extends [UnionToIntersection<T>] ? {
|
|
36
|
+
[P in keyof Writable<T>]: T[P] extends object
|
|
37
|
+
? NonReadonly<NonNullable<T[P]>>
|
|
38
|
+
: T[P];
|
|
39
|
+
} : DistributeReadOnlyOverUnions<T>;
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Each tag applies to a single entity type. Pass entityType=Case to retrieve the tags
|
|
44
|
+
that can be put on support tickets.
|
|
45
|
+
|
|
46
|
+
How a tag goes onto a record depends on the entity type. A support ticket holds its
|
|
47
|
+
tags in its own CaseTags collection, so you add and remove ticket tags with
|
|
48
|
+
PUT /support/cases/{caseUid}. Other entity types store their tags differently. This
|
|
49
|
+
documentation covers ticket tags only.
|
|
50
|
+
|
|
51
|
+
Name is unique within an entity type. SystemName and SystemDescription identify a
|
|
52
|
+
built-in tag (for example Priority.Urgent) and are set by Outseta.
|
|
53
|
+
* @summary Retrieve all tags.
|
|
54
|
+
*/
|
|
55
|
+
export type tagGetAllTagsResponse200 = {
|
|
56
|
+
data: TagGetAllTags200
|
|
57
|
+
status: 200
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type tagGetAllTagsResponse401 = {
|
|
61
|
+
data: void
|
|
62
|
+
status: 401
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type tagGetAllTagsResponseSuccess = (tagGetAllTagsResponse200) & {
|
|
66
|
+
headers: Headers;
|
|
67
|
+
};
|
|
68
|
+
export type tagGetAllTagsResponseError = (tagGetAllTagsResponse401) & {
|
|
69
|
+
headers: Headers;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type tagGetAllTagsResponse = (tagGetAllTagsResponseSuccess | tagGetAllTagsResponseError)
|
|
73
|
+
|
|
74
|
+
export const getTagGetAllTagsUrl = (params?: TagGetAllTagsParams,) => {
|
|
75
|
+
const normalizedParams = new URLSearchParams();
|
|
76
|
+
|
|
77
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
78
|
+
|
|
79
|
+
if (value !== undefined) {
|
|
80
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString())
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const stringifiedParams = normalizedParams.toString();
|
|
85
|
+
|
|
86
|
+
return stringifiedParams.length > 0 ? `/api/v1/attribute/tags?${stringifiedParams}` : `/api/v1/attribute/tags`
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const tagGetAllTags = async (params?: TagGetAllTagsParams, options?: RequestInit): Promise<tagGetAllTagsResponse> => {
|
|
90
|
+
|
|
91
|
+
return customFetch<tagGetAllTagsResponse>(getTagGetAllTagsUrl(params),
|
|
92
|
+
{
|
|
93
|
+
...options,
|
|
94
|
+
method: 'GET'
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
);}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Name and EntityType are required. Use EntityType 4 (Case) for a tag that goes on
|
|
103
|
+
support tickets. TagColor sets the color the tag shows in.
|
|
104
|
+
|
|
105
|
+
Name must be unique within an entity type. If the name already exists for that
|
|
106
|
+
entity type, the existing tag is returned instead of a duplicate, and its color is
|
|
107
|
+
updated when a different TagColor is supplied. SystemName and SystemDescription are
|
|
108
|
+
set by Outseta and are ignored here.
|
|
109
|
+
* @summary Create a tag.
|
|
110
|
+
*/
|
|
111
|
+
export type tagAddTagResponse200 = {
|
|
112
|
+
data: Tag
|
|
113
|
+
status: 200
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type tagAddTagResponse401 = {
|
|
117
|
+
data: void
|
|
118
|
+
status: 401
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type tagAddTagResponseSuccess = (tagAddTagResponse200) & {
|
|
122
|
+
headers: Headers;
|
|
123
|
+
};
|
|
124
|
+
export type tagAddTagResponseError = (tagAddTagResponse401) & {
|
|
125
|
+
headers: Headers;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type tagAddTagResponse = (tagAddTagResponseSuccess | tagAddTagResponseError)
|
|
129
|
+
|
|
130
|
+
export const getTagAddTagUrl = () => {
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
return `/api/v1/attribute/tags`
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export const tagAddTag = async (tagAddTagBody: NonReadonly<TagAddTagBody>, options?: RequestInit): Promise<tagAddTagResponse> => {
|
|
139
|
+
|
|
140
|
+
return customFetch<tagAddTagResponse>(getTagAddTagUrl(),
|
|
141
|
+
{
|
|
142
|
+
...options,
|
|
143
|
+
method: 'POST',
|
|
144
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
145
|
+
body: JSON.stringify(
|
|
146
|
+
tagAddTagBody,)
|
|
147
|
+
}
|
|
148
|
+
);}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @summary Retrieve a tag.
|
|
153
|
+
*/
|
|
154
|
+
export type tagGetTagResponse200 = {
|
|
155
|
+
data: Tag
|
|
156
|
+
status: 200
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type tagGetTagResponse400 = {
|
|
160
|
+
data: void
|
|
161
|
+
status: 400
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type tagGetTagResponse401 = {
|
|
165
|
+
data: void
|
|
166
|
+
status: 401
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type tagGetTagResponse404 = {
|
|
170
|
+
data: void
|
|
171
|
+
status: 404
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type tagGetTagResponseSuccess = (tagGetTagResponse200) & {
|
|
175
|
+
headers: Headers;
|
|
176
|
+
};
|
|
177
|
+
export type tagGetTagResponseError = (tagGetTagResponse400 | tagGetTagResponse401 | tagGetTagResponse404) & {
|
|
178
|
+
headers: Headers;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export type tagGetTagResponse = (tagGetTagResponseSuccess | tagGetTagResponseError)
|
|
182
|
+
|
|
183
|
+
export const getTagGetTagUrl = (tagUid: string | null,) => {
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
return `/api/v1/attribute/tags/${tagUid}`
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export const tagGetTag = async (tagUid: string | null, options?: RequestInit): Promise<tagGetTagResponse> => {
|
|
192
|
+
|
|
193
|
+
return customFetch<tagGetTagResponse>(getTagGetTagUrl(tagUid),
|
|
194
|
+
{
|
|
195
|
+
...options,
|
|
196
|
+
method: 'GET'
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
}
|
|
200
|
+
);}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Use this to rename a tag or to change its color. EntityType cannot be changed after
|
|
205
|
+
the tag is created. Name must stay unique within the entity type. SystemName and
|
|
206
|
+
SystemDescription are set by Outseta and cannot be changed.
|
|
207
|
+
* @summary Update a tag.
|
|
208
|
+
*/
|
|
209
|
+
export type tagUpdateTagResponse200 = {
|
|
210
|
+
data: Tag
|
|
211
|
+
status: 200
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export type tagUpdateTagResponse400 = {
|
|
215
|
+
data: void
|
|
216
|
+
status: 400
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export type tagUpdateTagResponse401 = {
|
|
220
|
+
data: void
|
|
221
|
+
status: 401
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export type tagUpdateTagResponse404 = {
|
|
225
|
+
data: void
|
|
226
|
+
status: 404
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export type tagUpdateTagResponseSuccess = (tagUpdateTagResponse200) & {
|
|
230
|
+
headers: Headers;
|
|
231
|
+
};
|
|
232
|
+
export type tagUpdateTagResponseError = (tagUpdateTagResponse400 | tagUpdateTagResponse401 | tagUpdateTagResponse404) & {
|
|
233
|
+
headers: Headers;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export type tagUpdateTagResponse = (tagUpdateTagResponseSuccess | tagUpdateTagResponseError)
|
|
237
|
+
|
|
238
|
+
export const getTagUpdateTagUrl = (tagUid: string | null,) => {
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
return `/api/v1/attribute/tags/${tagUid}`
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export const tagUpdateTag = async (tagUid: string | null,
|
|
247
|
+
tagUpdateTagBody: NonReadonly<TagUpdateTagBody>, options?: RequestInit): Promise<tagUpdateTagResponse> => {
|
|
248
|
+
|
|
249
|
+
return customFetch<tagUpdateTagResponse>(getTagUpdateTagUrl(tagUid),
|
|
250
|
+
{
|
|
251
|
+
...options,
|
|
252
|
+
method: 'PUT',
|
|
253
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
254
|
+
body: JSON.stringify(
|
|
255
|
+
tagUpdateTagBody,)
|
|
256
|
+
}
|
|
257
|
+
);}
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The tag is also taken off every record that carries it. For a Case tag, it is
|
|
262
|
+
removed from all support tickets that have it.
|
|
263
|
+
* @summary Delete a tag.
|
|
264
|
+
*/
|
|
265
|
+
export type tagDeleteTagResponse200 = {
|
|
266
|
+
data: Blob
|
|
267
|
+
status: 200
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export type tagDeleteTagResponse400 = {
|
|
271
|
+
data: void
|
|
272
|
+
status: 400
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export type tagDeleteTagResponse401 = {
|
|
276
|
+
data: void
|
|
277
|
+
status: 401
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export type tagDeleteTagResponse404 = {
|
|
281
|
+
data: void
|
|
282
|
+
status: 404
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export type tagDeleteTagResponseSuccess = (tagDeleteTagResponse200) & {
|
|
286
|
+
headers: Headers;
|
|
287
|
+
};
|
|
288
|
+
export type tagDeleteTagResponseError = (tagDeleteTagResponse400 | tagDeleteTagResponse401 | tagDeleteTagResponse404) & {
|
|
289
|
+
headers: Headers;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export type tagDeleteTagResponse = (tagDeleteTagResponseSuccess | tagDeleteTagResponseError)
|
|
293
|
+
|
|
294
|
+
export const getTagDeleteTagUrl = (tagUid: string | null,) => {
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
return `/api/v1/attribute/tags/${tagUid}`
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export const tagDeleteTag = async (tagUid: string | null, options?: RequestInit): Promise<tagDeleteTagResponse> => {
|
|
303
|
+
|
|
304
|
+
return customFetch<tagDeleteTagResponse>(getTagDeleteTagUrl(tagUid),
|
|
305
|
+
{
|
|
306
|
+
...options,
|
|
307
|
+
method: 'DELETE'
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
}
|
|
311
|
+
);}
|
|
312
|
+
|
|
313
|
+
|
|
10
314
|
/**
|
|
11
315
|
* entityType is the name of an EntityType enum value, for example: Account, Person,
|
|
12
316
|
Deal. Definitions describe the labels, system names, and control types of
|
|
@@ -655,6 +655,15 @@ omitted it is derived automatically, so callers (including LLM tools) do not nee
|
|
|
655
655
|
understand it. Use Message.PreviewText for inbox preview text rather than an in-body
|
|
656
656
|
preheader.
|
|
657
657
|
|
|
658
|
+
The shape of the Body markup decides how editable the broadcast is in the app. Prose
|
|
659
|
+
(headings, paragraphs, lists, links, emphasis, images, inline spans) goes into a text
|
|
660
|
+
block, which the author edits on the editor canvas with the formatting toolbar and the
|
|
661
|
+
merge-tag menu. Structural markup (tables, an embedded style block, document
|
|
662
|
+
scaffolding) goes into an HTML block instead, because only that block renders such
|
|
663
|
+
markup verbatim, and it is edited as raw HTML. Send prose when the email must stay easy
|
|
664
|
+
to edit visually. The first save in the editor also replaces Body with the editor's
|
|
665
|
+
export of the design, so this choice decides the markup that is sent from then on.
|
|
666
|
+
|
|
658
667
|
When Body is a content fragment with no Design, it is composed into the account's API
|
|
659
668
|
email layout — a branded header and footer that includes the unsubscribe and
|
|
660
669
|
manage-subscriptions links — and the composed result is what is sent and opened in the
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import type { CaseTagAllOfCase } from './caseTagAllOfCase';
|
|
3
2
|
import type { CaseTagAllOfTag } from './caseTagAllOfTag';
|
|
4
3
|
|
|
5
4
|
export type CaseTagAllOf = {
|
|
6
|
-
/** @nullable */
|
|
7
|
-
Case?: CaseTagAllOfCase;
|
|
8
5
|
/** @nullable */
|
|
9
6
|
Tag?: CaseTagAllOfTag;
|
|
10
7
|
};
|
|
@@ -270,8 +270,8 @@ export * from './caseHistory';
|
|
|
270
270
|
export * from './caseHistoryAllOf';
|
|
271
271
|
export * from './caseTag';
|
|
272
272
|
export * from './caseTagAllOf';
|
|
273
|
-
export * from './caseTagAllOfCase';
|
|
274
273
|
export * from './caseTagAllOfTag';
|
|
274
|
+
export * from './caseUpdateCaseBody';
|
|
275
275
|
export * from './category';
|
|
276
276
|
export * from './categoryAllOf';
|
|
277
277
|
export * from './categoryGetAllCategories200';
|
|
@@ -707,9 +707,13 @@ export * from './supportCaseStatus';
|
|
|
707
707
|
export * from './supportSettings';
|
|
708
708
|
export * from './supportSettingsAllOf';
|
|
709
709
|
export * from './tag';
|
|
710
|
+
export * from './tagAddTagBody';
|
|
710
711
|
export * from './tagAllOf';
|
|
711
712
|
export * from './tagColor';
|
|
713
|
+
export * from './tagGetAllTags200';
|
|
714
|
+
export * from './tagGetAllTagsParams';
|
|
712
715
|
export * from './tagUidList';
|
|
716
|
+
export * from './tagUpdateTagBody';
|
|
713
717
|
export * from './task';
|
|
714
718
|
export * from './taskAllOf';
|
|
715
719
|
export * from './taskAllOfAccount';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { LimitParameter } from './limitParameter';
|
|
3
|
+
import type { OffsetParameter } from './offsetParameter';
|
|
4
|
+
|
|
5
|
+
export type TagGetAllTagsParams = {
|
|
6
|
+
/**
|
|
7
|
+
* The entity type whose tags to retrieve, as the name or the numeric value (for example Case or 4)
|
|
8
|
+
* @nullable
|
|
9
|
+
*/
|
|
10
|
+
entityType?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
|
|
13
|
+
*/
|
|
14
|
+
limit?: LimitParameter;
|
|
15
|
+
/**
|
|
16
|
+
* Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
|
|
17
|
+
*/
|
|
18
|
+
offset?: OffsetParameter;
|
|
19
|
+
};
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
CaseGetAllCases200,
|
|
11
11
|
CaseGetAllCasesParams,
|
|
12
12
|
CaseHistory,
|
|
13
|
+
CaseUpdateCaseBody,
|
|
13
14
|
CategoryGetAllCategories200,
|
|
14
15
|
CategoryGetAllCategoriesParams
|
|
15
16
|
} from '.././models';
|
|
@@ -203,6 +204,78 @@ export const caseGetCase = async (caseUid: string | null, options?: RequestInit)
|
|
|
203
204
|
);}
|
|
204
205
|
|
|
205
206
|
|
|
207
|
+
/**
|
|
208
|
+
* The Uid in the URL identifies the ticket, and a Uid in the request body is ignored.
|
|
209
|
+
Any property that the body does not contain keeps its current value, so a request
|
|
210
|
+
can send only the properties that change.
|
|
211
|
+
|
|
212
|
+
Tags are managed through the CaseTags collection. Send the full set of tags that
|
|
213
|
+
the ticket must end with:
|
|
214
|
+
|
|
215
|
+
- To keep a tag, include its entry with the CaseTag Uid that GET returned.
|
|
216
|
+
- To add a tag, include an entry that has no Uid and a Tag that holds the tag's Uid.
|
|
217
|
+
- To remove a tag, leave its entry out.
|
|
218
|
+
- To remove all tags, send an empty array.
|
|
219
|
+
|
|
220
|
+
If the body does not contain CaseTags, the current tags stay as they are. To read
|
|
221
|
+
the current tags, request them with the fields parameter, for example
|
|
222
|
+
fields=Uid,CaseTags.Uid,CaseTags.Tag.Uid,CaseTags.Tag.Name. To get the tags that are
|
|
223
|
+
available for tickets, use GET /attribute/tags?entityType=Case.
|
|
224
|
+
|
|
225
|
+
Case history is kept. Add replies and notes with their own endpoints.
|
|
226
|
+
* @summary Update a support ticket.
|
|
227
|
+
*/
|
|
228
|
+
export type caseUpdateCaseResponse200 = {
|
|
229
|
+
data: Case
|
|
230
|
+
status: 200
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export type caseUpdateCaseResponse400 = {
|
|
234
|
+
data: void
|
|
235
|
+
status: 400
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export type caseUpdateCaseResponse401 = {
|
|
239
|
+
data: void
|
|
240
|
+
status: 401
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type caseUpdateCaseResponse404 = {
|
|
244
|
+
data: void
|
|
245
|
+
status: 404
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export type caseUpdateCaseResponseSuccess = (caseUpdateCaseResponse200) & {
|
|
249
|
+
headers: Headers;
|
|
250
|
+
};
|
|
251
|
+
export type caseUpdateCaseResponseError = (caseUpdateCaseResponse400 | caseUpdateCaseResponse401 | caseUpdateCaseResponse404) & {
|
|
252
|
+
headers: Headers;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export type caseUpdateCaseResponse = (caseUpdateCaseResponseSuccess | caseUpdateCaseResponseError)
|
|
256
|
+
|
|
257
|
+
export const getCaseUpdateCaseUrl = (caseUid: string | null,) => {
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
return `/api/v1/support/cases/${caseUid}`
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export const caseUpdateCase = async (caseUid: string | null,
|
|
266
|
+
caseUpdateCaseBody: NonReadonly<CaseUpdateCaseBody>, options?: RequestInit): Promise<caseUpdateCaseResponse> => {
|
|
267
|
+
|
|
268
|
+
return customFetch<caseUpdateCaseResponse>(getCaseUpdateCaseUrl(caseUid),
|
|
269
|
+
{
|
|
270
|
+
...options,
|
|
271
|
+
method: 'PUT',
|
|
272
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
273
|
+
body: JSON.stringify(
|
|
274
|
+
caseUpdateCaseBody,)
|
|
275
|
+
}
|
|
276
|
+
);}
|
|
277
|
+
|
|
278
|
+
|
|
206
279
|
/**
|
|
207
280
|
* @summary Adds a reply from an agent to a support case.
|
|
208
281
|
*/
|