@devrev/typescript-sdk 1.1.31 → 1.1.33

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.
@@ -96,6 +96,19 @@ export interface AccountsExportResponse {
96
96
  /** The exported accounts. */
97
97
  accounts: Account[];
98
98
  }
99
+ /** accounts-filters */
100
+ export interface AccountsFilters {
101
+ /** Filters for accounts created by the specified user(s). */
102
+ created_by?: string[];
103
+ created_date?: DateTimeFilter;
104
+ /** Array of display names of accounts to be filtered. */
105
+ display_name?: string[];
106
+ /** Array of references of accounts to be filtered. */
107
+ external_refs?: string[];
108
+ modified_date?: DateTimeFilter;
109
+ /** Filters for accounts on specified stages. */
110
+ stage?: string[];
111
+ }
99
112
  /**
100
113
  * accounts-get-request
101
114
  * Request object to get an account's information.
@@ -204,6 +217,20 @@ export interface AccountsUpdateResponse {
204
217
  * Metric with corresponding target values.
205
218
  */
206
219
  export interface ArchetypeMetricTarget {
220
+ /**
221
+ * For breached metrics the time they entered into breach. This is the
222
+ * same as what the target date was, unless the breach happened due to
223
+ * a different policy starting to apply.
224
+ * @format date-time
225
+ * @example "2023-01-01T12:00:00.000Z"
226
+ */
227
+ breached_at?: string;
228
+ /**
229
+ * For completed metrics the time (in minutes) it took to complete
230
+ * them. (Taking into account the schedule if any).
231
+ * @format int32
232
+ */
233
+ completed_in?: number;
207
234
  /**
208
235
  * If true, the schedule attached to this metric is out of schedule at
209
236
  * the time of the query. It is not set for metrics in *completed*
@@ -211,12 +238,26 @@ export interface ArchetypeMetricTarget {
211
238
  */
212
239
  is_out_of_schedule?: boolean;
213
240
  metric_definition: MetricDefinitionSummary;
241
+ /**
242
+ * The next time the schedule will change its state, if such is known.
243
+ * @format date-time
244
+ * @example "2023-01-01T12:00:00.000Z"
245
+ */
246
+ next_schedule_transition?: string;
214
247
  org_schedule?: OrgScheduleSummary;
215
248
  /**
216
249
  * Time in minutes that remains on a paused metric.
217
250
  * @format int32
218
251
  */
219
252
  remaining_time?: number;
253
+ /** Metric stage corresponding to the applicable SLA. */
254
+ stage: string;
255
+ /**
256
+ * It is an indicator of whether the metric has ever been breached
257
+ * (missed). If not, it shows whether the metric is completed, in
258
+ * progress, or not part of the applied policy.
259
+ */
260
+ status?: string;
220
261
  /**
221
262
  * Time at which the metric would breach SLA if no action taken.
222
263
  * @format date-time
@@ -1166,6 +1207,18 @@ export interface EnumValue {
1166
1207
  */
1167
1208
  ordinal: number;
1168
1209
  }
1210
+ /** error */
1211
+ export interface Error {
1212
+ /** The error type. */
1213
+ type?: string;
1214
+ /** Information about the error. */
1215
+ message: string;
1216
+ /**
1217
+ * The corresponding HTTP status code.
1218
+ * @format int32
1219
+ */
1220
+ status: number;
1221
+ }
1169
1222
  /** error-bad-request */
