@devrev/typescript-sdk 1.1.3 → 1.1.5

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.
@@ -0,0 +1,1074 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ /*
5
+ * ---------------------------------------------------------------
6
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
7
+ * ## ##
8
+ * ## AUTHOR: acacode ##
9
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
10
+ * ---------------------------------------------------------------
11
+ */
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ var __importDefault = (this && this.__importDefault) || function (mod) {
33
+ return (mod && mod.__esModule) ? mod : { "default": mod };
34
+ };
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Api = exports.HttpClient = exports.ContentType = exports.WorkType = exports.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesCreateRequestType = exports.TimelineEntriesCollection = exports.TimelineCommentBodyType = exports.TicketSeverity = exports.TaskPriority = exports.SlaStatus = exports.SlaSelectorSeverity = exports.SlaSelectorPriority = exports.SlaSelectorAppliesTo = exports.SlaEvaluationPeriod = exports.SchemaFieldDescriptorFieldType = exports.SchemaFieldDescriptorArrayTypeBaseType = exports.PartType = exports.OrgType = exports.OrgScheduleStatus = exports.OrgScheduleFragmentStatus = exports.OrgEnvironment = exports.OpportunityPriority = exports.OpportunityForecastCategory = exports.MetricDefinitionMetricType = exports.MetricDefinitionAppliesTo = exports.ListMode = exports.LinksDirection = exports.LinkType = exports.LinkEndpointType = exports.IssuePriority = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorBadRequestType = exports.EngagementsCreateRequestEngagementType = exports.EngagementType = exports.CustomSchemaFragmentsSetRequestType = exports.ConversationsCreateRequestTypeValue = void 0;
37
+ var ConversationsCreateRequestTypeValue;
38
+ (function (ConversationsCreateRequestTypeValue) {
39
+ ConversationsCreateRequestTypeValue["Support"] = "support";
40
+ })(ConversationsCreateRequestTypeValue = exports.ConversationsCreateRequestTypeValue || (exports.ConversationsCreateRequestTypeValue = {}));
41
+ var CustomSchemaFragmentsSetRequestType;
42
+ (function (CustomSchemaFragmentsSetRequestType) {
43
+ CustomSchemaFragmentsSetRequestType["AppFragment"] = "app_fragment";
44
+ CustomSchemaFragmentsSetRequestType["CustomTypeFragment"] = "custom_type_fragment";
45
+ CustomSchemaFragmentsSetRequestType["TenantFragment"] = "tenant_fragment";
46
+ })(CustomSchemaFragmentsSetRequestType = exports.CustomSchemaFragmentsSetRequestType || (exports.CustomSchemaFragmentsSetRequestType = {}));
47
+ /** Type of engagement. */
48
+ var EngagementType;
49
+ (function (EngagementType) {
50
+ EngagementType["Call"] = "call";
51
+ EngagementType["Default"] = "default";
52
+ EngagementType["Email"] = "email";
53
+ EngagementType["LinkedIn"] = "linked_in";
54
+ EngagementType["Meeting"] = "meeting";
55
+ EngagementType["Offline"] = "offline";
56
+ EngagementType["Survey"] = "survey";
57
+ })(EngagementType = exports.EngagementType || (exports.EngagementType = {}));
58
+ /** The type of engagement. */
59
+ var EngagementsCreateRequestEngagementType;
60
+ (function (EngagementsCreateRequestEngagementType) {
61
+ EngagementsCreateRequestEngagementType["Call"] = "call";
62
+ EngagementsCreateRequestEngagementType["Default"] = "default";
63
+ EngagementsCreateRequestEngagementType["Email"] = "email";
64
+ EngagementsCreateRequestEngagementType["LinkedIn"] = "linked_in";
65
+ EngagementsCreateRequestEngagementType["Offline"] = "offline";
66
+ })(EngagementsCreateRequestEngagementType = exports.EngagementsCreateRequestEngagementType || (exports.EngagementsCreateRequestEngagementType = {}));
67
+ var ErrorBadRequestType;
68
+ (function (ErrorBadRequestType) {
69
+ ErrorBadRequestType["BadRequest"] = "bad_request";
70
+ ErrorBadRequestType["InvalidEnumValue"] = "invalid_enum_value";
71
+ ErrorBadRequestType["InvalidField"] = "invalid_field";
72
+ ErrorBadRequestType["MissingRequiredField"] = "missing_required_field";
73
+ ErrorBadRequestType["ParseError"] = "parse_error";
74
+ ErrorBadRequestType["ValueNotPermitted"] = "value_not_permitted";
75
+ })(ErrorBadRequestType = exports.ErrorBadRequestType || (exports.ErrorBadRequestType = {}));
76
+ var ErrorForbiddenType;
77
+ (function (ErrorForbiddenType) {
78
+ ErrorForbiddenType["Forbidden"] = "forbidden";
79
+ })(ErrorForbiddenType = exports.ErrorForbiddenType || (exports.ErrorForbiddenType = {}));
80
+ var ErrorInternalServerErrorType;
81
+ (function (ErrorInternalServerErrorType) {
82
+ ErrorInternalServerErrorType["InternalError"] = "internal_error";
83
+ })(ErrorInternalServerErrorType = exports.ErrorInternalServerErrorType || (exports.ErrorInternalServerErrorType = {}));
84
+ var ErrorNotFoundType;
85
+ (function (ErrorNotFoundType) {
86
+ ErrorNotFoundType["NotFound"] = "not_found";
87
+ })(ErrorNotFoundType = exports.ErrorNotFoundType || (exports.ErrorNotFoundType = {}));
88
+ var ErrorServiceUnavailableType;
89
+ (function (ErrorServiceUnavailableType) {
90
+ ErrorServiceUnavailableType["ServiceUnavailable"] = "service_unavailable";
91
+ })(ErrorServiceUnavailableType = exports.ErrorServiceUnavailableType || (exports.ErrorServiceUnavailableType = {}));
92
+ var ErrorTooManyRequestsType;
93
+ (function (ErrorTooManyRequestsType) {
94
+ ErrorTooManyRequestsType["TooManyRequests"] = "too_many_requests";
95
+ })(ErrorTooManyRequestsType = exports.ErrorTooManyRequestsType || (exports.ErrorTooManyRequestsType = {}));
96
+ var ErrorUnauthorizedType;
97
+ (function (ErrorUnauthorizedType) {
98
+ ErrorUnauthorizedType["Unauthenticated"] = "unauthenticated";
99
+ })(ErrorUnauthorizedType = exports.ErrorUnauthorizedType || (exports.ErrorUnauthorizedType = {}));
100
+ /** Priority of the work based upon impact and criticality. */
101
+ var IssuePriority;
102
+ (function (IssuePriority) {
103
+ IssuePriority["P0"] = "p0";
104
+ IssuePriority["P1"] = "p1";
105
+ IssuePriority["P2"] = "p2";
106
+ IssuePriority["P3"] = "p3";
107
+ })(IssuePriority = exports.IssuePriority || (exports.IssuePriority = {}));
108
+ var LinkEndpointType;
109
+ (function (LinkEndpointType) {
110
+ LinkEndpointType["Capability"] = "capability";
111
+ LinkEndpointType["Conversation"] = "conversation";
112
+ LinkEndpointType["Enhancement"] = "enhancement";
113
+ LinkEndpointType["Feature"] = "feature";
114
+ LinkEndpointType["Issue"] = "issue";
115
+ LinkEndpointType["Opportunity"] = "opportunity";
116
+ LinkEndpointType["Product"] = "product";
117
+ LinkEndpointType["Task"] = "task";
118
+ LinkEndpointType["Ticket"] = "ticket";
119
+ })(LinkEndpointType = exports.LinkEndpointType || (exports.LinkEndpointType = {}));
120
+ /** Type of link used to define the relationship. */
121
+ var LinkType;
122
+ (function (LinkType) {
123
+ LinkType["DevelopedWith"] = "developed_with";
124
+ LinkType["Imports"] = "imports";
125
+ LinkType["IsDependentOn"] = "is_dependent_on";
126
+ LinkType["IsDuplicateOf"] = "is_duplicate_of";
127
+ LinkType["IsParentOf"] = "is_parent_of";
128
+ LinkType["IsPartOf"] = "is_part_of";
129
+ LinkType["IsRelatedTo"] = "is_related_to";
130
+ LinkType["Serves"] = "serves";
131
+ })(LinkType = exports.LinkType || (exports.LinkType = {}));
132
+ /**
133
+ * The direction of link, which can either be outbound such that the
134
+ * object is the source of the link, otherwise inbound where the object is
135
+ * the target of the link.
136
+ */
137
+ var LinksDirection;
138
+ (function (LinksDirection) {
139
+ LinksDirection["IsSource"] = "is_source";
140
+ LinksDirection["IsTarget"] = "is_target";
141
+ })(LinksDirection = exports.LinksDirection || (exports.LinksDirection = {}));
142
+ /**
143
+ * The iteration mode to use. If "after", then entries after the provided
144
+ * cursor will be returned, or if no cursor is provided, then from the
145
+ * beginning. If "before", then entries before the provided cursor will be
146
+ * returned, or if no cursor is provided, then from the end. Entries will
147
+ * always be returned in the specified sort-by order.
148
+ */
149
+ var ListMode;
150
+ (function (ListMode) {
151
+ ListMode["After"] = "after";
152
+ ListMode["Before"] = "before";
153
+ })(ListMode = exports.ListMode || (exports.ListMode = {}));
154
+ /** The list of item types on which the metric might be applied. */
155
+ var MetricDefinitionAppliesTo;
156
+ (function (MetricDefinitionAppliesTo) {
157
+ MetricDefinitionAppliesTo["Conversation"] = "conversation";
158
+ MetricDefinitionAppliesTo["Issue"] = "issue";
159
+ MetricDefinitionAppliesTo["Task"] = "task";
160
+ MetricDefinitionAppliesTo["Ticket"] = "ticket";
161
+ })(MetricDefinitionAppliesTo = exports.MetricDefinitionAppliesTo || (exports.MetricDefinitionAppliesTo = {}));
162
+ /**
163
+ * The type of the metric. 'time' metrics track the time spent in some
164
+ * state, supporting operations like 'start', 'stop', 'pause', 'resume'.
165
+ * 'value' metrics track a value, supporting operations like 'set',
166
+ * 'increment', 'decrement'.
167
+ */
168
+ var MetricDefinitionMetricType;
169
+ (function (MetricDefinitionMetricType) {
170
+ MetricDefinitionMetricType["Time"] = "time";
171
+ MetricDefinitionMetricType["Value"] = "value";
172
+ })(MetricDefinitionMetricType = exports.MetricDefinitionMetricType || (exports.MetricDefinitionMetricType = {}));
173
+ /** Forecast category of the opportunity. */
174
+ var OpportunityForecastCategory;
175
+ (function (OpportunityForecastCategory) {
176
+ OpportunityForecastCategory["BestCase"] = "best_case";
177
+ OpportunityForecastCategory["Commit"] = "commit";
178
+ OpportunityForecastCategory["MostLikely"] = "most_likely";
179
+ OpportunityForecastCategory["Omitted"] = "omitted";
180
+ OpportunityForecastCategory["Pipeline"] = "pipeline";
181
+ OpportunityForecastCategory["Won"] = "won";
182
+ })(OpportunityForecastCategory = exports.OpportunityForecastCategory || (exports.OpportunityForecastCategory = {}));
183
+ /** Priority of the opportunity. */
184
+ var OpportunityPriority;
185
+ (function (OpportunityPriority) {
186
+ OpportunityPriority["P0"] = "p0";
187
+ OpportunityPriority["P1"] = "p1";
188
+ OpportunityPriority["P2"] = "p2";
189
+ OpportunityPriority["P3"] = "p3";
190
+ })(OpportunityPriority = exports.OpportunityPriority || (exports.OpportunityPriority = {}));
191
+ /** The environment of the Org. Defaults to 'production' if not specified. */
192
+ var OrgEnvironment;
193
+ (function (OrgEnvironment) {
194
+ OrgEnvironment["Production"] = "production";
195
+ OrgEnvironment["Staging"] = "staging";
196
+ OrgEnvironment["Test"] = "test";
197
+ })(OrgEnvironment = exports.OrgEnvironment || (exports.OrgEnvironment = {}));
198
+ /**
199
+ * Status determines how an item can be used. In 'draft' status an item
200
+ * can be edited but can't be used. When 'published' the item can longer
201
+ * be edited but can be used. 'Archived' is read-only.
202
+ */
203
+ var OrgScheduleFragmentStatus;
204
+ (function (OrgScheduleFragmentStatus) {
205
+ OrgScheduleFragmentStatus["Archived"] = "archived";
206
+ OrgScheduleFragmentStatus["Draft"] = "draft";
207
+ OrgScheduleFragmentStatus["Published"] = "published";
208
+ })(OrgScheduleFragmentStatus = exports.OrgScheduleFragmentStatus || (exports.OrgScheduleFragmentStatus = {}));
209
+ /**
210
+ * Status determines how an item can be used. In 'draft' status an item
211
+ * can be edited but can't be used. When 'published' the item can longer
212
+ * be edited but can be used. 'Archived' is read-only.
213
+ */
214
+ var OrgScheduleStatus;
215
+ (function (OrgScheduleStatus) {
216
+ OrgScheduleStatus["Archived"] = "archived";
217
+ OrgScheduleStatus["Draft"] = "draft";
218
+ OrgScheduleStatus["Published"] = "published";
219
+ })(OrgScheduleStatus = exports.OrgScheduleStatus || (exports.OrgScheduleStatus = {}));
220
+ var OrgType;
221
+ (function (OrgType) {
222
+ OrgType["Account"] = "account";
223
+ OrgType["RevOrg"] = "rev_org";
224
+ })(OrgType = exports.OrgType || (exports.OrgType = {}));
225
+ var PartType;
226
+ (function (PartType) {
227
+ PartType["Capability"] = "capability";
228
+ PartType["Enhancement"] = "enhancement";
229
+ PartType["Feature"] = "feature";
230
+ PartType["Product"] = "product";
231
+ })(PartType = exports.PartType || (exports.PartType = {}));
232
+ var SchemaFieldDescriptorArrayTypeBaseType;
233
+ (function (SchemaFieldDescriptorArrayTypeBaseType) {
234
+ SchemaFieldDescriptorArrayTypeBaseType["Bool"] = "bool";
235
+ SchemaFieldDescriptorArrayTypeBaseType["Composite"] = "composite";
236
+ SchemaFieldDescriptorArrayTypeBaseType["Date"] = "date";
237
+ SchemaFieldDescriptorArrayTypeBaseType["Double"] = "double";
238
+ SchemaFieldDescriptorArrayTypeBaseType["Enum"] = "enum";
239
+ SchemaFieldDescriptorArrayTypeBaseType["Id"] = "id";
240
+ SchemaFieldDescriptorArrayTypeBaseType["Int"] = "int";
241
+ SchemaFieldDescriptorArrayTypeBaseType["RichText"] = "rich_text";
242
+ SchemaFieldDescriptorArrayTypeBaseType["Text"] = "text";
243
+ SchemaFieldDescriptorArrayTypeBaseType["Timestamp"] = "timestamp";
244
+ SchemaFieldDescriptorArrayTypeBaseType["Tokens"] = "tokens";
245
+ })(SchemaFieldDescriptorArrayTypeBaseType = exports.SchemaFieldDescriptorArrayTypeBaseType || (exports.SchemaFieldDescriptorArrayTypeBaseType = {}));
246
+ var SchemaFieldDescriptorFieldType;
247
+ (function (SchemaFieldDescriptorFieldType) {
248
+ SchemaFieldDescriptorFieldType["Array"] = "array";
249
+ SchemaFieldDescriptorFieldType["Bool"] = "bool";
250
+ SchemaFieldDescriptorFieldType["Composite"] = "composite";
251
+ SchemaFieldDescriptorFieldType["Date"] = "date";
252
+ SchemaFieldDescriptorFieldType["Double"] = "double";
253
+ SchemaFieldDescriptorFieldType["Enum"] = "enum";
254
+ SchemaFieldDescriptorFieldType["Id"] = "id";
255
+ SchemaFieldDescriptorFieldType["Int"] = "int";
256
+ SchemaFieldDescriptorFieldType["RichText"] = "rich_text";
257
+ SchemaFieldDescriptorFieldType["Text"] = "text";
258
+ SchemaFieldDescriptorFieldType["Timestamp"] = "timestamp";
259
+ SchemaFieldDescriptorFieldType["Tokens"] = "tokens";
260
+ })(SchemaFieldDescriptorFieldType = exports.SchemaFieldDescriptorFieldType || (exports.SchemaFieldDescriptorFieldType = {}));
261
+ /**
262
+ * Specifies the frequency of when the contractually-meaningful evaluation
263
+ * of the SLA happens. The organization for their own information might
264
+ * evaluate the various metrics contained in the policy as often as we can
265
+ * make it feasible for them, but only the evaluation at the end of the
266
+ * evaluation period triggers a compensation and needs to be shared with
267
+ * the customer.
268
+ */
269
+ var SlaEvaluationPeriod;
270
+ (function (SlaEvaluationPeriod) {
271
+ SlaEvaluationPeriod["Monthly"] = "monthly";
272
+ SlaEvaluationPeriod["Quarterly"] = "quarterly";
273
+ SlaEvaluationPeriod["Weekly"] = "weekly";
274
+ SlaEvaluationPeriod["Yearly"] = "yearly";
275
+ })(SlaEvaluationPeriod = exports.SlaEvaluationPeriod || (exports.SlaEvaluationPeriod = {}));
276
+ /** The item type for which the SLA policy applies. */
277
+ var SlaSelectorAppliesTo;
278
+ (function (SlaSelectorAppliesTo) {
279
+ SlaSelectorAppliesTo["Conversation"] = "conversation";
280
+ SlaSelectorAppliesTo["Ticket"] = "ticket";
281
+ })(SlaSelectorAppliesTo = exports.SlaSelectorAppliesTo || (exports.SlaSelectorAppliesTo = {}));
282
+ /** Th SLA policy applies to conversations with these priorities. */
283
+ var SlaSelectorPriority;
284
+ (function (SlaSelectorPriority) {
285
+ SlaSelectorPriority["P0"] = "p0";
286
+ SlaSelectorPriority["P1"] = "p1";
287
+ SlaSelectorPriority["P2"] = "p2";
288
+ })(SlaSelectorPriority = exports.SlaSelectorPriority || (exports.SlaSelectorPriority = {}));
289
+ /** The SLA policy applies to tickets with these severities. */
290
+ var SlaSelectorSeverity;
291
+ (function (SlaSelectorSeverity) {
292
+ SlaSelectorSeverity["Blocker"] = "blocker";
293
+ SlaSelectorSeverity["High"] = "high";
294
+ SlaSelectorSeverity["Low"] = "low";
295
+ SlaSelectorSeverity["Medium"] = "medium";
296
+ })(SlaSelectorSeverity = exports.SlaSelectorSeverity || (exports.SlaSelectorSeverity = {}));
297
+ /**
298
+ * Status determines how an item can be used. In 'draft' status an item
299
+ * can be edited but can't be used. When 'published' the item can longer
300
+ * be edited but can be used. 'Archived' is read-only.
301
+ */
302
+ var SlaStatus;
303
+ (function (SlaStatus) {
304
+ SlaStatus["Archived"] = "archived";
305
+ SlaStatus["Draft"] = "draft";
306
+ SlaStatus["Published"] = "published";
307
+ })(SlaStatus = exports.SlaStatus || (exports.SlaStatus = {}));
308
+ /** Priority of the work based upon impact and criticality. */
309
+ var TaskPriority;
310
+ (function (TaskPriority) {
311
+ TaskPriority["P0"] = "p0";
312
+ TaskPriority["P1"] = "p1";
313
+ TaskPriority["P2"] = "p2";
314
+ TaskPriority["P3"] = "p3";
315
+ })(TaskPriority = exports.TaskPriority || (exports.TaskPriority = {}));
316
+ /** Severity of the ticket. */
317
+ var TicketSeverity;
318
+ (function (TicketSeverity) {
319
+ TicketSeverity["Blocker"] = "blocker";
320
+ TicketSeverity["High"] = "high";
321
+ TicketSeverity["Low"] = "low";
322
+ TicketSeverity["Medium"] = "medium";
323
+ })(TicketSeverity = exports.TicketSeverity || (exports.TicketSeverity = {}));
324
+ /** The type of the body to use for the comment. */
325
+ var TimelineCommentBodyType;
326
+ (function (TimelineCommentBodyType) {
327
+ TimelineCommentBodyType["SnapKit"] = "snap_kit";
328
+ TimelineCommentBodyType["Text"] = "text";
329
+ })(TimelineCommentBodyType = exports.TimelineCommentBodyType || (exports.TimelineCommentBodyType = {}));
330
+ /** Describes collections of timeline entries. */
331
+ var TimelineEntriesCollection;
332
+ (function (TimelineEntriesCollection) {
333
+ TimelineEntriesCollection["Discussions"] = "discussions";
334
+ TimelineEntriesCollection["Events"] = "events";
335
+ })(TimelineEntriesCollection = exports.TimelineEntriesCollection || (exports.TimelineEntriesCollection = {}));
336
+ var TimelineEntriesCreateRequestType;
337
+ (function (TimelineEntriesCreateRequestType) {
338
+ TimelineEntriesCreateRequestType["TimelineComment"] = "timeline_comment";
339
+ })(TimelineEntriesCreateRequestType = exports.TimelineEntriesCreateRequestType || (exports.TimelineEntriesCreateRequestType = {}));
340
+ /** The type of object that the Timeline entry belongs to. */
341
+ var TimelineEntryObjectType;
342
+ (function (TimelineEntryObjectType) {
343
+ TimelineEntryObjectType["Account"] = "account";
344
+ TimelineEntryObjectType["Capability"] = "capability";
345
+ TimelineEntryObjectType["Conversation"] = "conversation";
346
+ TimelineEntryObjectType["Enhancement"] = "enhancement";
347
+ TimelineEntryObjectType["Feature"] = "feature";
348
+ TimelineEntryObjectType["Issue"] = "issue";
349
+ TimelineEntryObjectType["Opportunity"] = "opportunity";
350
+ TimelineEntryObjectType["Product"] = "product";
351
+ TimelineEntryObjectType["RevOrg"] = "rev_org";
352
+ TimelineEntryObjectType["RevUser"] = "rev_user";
353
+ TimelineEntryObjectType["Task"] = "task";
354
+ TimelineEntryObjectType["Ticket"] = "ticket";
355
+ TimelineEntryObjectType["TimelineComment"] = "timeline_comment";
356
+ })(TimelineEntryObjectType = exports.TimelineEntryObjectType || (exports.TimelineEntryObjectType = {}));
357
+ var TimelineEntryType;
358
+ (function (TimelineEntryType) {
359
+ TimelineEntryType["TimelineComment"] = "timeline_comment";
360
+ })(TimelineEntryType = exports.TimelineEntryType || (exports.TimelineEntryType = {}));
361
+ /**
362
+ * The visibility of the entry. If 'private', then the entry is only
363
+ * visible to the creator, 'internal' is visible with the Dev
364
+ * organization, 'external' is visible to the Dev organzation and Rev
365
+ * users, and 'public' is visible to all. If not set, then the default
366
+ * visibility is 'external'.
367
+ */
368
+ var TimelineEntryVisibility;
369
+ (function (TimelineEntryVisibility) {
370
+ TimelineEntryVisibility["External"] = "external";
371
+ TimelineEntryVisibility["Internal"] = "internal";
372
+ TimelineEntryVisibility["Private"] = "private";
373
+ TimelineEntryVisibility["Public"] = "public";
374
+ })(TimelineEntryVisibility = exports.TimelineEntryVisibility || (exports.TimelineEntryVisibility = {}));
375
+ /** State of the user. */
376
+ var UserState;
377
+ (function (UserState) {
378
+ UserState["Active"] = "active";
379
+ UserState["Deactivated"] = "deactivated";
380
+ UserState["Locked"] = "locked";
381
+ UserState["Shadow"] = "shadow";
382
+ UserState["Unassigned"] = "unassigned";
383
+ })(UserState = exports.UserState || (exports.UserState = {}));
384
+ var UserType;
385
+ (function (UserType) {
386
+ UserType["DevUser"] = "dev_user";
387
+ UserType["RevUser"] = "rev_user";
388
+ UserType["SysUser"] = "sys_user";
389
+ })(UserType = exports.UserType || (exports.UserType = {}));
390
+ var WorkType;
391
+ (function (WorkType) {
392
+ WorkType["Issue"] = "issue";
393
+ WorkType["Opportunity"] = "opportunity";
394
+ WorkType["Task"] = "task";
395
+ WorkType["Ticket"] = "ticket";
396
+ })(WorkType = exports.WorkType || (exports.WorkType = {}));
397
+ const axios_1 = __importDefault(require("axios"));
398
+ var ContentType;
399
+ (function (ContentType) {
400
+ ContentType["Json"] = "application/json";
401
+ ContentType["FormData"] = "multipart/form-data";
402
+ ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
403
+ ContentType["Text"] = "text/plain";
404
+ })(ContentType = exports.ContentType || (exports.ContentType = {}));
405
+ class HttpClient {
406
+ constructor(_a = {}) {
407
+ var { securityWorker, secure, format } = _a, axiosConfig = __rest(_a, ["securityWorker", "secure", "format"]);
408
+ this.securityData = null;
409
+ this.setSecurityData = (data) => {
410
+ this.securityData = data;
411
+ };
412
+ this.request = (_b) => __awaiter(this, void 0, void 0, function* () {
413
+ var { secure, path, type, query, format, body } = _b, params = __rest(_b, ["secure", "path", "type", "query", "format", "body"]);
414
+ const secureParams = ((typeof secure === 'boolean' ? secure : this.secure) &&
415
+ this.securityWorker &&
416
+ (yield this.securityWorker(this.securityData))) ||
417
+ {};
418
+ const requestParams = this.mergeRequestParams(params, secureParams);
419
+ const responseFormat = format || this.format || undefined;
420
+ if (type === ContentType.FormData &&
421
+ body &&
422
+ body !== null &&
423
+ typeof body === 'object') {
424
+ body = this.createFormData(body);
425
+ }
426
+ if (type === ContentType.Text &&
427
+ body &&
428
+ body !== null &&
429
+ typeof body !== 'string') {
430
+ body = JSON.stringify(body);
431
+ }
432
+ return this.instance.request(Object.assign(Object.assign({}, requestParams), { headers: Object.assign(Object.assign({}, (requestParams.headers || {})), (type && type !== ContentType.FormData
433
+ ? { 'Content-Type': type }
434
+ : {})), params: query, responseType: responseFormat, data: body, url: path }));
435
+ });
436
+ this.instance = axios_1.default.create(Object.assign(Object.assign({}, axiosConfig), { baseURL: axiosConfig.baseURL || '{protocol}://{hostname}' }));
437
+ this.secure = secure;
438
+ this.format = format;
439
+ this.securityWorker = securityWorker;
440
+ }
441
+ mergeRequestParams(params1, params2) {
442
+ const method = params1.method || (params2 && params2.method);
443
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, this.instance.defaults), params1), (params2 || {})), { headers: Object.assign(Object.assign(Object.assign({}, ((method &&
444
+ this.instance.defaults.headers[method.toLowerCase()]) ||
445
+ {})), (params1.headers || {})), ((params2 && params2.headers) || {})) });
446
+ }
447
+ stringifyFormItem(formItem) {
448
+ if (typeof formItem === 'object' && formItem !== null) {
449
+ return JSON.stringify(formItem);
450
+ }
451
+ else {
452
+ return `${formItem}`;
453
+ }
454
+ }
455
+ createFormData(input) {
456
+ return Object.keys(input || {}).reduce((formData, key) => {
457
+ const property = input[key];
458
+ const propertyContent = property instanceof Array ? property : [property];
459
+ for (const formItem of propertyContent) {
460
+ const isFileType = formItem instanceof Blob || formItem instanceof File;
461
+ formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
462
+ }
463
+ return formData;
464
+ }, new FormData());
465
+ }
466
+ }
467
+ exports.HttpClient = HttpClient;
468
+ /**
469
+ * @title DevRev Beta REST API
470
+ * @version BETA
471
+ * @baseUrl {protocol}://{hostname}
472
+ *
473
+ * DevRev's BETA REST API Specification.
474
+ */
475
+ class Api extends HttpClient {
476
+ constructor() {
477
+ super(...arguments);
478
+ /**
479
+ * @description Creates an account, which is a record representing a customer or an organization.
480
+ *
481
+ * @tags accounts
482
+ * @name AccountsCreate
483
+ * @request POST:/accounts.create
484
+ * @secure
485
+ */
486
+ this.accountsCreate = (data, params = {}) => this.request(Object.assign({ path: `/accounts.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
487
+ /**
488
+ * @description Deletes an account.
489
+ *
490
+ * @tags accounts
491
+ * @name AccountsDelete
492
+ * @request POST:/accounts.delete
493
+ * @secure
494
+ */
495
+ this.accountsDelete = (data, params = {}) => this.request(Object.assign({ path: `/accounts.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
496
+ /**
497
+ * @description Exports a collection of accounts.
498
+ *
499
+ * @tags accounts
500
+ * @name AccountsExport
501
+ * @request GET:/accounts.export
502
+ * @secure
503
+ */
504
+ this.accountsExport = (query, params = {}) => this.request(Object.assign({ path: `/accounts.export`, method: 'GET', query: query, secure: true, format: 'json' }, params));
505
+ /**
506
+ * @description Retrieves an account's information.
507
+ *
508
+ * @tags accounts
509
+ * @name AccountsGet
510
+ * @request GET:/accounts.get
511
+ * @secure
512
+ */
513
+ this.accountsGet = (query, params = {}) => this.request(Object.assign({ path: `/accounts.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
514
+ /**
515
+ * @description Gets a list of accounts.
516
+ *
517
+ * @tags accounts
518
+ * @name AccountsList
519
+ * @request GET:/accounts.list
520
+ * @secure
521
+ */
522
+ this.accountsList = (query, params = {}) => this.request(Object.assign({ path: `/accounts.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
523
+ /**
524
+ * @description Updates an account's information.
525
+ *
526
+ * @tags accounts
527
+ * @name AccountsUpdate
528
+ * @request POST:/accounts.update
529
+ * @secure
530
+ */
531
+ this.accountsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/accounts.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
532
+ /**
533
+ * @description Creates a conversation.
534
+ *
535
+ * @tags conversations
536
+ * @name ConversationsCreate
537
+ * @request POST:/conversations.create
538
+ * @secure
539
+ */
540
+ this.conversationsCreate = (data, params = {}) => this.request(Object.assign({ path: `/conversations.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
541
+ /**
542
+ * @description Deletes the requested conversation.
543
+ *
544
+ * @tags conversations
545
+ * @name ConversationsDelete
546
+ * @request POST:/conversations.delete
547
+ * @secure
548
+ */
549
+ this.conversationsDelete = (data, params = {}) => this.request(Object.assign({ path: `/conversations.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
550
+ /**
551
+ * @description Exports a collection of conversation items.
552
+ *
553
+ * @tags conversations
554
+ * @name ConversationsExport
555
+ * @request GET:/conversations.export
556
+ * @secure
557
+ */
558
+ this.conversationsExport = (query, params = {}) => this.request(Object.assign({ path: `/conversations.export`, method: 'GET', query: query, secure: true, format: 'json' }, params));
559
+ /**
560
+ * @description Gets the requested conversation's information.
561
+ *
562
+ * @tags conversations
563
+ * @name ConversationsGet
564
+ * @request GET:/conversations.get
565
+ * @secure
566
+ */
567
+ this.conversationsGet = (query, params = {}) => this.request(Object.assign({ path: `/conversations.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
568
+ /**
569
+ * @description Lists the available conversations.
570
+ *
571
+ * @tags conversations
572
+ * @name ConversationsList
573
+ * @request GET:/conversations.list
574
+ * @secure
575
+ */
576
+ this.conversationsList = (query, params = {}) => this.request(Object.assign({ path: `/conversations.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
577
+ /**
578
+ * @description Updates the requested conversation.
579
+ *
580
+ * @tags conversations
581
+ * @name ConversationsUpdate
582
+ * @request POST:/conversations.update
583
+ * @secure
584
+ */
585
+ this.conversationsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/conversations.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
586
+ /**
587
+ * @description Counts the engagement records.
588
+ *
589
+ * @tags engagements
590
+ * @name EngagementsCount
591
+ * @request GET:/engagements.count
592
+ * @secure
593
+ */
594
+ this.engagementsCount = (query, params = {}) => this.request(Object.assign({ path: `/engagements.count`, method: 'GET', query: query, secure: true, format: 'json' }, params));
595
+ /**
596
+ * @description Creates a new engagement record.
597
+ *
598
+ * @tags engagements
599
+ * @name EngagementsCreate
600
+ * @request POST:/engagements.create
601
+ * @secure
602
+ */
603
+ this.engagementsCreate = (data, params = {}) => this.request(Object.assign({ path: `/engagements.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
604
+ /**
605
+ * @description Deletes the engagement record.
606
+ *
607
+ * @tags engagements
608
+ * @name EngagementsDelete
609
+ * @request POST:/engagements.delete
610
+ * @secure
611
+ */
612
+ this.engagementsDelete = (data, params = {}) => this.request(Object.assign({ path: `/engagements.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
613
+ /**
614
+ * @description Gets the engagement record.
615
+ *
616
+ * @tags engagements
617
+ * @name EngagementsGet
618
+ * @request GET:/engagements.get
619
+ * @secure
620
+ */
621
+ this.engagementsGet = (query, params = {}) => this.request(Object.assign({ path: `/engagements.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
622
+ /**
623
+ * @description Lists the engagement records.
624
+ *
625
+ * @tags engagements
626
+ * @name EngagementsList
627
+ * @request GET:/engagements.list
628
+ * @secure
629
+ */
630
+ this.engagementsList = (query, params = {}) => this.request(Object.assign({ path: `/engagements.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
631
+ /**
632
+ * @description Updates the engagement record.
633
+ *
634
+ * @tags engagements
635
+ * @name EngagementsUpdate
636
+ * @request POST:/engagements.update
637
+ * @secure
638
+ */
639
+ this.engagementsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/engagements.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
640
+ /**
641
+ * @description Schedules an event to be published to the specified event source.
642
+ *
643
+ * @tags event-source
644
+ * @name EventSourcesScheduleEvent
645
+ * @request POST:/event-sources.schedule
646
+ * @secure
647
+ */
648
+ this.eventSourcesScheduleEvent = (data, params = {}) => this.request(Object.assign({ path: `/event-sources.schedule`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
649
+ /**
650
+ * @description Deletes an event scheduled for the specified event source.
651
+ *
652
+ * @tags event-source
653
+ * @name EventSourcesDeleteScheduledEvent
654
+ * @request POST:/event-sources.unschedule
655
+ * @secure
656
+ */
657
+ this.eventSourcesDeleteScheduledEvent = (data, params = {}) => this.request(Object.assign({ path: `/event-sources.unschedule`, method: 'POST', body: data, secure: true, type: ContentType.Json }, params));
658
+ /**
659
+ * @description Creates a link between two objects to indicate a relationship.
660
+ *
661
+ * @tags links
662
+ * @name LinksCreate
663
+ * @request POST:/links.create
664
+ * @secure
665
+ */
666
+ this.linksCreate = (data, params = {}) => this.request(Object.assign({ path: `/links.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
667
+ /**
668
+ * @description Deletes a link.
669
+ *
670
+ * @tags links
671
+ * @name LinksDelete
672
+ * @request POST:/links.delete
673
+ * @secure
674
+ */
675
+ this.linksDelete = (data, params = {}) => this.request(Object.assign({ path: `/links.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
676
+ /**
677
+ * @description Gets the requested link's information.
678
+ *
679
+ * @tags links
680
+ * @name LinksGet
681
+ * @request GET:/links.get
682
+ * @secure
683
+ */
684
+ this.linksGet = (query, params = {}) => this.request(Object.assign({ path: `/links.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
685
+ /**
686
+ * @description Lists the available links.
687
+ *
688
+ * @tags links
689
+ * @name LinksList
690
+ * @request GET:/links.list
691
+ * @secure
692
+ */
693
+ this.linksList = (query, params = {}) => this.request(Object.assign({ path: `/links.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
694
+ /**
695
+ * @description Lists metric definitions matching a filter.
696
+ *
697
+ * @tags slas
698
+ * @name MetricDefinitionsList
699
+ * @request GET:/metric-definitions.list
700
+ * @secure
701
+ */
702
+ this.metricDefinitionsList = (query, params = {}) => this.request(Object.assign({ path: `/metric-definitions.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
703
+ /**
704
+ * @description Creates an organization schedule fragment.
705
+ *
706
+ * @tags schedules
707
+ * @name OrgScheduleFragmentsCreate
708
+ * @request POST:/org-schedule-fragments.create
709
+ * @secure
710
+ */
711
+ this.orgScheduleFragmentsCreate = (data, params = {}) => this.request(Object.assign({ path: `/org-schedule-fragments.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
712
+ /**
713
+ * @description Gets an organization schedule fragment.
714
+ *
715
+ * @tags schedules
716
+ * @name OrgScheduleFragmentsGet
717
+ * @request GET:/org-schedule-fragments.get
718
+ * @secure
719
+ */
720
+ this.orgScheduleFragmentsGet = (query, params = {}) => this.request(Object.assign({ path: `/org-schedule-fragments.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
721
+ /**
722
+ * @description Changes stage of an organization schedule fragment.
723
+ *
724
+ * @tags schedules
725
+ * @name OrgScheduleFragmentsTransition
726
+ * @request POST:/org-schedule-fragments.transition
727
+ * @secure
728
+ */
729
+ this.orgScheduleFragmentsTransition = (data, params = {}) => this.request(Object.assign({ path: `/org-schedule-fragments.transition`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
730
+ /**
731
+ * @description Creates an organization schedule with a default weekly organization schedule and a list of organization schedule fragments.
732
+ *
733
+ * @tags schedules
734
+ * @name OrgSchedulesCreate
735
+ * @request POST:/org-schedules.create
736
+ * @secure
737
+ */
738
+ this.orgSchedulesCreate = (data, params = {}) => this.request(Object.assign({ path: `/org-schedules.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
739
+ /**
740
+ * @description Gets an organization schedule.
741
+ *
742
+ * @tags schedules
743
+ * @name OrgSchedulesGet
744
+ * @request GET:/org-schedules.get
745
+ * @secure
746
+ */
747
+ this.orgSchedulesGet = (query, params = {}) => this.request(Object.assign({ path: `/org-schedules.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
748
+ /**
749
+ * @description Gets list of organization schedules.
750
+ *
751
+ * @tags schedules
752
+ * @name OrgSchedulesList
753
+ * @request GET:/org-schedules.list
754
+ * @secure
755
+ */
756
+ this.orgSchedulesList = (query, params = {}) => this.request(Object.assign({ path: `/org-schedules.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
757
+ /**
758
+ * @description Sets next organization schedule fragment which must begin the day the last existing fragment ends.
759
+ *
760
+ * @tags schedules
761
+ * @name OrgSchedulesSetFuture
762
+ * @request POST:/org-schedules.set-future
763
+ * @secure
764
+ */
765
+ this.orgSchedulesSetFuture = (data, params = {}) => this.request(Object.assign({ path: `/org-schedules.set-future`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
766
+ /**
767
+ * @description Publishes or archives an organization schedule.
768
+ *
769
+ * @tags schedules
770
+ * @name OrgSchedulesTransition
771
+ * @request POST:/org-schedules.transition
772
+ * @secure
773
+ */
774
+ this.orgSchedulesTransition = (data, params = {}) => this.request(Object.assign({ path: `/org-schedules.transition`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
775
+ /**
776
+ * @description Updates an organization schedule.
777
+ *
778
+ * @tags schedules
779
+ * @name OrgSchedulesUpdate
780
+ * @request POST:/org-schedules.update
781
+ * @secure
782
+ */
783
+ this.orgSchedulesUpdate = (data, params = {}) => this.request(Object.assign({ path: `/org-schedules.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
784
+ /**
785
+ * @description Creates a Rev organization in the authenticated user's Dev organization.
786
+ *
787
+ * @tags rev-orgs
788
+ * @name RevOrgsCreate
789
+ * @request POST:/rev-orgs.create
790
+ * @secure
791
+ */
792
+ this.revOrgsCreate = (data, params = {}) => this.request(Object.assign({ path: `/rev-orgs.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
793
+ /**
794
+ * @description Retrieves the Rev organization's information.
795
+ *
796
+ * @tags rev-orgs
797
+ * @name RevOrgsGet
798
+ * @request GET:/rev-orgs.get
799
+ * @secure
800
+ */
801
+ this.revOrgsGet = (query, params = {}) => this.request(Object.assign({ path: `/rev-orgs.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
802
+ /**
803
+ * @description Gets the list of Rev organizations' information belonging to the authenticated user's Dev Organization which the user is also authorized to access.
804
+ *
805
+ * @tags rev-orgs
806
+ * @name RevOrgsList
807
+ * @request GET:/rev-orgs.list
808
+ * @secure
809
+ */
810
+ this.revOrgsList = (query, params = {}) => this.request(Object.assign({ path: `/rev-orgs.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
811
+ /**
812
+ * @description Updates the Rev organization's information.
813
+ *
814
+ * @tags rev-orgs
815
+ * @name RevOrgsUpdate
816
+ * @request POST:/rev-orgs.update
817
+ * @secure
818
+ */
819
+ this.revOrgsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/rev-orgs.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
820
+ /**
821
+ * @description Creates a Rev user for a Rev organization. Rev user can be a customer or a lead of an organization.
822
+ *
823
+ * @tags rev-users
824
+ * @name RevUsersCreate
825
+ * @request POST:/rev-users.create
826
+ * @secure
827
+ */
828
+ this.revUsersCreate = (data, params = {}) => this.request(Object.assign({ path: `/rev-users.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
829
+ /**
830
+ * @description Deletes a Rev user.
831
+ *
832
+ * @tags rev-users
833
+ * @name RevUsersDelete
834
+ * @request POST:/rev-users.delete
835
+ * @secure
836
+ */
837
+ this.revUsersDelete = (data, params = {}) => this.request(Object.assign({ path: `/rev-users.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
838
+ /**
839
+ * @description Returns the Rev user of a Rev organization by its ID.
840
+ *
841
+ * @tags rev-users
842
+ * @name RevUsersGet
843
+ * @request GET:/rev-users.get
844
+ * @secure
845
+ */
846
+ this.revUsersGet = (query, params = {}) => this.request(Object.assign({ path: `/rev-users.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
847
+ /**
848
+ * @description Links a rev user to a rev org.
849
+ *
850
+ * @tags rev-users
851
+ * @name LinkRevUserToRevOrg
852
+ * @request POST:/rev-users.link
853
+ * @secure
854
+ */
855
+ this.linkRevUserToRevOrg = (data, params = {}) => this.request(Object.assign({ path: `/rev-users.link`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
856
+ /**
857
+ * @description Returns a list of all Rev Users belonging to the authenticated user's Dev Organization.
858
+ *
859
+ * @tags rev-users
860
+ * @name RevUsersList
861
+ * @request GET:/rev-users.list
862
+ * @secure
863
+ */
864
+ this.revUsersList = (query, params = {}) => this.request(Object.assign({ path: `/rev-users.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
865
+ /**
866
+ * @description Unlinks a rev user from a rev org.
867
+ *
868
+ * @tags rev-users
869
+ * @name UnlinkRevUserFromRevOrg
870
+ * @request POST:/rev-users.unlink
871
+ * @secure
872
+ */
873
+ this.unlinkRevUserFromRevOrg = (data, params = {}) => this.request(Object.assign({ path: `/rev-users.unlink`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
874
+ /**
875
+ * @description Updates a Rev user.
876
+ *
877
+ * @tags rev-users
878
+ * @name RevUsersUpdate
879
+ * @request POST:/rev-users.update
880
+ * @secure
881
+ */
882
+ this.revUsersUpdate = (data, params = {}) => this.request(Object.assign({ path: `/rev-users.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
883
+ /**
884
+ * @description Gets the aggregated schema.
885
+ *
886
+ * @tags customization
887
+ * @name AggregatedSchemaGet
888
+ * @request GET:/schemas.aggregated.get
889
+ * @secure
890
+ */
891
+ this.aggregatedSchemaGet = (query, params = {}) => this.request(Object.assign({ path: `/schemas.aggregated.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
892
+ /**
893
+ * @description Gets a custom schema fragment.
894
+ *
895
+ * @tags customization
896
+ * @name CustomSchemaFragmentsGet
897
+ * @request GET:/schemas.custom.get
898
+ * @secure
899
+ */
900
+ this.customSchemaFragmentsGet = (query, params = {}) => this.request(Object.assign({ path: `/schemas.custom.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
901
+ /**
902
+ * @description Lists custom schema fragments.
903
+ *
904
+ * @tags customization
905
+ * @name CustomSchemaFragmentsList
906
+ * @request GET:/schemas.custom.list
907
+ * @secure
908
+ */
909
+ this.customSchemaFragmentsList = (query, params = {}) => this.request(Object.assign({ path: `/schemas.custom.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
910
+ /**
911
+ * @description Creates or updates a custom schema fragment.
912
+ *
913
+ * @tags customization
914
+ * @name CustomSchemaFragmentsSet
915
+ * @request POST:/schemas.custom.set
916
+ * @secure
917
+ */
918
+ this.customSchemaFragmentsSet = (data, params = {}) => this.request(Object.assign({ path: `/schemas.custom.set`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
919
+ /**
920
+ * @description Lists subtypes.
921
+ *
922
+ * @tags customization
923
+ * @name SubtypesList
924
+ * @request GET:/schemas.subtypes.list
925
+ * @secure
926
+ */
927
+ this.subtypesList = (query, params = {}) => this.request(Object.assign({ path: `/schemas.subtypes.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
928
+ /**
929
+ * @description Assigns the SLA to a set of Rev organizations.
930
+ *
931
+ * @tags slas
932
+ * @name SlasAssign
933
+ * @request POST:/slas.assign
934
+ * @secure
935
+ */
936
+ this.slasAssign = (data, params = {}) => this.request(Object.assign({ path: `/slas.assign`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
937
+ /**
938
+ * @description Creates an SLA in draft status.
939
+ *
940
+ * @tags slas
941
+ * @name SlasCreate
942
+ * @request POST:/slas.create
943
+ * @secure
944
+ */
945
+ this.slasCreate = (data, params = {}) => this.request(Object.assign({ path: `/slas.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
946
+ /**
947
+ * @description Gets an SLA.
948
+ *
949
+ * @tags slas
950
+ * @name SlasGet
951
+ * @request GET:/slas.get
952
+ * @secure
953
+ */
954
+ this.slasGet = (query, params = {}) => this.request(Object.assign({ path: `/slas.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
955
+ /**
956
+ * @description Lists SLAs matching a filter.
957
+ *
958
+ * @tags slas
959
+ * @name SlasList
960
+ * @request GET:/slas.list
961
+ * @secure
962
+ */
963
+ this.slasList = (query, params = {}) => this.request(Object.assign({ path: `/slas.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
964
+ /**
965
+ * @description Changes the status of an SLA.
966
+ *
967
+ * @tags slas
968
+ * @name SlasTransition
969
+ * @request POST:/slas.transition
970
+ * @secure
971
+ */
972
+ this.slasTransition = (data, params = {}) => this.request(Object.assign({ path: `/slas.transition`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
973
+ /**
974
+ * @description Updates a draft SLA.
975
+ *
976
+ * @tags slas
977
+ * @name SlasUpdate
978
+ * @request POST:/slas.update
979
+ * @secure
980
+ */
981
+ this.slasUpdate = (data, params = {}) => this.request(Object.assign({ path: `/slas.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
982
+ /**
983
+ * @description Lists system users within your organization.
984
+ *
985
+ * @tags sys-users
986
+ * @name SysUsersList
987
+ * @request GET:/sys-users.list
988
+ * @secure
989
+ */
990
+ this.sysUsersList = (query, params = {}) => this.request(Object.assign({ path: `/sys-users.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
991
+ /**
992
+ * @description Updates the system user.
993
+ *
994
+ * @tags sys-users
995
+ * @name SysUsersUpdate
996
+ * @request POST:/sys-users.update
997
+ * @secure
998
+ */
999
+ this.sysUsersUpdate = (data, params = {}) => this.request(Object.assign({ path: `/sys-users.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1000
+ /**
1001
+ * @description Creates a new entry on an object's timeline.
1002
+ *
1003
+ * @tags timeline-entries
1004
+ * @name TimelineEntriesCreate
1005
+ * @request POST:/timeline-entries.create
1006
+ * @secure
1007
+ */
1008
+ this.timelineEntriesCreate = (data, params = {}) => this.request(Object.assign({ path: `/timeline-entries.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1009
+ /**
1010
+ * @description Lists the timeline entries for an object.
1011
+ *
1012
+ * @tags timeline-entries
1013
+ * @name TimelineEntriesList
1014
+ * @request GET:/timeline-entries.list
1015
+ * @secure
1016
+ */
1017
+ this.timelineEntriesList = (query, params = {}) => this.request(Object.assign({ path: `/timeline-entries.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
1018
+ /**
1019
+ * @description Creates new work ([issue](https://devrev.ai/docs/product/build), [ticket](https://devrev.ai/docs/product/support)) item. [task](https://docs.devrev.ai/product/tasks) and opportunity work types are supported in the beta version.
1020
+ *
1021
+ * @tags works
1022
+ * @name WorksCreate
1023
+ * @request POST:/works.create
1024
+ * @secure
1025
+ */
1026
+ this.worksCreate = (data, params = {}) => this.request(Object.assign({ path: `/works.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1027
+ /**
1028
+ * @description Deletes a work item.
1029
+ *
1030
+ * @tags works
1031
+ * @name WorksDelete
1032
+ * @request POST:/works.delete
1033
+ * @secure
1034
+ */
1035
+ this.worksDelete = (data, params = {}) => this.request(Object.assign({ path: `/works.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1036
+ /**
1037
+ * @description Exports a collection of work items.
1038
+ *
1039
+ * @tags works
1040
+ * @name WorksExport
1041
+ * @request GET:/works.export
1042
+ * @secure
1043
+ */
1044
+ this.worksExport = (query, params = {}) => this.request(Object.assign({ path: `/works.export`, method: 'GET', query: query, secure: true, format: 'json' }, params));
1045
+ /**
1046
+ * @description Gets a work item's information.
1047
+ *
1048
+ * @tags works
1049
+ * @name WorksGet
1050
+ * @request GET:/works.get
1051
+ * @secure
1052
+ */
1053
+ this.worksGet = (query, params = {}) => this.request(Object.assign({ path: `/works.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
1054
+ /**
1055
+ * @description Lists a collection of work items.
1056
+ *
1057
+ * @tags works
1058
+ * @name WorksList
1059
+ * @request GET:/works.list
1060
+ * @secure
1061
+ */
1062
+ this.worksList = (query, params = {}) => this.request(Object.assign({ path: `/works.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
1063
+ /**
1064
+ * @description Updates a work item's information.
1065
+ *
1066
+ * @tags works
1067
+ * @name WorksUpdate
1068
+ * @request POST:/works.update
1069
+ * @secure
1070
+ */
1071
+ this.worksUpdate = (data, params = {}) => this.request(Object.assign({ path: `/works.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1072
+ }
1073
+ }
1074
+ exports.Api = Api;