@devrev/typescript-sdk 1.1.16 → 1.1.18

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,8 +33,8 @@ 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.UserType = exports.UserState = exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesUpdateRequestType = 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.GroupMemberType = exports.EventSourceStatus = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorBadRequestType = exports.EngagementsCreateRequestEngagementType = exports.EngagementType = exports.DateTimePresetType = exports.DateFilterType = exports.CustomSchemaFragmentsSetRequestType = exports.CustomSchemaFragmentType = exports.ConversationsCreateRequestTypeValue = exports.ArticleStatus = exports.AccessLevel = void 0;
37
- exports.Api = exports.HttpClient = exports.ContentType = exports.WorkType = exports.WebhookStatus = exports.WebhookEventType = void 0;
36
+ exports.TimelineEntryVisibility = exports.TimelineEntryType = exports.TimelineEntryObjectType = exports.TimelineEntriesUpdateRequestType = exports.TimelineEntriesCreateRequestType = exports.TimelineEntriesCollection = exports.TimelineCommentBodyType = exports.TicketSeverity = exports.TaskPriority = exports.SlaSummaryStage = 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.GroupMemberType = exports.EventSourceStatus = exports.ErrorUnauthorizedType = exports.ErrorTooManyRequestsType = exports.ErrorServiceUnavailableType = exports.ErrorNotFoundType = exports.ErrorInternalServerErrorType = exports.ErrorForbiddenType = exports.ErrorBadRequestType = exports.EngagementsCreateRequestEngagementType = exports.EngagementType = exports.DateTimePresetType = exports.DateFilterType = exports.CustomSchemaFragmentsSetRequestType = exports.CustomSchemaFragmentType = exports.ConversationsCreateRequestTypeValue = exports.ArticleStatus = exports.AggregationDetailAggregationType = exports.AccessLevel = void 0;
37
+ exports.Api = exports.HttpClient = exports.ContentType = exports.WorkType = exports.WebhookStatus = exports.WebhookEventType = exports.UserType = exports.UserState = exports.UomMetricScope = exports.UnitType = void 0;
38
38
  var AccessLevel;
39
39
  (function (AccessLevel) {
40
40
  AccessLevel["External"] = "external";
@@ -43,6 +43,39 @@ var AccessLevel;
43
43
  AccessLevel["Public"] = "public";
44
44
  AccessLevel["Restricted"] = "restricted";
45
45
  })(AccessLevel = exports.AccessLevel || (exports.AccessLevel = {}));
46
+ /**
47
+ * Aggregation type to be used while aggregating the metering data for the
48
+ * UOM. 1] Sum - sum of all the values for the meter in a given period Ex.
49
+ * { M1:2, M1:4 } => {M1:6} 2] Minimum - min of all the values for the
50
+ * meter in a given period Ex. { M1:2, M1:4 } => {M1:2} 3] Maximum - max
51
+ * of all the values for the meter in a given period Ex. { M1:2, M1:4 } =>
52
+ * {M1:4} 4] Unique Count - Sum of distinct unique dimension observed for
53
+ * the meter in the given period (not considering the data from the
54
+ * previous billing period) Ex. January {M1:{VM:VM0}}, February
55
+ * {M1:{VM:VM1}, M1:{VM:VM2}, M1:{VM:VM1}} => {M1:2} 5] Running Total -
56
+ * Sum of distinct active unique dimension observed for a meter in the
57
+ * given period, taking into consideration the active data from the
58
+ * previous billing cycle Ex. January {M1:{VM:VM0,on}, {M1:{VM:VM1,off}
59
+ * February {M1:{VM:VM2, on}, M1:{VM:VM2, off}, M1:{VM:VM3, on}} => {M1:3}
60
+ * 6] Duration - Sum of distinct active unique dimension duration for a
61
+ * meter in the given period, taking into consideration the active data
62
+ * from the previous month Ex. January15 {M1:{VM:VM0,on, 4}} February15
63
+ * {M1:{VM:VM0,off}, February18 {M1:{VM:VM1,on,5} => M1->
64
+ * 30*4*charge_per_day + 10*5*charge_per_day 7] Latest - consider the
65
+ * latest/last meter in the given period 8] Oldest - consider the
66
+ * oldest/first record in the given period.
67
+ */
68
+ var AggregationDetailAggregationType;
69
+ (function (AggregationDetailAggregationType) {
70
+ AggregationDetailAggregationType["Duration"] = "duration";
71
+ AggregationDetailAggregationType["Latest"] = "latest";
72
+ AggregationDetailAggregationType["Maximum"] = "maximum";
73
+ AggregationDetailAggregationType["Minimum"] = "minimum";
74
+ AggregationDetailAggregationType["Oldest"] = "oldest";
75
+ AggregationDetailAggregationType["RunningTotal"] = "running_total";
76
+ AggregationDetailAggregationType["Sum"] = "sum";
77
+ AggregationDetailAggregationType["UniqueCount"] = "unique_count";
78
+ })(AggregationDetailAggregationType = exports.AggregationDetailAggregationType || (exports.AggregationDetailAggregationType = {}));
46
79
  /** Status of the article. */
