rotacloud 1.0.24 → 1.0.25
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/query-params/daily-budgets-query-params.interface.d.ts +2 -2
- package/dist/cjs/models/daily-budgets.model.js +2 -0
- package/dist/cjs/rotacloud.d.ts +2 -1
- package/dist/cjs/rotacloud.js +1 -0
- package/dist/cjs/services/daily-budgets.service.d.ts +19 -0
- package/dist/cjs/services/daily-budgets.service.js +99 -0
- package/dist/cjs/services/index.d.ts +1 -0
- package/dist/cjs/services/index.js +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/query-params/daily-budgets-query-params.interface.d.ts +2 -2
- package/dist/mjs/models/daily-budgets.model.js +2 -0
- package/dist/mjs/rotacloud.d.ts +2 -1
- package/dist/mjs/rotacloud.js +2 -1
- package/dist/mjs/services/daily-budgets.service.d.ts +19 -0
- package/dist/mjs/services/daily-budgets.service.js +39 -0
- package/dist/mjs/services/index.d.ts +1 -0
- package/dist/mjs/services/index.js +1 -0
- package/dist/mjs/version.js +1 -1
- package/package.json +1 -1
- package/src/interfaces/query-params/daily-budgets-query-params.interface.ts +2 -2
- package/src/models/daily-budgets.model.ts +2 -0
- package/src/rotacloud.ts +2 -0
- package/src/services/daily-budgets.service.ts +57 -0
- package/src/services/index.ts +1 -0
- package/src/version.ts +1 -1
|
@@ -5,6 +5,8 @@ class DailyBudgets {
|
|
|
5
5
|
constructor(dailyBudgets) {
|
|
6
6
|
this.date = dailyBudgets.date;
|
|
7
7
|
this.location = dailyBudgets.location;
|
|
8
|
+
this.hours_budget = dailyBudgets.hours_budget;
|
|
9
|
+
this.salary_budget = dailyBudgets.salary_budget;
|
|
8
10
|
}
|
|
9
11
|
}
|
|
10
12
|
exports.DailyBudgets = DailyBudgets;
|
package/dist/cjs/rotacloud.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountsService, AttendanceService, AvailabilityService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, ShiftsService, UsersService } from './services/index.js';
|
|
1
|
+
import { AccountsService, AttendanceService, AvailabilityService, DailyBudgetsService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, ShiftsService, UsersService } from './services/index.js';
|
|
2
2
|
import { SDKConfig } from './interfaces/index.js';
|
|
3
3
|
export declare class RotaCloud {
|
|
4
4
|
static config: SDKConfig;
|
|
@@ -6,6 +6,7 @@ export declare class RotaCloud {
|
|
|
6
6
|
accounts: AccountsService;
|
|
7
7
|
attendance: AttendanceService;
|
|
8
8
|
availability: AvailabilityService;
|
|
9
|
+
dailyBudgets: DailyBudgetsService;
|
|
9
10
|
daysOff: DaysOffService;
|
|
10
11
|
group: GroupsService;
|
|
11
12
|
leaveEmbargoes: LeaveEmbargoesService;
|
package/dist/cjs/rotacloud.js
CHANGED
|
@@ -18,6 +18,7 @@ class RotaCloud {
|
|
|
18
18
|
this.accounts = new index_js_1.AccountsService();
|
|
19
19
|
this.attendance = new index_js_1.AttendanceService();
|
|
20
20
|
this.availability = new index_js_1.AvailabilityService();
|
|
21
|
+
this.dailyBudgets = new index_js_1.DailyBudgetsService();
|
|
21
22
|
this.daysOff = new index_js_1.DaysOffService();
|
|
22
23
|
this.group = new index_js_1.GroupsService();
|
|
23
24
|
this.leaveEmbargoes = new index_js_1.LeaveEmbargoesService();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { ApiDailyBudgets } from '../interfaces/daily-budgets.interface.js';
|
|
3
|
+
import { Service, Options } from './index.js';
|
|
4
|
+
import { DailyBudgets } from '../models/daily-budgets.model.js';
|
|
5
|
+
import { DailyBudgetsQueryParams } from '../interfaces/query-params/daily-budgets-query-params.interface.js';
|
|
6
|
+
import { InternalQueryParams } from '../interfaces/query-params/internal-query-params.interface.js';
|
|
7
|
+
declare class DailyBudgetsService extends Service {
|
|
8
|
+
private apiPath;
|
|
9
|
+
list(options?: Options<DailyBudgetsQueryParams & InternalQueryParams>): AsyncGenerator<DailyBudgets, void, unknown>;
|
|
10
|
+
listAll(): Promise<DailyBudgets[]>;
|
|
11
|
+
listByPage(options?: Options<DailyBudgetsQueryParams & InternalQueryParams>): AsyncGenerator<AxiosResponse<ApiDailyBudgets[], any>, any, unknown>;
|
|
12
|
+
update(id: number, data: Partial<ApiDailyBudgets>): Promise<DailyBudgets>;
|
|
13
|
+
update(id: number, data: Partial<ApiDailyBudgets>, options: {
|
|
14
|
+
rawResponse: true;
|
|
15
|
+
params?: InternalQueryParams;
|
|
16
|
+
}): Promise<AxiosResponse<ApiDailyBudgets, any>>;
|
|
17
|
+
update(id: number, data: Partial<ApiDailyBudgets>, options: Options<InternalQueryParams>): Promise<ApiDailyBudgets>;
|
|
18
|
+
}
|
|
19
|
+
export { DailyBudgetsService };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
19
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
20
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
21
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
22
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
23
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
24
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
25
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
26
|
+
function fulfill(value) { resume("next", value); }
|
|
27
|
+
function reject(value) { resume("throw", value); }
|
|
28
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.DailyBudgetsService = void 0;
|
|
32
|
+
const index_js_1 = require("./index.js");
|
|
33
|
+
const daily_budgets_model_js_1 = require("../models/daily-budgets.model.js");
|
|
34
|
+
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
35
|
+
class DailyBudgetsService extends index_js_1.Service {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this.apiPath = '/daily_budgets';
|
|
39
|
+
}
|
|
40
|
+
list(options) {
|
|
41
|
+
const _super = Object.create(null, {
|
|
42
|
+
iterator: { get: () => super.iterator }
|
|
43
|
+
});
|
|
44
|
+
return __asyncGenerator(this, arguments, function* list_1() {
|
|
45
|
+
var e_1, _a;
|
|
46
|
+
try {
|
|
47
|
+
for (var _b = __asyncValues(_super.iterator.call(this, { url: this.apiPath }, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
48
|
+
const res = _c.value;
|
|
49
|
+
yield yield __await(new daily_budgets_model_js_1.DailyBudgets(res));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
53
|
+
finally {
|
|
54
|
+
try {
|
|
55
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
56
|
+
}
|
|
57
|
+
finally { if (e_1) throw e_1.error; }
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
listAll() {
|
|
62
|
+
var e_2, _a;
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
try {
|
|
65
|
+
const attendance = [];
|
|
66
|
+
try {
|
|
67
|
+
for (var _b = __asyncValues(this.list()), _c; _c = yield _b.next(), !_c.done;) {
|
|
68
|
+
const atten = _c.value;
|
|
69
|
+
attendance.push(atten);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
73
|
+
finally {
|
|
74
|
+
try {
|
|
75
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
76
|
+
}
|
|
77
|
+
finally { if (e_2) throw e_2.error; }
|
|
78
|
+
}
|
|
79
|
+
return attendance;
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
return err;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
listByPage(options) {
|
|
87
|
+
return super.iterator({ url: this.apiPath }, options).byPage();
|
|
88
|
+
}
|
|
89
|
+
update(id, data, options) {
|
|
90
|
+
return super
|
|
91
|
+
.fetch({
|
|
92
|
+
url: `${this.apiPath}/${id}`,
|
|
93
|
+
data,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
})
|
|
96
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new daily_budgets_model_js_1.DailyBudgets(res.data)), (err) => Promise.reject((options === null || options === void 0 ? void 0 : options.rawResponse) ? err : new error_response_model_js_1.ErrorResponse(err)));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.DailyBudgetsService = DailyBudgetsService;
|
|
@@ -2,6 +2,7 @@ export * from './service.js';
|
|
|
2
2
|
export * from './accounts.service.js';
|
|
3
3
|
export * from './attendance.service.js';
|
|
4
4
|
export * from './availability.service.js';
|
|
5
|
+
export * from './daily-budgets.service.js';
|
|
5
6
|
export * from './days-off.service.js';
|
|
6
7
|
export * from './groups.service.js';
|
|
7
8
|
export * from './leave-request.service.js';
|
|
@@ -14,6 +14,7 @@ __exportStar(require("./service.js"), exports);
|
|
|
14
14
|
__exportStar(require("./accounts.service.js"), exports);
|
|
15
15
|
__exportStar(require("./attendance.service.js"), exports);
|
|
16
16
|
__exportStar(require("./availability.service.js"), exports);
|
|
17
|
+
__exportStar(require("./daily-budgets.service.js"), exports);
|
|
17
18
|
__exportStar(require("./days-off.service.js"), exports);
|
|
18
19
|
__exportStar(require("./groups.service.js"), exports);
|
|
19
20
|
__exportStar(require("./leave-request.service.js"), exports);
|
package/dist/cjs/version.js
CHANGED
package/dist/mjs/rotacloud.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountsService, AttendanceService, AvailabilityService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, ShiftsService, UsersService } from './services/index.js';
|
|
1
|
+
import { AccountsService, AttendanceService, AvailabilityService, DailyBudgetsService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, ShiftsService, UsersService } from './services/index.js';
|
|
2
2
|
import { SDKConfig } from './interfaces/index.js';
|
|
3
3
|
export declare class RotaCloud {
|
|
4
4
|
static config: SDKConfig;
|
|
@@ -6,6 +6,7 @@ export declare class RotaCloud {
|
|
|
6
6
|
accounts: AccountsService;
|
|
7
7
|
attendance: AttendanceService;
|
|
8
8
|
availability: AvailabilityService;
|
|
9
|
+
dailyBudgets: DailyBudgetsService;
|
|
9
10
|
daysOff: DaysOffService;
|
|
10
11
|
group: GroupsService;
|
|
11
12
|
leaveEmbargoes: LeaveEmbargoesService;
|
package/dist/mjs/rotacloud.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AccountsService, AttendanceService, AvailabilityService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, ShiftsService, UsersService, } from './services/index.js';
|
|
1
|
+
import { AccountsService, AttendanceService, AvailabilityService, DailyBudgetsService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, ShiftsService, UsersService, } from './services/index.js';
|
|
2
2
|
export class RotaCloud {
|
|
3
3
|
constructor(config) {
|
|
4
4
|
this.defaultAPIURI = 'https://api.rotacloud.com/v1';
|
|
5
5
|
this.accounts = new AccountsService();
|
|
6
6
|
this.attendance = new AttendanceService();
|
|
7
7
|
this.availability = new AvailabilityService();
|
|
8
|
+
this.dailyBudgets = new DailyBudgetsService();
|
|
8
9
|
this.daysOff = new DaysOffService();
|
|
9
10
|
this.group = new GroupsService();
|
|
10
11
|
this.leaveEmbargoes = new LeaveEmbargoesService();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { ApiDailyBudgets } from '../interfaces/daily-budgets.interface.js';
|
|
3
|
+
import { Service, Options } from './index.js';
|
|
4
|
+
import { DailyBudgets } from '../models/daily-budgets.model.js';
|
|
5
|
+
import { DailyBudgetsQueryParams } from '../interfaces/query-params/daily-budgets-query-params.interface.js';
|
|
6
|
+
import { InternalQueryParams } from '../interfaces/query-params/internal-query-params.interface.js';
|
|
7
|
+
declare class DailyBudgetsService extends Service {
|
|
8
|
+
private apiPath;
|
|
9
|
+
list(options?: Options<DailyBudgetsQueryParams & InternalQueryParams>): AsyncGenerator<DailyBudgets, void, unknown>;
|
|
10
|
+
listAll(): Promise<DailyBudgets[]>;
|
|
11
|
+
listByPage(options?: Options<DailyBudgetsQueryParams & InternalQueryParams>): AsyncGenerator<AxiosResponse<ApiDailyBudgets[], any>, any, unknown>;
|
|
12
|
+
update(id: number, data: Partial<ApiDailyBudgets>): Promise<DailyBudgets>;
|
|
13
|
+
update(id: number, data: Partial<ApiDailyBudgets>, options: {
|
|
14
|
+
rawResponse: true;
|
|
15
|
+
params?: InternalQueryParams;
|
|
16
|
+
}): Promise<AxiosResponse<ApiDailyBudgets, any>>;
|
|
17
|
+
update(id: number, data: Partial<ApiDailyBudgets>, options: Options<InternalQueryParams>): Promise<ApiDailyBudgets>;
|
|
18
|
+
}
|
|
19
|
+
export { DailyBudgetsService };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Service } from './index.js';
|
|
2
|
+
import { DailyBudgets } from '../models/daily-budgets.model.js';
|
|
3
|
+
import { ErrorResponse } from '../models/error-response.model.js';
|
|
4
|
+
class DailyBudgetsService extends Service {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.apiPath = '/daily_budgets';
|
|
8
|
+
}
|
|
9
|
+
async *list(options) {
|
|
10
|
+
for await (const res of super.iterator({ url: this.apiPath }, options)) {
|
|
11
|
+
yield new DailyBudgets(res);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
async listAll() {
|
|
15
|
+
try {
|
|
16
|
+
const attendance = [];
|
|
17
|
+
for await (const atten of this.list()) {
|
|
18
|
+
attendance.push(atten);
|
|
19
|
+
}
|
|
20
|
+
return attendance;
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
return err;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
listByPage(options) {
|
|
27
|
+
return super.iterator({ url: this.apiPath }, options).byPage();
|
|
28
|
+
}
|
|
29
|
+
update(id, data, options) {
|
|
30
|
+
return super
|
|
31
|
+
.fetch({
|
|
32
|
+
url: `${this.apiPath}/${id}`,
|
|
33
|
+
data,
|
|
34
|
+
method: 'POST',
|
|
35
|
+
})
|
|
36
|
+
.then((res) => Promise.resolve(options?.rawResponse ? res : new DailyBudgets(res.data)), (err) => Promise.reject(options?.rawResponse ? err : new ErrorResponse(err)));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export { DailyBudgetsService };
|
|
@@ -2,6 +2,7 @@ export * from './service.js';
|
|
|
2
2
|
export * from './accounts.service.js';
|
|
3
3
|
export * from './attendance.service.js';
|
|
4
4
|
export * from './availability.service.js';
|
|
5
|
+
export * from './daily-budgets.service.js';
|
|
5
6
|
export * from './days-off.service.js';
|
|
6
7
|
export * from './groups.service.js';
|
|
7
8
|
export * from './leave-request.service.js';
|
|
@@ -2,6 +2,7 @@ export * from './service.js';
|
|
|
2
2
|
export * from './accounts.service.js';
|
|
3
3
|
export * from './attendance.service.js';
|
|
4
4
|
export * from './availability.service.js';
|
|
5
|
+
export * from './daily-budgets.service.js';
|
|
5
6
|
export * from './days-off.service.js';
|
|
6
7
|
export * from './groups.service.js';
|
|
7
8
|
export * from './leave-request.service.js';
|
package/dist/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.25' };
|
package/package.json
CHANGED
package/src/rotacloud.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
AccountsService,
|
|
3
3
|
AttendanceService,
|
|
4
4
|
AvailabilityService,
|
|
5
|
+
DailyBudgetsService,
|
|
5
6
|
DaysOffService,
|
|
6
7
|
GroupsService,
|
|
7
8
|
LeaveEmbargoesService,
|
|
@@ -21,6 +22,7 @@ export class RotaCloud {
|
|
|
21
22
|
public accounts = new AccountsService();
|
|
22
23
|
public attendance = new AttendanceService();
|
|
23
24
|
public availability = new AvailabilityService();
|
|
25
|
+
public dailyBudgets = new DailyBudgetsService();
|
|
24
26
|
public daysOff = new DaysOffService();
|
|
25
27
|
public group = new GroupsService();
|
|
26
28
|
public leaveEmbargoes = new LeaveEmbargoesService();
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { ApiDailyBudgets } from '../interfaces/daily-budgets.interface.js';
|
|
3
|
+
import { Service, Options } from './index.js';
|
|
4
|
+
|
|
5
|
+
import { DailyBudgets } from '../models/daily-budgets.model.js';
|
|
6
|
+
import { ErrorResponse } from '../models/error-response.model.js';
|
|
7
|
+
import { DailyBudgetsQueryParams } from '../interfaces/query-params/daily-budgets-query-params.interface.js';
|
|
8
|
+
import { InternalQueryParams } from '../interfaces/query-params/internal-query-params.interface.js';
|
|
9
|
+
|
|
10
|
+
class DailyBudgetsService extends Service {
|
|
11
|
+
private apiPath = '/daily_budgets';
|
|
12
|
+
|
|
13
|
+
async *list(options?: Options<DailyBudgetsQueryParams & InternalQueryParams>) {
|
|
14
|
+
for await (const res of super.iterator<ApiDailyBudgets>({ url: this.apiPath }, options)) {
|
|
15
|
+
yield new DailyBudgets(res);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
listAll(): Promise<DailyBudgets[]>;
|
|
20
|
+
async listAll() {
|
|
21
|
+
try {
|
|
22
|
+
const attendance = [] as DailyBudgets[];
|
|
23
|
+
for await (const atten of this.list()) {
|
|
24
|
+
attendance.push(atten);
|
|
25
|
+
}
|
|
26
|
+
return attendance;
|
|
27
|
+
} catch (err) {
|
|
28
|
+
return err;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
listByPage(options?: Options<DailyBudgetsQueryParams & InternalQueryParams>) {
|
|
33
|
+
return super.iterator<ApiDailyBudgets>({ url: this.apiPath }, options).byPage();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
update(id: number, data: Partial<ApiDailyBudgets>): Promise<DailyBudgets>;
|
|
37
|
+
update(
|
|
38
|
+
id: number,
|
|
39
|
+
data: Partial<ApiDailyBudgets>,
|
|
40
|
+
options: { rawResponse: true; params?: InternalQueryParams }
|
|
41
|
+
): Promise<AxiosResponse<ApiDailyBudgets, any>>;
|
|
42
|
+
update(id: number, data: Partial<ApiDailyBudgets>, options: Options<InternalQueryParams>): Promise<ApiDailyBudgets>;
|
|
43
|
+
update(id: number, data: Partial<ApiDailyBudgets>, options?: Options<InternalQueryParams>) {
|
|
44
|
+
return super
|
|
45
|
+
.fetch<ApiDailyBudgets>({
|
|
46
|
+
url: `${this.apiPath}/${id}`,
|
|
47
|
+
data,
|
|
48
|
+
method: 'POST',
|
|
49
|
+
})
|
|
50
|
+
.then(
|
|
51
|
+
(res) => Promise.resolve(options?.rawResponse ? res : new DailyBudgets(res.data)),
|
|
52
|
+
(err) => Promise.reject(options?.rawResponse ? err : new ErrorResponse(err))
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { DailyBudgetsService };
|
package/src/services/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './service.js';
|
|
|
2
2
|
export * from './accounts.service.js';
|
|
3
3
|
export * from './attendance.service.js';
|
|
4
4
|
export * from './availability.service.js';
|
|
5
|
+
export * from './daily-budgets.service.js';
|
|
5
6
|
export * from './days-off.service.js';
|
|
6
7
|
export * from './groups.service.js';
|
|
7
8
|
export * from './leave-request.service.js';
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.25' };
|