@abyss-project/monitor 5.1.0 → 6.1.0

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.
@@ -11,3 +11,6 @@ export * from './latency-bucket.enum';
11
11
  export * from './application-log-origin.enum';
12
12
  export * from './rehydration-job-state.enum';
13
13
  export * from './rehydration-skip-reason.enum';
14
+ export * from './rehydration-stop-reason.enum';
15
+ export * from './rehydration-failure-reason.enum';
16
+ export * from './rehydration-refusal-reason.enum';
@@ -27,4 +27,7 @@ __exportStar(require("./latency-bucket.enum"), exports);
27
27
  __exportStar(require("./application-log-origin.enum"), exports);
28
28
  __exportStar(require("./rehydration-job-state.enum"), exports);
29
29
  __exportStar(require("./rehydration-skip-reason.enum"), exports);
30
+ __exportStar(require("./rehydration-stop-reason.enum"), exports);
31
+ __exportStar(require("./rehydration-failure-reason.enum"), exports);
32
+ __exportStar(require("./rehydration-refusal-reason.enum"), exports);
30
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAClC,gEAA8C;AAC9C,gEAA8C;AAC9C,mDAAiC;AACjC,sDAAoC;AACpC,mEAAiD;AACjD,mEAAiD;AACjD,2EAAyD;AACzD,wDAAsC;AACtC,gEAA8C;AAC9C,+DAA6C;AAC7C,iEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAClC,gEAA8C;AAC9C,gEAA8C;AAC9C,mDAAiC;AACjC,sDAAoC;AACpC,mEAAiD;AACjD,mEAAiD;AACjD,2EAAyD;AACzD,wDAAsC;AACtC,gEAA8C;AAC9C,+DAA6C;AAC7C,iEAA+C;AAC/C,iEAA+C;AAC/C,oEAAkD;AAClD,oEAAkD"}
@@ -0,0 +1,6 @@
1
+ export declare enum RehydrationFailureReason {
2
+ DAY_NOT_IN_ARCHIVE = "DAY_NOT_IN_ARCHIVE",
3
+ ARCHIVE_UNREADABLE = "ARCHIVE_UNREADABLE",
4
+ STORAGE_UNAVAILABLE = "STORAGE_UNAVAILABLE",
5
+ INTERNAL_ERROR = "INTERNAL_ERROR"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RehydrationFailureReason = void 0;
4
+ var RehydrationFailureReason;
5
+ (function (RehydrationFailureReason) {
6
+ RehydrationFailureReason["DAY_NOT_IN_ARCHIVE"] = "DAY_NOT_IN_ARCHIVE";
7
+ RehydrationFailureReason["ARCHIVE_UNREADABLE"] = "ARCHIVE_UNREADABLE";
8
+ RehydrationFailureReason["STORAGE_UNAVAILABLE"] = "STORAGE_UNAVAILABLE";
9
+ RehydrationFailureReason["INTERNAL_ERROR"] = "INTERNAL_ERROR";
10
+ })(RehydrationFailureReason || (exports.RehydrationFailureReason = RehydrationFailureReason = {}));
11
+ //# sourceMappingURL=rehydration-failure-reason.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rehydration-failure-reason.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-failure-reason.enum.ts"],"names":[],"mappings":";;;AAMA,IAAY,wBAgBX;AAhBD,WAAY,wBAAwB;IAGlC,qEAAyC,CAAA;IAIzC,qEAAyC,CAAA;IAIzC,uEAA2C,CAAA;IAI3C,6DAAiC,CAAA;AACnC,CAAC,EAhBW,wBAAwB,wCAAxB,wBAAwB,QAgBnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"rehydration-job-state.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-job-state.enum.ts"],"names":[],"mappings":";;;AAOA,IAAY,mBAuBX;AAvBD,WAAY,mBAAmB;IAG7B,wCAAiB,CAAA;IAIjB,0CAAmB,CAAA;IAInB,wCAAiB,CAAA;IAIjB,0CAAmB,CAAA;IAGnB,4CAAqB,CAAA;IAIrB,wCAAiB,CAAA;AACnB,CAAC,EAvBW,mBAAmB,mCAAnB,mBAAmB,QAuB9B"}
1
+ {"version":3,"file":"rehydration-job-state.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-job-state.enum.ts"],"names":[],"mappings":";;;AAOA,IAAY,mBA2BX;AA3BD,WAAY,mBAAmB;IAK7B,wCAAiB,CAAA;IAKjB,0CAAmB,CAAA;IAKnB,wCAAiB,CAAA;IAIjB,0CAAmB,CAAA;IAGnB,4CAAqB,CAAA;IAIrB,wCAAiB,CAAA;AACnB,CAAC,EA3BW,mBAAmB,mCAAnB,mBAAmB,QA2B9B"}
@@ -0,0 +1,16 @@
1
+ export declare enum RehydrationRefusalReason {
2
+ NOT_IN_PLAN = "NOT_IN_PLAN",
3
+ NO_REHYDRATABLE_DAY = "NO_REHYDRATABLE_DAY",
4
+ RANGE_INVALID = "RANGE_INVALID",
5
+ RANGE_TOO_LONG = "RANGE_TOO_LONG",
6
+ NO_ORGANIZATION = "NO_ORGANIZATION",
7
+ JOB_NOT_FOUND = "JOB_NOT_FOUND",
8
+ NOT_STARTED = "NOT_STARTED",
9
+ EXTENSIONS_EXHAUSTED = "EXTENSIONS_EXHAUSTED",
10
+ EXPIRY_NOT_LATER = "EXPIRY_NOT_LATER",
11
+ PAST_PLAN_LIMIT = "PAST_PLAN_LIMIT",
12
+ PAST_HARD_LIMIT = "PAST_HARD_LIMIT",
13
+ LEASE_ENDED = "LEASE_ENDED",
14
+ NOT_RELEASABLE = "NOT_RELEASABLE",
15
+ PLAN_UNREADABLE = "PLAN_UNREADABLE"
16
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RehydrationRefusalReason = void 0;
4
+ var RehydrationRefusalReason;
5
+ (function (RehydrationRefusalReason) {
6
+ RehydrationRefusalReason["NOT_IN_PLAN"] = "NOT_IN_PLAN";
7
+ RehydrationRefusalReason["NO_REHYDRATABLE_DAY"] = "NO_REHYDRATABLE_DAY";
8
+ RehydrationRefusalReason["RANGE_INVALID"] = "RANGE_INVALID";
9
+ RehydrationRefusalReason["RANGE_TOO_LONG"] = "RANGE_TOO_LONG";
10
+ RehydrationRefusalReason["NO_ORGANIZATION"] = "NO_ORGANIZATION";
11
+ RehydrationRefusalReason["JOB_NOT_FOUND"] = "JOB_NOT_FOUND";
12
+ RehydrationRefusalReason["NOT_STARTED"] = "NOT_STARTED";
13
+ RehydrationRefusalReason["EXTENSIONS_EXHAUSTED"] = "EXTENSIONS_EXHAUSTED";
14
+ RehydrationRefusalReason["EXPIRY_NOT_LATER"] = "EXPIRY_NOT_LATER";
15
+ RehydrationRefusalReason["PAST_PLAN_LIMIT"] = "PAST_PLAN_LIMIT";
16
+ RehydrationRefusalReason["PAST_HARD_LIMIT"] = "PAST_HARD_LIMIT";
17
+ RehydrationRefusalReason["LEASE_ENDED"] = "LEASE_ENDED";
18
+ RehydrationRefusalReason["NOT_RELEASABLE"] = "NOT_RELEASABLE";
19
+ RehydrationRefusalReason["PLAN_UNREADABLE"] = "PLAN_UNREADABLE";
20
+ })(RehydrationRefusalReason || (exports.RehydrationRefusalReason = RehydrationRefusalReason = {}));
21
+ //# sourceMappingURL=rehydration-refusal-reason.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rehydration-refusal-reason.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-refusal-reason.enum.ts"],"names":[],"mappings":";;;AAOA,IAAY,wBAgDX;AAhDD,WAAY,wBAAwB;IAElC,uDAA2B,CAAA;IAI3B,uEAA2C,CAAA;IAG3C,2DAA+B,CAAA;IAG/B,6DAAiC,CAAA;IAIjC,+DAAmC,CAAA;IAGnC,2DAA+B,CAAA;IAI/B,uDAA2B,CAAA;IAG3B,yEAA6C,CAAA;IAG7C,iEAAqC,CAAA;IAIrC,+DAAmC,CAAA;IAInC,+DAAmC,CAAA;IAGnC,uDAA2B,CAAA;IAG3B,6DAAiC,CAAA;IAIjC,+DAAmC,CAAA;AACrC,CAAC,EAhDW,wBAAwB,wCAAxB,wBAAwB,QAgDnC"}
@@ -1,4 +1,5 @@
1
1
  export declare enum RehydrationSkipReason {
2
2
  NOT_IN_ARCHIVE = "NOT_IN_ARCHIVE",
3
- NOT_EVICTED = "NOT_EVICTED"
3
+ STILL_IN_RETENTION = "STILL_IN_RETENTION",
4
+ ALREADY_REHYDRATED = "ALREADY_REHYDRATED"
4
5
  }
@@ -4,6 +4,7 @@ exports.RehydrationSkipReason = void 0;
4
4
  var RehydrationSkipReason;
5
5
  (function (RehydrationSkipReason) {
6
6
  RehydrationSkipReason["NOT_IN_ARCHIVE"] = "NOT_IN_ARCHIVE";
7
- RehydrationSkipReason["NOT_EVICTED"] = "NOT_EVICTED";
7
+ RehydrationSkipReason["STILL_IN_RETENTION"] = "STILL_IN_RETENTION";
8
+ RehydrationSkipReason["ALREADY_REHYDRATED"] = "ALREADY_REHYDRATED";
8
9
  })(RehydrationSkipReason || (exports.RehydrationSkipReason = RehydrationSkipReason = {}));
9
10
  //# sourceMappingURL=rehydration-skip-reason.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rehydration-skip-reason.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-skip-reason.enum.ts"],"names":[],"mappings":";;;AAQA,IAAY,qBASX;AATD,WAAY,qBAAqB;IAG/B,0DAAiC,CAAA;IAKjC,oDAA2B,CAAA;AAC7B,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC"}
1
+ {"version":3,"file":"rehydration-skip-reason.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-skip-reason.enum.ts"],"names":[],"mappings":";;;AAQA,IAAY,qBAeX;AAfD,WAAY,qBAAqB;IAG/B,0DAAiC,CAAA;IAKjC,kEAAyC,CAAA;IAMzC,kEAAyC,CAAA;AAC3C,CAAC,EAfW,qBAAqB,qCAArB,qBAAqB,QAehC"}
@@ -0,0 +1,3 @@
1
+ export declare enum RehydrationStopReason {
2
+ ORGANIZATION_QUOTA_REACHED = "ORGANIZATION_QUOTA_REACHED"
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RehydrationStopReason = void 0;
4
+ var RehydrationStopReason;
5
+ (function (RehydrationStopReason) {
6
+ RehydrationStopReason["ORGANIZATION_QUOTA_REACHED"] = "ORGANIZATION_QUOTA_REACHED";
7
+ })(RehydrationStopReason || (exports.RehydrationStopReason = RehydrationStopReason = {}));
8
+ //# sourceMappingURL=rehydration-stop-reason.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rehydration-stop-reason.enum.js","sourceRoot":"","sources":["../../../src/types/enum/rehydration-stop-reason.enum.ts"],"names":[],"mappings":";;;AAQA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAI/B,kFAAyD,CAAA;AAC3D,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC"}
@@ -1,5 +1,5 @@
1
1
  import { CursorQuery } from '..';
2
- import { APIMethod, LogLevel } from '../../../enum';
2
+ import { APIMethod, ApplicationLogOrigin, LogLevel } from '../../../enum';
3
3
  export interface IGetApplicationLogParams {
4
4
  applicationId: string;
5
5
  applicationLogId: string;
@@ -19,6 +19,7 @@ export type IPaginateApplicationLogQuery = CursorQuery & {
19
19
  dateValueAfter?: Date;
20
20
  orderByDateAsc?: boolean;
21
21
  shouldGetOnlyLogEndpoint?: boolean;
22
+ origin?: ApplicationLogOrigin;
22
23
  };
23
24
  export interface ICreateApplicationLogParams {
24
25
  applicationId: string;
@@ -102,7 +102,7 @@ export interface ICreateRehydrationApplicationBody {
102
102
  tableName: string;
103
103
  rangeStart: string;
104
104
  rangeEnd: string;
105
- expiresAt?: string;
105
+ leaseDays?: number;
106
106
  }
107
107
  export interface IListRehydrationApplicationParams {
108
108
  applicationId: string;
@@ -199,6 +199,6 @@ export interface IEstimateRehydrationApplicationData {
199
199
  archiveBytes: number;
200
200
  expectedRows: number;
201
201
  skippedDays: IRehydrationSkippedDay[];
202
- maxExpiresAt: Date;
202
+ maxLeaseDays: number;
203
203
  }
204
204
  export type IEstimateRehydrationApplicationResponse = IResponse<IEstimateRehydrationApplicationData>;
@@ -1,4 +1,4 @@
1
- import { RehydrationJobState, RehydrationSkipReason } from '../../enum';
1
+ import { RehydrationFailureReason, RehydrationJobState, RehydrationRefusalReason, RehydrationSkipReason, RehydrationStopReason } from '../../enum';
2
2
  export interface IRehydrationJob {
3
3
  id: string;
4
4
  applicationId: string;
@@ -7,10 +7,12 @@ export interface IRehydrationJob {
7
7
  rangeEnd: Date;
8
8
  state: RehydrationJobState;
9
9
  queuePosition: number | null;
10
- expiresAt: Date;
11
- hardExpiresAt: Date;
12
- effectiveExpiresAt: Date;
13
- maxExpiresAt: Date;
10
+ startedAt: Date | null;
11
+ leaseDays: number;
12
+ expiresAt: Date | null;
13
+ hardExpiresAt: Date | null;
14
+ effectiveExpiresAt: Date | null;
15
+ maxExpiresAt: Date | null;
14
16
  extensions: number;
15
17
  maxExtensions: number;
16
18
  segmentsDone: number;
@@ -19,6 +21,8 @@ export interface IRehydrationJob {
19
21
  bytesScanned: number;
20
22
  rowsWritten: number;
21
23
  activeBytes: number;
24
+ stopReason: RehydrationStopReason | null;
25
+ failureReason: RehydrationFailureReason | null;
22
26
  failureDetail: string | null;
23
27
  createdAt: Date;
24
28
  }
@@ -26,3 +30,7 @@ export interface IRehydrationSkippedDay {
26
30
  dayValue: string;
27
31
  reason: RehydrationSkipReason;
28
32
  }
33
+ export interface IRehydrationRefusalParams {
34
+ reason: RehydrationRefusalReason;
35
+ skippedDays?: IRehydrationSkippedDay[];
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/monitor",
3
- "version": "5.1.0",
3
+ "version": "6.1.0",
4
4
  "description": "Core package to interact with Abyss-Monitor",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",