47
80
  var ArticleStatus;
48
81
  (function (ArticleStatus) {
@@ -104,6 +137,7 @@ var ErrorBadRequestType;
104
137
  ErrorBadRequestType["BadRequest"] = "bad_request";
105
138
  ErrorBadRequestType["InvalidEnumValue"] = "invalid_enum_value";
106
139
  ErrorBadRequestType["InvalidField"] = "invalid_field";
140
+ ErrorBadRequestType["MissingDependency"] = "missing_dependency";
107
141
  ErrorBadRequestType["MissingRequiredField"] = "missing_required_field";
108
142
  ErrorBadRequestType["ParseError"] = "parse_error";
109
143
  ErrorBadRequestType["ValueNotPermitted"] = "value_not_permitted";
@@ -293,6 +327,7 @@ var SchemaFieldDescriptorArrayTypeBaseType;
293
327
  SchemaFieldDescriptorArrayTypeBaseType["Text"] = "text";
294
328
  SchemaFieldDescriptorArrayTypeBaseType["Timestamp"] = "timestamp";
295
329
  SchemaFieldDescriptorArrayTypeBaseType["Tokens"] = "tokens";
330
+ SchemaFieldDescriptorArrayTypeBaseType["Uenum"] = "uenum";
296
331
  })(SchemaFieldDescriptorArrayTypeBaseType = exports.SchemaFieldDescriptorArrayTypeBaseType || (exports.SchemaFieldDescriptorArrayTypeBaseType = {}));
297
332
  var SchemaFieldDescriptorFieldType;
298
333
  (function (SchemaFieldDescriptorFieldType) {
@@ -308,6 +343,8 @@ var SchemaFieldDescriptorFieldType;
308
343
  SchemaFieldDescriptorFieldType["Text"] = "text";
309
344
  SchemaFieldDescriptorFieldType["Timestamp"] = "timestamp";
310
345
  SchemaFieldDescriptorFieldType["Tokens"] = "tokens";
346
+ SchemaFieldDescriptorFieldType["Uenum"] = "uenum";
347
+ SchemaFieldDescriptorFieldType["Unknown"] = "unknown";
311
348
  })(SchemaFieldDescriptorFieldType = exports.SchemaFieldDescriptorFieldType || (exports.SchemaFieldDescriptorFieldType = {}));
312
349
  /**
313
350
  * Specifies the frequency of when the contractually-meaningful evaluation
@@ -356,6 +393,18 @@ var SlaStatus;
356
393
  SlaStatus["Draft"] = "draft";
357
394
  SlaStatus["Published"] = "published";
358
395
  })(SlaStatus = exports.SlaStatus || (exports.SlaStatus = {}));
396
+ /**
397
+ * The stage of the SLA. This is the metric stage which is closest to
398
+ * breach.
399
+ */
400
+ var SlaSummaryStage;
401
+ (function (SlaSummaryStage) {
402
+ SlaSummaryStage["Breached"] = "breached";
403
+ SlaSummaryStage["Completed"] = "completed";
404
+ SlaSummaryStage["Paused"] = "paused";
405
+ SlaSummaryStage["Running"] = "running";
406
+ SlaSummaryStage["Warning"] = "warning";
407
+ })(SlaSummaryStage = exports.SlaSummaryStage || (exports.SlaSummaryStage = {}));
359
408
  /** Priority of the work based upon impact and criticality. */
360
409
  var TaskPriority;
361
410
  (function (TaskPriority) {
@@ -429,6 +478,24 @@ var TimelineEntryVisibility;
429
478
  TimelineEntryVisibility["Private"] = "private";
430
479
  TimelineEntryVisibility["Public"] = "public";
431
480
  })(TimelineEntryVisibility = exports.TimelineEntryVisibility || (exports.TimelineEntryVisibility = {}));
