@devrev/typescript-sdk 1.1.4 → 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.
|
@@ -391,12 +391,16 @@ export interface AuthTokensUpdateResponse {
|
|
|
391
391
|
* Carries Rev user info.
|
|
392
392
|
*/
|
|
393
393
|
export interface AuthTokensUserTraits {
|
|
394
|
+
/** Application-defined custom fields. */
|
|
395
|
+
custom_fields?: object;
|
|
394
396
|
/** The display name of the Rev user. */
|
|
395
397
|
display_name?: string;
|
|
396
398
|
/** The email address of the Rev user. */
|
|
397
399
|
email?: string;
|
|
398
400
|
/** The full name of the Rev user. */
|
|
399
401
|
full_name?: string;
|
|
402
|
+
/** Phone numbers of the Rev user. */
|
|
403
|
+
phone_numbers?: string[];
|
|
400
404
|
}
|
|
401
405
|
/** capability */
|
|
402
406
|
export type Capability = PartBase;
|
|
@@ -721,6 +725,19 @@ export interface EventRevOrgDeleted {
|
|
|
721
725
|
export interface EventRevOrgUpdated {
|
|
722
726
|
rev_org: RevOrg;
|
|
723
727
|
}
|
|
728
|
+
/** event-rev-user-created */
|
|
729
|
+
export interface EventRevUserCreated {
|
|
730
|
+
rev_user: RevUser;
|
|
731
|
+
}
|
|
732
|
+
/** event-rev-user-deleted */
|
|
733
|
+
export interface EventRevUserDeleted {
|
|
734
|
+
/** The ID of the Rev user that was deleted. */
|
|
735
|
+
id: string;
|
|
736
|
+
}
|
|
737
|
+
/** event-rev-user-updated */
|
|
738
|
+
export interface EventRevUserUpdated {
|
|
739
|
+
rev_user: RevUser;
|
|
740
|
+
}
|
|
724
741
|
/** event-tag-created */
|
|
725
742
|
export interface EventTagCreated {
|
|
726
743
|
tag: Tag;
|
|
@@ -1120,6 +1137,20 @@ export interface RevOrgsUpdateRequest {
|
|
|
1120
1137
|
export interface RevOrgsUpdateResponse {
|
|
1121
1138
|
rev_org: RevOrg;
|
|
1122
1139
|
}
|
|
1140
|
+
/** rev-user */
|
|
1141
|
+
export type RevUser = UserBase & {
|
|
1142
|
+
/** Description of the Rev user. */
|
|
1143
|
+
description?: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* External ref is a mutable unique identifier for a user within the
|
|
1146
|
+
* Rev organization from your primary customer record. If none is
|
|
1147
|
+
* available, a good alternative is the email address/phone number
|
|
1148
|
+
* which could uniquely identify the user. If none is specified, a
|
|
1149
|
+
* system-generated identifier will be assigned to the user.
|
|
1150
|
+
*/
|
|
1151
|
+
external_ref?: string;
|
|
1152
|
+
rev_org?: OrgSummary;
|
|
1153
|
+
};
|
|
1123
1154
|
/** rev-user-summary */
|
|
1124
1155
|
export type RevUserSummary = UserBaseSummary & {
|
|
1125
1156
|
/**
|
|
@@ -1395,6 +1426,22 @@ export declare enum TimelineEntriesCreateRequestType {
|
|
|
1395
1426
|
export interface TimelineEntriesCreateResponse {
|
|
1396
1427
|
timeline_entry: TimelineEntry;
|
|
1397
1428
|
}
|
|
1429
|
+
/**
|
|
1430
|
+
* timeline-entries-delete-request
|
|
1431
|
+
* The request to delete a timeline entry from an object.
|
|
1432
|
+
*/
|
|
1433
|
+
export interface TimelineEntriesDeleteRequest {
|
|
1434
|
+
/**
|
|
1435
|
+
* The ID of the timeline entry to delete.
|
|
1436
|
+
* @example "don:core:<partition>:devo/<dev-org-id>:ticket/123:timeline_event/<timeline-event-id>"
|
|
1437
|
+
*/
|
|
1438
|
+
id: string;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* timeline-entries-delete-response
|
|
1442
|
+
* The response to deleting a timeline entry from an object.
|
|
1443
|
+
*/
|
|
1444
|
+
export type TimelineEntriesDeleteResponse = object;
|
|
1398
1445
|
/**
|
|
1399
1446
|
* timeline-entries-get-response
|
|
1400
1447
|
* The request to getting a timeline entry.
|
|
@@ -1478,7 +1525,25 @@ export type TimelineEntry = TimelineComment & {
|
|
|
1478
1525
|
type: TimelineEntryType;
|
|
1479
1526
|
};
|
|
1480
1527
|
/** timeline-entry-base */
|
|
1481
|
-
export type TimelineEntryBase = AtomBase
|
|
1528
|
+
export type TimelineEntryBase = AtomBase & {
|
|
1529
|
+
/** The object that the Timeline entry belongs to. */
|
|
1530
|
+
object: string;
|
|
1531
|
+
/** The type of object that the Timeline entry belongs to. */
|
|
1532
|
+
object_type?: TimelineEntryObjectType;
|
|
1533
|
+
};
|
|
1534
|
+
/** The type of object that the Timeline entry belongs to. */
|
|
1535
|
+
export declare enum TimelineEntryObjectType {
|
|
1536
|
+
Capability = "capability",
|
|
1537
|
+
Conversation = "conversation",
|
|
1538
|
+
Enhancement = "enhancement",
|
|
1539
|
+
Feature = "feature",
|
|
1540
|
+
Issue = "issue",
|
|
1541
|
+
Product = "product",
|
|
1542
|
+
RevOrg = "rev_org",
|
|
1543
|
+
RevUser = "rev_user",
|
|
1544
|
+
Ticket = "ticket",
|
|
1545
|
+
TimelineComment = "timeline_comment"
|
|
1546
|
+
}
|
|
1482
1547
|
export declare enum TimelineEntryType {
|
|
1483
1548
|
TimelineComment = "timeline_comment"
|
|
1484
1549
|
}
|
|
@@ -1579,6 +1644,9 @@ export interface WebhookEventRequest {
|
|
|
1579
1644
|
rev_org_created?: EventRevOrgCreated;
|
|
1580
1645
|
rev_org_deleted?: EventRevOrgDeleted;
|
|
1581
1646
|
rev_org_updated?: EventRevOrgUpdated;
|
|
1647
|
+
rev_user_created?: EventRevUserCreated;
|
|
1648
|
+
rev_user_deleted?: EventRevUserDeleted;
|
|
1649
|
+
rev_user_updated?: EventRevUserUpdated;
|
|
1582
1650
|
tag_created?: EventTagCreated;
|
|
1583
1651
|
tag_deleted?: EventTagDeleted;
|
|
1584
1652
|
tag_updated?: EventTagUpdated;
|
|
@@ -1625,6 +1693,9 @@ export declare enum WebhookEventType {
|
|
|
1625
1693
|
RevOrgCreated = "rev_org_created",
|
|
1626
1694
|
RevOrgDeleted = "rev_org_deleted",
|
|
1627
1695
|
RevOrgUpdated = "rev_org_updated",
|
|
1696
|
+
RevUserCreated = "rev_user_created",
|
|
1697
|
+
RevUserDeleted = "rev_user_deleted",
|
|
1698
|
+
RevUserUpdated = "rev_user_updated",
|
|
1628
1699
|
TagCreated = "tag_created",
|
|
1629
1700
|
TagDeleted = "tag_deleted",
|
|
1630
1701
|
TagUpdated = "tag_updated",
|
|
@@ -1818,11 +1889,6 @@ export type WorksCreateRequest = (WorksCreateRequestIssue | WorksCreateRequestTi
|
|
|
1818
1889
|
artifacts?: string[];
|
|
1819
1890
|
/** Body of the work object. */
|
|
1820
1891
|
body?: string;
|
|
1821
|
-
/**
|
|
1822
|
-
* The custom schema fragments to use.
|
|
1823
|
-
* @example ["don:core:<partition>:devo/<dev-org-id>:custom_type_fragment/<custom-type-fragment-id>"]
|
|
1824
|
-
*/
|
|
1825
|
-
custom_schema_fragments?: string[];
|
|
1826
1892
|
/**
|
|
1827
1893
|
* The users that own the work.
|
|
1828
1894
|
* @example ["don:identity:<partition>:devo/<dev-org-id>:devu/<dev-user-id>"]
|
|
@@ -1917,11 +1983,6 @@ export type WorksUpdateRequest = (WorksUpdateRequestIssue | WorksUpdateRequestTi
|
|
|
1917
1983
|
artifacts?: WorksUpdateRequestArtifactIds;
|
|
1918
1984
|
/** Updated body of the work object, or unchanged if not provided. */
|
|
1919
1985
|
body?: string;
|
|
1920
|
-
/**
|
|
1921
|
-
* The custom schema fragments to use.
|
|
1922
|
-
* @example ["don:core:<partition>:devo/<dev-org-id>:custom_type_fragment/<custom-type-fragment-id>"]
|
|
1923
|
-
*/
|
|
1924
|
-
custom_schema_fragments?: string[];
|
|
1925
1986
|
/**
|
|
1926
1987
|
* The work's ID.
|
|
1927
1988
|
* @example "don:core:<partition>:devo/<dev-org-id>:<work-type>/<work-id>"
|
|
@@ -1996,9 +2057,9 @@ export interface WorksUpdateRequestTicket {
|
|
|
1996
2057
|
export interface WorksUpdateResponse {
|
|
1997
2058
|
work: Work;
|
|
1998
2059
|
}
|
|
1999
|
-
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from
|
|
2060
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
|
|
2000
2061
|
export type QueryParamsType = Record<string | number, any>;
|
|
2001
|
-
export interface FullRequestParams extends Omit<AxiosRequestConfig,
|
|
2062
|
+
export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
|
|
2002
2063
|
/** set parameter to `true` for call `securityWorker` for this request */
|
|
2003
2064
|
secure?: boolean;
|
|
2004
2065
|
/** request path */
|
|
@@ -2012,8 +2073,8 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "pa
|
|
|
2012
2073
|
/** request body */
|
|
2013
2074
|
body?: unknown;
|
|
2014
2075
|
}
|
|
2015
|
-
export type RequestParams = Omit<FullRequestParams,
|
|
2016
|
-
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig,
|
|
2076
|
+
export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
|
|
2077
|
+
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
|
|
2017
2078
|
securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
|
2018
2079
|
secure?: boolean;
|
|
2019
2080
|
format?: ResponseType;
|
|
@@ -2369,13 +2430,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2369
2430
|
* Filters for objects created after the provided timestamp (inclusive).
|
|
2370
2431
|
* @format date-time
|
|
2371
2432
|
*/
|
|
2372
|
-
|
|
2433
|
+
'created_date.after'?: string;
|
|
2373
2434
|
/**
|
|
2374
2435
|
* Filters for objects created before the provided timestamp
|
|
2375
2436
|
* (inclusive).
|
|
2376
2437
|
* @format date-time
|
|
2377
2438
|
*/
|
|
2378
|
-
|
|
2439
|
+
'created_date.before'?: string;
|
|
2379
2440
|
/**
|
|
2380
2441
|
* The cursor to resume iteration from. If not provided, then iteration
|
|
2381
2442
|
* starts from the beginning.
|
|
@@ -2397,13 +2458,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2397
2458
|
* Filters for objects created after the provided timestamp (inclusive).
|
|
2398
2459
|
* @format date-time
|
|
2399
2460
|
*/
|
|
2400
|
-
|
|
2461
|
+
'modified_date.after'?: string;
|
|
2401
2462
|
/**
|
|
2402
2463
|
* Filters for objects created before the provided timestamp
|
|
2403
2464
|
* (inclusive).
|
|
2404
2465
|
* @format date-time
|
|
2405
2466
|
*/
|
|
2406
|
-
|
|
2467
|
+
'modified_date.before'?: string;
|
|
2407
2468
|
/**
|
|
2408
2469
|
* Fields to sort the Rev organizations by and the direction to sort
|
|
2409
2470
|
* them.
|
|
@@ -2495,6 +2556,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2495
2556
|
* @secure
|
|
2496
2557
|
*/
|
|
2497
2558
|
timelineEntriesCreate: (data: TimelineEntriesCreateRequest, params?: RequestParams) => Promise<AxiosResponse<TimelineEntriesCreateResponse, any>>;
|
|
2559
|
+
/**
|
|
2560
|
+
* @description Deletes an entry from an object's timeline.
|
|
2561
|
+
*
|
|
2562
|
+
* @tags timeline-entries
|
|
2563
|
+
* @name TimelineEntriesDelete
|
|
2564
|
+
* @request POST:/timeline-entries.delete
|
|
2565
|
+
* @secure
|
|
2566
|
+
*/
|
|
2567
|
+
timelineEntriesDelete: (data: TimelineEntriesDeleteRequest, params?: RequestParams) => Promise<AxiosResponse<object, any>>;
|
|
2498
2568
|
/**
|
|
2499
2569
|
* @description Gets an entry on an object's timeline.
|
|
2500
2570
|
*
|
|
@@ -2651,35 +2721,35 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2651
2721
|
*/
|
|
2652
2722
|
first?: number;
|
|
2653
2723
|
/** Filters for issues with any of the provided priorities. */
|
|
2654
|
-
|
|
2724
|
+
'issue.priority'?: IssuePriority[];
|
|
2655
2725
|
/**
|
|
2656
2726
|
* Filters for issues with any of the provided Rev organizations.
|
|
2657
2727
|
* @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
|
|
2658
2728
|
*/
|
|
2659
|
-
|
|
2729
|
+
'issue.rev_orgs'?: string[];
|
|
2660
2730
|
/**
|
|
2661
2731
|
* Filters for work owned by any of these users.
|
|
2662
2732
|
* @example ["don:identity:<partition>:devo/<dev-org-id>:devu/<dev-user-id>"]
|
|
2663
2733
|
*/
|
|
2664
2734
|
owned_by?: string[];
|
|
2665
2735
|
/** Filters for records in the provided stage(s). */
|
|
2666
|
-
|
|
2736
|
+
'stage.name'?: string[];
|
|
2667
2737
|
/** Filters for tickets belonging to specific groups. */
|
|
2668
|
-
|
|
2738
|
+
'ticket.group'?: string[];
|
|
2669
2739
|
/** Filters for tickets that are spam. */
|
|
2670
|
-
|
|
2740
|
+
'ticket.is_spam'?: boolean;
|
|
2671
2741
|
/** Filters for tickets that need response. */
|
|
2672
|
-
|
|
2742
|
+
'ticket.needs_response'?: boolean;
|
|
2673
2743
|
/**
|
|
2674
2744
|
* Filters for tickets that are associated with any of the provided Rev
|
|
2675
2745
|
* organizations.
|
|
2676
2746
|
* @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
|
|
2677
2747
|
*/
|
|
2678
|
-
|
|
2748
|
+
'ticket.rev_org'?: string[];
|
|
2679
2749
|
/** Filters for tickets with any of the provided severities. */
|
|
2680
|
-
|
|
2750
|
+
'ticket.severity'?: TicketSeverity[];
|
|
2681
2751
|
/** Filters for tickets with any of the provided source channels. */
|
|
2682
|
-
|
|
2752
|
+
'ticket.source_channel'?: string[];
|
|
2683
2753
|
/** Filters for work of the provided types. */
|
|
2684
2754
|
type?: WorkType[];
|
|
2685
2755
|
}, params?: RequestParams) => Promise<AxiosResponse<WorksExportResponse, any>>;
|
|
@@ -2723,12 +2793,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2723
2793
|
*/
|
|
2724
2794
|
cursor?: string;
|
|
2725
2795
|
/** Filters for issues with any of the provided priorities. */
|
|
2726
|
-
|
|
2796
|
+
'issue.priority'?: IssuePriority[];
|
|
2727
2797
|
/**
|
|
2728
2798
|
* Filters for issues with any of the provided Rev organizations.
|
|
2729
2799
|
* @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
|
|
2730
2800
|
*/
|
|
2731
|
-
|
|
2801
|
+
'issue.rev_orgs'?: string[];
|
|
2732
2802
|
/**
|
|
2733
2803
|
* The maximum number of works to return. The default is '50'.
|
|
2734
2804
|
* @format int32
|
|
@@ -2745,23 +2815,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2745
2815
|
*/
|
|
2746
2816
|
owned_by?: string[];
|
|
2747
2817
|
/** Filters for records in the provided stage(s). */
|
|
2748
|
-
|
|
2818
|
+
'stage.name'?: string[];
|
|
2749
2819
|
/** Filters for tickets belonging to specific groups. */
|
|
2750
|
-
|
|
2820
|
+
'ticket.group'?: string[];
|
|
2751
2821
|
/** Filters for tickets that are spam. */
|
|
2752
|
-
|
|
2822
|
+
'ticket.is_spam'?: boolean;
|
|
2753
2823
|
/** Filters for tickets that need response. */
|
|
2754
|
-
|
|
2824
|
+
'ticket.needs_response'?: boolean;
|
|
2755
2825
|
/**
|
|
2756
2826
|
* Filters for tickets that are associated with any of the provided Rev
|
|
2757
2827
|
* organizations.
|
|
2758
2828
|
* @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
|
|
2759
2829
|
*/
|
|
2760
|
-
|
|
2830
|
+
'ticket.rev_org'?: string[];
|
|
2761
2831
|
/** Filters for tickets with any of the provided severities. */
|
|
2762
|
-
|
|
2832
|
+
'ticket.severity'?: TicketSeverity[];
|
|
2763
2833
|
/** Filters for tickets with any of the provided source channels. */
|
|
2764
|
-
|
|
2834
|
+
'ticket.source_channel'?: string[];
|
|
2765
2835
|
/** Filters for work of the provided types. */
|
|
2766
2836
|
type?: WorkType[];
|
|
2767
2837
|
}, params?: RequestParams) => Promise<AxiosResponse<WorksListResponse, any>>;
|