rotacloud 1.0.20 → 1.0.23

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.
Files changed (36) hide show
  1. package/.github/workflows/{node.js.yml → publish.yml} +18 -8
  2. package/dist/cjs/interfaces/location.interface.d.ts +4 -4
  3. package/dist/cjs/interfaces/query-params/index.d.ts +24 -0
  4. package/dist/cjs/interfaces/query-params/index.js +36 -0
  5. package/dist/cjs/interfaces/shift.interface.d.ts +1 -1
  6. package/dist/cjs/models/location.model.d.ts +8 -1
  7. package/dist/cjs/models/location.model.js +11 -4
  8. package/dist/cjs/models/role.model.d.ts +3 -0
  9. package/dist/cjs/models/role.model.js +4 -0
  10. package/dist/cjs/models/shift.model.d.ts +4 -1
  11. package/dist/cjs/models/shift.model.js +5 -2
  12. package/dist/cjs/rotacloud.d.ts +2 -0
  13. package/dist/cjs/rotacloud.js +12 -0
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/mjs/interfaces/location.interface.d.ts +4 -4
  16. package/dist/mjs/interfaces/query-params/index.d.ts +24 -0
  17. package/dist/mjs/interfaces/query-params/index.js +24 -0
  18. package/dist/mjs/interfaces/shift.interface.d.ts +1 -1
  19. package/dist/mjs/models/location.model.d.ts +8 -1
  20. package/dist/mjs/models/location.model.js +11 -4
  21. package/dist/mjs/models/role.model.d.ts +3 -0
  22. package/dist/mjs/models/role.model.js +4 -0
  23. package/dist/mjs/models/shift.model.d.ts +4 -1
  24. package/dist/mjs/models/shift.model.js +5 -2
  25. package/dist/mjs/rotacloud.d.ts +2 -0
  26. package/dist/mjs/rotacloud.js +2 -0
  27. package/dist/mjs/version.js +1 -1
  28. package/package.json +5 -4
  29. package/src/interfaces/location.interface.ts +4 -4
  30. package/src/interfaces/query-params/index.ts +24 -0
  31. package/src/interfaces/shift.interface.ts +1 -1
  32. package/src/models/location.model.ts +18 -4
  33. package/src/models/role.model.ts +7 -0
  34. package/src/models/shift.model.ts +9 -3
  35. package/src/rotacloud.ts +3 -0
  36. package/src/version.ts +1 -1
@@ -1,14 +1,14 @@
1
1
  # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
2
  # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
3
 
4
- name: Node.js CI
4
+ name: Publish
5
5
 
6
6
  on:
7
7
  push:
8
- branches: [develop]
8
+ branches: [main]
9
9
 
10
10
  jobs:
11
- build:
11
+ publish:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  strategy:
@@ -17,16 +17,26 @@ jobs:
17
17
  # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18
18
 
19
19
  steps:
20
- - uses: actions/checkout@v3
20
+ - name: Checkout
21
+ uses: actions/checkout@v3
21
22
  - name: Use Node.js ${{ matrix.node-version }}
22
23
  uses: actions/setup-node@v3
23
24
  with:
24
25
  node-version: ${{ matrix.node-version }}
25
26
  cache: 'npm'
26
27
  registry-url: https://registry.npmjs.org/
27
- - run: npm ci
28
- - run: npm run lint
29
- - run: npm run build --if-present
30
- - run: npm publish
28
+ - name: Add version number to package
29
+ run: |
30
+ version="$(npm show . version)"
31
+ echo "Version is $version"
32
+ echo "export const Version = { version: '$version' };" > ./src/version.ts
33
+ - name: Run CI
34
+ run: npm ci
35
+ - name: Lint
36
+ run: npm run lint
37
+ - name: Build
38
+ run: npm run build --if-present
39
+ - name: Publish
40
+ run: npm publish
31
41
  env:
32
42
  NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}}
@@ -6,8 +6,8 @@ export interface ApiLocation {
6
6
  address: string;
7
7
  location: ApiLocationCoordinate;
8
8
  timezone: number;
9
- users: [];
10
- managers: [];
11
- metadata: null;
12
- clock_in_ips: null;
9
+ users: number[];
10
+ managers: number[];
11
+ metadata: object;
12
+ clock_in_ips: string[];
13
13
  }
