@devrev/typescript-sdk 1.1.14 → 1.1.15

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.
@@ -609,6 +609,34 @@ export interface ArtifactsPrepareResponseFormData {
609
609
  /** Value corresponding to the key. */
610
610
  value: string;
611
611
  }
612
+ /**
613
+ * artifacts-versions-prepare-request
614
+ * The request to prepare a new version of an artifact.
615
+ */
616
+ export interface ArtifactsVersionsPrepareRequest {
617
+ /**
618
+ * The ID of the artifact to prepare a new version for.
619
+ * @example "don:core:<partition>:devo/<dev-org-id>:artifact/<artifact-id>"
620
+ */
621
+ id: string;
622
+ }
623
+ /**
624
+ * artifacts-versions-prepare-response
625
+ * The response to preparing a new artifact version.
626
+ */
627
+ export interface ArtifactsVersionsPrepareResponse {
628
+ /** The POST policy form data. */
629
+ form_data: ArtifactsVersionsPrepareResponseFormData[];
630
+ /** The URL that the file's data should be uploaded to. */
631
+ url: string;
632
+ }
633
+ /** artifacts-versions-prepare-response-form-data */
634
+ export interface ArtifactsVersionsPrepareResponseFormData {
635
+ /** Key of the form field. */
636
+ key: string;
637
+ /** Value corresponding to the key. */
638
+ value: string;
639
+ }
612
640
  /** atom-base */
