@devrev/typescript-sdk 1.1.4 → 1.1.6

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;
@@ -539,6 +543,13 @@ export type DevUser = UserBase & {
539
543
  };
540
544
  /** dev-user-summary */
541
545
  export type DevUserSummary = UserBaseSummary;
546
+ /**
547
+ * dev-users-get-response
548
+ * The response to getting the information for the Dev user.
549
+ */
550
+ export interface DevUsersGetResponse {
551
+ dev_user: DevUser;
552
+ }
542
553
  /**
543
554
  * dev-users-list-response
544
555
  * The response to listing the Dev users.
@@ -721,6 +732,19 @@ export interface EventRevOrgDeleted {
721
732
  export interface EventRevOrgUpdated {
722
733
  rev_org: RevOrg;
723
734
  }
735
+ /** event-rev-user-created */
736
+ export interface EventRevUserCreated {
737
+ rev_user: RevUser;
738
+ }
739
+ /** event-rev-user-deleted */
740
+ export interface EventRevUserDeleted {
741
+ /** The ID of the Rev user that was deleted. */
742
+ id: string;
743
+ }
744
+ /** event-rev-user-updated */
745
+ export interface EventRevUserUpdated {
746
+ rev_user: RevUser;
747
+ }
724
748
  /** event-tag-created */
