rotacloud 1.1.1 → 1.2.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.
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/index.js +1 -0
- package/dist/cjs/interfaces/query-params/index.d.ts +0 -1
- package/dist/cjs/interfaces/query-params/index.js +0 -1
- package/dist/cjs/interfaces/terminal.interface.d.ts +1 -0
- package/dist/cjs/interfaces/time-zone.interface.d.ts +7 -0
- package/dist/cjs/rotacloud.d.ts +2 -1
- package/dist/cjs/rotacloud.js +1 -0
- package/dist/cjs/services/accounts.service.d.ts +26 -7
- package/dist/cjs/services/accounts.service.js +10 -20
- package/dist/cjs/services/attendance.service.d.ts +30 -11
- package/dist/cjs/services/attendance.service.js +16 -26
- package/dist/cjs/services/auth.service.js +1 -3
- package/dist/cjs/services/availability.service.d.ts +3 -3
- package/dist/cjs/services/availability.service.js +8 -18
- package/dist/cjs/services/daily-budgets.service.d.ts +19 -7
- package/dist/cjs/services/daily-budgets.service.js +12 -22
- package/dist/cjs/services/daily-revenue.service.d.ts +18 -6
- package/dist/cjs/services/daily-revenue.service.js +11 -21
- package/dist/cjs/services/day-notes.service.d.ts +27 -8
- package/dist/cjs/services/day-notes.service.js +15 -25
- package/dist/cjs/services/days-off.service.d.ts +17 -5
- package/dist/cjs/services/days-off.service.js +13 -23
- package/dist/cjs/services/groups.service.d.ts +27 -8
- package/dist/cjs/services/groups.service.js +12 -22
- package/dist/cjs/services/index.d.ts +1 -0
- package/dist/cjs/services/index.js +1 -0
- package/dist/cjs/services/leave-embargoes.service.d.ts +27 -8
- package/dist/cjs/services/leave-embargoes.service.js +16 -26
- package/dist/cjs/services/leave-request.service.d.ts +27 -8
- package/dist/cjs/services/leave-request.service.js +15 -25
- package/dist/cjs/services/leave.service.d.ts +28 -10
- package/dist/cjs/services/leave.service.js +13 -46
- package/dist/cjs/services/locations.service.d.ts +27 -8
- package/dist/cjs/services/locations.service.js +16 -26
- package/dist/cjs/services/pins.service.d.ts +12 -5
- package/dist/cjs/services/pins.service.js +1 -1
- package/dist/cjs/services/roles.service.d.ts +27 -8
- package/dist/cjs/services/roles.service.js +16 -26
- package/dist/cjs/services/service.d.ts +12 -3
- package/dist/cjs/services/service.js +1 -2
- package/dist/cjs/services/settings.service.d.ts +1 -1
- package/dist/cjs/services/settings.service.js +1 -1
- package/dist/cjs/services/shifts.service.d.ts +30 -11
- package/dist/cjs/services/shifts.service.js +21 -31
- package/dist/cjs/services/terminals-active.service.d.ts +20 -8
- package/dist/cjs/services/terminals-active.service.js +16 -26
- package/dist/cjs/services/terminals.service.d.ts +27 -8
- package/dist/cjs/services/terminals.service.js +13 -23
- package/dist/cjs/services/time-zone.service.d.ts +14 -0
- package/dist/cjs/services/time-zone.service.js +82 -0
- package/dist/cjs/services/toil-accruals.service.d.ts +4 -4
- package/dist/cjs/services/toil-accruals.service.js +12 -22
- package/dist/cjs/services/toil-allowance.service.d.ts +3 -3
- package/dist/cjs/services/toil-allowance.service.js +9 -19
- package/dist/cjs/services/users-clock-in.service.d.ts +22 -10
- package/dist/cjs/services/users-clock-in.service.js +5 -5
- package/dist/cjs/services/users.service.d.ts +28 -9
- package/dist/cjs/services/users.service.js +16 -26
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/index.d.ts +1 -0
- package/dist/mjs/interfaces/index.js +1 -0
- package/dist/mjs/interfaces/query-params/index.d.ts +0 -1
- package/dist/mjs/interfaces/query-params/index.js +0 -1
- package/dist/mjs/interfaces/terminal.interface.d.ts +1 -0
- package/dist/mjs/interfaces/time-zone.interface.d.ts +7 -0
- package/dist/mjs/rotacloud.d.ts +2 -1
- package/dist/mjs/rotacloud.js +2 -1
- package/dist/mjs/services/accounts.service.d.ts +26 -7
- package/dist/mjs/services/accounts.service.js +2 -4
- package/dist/mjs/services/attendance.service.d.ts +30 -11
- package/dist/mjs/services/attendance.service.js +8 -10
- package/dist/mjs/services/auth.service.js +1 -3
- package/dist/mjs/services/availability.service.d.ts +3 -3
- package/dist/mjs/services/availability.service.js +3 -5
- package/dist/mjs/services/daily-budgets.service.d.ts +19 -7
- package/dist/mjs/services/daily-budgets.service.js +4 -6
- package/dist/mjs/services/daily-revenue.service.d.ts +18 -6
- package/dist/mjs/services/daily-revenue.service.js +3 -5
- package/dist/mjs/services/day-notes.service.d.ts +27 -8
- package/dist/mjs/services/day-notes.service.js +7 -9
- package/dist/mjs/services/days-off.service.d.ts +17 -5
- package/dist/mjs/services/days-off.service.js +5 -7
- package/dist/mjs/services/groups.service.d.ts +27 -8
- package/dist/mjs/services/groups.service.js +4 -6
- package/dist/mjs/services/index.d.ts +1 -0
- package/dist/mjs/services/index.js +1 -0
- package/dist/mjs/services/leave-embargoes.service.d.ts +27 -8
- package/dist/mjs/services/leave-embargoes.service.js +8 -10
- package/dist/mjs/services/leave-request.service.d.ts +27 -8
- package/dist/mjs/services/leave-request.service.js +7 -9
- package/dist/mjs/services/leave.service.d.ts +28 -10
- package/dist/mjs/services/leave.service.js +5 -12
- package/dist/mjs/services/locations.service.d.ts +27 -8
- package/dist/mjs/services/locations.service.js +8 -10
- package/dist/mjs/services/pins.service.d.ts +12 -5
- package/dist/mjs/services/pins.service.js +1 -1
- package/dist/mjs/services/roles.service.d.ts +27 -8
- package/dist/mjs/services/roles.service.js +8 -10
- package/dist/mjs/services/service.d.ts +12 -3
- package/dist/mjs/services/service.js +0 -2
- package/dist/mjs/services/settings.service.d.ts +1 -1
- package/dist/mjs/services/settings.service.js +1 -1
- package/dist/mjs/services/shifts.service.d.ts +30 -11
- package/dist/mjs/services/shifts.service.js +13 -15
- package/dist/mjs/services/terminals-active.service.d.ts +20 -8
- package/dist/mjs/services/terminals-active.service.js +8 -10
- package/dist/mjs/services/terminals.service.d.ts +27 -8
- package/dist/mjs/services/terminals.service.js +5 -7
- package/dist/mjs/services/time-zone.service.d.ts +14 -0
- package/dist/mjs/services/time-zone.service.js +25 -0
- package/dist/mjs/services/toil-accruals.service.d.ts +4 -4
- package/dist/mjs/services/toil-accruals.service.js +4 -6
- package/dist/mjs/services/toil-allowance.service.d.ts +3 -3
- package/dist/mjs/services/toil-allowance.service.js +1 -3
- package/dist/mjs/services/users-clock-in.service.d.ts +22 -10
- package/dist/mjs/services/users-clock-in.service.js +5 -5
- package/dist/mjs/services/users.service.d.ts +28 -9
- package/dist/mjs/services/users.service.js +8 -10
- package/dist/mjs/version.js +1 -1
- package/package.json +1 -1
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/query-params/index.ts +0 -1
- package/src/interfaces/terminal.interface.ts +1 -0
- package/src/interfaces/time-zone.interface.ts +7 -0
- package/src/rotacloud.ts +2 -0
- package/src/services/accounts.service.ts +30 -14
- package/src/services/attendance.service.ts +57 -28
- package/src/services/auth.service.ts +1 -3
- package/src/services/availability.service.ts +14 -13
- package/src/services/daily-budgets.service.ts +41 -20
- package/src/services/daily-revenue.service.ts +37 -19
- package/src/services/day-notes.service.ts +51 -25
- package/src/services/days-off.service.ts +46 -25
- package/src/services/groups.service.ts +40 -20
- package/src/services/index.ts +1 -0
- package/src/services/leave-embargoes.service.ts +54 -25
- package/src/services/leave-request.service.ts +53 -24
- package/src/services/leave.service.ts +41 -27
- package/src/services/locations.service.ts +54 -25
- package/src/services/pins.service.ts +11 -6
- package/src/services/roles.service.ts +49 -25
- package/src/services/service.ts +35 -9
- package/src/services/settings.service.ts +2 -2
- package/src/services/shifts.service.ts +62 -36
- package/src/services/terminals-active.service.ts +36 -23
- package/src/services/terminals.service.ts +36 -18
- package/src/services/time-zone.service.ts +34 -0
- package/src/services/toil-accruals.service.ts +9 -11
- package/src/services/toil-allowance.service.ts +3 -5
- package/src/services/users-clock-in.service.ts +30 -16
- package/src/services/users.service.ts +49 -26
- package/src/version.ts +1 -1
- package/dist/cjs/interfaces/query-params/internal-query-params.interface.d.ts +0 -5
- package/dist/mjs/interfaces/query-params/internal-query-params.interface.d.ts +0 -5
- package/src/interfaces/query-params/internal-query-params.interface.ts +0 -5
- /package/dist/cjs/interfaces/{query-params/internal-query-params.interface.js → time-zone.interface.js} +0 -0
- /package/dist/mjs/interfaces/{query-params/internal-query-params.interface.js → time-zone.interface.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { LeaveRequest } from '../interfaces/index.js';
|
|
3
|
-
import { Service, Options, RequirementsOf } from './index.js';
|
|
3
|
+
import { Service, Options, RequirementsOf, OptionsExtended } from './index.js';
|
|
4
4
|
import { LeaveRequestsQueryParams } from '../interfaces/query-params/leave-requests-query-params.interface.js';
|
|
5
5
|
type RequiredProps = 'start_date' | 'end_date' | 'type' | 'user';
|
|
6
|
-
export declare class LeaveRequestService extends Service {
|
|
6
|
+
export declare class LeaveRequestService extends Service<LeaveRequest> {
|
|
7
7
|
private apiPath;
|
|
8
8
|
create(data: RequirementsOf<LeaveRequest, RequiredProps>): Promise<LeaveRequest>;
|
|
9
9
|
create(data: RequirementsOf<LeaveRequest, RequiredProps>, options: {
|
|
@@ -11,13 +11,32 @@ export declare class LeaveRequestService extends Service {
|
|
|
11
11
|
} & Options): Promise<AxiosResponse<LeaveRequest, any>>;
|
|
12
12
|
create(data: RequirementsOf<LeaveRequest, RequiredProps>, options: Options): Promise<LeaveRequest>;
|
|
13
13
|
get(id: number): Promise<LeaveRequest>;
|
|
14
|
+
get<F extends keyof LeaveRequest>(id: number, options: {
|
|
15
|
+
fields: F[];
|
|
16
|
+
rawResponse: true;
|
|
17
|
+
} & OptionsExtended<LeaveRequest>): Promise<AxiosResponse<Pick<LeaveRequest, F>>>;
|
|
18
|
+
get<F extends keyof LeaveRequest>(id: number, options: {
|
|
19
|
+
fields: F[];
|
|
20
|
+
} & OptionsExtended<LeaveRequest>): Promise<Pick<LeaveRequest, F>>;
|
|
14
21
|
get(id: number, options: {
|
|
15
22
|
rawResponse: true;
|
|
16
|
-
}): Promise<AxiosResponse<LeaveRequest
|
|
17
|
-
get(id: number, options
|
|
18
|
-
list(query?: LeaveRequestsQueryParams
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
} & Options): Promise<AxiosResponse<LeaveRequest>>;
|
|
24
|
+
get(id: number, options?: OptionsExtended<LeaveRequest>): Promise<LeaveRequest>;
|
|
25
|
+
list(query?: LeaveRequestsQueryParams): AsyncGenerator<LeaveRequest>;
|
|
26
|
+
list<F extends keyof LeaveRequest>(query: LeaveRequestsQueryParams, options: {
|
|
27
|
+
fields: F[];
|
|
28
|
+
} & OptionsExtended<LeaveRequest>): AsyncGenerator<Pick<LeaveRequest, F>>;
|
|
29
|
+
list(query?: LeaveRequestsQueryParams, options?: OptionsExtended<LeaveRequest>): AsyncGenerator<LeaveRequest>;
|
|
30
|
+
listAll(query?: LeaveRequestsQueryParams): Promise<LeaveRequest[]>;
|
|
31
|
+
listAll<F extends keyof LeaveRequest>(query: LeaveRequestsQueryParams, options: {
|
|
32
|
+
fields: F[];
|
|
33
|
+
} & OptionsExtended<LeaveRequest>): Promise<Pick<LeaveRequest, F>[]>;
|
|
34
|
+
listAll(query?: LeaveRequestsQueryParams, options?: OptionsExtended<LeaveRequest>): Promise<LeaveRequest[]>;
|
|
35
|
+
listByPage(query?: LeaveRequestsQueryParams): AsyncGenerator<AxiosResponse<LeaveRequest[]>>;
|
|
36
|
+
listByPage<F extends keyof LeaveRequest>(query: LeaveRequestsQueryParams, options: {
|
|
37
|
+
fields: F[];
|
|
38
|
+
} & OptionsExtended<LeaveRequest>): AsyncGenerator<AxiosResponse<Pick<LeaveRequest, F>[]>>;
|
|
39
|
+
listByPage(query: LeaveRequestsQueryParams, options?: OptionsExtended<LeaveRequest>): AsyncGenerator<AxiosResponse<LeaveRequest[]>>;
|
|
21
40
|
update(id: number, data: Partial<LeaveRequest>): Promise<LeaveRequest>;
|
|
22
41
|
update(id: number, data: Partial<LeaveRequest>, options: {
|
|
23
42
|
rawResponse: true;
|
|
@@ -26,7 +45,7 @@ export declare class LeaveRequestService extends Service {
|
|
|
26
45
|
delete(id: number): Promise<number>;
|
|
27
46
|
delete(id: number, options: {
|
|
28
47
|
rawResponse: true;
|
|
29
|
-
} & Options): Promise<AxiosResponse<
|
|
48
|
+
} & Options): Promise<AxiosResponse<void>>;
|
|
30
49
|
delete(id: number, options: Options): Promise<number>;
|
|
31
50
|
}
|
|
32
51
|
export {};
|
|
@@ -11,17 +11,15 @@ export class LeaveRequestService extends Service {
|
|
|
11
11
|
data,
|
|
12
12
|
method: 'POST',
|
|
13
13
|
}, options)
|
|
14
|
-
.then((res) =>
|
|
14
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
15
15
|
}
|
|
16
16
|
get(id, options) {
|
|
17
17
|
return super
|
|
18
18
|
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
19
|
-
.then((res) =>
|
|
19
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
20
20
|
}
|
|
21
21
|
async *list(query, options) {
|
|
22
|
-
|
|
23
|
-
yield res;
|
|
24
|
-
}
|
|
22
|
+
yield* super.iterator({ url: this.apiPath, params: query }, options);
|
|
25
23
|
}
|
|
26
24
|
async listAll(query, options) {
|
|
27
25
|
const leave = [];
|
|
@@ -39,12 +37,12 @@ export class LeaveRequestService extends Service {
|
|
|
39
37
|
url: `${this.apiPath}/${id}`,
|
|
40
38
|
data,
|
|
41
39
|
method: 'POST',
|
|
42
|
-
})
|
|
43
|
-
.then((res) =>
|
|
40
|
+
}, options)
|
|
41
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
44
42
|
}
|
|
45
43
|
delete(id, options) {
|
|
46
44
|
return super
|
|
47
|
-
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
48
|
-
.then((res) =>
|
|
45
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' }, options)
|
|
46
|
+
.then((res) => (options?.rawResponse ? res : res.status));
|
|
49
47
|
}
|
|
50
48
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
|
-
import { Leave
|
|
3
|
-
import { Service, Options, RequirementsOf } from './index.js';
|
|
2
|
+
import { Leave } from '../interfaces/index.js';
|
|
3
|
+
import { Service, Options, RequirementsOf, OptionsExtended } from './index.js';
|
|
4
4
|
import { LeaveQueryParams } from '../interfaces/query-params/leave-query-params.interface.js';
|
|
5
5
|
type RequiredProps = 'users' | 'type' | 'start_date' | 'end_date';
|
|
6
|
-
export declare class LeaveService extends Service {
|
|
6
|
+
export declare class LeaveService extends Service<Leave> {
|
|
7
7
|
private apiPath;
|
|
8
8
|
create(data: RequirementsOf<Leave, RequiredProps>): Promise<Leave[]>;
|
|
9
9
|
create(data: RequirementsOf<Leave, RequiredProps>, options: {
|
|
@@ -11,14 +11,32 @@ export declare class LeaveService extends Service {
|
|
|
11
11
|
} & Options): Promise<AxiosResponse<Leave[], any>>;
|
|
12
12
|
create(data: RequirementsOf<Leave, RequiredProps>, options: Options): Promise<Leave[]>;
|
|
13
13
|
get(id: number): Promise<Leave>;
|
|
14
|
+
get<F extends keyof Leave>(id: number, options: {
|
|
15
|
+
fields: F[];
|
|
16
|
+
rawResponse: true;
|
|
17
|
+
} & OptionsExtended<Leave>): Promise<AxiosResponse<Pick<Leave, F>>>;
|
|
18
|
+
get<F extends keyof Leave>(id: number, options: {
|
|
19
|
+
fields: F[];
|
|
20
|
+
} & OptionsExtended<Leave>): Promise<Pick<Leave, F>>;
|
|
14
21
|
get(id: number, options: {
|
|
15
22
|
rawResponse: true;
|
|
16
|
-
}): Promise<AxiosResponse<Leave
|
|
17
|
-
get(id: number, options
|
|
18
|
-
list(query
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
} & Options): Promise<AxiosResponse<Leave>>;
|
|
24
|
+
get(id: number, options?: OptionsExtended<Leave>): Promise<Leave>;
|
|
25
|
+
list(query?: LeaveQueryParams): AsyncGenerator<Leave>;
|
|
26
|
+
list<F extends keyof Leave>(query: LeaveQueryParams, options: {
|
|
27
|
+
fields: F[];
|
|
28
|
+
} & OptionsExtended<Leave>): AsyncGenerator<Pick<Leave, F>>;
|
|
29
|
+
list(query?: LeaveQueryParams, options?: OptionsExtended<Leave>): AsyncGenerator<Leave>;
|
|
30
|
+
listAll(query?: LeaveQueryParams): Promise<Leave[]>;
|
|
31
|
+
listAll<F extends keyof Leave>(query: LeaveQueryParams, options: {
|
|
32
|
+
fields: F[];
|
|
33
|
+
} & OptionsExtended<Leave>): Promise<Pick<Leave, F>[]>;
|
|
34
|
+
listAll(query?: LeaveQueryParams, options?: OptionsExtended<Leave>): Promise<Leave[]>;
|
|
35
|
+
listByPage(query?: LeaveQueryParams): AsyncGenerator<AxiosResponse<Leave[]>>;
|
|
36
|
+
listByPage<F extends keyof Leave>(query: LeaveQueryParams, options: {
|
|
37
|
+
fields: F[];
|
|
38
|
+
} & OptionsExtended<Leave>): AsyncGenerator<AxiosResponse<Pick<Leave, F>[]>>;
|
|
39
|
+
listByPage(query?: LeaveQueryParams, options?: OptionsExtended<Leave>): AsyncGenerator<AxiosResponse<Leave[]>>;
|
|
22
40
|
update(id: number, data: Partial<Leave>): Promise<Leave>;
|
|
23
41
|
update(id: number, data: Partial<Leave>, options: {
|
|
24
42
|
rawResponse: true;
|
|
@@ -27,7 +45,7 @@ export declare class LeaveService extends Service {
|
|
|
27
45
|
delete(id: number): Promise<number>;
|
|
28
46
|
delete(id: number, options: {
|
|
29
47
|
rawResponse: true;
|
|
30
|
-
} & Options): Promise<AxiosResponse<
|
|
48
|
+
} & Options): Promise<AxiosResponse<void>>;
|
|
31
49
|
delete(id: number, options: Options): Promise<number>;
|
|
32
50
|
}
|
|
33
51
|
export {};
|
|
@@ -7,17 +7,15 @@ export class LeaveService extends Service {
|
|
|
7
7
|
create(data, options) {
|
|
8
8
|
return super
|
|
9
9
|
.fetch({ url: this.apiPath, data, method: 'POST' }, options)
|
|
10
|
-
.then((res) =>
|
|
10
|
+
.then((res) => (options?.rawResponse ? res : [...res.data.map((leave) => leave)]));
|
|
11
11
|
}
|
|
12
12
|
get(id, options) {
|
|
13
13
|
return super
|
|
14
14
|
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
15
|
-
.then((res) =>
|
|
15
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
16
16
|
}
|
|
17
17
|
async *list(query, options) {
|
|
18
|
-
|
|
19
|
-
yield res;
|
|
20
|
-
}
|
|
18
|
+
yield* super.iterator({ url: this.apiPath, params: query }, options);
|
|
21
19
|
}
|
|
22
20
|
async listAll(query, options) {
|
|
23
21
|
const leave = [];
|
|
@@ -26,11 +24,6 @@ export class LeaveService extends Service {
|
|
|
26
24
|
}
|
|
27
25
|
return leave;
|
|
28
26
|
}
|
|
29
|
-
async *listLeaveTypes(query, options) {
|
|
30
|
-
for await (const res of super.iterator({ url: this.apiPath, params: query }, options)) {
|
|
31
|
-
yield res;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
27
|
listByPage(query, options) {
|
|
35
28
|
return super.iterator({ url: this.apiPath, params: query }, options).byPage();
|
|
36
29
|
}
|
|
@@ -41,11 +34,11 @@ export class LeaveService extends Service {
|
|
|
41
34
|
data,
|
|
42
35
|
method: 'POST',
|
|
43
36
|
}, options)
|
|
44
|
-
.then((res) =>
|
|
37
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
45
38
|
}
|
|
46
39
|
delete(id, options) {
|
|
47
40
|
return super
|
|
48
41
|
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
49
|
-
.then((res) =>
|
|
42
|
+
.then((res) => (options?.rawResponse ? res : res.status));
|
|
50
43
|
}
|
|
51
44
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { Location } from '../interfaces/index.js';
|
|
3
|
-
import { Service, Options, RequirementsOf } from './index.js';
|
|
3
|
+
import { Service, Options, RequirementsOf, OptionsExtended } from './index.js';
|
|
4
4
|
import { LocationsQueryParams } from '../interfaces/query-params/locations-query-params.interface.js';
|
|
5
5
|
type RequiredProps = 'name';
|
|
6
|
-
export declare class LocationsService extends Service {
|
|
6
|
+
export declare class LocationsService extends Service<Location> {
|
|
7
7
|
private apiPath;
|
|
8
8
|
create(data: RequirementsOf<Location, RequiredProps>): Promise<Location>;
|
|
9
9
|
create(data: RequirementsOf<Location, RequiredProps>, options: {
|
|
@@ -11,13 +11,32 @@ export declare class LocationsService extends Service {
|
|
|
11
11
|
} & Options): Promise<AxiosResponse<Location, any>>;
|
|
12
12
|
create(data: RequirementsOf<Location, RequiredProps>, options: Options): Promise<Location>;
|
|
13
13
|
get(id: number): Promise<Location>;
|
|
14
|
+
get<F extends keyof Location>(id: number, options: {
|
|
15
|
+
fields: F[];
|
|
16
|
+
rawResponse: true;
|
|
17
|
+
} & OptionsExtended<Location>): Promise<AxiosResponse<Pick<Location, F>>>;
|
|
18
|
+
get<F extends keyof Location>(id: number, options: {
|
|
19
|
+
fields: F[];
|
|
20
|
+
} & OptionsExtended<Location>): Promise<Pick<Location, F>>;
|
|
14
21
|
get(id: number, options: {
|
|
15
22
|
rawResponse: true;
|
|
16
|
-
} & Options): Promise<AxiosResponse<Location
|
|
17
|
-
get(id: number, options
|
|
18
|
-
list(query?: LocationsQueryParams
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
} & Options): Promise<AxiosResponse<Location>>;
|
|
24
|
+
get(id: number, options?: OptionsExtended<Location>): Promise<Location>;
|
|
25
|
+
list(query?: LocationsQueryParams): AsyncGenerator<Location>;
|
|
26
|
+
list<F extends keyof Location>(query: LocationsQueryParams, options: {
|
|
27
|
+
fields: F[];
|
|
28
|
+
} & OptionsExtended<Location>): AsyncGenerator<Pick<Location, F>>;
|
|
29
|
+
list(query?: LocationsQueryParams, options?: OptionsExtended<Location>): AsyncGenerator<Location>;
|
|
30
|
+
listAll(query?: LocationsQueryParams): Promise<Location[]>;
|
|
31
|
+
listAll<F extends keyof Location>(query: LocationsQueryParams, options: {
|
|
32
|
+
fields: F[];
|
|
33
|
+
} & OptionsExtended<Location>): Promise<Pick<Location, F>[]>;
|
|
34
|
+
listAll(query?: LocationsQueryParams, options?: OptionsExtended<Location>): Promise<Location[]>;
|
|
35
|
+
listByPage(query?: LocationsQueryParams): AsyncGenerator<AxiosResponse<Location[]>>;
|
|
36
|
+
listByPage<F extends keyof Location>(query: LocationsQueryParams, options: {
|
|
37
|
+
fields: F[];
|
|
38
|
+
} & OptionsExtended<Location>): AsyncGenerator<AxiosResponse<Pick<Location, F>[]>>;
|
|
39
|
+
listByPage(query: LocationsQueryParams, options?: OptionsExtended<Location>): AsyncGenerator<AxiosResponse<Location[]>>;
|
|
21
40
|
update(id: number, data: Partial<Location>): Promise<Location>;
|
|
22
41
|
update(id: number, data: Partial<Location>, options: {
|
|
23
42
|
rawResponse: true;
|
|
@@ -26,7 +45,7 @@ export declare class LocationsService extends Service {
|
|
|
26
45
|
delete(id: number): Promise<number>;
|
|
27
46
|
delete(id: number, options: {
|
|
28
47
|
rawResponse: true;
|
|
29
|
-
} & Options): Promise<AxiosResponse<
|
|
48
|
+
} & Options): Promise<AxiosResponse<void>>;
|
|
30
49
|
delete(id: number, options: Options): Promise<number>;
|
|
31
50
|
}
|
|
32
51
|
export {};
|
|
@@ -6,18 +6,16 @@ export class LocationsService extends Service {
|
|
|
6
6
|
}
|
|
7
7
|
create(data, options) {
|
|
8
8
|
return super
|
|
9
|
-
.fetch({ url: `${this.apiPath}`, data, method: 'POST' })
|
|
10
|
-
.then((res) =>
|
|
9
|
+
.fetch({ url: `${this.apiPath}`, data, method: 'POST' }, options)
|
|
10
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
11
11
|
}
|
|
12
12
|
get(id, options) {
|
|
13
13
|
return super
|
|
14
14
|
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
15
|
-
.then((res) =>
|
|
15
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
16
16
|
}
|
|
17
17
|
async *list(query, options) {
|
|
18
|
-
|
|
19
|
-
yield res;
|
|
20
|
-
}
|
|
18
|
+
yield* super.iterator({ url: this.apiPath, params: query }, options);
|
|
21
19
|
}
|
|
22
20
|
async listAll(query, options) {
|
|
23
21
|
const locations = [];
|
|
@@ -35,12 +33,12 @@ export class LocationsService extends Service {
|
|
|
35
33
|
url: `${this.apiPath}/${id}`,
|
|
36
34
|
data,
|
|
37
35
|
method: 'POST',
|
|
38
|
-
})
|
|
39
|
-
.then((res) =>
|
|
36
|
+
}, options)
|
|
37
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
40
38
|
}
|
|
41
39
|
delete(id, options) {
|
|
42
40
|
return super
|
|
43
|
-
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
44
|
-
.then((res) =>
|
|
41
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' }, options)
|
|
42
|
+
.then((res) => (options?.rawResponse ? res : res.status));
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { Pin } from '../interfaces/index.js';
|
|
3
|
-
import { Service, Options } from './index.js';
|
|
4
|
-
export declare class PinsService extends Service {
|
|
3
|
+
import { Service, Options, OptionsExtended } from './index.js';
|
|
4
|
+
export declare class PinsService extends Service<Pin> {
|
|
5
5
|
private apiPath;
|
|
6
6
|
get(id: string): Promise<Pin>;
|
|
7
|
-
get(id: string, options
|
|
7
|
+
get<F extends keyof Pin>(id: string, options: {
|
|
8
|
+
fields: F[];
|
|
8
9
|
rawResponse: true;
|
|
9
|
-
} &
|
|
10
|
-
get(id: string, options
|
|
10
|
+
} & OptionsExtended<Pin>): Promise<AxiosResponse<Pick<Pin, F>>>;
|
|
11
|
+
get<F extends keyof Pin>(id: string, options: {
|
|
12
|
+
fields: F[];
|
|
13
|
+
} & OptionsExtended<Pin>): Promise<Pick<Pin, F>>;
|
|
14
|
+
get(id: string, options: {
|
|
15
|
+
rawResponse: true;
|
|
16
|
+
} & Options): Promise<AxiosResponse<Pin>>;
|
|
17
|
+
get(id: string, options?: OptionsExtended<Pin>): Promise<Pin>;
|
|
11
18
|
}
|
|
@@ -7,6 +7,6 @@ export class PinsService extends Service {
|
|
|
7
7
|
get(id, options) {
|
|
8
8
|
return super
|
|
9
9
|
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
10
|
-
.then((res) =>
|
|
10
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { Role } from '../interfaces/index.js';
|
|
3
|
-
import { Service, Options, RequirementsOf } from './index.js';
|
|
3
|
+
import { Service, Options, RequirementsOf, OptionsExtended } from './index.js';
|
|
4
4
|
import { RolesQueryParams } from '../interfaces/query-params/roles-query-params.interface.js';
|
|
5
5
|
type RequiredProps = 'name';
|
|
6
|
-
export declare class RolesService extends Service {
|
|
6
|
+
export declare class RolesService extends Service<Role> {
|
|
7
7
|
private apiPath;
|
|
8
8
|
create(data: RequirementsOf<Role, RequiredProps>): Promise<Role>;
|
|
9
9
|
create(data: RequirementsOf<Role, RequiredProps>, options: {
|
|
@@ -11,13 +11,32 @@ export declare class RolesService extends Service {
|
|
|
11
11
|
} & Options): Promise<AxiosResponse<Role, any>>;
|
|
12
12
|
create(data: RequirementsOf<Role, RequiredProps>, options: Options): Promise<Role>;
|
|
13
13
|
get(id: number): Promise<Role>;
|
|
14
|
+
get<F extends keyof Role>(id: number, options: {
|
|
15
|
+
fields: F[];
|
|
16
|
+
rawResponse: true;
|
|
17
|
+
} & OptionsExtended<Role>): Promise<AxiosResponse<Pick<Role, F>>>;
|
|
18
|
+
get<F extends keyof Role>(id: number, options: {
|
|
19
|
+
fields: F[];
|
|
20
|
+
} & OptionsExtended<Role>): Promise<Pick<Role, F>>;
|
|
14
21
|
get(id: number, options: {
|
|
15
22
|
rawResponse: true;
|
|
16
|
-
} & Options): Promise<AxiosResponse<Role
|
|
17
|
-
get(id: number, options
|
|
18
|
-
list(query?: RolesQueryParams
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
} & Options): Promise<AxiosResponse<Role>>;
|
|
24
|
+
get(id: number, options?: OptionsExtended<Role>): Promise<Role>;
|
|
25
|
+
list(query?: RolesQueryParams): AsyncGenerator<Role>;
|
|
26
|
+
list<F extends keyof Role>(query: RolesQueryParams, options: {
|
|
27
|
+
fields: F[];
|
|
28
|
+
} & OptionsExtended<Role>): AsyncGenerator<Pick<Role, F>>;
|
|
29
|
+
list(query?: RolesQueryParams, options?: OptionsExtended<Role>): AsyncGenerator<Role>;
|
|
30
|
+
listAll(query?: RolesQueryParams): Promise<Role[]>;
|
|
31
|
+
listAll<F extends keyof Role>(query: RolesQueryParams, options: {
|
|
32
|
+
fields: F[];
|
|
33
|
+
} & OptionsExtended<Role>): Promise<Pick<Role, F>[]>;
|
|
34
|
+
listAll(query?: RolesQueryParams, options?: OptionsExtended<Role>): Promise<Role[]>;
|
|
35
|
+
listByPage(query?: RolesQueryParams): AsyncGenerator<AxiosResponse<Role[]>>;
|
|
36
|
+
listByPage<F extends keyof Role>(query: RolesQueryParams, options: {
|
|
37
|
+
fields: F[];
|
|
38
|
+
} & OptionsExtended<Role>): AsyncGenerator<AxiosResponse<Pick<Role, F>[]>>;
|
|
39
|
+
listByPage(query?: RolesQueryParams, options?: OptionsExtended<Role>): AsyncGenerator<AxiosResponse<Role[]>>;
|
|
21
40
|
update(id: number, data: Partial<Role>): Promise<Role>;
|
|
22
41
|
update(id: number, data: Partial<Role>, options: {
|
|
23
42
|
rawResponse: true;
|
|
@@ -26,7 +45,7 @@ export declare class RolesService extends Service {
|
|
|
26
45
|
delete(id: number): Promise<number>;
|
|
27
46
|
delete(id: number, options: {
|
|
28
47
|
rawResponse: true;
|
|
29
|
-
} & Options): Promise<AxiosResponse<
|
|
48
|
+
} & Options): Promise<AxiosResponse<void>>;
|
|
30
49
|
delete(id: number, options: Options): Promise<number>;
|
|
31
50
|
}
|
|
32
51
|
export {};
|
|
@@ -6,18 +6,16 @@ export class RolesService extends Service {
|
|
|
6
6
|
}
|
|
7
7
|
create(data, options) {
|
|
8
8
|
return super
|
|
9
|
-
.fetch({ url: this.apiPath, data, method: 'POST' })
|
|
10
|
-
.then((res) =>
|
|
9
|
+
.fetch({ url: this.apiPath, data, method: 'POST' }, options)
|
|
10
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
11
11
|
}
|
|
12
12
|
get(id, options) {
|
|
13
13
|
return super
|
|
14
14
|
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
15
|
-
.then((res) =>
|
|
15
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
16
16
|
}
|
|
17
17
|
async *list(query, options) {
|
|
18
|
-
|
|
19
|
-
yield res;
|
|
20
|
-
}
|
|
18
|
+
yield* super.iterator({ url: this.apiPath, params: query }, options);
|
|
21
19
|
}
|
|
22
20
|
async listAll(query, options) {
|
|
23
21
|
const roles = [];
|
|
@@ -35,12 +33,12 @@ export class RolesService extends Service {
|
|
|
35
33
|
url: `${this.apiPath}/${id}`,
|
|
36
34
|
data,
|
|
37
35
|
method: 'POST',
|
|
38
|
-
})
|
|
39
|
-
.then((res) =>
|
|
36
|
+
}, options)
|
|
37
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
40
38
|
}
|
|
41
39
|
delete(id, options) {
|
|
42
40
|
return super
|
|
43
|
-
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
44
|
-
.then((res) =>
|
|
41
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' }, options)
|
|
42
|
+
.then((res) => (options?.rawResponse ? res : res.status));
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -19,19 +19,28 @@ export type RetryOptions = {
|
|
|
19
19
|
};
|
|
20
20
|
export interface Options {
|
|
21
21
|
rawResponse?: boolean;
|
|
22
|
-
expand?: string[];
|
|
23
|
-
fields?: string[];
|
|
24
22
|
limit?: number;
|
|
25
23
|
offset?: number;
|
|
26
24
|
dryRun?: boolean;
|
|
27
25
|
}
|
|
26
|
+
export type OptionsExtended<T = unknown> = Options & {
|
|
27
|
+
fields?: (keyof T)[];
|
|
28
|
+
};
|
|
28
29
|
export declare abstract class Service<ApiResponse = any> {
|
|
29
30
|
protected client: AxiosInstance;
|
|
30
31
|
private initialiseAxios;
|
|
31
32
|
private parseClientError;
|
|
32
33
|
private isLeaveRequest;
|
|
33
34
|
private buildQueryParams;
|
|
34
|
-
fetch<T = ApiResponse>(reqConfig: AxiosRequestConfig
|
|
35
|
+
fetch<T = ApiResponse>(reqConfig: AxiosRequestConfig): Promise<AxiosResponse<T>>;
|
|
36
|
+
fetch<T = ApiResponse>(reqConfig: AxiosRequestConfig, options: {
|
|
37
|
+
fields: Required<OptionsExtended<T>>['fields'];
|
|
38
|
+
} & OptionsExtended<T>): Promise<AxiosResponse<Pick<T, (typeof options)['fields'][number]>>>;
|
|
39
|
+
fetch<T extends unknown[] = ApiResponse[], E = T[number]>(reqConfig: AxiosRequestConfig, options: {
|
|
40
|
+
fields: Required<OptionsExtended<E>>['fields'];
|
|
41
|
+
} & OptionsExtended<E>): Promise<AxiosResponse<Pick<E, (typeof options)['fields'][number]>[]>>;
|
|
42
|
+
fetch<T extends unknown[] = ApiResponse[]>(reqConfig: AxiosRequestConfig, options?: Options): Promise<AxiosResponse<T>>;
|
|
43
|
+
fetch<T = ApiResponse>(reqConfig: AxiosRequestConfig, options?: Options): Promise<AxiosResponse<T | Partial<T>>>;
|
|
35
44
|
/** Iterates through every page for a potentially paginated request */
|
|
36
45
|
private fetchPages;
|
|
37
46
|
private listResponses;
|
|
@@ -50,7 +50,6 @@ export class Service {
|
|
|
50
50
|
}
|
|
51
51
|
buildQueryParams(options, extraParams) {
|
|
52
52
|
const queryParams = {
|
|
53
|
-
expand: options?.expand,
|
|
54
53
|
fields: options?.fields,
|
|
55
54
|
limit: options?.limit,
|
|
56
55
|
offset: options?.offset,
|
|
@@ -114,7 +113,6 @@ export class Service {
|
|
|
114
113
|
}
|
|
115
114
|
return this.client.request(finalReqConfig);
|
|
116
115
|
}
|
|
117
|
-
/** Iterates through every page for a potentially paginated request */
|
|
118
116
|
async *fetchPages(reqConfig, options) {
|
|
119
117
|
const fallbackLimit = 20;
|
|
120
118
|
const res = await this.fetch(reqConfig, options);
|
|
@@ -2,7 +2,7 @@ import { AxiosResponse } from 'axios';
|
|
|
2
2
|
import { Service, Options } from './index.js';
|
|
3
3
|
import { Settings } from '../interfaces/index.js';
|
|
4
4
|
import { SettingsQueryParams } from '../rotacloud.js';
|
|
5
|
-
export declare class SettingsService extends Service {
|
|
5
|
+
export declare class SettingsService extends Service<Settings> {
|
|
6
6
|
private apiPath;
|
|
7
7
|
get(query: SettingsQueryParams): Promise<Settings>;
|
|
8
8
|
get(query: SettingsQueryParams, options: {
|
|
@@ -7,6 +7,6 @@ export class SettingsService extends Service {
|
|
|
7
7
|
get(query, options) {
|
|
8
8
|
return super
|
|
9
9
|
.fetch({ url: `${this.apiPath}`, params: query }, options)
|
|
10
|
-
.then((res) =>
|
|
10
|
+
.then((res) => (options?.rawResponse ? res : res.data));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { Shift } from '../interfaces/index.js';
|
|
3
|
-
import { Service, Options, RequirementsOf } from './index.js';
|
|
3
|
+
import { Service, Options, RequirementsOf, OptionsExtended } from './index.js';
|
|
4
4
|
import { ShiftsQueryParams } from '../interfaces/query-params/shifts-query-params.interface.js';
|
|
5
5
|
type RequiredProps = 'end_time' | 'start_time' | 'location';
|
|
6
|
-
export declare class ShiftsService extends Service {
|
|
6
|
+
export declare class ShiftsService extends Service<Shift> {
|
|
7
7
|
private apiPath;
|
|
8
8
|
create(data: RequirementsOf<Shift, RequiredProps>): Promise<Shift>;
|
|
9
9
|
create(data: RequirementsOf<Shift, RequiredProps>, options: {
|
|
@@ -11,13 +11,32 @@ export declare class ShiftsService extends Service {
|
|
|
11
11
|
} & Options): Promise<AxiosResponse<Shift, any>>;
|
|
12
12
|
create(data: RequirementsOf<Shift, RequiredProps>, options: Options): Promise<Shift>;
|
|
13
13
|
get(id: number): Promise<Shift>;
|
|
14
|
+
get<F extends keyof Shift>(id: number, options: {
|
|
15
|
+
fields: F[];
|
|
16
|
+
rawResponse: true;
|
|
17
|
+
} & OptionsExtended<Shift>): Promise<AxiosResponse<Pick<Shift, F>>>;
|
|
18
|
+
get<F extends keyof Shift>(id: number, options: {
|
|
19
|
+
fields: F[];
|
|
20
|
+
} & OptionsExtended<Shift>): Promise<Pick<Shift, F>>;
|
|
14
21
|
get(id: number, options: {
|
|
15
22
|
rawResponse: true;
|
|
16
|
-
} & Options): Promise<AxiosResponse<Shift
|
|
17
|
-
get(id: number, options
|
|
18
|
-
list(query: ShiftsQueryParams
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
} & Options): Promise<AxiosResponse<Shift>>;
|
|
24
|
+
get(id: number, options?: OptionsExtended<Shift>): Promise<Shift>;
|
|
25
|
+
list(query: ShiftsQueryParams): AsyncGenerator<Shift>;
|
|
26
|
+
list<F extends keyof Shift>(query: ShiftsQueryParams, options: {
|
|
27
|
+
fields: F[];
|
|
28
|
+
} & OptionsExtended<Shift>): AsyncGenerator<Pick<Shift, F>>;
|
|
29
|
+
list(query: ShiftsQueryParams, options?: OptionsExtended<Shift>): AsyncGenerator<Shift>;
|
|
30
|
+
listAll(query: ShiftsQueryParams): Promise<Shift[]>;
|
|
31
|
+
listAll<F extends keyof Shift>(query: ShiftsQueryParams, options: {
|
|
32
|
+
fields: F[];
|
|
33
|
+
} & OptionsExtended<Shift>): Promise<Pick<Shift, F>[]>;
|
|
34
|
+
listAll(query: ShiftsQueryParams, options?: OptionsExtended<Shift>): Promise<Shift[]>;
|
|
35
|
+
listByPage(query: ShiftsQueryParams): AsyncGenerator<AxiosResponse<Shift[]>>;
|
|
36
|
+
listByPage<F extends keyof Shift>(query: ShiftsQueryParams, options: {
|
|
37
|
+
fields: F[];
|
|
38
|
+
} & OptionsExtended<Shift>): AsyncGenerator<AxiosResponse<Pick<Shift, F>[]>>;
|
|
39
|
+
listByPage(query: ShiftsQueryParams, options?: OptionsExtended<Shift>): AsyncGenerator<AxiosResponse<Shift[]>>;
|
|
21
40
|
update(shift: RequirementsOf<Shift, 'id'>): Promise<Shift>;
|
|
22
41
|
update(shift: RequirementsOf<Shift, 'id'>, options: {
|
|
23
42
|
rawResponse: true;
|
|
@@ -48,12 +67,12 @@ export declare class ShiftsService extends Service {
|
|
|
48
67
|
delete(ids: number | number[]): Promise<number>;
|
|
49
68
|
delete(ids: number | number[], options: {
|
|
50
69
|
rawResponse: true;
|
|
51
|
-
} & Options): Promise<AxiosResponse<
|
|
70
|
+
} & Options): Promise<AxiosResponse<void>>;
|
|
52
71
|
delete(ids: number | number[], options: Options): Promise<number>;
|
|
53
72
|
acknowledge(data: number[]): Promise<number>;
|
|
54
73
|
acknowledge(data: number[], options: {
|
|
55
74
|
rawResponse: true;
|
|
56
|
-
} & Options): Promise<AxiosResponse<any
|
|
75
|
+
} & Options): Promise<AxiosResponse<any>>;
|
|
57
76
|
acknowledge(data: number[], options: Options): Promise<number>;
|
|
58
77
|
publish(data: {
|
|
59
78
|
shifts: number[];
|
|
@@ -62,7 +81,7 @@ export declare class ShiftsService extends Service {
|
|
|
62
81
|
shifts: number[];
|
|
63
82
|
}, options: {
|
|
64
83
|
rawResponse: true;
|
|
65
|
-
} & Options): Promise<AxiosResponse<any
|
|
84
|
+
} & Options): Promise<AxiosResponse<any>>;
|
|
66
85
|
publish(data: {
|
|
67
86
|
shifts: number[];
|
|
68
87
|
}, options: Options): Promise<number>;
|
|
@@ -73,7 +92,7 @@ export declare class ShiftsService extends Service {
|
|
|
73
92
|
shifts: number[];
|
|
74
93
|
}, options: {
|
|
75
94
|
rawResponse: true;
|
|
76
|
-
} & Options): Promise<AxiosResponse<any
|
|
95
|
+
} & Options): Promise<AxiosResponse<any>>;
|
|
77
96
|
unpublish(data: {
|
|
78
97
|
shifts: number[];
|
|
79
98
|
}, options: Options): Promise<number>;
|