@@ -0,0 +1,24 @@
1
+ export * from './attendance-query-params.interface.js';
2
+ export * from './availability-patterns-query-params.interface.js';
3
+ export * from './availability-query-params.interface.js';
4
+ export * from './common-shift-times-query-params.interface.js';
5
+ export * from './daily-budgets-query-params.interface.js';
6
+ export * from './daily-revenue-query-params.interface.js';
7
+ export * from './day-notes-query-params.interface.js';
8
+ export * from './days-off-patterns-query-params.interface.js';
9
+ export * from './days-off-query-params.interface.js';
10
+ export * from './documents-query-params.interface.js';
11
+ export * from './groups-query-params.interface.js';
12
+ export * from './internal-query-params.interface.js';
13
+ export * from './leave-embargoes-query-params.interface.js';
14
+ export * from './leave-query-params.interface.js';
15
+ export * from './leave-requests-query-params.interface.js';
16
+ export * from './locations-query-params.interface.js';
17
+ export * from './logbook-events-query-params.interface.js';
18
+ export * from './pay-periods-query-params.interface.js';
19
+ export * from './roles-query-params.interface.js';
20
+ export * from './shifts-query-params.interface.js';
21
+ export * from './swap-requests-query-params.interface.js';
22
+ export * from './terminals-query-params.interface.js';
23
+ export * from './unavailability-requests-query-params.interface.js';
24
+ export * from './users-query-params.interface.js';
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./attendance-query-params.interface.js"), exports);
14
+ __exportStar(require("./availability-patterns-query-params.interface.js"), exports);
15
+ __exportStar(require("./availability-query-params.interface.js"), exports);
16
+ __exportStar(require("./common-shift-times-query-params.interface.js"), exports);
17
+ __exportStar(require("./daily-budgets-query-params.interface.js"), exports);
18
+ __exportStar(require("./daily-revenue-query-params.interface.js"), exports);
19
+ __exportStar(require("./day-notes-query-params.interface.js"), exports);
20
+ __exportStar(require("./days-off-patterns-query-params.interface.js"), exports);
21
+ __exportStar(require("./days-off-query-params.interface.js"), exports);
22
+ __exportStar(require("./documents-query-params.interface.js"), exports);
23
+ __exportStar(require("./groups-query-params.interface.js"), exports);
24
+ __exportStar(require("./internal-query-params.interface.js"), exports);
25
+ __exportStar(require("./leave-embargoes-query-params.interface.js"), exports);
26
+ __exportStar(require("./leave-query-params.interface.js"), exports);
27
+ __exportStar(require("./leave-requests-query-params.interface.js"), exports);
28
+ __exportStar(require("./locations-query-params.interface.js"), exports);
29
+ __exportStar(require("./logbook-events-query-params.interface.js"), exports);
30
+ __exportStar(require("./pay-periods-query-params.interface.js"), exports);
31
+ __exportStar(require("./roles-query-params.interface.js"), exports);
32
+ __exportStar(require("./shifts-query-params.interface.js"), exports);
33
+ __exportStar(require("./swap-requests-query-params.interface.js"), exports);
34
+ __exportStar(require("./terminals-query-params.interface.js"), exports);
35
+ __exportStar(require("./unavailability-requests-query-params.interface.js"), exports);
36
+ __exportStar(require("./users-query-params.interface.js"), exports);
@@ -12,8 +12,8 @@ export interface ApiShift {
12
12
  location: number;
13
13
  role: number | null;
14
14
  notes: string | null;
15
- created_by: number;
16
15
  created_at: number;
16
+ created_by: number;
17
17
  updated_at: number | null;
18
18
  updated_by: number | null;
19
19
  claimed: boolean;
@@ -7,6 +7,13 @@ export declare class LatLngObject {
7
7
  export declare class Location {
8
8
  id: number;
9
9
  name: string;
10
+ deleted: boolean;
11
+ address: string;
12
+ location: LatLngObject;
13
+ timezone: number;
10
14
  users: number[];
11
- constructor(locaiton: ApiLocation);
15
+ managers: number[];
16
+ metadata: object;
17
+ clock_in_ips: string[];
18
+ constructor(location: ApiLocation);
12
19
  }
@@ -5,10 +5,17 @@ class LatLngObject {
5
5
  }
6
6
  exports.LatLngObject = LatLngObject;
7
7
  class Location {
8
- constructor(locaiton) {
9
- this.id = locaiton.id;
10
- this.name = locaiton.name;
11
- this.users = locaiton.users;
8
+ constructor(location) {
9
+ this.id = location.id;
10
+ this.name = location.name;
11
+ this.deleted = location.deleted;
12
+ this.address = location.address;
13
+ this.location = location.location;
14
+ this.timezone = location.timezone;
15
+ this.users = location.users;
16
+ this.managers = location.managers;
17
+ this.metadata = location.metadata;
18
+ this.clock_in_ips = location.clock_in_ips;
12
19
  }
13
20
  }
14
21
  exports.Location = Location;
@@ -1,8 +1,11 @@
1
1
  import { ApiRole } from '../interfaces/index.js';
2
2
  export declare class Role {
3
3
  id: number;
4
+ deleted: boolean;
4
5
  name: string;
5
6
  colour: string;
7
+ default_break: number;
6
8
  users: number[];
9
+ pay_code: string;
7
10
  constructor(role: ApiRole);
8
11
  }
@@ -4,8 +4,12 @@ exports.Role = void 0;
4
4
  class Role {
5
5
  constructor(role) {
6
6
  this.id = role.id;
7
+ this.deleted = role.deleted;
7
8
  this.name = role.name;
9
+ this.colour = role.colour;
10
+ this.default_break = role.default_break;
8
11
  this.users = role.users;
12
+ this.pay_code = role.pay_code;
9
13
  }
10
14
  }
11
15
  exports.Role = Role;
@@ -2,6 +2,8 @@ import { ApiShift } from '../interfaces/index.js';
2
2
  export declare class Shift {
3
3
  id: number;
4
4
  deleted: boolean;
5
+ deleted_at: number | null;
6
+ deleted_by: number | null;
5
7
  published: boolean;
6
8
  open: boolean;
7
9
  start_time: number;
@@ -11,9 +13,10 @@ export declare class Shift {
11
13
  location: number;
12
14
  role: number | null;
13
15
  notes: string | null;
14
- created_by: number;
15
16
  created_at: number;
17
+ created_by: number;
16
18
  updated_at: number | null;
19
+ updated_by: number | null;
17
20
  claimed: boolean;
18
21
  claimed_at: number | null;
19
22
  acknowledged: boolean;
@@ -5,8 +5,10 @@ class Shift {
5
5
  constructor(shift) {
6
6
  this.id = shift.id;
7
7
  this.deleted = shift.deleted;
8
- this.open = shift.open;
8
+ this.deleted_at = shift.deleted_at;
9
+ this.deleted_by = shift.deleted_by;
9
10
  this.published = shift.published;
11
+ this.open = shift.open;
10
12
  this.start_time = shift.start_time;
11
13
  this.end_time = shift.end_time;
12
14
  this.minutes_break = shift.minutes_break;
@@ -14,9 +16,10 @@ class Shift {
14
16
  this.location = shift.location;
15
17
  this.role = shift.role;
16
18
  this.notes = shift.notes;
17
- this.created_by = shift.created_by;
18
19
  this.created_at = shift.created_at;
20
+ this.created_by = shift.created_by;
19
21
  this.updated_at = shift.updated_at;
22
+ this.updated_by = shift.updated_by;
20
23
  this.claimed = shift.claimed;
21
24
  this.claimed_at = shift.claimed_at;
22
25
  this.acknowledged = shift.acknowledged;
@@ -19,3 +19,5 @@ export declare class RotaCloud {
19
19
  get config(): SDKConfig;
20
20
  set config(configVal: SDKConfig);
21
21
  }
22
+ export * from './interfaces/index.js';
23
+ export * from './interfaces/query-params/index.js';
@@ -1,4 +1,14 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
2
12
  Object.defineProperty(exports, "__esModule", { value: true });
3
13
  exports.RotaCloud = void 0;
4
14
  const index_js_1 = require("./services/index.js");
@@ -30,3 +40,5 @@ class RotaCloud {
30
40
  }
31
41
  }
32
42
  exports.RotaCloud = RotaCloud;
43
+ __exportStar(require("./interfaces/index.js"), exports);
44
+ __exportStar(require("./interfaces/query-params/index.js"), exports);
@@ -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.20' };
4
+ exports.Version = { version: '1.0.22' };
@@ -6,8 +6,8 @@ export interface ApiLocation {
6
6
  address: string;
7
7
  location: ApiLocationCoordinate;
8
8
  timezone: number;
9
- users: [];
10
- managers: [];
11
- metadata: null;
12
- clock_in_ips: null;
9
+ users: number[];
10
+ managers: number[];
11
+ metadata: object;
12
+ clock_in_ips: string[];
13
13
  }
@@ -0,0 +1,24 @@
1
+ export * from './attendance-query-params.interface.js';
2
+ export * from './availability-patterns-query-params.interface.js';
3
+ export * from './availability-query-params.interface.js';
4
+ export * from './common-shift-times-query-params.interface.js';
5
+ export * from './daily-budgets-query-params.interface.js';
6
+ export * from './daily-revenue-query-params.interface.js';
7
+ export * from './day-notes-query-params.interface.js';
8
+ export * from './days-off-patterns-query-params.interface.js';
9
+ export * from './days-off-query-params.interface.js';
10
+ export * from './documents-query-params.interface.js';
11
+ export * from './groups-query-params.interface.js';
12
+ export * from './internal-query-params.interface.js';
13
+ export * from './leave-embargoes-query-params.interface.js';
14
+ export * from './leave-query-params.interface.js';
15
+ export * from './leave-requests-query-params.interface.js';
16
+ export * from './locations-query-params.interface.js';
17
+ export * from './logbook-events-query-params.interface.js';
18
+ export * from './pay-periods-query-params.interface.js';
19
+ export * from './roles-query-params.interface.js';
20
+ export * from './shifts-query-params.interface.js';
21
+ export * from './swap-requests-query-params.interface.js';
22
+ export * from './terminals-query-params.interface.js';
23
+ export * from './unavailability-requests-query-params.interface.js';
24
+ export * from './users-query-params.interface.js';
@@ -0,0 +1,24 @@
1
+ export * from './attendance-query-params.interface.js';
2
+ export * from './availability-patterns-query-params.interface.js';
3
+ export * from './availability-query-params.interface.js';
4
+ export * from './common-shift-times-query-params.interface.js';
5
+ export * from './daily-budgets-query-params.interface.js';
6
+ export * from './daily-revenue-query-params.interface.js';
7
+ export * from './day-notes-query-params.interface.js';
8
+ export * from './days-off-patterns-query-params.interface.js';
9
+ export * from './days-off-query-params.interface.js';
10
+ export * from './documents-query-params.interface.js';
11
+ export * from './groups-query-params.interface.js';
12
+ export * from './internal-query-params.interface.js';
13
+ export * from './leave-embargoes-query-params.interface.js';
14
+ export * from './leave-query-params.interface.js';
15
+ export * from './leave-requests-query-params.interface.js';
16
+ export * from './locations-query-params.interface.js';
17
+ export * from './logbook-events-query-params.interface.js';
18
+ export * from './pay-periods-query-params.interface.js';
19
+ export * from './roles-query-params.interface.js';
20
+ export * from './shifts-query-params.interface.js';
21
+ export * from './swap-requests-query-params.interface.js';
22
+ export * from './terminals-query-params.interface.js';
23
+ export * from './unavailability-requests-query-params.interface.js';
24
+ export * from './users-query-params.interface.js';
@@ -12,8 +12,8 @@ export interface ApiShift {
12
12
  location: number;
13
13
  role: number | null;
14
14
  notes: string | null;
15
- created_by: number;
16
15
  created_at: number;
16
+ created_by: number;
17
17
  updated_at: number | null;
18
18
  updated_by: number | null;
19
19
  claimed: boolean;
@@ -7,6 +7,13 @@ export declare class LatLngObject {
7
7
  export declare class Location {
8
8
  id: number;
9
9
  name: string;
10
+ deleted: boolean;
11
+ address: string;
12
+ location: LatLngObject;
13
+ timezone: number;
10
14
  users: number[];
11
- constructor(locaiton: ApiLocation);
15
+ managers: number[];
16
+ metadata: object;
17
+ clock_in_ips: string[];
18
+ constructor(location: ApiLocation);
12
19
  }
@@ -1,9 +1,16 @@
1
1
  export class LatLngObject {
2
2
  }
3
3
  export class Location {
4
- constructor(locaiton) {
5
- this.id = locaiton.id;
6
- this.name = locaiton.name;
7
- this.users = locaiton.users;
4
+ constructor(location) {
5
+ this.id = location.id;
6
+ this.name = location.name;
7
+ this.deleted = location.deleted;
8
+ this.address = location.address;
9
+ this.location = location.location;
10
+ this.timezone = location.timezone;
11
+ this.users = location.users;
12
+ this.managers = location.managers;
13
+ this.metadata = location.metadata;
14
+ this.clock_in_ips = location.clock_in_ips;
8
15
  }
9
16
  }
@@ -1,8 +1,11 @@
1
1
  import { ApiRole } from '../interfaces/index.js';
2
2
  export declare class Role {
3
3
  id: number;
4
+ deleted: boolean;
4
5
  name: string;
5
6
  colour: string;
7
+ default_break: number;
6
8
  users: number[];
9
+ pay_code: string;
7
10
  constructor(role: ApiRole);
8
11
  }
@@ -1,7 +1,11 @@
1
1
  export class Role {
2
2
  constructor(role) {
3
3
  this.id = role.id;
4
+ this.deleted = role.deleted;
4
5
  this.name = role.name;
6
+ this.colour = role.colour;
7
+ this.default_break = role.default_break;
5
8
  this.users = role.users;
9
+ this.pay_code = role.pay_code;
6
10
  }
7
11
  }
@@ -2,6 +2,8 @@ import { ApiShift } from '../interfaces/index.js';
2
2
  export declare class Shift {
3
3
  id: number;
4
4
  deleted: boolean;
5
+ deleted_at: number | null;
6
+ deleted_by: number | null;
5
7
  published: boolean;
6
8
  open: boolean;
7
9
  start_time: number;
@@ -11,9 +13,10 @@ export declare class Shift {
11
13
  location: number;
12
14
  role: number | null;
13
15
  notes: string | null;
14
- created_by: number;
15
16
  created_at: number;
17
+ created_by: number;
16
18
  updated_at: number | null;
19
+ updated_by: number | null;
17
20
  claimed: boolean;
18
21
  claimed_at: number | null;
19
22
  acknowledged: boolean;
@@ -2,8 +2,10 @@ export class Shift {
2
2
  constructor(shift) {
3
3
  this.id = shift.id;
4
4
  this.deleted = shift.deleted;
5
- this.open = shift.open;
5
+ this.deleted_at = shift.deleted_at;
6
+ this.deleted_by = shift.deleted_by;
6
7
  this.published = shift.published;
8
+ this.open = shift.open;
7
9
  this.start_time = shift.start_time;
8
10
  this.end_time = shift.end_time;
9
11
  this.minutes_break = shift.minutes_break;
@@ -11,9 +13,10 @@ export class Shift {
11
13
  this.location = shift.location;
12
14
  this.role = shift.role;
13
15
  this.notes = shift.notes;
14
- this.created_by = shift.created_by;
15
16
  this.created_at = shift.created_at;
17
+ this.created_by = shift.created_by;
16
18
  this.updated_at = shift.updated_at;
19
+ this.updated_by = shift.updated_by;
17
20
  this.claimed = shift.claimed;
18
21
  this.claimed_at = shift.claimed_at;
19
22
  this.acknowledged = shift.acknowledged;
@@ -19,3 +19,5 @@ export declare class RotaCloud {
19
19
  get config(): SDKConfig;
20
20
  set config(configVal: SDKConfig);
21
21
  }
22
+ export * from './interfaces/index.js';
23
+ export * from './interfaces/query-params/index.js';
@@ -26,3 +26,5 @@ export class RotaCloud {
26
26
  RotaCloud.config = configVal;
27
27
  }
28
28
  }
29
+ export * from './interfaces/index.js';
30
+ export * from './interfaces/query-params/index.js';
@@ -1 +1 @@
1
- export const Version = { version: '1.0.20' };
1
+ export const Version = { version: '1.0.22' };
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "rotacloud",
3
- "version": "1.0.20",
3
+ "version": "1.0.23",
4
4
  "description": "The RotaCloud SDK for the RotaCloud API",
5
5
  "engines": {
6
6
  "node": ">=14.17.0"
7
7
  },
8
- "types": "dist/mjs/interfaces/index.d.ts",
9
- "main": "dist/cjs/rotacloud.js",
10
- "module": "dist/mjs/rotacloud.js",
8
+ "main": "./dist/cjs/rotacloud.js",
9
+ "module": "./dist/mjs/rotacloud.js",
11
10
  "exports": {
12
11
  ".": {
13
12
  "require": "./dist/cjs/rotacloud.js",
@@ -18,6 +17,7 @@
18
17
  "version:bump": "npm --no-git-tag-version version patch",
19
18
  "version:copy": "cross-var echo export const Version = { version: \"'$npm_package_version'\" } > ./src/version.ts",
20
19
  "version:all": "npm run version:bump && npm run version:copy",
20
+ "watch": "rm -rf dist/* && concurrently \"tsc -p tsconfig.json --watch\" \"tsc -p tsconfig-cjs.json --watch\" && ./fixup",
21
21
  "build": "rm -rf dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup",
22
22
  "lint": "eslint src --ext .ts",
23
23
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -35,6 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@typescript-eslint/eslint-plugin": "^5.4.0",
37
37
  "@typescript-eslint/parser": "^5.4.0",
38
+ "concurrently": "^7.2.2",
38
39
  "eslint": "^8.2.0",
39
40
  "eslint-config-airbnb": "^19.0.0",
40
41
  "eslint-config-airbnb-base": "^15.0.0",
@@ -7,8 +7,8 @@ export interface ApiLocation {
7
7
  address: string;
8
8
  location: ApiLocationCoordinate;
9
9
  timezone: number;
10
- users: [];
11
- managers: [];
12
- metadata: null;
13
- clock_in_ips: null;
10
+ users: number[];
11
+ managers: number[];
12
+ metadata: object;
13
+ clock_in_ips: string[];
14
14
  }
@@ -0,0 +1,24 @@
1
+ export * from './attendance-query-params.interface.js';
2
+ export * from './availability-patterns-query-params.interface.js';
3
+ export * from './availability-query-params.interface.js';
4
+ export * from './common-shift-times-query-params.interface.js';
5
+ export * from './daily-budgets-query-params.interface.js';
6
+ export * from './daily-revenue-query-params.interface.js';
7
+ export * from './day-notes-query-params.interface.js';
8
+ export * from './days-off-patterns-query-params.interface.js';
9
+ export * from './days-off-query-params.interface.js';
10
+ export * from './documents-query-params.interface.js';
11
+ export * from './groups-query-params.interface.js';
12
+ export * from './internal-query-params.interface.js';
13
+ export * from './leave-embargoes-query-params.interface.js';
14
+ export * from './leave-query-params.interface.js';
15
+ export * from './leave-requests-query-params.interface.js';
16
+ export * from './locations-query-params.interface.js';
17
+ export * from './logbook-events-query-params.interface.js';
18
+ export * from './pay-periods-query-params.interface.js';
19
+ export * from './roles-query-params.interface.js';
20
+ export * from './shifts-query-params.interface.js';
21
+ export * from './swap-requests-query-params.interface.js';
22
+ export * from './terminals-query-params.interface.js';
23
+ export * from './unavailability-requests-query-params.interface.js';
24
+ export * from './users-query-params.interface.js';
@@ -12,8 +12,8 @@ export interface ApiShift {
12
12
  location: number;
13
13
  role: number | null;
14
14
  notes: string | null;
15
- created_by: number;
16
15
  created_at: number;
16
+ created_by: number;
17
17
  updated_at: number | null;
18
18
  updated_by: number | null;
19
19
  claimed: boolean;
@@ -9,11 +9,25 @@ export class LatLngObject {
9
9
  export class Location {
10
10
  public id: number;
11
11
  public name: string;
12
+ public deleted: boolean;
13
+ public address: string;
14
+ public location: LatLngObject;
15
+ public timezone: number;
12
16
  public users: number[];
17
+ public managers: number[];
18
+ public metadata: object;
19
+ public clock_in_ips: string[];
13
20
 
14
- constructor(locaiton: ApiLocation) {
15
- this.id = locaiton.id;
16
- this.name = locaiton.name;
17
- this.users = locaiton.users;
21
+ constructor(location: ApiLocation) {
22
+ this.id = location.id;
23
+ this.name = location.name;
24
+ this.deleted = location.deleted;
25
+ this.address = location.address;
26
+ this.location = location.location;
27
+ this.timezone = location.timezone;
28
+ this.users = location.users;
29
+ this.managers = location.managers;
30
+ this.metadata = location.metadata;
31
+ this.clock_in_ips = location.clock_in_ips;
18
32
  }
19
33
  }
@@ -2,13 +2,20 @@ import { ApiRole } from '../interfaces/index.js';
2
2
 
3
3
  export class Role {
4
4
  public id: number;
5
+ public deleted: boolean;
5
6
  public name: string;
6
7
  public colour: string;
8
+ public default_break: number;
7
9
  public users: number[];
10
+ public pay_code: string;
8
11
 
9
12
  constructor(role: ApiRole) {
10
13
  this.id = role.id;
14
+ this.deleted = role.deleted;
11
15
  this.name = role.name;
16
+ this.colour = role.colour;
17
+ this.default_break = role.default_break;
12
18
  this.users = role.users;
19
+ this.pay_code = role.pay_code;
13
20
  }
14
21
  }
@@ -3,6 +3,8 @@ import { ApiShift } from '../interfaces/index.js';
3
3
  export class Shift {
4
4
  public id: number;
5
5
  public deleted: boolean;
6
+ public deleted_at: number | null;
7
+ public deleted_by: number | null;
6
8
  public published: boolean;
7
9
  public open: boolean;
8
10
  public start_time: number;
@@ -12,9 +14,10 @@ export class Shift {
12
14
  public location: number;
13
15
  public role: number | null;
14
16
  public notes: string | null;
15
- public created_by: number;
16
17
  public created_at: number;
18
+ public created_by: number;
17
19
  public updated_at: number | null;
20
+ public updated_by: number | null;
18
21
  public claimed: boolean;
19
22
  public claimed_at: number | null;
20
23
  public acknowledged: boolean;
@@ -25,8 +28,10 @@ export class Shift {
25
28
  constructor(shift: ApiShift) {
26
29
  this.id = shift.id;
27
30
  this.deleted = shift.deleted;
28
- this.open = shift.open;
31
+ this.deleted_at = shift.deleted_at;
32
+ this.deleted_by = shift.deleted_by;
29
33
  this.published = shift.published;
34
+ this.open = shift.open;
30
35
  this.start_time = shift.start_time;
31
36
  this.end_time = shift.end_time;
32
37
  this.minutes_break = shift.minutes_break;
@@ -34,9 +39,10 @@ export class Shift {
34
39
  this.location = shift.location;
35
40
  this.role = shift.role;
36
41
  this.notes = shift.notes;
37
- this.created_by = shift.created_by;
38
42
  this.created_at = shift.created_at;
43
+ this.created_by = shift.created_by;
39
44
  this.updated_at = shift.updated_at;
45
+ this.updated_by = shift.updated_by;
40
46
  this.claimed = shift.claimed;
41
47
  this.claimed_at = shift.claimed_at;
42
48
  this.acknowledged = shift.acknowledged;
package/src/rotacloud.ts CHANGED
@@ -46,3 +46,6 @@ export class RotaCloud {
46
46
  RotaCloud.config = configVal;
47
47
  }
48
48
  }
49
+
50
+ export * from './interfaces/index.js';
51
+ export * from './interfaces/query-params/index.js';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const Version = { version: '1.0.20' }
1
+ export const Version = { version: '1.0.22' };