@honeybadger-io/js 6.6.0 → 6.7.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.
@@ -0,0 +1,3 @@
1
+ import { Types } from '@honeybadger-io/core';
2
+ export default function (_window?: typeof globalThis): Types.Plugin;
3
+ //# sourceMappingURL=events.d.ts.map
@@ -1,5 +1,5 @@
1
- import { CheckinDto, CheckinPayload, CheckinResponsePayload } from './types/types';
2
- export declare class Checkin implements CheckinDto {
1
+ import { CheckInDto, CheckInPayload, CheckInResponsePayload } from './types/types';
2
+ export declare class CheckIn implements CheckInDto {
3
3
  id?: string;
4
4
  projectId: string;
5
5
  name: string;
@@ -10,22 +10,22 @@ export declare class Checkin implements CheckinDto {
10
10
  cronSchedule?: string;
11
11
  cronTimezone?: string;
12
12
  /**
13
- * Only set when the checkin has been deleted
13
+ * Only set when the check-in has been deleted
14
14
  * after an update request.
15
15
  * Note: this property exists only locally.
16
16
  */
17
17
  private deleted;
18
- constructor(props: CheckinDto);
18
+ constructor(props: CheckInDto);
19
19
  isDeleted(): boolean;
20
20
  markAsDeleted(): void;
21
21
  validate(): void;
22
- asRequestPayload(): CheckinPayload;
22
+ asRequestPayload(): CheckInPayload;
23
23
  /**
24
- * Compares two checkins, usually the one from the API and the one from the config file.
25
- * If the one in the config file does not match the checkin from the API,
24
+ * Compares two check-ins, usually the one from the API and the one from the config file.
25
+ * If the one in the config file does not match the check-in from the API,
26
26
  * then we issue an update request.
27
27
  */
28
- isInSync(other: Checkin): boolean;
29
- static fromResponsePayload(projectId: string, payload: CheckinResponsePayload): Checkin;
28
+ isInSync(other: CheckIn): boolean;
29
+ static fromResponsePayload(projectId: string, payload: CheckInResponsePayload): CheckIn;
30
30
  }
31
- //# sourceMappingURL=checkin.d.ts.map
31
+ //# sourceMappingURL=check-in.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { Types } from '@honeybadger-io/core';
2
+ import { CheckIn } from './types/check-in';
3
+ export declare class CheckInsClient {
4
+ private readonly BASE_URL;
5
+ private readonly cache;
6
+ private readonly config;
7
+ private readonly logger;
8
+ private readonly transport;
9
+ constructor(config: {
10
+ personalAuthToken: string;
11
+ logger: Types.Logger;
12
+ }, transport: Types.Transport);
13
+ listForProject(projectId: string): Promise<CheckIn[]>;
14
+ get(projectId: string, checkInId: string): Promise<CheckIn>;
15
+ create(checkIn: CheckIn): Promise<CheckIn>;
16
+ update(checkIn: CheckIn): Promise<CheckIn>;
17
+ remove(checkIn: CheckIn): Promise<void>;
18
+ private getHeaders;
19
+ private getErrorMessage;
20
+ }
21
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { Types } from '@honeybadger-io/core';
2
+ import { CheckInsClient } from './types/client';
3
+ import { CheckInsConfig } from './types/types';
4
+ import { CheckIn } from './types/check-in';
5
+ export declare class CheckInsManager {
6
+ private readonly client;
7
+ config: Required<CheckInsConfig>;
8
+ logger: Types.Logger;
9
+ constructor(config: Partial<CheckInsConfig>, client?: CheckInsClient);
10
+ sync(): Promise<CheckIn[]>;
11
+ private getLocalCheckIns;
12
+ private createOrUpdate;
13
+ private remove;
14
+ }
15
+ //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { Types } from '@honeybadger-io/core';
2
- export declare type CheckinDto = {
2
+ export declare type CheckInDto = {
3
3
  /**
4
4
  * Checkin identifier.
5
5
  */
@@ -42,13 +42,13 @@ export declare type CheckinDto = {
42
42
  */
43
43
  projectId: string;
44
44
  };
45
- export declare type CheckinsConfig = {
45
+ export declare type CheckInsConfig = {
46
46
  debug?: boolean;
47
47
  logger?: Types.Logger;
48
48
  personalAuthToken: string;
49
- checkins: CheckinDto[];
49
+ checkins: CheckInDto[];
50
50
  };
51
- export declare type CheckinPayload = {
51
+ export declare type CheckInPayload = {
52
52
  name: string;
53
53
  slug?: string;
54
54
  schedule_type: 'simple' | 'cron';
@@ -57,10 +57,10 @@ export declare type CheckinPayload = {
57
57
  cron_schedule?: string;
58
58
  cron_timezone?: string;
59
59
  };
60
- export declare type CheckinTransportPayload = {
61
- check_in: CheckinPayload;
60
+ export declare type CheckInTransportPayload = {
61
+ check_in: CheckInPayload;
62
62
  };
63
- export declare type CheckinResponsePayload = {
63
+ export declare type CheckInResponsePayload = {
64
64
  id: string;
65
- } & CheckinPayload;
65
+ } & CheckInPayload;
66
66
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ declare const syncCheckIns: any;
2
+ //# sourceMappingURL=check-ins-sync-exec.d.ts.map