481
+ /**
482
+ * This defines the UOM unit type. For example, for 'number of video
483
+ * calls', unit type will be a number.
484
+ */
485
+ var UnitType;
486
+ (function (UnitType) {
487
+ UnitType["Boolean"] = "boolean";
488
+ UnitType["Number"] = "number";
489
+ })(UnitType = exports.UnitType || (exports.UnitType = {}));
490
+ /**
491
+ * The granularity at which the metrics ingestion data is to be emitted
492
+ * for the UOM.
493
+ */
494
+ var UomMetricScope;
495
+ (function (UomMetricScope) {
496
+ UomMetricScope["Org"] = "org";
497
+ UomMetricScope["User"] = "user";
498
+ })(UomMetricScope = exports.UomMetricScope || (exports.UomMetricScope = {}));
432
499
  /** State of the user. */
433
500
  var UserState;
434
501
  (function (UserState) {
@@ -1074,7 +1141,7 @@ class Api extends HttpClient {
1074
1141
  /**
1075
1142
  * @description Ingest endpoint for DevRev metrics data from clients.
1076
1143
  *
1077
- * @tags telemetry
1144
+ * @tags product-usage
1078
1145
  * @name MetricsDevrevIngest
1079
1146
  * @request POST:/metrics.devrev.ingest
1080
1147
  * @secure
@@ -1620,6 +1687,69 @@ class Api extends HttpClient {
1620
1687
  * @secure
1621
1688
  */
1622
1689
  this.timelineEntriesUpdate = (data, params = {}) => this.request(Object.assign({ path: `/timeline-entries.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1690
+ /**
1691
+ * @description Creates a Unit of Measurement on a part.
1692
+ *
1693
+ * @tags product-usage
1694
+ * @name UomsCreate
1695
+ * @request POST:/uoms.create
1696
+ * @secure
1697
+ */
1698
+ this.uomsCreate = (data, params = {}) => this.request(Object.assign({ path: `/uoms.create`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1699
+ /**
1700
+ * @description Deletes a Unit of Measurement.
1701
+ *
1702
+ * @tags product-usage
1703
+ * @name UomsDelete
1704
+ * @request POST:/uoms.delete
1705
+ * @secure
1706
+ */
1707
+ this.uomsDelete = (data, params = {}) => this.request(Object.assign({ path: `/uoms.delete`, method: 'POST', body: data, secure: true, type: ContentType.Json }, params));
1708
+ /**
1709
+ * @description Gets a Unit of Measurement.
1710
+ *
1711
+ * @tags product-usage
1712
+ * @name UomsGet
1713
+ * @request GET:/uoms.get
1714
+ * @secure
1715
+ */
1716
+ this.uomsGet = (query, params = {}) => this.request(Object.assign({ path: `/uoms.get`, method: 'GET', query: query, secure: true, format: 'json' }, params));
1717
+ /**
1718
+ * @description Gets a Unit of Measurement.
1719
+ *
1720
+ * @tags product-usage
1721
+ * @name UomsGetPost
1722
+ * @request POST:/uoms.get
1723
+ * @secure
1724
+ */
1725
+ this.uomsGetPost = (data, params = {}) => this.request(Object.assign({ path: `/uoms.get`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1726
+ /**
1727
+ * @description Gets the Unit of Measurements based on the given filters.
1728
+ *
1729
+ * @tags product-usage
1730
+ * @name UomsList
1731
+ * @request GET:/uoms.list
1732
+ * @secure
1733
+ */
1734
+ this.uomsList = (query, params = {}) => this.request(Object.assign({ path: `/uoms.list`, method: 'GET', query: query, secure: true, format: 'json' }, params));
1735
+ /**
1736
+ * @description Gets the Unit of Measurements based on the given filters.
1737
+ *
1738
+ * @tags product-usage
1739
+ * @name UomsListPost
1740
+ * @request POST:/uoms.list
1741
+ * @secure
1742
+ */
1743
+ this.uomsListPost = (data, params = {}) => this.request(Object.assign({ path: `/uoms.list`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1744
+ /**
1745
+ * @description Updates a Unit of Measurement.
1746
+ *
1747
+ * @tags product-usage
1748
+ * @name UomsUpdate
1749
+ * @request POST:/uoms.update
1750
+ * @secure
1751
+ */
1752
+ this.uomsUpdate = (data, params = {}) => this.request(Object.assign({ path: `/uoms.update`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1623
1753
  /**
1624
1754
  * @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.
1625
1755
  *