rotacloud 1.0.21 → 1.0.24
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.
- package/.github/workflows/{node.js.yml → publish.yml} +18 -8
- package/README.md +1 -2
- package/dist/cjs/interfaces/location.interface.d.ts +4 -4
- package/dist/cjs/interfaces/query-params/index.d.ts +24 -0
- package/dist/cjs/interfaces/query-params/index.js +36 -0
- package/dist/cjs/interfaces/shift.interface.d.ts +1 -1
- package/dist/cjs/models/location.model.d.ts +8 -1
- package/dist/cjs/models/location.model.js +11 -4
- package/dist/cjs/models/role.model.d.ts +3 -0
- package/dist/cjs/models/role.model.js +4 -0
- package/dist/cjs/models/shift.model.d.ts +4 -1
- package/dist/cjs/models/shift.model.js +5 -2
- package/dist/cjs/rotacloud.d.ts +2 -0
- package/dist/cjs/rotacloud.js +12 -0
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/location.interface.d.ts +4 -4
- package/dist/mjs/interfaces/query-params/index.d.ts +24 -0
- package/dist/mjs/interfaces/query-params/index.js +24 -0
- package/dist/mjs/interfaces/shift.interface.d.ts +1 -1
- package/dist/mjs/models/location.model.d.ts +8 -1
- package/dist/mjs/models/location.model.js +11 -4
- package/dist/mjs/models/role.model.d.ts +3 -0
- package/dist/mjs/models/role.model.js +4 -0
- package/dist/mjs/models/shift.model.d.ts +4 -1
- package/dist/mjs/models/shift.model.js +5 -2
- package/dist/mjs/rotacloud.d.ts +2 -0
- package/dist/mjs/rotacloud.js +2 -0
- package/dist/mjs/version.js +1 -1
- package/package.json +3 -4
- package/src/interfaces/location.interface.ts +4 -4
- package/src/interfaces/query-params/index.ts +24 -0
- package/src/interfaces/shift.interface.ts +1 -1
- package/src/models/location.model.ts +18 -4
- package/src/models/role.model.ts +7 -0
- package/src/models/shift.model.ts +9 -3
- package/src/rotacloud.ts +3 -0
- 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:
|
|
4
|
+
name: Publish
|
|
5
5
|
|
|
6
6
|
on:
|
|
7
7
|
push:
|
|
8
|
-
branches: [
|
|
8
|
+
branches: [main]
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
|
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
- name: Add version number to package
|
|
29
|
+
run: |
|
|
30
|
+
version=$(node -pe "require('./package.json').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}}
|
package/README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Contributing
|
|
4
4
|
|
|
5
|
-
Please ensure you perform the
|
|
6
|
-
|
|
5
|
+
Please ensure you perform the `npm run version:bump` command before commiting and pushing your changes to the remote branch.
|
|
7
6
|
|
|
8
7
|
## Configuration
|
|
9
8
|
|
|
@@ -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:
|
|
12
|
-
clock_in_ips:
|
|
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);
|
|
@@ -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
|
-
|
|
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(
|
|
9
|
-
this.id =
|
|
10
|
-
this.name =
|
|
11
|
-
this.
|
|
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;
|
|
@@ -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.
|
|
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;
|
package/dist/cjs/rotacloud.d.ts
CHANGED
package/dist/cjs/rotacloud.js
CHANGED
|
@@ -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);
|
package/dist/cjs/version.js
CHANGED
|
@@ -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:
|
|
12
|
-
clock_in_ips:
|
|
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';
|
|
@@ -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
|
-
|
|
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(
|
|
5
|
-
this.id =
|
|
6
|
-
this.name =
|
|
7
|
-
this.
|
|
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,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.
|
|
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/dist/mjs/rotacloud.d.ts
CHANGED
package/dist/mjs/rotacloud.js
CHANGED
package/dist/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.24' };
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rotacloud",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
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
8
|
"main": "./dist/cjs/rotacloud.js",
|
|
10
9
|
"module": "./dist/mjs/rotacloud.js",
|
|
11
10
|
"exports": {
|
|
@@ -16,8 +15,7 @@
|
|
|
16
15
|
},
|
|
17
16
|
"scripts": {
|
|
18
17
|
"version:bump": "npm --no-git-tag-version version patch",
|
|
19
|
-
"
|
|
20
|
-
"version:all": "npm run version:bump && npm run version:copy",
|
|
18
|
+
"watch": "rm -rf dist/* && concurrently \"tsc -p tsconfig.json --watch\" \"tsc -p tsconfig-cjs.json --watch\" && ./fixup",
|
|
21
19
|
"build": "rm -rf dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && ./fixup",
|
|
22
20
|
"lint": "eslint src --ext .ts",
|
|
23
21
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -35,6 +33,7 @@
|
|
|
35
33
|
"devDependencies": {
|
|
36
34
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
37
35
|
"@typescript-eslint/parser": "^5.4.0",
|
|
36
|
+
"concurrently": "^7.2.2",
|
|
38
37
|
"eslint": "^8.2.0",
|
|
39
38
|
"eslint-config-airbnb": "^19.0.0",
|
|
40
39
|
"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:
|
|
13
|
-
clock_in_ips:
|
|
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';
|
|
@@ -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(
|
|
15
|
-
this.id =
|
|
16
|
-
this.name =
|
|
17
|
-
this.
|
|
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
|
}
|
package/src/models/role.model.ts
CHANGED
|
@@ -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.
|
|
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
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.24' };
|