@devrev/typescript-sdk 1.1.23 → 1.1.25
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.
|
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Api = exports.HttpClient = exports.ContentType = exports.WorkType = exports.WebhooksUpdateAction = exports.WebhookStatus = exports.WebhookEventType = exports.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesUpdateRequestType = exports.TimelineEntriesCreateRequestType = exports.TimelineCommentBodyType = exports.TicketSeverity = exports.TicketChannels = exports.SlaSummaryStage = exports.PartType = exports.OrgType = exports.OrgEnvironment = exports.ListMode = exports.IssuePriority = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorBadRequestType = exports.DevOrgAuthConnectionsUpdateRequestType = exports.DevOrgAuthConnectionsCreateRequestType = exports.DateTimePresetType = exports.DateFilterType = exports.AuthTokenTokenType = exports.AuthTokenSubjectTokenType = exports.AuthTokenStatus = exports.AuthTokenRequestedTokenType = exports.AuthTokenGrantType = exports.AuthConnectionType = exports.AuthConnectionToggle = void 0;
|
|
36
|
+
exports.Api = exports.HttpClient = exports.ContentType = exports.WorkType = exports.WebhooksUpdateAction = exports.WebhookStatus = exports.WebhookEventType = exports.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesUpdateRequestType = exports.TimelineEntriesCreateRequestType = exports.TimelineCommentBodyType = exports.TicketSeverity = exports.TicketChannels = exports.SyncMetadataFilterSyncOutFilterStatus = exports.SyncMetadataFilterSyncInFilterStatus = exports.StageValidationOptionForUpdate = exports.StageValidationOptionForCreate = exports.SlaSummaryStage = exports.SlaStatus = exports.PartType = exports.OrgType = exports.OrgScheduleStatus = exports.OrgEnvironment = exports.ListMode = exports.IssuePriority = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorConflictType = exports.ErrorBadRequestUnexpectedJsonTypeType = exports.ErrorBadRequestType = exports.DevOrgAuthConnectionsUpdateRequestType = exports.DevOrgAuthConnectionsCreateRequestType = exports.DateTimePresetType = exports.DateFilterType = exports.AuthTokenTokenType = exports.AuthTokenSubjectTokenType = exports.AuthTokenStatus = exports.AuthTokenRequestedTokenType = exports.AuthTokenGrantType = exports.AuthConnectionType = exports.AuthConnectionToggle = void 0;
|
|
37
37
|
var AuthConnectionToggle;
|
|
38
38
|
(function (AuthConnectionToggle) {
|
|
39
39
|
AuthConnectionToggle["Disable"] = "disable";
|
|
@@ -61,8 +61,10 @@ var AuthTokenGrantType;
|
|
|
61
61
|
var AuthTokenRequestedTokenType;
|
|
62
62
|
(function (AuthTokenRequestedTokenType) {
|
|
63
63
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeAat"] = "urn:devrev:params:oauth:token-type:aat";
|
|
64
|
+
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeAatActAs"] = "urn:devrev:params:oauth:token-type:aat:act-as";
|
|
64
65
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeAatPublic"] = "urn:devrev:params:oauth:token-type:aat:public";
|
|
65
66
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeDev"] = "urn:devrev:params:oauth:token-type:dev";
|
|
67
|
+
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeDevConnect"] = "urn:devrev:params:oauth:token-type:dev:connect";
|
|
66
68
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeGat"] = "urn:devrev:params:oauth:token-type:gat";
|
|
67
69
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypePat"] = "urn:devrev:params:oauth:token-type:pat";
|
|
68
70
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypePatActAs"] = "urn:devrev:params:oauth:token-type:pat:act-as";
|
|
@@ -71,6 +73,7 @@ var AuthTokenRequestedTokenType;
|
|
|
71
73
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeSession"] = "urn:devrev:params:oauth:token-type:session";
|
|
72
74
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeSessionDev0"] = "urn:devrev:params:oauth:token-type:session:dev0";
|
|
73
75
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeSessionOnetime"] = "urn:devrev:params:oauth:token-type:session:onetime";
|
|
76
|
+
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeSessionRevActAs"] = "urn:devrev:params:oauth:token-type:session:rev:act-as";
|
|
74
77
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeSuper"] = "urn:devrev:params:oauth:token-type:super";
|
|
75
78
|
AuthTokenRequestedTokenType["UrnDevrevParamsOauthTokenTypeSys"] = "urn:devrev:params:oauth:token-type:sys";
|
|
76
79
|
AuthTokenRequestedTokenType["UrnIetfParamsOauthTokenTypeJwt"] = "urn:ietf:params:oauth:token-type:jwt";
|
|
@@ -146,8 +149,22 @@ var ErrorBadRequestType;
|
|
|
146
149
|
ErrorBadRequestType["MissingRequiredField"] = "missing_required_field";
|
|
147
150
|
ErrorBadRequestType["ParseError"] = "parse_error";
|
|
148
151
|
ErrorBadRequestType["StaleSchemaFragments"] = "stale_schema_fragments";
|
|
152
|
+
ErrorBadRequestType["UnexpectedJsonType"] = "unexpected_json_type";
|
|
149
153
|
ErrorBadRequestType["ValueNotPermitted"] = "value_not_permitted";
|
|
150
154
|
})(ErrorBadRequestType = exports.ErrorBadRequestType || (exports.ErrorBadRequestType = {}));
|
|
155
|
+
var ErrorBadRequestUnexpectedJsonTypeType;
|
|
156
|
+
(function (ErrorBadRequestUnexpectedJsonTypeType) {
|
|
157
|
+
ErrorBadRequestUnexpectedJsonTypeType["Array"] = "array";
|
|
158
|
+
ErrorBadRequestUnexpectedJsonTypeType["Bool"] = "bool";
|
|
159
|
+
ErrorBadRequestUnexpectedJsonTypeType["Null"] = "null";
|
|
160
|
+
ErrorBadRequestUnexpectedJsonTypeType["Number"] = "number";
|
|
161
|
+
ErrorBadRequestUnexpectedJsonTypeType["Object"] = "object";
|
|
162
|
+
ErrorBadRequestUnexpectedJsonTypeType["String"] = "string";
|
|
163
|
+
})(ErrorBadRequestUnexpectedJsonTypeType = exports.ErrorBadRequestUnexpectedJsonTypeType || (exports.ErrorBadRequestUnexpectedJsonTypeType = {}));
|
|
164
|
+
var ErrorConflictType;
|
|
165
|
+
(function (ErrorConflictType) {
|
|
166
|
+
ErrorConflictType["Conflict"] = "conflict";
|
|
167
|
+
})(ErrorConflictType = exports.ErrorConflictType || (exports.ErrorConflictType = {}));
|
|
151
168
|
var ErrorForbiddenType;
|
|
152
169
|
(function (ErrorForbiddenType) {
|
|
153
170
|
ErrorForbiddenType["Forbidden"] = "forbidden";
|
|
@@ -199,6 +216,17 @@ var OrgEnvironment;
|
|
|
199
216
|
OrgEnvironment["Staging"] = "staging";
|
|
200
217
|
OrgEnvironment["Test"] = "test";
|
|
201
218
|
})(OrgEnvironment = exports.OrgEnvironment || (exports.OrgEnvironment = {}));
|
|
219
|
+
/**
|
|
220
|
+
* Status determines how an item can be used. In 'draft' status an item
|
|
221
|
+
* can be edited but can't be used. When 'published' the item can longer
|
|
222
|
+
* be edited but can be used. 'Archived' is read-only.
|
|
223
|
+
*/
|
|
224
|
+
var OrgScheduleStatus;
|
|
225
|
+
(function (OrgScheduleStatus) {
|
|
226
|
+
OrgScheduleStatus["Archived"] = "archived";
|
|
227
|
+
OrgScheduleStatus["Draft"] = "draft";
|
|
228
|
+
OrgScheduleStatus["Published"] = "published";
|
|
229
|
+
})(OrgScheduleStatus = exports.OrgScheduleStatus || (exports.OrgScheduleStatus = {}));
|
|
202
230
|
var OrgType;
|
|
203
231
|
(function (OrgType) {
|
|
204
232
|
OrgType["RevOrg"] = "rev_org";
|
|
@@ -210,6 +238,17 @@ var PartType;
|
|
|
210
238
|
PartType["Feature"] = "feature";
|
|
211
239
|
PartType["Product"] = "product";
|
|
212
240
|
})(PartType = exports.PartType || (exports.PartType = {}));
|
|
241
|
+
/**
|
|
242
|
+
* Status determines how an item can be used. In 'draft' status an item
|
|
243
|
+
* can be edited but can't be used. When 'published' the item can longer
|
|
244
|
+
* be edited but can be used. 'Archived' is read-only.
|
|
245
|
+
*/
|
|
246
|
+
var SlaStatus;
|
|
247
|
+
(function (SlaStatus) {
|
|
248
|
+
SlaStatus["Archived"] = "archived";
|
|
249
|
+
SlaStatus["Draft"] = "draft";
|
|
250
|
+
SlaStatus["Published"] = "published";
|
|
251
|
+
})(SlaStatus = exports.SlaStatus || (exports.SlaStatus = {}));
|
|
213
252
|
/**
|
|
214
253
|
* The stage of the SLA. This is the metric stage which is closest to
|
|
215
254
|
* breach.
|
|
@@ -222,6 +261,28 @@ var SlaSummaryStage;
|
|
|
222
261
|
SlaSummaryStage["Running"] = "running";
|
|
223
262
|
SlaSummaryStage["Warning"] = "warning";
|
|
224
263
|
})(SlaSummaryStage = exports.SlaSummaryStage || (exports.SlaSummaryStage = {}));
|
|
264
|
+
/** Type of stage validation options when creating an object. */
|
|
265
|
+
var StageValidationOptionForCreate;
|
|
266
|
+
(function (StageValidationOptionForCreate) {
|
|
267
|
+
StageValidationOptionForCreate["AllowNonStart"] = "allow_non_start";
|
|
268
|
+
})(StageValidationOptionForCreate = exports.StageValidationOptionForCreate || (exports.StageValidationOptionForCreate = {}));
|
|
269
|
+
/** Type of state validation options when updating the stage of an object. */
|
|
270
|
+
var StageValidationOptionForUpdate;
|
|
271
|
+
(function (StageValidationOptionForUpdate) {
|
|
272
|
+
StageValidationOptionForUpdate["AllowInvalidTransition"] = "allow_invalid_transition";
|
|
273
|
+
})(StageValidationOptionForUpdate = exports.StageValidationOptionForUpdate || (exports.StageValidationOptionForUpdate = {}));
|
|
274
|
+
var SyncMetadataFilterSyncInFilterStatus;
|
|
275
|
+
(function (SyncMetadataFilterSyncInFilterStatus) {
|
|
276
|
+
SyncMetadataFilterSyncInFilterStatus["Failed"] = "failed";
|
|
277
|
+
SyncMetadataFilterSyncInFilterStatus["Modified"] = "modified";
|
|
278
|
+
SyncMetadataFilterSyncInFilterStatus["Staged"] = "staged";
|
|
279
|
+
SyncMetadataFilterSyncInFilterStatus["Succeeded"] = "succeeded";
|
|
280
|
+
})(SyncMetadataFilterSyncInFilterStatus = exports.SyncMetadataFilterSyncInFilterStatus || (exports.SyncMetadataFilterSyncInFilterStatus = {}));
|
|
281
|
+
var SyncMetadataFilterSyncOutFilterStatus;
|
|
282
|
+
(function (SyncMetadataFilterSyncOutFilterStatus) {
|
|
283
|
+
SyncMetadataFilterSyncOutFilterStatus["Failed"] = "failed";
|
|
284
|
+
SyncMetadataFilterSyncOutFilterStatus["Succeeded"] = "succeeded";
|
|
285
|
+
})(SyncMetadataFilterSyncOutFilterStatus = exports.SyncMetadataFilterSyncOutFilterStatus || (exports.SyncMetadataFilterSyncOutFilterStatus = {}));
|
|
225
286
|
/** Channels of the ticket. */
|
|
226
287
|
var TicketChannels;
|
|
227
288
|
(function (TicketChannels) {
|
|
@@ -321,6 +382,9 @@ var WebhookEventType;
|
|
|
321
382
|
WebhookEventType["RevUserCreated"] = "rev_user_created";
|
|
322
383
|
WebhookEventType["RevUserDeleted"] = "rev_user_deleted";
|
|
323
384
|
WebhookEventType["RevUserUpdated"] = "rev_user_updated";
|
|
385
|
+
WebhookEventType["SlaTrackerCreated"] = "sla_tracker_created";
|
|
386
|
+
WebhookEventType["SlaTrackerDeleted"] = "sla_tracker_deleted";
|
|
387
|
+
WebhookEventType["SlaTrackerUpdated"] = "sla_tracker_updated";
|
|
324
388
|
WebhookEventType["TagCreated"] = "tag_created";
|
|
325
389
|
WebhookEventType["TagDeleted"] = "tag_deleted";
|
|
326
390
|
WebhookEventType["TagUpdated"] = "tag_updated";
|
|
@@ -434,6 +498,87 @@ exports.HttpClient = HttpClient;
|
|
|
434
498
|
class Api extends HttpClient {
|
|
435
499
|
constructor() {
|
|
436
500
|
super(...arguments);
|
|
501
|
+
/**
|
|
502
|
+
* @description Creates an account, which is a record representing a customer or an organization.
|
|
503
|
+
*
|
|
504
|
+
* @tags accounts
|
|
505
|
+
* @name AccountsCreate
|
|
506
|
+
* @request POST:/accounts.create
|
|
507
|
+
* @secure
|
|
508
|
+
*/
|
|
509
|
+
this.accountsCreate = (data, params = {}) => this.request(Object.assign({ path: `/accounts.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
510
|
+
/**
|
|
511
|
+
* @description Deletes an account.
|
|
512
|
+
*
|
|
513
|
+
* @tags accounts
|
|
514
|
+
* @name AccountsDelete
|
|
515
|
+
* @request POST:/accounts.delete
|
|
516
|
+
* @secure
|
|
517
|
+
*/
|
|
518
|
+
this.accountsDelete = (data, params = {}) => this.request(Object.assign({ path: `/accounts.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
519
|
+
/**
|
|
520
|
+
* @description Exports a collection of accounts.
|
|
521
|
+
*
|
|
522
|
+
* @tags accounts
|
|
523
|
+
* @name AccountsExport
|
|
524
|
+
* @request GET:/accounts.export
|
|
525
|
+
* @secure
|
|
526
|
+
*/
|
|
527
|
+
this.accountsExport = (query, params = {}) => this.request(Object.assign({ path: `/accounts.export`, method: 'GET', query: query, secure: true, format: 'json' }, params));
|
|
528
|
+
/**
|
|
529
|
+
* @description Exports a collection of accounts.
|
|
530
|
+
*
|
|
531
|
+
* @tags accounts
|
|
532
|
+
* @name AccountsExportPost
|
|
533
|
+
* @request POST:/accounts.export
|
|
534
|
+
* @secure
|
|
535
|
+
*/
|
|
536
|
+
this.accountsExportPost = (data, params = {}) => this.request(Object.assign({ path: `/accounts.export`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
537
|
+
/**
|
|
538
|
+
* @description Retrieves an account's information.
|
|
539
|
+
*
|
|
540
|
+
* @tags accounts
|
|
541
|
+
* @name AccountsGet
|
|
542
|
+
* @request GET:/accounts.get
|
|
543
|
+
* @secure
|
|
544
|
+
*/
|
|
545
|
+
this.accountsGet = (query, params = {}) => this.request(Object.assign({ path: `/accounts.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
|
|
546
|
+
/**
|
|
547
|
+
* @description Retrieves an account's information.
|
|
548
|
+
*
|
|
549
|
+
* @tags accounts
|
|
550
|
+
* @name AccountsGetPost
|
|
551
|
+
* @request POST:/accounts.get
|
|
552
|
+
* @secure
|
|
553
|
+
*/
|
|
554
|
+
this.accountsGetPost = (data, params = {}) => this.request(Object.assign({ path: `/accounts.get`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
555
|
+
/**
|
|
556
|
+
* @description Gets a list of accounts.
|
|
557
|
+
*
|
|
558
|
+
* @tags accounts
|
|
559
|
+
* @name AccountsList
|
|
560
|
+
* @request GET:/accounts.list
|
|
561
|
+
* @secure
|
|
562
|
+
*/
|
|
563
|
+
this.accountsList = (query, params = {}) => this.request(Object.assign({ path: `/accounts.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
|
|
564
|
+
/**
|
|
565
|
+
* @description Gets a list of accounts.
|
|
566
|
+
*
|
|
567
|
+
* @tags accounts
|
|
568
|
+
* @name AccountsListPost
|
|
569
|
+
* @request POST:/accounts.list
|
|
570
|
+
* @secure
|
|
571
|
+
*/
|
|
572
|
+
this.accountsListPost = (data, params = {}) => this.request(Object.assign({ path: `/accounts.list`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
573
|
+
/**
|
|
574
|
+
* @description Updates an account's information.
|
|
575
|
+
*
|
|
576
|
+
* @tags accounts
|
|
577
|
+
* @name AccountsUpdate
|
|
578
|
+
* @request POST:/accounts.update
|
|
579
|
+
* @secure
|
|
580
|
+
*/
|
|
581
|
+
this.accountsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/accounts.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
437
582
|
/**
|
|
438
583
|
* @description Gets the requested artifact's information.
|
|
439
584
|
*
|
|
@@ -821,6 +966,24 @@ class Api extends HttpClient {
|
|
|
821
966
|
* @secure
|
|
822
967
|
*/
|
|
823
968
|
this.revOrgsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/rev-orgs.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
969
|
+
/**
|
|
970
|
+
* @description Gets an SLA tracker.
|
|
971
|
+
*
|
|
972
|
+
* @tags slas
|
|
973
|
+
* @name SlaTrackersGet
|
|
974
|
+
* @request GET:/sla-trackers.get
|
|
975
|
+
* @secure
|
|
976
|
+
*/
|
|
977
|
+
this.slaTrackersGet = (query, params = {}) => this.request(Object.assign({ path: `/sla-trackers.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
|
|
978
|
+
/**
|
|
979
|
+
* @description Gets an SLA tracker.
|
|
980
|
+
*
|
|
981
|
+
* @tags slas
|
|
982
|
+
* @name SlaTrackersGetPost
|
|
983
|
+
* @request POST:/sla-trackers.get
|
|
984
|
+
* @secure
|
|
985
|
+
*/
|
|
986
|
+
this.slaTrackersGetPost = (data, params = {}) => this.request(Object.assign({ path: `/sla-trackers.get`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
|
|
824
987
|
/**
|
|
825
988
|
* @description Creates a new tag, which is used to create associations between objects and a logical concept denoted by the tag's name.
|
|
826
989
|
*
|