725
749
  export interface EventTagCreated {
726
750
  tag: Tag;
@@ -1120,6 +1144,20 @@ export interface RevOrgsUpdateRequest {
1120
1144
  export interface RevOrgsUpdateResponse {
1121
1145
  rev_org: RevOrg;
1122
1146
  }
1147
+ /** rev-user */
1148
+ export type RevUser = UserBase & {
1149
+ /** Description of the Rev user. */
1150
+ description?: string;
1151
+ /**
1152
+ * External ref is a mutable unique identifier for a user within the
1153
+ * Rev organization from your primary customer record. If none is
1154
+ * available, a good alternative is the email address/phone number
1155
+ * which could uniquely identify the user. If none is specified, a
1156
+ * system-generated identifier will be assigned to the user.
1157
+ */
1158
+ external_ref?: string;
1159
+ rev_org?: OrgSummary;
1160
+ };
1123
1161
  /** rev-user-summary */
1124
1162
  export type RevUserSummary = UserBaseSummary & {
1125
1163
  /**
@@ -1395,6 +1433,22 @@ export declare enum TimelineEntriesCreateRequestType {
1395
1433
  export interface TimelineEntriesCreateResponse {
1396
1434
  timeline_entry: TimelineEntry;
1397
1435
  }
1436
+ /**
1437
+ * timeline-entries-delete-request
1438
+ * The request to delete a timeline entry from an object.
1439
+ */
1440
+ export interface TimelineEntriesDeleteRequest {
1441
+ /**
1442
+ * The ID of the timeline entry to delete.
1443
+ * @example "don:core:<partition>:devo/<dev-org-id>:ticket/123:timeline_event/<timeline-event-id>"
1444
+ */
1445
+ id: string;
1446
+ }
1447
+ /**
1448
+ * timeline-entries-delete-response
1449
+ * The response to deleting a timeline entry from an object.
1450
+ */
1451
+ export type TimelineEntriesDeleteResponse = object;
1398
1452
  /**
1399
1453
  * timeline-entries-get-response
1400
1454
  * The request to getting a timeline entry.
@@ -1478,7 +1532,33 @@ export type TimelineEntry = TimelineComment & {
1478
1532
  type: TimelineEntryType;
1479
1533
  };
1480
1534
  /** timeline-entry-base */
1481
- export type TimelineEntryBase = AtomBase;
1535
+ export type TimelineEntryBase = AtomBase & {
1536
+ /** The object that the Timeline entry belongs to. */
1537
+ object: string;
1538
+ /** The type of object that the Timeline entry belongs to. */
1539
+ object_type?: TimelineEntryObjectType;
1540
+ /**
1541
+ * The visibility of the entry. If 'private', then the entry is only
1542
+ * visible to the creator, 'internal' is visible with the Dev
1543
+ * organization, 'external' is visible to the Dev organzation and Rev
1544
+ * users, and 'public' is visible to all. If not set, then the default
1545
+ * visibility is 'external'.
1546
+ */
1547
+ visibility?: TimelineEntryVisibility;
1548
+ };
1549
+ /** The type of object that the Timeline entry belongs to. */
1550
+ export declare enum TimelineEntryObjectType {
1551
+ Capability = "capability",
1552
+ Conversation = "conversation",
1553
+ Enhancement = "enhancement",
1554
+ Feature = "feature",
1555
+ Issue = "issue",
1556
+ Product = "product",
1557
+ RevOrg = "rev_org",
1558
+ RevUser = "rev_user",
1559
+ Ticket = "ticket",
1560
+ TimelineComment = "timeline_comment"
1561
+ }
1482
1562
  export declare enum TimelineEntryType {
1483
1563
  TimelineComment = "timeline_comment"
1484
1564
  }
@@ -1579,6 +1659,9 @@ export interface WebhookEventRequest {
1579
1659
  rev_org_created?: EventRevOrgCreated;
1580
1660
  rev_org_deleted?: EventRevOrgDeleted;
1581
1661
  rev_org_updated?: EventRevOrgUpdated;
1662
+ rev_user_created?: EventRevUserCreated;
1663
+ rev_user_deleted?: EventRevUserDeleted;
1664
+ rev_user_updated?: EventRevUserUpdated;
1582
1665
  tag_created?: EventTagCreated;
1583
1666
  tag_deleted?: EventTagDeleted;
1584
1667
  tag_updated?: EventTagUpdated;
@@ -1625,6 +1708,9 @@ export declare enum WebhookEventType {
1625
1708
  RevOrgCreated = "rev_org_created",
1626
1709
  RevOrgDeleted = "rev_org_deleted",
1627
1710
  RevOrgUpdated = "rev_org_updated",
1711
+ RevUserCreated = "rev_user_created",
1712
+ RevUserDeleted = "rev_user_deleted",
1713
+ RevUserUpdated = "rev_user_updated",
1628
1714
  TagCreated = "tag_created",
1629
1715
  TagDeleted = "tag_deleted",
1630
1716
  TagUpdated = "tag_updated",
@@ -1818,11 +1904,6 @@ export type WorksCreateRequest = (WorksCreateRequestIssue | WorksCreateRequestTi
1818
1904
  artifacts?: string[];
1819
1905
  /** Body of the work object. */
1820
1906
  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
1907
  /**
1827
1908
  * The users that own the work.
1828
1909
  * @example ["don:identity:<partition>:devo/<dev-org-id>:devu/<dev-user-id>"]
@@ -1917,11 +1998,6 @@ export type WorksUpdateRequest = (WorksUpdateRequestIssue | WorksUpdateRequestTi
1917
1998
  artifacts?: WorksUpdateRequestArtifactIds;
1918
1999
  /** Updated body of the work object, or unchanged if not provided. */
1919
2000
  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
2001
  /**
1926
2002
  * The work's ID.
1927
2003
  * @example "don:core:<partition>:devo/<dev-org-id>:<work-type>/<work-id>"
@@ -1996,9 +2072,9 @@ export interface WorksUpdateRequestTicket {
1996
2072
  export interface WorksUpdateResponse {
1997
2073
  work: Work;
1998
2074
  }
1999
- import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
2075
+ import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
2000
2076
  export type QueryParamsType = Record<string | number, any>;
2001
- export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
2077
+ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
2002
2078
  /** set parameter to `true` for call `securityWorker` for this request */
2003
2079
  secure?: boolean;
2004
2080
  /** request path */
@@ -2012,8 +2088,8 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "pa
2012
2088
  /** request body */
2013
2089
  body?: unknown;
2014
2090
  }
2015
- export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
2016
- export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, "data" | "cancelToken"> {
2091
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
2092
+ export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
2017
2093
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
2018
2094
  secure?: boolean;
2019
2095
  format?: ResponseType;
@@ -2200,6 +2276,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2200
2276
  * @secure
2201
2277
  */
2202
2278
  devOrgAuthConnectionsUpdate: (data: DevOrgAuthConnectionsUpdateRequest, params?: RequestParams) => Promise<AxiosResponse<DevOrgAuthConnectionsUpdateResponse, any>>;
2279
+ /**
2280
+ * @description Gets the requested user's information.
2281
+ *
2282
+ * @tags dev-users
2283
+ * @name DevUsersGet
2284
+ * @request GET:/dev-users.get
2285
+ * @secure
2286
+ */
2287
+ devUsersGet: (query: {
2288
+ /** User ID of the requested Dev user. */
2289
+ id: string;
2290
+ }, params?: RequestParams) => Promise<AxiosResponse<DevUsersGetResponse, any>>;
2203
2291
  /**
2204
2292
  * @description Lists users within your organization.
2205
2293
  *
@@ -2369,13 +2457,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2369
2457
  * Filters for objects created after the provided timestamp (inclusive).
2370
2458
  * @format date-time
2371
2459
  */
2372
- "created_date.after"?: string;
2460
+ 'created_date.after'?: string;
2373
2461
  /**
2374
2462
  * Filters for objects created before the provided timestamp
2375
2463
  * (inclusive).
2376
2464
  * @format date-time
2377
2465
  */
2378
- "created_date.before"?: string;
2466
+ 'created_date.before'?: string;
2379
2467
  /**
2380
2468
  * The cursor to resume iteration from. If not provided, then iteration
2381
2469
  * starts from the beginning.
@@ -2397,13 +2485,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2397
2485
  * Filters for objects created after the provided timestamp (inclusive).
2398
2486
  * @format date-time
2399
2487
  */
2400
- "modified_date.after"?: string;
2488
+ 'modified_date.after'?: string;
2401
2489
  /**
2402
2490
  * Filters for objects created before the provided timestamp
2403
2491
  * (inclusive).
2404
2492
  * @format date-time
2405
2493
  */
2406
- "modified_date.before"?: string;
2494
+ 'modified_date.before'?: string;
2407
2495
  /**
2408
2496
  * Fields to sort the Rev organizations by and the direction to sort
2409
2497
  * them.
@@ -2495,6 +2583,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2495
2583
  * @secure
2496
2584
  */
2497
2585
  timelineEntriesCreate: (data: TimelineEntriesCreateRequest, params?: RequestParams) => Promise<AxiosResponse<TimelineEntriesCreateResponse, any>>;
2586
+ /**
2587
+ * @description Deletes an entry from an object's timeline.
2588
+ *
2589
+ * @tags timeline-entries
2590
+ * @name TimelineEntriesDelete
2591
+ * @request POST:/timeline-entries.delete
2592
+ * @secure
2593
+ */
2594
+ timelineEntriesDelete: (data: TimelineEntriesDeleteRequest, params?: RequestParams) => Promise<AxiosResponse<object, any>>;
2498
2595
  /**
2499
2596
  * @description Gets an entry on an object's timeline.
2500
2597
  *
@@ -2651,35 +2748,35 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2651
2748
  */
2652
2749
  first?: number;
2653
2750
  /** Filters for issues with any of the provided priorities. */
2654
- "issue.priority"?: IssuePriority[];
2751
+ 'issue.priority'?: IssuePriority[];
2655
2752
  /**
2656
2753
  * Filters for issues with any of the provided Rev organizations.
2657
2754
  * @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
2658
2755
  */
2659
- "issue.rev_orgs"?: string[];
2756
+ 'issue.rev_orgs'?: string[];
2660
2757
  /**
2661
2758
  * Filters for work owned by any of these users.
2662
2759
  * @example ["don:identity:<partition>:devo/<dev-org-id>:devu/<dev-user-id>"]
2663
2760
  */
2664
2761
  owned_by?: string[];
2665
2762
  /** Filters for records in the provided stage(s). */
2666
- "stage.name"?: string[];
2763
+ 'stage.name'?: string[];
2667
2764
  /** Filters for tickets belonging to specific groups. */
2668
- "ticket.group"?: string[];
2765
+ 'ticket.group'?: string[];
2669
2766
  /** Filters for tickets that are spam. */
2670
- "ticket.is_spam"?: boolean;
2767
+ 'ticket.is_spam'?: boolean;
2671
2768
  /** Filters for tickets that need response. */
2672
- "ticket.needs_response"?: boolean;
2769
+ 'ticket.needs_response'?: boolean;
2673
2770
  /**
2674
2771
  * Filters for tickets that are associated with any of the provided Rev
2675
2772
  * organizations.
2676
2773
  * @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
2677
2774
  */
2678
- "ticket.rev_org"?: string[];
2775
+ 'ticket.rev_org'?: string[];
2679
2776
  /** Filters for tickets with any of the provided severities. */
2680
- "ticket.severity"?: TicketSeverity[];
2777
+ 'ticket.severity'?: TicketSeverity[];
2681
2778
  /** Filters for tickets with any of the provided source channels. */
2682
- "ticket.source_channel"?: string[];
2779
+ 'ticket.source_channel'?: string[];
2683
2780
  /** Filters for work of the provided types. */
2684
2781
  type?: WorkType[];
2685
2782
  }, params?: RequestParams) => Promise<AxiosResponse<WorksExportResponse, any>>;
@@ -2723,12 +2820,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2723
2820
  */
2724
2821
  cursor?: string;
2725
2822
  /** Filters for issues with any of the provided priorities. */
2726
- "issue.priority"?: IssuePriority[];
2823
+ 'issue.priority'?: IssuePriority[];
2727
2824
  /**
2728
2825
  * Filters for issues with any of the provided Rev organizations.
2729
2826
  * @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
2730
2827
  */
2731
- "issue.rev_orgs"?: string[];
2828
+ 'issue.rev_orgs'?: string[];
2732
2829
  /**
2733
2830
  * The maximum number of works to return. The default is '50'.
2734
2831
  * @format int32
@@ -2745,23 +2842,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2745
2842
  */
2746
2843
  owned_by?: string[];
2747
2844
  /** Filters for records in the provided stage(s). */
2748
- "stage.name"?: string[];
2845
+ 'stage.name'?: string[];
2749
2846
  /** Filters for tickets belonging to specific groups. */
2750
- "ticket.group"?: string[];
2847
+ 'ticket.group'?: string[];
2751
2848
  /** Filters for tickets that are spam. */
2752
- "ticket.is_spam"?: boolean;
2849
+ 'ticket.is_spam'?: boolean;
2753
2850
  /** Filters for tickets that need response. */
2754
- "ticket.needs_response"?: boolean;
2851
+ 'ticket.needs_response'?: boolean;
2755
2852
  /**
2756
2853
  * Filters for tickets that are associated with any of the provided Rev
2757
2854
  * organizations.
2758
2855
  * @example ["don:identity:<partition>:devo/<dev-org-id>:revo/<rev-org-id>"]
2759
2856
  */
2760
- "ticket.rev_org"?: string[];
2857
+ 'ticket.rev_org'?: string[];
2761
2858
  /** Filters for tickets with any of the provided severities. */
2762
- "ticket.severity"?: TicketSeverity[];
2859
+ 'ticket.severity'?: TicketSeverity[];
2763
2860
  /** Filters for tickets with any of the provided source channels. */
2764
- "ticket.source_channel"?: string[];
2861
+ 'ticket.source_channel'?: string[];
2765
2862
  /** Filters for work of the provided types. */
2766
2863
  type?: WorkType[];
2767
2864
  }, params?: RequestParams) => Promise<AxiosResponse<WorksListResponse, any>>;