1170
1223
  export type ErrorBadRequest = ErrorBase & (ErrorBadRequestArtifactAlreadyAttachedToAParent | ErrorBadRequestBadRequest | ErrorBadRequestInvalidApiVersion | ErrorBadRequestInvalidEnumValue | ErrorBadRequestInvalidField | ErrorBadRequestInvalidId | ErrorBadRequestMergeWorksError | ErrorBadRequestMissingDependency | ErrorBadRequestMissingRequiredField | ErrorBadRequestParseError | ErrorBadRequestStaleSchemaFragments | ErrorBadRequestUnexpectedIdType | ErrorBadRequestUnexpectedJsonType | ErrorBadRequestValueNotPermitted) & {
1171
1224
  type: ErrorBadRequestType;
@@ -1465,6 +1518,11 @@ export interface EventDevUserUpdated {
1465
1518
  dev_user: DevUser;
1466
1519
  old_dev_user?: DevUser;
1467
1520
  }
1521
+ export declare enum EventFetchedResult {
1522
+ Forbidden = "forbidden",
1523
+ NotFound = "not_found",
1524
+ Ok = "ok"
1525
+ }
1468
1526
  /** event-group-created */
1469
1527
  export interface EventGroupCreated {
1470
1528
  group: Group;
@@ -1659,6 +1717,19 @@ export interface EventWorkDeleted {
1659
1717
  id: string;
1660
1718
  old_work?: Work;
1661
1719
  }
1720
+ /** event-work-fetched */
1721
+ export type EventWorkFetched = (Empty | EventWorkFetchedOk) & {
1722
+ /**
1723
+ * The ID of the work that was fetched.
1724
+ * @example "ISS-12345"
1725
+ */
1726
+ id: string;
1727
+ result: EventFetchedResult;
1728
+ };
1729
+ /** event-work-fetched-ok */
1730
+ export interface EventWorkFetchedOk {
1731
+ work?: Work;
1732
+ }
1662
1733
  /** event-work-updated */
1663
1734
  export interface EventWorkUpdated {
1664
1735
  old_work?: Work;
@@ -1794,6 +1865,7 @@ export declare enum LinkType {
1794
1865
  IsConvertedTo = "is_converted_to",
1795
1866
  IsDependentOn = "is_dependent_on",
1796
1867
  IsDuplicateOf = "is_duplicate_of",
1868
+ IsFollowUpOf = "is_follow_up_of",
1797
1869
  IsMergedInto = "is_merged_into",
1798
1870
  IsParentOf = "is_parent_of",
1799
1871
  IsPartOf = "is_part_of",
@@ -1811,11 +1883,88 @@ export declare enum ListMode {
1811
1883
  After = "after",
1812
1884
  Before = "before"
1813
1885
  }
1886
+ /** metric-definition */
1887
+ export type MetricDefinition = AtomBase & {
1888
+ /** Human readable name of the metric. */
1889
+ name?: string;
1890
+ };
1891
+ /** The list of item types on which the metric might be applied. */
1892
+ export declare enum MetricDefinitionAppliesTo {
1893
+ Conversation = "conversation",
1894
+ Issue = "issue",
1895
+ Ticket = "ticket"
1896
+ }
1897
+ /**
1898
+ * The type of the metric. 'time' metrics track the time spent in some
1899
+ * state, supporting operations like 'start', 'stop', 'pause', 'resume'.
1900
+ * 'value' metrics track a value, supporting operations like 'set',
1901
+ * 'increment', 'decrement'.
1902
+ */
1903
+ export declare enum MetricDefinitionMetricType {
1904
+ Time = "time",
1905
+ Value = "value"
1906
+ }
1907
+ /**
1908
+ * The status of the metric. 'active' metrics can be used to create new
1909
+ * SLAs, while 'inactive' metrics can not be used in new SLAs. Metrics can
1910
+ * be updated between 'active' and 'inactive' states.
1911
+ */
1912
+ export declare enum MetricDefinitionStatus {
1913
+ Active = "active",
1914
+ Inactive = "inactive"
1915
+ }
1814
1916
  /** metric-definition-summary */
1815
1917
  export type MetricDefinitionSummary = AtomBaseSummary & {
1816
1918
  /** Human readable name of the metric. */
1817
1919
  name?: string;
1818
1920
  };
1921
+ /** metric-definitions-list-request */
1922
+ export interface MetricDefinitionsListRequest {
1923
+ /** The type of metric definitions sought. */
1924
+ type?: MetricDefinitionMetricType[];
1925
+ /** The type of objects the metric definition applies to. */
1926
+ applies_to_type?: MetricDefinitionAppliesTo[];
1927
+ /**
1928
+ * The cursor to resume iteration from. If not provided, then
1929
+ * iteration starts from the beginning.
1930
+ */
1931
+ cursor?: string;
1932
+ /**
1933
+ * Whether to include custom metrics in the response. If not set, then
1934
+ * custom metrics are excluded.
1935
+ */
1936
+ include_custom_metrics?: boolean;
1937
+ /**
1938
+ * The maximum number of records to return. The default is '50'.
1939
+ * @format int32
1940
+ */
1941
+ limit?: number;
1942
+ /**
1943
+ * The iteration mode to use. If "after", then entries after the provided
1944
+ * cursor will be returned, or if no cursor is provided, then from the
1945
+ * beginning. If "before", then entries before the provided cursor will be
1946
+ * returned, or if no cursor is provided, then from the end. Entries will
1947
+ * always be returned in the specified sort-by order.
1948
+ */
1949
+ mode?: ListMode;
1950
+ /** The status of the metric definition. */
1951
+ status?: MetricDefinitionStatus[];
1952
+ }
1953
+ /** metric-definitions-list-response */
1954
+ export interface MetricDefinitionsListResponse {
1955
+ /** The list of metric definitions. */
1956
+ metric_definitions: MetricDefinition[];
1957
+ /**
1958
+ * The cursor used to iterate subsequent results in accordance to the
1959
+ * sort order. If not set, then no later elements exist.
1960
+ */
1961
+ next_cursor?: string;
1962
+ /**
1963
+ * The cursor used to iterate preceding results in accordance to the
1964
+ * sort order. If not set, then no prior elements exist.
1965
+ */
1966
+ prev_cursor?: string;
1967
+ }
1819
1968
  /** org-base */
1820
1969
  export type OrgBase = AtomBase & {
1821
1970
  /** Name of the Organization. */
@@ -2775,6 +2924,119 @@ export type SchemaUenumListFieldDescriptor = SchemaFieldDescriptorBase & {
2775
2924
  };
2776
2925
  /** schema-unknown-field-descriptor */
2777
2926
  export type SchemaUnknownFieldDescriptor = SchemaFieldDescriptorBase;
2927
+ /** set-issue-selector */
2928
+ export interface SetIssueSelector {
2929
+ /**
2930
+ * Custom fields on the issue with their fully qualified names and the
2931
+ * associated with their exact allowed values. The SLA policy applies
2932
+ * to issues where all named custom fields have exactly the specified
2933
+ * values.
2934
+ */
2935
+ custom_fields?: object;
2936
+ /** The SLA policy applies to the issues of these owners. */
2937
+ owners?: string[];
2938
+ /**
2939
+ * The SLA policy applies to the issues of these parts.
2940
+ * @example ["PROD-12345"]
2941
+ */
2942
+ parts?: string[];
2943
+ /**
2944
+ * The SLA policy applies to the issues of these revorgs.
2945
+ * @example ["REV-AbCdEfGh"]
2946
+ */
2947
+ rev_orgs?: string[];
2948
+ /** The SLA policy applies to issues with these stages. */
2949
+ stage_name?: string[];
2950
+ /** The issue subtype for which the SLA policy applies. */
2951
+ subtype?: string[];
2952
+ /**
2953
+ * The SLA policy applies to issues with these tags. If empty, the tag
2954
+ * filter isn't applied.
2955
+ * @example ["TAG-12345"]
2956
+ */
2957
+ tags?: string[];
2958
+ }
2959
+ /** set-sla-policy */
2960
+ export interface SetSlaPolicy {
2961
+ /** Metrics to apply to the selected items. */
2962
+ metrics?: SetSupportMetricTarget[];
2963
+ /** Human-readable name. */
2964
+ name: string;
2965
+ selector: SetSlaSelector;
2966
+ }
2967
+ /** set-sla-selector */
2968
+ export interface SetSlaSelector {
2969
+ /** The item type for which the SLA policy applies. */
2970
+ applies_to: SlaSelectorAppliesTo;
2971
+ /**
2972
+ * Custom fields with their fully qualified names and associated with
2973
+ * their exact allowed values. The SLA policy applies to records where
2974
+ * all named custom fields have exactly the specified values. If the
2975
+ * value is null, the field must have null value or not be present.
2976
+ */
2977
+ custom_fields?: object;
2978
+ /**
2979
+ * The SLA policy applies to the tickets or conversations of these
2980
+ * groups.
2981
+ */
2982
+ groups?: string[];
2983
+ issue_selector?: SetIssueSelector;
2984
+ /**
2985
+ * The SLA policy applies to the tickets or conversations of these
2986
+ * owners.
2987
+ */
2988
+ owners?: string[];
2989
+ /**
2990
+ * The SLA policy applies to the tickets of these parts.
2991
+ * @example ["PROD-12345"]
2992
+ */
2993
+ parts?: string[];
2994
+ /** The SLA policy applies to conversations with these priorities. */
2995
+ priority?: SlaSelectorPriority[];
2996
+ /** The SLA policy applies to tickets with these severities. */
2997
+ severity?: SlaSelectorSeverity[];
2998
+ /** The SLA policy applies to conversations with these sources. */
2999
+ source_channel?: string[];
3000
+ /** The SLA policy applies to tickets with these subtypes. */
3001
+ subtype?: string[];
3002
+ /**
3003
+ * The SLA policy applies to items with these tags.
3004
+ * @example ["TAG-12345"]
3005
+ */
3006
+ tags?: string[];
3007
+ /** The SLA policy applies to tickets with these source channels. */
3008
+ ticket_source_channel?: string[];
3009
+ }
3010
+ /** set-support-metric-target */
3011
+ export interface SetSupportMetricTarget {
3012
+ /** The metric to apply. */
3013
+ metric: string;
3014
+ /**
3015
+ * The organization schedule controlling this metrics calculation.
3016
+ * Time based metrics don't consume time while their schedule is off.
3017
+ */
3018
+ org_schedule_id?: string;
3019
+ /**
3020
+ * The percentage of instances for which this metric's target must not
3021
+ * be breached, in order to avoid breaching the overall SLA policy.
3022
+ * @format double
3023
+ */
3024
+ performance?: number;
3025
+ /**
3026
+ * The target value to be achieved, for example the time in which to
3027
+ * do something, or the maximum allowed number of message pairs. The
3028
+ * units and interpretation of the value is controlled by the
3029
+ * properties of the referenced metric.
3030
+ * @format int32
3031
+ */
3032
+ target: number;
3033
+ /**
3034
+ * The threshold in the same units as target where the metric is
3035
+ * considered to be 'at risk'.
3036
+ * @format int32
3037
+ */
3038
+ warning_target?: number;
3039
+ }
2778
3040
  /** set-tag-with-value */
2779
3041
  export interface SetTagWithValue {
2780
3042
  /**
@@ -2788,6 +3050,103 @@ export interface SetTagWithValue {
2788
3050
  */
2789
3051
  value?: string;
2790
3052
  }
3053
+ /** sla */
3054
+ export type Sla = AtomBase & {
3055
+ /**
3056
+ * Describes the compensation to be provided in case of SLA breach. It is
3057
+ * not 'self-executing', it is the responsibility of the organization
3058
+ * providing the SLA to actually transfer the promised credit, resource or
3059
+ * other payment.
3060
+ */
3061
+ compensation?: SlaCompensation;
3062
+ /** Description of the purpose and capabilities of the SLA. */
3063
+ description?: string;
3064
+ /**
3065
+ * Specifies the frequency of when the contractually-meaningful evaluation
3066
+ * of the SLA happens. The organization for their own information might
3067
+ * evaluate the various metrics contained in the policy as often as we can
3068
+ * make it feasible for them, but only the evaluation at the end of the
3069
+ * evaluation period triggers a compensation and needs to be shared with
3070
+ * the customer.
3071
+ */
3072
+ evaluation_period?: SlaEvaluationPeriod;
3073
+ /** Human-readable name. */
3074
+ name: string;
3075
+ /**
3076
+ * The policies encompassed by this SLA, ordered in decreasing
3077
+ * priority.
3078
+ */
3079
+ policies?: SlaPolicy[];
3080
+ /** Type of the SLA. */
3081
+ sla_type?: SlaType;
3082
+ /**
3083
+ * Status determines how an item can be used. In 'draft' status an item
3084
+ * can be edited but can't be used. When 'published' the item can longer
3085
+ * be edited but can be used. 'Archived' is read-only.
3086
+ */
3087
+ status: SlaStatus;
3088
+ };
3089
+ /**
3090
+ * The object types on which the SLA applies. An external SLA can apply to
3091
+ * multiple object types, but an internal SLA can apply to only one object
3092
+ * type.
3093
+ */
3094
+ export declare enum SlaAppliesTo {
3095
+ Conversation = "conversation",
3096
+ Issue = "issue",
3097
+ Ticket = "ticket"
3098
+ }
3099
+ /** sla-assign-result */
3100
+ export interface SlaAssignResult {
3101
+ error?: Error;
3102
+ rev_org: RevOrgSummary;
3103
+ }
3104
+ /**
3105
+ * sla-compensation
3106
+ * Describes the compensation to be provided in case of SLA breach. It is
3107
+ * not 'self-executing', it is the responsibility of the organization
3108
+ * providing the SLA to actually transfer the promised credit, resource or
3109
+ * other payment.
3110
+ */
3111
+ export type SlaCompensation = object;
3112
+ /**
3113
+ * Specifies the frequency of when the contractually-meaningful evaluation
3114
+ * of the SLA happens. The organization for their own information might
3115
+ * evaluate the various metrics contained in the policy as often as we can
3116
+ * make it feasible for them, but only the evaluation at the end of the
3117
+ * evaluation period triggers a compensation and needs to be shared with
3118
+ * the customer.
3119
+ */
3120
+ export declare enum SlaEvaluationPeriod {
3121
+ Monthly = "monthly",
3122
+ Quarterly = "quarterly",
3123
+ Weekly = "weekly",
3124
+ Yearly = "yearly"
3125
+ }
3126
+ /**
3127
+ * sla-policy
3128
+ * A policy that represents a promise to your revs.
3129
+ */
3130
+ export type SlaPolicy = object;
3131
+ /** The item type for which the SLA policy applies. */
3132
+ export declare enum SlaSelectorAppliesTo {
3133
+ Conversation = "conversation",
3134
+ Issue = "issue",
3135
+ Ticket = "ticket"
3136
+ }
3137
+ /** The SLA policy applies to conversations with these priorities. */
3138
+ export declare enum SlaSelectorPriority {
3139
+ P0 = "p0",
3140
+ P1 = "p1",
3141
+ P2 = "p2"
3142
+ }
3143
+ /** The SLA policy applies to tickets with these severities. */
3144
+ export declare enum SlaSelectorSeverity {
3145
+ Blocker = "blocker",
3146
+ High = "high",
3147
+ Low = "low",
3148
+ Medium = "medium"
3149
+ }
2791
3150
  /**
2792
3151
  * Status determines how an item can be used. In 'draft' status an item
2793
3152
  * can be edited but can't be used. When 'published' the item can longer
@@ -2866,11 +3225,202 @@ export interface SlaTrackersGetRequest {
2866
3225
  export interface SlaTrackersGetResponse {
2867
3226
  sla_tracker: SlaTracker;
2868
3227
  }
3228
+ /** sla-trackers-list-request */
3229
+ export interface SlaTrackersListRequest {
3230
+ created_date?: DateTimeFilter;
3231
+ /**
3232
+ * The cursor to resume iteration from. If not provided, then
3233
+ * iteration starts from the beginning.
3234
+ */
3235
+ cursor?: string;
3236
+ /**
3237
+ * The maximum number of SLA trackers to return. The default is '50'.
3238
+ * @format int32
3239
+ */
3240
+ limit?: number;
3241
+ /**
3242
+ * The iteration mode to use. If "after", then entries after the provided
3243
+ * cursor will be returned, or if no cursor is provided, then from the
3244
+ * beginning. If "before", then entries before the provided cursor will be
3245
+ * returned, or if no cursor is provided, then from the end. Entries will
3246
+ * always be returned in the specified sort-by order.
3247
+ */
3248
+ mode?: ListMode;
3249
+ modified_date?: DateTimeFilter;
3250
+ /** The SLA tracker stages the filter matches. */
3251
+ stage?: string[];
3252
+ /** The SLA tracker statuses the filter matches. */
3253
+ status?: string[];
3254
+ }
3255
+ /** sla-trackers-list-response */
3256
+ export interface SlaTrackersListResponse {
3257
+ /**
3258
+ * The cursor used to iterate subsequent results in accordance to the
3259
+ * sort order. If not set, then no later elements exist.
3260
+ */
3261
+ next_cursor?: string;
3262
+ /**
3263
+ * The cursor used to iterate preceding results in accordance to the
3264
+ * sort order. If not set, then no prior elements exist.
3265
+ */
3266
+ prev_cursor?: string;
3267
+ /** The list of SLA trackers. */
3268
+ sla_trackers: SlaTracker[];
3269
+ }
2869
3270
  /** Type of the SLA. */
2870
3271
  export declare enum SlaType {
2871
3272
  External = "external",
2872
3273
  Internal = "internal"
2873
3274
  }
3275
+ /** slas-assign-request */
3276
+ export interface SlasAssignRequest {
3277
+ /**
3278
+ * The SLA which would be assigned to the Rev organizations. If
3279
+ * omitted, the SLA of all the rev organizations referenced will be
3280
+ * unset.
3281
+ */
3282
+ id?: string;
3283
+ /**
3284
+ * The Rev organizations to apply the SLA to.
3285
+ * @example ["REV-AbCdEfGh"]
3286
+ */
3287
+ rev_orgs: string[];
3288
+ }
3289
+ /** slas-assign-response */
3290
+ export interface SlasAssignResponse {
3291
+ /** The list of outcomes for each Rev organization. */
3292
+ results: SlaAssignResult[];
3293
+ }
3294
+ /** slas-create-request */
3295
+ export interface SlasCreateRequest {
3296
+ account_selector?: AccountsFilters;
3297
+ /** The object types this SLA can apply to. */
3298
+ applies_to?: SlaAppliesTo[];
3299
+ /** Description of the purpose and capabilities of the SLA. */
3300
+ description?: string;
3301
+ /**
3302
+ * Specifies the frequency of when the contractually-meaningful evaluation
3303
+ * of the SLA happens. The organization for their own information might
3304
+ * evaluate the various metrics contained in the policy as often as we can
3305
+ * make it feasible for them, but only the evaluation at the end of the
3306
+ * evaluation period triggers a compensation and needs to be shared with
3307
+ * the customer.
3308
+ */
3309
+ evaluation_period?: SlaEvaluationPeriod;
3310
+ /** Human-readable name. */
3311
+ name: string;
3312
+ /**
3313
+ * The policies encompassed by this SLA, ordered in decreasing
3314
+ * priority.
3315
+ */
3316
+ policies?: SetSlaPolicy[];
3317
+ /** Type of the SLA. */
3318
+ sla_type?: SlaType;
3319
+ }
3320
+ /** slas-create-response */
3321
+ export interface SlasCreateResponse {
3322
+ sla: Sla;
3323
+ }
3324
+ export declare enum SlasFilterAppliesToOperatorType {
3325
+ All = "all",
3326
+ Any = "any"
3327
+ }
3328
+ /** slas-get-request */
3329
+ export interface SlasGetRequest {
3330
+ /** The ID of the SLA to get. */
3331
+ id: string;
3332
+ }
3333
+ /** slas-get-response */
3334
+ export interface SlasGetResponse {
3335
+ sla: Sla;
3336
+ }
3337
+ /** slas-list-request */
3338
+ export interface SlasListRequest {
3339
+ /** The object types the SLA applies to. */
3340
+ applies_to?: SlaAppliesTo[];
3341
+ applies_to_op?: SlasFilterAppliesToOperatorType;
3342
+ /**
3343
+ * The cursor to resume iteration from. If not provided, then
3344
+ * iteration starts from the beginning.
3345
+ */
3346
+ cursor?: string;
3347
+ /**
3348
+ * The maximum number of SLAs to return. The default is '50'.
3349
+ * @format int32
3350
+ */
3351
+ limit?: number;
3352
+ /**
3353
+ * The iteration mode to use. If "after", then entries after the provided
3354
+ * cursor will be returned, or if no cursor is provided, then from the
3355
+ * beginning. If "before", then entries before the provided cursor will be
3356
+ * returned, or if no cursor is provided, then from the end. Entries will
3357
+ * always be returned in the specified sort-by order.
3358
+ */
3359
+ mode?: ListMode;
3360
+ /** The SLA types the filter matches. */
3361
+ sla_type?: SlaType[];
3362
+ /** The SLA statuses the filter matches. */
3363
+ status?: SlaStatus[];
3364
+ }
3365
+ /** slas-list-response */
3366
+ export interface SlasListResponse {
3367
+ /**
3368
+ * The cursor used to iterate subsequent results in accordance to the
3369
+ * sort order. If not set, then no later elements exist.
3370
+ */
3371
+ next_cursor?: string;
3372
+ /**
3373
+ * The cursor used to iterate preceding results in accordance to the
3374
+ * sort order. If not set, then no prior elements exist.
3375
+ */
3376
+ prev_cursor?: string;
3377
+ /** The list of SLAs. */
3378
+ slas: Sla[];
3379
+ }
3380
+ /** slas-transition-request */
3381
+ export interface SlasTransitionRequest {
3382
+ /** The updated SLA. */
3383
+ id: string;
3384
+ /**
3385
+ * Status determines how an item can be used. In 'draft' status an item
3386
+ * can be edited but can't be used. When 'published' the item can longer
3387
+ * be edited but can be used. 'Archived' is read-only.
3388
+ */
3389
+ status: SlaStatus;
3390
+ }
3391
+ /** slas-transition-response */
3392
+ export interface SlasTransitionResponse {
3393
+ sla: Sla;
3394
+ }
3395
+ /** slas-update-request */
3396
+ export interface SlasUpdateRequest {
3397
+ account_selector?: AccountsFilters;
3398
+ /** Description of the purpose and capabilities of the SLA. */
3399
+ description?: string;
3400
+ /**
3401
+ * Specifies the frequency of when the contractually-meaningful evaluation
3402
+ * of the SLA happens. The organization for their own information might
3403
+ * evaluate the various metrics contained in the policy as often as we can
3404
+ * make it feasible for them, but only the evaluation at the end of the
3405
+ * evaluation period triggers a compensation and needs to be shared with
3406
+ * the customer.
3407
+ */
3408
+ evaluation_period?: SlaEvaluationPeriod;
3409
+ /** The SLA's ID. */
3410
+ id: string;
3411
+ /** Human-readable name. */
3412
+ name?: string;
3413
+ /**
3414
+ * The policies encompassed by this SLA, ordered in decreasing
3415
+ * priority, the whole array will be overwritten by the contents of
3416
+ * this array.
3417
+ */
3418
+ policies?: SetSlaPolicy[];
3419
+ }
3420
+ /** slas-update-response */
3421
+ export interface SlasUpdateResponse {
3422
+ sla: Sla;
3423
+ }
2874
3424
  /** snap-widget */
2875
3425
  export interface SnapWidget {
2876
3426
  type: SnapWidgetType;
@@ -2917,6 +3467,8 @@ export interface StagedInfoFilter {
2917
3467
  export type Survey = AtomBase & {
2918
3468
  /** Description of the survey. */
2919
3469
  description?: string;
3470
+ /** Header of the survey. */
3471
+ header?: string;
2920
3472
  /** Text posted when introducing the survey to the responder. */
2921
3473
  introductory_text?: string;
2922
3474
  /**
@@ -2930,6 +3482,8 @@ export type Survey = AtomBase & {
2930
3482
  schema?: SchemaFieldDescriptor[];
2931
3483
  /** List of all the fields and their respective metadata in the schema. */
2932
3484
  schema_with_metadata?: SurveyFieldWithMetadata[];
3485
+ /** Title of the survey. */
3486
+ title?: string;
2933
3487
  };
2934
3488
  /**
2935
3489
  * survey-aggregation-filter
@@ -3187,6 +3741,14 @@ export type Ticket = WorkBase & {
3187
3741
  rev_org?: OrgSummary;
3188
3742
  /** The properties of an enum value. */
3189
3743
  sentiment?: EnumValue;
3744
+ /**
3745
+ * Timestamp when the sentiment was last modified.
3746
+ * @format date-time
3747
+ * @example "2023-01-01T12:00:00.000Z"
3748
+ */
3749
+ sentiment_modified_date?: string;
3750
+ /** Summary justifying the sentiment. */
3751
+ sentiment_summary?: string;
3190
3752
  /** Severity of the ticket. */
3191
3753
  severity?: TicketSeverity;
3192
3754
  sla_tracker?: SlaTrackerSummary;
@@ -3232,6 +3794,7 @@ export type TimelineComment = TimelineEntryBase & {
3232
3794
  };
3233
3795
  /** The type of the body to use for the comment. */
3234
3796
  export declare enum TimelineCommentBodyType {
3797
+ Data = "data",
3235
3798
  SnapKit = "snap_kit",
3236
3799
  SnapWidget = "snap_widget",
3237
3800
  Text = "text"
@@ -3677,6 +4240,7 @@ export interface WebhookEventRequest {
3677
4240
  webhook_updated?: EventWebhookUpdated;
3678
4241
  work_created?: EventWorkCreated;
3679
4242
  work_deleted?: EventWorkDeleted;
4243
+ work_fetched?: EventWorkFetched;
3680
4244
  work_updated?: EventWorkUpdated;
3681
4245
  }
3682
4246
  /** webhook-event-response */
@@ -3737,6 +4301,7 @@ export declare enum WebhookEventType {
3737
4301
  WebhookUpdated = "webhook_updated",
3738
4302
  WorkCreated = "work_created",
3739
4303
  WorkDeleted = "work_deleted",
4304
+ WorkFetched = "work_fetched",
3740
4305
  WorkUpdated = "work_updated"
3741
4306
  }
3742
4307
  /** webhook-event-verify */
@@ -4353,6 +4918,14 @@ export interface WorksUpdateRequestTicket {
4353
4918
  * @format int64
4354
4919
  */
4355
4920
  sentiment?: number;
4921
+ /**
4922
+ * Timestamp at which sentiment was last modified.
4923
+ * @format date-time
4924
+ * @example "2023-01-01T12:00:00.000Z"
4925
+ */
4926
+ sentiment_modified_date?: string;
4927
+ /** Summary justifying the current sentiment. */
4928
+ sentiment_summary?: string;
4356
4929
  /** Severity of the ticket. */
4357
4930
  severity?: TicketSeverity;
4358
4931
  }
@@ -4952,6 +5525,51 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4952
5525
  * @secure
4953
5526
  */
4954
5527
  keyringsCreateCallbackPost: (data: KeyringsCreateCallbackRequest, params?: RequestParams) => Promise<AxiosResponse<void, any>>;
5528
+ /**
5529
+ * @description Lists metric definitions matching a filter.
5530
+ *
5531
+ * @tags slas
5532
+ * @name MetricDefinitionsList
5533
+ * @request GET:/metric-definitions.list
5534
+ * @secure
5535
+ */
5536
+ metricDefinitionsList: (query?: {
5537
+ /** The type of objects the metric definition applies to. */
5538
+ applies_to_type?: MetricDefinitionAppliesTo[];
5539
+ /**
5540
+ * The cursor to resume iteration from. If not provided, then iteration
5541
+ * starts from the beginning.
5542
+ */
5543
+ cursor?: string;
5544
+ /**
5545
+ * Whether to include custom metrics in the response. If not set, then
5546
+ * custom metrics are excluded.
5547
+ */
5548
+ include_custom_metrics?: boolean;
5549
+ /**
5550
+ * The maximum number of records to return. The default is '50'.
5551
+ * @format int32
5552
+ */
5553
+ limit?: number;
5554
+ /**
5555
+ * The iteration mode to use, otherwise if not set, then "after" is
5556
+ * used.
5557
+ */
5558
+ mode?: ListMode;
5559
+ /** The status of the metric definition. */
5560
+ status?: MetricDefinitionStatus[];
5561
+ /** The type of metric definitions sought. */
5562
+ type?: MetricDefinitionMetricType[];
5563
+ }, params?: RequestParams) => Promise<AxiosResponse<MetricDefinitionsListResponse, any>>;
5564
+ /**
5565
+ * @description Lists metric definitions matching a filter.
5566
+ *
5567
+ * @tags slas
5568
+ * @name MetricDefinitionsListPost
5569
+ * @request POST:/metric-definitions.list
5570
+ * @secure
5571
+ */
5572
+ metricDefinitionsListPost: (data: MetricDefinitionsListRequest, params?: RequestParams) => Promise<AxiosResponse<MetricDefinitionsListResponse, any>>;
4955
5573
  /**
4956
5574
  * @description Creates new [part](https://devrev.ai/docs/product/parts).
4957
5575
  *
@@ -5213,6 +5831,172 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5213
5831
  * @secure
5214
5832
  */
5215
5833
  slaTrackersGetPost: (data: SlaTrackersGetRequest, params?: RequestParams) => Promise<AxiosResponse<SlaTrackersGetResponse, any>>;
5834
+ /**
5835
+ * @description Lists SLA trackers matching a filter.
5836
+ *
5837
+ * @tags slas
5838
+ * @name SlaTrackersList
5839
+ * @request GET:/sla-trackers.list
5840
+ * @secure
5841
+ */
5842
+ slaTrackersList: (query?: {
5843
+ /**
5844
+ * Filters for objects created after the provided timestamp (inclusive).
5845
+ * @format date-time
5846
+ * @example "2023-01-01T12:00:00.000Z"
5847
+ */
5848
+ 'created_date.after'?: string;
5849
+ /**
5850
+ * Filters for objects created before the provided timestamp
5851
+ * (inclusive).
5852
+ * @format date-time
5853
+ * @example "2023-01-01T12:00:00.000Z"
5854
+ */
5855
+ 'created_date.before'?: string;
5856
+ /**
5857
+ * The cursor to resume iteration from. If not provided, then iteration
5858
+ * starts from the beginning.
5859
+ */
5860
+ cursor?: string;
5861
+ /**
5862
+ * The maximum number of SLA trackers to return. The default is '50'.
5863
+ * @format int32
5864
+ */
5865
+ limit?: number;
5866
+ /**
5867
+ * The iteration mode to use, otherwise if not set, then "after" is
5868
+ * used.
5869
+ */
5870
+ mode?: ListMode;
5871
+ /**
5872
+ * Filters for objects created after the provided timestamp (inclusive).
5873
+ * @format date-time
5874
+ * @example "2023-01-01T12:00:00.000Z"
5875
+ */
5876
+ 'modified_date.after'?: string;
5877
+ /**
5878
+ * Filters for objects created before the provided timestamp
5879
+ * (inclusive).
5880
+ * @format date-time
5881
+ * @example "2023-01-01T12:00:00.000Z"
5882
+ */
5883
+ 'modified_date.before'?: string;
5884
+ /** The SLA tracker stages the filter matches. */
5885
+ stage?: string[];
5886
+ /** The SLA tracker statuses the filter matches. */
5887
+ status?: string[];
5888
+ }, params?: RequestParams) => Promise<AxiosResponse<SlaTrackersListResponse, any>>;
5889
+ /**
5890
+ * @description Lists SLA trackers matching a filter.
5891
+ *
5892
+ * @tags slas
5893
+ * @name SlaTrackersListPost
5894
+ * @request POST:/sla-trackers.list
5895
+ * @secure
5896
+ */
5897
+ slaTrackersListPost: (data: SlaTrackersListRequest, params?: RequestParams) => Promise<AxiosResponse<SlaTrackersListResponse, any>>;
5898
+ /**
5899
+ * @description Assigns the SLA to a set of Rev organizations.
5900
+ *
5901
+ * @tags slas
5902
+ * @name SlasAssign
5903
+ * @request POST:/slas.assign
5904
+ * @secure
5905
+ */
5906
+ slasAssign: (data: SlasAssignRequest, params?: RequestParams) => Promise<AxiosResponse<SlasAssignResponse, any>>;
5907
+ /**
5908
+ * @description Creates an SLA in draft status.
5909
+ *
5910
+ * @tags slas
5911
+ * @name SlasCreate
5912
+ * @request POST:/slas.create
5913
+ * @secure
5914
+ */
5915
+ slasCreate: (data: SlasCreateRequest, params?: RequestParams) => Promise<AxiosResponse<SlasCreateResponse, any>>;
5916
+ /**
5917
+ * @description Gets an SLA.
5918
+ *
5919
+ * @tags slas
5920
+ * @name SlasGet
5921
+ * @request GET:/slas.get
5922
+ * @secure
5923
+ */
5924
+ slasGet: (query: {
5925
+ /** The ID of the SLA to get. */
5926
+ id: string;
5927
+ }, params?: RequestParams) => Promise<AxiosResponse<SlasGetResponse, any>>;
5928
+ /**
5929
+ * @description Gets an SLA.
5930
+ *
5931
+ * @tags slas
5932
+ * @name SlasGetPost
5933
+ * @request POST:/slas.get
5934
+ * @secure
5935
+ */
5936
+ slasGetPost: (data: SlasGetRequest, params?: RequestParams) => Promise<AxiosResponse<SlasGetResponse, any>>;
5937
+ /**
5938
+ * @description Lists SLAs matching a filter.
5939
+ *
5940
+ * @tags slas
5941
+ * @name SlasList
5942
+ * @request GET:/slas.list
5943
+ * @secure
5944
+ */
5945
+ slasList: (query?: {
5946
+ /** The object types the SLA applies to. */
5947
+ applies_to?: SlaAppliesTo[];
5948
+ /**
5949
+ * The Filter operator to be applied on the applies to object types
5950
+ * filter.
5951
+ */
5952
+ applies_to_op?: SlasFilterAppliesToOperatorType;
5953
+ /**
5954
+ * The cursor to resume iteration from. If not provided, then iteration
5955
+ * starts from the beginning.
5956
+ */
5957
+ cursor?: string;
5958
+ /**
5959
+ * The maximum number of SLAs to return. The default is '50'.
5960
+ * @format int32
5961
+ */
5962
+ limit?: number;
5963
+ /**
5964
+ * The iteration mode to use, otherwise if not set, then "after" is
5965
+ * used.
5966
+ */
5967
+ mode?: ListMode;
5968
+ /** The SLA types the filter matches. */
5969
+ sla_type?: SlaType[];
5970
+ /** The SLA statuses the filter matches. */
5971
+ status?: SlaStatus[];
5972
+ }, params?: RequestParams) => Promise<AxiosResponse<SlasListResponse, any>>;
5973
+ /**
5974
+ * @description Lists SLAs matching a filter.
5975
+ *
5976
+ * @tags slas
5977
+ * @name SlasListPost
5978
+ * @request POST:/slas.list
5979
+ * @secure
5980
+ */
5981
+ slasListPost: (data: SlasListRequest, params?: RequestParams) => Promise<AxiosResponse<SlasListResponse, any>>;
5982
+ /**
5983
+ * @description Changes the status of an SLA.
5984
+ *
5985
+ * @tags slas
5986
+ * @name SlasTransition
5987
+ * @request POST:/slas.transition
5988
+ * @secure
5989
+ */
5990
+ slasTransition: (data: SlasTransitionRequest, params?: RequestParams) => Promise<AxiosResponse<SlasTransitionResponse, any>>;
5991
+ /**
5992
+ * @description Updates a draft SLA.
5993
+ *
5994
+ * @tags slas
5995
+ * @name SlasUpdate
5996
+ * @request POST:/slas.update
5997
+ * @secure
5998
+ */
5999
+ slasUpdate: (data: SlasUpdateRequest, params?: RequestParams) => Promise<AxiosResponse<SlasUpdateResponse, any>>;
5216
6000
  /**
5217
6001
  * @description Creates a new tag, which is used to create associations between objects and a logical concept denoted by the tag's name.
5218
6002
  *