613
641
  export interface AtomBase {
614
642
  created_by?: UserSummary;
@@ -2055,6 +2083,42 @@ export declare enum ListMode {
2055
2083
  After = "after",
2056
2084
  Before = "before"
2057
2085
  }
2086
+ /** metric-data-point */
2087
+ export interface MetricDataPoint {
2088
+ /**
2089
+ * Key-value pairs for specifying additional attributes.
2090
+ * @maxItems 10
2091
+ */
2092
+ dimensions?: MetricDataPointDimension[];
2093
+ /**
2094
+ * Timestamp when metric value is captured.
2095
+ * @format date-time
2096
+ */
2097
+ timestamp: string;
2098
+ /**
2099
+ * The value corresponding to the metric. For simply recording
2100
+ * occurrence of an event, this value should be 1.0.
2101
+ * @format double
2102
+ */
2103
+ value: number;
2104
+ }
2105
+ /** metric-data-point-dimension */
2106
+ export interface MetricDataPointDimension {
2107
+ /**
2108
+ * The key for the dimension. The keys must be unique and it is not
2109
+ * allowed to have more than one value with the same key. Key must be
2110
+ * at least one character long and cannot be longer than 64
2111
+ * characters.Key can only contain alphanumeric characters (A-Z, a-z,
2112
+ * and 0-9) and underscores (_). Key cannot start with a number and is
2113
+ * case-insensitive.
2114
+ */
2115
+ key: string;
2116
+ /**
2117
+ * The value for the dimension. Value could be any string and cannot
2118
+ * be longer than 256 characters.
2119
+ */
2120
+ value: string;
2121
+ }
2058
2122
  /** metric-definition */
2059
2123
  export type MetricDefinition = AtomBase;
2060
2124
  /** The list of item types on which the metric might be applied. */
@@ -2114,6 +2178,41 @@ export interface MetricDefinitionsListResponse {
2114
2178
  */
2115
2179
  prev_cursor?: string;
2116
2180
  }
2181
+ /** metrics-data */
2182
+ export interface MetricsData {
2183
+ /**
2184
+ * One or more data points collected for a given metric such as object
2185
+ * usage, object state etc.
2186
+ * @minItems 1
2187
+ */
2188
+ data_points: MetricDataPoint[];
2189
+ /**
2190
+ * Name of the metric which is being measured. For example,
2191
+ * num_api_calls, num_active_users, etc.
2192
+ */
2193
+ name: string;
2194
+ /**
2195
+ * Rev Org ID or external_ref for which metric is being published.Rev
2196
+ * Org ID is DevRev DON ID. For example,
2197
+ * don:identity:dvrv-us-1:devo/0:revo/156. External_ref is the
2198
+ * identification of DevRev customer's customers and maintained by
2199
+ * DevRev's customers. Devrev will internally resolve external_ref to
2200
+ * Rev Org ID and use it for further processing. For example,
2201
+ * external_ref=org_customer_1 may resolve to
2202
+ * don:identity:dvrv-us-1:devo/0:revo/155.
2203
+ */
2204
+ org_ref?: string;
2205
+ /** Rev User ID or user ref for which metric is being published. */
2206
+ user_ref?: string;
2207
+ }
2208
+ /** metrics-data-ingest-request */
2209
+ export interface MetricsDataIngestRequest {
2210
+ /**
2211
+ * Metrics data received from Dev orgs.
2212
+ * @minItems 1
2213
+ */
2214
+ metrics: MetricsData[];
2215
+ }
2117
2216
  /** opportunity */
2118
2217
  export type Opportunity = WorkBase;
2119
2218
  /** Forecast category of the opportunity. */
@@ -5314,6 +5413,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5314
5413
  * @secure
5315
5414
  */
5316
5415
  artifactsPrepare: (data: ArtifactsPrepareRequest, params?: RequestParams) => Promise<AxiosResponse<ArtifactsPrepareResponse, any>>;
5416
+ /**
5417
+ * @description Prepares a new version for an artifact, returning the URL and form data to upload the updated file.
5418
+ *
5419
+ * @tags artifacts
5420
+ * @name ArtifactsVersionsPrepare
5421
+ * @request POST:/artifacts.versions.prepare
5422
+ * @secure
5423
+ */
5424
+ artifactsVersionsPrepare: (data: ArtifactsVersionsPrepareRequest, params?: RequestParams) => Promise<AxiosResponse<ArtifactsVersionsPrepareResponse, any>>;
5317
5425
  /**
5318
5426
  * @description Creates a conversation.
5319
5427
  *
@@ -5892,6 +6000,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5892
6000
  * @secure
5893
6001
  */
5894
6002
  metricDefinitionsListPost: (data: MetricDefinitionsListRequest, params?: RequestParams) => Promise<AxiosResponse<MetricDefinitionsListResponse, any>>;
6003
+ /**
6004
+ * @description Ingest endpoint for DevRev metrics data from clients.
6005
+ *
6006
+ * @tags telemetry
6007
+ * @name MetricsDevrevIngest
6008
+ * @request POST:/metrics.devrev.ingest
6009
+ * @secure
6010
+ */
6011
+ metricsDevrevIngest: (data: MetricsDataIngestRequest, params?: RequestParams) => Promise<AxiosResponse<void, any>>;
5895
6012
  /**
5896
6013
  * @description Creates an organization schedule fragment.
5897
6014
  *
@@ -738,6 +738,15 @@ class Api extends HttpClient {
738
738
  * @secure
739
739
  */
740
740
  this.artifactsPrepare = (data, params = {}) => this.request(Object.assign({ path: `/artifacts.prepare`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
741
+ /**
742
+ * @description Prepares a new version for an artifact, returning the URL and form data to upload the updated file.
743
+ *
744
+ * @tags artifacts
745
+ * @name ArtifactsVersionsPrepare
746
+ * @request POST:/artifacts.versions.prepare
747
+ * @secure
748
+ */
749
+ this.artifactsVersionsPrepare = (data, params = {}) => this.request(Object.assign({ path: `/artifacts.versions.prepare`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
741
750
  /**
742
751
  * @description Creates a conversation.
743
752
  *
@@ -1062,6 +1071,15 @@ class Api extends HttpClient {
1062
1071
  * @secure
1063
1072
  */
1064
1073
  this.metricDefinitionsListPost = (data, params = {}) => this.request(Object.assign({ path: `/metric-definitions.list`, method: 'POST', body: data, secure: true, type: ContentType.Json, format: 'json' }, params));
1074
+ /**
1075
+ * @description Ingest endpoint for DevRev metrics data from clients.
1076
+ *
1077
+ * @tags telemetry
1078
+ * @name MetricsDevrevIngest
1079
+ * @request POST:/metrics.devrev.ingest
1080
+ * @secure
1081
+ */
1082
+ this.metricsDevrevIngest = (data, params = {}) => this.request(Object.assign({ path: `/metrics.devrev.ingest`, method: 'POST', body: data, secure: true, type: ContentType.Json }, params));
1065
1083
  /**
1066
1084
  * @description Creates an organization schedule fragment.
1067
1085
  *
@@ -2152,6 +2152,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2152
2152
  * @example "don:core:<partition>:devo/<dev-org-id>:artifact/<artifact-id>"
2153
2153
  */
2154
2154
  id: string;
2155
+ /**
2156
+ * The version of the artifact that needs to be fetched.
2157
+ * @format date-time
2158
+ */
2159
+ timestamp?: string;
2155
2160
  }, params?: RequestParams) => Promise<AxiosResponse<ArtifactsLocateResponse, any>>;
2156
2161
  /**
2157
2162
  * @description Creates an artifact and generates an upload URL for its data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrev/typescript-sdk",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "## SDK Generation",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {