rotacloud 1.0.43 → 1.0.44

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.
@@ -2,7 +2,7 @@ export interface ApiLeaveDate {
2
2
  date: string;
3
3
  year: string;
4
4
  days: number;
5
- hours: number;
5
+ hours: number | null;
6
6
  day_off: boolean;
7
7
  id?: number;
8
8
  }
@@ -16,7 +16,7 @@ export interface ApiLeave {
16
16
  end_date: string;
17
17
  end_am_pm: string;
18
18
  hours: {
19
- [key: string]: number;
19
+ [key: string]: number | null;
20
20
  };
21
21
  hours_method: string;
22
22
  hours_set: boolean;
@@ -4,8 +4,8 @@ export interface SDKErrorConfig {
4
4
  data?: unknown;
5
5
  }
6
6
  export declare class SDKError extends Error {
7
+ name: string;
7
8
  readonly code?: number;
8
9
  readonly data?: unknown;
9
- name: string;
10
10
  constructor(errorConfig: SDKErrorConfig);
11
11
  }
@@ -5,7 +5,7 @@ class SDKError extends Error {
5
5
  constructor(errorConfig) {
6
6
  var _a;
7
7
  super(errorConfig.message);
8
- this.name = this.constructor.name;
8
+ this.name = 'SDKError';
9
9
  (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, SDKError);
10
10
  // optional chaining needed as is v8 specific https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#static_methods
11
11
  this.data = errorConfig.data;
@@ -18,7 +18,7 @@ export declare class Leave {
18
18
  start_am_pm: string;
19
19
  end_am_pm: string;
20
20
  hours: {
21
- [key: string]: number;
21
+ [key: string]: number | null;
22
22
  };
23
23
  hours_method: string;
24
24
  hours_set: boolean;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Version = void 0;
4
- exports.Version = { version: '1.0.43' };
4
+ exports.Version = { version: '1.0.44' };
@@ -2,7 +2,7 @@ export interface ApiLeaveDate {
2
2
  date: string;
3
3
  year: string;
4
4
  days: number;
5
- hours: number;
5
+ hours: number | null;
6
6
  day_off: boolean;
7
7
  id?: number;
8
8
  }
@@ -16,7 +16,7 @@ export interface ApiLeave {
16
16
  end_date: string;
17
17
  end_am_pm: string;
18
18
  hours: {
19
- [key: string]: number;
19
+ [key: string]: number | null;
20
20
  };
21
21
  hours_method: string;
22
22
  hours_set: boolean;
@@ -4,8 +4,8 @@ export interface SDKErrorConfig {
4
4
  data?: unknown;
5
5
  }
6
6
  export declare class SDKError extends Error {
7
+ name: string;
7
8
  readonly code?: number;
8
9
  readonly data?: unknown;
9
- name: string;
10
10
  constructor(errorConfig: SDKErrorConfig);
11
11
  }
@@ -1,7 +1,7 @@
1
1
  export class SDKError extends Error {
2
2
  constructor(errorConfig) {
3
3
  super(errorConfig.message);
4
- this.name = this.constructor.name;
4
+ this.name = 'SDKError';
5
5
  Error.captureStackTrace?.(this, SDKError);
6
6
  // optional chaining needed as is v8 specific https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#static_methods
7
7
  this.data = errorConfig.data;
@@ -18,7 +18,7 @@ export declare class Leave {
18
18
  start_am_pm: string;
19
19
  end_am_pm: string;
20
20
  hours: {
21
- [key: string]: number;
21
+ [key: string]: number | null;
22
22
  };
23
23
  hours_method: string;
24
24
  hours_set: boolean;
@@ -1 +1 @@
1
- export const Version = { version: '1.0.43' };
1
+ export const Version = { version: '1.0.44' };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rotacloud",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "The RotaCloud SDK for the RotaCloud API",
5
5
  "engines": {
6
6
  "node": ">=14.17.0"
@@ -2,7 +2,7 @@ export interface ApiLeaveDate {
2
2
  date: string;
3
3
  year: string;
4
4
  days: number;
5
- hours: number;
5
+ hours: number | null;
6
6
  day_off: boolean;
7
7
  id?: number;
8
8
  }
@@ -16,7 +16,7 @@ export interface ApiLeave {
16
16
  start_am_pm: string;
17
17
  end_date: string;
18
18
  end_am_pm: string;
19
- hours: { [key: string]: number };
19
+ hours: { [key: string]: number | null };
20
20
  hours_method: string;
21
21
  hours_set: boolean;
22
22
  dates: ApiLeaveDate[];
@@ -4,9 +4,9 @@ export interface SDKErrorConfig {
4
4
  data?: unknown;
5
5
  }
6
6
  export class SDKError extends Error {
7
+ override name = 'SDKError';
7
8
  readonly code?: number;
8
9
  readonly data?: unknown;
9
- override name = this.constructor.name;
10
10
 
11
11
  constructor(errorConfig: SDKErrorConfig) {
12
12
  super(errorConfig.message);
@@ -18,7 +18,7 @@ export class Leave {
18
18
  public admin: number;
19
19
  public start_am_pm: string;
20
20
  public end_am_pm: string;
21
- public hours: { [key: string]: number };
21
+ public hours: { [key: string]: number | null };
22
22
  public hours_method: string;
23
23
  public hours_set: boolean;
24
24
  public requested_at: number;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const Version = { version: '1.0.43' };
1
+ export const Version = { version: '1.0.44' };