starta.apiclient 1.37.1680 → 1.37.1702
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.
|
@@ -10,6 +10,7 @@ import Dashboard from './dashboard';
|
|
|
10
10
|
import Public from './public';
|
|
11
11
|
import Integrations from './integrations';
|
|
12
12
|
import Schedules from './schedules';
|
|
13
|
+
import Worklogs from './worklogs';
|
|
13
14
|
export default class Organizations {
|
|
14
15
|
private _requestRunner;
|
|
15
16
|
constructor(requestRunner: StartaRequestRunner);
|
|
@@ -80,4 +81,5 @@ export default class Organizations {
|
|
|
80
81
|
get dashboard(): Dashboard;
|
|
81
82
|
get integrations(): Integrations;
|
|
82
83
|
get schedules(): Schedules;
|
|
84
|
+
get worklogs(): Worklogs;
|
|
83
85
|
}
|
|
@@ -11,6 +11,7 @@ var dashboard_1 = require("./dashboard");
|
|
|
11
11
|
var public_1 = require("./public");
|
|
12
12
|
var integrations_1 = require("./integrations");
|
|
13
13
|
var schedules_1 = require("./schedules");
|
|
14
|
+
var worklogs_1 = require("./worklogs");
|
|
14
15
|
var _helpers_1 = require("../_helpers");
|
|
15
16
|
var Organizations = /** @class */ (function () {
|
|
16
17
|
function Organizations(requestRunner) {
|
|
@@ -243,6 +244,13 @@ var Organizations = /** @class */ (function () {
|
|
|
243
244
|
enumerable: false,
|
|
244
245
|
configurable: true
|
|
245
246
|
});
|
|
247
|
+
Object.defineProperty(Organizations.prototype, "worklogs", {
|
|
248
|
+
get: function () {
|
|
249
|
+
return new worklogs_1.default(this._requestRunner);
|
|
250
|
+
},
|
|
251
|
+
enumerable: false,
|
|
252
|
+
configurable: true
|
|
253
|
+
});
|
|
246
254
|
return Organizations;
|
|
247
255
|
}());
|
|
248
256
|
exports.default = Organizations;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StartaRequestRunner } from '../../types';
|
|
2
|
+
export default class Worklogs {
|
|
3
|
+
private _requestRunner;
|
|
4
|
+
constructor(requestRunner: StartaRequestRunner);
|
|
5
|
+
add(organizationLogin: any, { memberLogin, worklogName, start, end, type }: {
|
|
6
|
+
memberLogin?: string;
|
|
7
|
+
worklogName?: string;
|
|
8
|
+
start: Date;
|
|
9
|
+
end: Date;
|
|
10
|
+
type: 'holiday' | 'vacation';
|
|
11
|
+
}): Promise<import("../../types").StartaResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var Worklogs = /** @class */ (function () {
|
|
4
|
+
function Worklogs(requestRunner) {
|
|
5
|
+
this._requestRunner = requestRunner;
|
|
6
|
+
}
|
|
7
|
+
Worklogs.prototype.add = function (organizationLogin, _a) {
|
|
8
|
+
var memberLogin = _a.memberLogin, worklogName = _a.worklogName, start = _a.start, end = _a.end, type = _a.type;
|
|
9
|
+
return this._requestRunner.performRequest({
|
|
10
|
+
url: "accounts/".concat(organizationLogin, "/worklogs"),
|
|
11
|
+
method: 'POST',
|
|
12
|
+
body: { memberLogin: memberLogin, worklogName: worklogName, start: start, end: end, type: type },
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
return Worklogs;
|
|
16
|
+
}());
|
|
17
|
+
exports.default = Worklogs;
|