@outseta/api-client 0.3.36 → 0.3.38
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 +20 -0
- package/package.json +1 -1
- package/src/generated/attribute/attribute.ts +305 -1
- package/src/generated/models/caseTagAllOf.ts +0 -3
- package/src/generated/models/{caseTagAllOfCase.ts → caseUpdateCaseBody.ts} +1 -1
- package/src/generated/models/index.ts +13 -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/models/taskCreatedWebhookPayload.ts +5 -0
- package/src/generated/models/taskCreatedWebhookPayloadAllOf.ts +6 -0
- package/src/generated/models/taskCreatedWebhookPayloadAllOfTwo.ts +6 -0
- package/src/generated/models/taskUpdatedWebhookPayload.ts +5 -0
- package/src/generated/models/taskUpdatedWebhookPayloadAllOf.ts +6 -0
- package/src/generated/models/taskUpdatedWebhookPayloadAllOfTwo.ts +6 -0
- package/src/generated/models/taskWebhookEventData.ts +33 -0
- package/src/generated/models/taskWebhookEventDataStatus.ts +14 -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
|
};
|
|
@@ -1922,6 +1933,12 @@ var TaskStatus = {
|
|
|
1922
1933
|
InProgress: 2,
|
|
1923
1934
|
Done: 3
|
|
1924
1935
|
};
|
|
1936
|
+
// src/generated/models/taskWebhookEventDataStatus.ts
|
|
1937
|
+
var TaskWebhookEventDataStatus = {
|
|
1938
|
+
Pending: 1,
|
|
1939
|
+
InProgress: 2,
|
|
1940
|
+
Done: 3
|
|
1941
|
+
};
|
|
1925
1942
|
// src/generated/models/teamRole.ts
|
|
1926
1943
|
var TeamRole = {
|
|
1927
1944
|
Admin: 1,
|
|
@@ -1996,6 +2013,7 @@ export {
|
|
|
1996
2013
|
SupportCaseStatus,
|
|
1997
2014
|
TagColor,
|
|
1998
2015
|
TaskStatus,
|
|
2016
|
+
TaskWebhookEventDataStatus,
|
|
1999
2017
|
TeamRole,
|
|
2000
2018
|
accountAddAccount,
|
|
2001
2019
|
accountAddPersonToAccount,
|
|
@@ -2027,6 +2045,7 @@ export {
|
|
|
2027
2045
|
caseAddReply,
|
|
2028
2046
|
caseGetAllCases,
|
|
2029
2047
|
caseGetCase,
|
|
2048
|
+
caseUpdateCase,
|
|
2030
2049
|
categoryGetAllCategories,
|
|
2031
2050
|
createClient,
|
|
2032
2051
|
customFetch,
|
|
@@ -2090,6 +2109,7 @@ export {
|
|
|
2090
2109
|
getCaseAddReplyUrl,
|
|
2091
2110
|
getCaseGetAllCasesUrl,
|
|
2092
2111
|
getCaseGetCaseUrl,
|
|
2112
|
+
getCaseUpdateCaseUrl,
|
|
2093
2113
|
getCategoryGetAllCategoriesUrl,
|
|
2094
2114
|
getDealAddDealUrl,
|
|
2095
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
|
|
@@ -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';
|
|
@@ -717,9 +721,17 @@ export * from './taskAllOfAssignee';
|
|
|
717
721
|
export * from './taskAllOfDeal';
|
|
718
722
|
export * from './taskAllOfPerson';
|
|
719
723
|
export * from './taskAllOfType';
|
|
724
|
+
export * from './taskCreatedWebhookPayload';
|
|
725
|
+
export * from './taskCreatedWebhookPayloadAllOf';
|
|
726
|
+
export * from './taskCreatedWebhookPayloadAllOfTwo';
|
|
720
727
|
export * from './taskStatus';
|
|
721
728
|
export * from './taskType';
|
|
722
729
|
export * from './taskTypeAllOf';
|
|
730
|
+
export * from './taskUpdatedWebhookPayload';
|
|
731
|
+
export * from './taskUpdatedWebhookPayloadAllOf';
|
|
732
|
+
export * from './taskUpdatedWebhookPayloadAllOfTwo';
|
|
733
|
+
export * from './taskWebhookEventData';
|
|
734
|
+
export * from './taskWebhookEventDataStatus';
|
|
723
735
|
export * from './taxRate';
|
|
724
736
|
export * from './taxRateAllOf';
|
|
725
737
|
export * from './teamRole';
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { TaskCreatedWebhookPayloadAllOf } from './taskCreatedWebhookPayloadAllOf';
|
|
3
|
+
import type { TaskCreatedWebhookPayloadAllOfTwo } from './taskCreatedWebhookPayloadAllOfTwo';
|
|
4
|
+
|
|
5
|
+
export type TaskCreatedWebhookPayload = TaskCreatedWebhookPayloadAllOf & TaskCreatedWebhookPayloadAllOfTwo;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { DealWebhookEntity } from './dealWebhookEntity';
|
|
3
|
+
import type { PersonWebhookEntity } from './personWebhookEntity';
|
|
4
|
+
import type { AccountWebhookEntity } from './accountWebhookEntity';
|
|
5
|
+
|
|
6
|
+
export type TaskCreatedWebhookPayloadAllOf = DealWebhookEntity | PersonWebhookEntity | AccountWebhookEntity;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { TaskUpdatedWebhookPayloadAllOf } from './taskUpdatedWebhookPayloadAllOf';
|
|
3
|
+
import type { TaskUpdatedWebhookPayloadAllOfTwo } from './taskUpdatedWebhookPayloadAllOfTwo';
|
|
4
|
+
|
|
5
|
+
export type TaskUpdatedWebhookPayload = TaskUpdatedWebhookPayloadAllOf & TaskUpdatedWebhookPayloadAllOfTwo;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { DealWebhookEntity } from './dealWebhookEntity';
|
|
3
|
+
import type { PersonWebhookEntity } from './personWebhookEntity';
|
|
4
|
+
import type { AccountWebhookEntity } from './accountWebhookEntity';
|
|
5
|
+
|
|
6
|
+
export type TaskUpdatedWebhookPayloadAllOf = DealWebhookEntity | PersonWebhookEntity | AccountWebhookEntity;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { TaskWebhookEventDataStatus } from './taskWebhookEventDataStatus';
|
|
3
|
+
|
|
4
|
+
export interface TaskWebhookEventData {
|
|
5
|
+
/**
|
|
6
|
+
* @maxLength 10
|
|
7
|
+
* @nullable
|
|
8
|
+
*/
|
|
9
|
+
Uid?: string | null;
|
|
10
|
+
/** @nullable */
|
|
11
|
+
_objectType?: string | null;
|
|
12
|
+
/** @minLength 1 */
|
|
13
|
+
Created: string;
|
|
14
|
+
/** @minLength 1 */
|
|
15
|
+
Updated: string;
|
|
16
|
+
/**
|
|
17
|
+
* @maxLength 250
|
|
18
|
+
* @nullable
|
|
19
|
+
*/
|
|
20
|
+
Title?: string | null;
|
|
21
|
+
/** @nullable */
|
|
22
|
+
DueDate?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* @maxLength 5000
|
|
25
|
+
* @nullable
|
|
26
|
+
*/
|
|
27
|
+
Notes?: string | null;
|
|
28
|
+
/** `1` - Pending, `2` - InProgress, `3` - Done */
|
|
29
|
+
Status?: TaskWebhookEventDataStatus;
|
|
30
|
+
CreatedDateTime?: string;
|
|
31
|
+
/** @nullable */
|
|
32
|
+
CompletedDateTime?: string | null;
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `1` - Pending, `2` - InProgress, `3` - Done
|
|
5
|
+
*/
|
|
6
|
+
export type TaskWebhookEventDataStatus = typeof TaskWebhookEventDataStatus[keyof typeof TaskWebhookEventDataStatus];
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
10
|
+
export const TaskWebhookEventDataStatus = {
|
|
11
|
+
Pending: 1,
|
|
12
|
+
InProgress: 2,
|
|
13
|
+
Done: 3,
|
|
14
|
+
} as const;
|
|
@@ -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
|
*/
|