@promster/types 3.2.4 → 3.2.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.
@@ -1,11 +1,11 @@
1
1
  import type { DeepRequired } from 'ts-essentials';
2
- import { Gauge, Counter, Summary, Histogram } from 'prom-client';
3
- export declare type TLabelValues = Record<string, string | number>;
4
- declare type TContext<Q, S> = {
2
+ import type { Gauge, Counter, Summary, Histogram } from 'prom-client';
3
+ export type TLabelValues = Record<string, string | number>;
4
+ type TContext<Q, S> = {
5
5
  req: Q;
6
6
  res: S;
7
7
  };
8
- export declare type TPromsterOptions = {
8
+ export type TPromsterOptions = {
9
9
  labels?: string[];
10
10
  metricPrefix?: string;
11
11
  metricTypes?: string[];
@@ -20,26 +20,26 @@ export declare type TPromsterOptions = {
20
20
  skip?: <Q, S>(request: Q, response: S, labels: TLabelValues) => boolean;
21
21
  disableGcMetrics?: boolean;
22
22
  };
23
- export declare type TDefaultedPromsterOptions = DeepRequired<TPromsterOptions>;
24
- export declare type THttpMetrics = {
25
- httpRequestDurationPerPercentileInSeconds?: Array<Summary<string>>;
26
- httpRequestDurationInSeconds?: Array<Histogram<string>>;
27
- httpRequestsTotal?: Array<Counter<string>>;
28
- httpRequestContentLengthInBytes?: Array<Histogram<string>>;
29
- httpResponseContentLengthInBytes?: Array<Histogram<string>>;
23
+ export type TDefaultedPromsterOptions = DeepRequired<TPromsterOptions>;
24
+ export type THttpMetrics = {
25
+ httpRequestDurationPerPercentileInSeconds?: Summary[];
26
+ httpRequestDurationInSeconds?: Histogram[];
27
+ httpRequestsTotal?: Counter[];
28
+ httpRequestContentLengthInBytes?: Histogram[];
29
+ httpResponseContentLengthInBytes?: Histogram[];
30
30
  };
31
- export declare type TGcMetrics = {
32
- up: Array<Gauge<string>>;
33
- countOfGcs: Array<Counter<string>>;
34
- durationOfGc: Array<Counter<string>>;
35
- reclaimedInGc: Array<Counter<string>>;
31
+ export type TGcMetrics = {
32
+ up: Gauge[];
33
+ countOfGcs: Counter[];
34
+ durationOfGc: Counter[];
35
+ reclaimedInGc: Counter[];
36
36
  };
37
- export declare type TGraphQlMetrics = {
38
- graphQlParseDuration?: Array<Histogram<string>>;
39
- graphQlValidationDuration?: Array<Histogram<string>>;
40
- graphQlResolveFieldDuration?: Array<Histogram<string>>;
41
- graphQlRequestDuration?: Array<Histogram<string>>;
42
- graphQlErrorsTotal?: Array<Counter<string>>;
37
+ export type TGraphQlMetrics = {
38
+ graphQlParseDuration?: Histogram[];
39
+ graphQlValidationDuration?: Histogram[];
40
+ graphQlResolveFieldDuration?: Histogram[];
41
+ graphQlRequestDuration?: Histogram[];
42
+ graphQlErrorsTotal?: Counter[];
43
43
  };
44
- export declare type TValueOf<T> = T[keyof T];
44
+ export type TValueOf<T> = T[keyof T];
45
45
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promster/types",
3
- "version": "3.2.4",
3
+ "version": "3.2.5",
4
4
  "description": "Shared types of promster",
5
5
  "main": "dist/promster-types.cjs.js",
6
6
  "typings": "dist/promster-types.cjs.d.ts",
@@ -35,7 +35,7 @@
35
35
  "prometheus"
36
36
  ],
37
37
  "devDependencies": {
38
- "prom-client": "14.0.1"
38
+ "prom-client": "14.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "prom-client": "13.x.x || 14.x"