rotacloud 1.0.22 → 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.
@@ -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
  }
@@ -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;
@@ -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
  }
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rotacloud",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "The RotaCloud SDK for the RotaCloud API",
5
5
  "engines": {
6
6
  "node": ">=14.17.0"
@@ -17,6 +17,7 @@
17
17
  "version:bump": "npm --no-git-tag-version version patch",
18
18
  "version:copy": "cross-var echo export const Version = { version: \"'$npm_package_version'\" } > ./src/version.ts",
19
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",
20
21
  "build": "rm -rf dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup",
21
22
  "lint": "eslint src --ext .ts",
22
23
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -34,6 +35,7 @@
34
35
  "devDependencies": {
35
36
  "@typescript-eslint/eslint-plugin": "^5.4.0",
36
37
  "@typescript-eslint/parser": "^5.4.0",
38
+ "concurrently": "^7.2.2",
37
39
  "eslint": "^8.2.0",
38
40
  "eslint-config-airbnb": "^19.0.0",
39
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
  }
@@ -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/version.ts CHANGED
@@ -1 +1 @@
1
- export const Version = { version: '1.0.22' }
1
+ export const Version = { version: '1.0.22' };