@unified-api/typescript-sdk 1.0.10 → 1.0.11
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/sdk/hris.d.ts +16 -0
- package/dist/sdk/hris.js +252 -0
- package/dist/sdk/models/operations/gethrispayslip.d.ts +35 -0
- package/dist/sdk/models/operations/gethrispayslip.js +99 -0
- package/dist/sdk/models/operations/gethristimeoff.d.ts +35 -0
- package/dist/sdk/models/operations/gethristimeoff.js +99 -0
- package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +4 -0
- package/dist/sdk/models/operations/getunifiedintegrationauth.js +4 -0
- package/dist/sdk/models/operations/index.d.ts +4 -0
- package/dist/sdk/models/operations/index.js +4 -0
- package/dist/sdk/models/operations/listhrispayslips.d.ts +47 -0
- package/dist/sdk/models/operations/listhrispayslips.js +123 -0
- package/dist/sdk/models/operations/listhristimeoffs.d.ts +47 -0
- package/dist/sdk/models/operations/listhristimeoffs.js +123 -0
- package/dist/sdk/models/shared/hrispayslip.d.ts +22 -0
- package/dist/sdk/models/shared/hrispayslip.js +133 -0
- package/dist/sdk/models/shared/hrispayslipdetail.d.ts +28 -0
- package/dist/sdk/models/shared/hrispayslipdetail.js +90 -0
- package/dist/sdk/models/shared/hristimeoff.d.ts +24 -0
- package/dist/sdk/models/shared/hristimeoff.js +131 -0
- package/dist/sdk/models/shared/index.d.ts +3 -0
- package/dist/sdk/models/shared/index.js +3 -0
- package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +4 -0
- package/dist/sdk/models/shared/propertyconnectionpermissions.js +4 -0
- package/dist/sdk/models/shared/webhook.d.ts +2 -0
- package/dist/sdk/models/shared/webhook.js +2 -0
- package/dist/sdk/payslip.d.ts +15 -0
- package/dist/sdk/payslip.js +213 -0
- package/dist/sdk/sdk.d.ts +4 -0
- package/dist/sdk/sdk.js +7 -3
- package/dist/sdk/timeoff.d.ts +15 -0
- package/dist/sdk/timeoff.js +213 -0
- package/docs/sdk/models/operations/gethrispaysliprequest.md +10 -0
- package/docs/sdk/models/operations/gethrispayslipresponse.md +11 -0
- package/docs/sdk/models/operations/gethristimeoffrequest.md +10 -0
- package/docs/sdk/models/operations/gethristimeoffresponse.md +11 -0
- package/docs/sdk/models/operations/listhrispayslipsrequest.md +16 -0
- package/docs/sdk/models/operations/listhrispayslipsresponse.md +11 -0
- package/docs/sdk/models/operations/listhristimeoffsrequest.md +16 -0
- package/docs/sdk/models/operations/listhristimeoffsresponse.md +11 -0
- package/docs/sdk/models/operations/scopes.md +4 -0
- package/docs/sdk/models/shared/hrispayslip.md +20 -0
- package/docs/sdk/models/shared/hrispayslipdetail.md +13 -0
- package/docs/sdk/models/shared/hrispayslipdetailtype.md +24 -0
- package/docs/sdk/models/shared/hristimeoff.md +19 -0
- package/docs/sdk/models/shared/hristimeoffstatus.md +10 -0
- package/docs/sdk/models/shared/hristimeofftype.md +9 -0
- package/docs/sdk/models/shared/objecttype.md +2 -0
- package/docs/sdk/models/shared/paymenttype.md +10 -0
- package/docs/sdk/models/shared/propertyconnectionpermissions.md +4 -0
- package/package.json +1 -1
package/dist/sdk/hris.d.ts
CHANGED
|
@@ -20,6 +20,14 @@ export declare class Hris {
|
|
|
20
20
|
* Retrieve a group
|
|
21
21
|
*/
|
|
22
22
|
getHrisGroup(req: operations.GetHrisGroupRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisGroupResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve a payslip
|
|
25
|
+
*/
|
|
26
|
+
getHrisPayslip(req: operations.GetHrisPayslipRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisPayslipResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a timeoff
|
|
29
|
+
*/
|
|
30
|
+
getHrisTimeoff(req: operations.GetHrisTimeoffRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisTimeoffResponse>;
|
|
23
31
|
/**
|
|
24
32
|
* List all employees
|
|
25
33
|
*/
|
|
@@ -28,6 +36,14 @@ export declare class Hris {
|
|
|
28
36
|
* List all groups
|
|
29
37
|
*/
|
|
30
38
|
listHrisGroups(req: operations.ListHrisGroupsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisGroupsResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* List all payslip
|
|
41
|
+
*/
|
|
42
|
+
listHrisPayslips(req: operations.ListHrisPayslipsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisPayslipsResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* List all timeoffs
|
|
45
|
+
*/
|
|
46
|
+
listHrisTimeoffs(req: operations.ListHrisTimeoffsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisTimeoffsResponse>;
|
|
31
47
|
/**
|
|
32
48
|
* Update an employee
|
|
33
49
|
*/
|
package/dist/sdk/hris.js
CHANGED
|
@@ -364,6 +364,130 @@ var Hris = /** @class */ (function () {
|
|
|
364
364
|
});
|
|
365
365
|
});
|
|
366
366
|
};
|
|
367
|
+
/**
|
|
368
|
+
* Retrieve a payslip
|
|
369
|
+
*/
|
|
370
|
+
Hris.prototype.getHrisPayslip = function (req, config) {
|
|
371
|
+
var _a, _b;
|
|
372
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
373
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
374
|
+
return __generator(this, function (_c) {
|
|
375
|
+
switch (_c.label) {
|
|
376
|
+
case 0:
|
|
377
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
378
|
+
req = new operations.GetHrisPayslipRequest(req);
|
|
379
|
+
}
|
|
380
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
381
|
+
operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/payslip/{id}", req);
|
|
382
|
+
client = this.sdkConfiguration.defaultClient;
|
|
383
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
384
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
385
|
+
return [4 /*yield*/, globalSecurity()];
|
|
386
|
+
case 1:
|
|
387
|
+
globalSecurity = _c.sent();
|
|
388
|
+
_c.label = 2;
|
|
389
|
+
case 2:
|
|
390
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
391
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
392
|
+
}
|
|
393
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
394
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
395
|
+
queryParams = utils.serializeQueryParams(req);
|
|
396
|
+
headers["Accept"] = "application/json";
|
|
397
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
398
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
399
|
+
case 3:
|
|
400
|
+
httpRes = _c.sent();
|
|
401
|
+
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
402
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
403
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
404
|
+
}
|
|
405
|
+
res = new operations.GetHrisPayslipResponse({
|
|
406
|
+
statusCode: httpRes.status,
|
|
407
|
+
contentType: responseContentType,
|
|
408
|
+
rawResponse: httpRes,
|
|
409
|
+
});
|
|
410
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
411
|
+
switch (true) {
|
|
412
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
413
|
+
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
414
|
+
res.hrisPayslip = utils.objectToClass(JSON.parse(decodedRes), shared.HrisPayslip);
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
418
|
+
}
|
|
419
|
+
break;
|
|
420
|
+
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
421
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
422
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
423
|
+
}
|
|
424
|
+
return [2 /*return*/, res];
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Retrieve a timeoff
|
|
431
|
+
*/
|
|
432
|
+
Hris.prototype.getHrisTimeoff = function (req, config) {
|
|
433
|
+
var _a, _b;
|
|
434
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
435
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
436
|
+
return __generator(this, function (_c) {
|
|
437
|
+
switch (_c.label) {
|
|
438
|
+
case 0:
|
|
439
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
440
|
+
req = new operations.GetHrisTimeoffRequest(req);
|
|
441
|
+
}
|
|
442
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
443
|
+
operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/timeoff/{id}", req);
|
|
444
|
+
client = this.sdkConfiguration.defaultClient;
|
|
445
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
446
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
447
|
+
return [4 /*yield*/, globalSecurity()];
|
|
448
|
+
case 1:
|
|
449
|
+
globalSecurity = _c.sent();
|
|
450
|
+
_c.label = 2;
|
|
451
|
+
case 2:
|
|
452
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
453
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
454
|
+
}
|
|
455
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
456
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
457
|
+
queryParams = utils.serializeQueryParams(req);
|
|
458
|
+
headers["Accept"] = "application/json";
|
|
459
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
460
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
461
|
+
case 3:
|
|
462
|
+
httpRes = _c.sent();
|
|
463
|
+
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
464
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
465
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
466
|
+
}
|
|
467
|
+
res = new operations.GetHrisTimeoffResponse({
|
|
468
|
+
statusCode: httpRes.status,
|
|
469
|
+
contentType: responseContentType,
|
|
470
|
+
rawResponse: httpRes,
|
|
471
|
+
});
|
|
472
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
473
|
+
switch (true) {
|
|
474
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
475
|
+
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
476
|
+
res.hrisTimeoff = utils.objectToClass(JSON.parse(decodedRes), shared.HrisTimeoff);
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
480
|
+
}
|
|
481
|
+
break;
|
|
482
|
+
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
483
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
484
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
485
|
+
}
|
|
486
|
+
return [2 /*return*/, res];
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
};
|
|
367
491
|
/**
|
|
368
492
|
* List all employees
|
|
369
493
|
*/
|
|
@@ -492,6 +616,134 @@ var Hris = /** @class */ (function () {
|
|
|
492
616
|
});
|
|
493
617
|
});
|
|
494
618
|
};
|
|
619
|
+
/**
|
|
620
|
+
* List all payslip
|
|
621
|
+
*/
|
|
622
|
+
Hris.prototype.listHrisPayslips = function (req, config) {
|
|
623
|
+
var _a, _b;
|
|
624
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
625
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
626
|
+
return __generator(this, function (_c) {
|
|
627
|
+
switch (_c.label) {
|
|
628
|
+
case 0:
|
|
629
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
630
|
+
req = new operations.ListHrisPayslipsRequest(req);
|
|
631
|
+
}
|
|
632
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
633
|
+
operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/payslip", req);
|
|
634
|
+
client = this.sdkConfiguration.defaultClient;
|
|
635
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
636
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
637
|
+
return [4 /*yield*/, globalSecurity()];
|
|
638
|
+
case 1:
|
|
639
|
+
globalSecurity = _c.sent();
|
|
640
|
+
_c.label = 2;
|
|
641
|
+
case 2:
|
|
642
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
643
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
644
|
+
}
|
|
645
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
646
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
647
|
+
queryParams = utils.serializeQueryParams(req);
|
|
648
|
+
headers["Accept"] = "application/json";
|
|
649
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
650
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
651
|
+
case 3:
|
|
652
|
+
httpRes = _c.sent();
|
|
653
|
+
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
654
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
655
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
656
|
+
}
|
|
657
|
+
res = new operations.ListHrisPayslipsResponse({
|
|
658
|
+
statusCode: httpRes.status,
|
|
659
|
+
contentType: responseContentType,
|
|
660
|
+
rawResponse: httpRes,
|
|
661
|
+
});
|
|
662
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
663
|
+
switch (true) {
|
|
664
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
665
|
+
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
666
|
+
res.hrisPayslips = [];
|
|
667
|
+
resFieldDepth = utils.getResFieldDepth(res);
|
|
668
|
+
res.hrisPayslips = utils.objectToClass(JSON.parse(decodedRes), shared.HrisPayslip, resFieldDepth);
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
672
|
+
}
|
|
673
|
+
break;
|
|
674
|
+
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
675
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
676
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
677
|
+
}
|
|
678
|
+
return [2 /*return*/, res];
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
});
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* List all timeoffs
|
|
685
|
+
*/
|
|
686
|
+
Hris.prototype.listHrisTimeoffs = function (req, config) {
|
|
687
|
+
var _a, _b;
|
|
688
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
689
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
690
|
+
return __generator(this, function (_c) {
|
|
691
|
+
switch (_c.label) {
|
|
692
|
+
case 0:
|
|
693
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
694
|
+
req = new operations.ListHrisTimeoffsRequest(req);
|
|
695
|
+
}
|
|
696
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
697
|
+
operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/timeoff", req);
|
|
698
|
+
client = this.sdkConfiguration.defaultClient;
|
|
699
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
700
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
701
|
+
return [4 /*yield*/, globalSecurity()];
|
|
702
|
+
case 1:
|
|
703
|
+
globalSecurity = _c.sent();
|
|
704
|
+
_c.label = 2;
|
|
705
|
+
case 2:
|
|
706
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
707
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
708
|
+
}
|
|
709
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
710
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
711
|
+
queryParams = utils.serializeQueryParams(req);
|
|
712
|
+
headers["Accept"] = "application/json";
|
|
713
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
714
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
715
|
+
case 3:
|
|
716
|
+
httpRes = _c.sent();
|
|
717
|
+
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
718
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
719
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
720
|
+
}
|
|
721
|
+
res = new operations.ListHrisTimeoffsResponse({
|
|
722
|
+
statusCode: httpRes.status,
|
|
723
|
+
contentType: responseContentType,
|
|
724
|
+
rawResponse: httpRes,
|
|
725
|
+
});
|
|
726
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
727
|
+
switch (true) {
|
|
728
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
729
|
+
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
730
|
+
res.hrisTimeoffs = [];
|
|
731
|
+
resFieldDepth = utils.getResFieldDepth(res);
|
|
732
|
+
res.hrisTimeoffs = utils.objectToClass(JSON.parse(decodedRes), shared.HrisTimeoff, resFieldDepth);
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
736
|
+
}
|
|
737
|
+
break;
|
|
738
|
+
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
739
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
740
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
741
|
+
}
|
|
742
|
+
return [2 /*return*/, res];
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
});
|
|
746
|
+
};
|
|
495
747
|
/**
|
|
496
748
|
* Update an employee
|
|
497
749
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../../../sdk/models/shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class GetHrisPayslipRequest extends SpeakeasyBase {
|
|
5
|
+
/**
|
|
6
|
+
* ID of the connection
|
|
7
|
+
*/
|
|
8
|
+
connectionId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Comma-delimited fields to return
|
|
11
|
+
*/
|
|
12
|
+
fields?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* ID of the Payslip
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class GetHrisPayslipResponse extends SpeakeasyBase {
|
|
19
|
+
/**
|
|
20
|
+
* HTTP response content type for this operation
|
|
21
|
+
*/
|
|
22
|
+
contentType: string;
|
|
23
|
+
/**
|
|
24
|
+
* Successful
|
|
25
|
+
*/
|
|
26
|
+
hrisPayslip?: shared.HrisPayslip;
|
|
27
|
+
/**
|
|
28
|
+
* HTTP response status code for this operation
|
|
29
|
+
*/
|
|
30
|
+
statusCode: number;
|
|
31
|
+
/**
|
|
32
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
33
|
+
*/
|
|
34
|
+
rawResponse: AxiosResponse;
|
|
35
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
37
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
40
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
|
+
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
50
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.GetHrisPayslipResponse = exports.GetHrisPayslipRequest = void 0;
|
|
54
|
+
var utils_1 = require("../../../internal/utils");
|
|
55
|
+
var shared = __importStar(require("../../../sdk/models/shared"));
|
|
56
|
+
var GetHrisPayslipRequest = /** @class */ (function (_super) {
|
|
57
|
+
__extends(GetHrisPayslipRequest, _super);
|
|
58
|
+
function GetHrisPayslipRequest() {
|
|
59
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
+
}
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=connection_id" }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], GetHrisPayslipRequest.prototype, "connectionId", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=fields" }),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], GetHrisPayslipRequest.prototype, "fields", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=id" }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], GetHrisPayslipRequest.prototype, "id", void 0);
|
|
73
|
+
return GetHrisPayslipRequest;
|
|
74
|
+
}(utils_1.SpeakeasyBase));
|
|
75
|
+
exports.GetHrisPayslipRequest = GetHrisPayslipRequest;
|
|
76
|
+
var GetHrisPayslipResponse = /** @class */ (function (_super) {
|
|
77
|
+
__extends(GetHrisPayslipResponse, _super);
|
|
78
|
+
function GetHrisPayslipResponse() {
|
|
79
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
80
|
+
}
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], GetHrisPayslipResponse.prototype, "contentType", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
87
|
+
__metadata("design:type", shared.HrisPayslip)
|
|
88
|
+
], GetHrisPayslipResponse.prototype, "hrisPayslip", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], GetHrisPayslipResponse.prototype, "statusCode", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], GetHrisPayslipResponse.prototype, "rawResponse", void 0);
|
|
97
|
+
return GetHrisPayslipResponse;
|
|
98
|
+
}(utils_1.SpeakeasyBase));
|
|
99
|
+
exports.GetHrisPayslipResponse = GetHrisPayslipResponse;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../../../sdk/models/shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class GetHrisTimeoffRequest extends SpeakeasyBase {
|
|
5
|
+
/**
|
|
6
|
+
* ID of the connection
|
|
7
|
+
*/
|
|
8
|
+
connectionId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Comma-delimited fields to return
|
|
11
|
+
*/
|
|
12
|
+
fields?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* ID of the Timeoff
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class GetHrisTimeoffResponse extends SpeakeasyBase {
|
|
19
|
+
/**
|
|
20
|
+
* HTTP response content type for this operation
|
|
21
|
+
*/
|
|
22
|
+
contentType: string;
|
|
23
|
+
/**
|
|
24
|
+
* Successful
|
|
25
|
+
*/
|
|
26
|
+
hrisTimeoff?: shared.HrisTimeoff;
|
|
27
|
+
/**
|
|
28
|
+
* HTTP response status code for this operation
|
|
29
|
+
*/
|
|
30
|
+
statusCode: number;
|
|
31
|
+
/**
|
|
32
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
33
|
+
*/
|
|
34
|
+
rawResponse: AxiosResponse;
|
|
35
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
37
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
40
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
|
+
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
50
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.GetHrisTimeoffResponse = exports.GetHrisTimeoffRequest = void 0;
|
|
54
|
+
var utils_1 = require("../../../internal/utils");
|
|
55
|
+
var shared = __importStar(require("../../../sdk/models/shared"));
|
|
56
|
+
var GetHrisTimeoffRequest = /** @class */ (function (_super) {
|
|
57
|
+
__extends(GetHrisTimeoffRequest, _super);
|
|
58
|
+
function GetHrisTimeoffRequest() {
|
|
59
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
+
}
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=connection_id" }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], GetHrisTimeoffRequest.prototype, "connectionId", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=fields" }),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], GetHrisTimeoffRequest.prototype, "fields", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=id" }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], GetHrisTimeoffRequest.prototype, "id", void 0);
|
|
73
|
+
return GetHrisTimeoffRequest;
|
|
74
|
+
}(utils_1.SpeakeasyBase));
|
|
75
|
+
exports.GetHrisTimeoffRequest = GetHrisTimeoffRequest;
|
|
76
|
+
var GetHrisTimeoffResponse = /** @class */ (function (_super) {
|
|
77
|
+
__extends(GetHrisTimeoffResponse, _super);
|
|
78
|
+
function GetHrisTimeoffResponse() {
|
|
79
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
80
|
+
}
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], GetHrisTimeoffResponse.prototype, "contentType", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
87
|
+
__metadata("design:type", shared.HrisTimeoff)
|
|
88
|
+
], GetHrisTimeoffResponse.prototype, "hrisTimeoff", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], GetHrisTimeoffResponse.prototype, "statusCode", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], GetHrisTimeoffResponse.prototype, "rawResponse", void 0);
|
|
97
|
+
return GetHrisTimeoffResponse;
|
|
98
|
+
}(utils_1.SpeakeasyBase));
|
|
99
|
+
exports.GetHrisTimeoffResponse = GetHrisTimeoffResponse;
|
|
@@ -69,6 +69,10 @@ export declare enum Scopes {
|
|
|
69
69
|
HrisEmployeeWrite = "hris_employee_write",
|
|
70
70
|
HrisGroupRead = "hris_group_read",
|
|
71
71
|
HrisGroupWrite = "hris_group_write",
|
|
72
|
+
HrisPayslipRead = "hris_payslip_read",
|
|
73
|
+
HrisPayslipWrite = "hris_payslip_write",
|
|
74
|
+
HrisTimeoffRead = "hris_timeoff_read",
|
|
75
|
+
HrisTimeoffWrite = "hris_timeoff_write",
|
|
72
76
|
UcCallRead = "uc_call_read",
|
|
73
77
|
StorageFileRead = "storage_file_read",
|
|
74
78
|
StorageFileWrite = "storage_file_write",
|
|
@@ -99,6 +99,10 @@ var Scopes;
|
|
|
99
99
|
Scopes["HrisEmployeeWrite"] = "hris_employee_write";
|
|
100
100
|
Scopes["HrisGroupRead"] = "hris_group_read";
|
|
101
101
|
Scopes["HrisGroupWrite"] = "hris_group_write";
|
|
102
|
+
Scopes["HrisPayslipRead"] = "hris_payslip_read";
|
|
103
|
+
Scopes["HrisPayslipWrite"] = "hris_payslip_write";
|
|
104
|
+
Scopes["HrisTimeoffRead"] = "hris_timeoff_read";
|
|
105
|
+
Scopes["HrisTimeoffWrite"] = "hris_timeoff_write";
|
|
102
106
|
Scopes["UcCallRead"] = "uc_call_read";
|
|
103
107
|
Scopes["StorageFileRead"] = "storage_file_read";
|
|
104
108
|
Scopes["StorageFileWrite"] = "storage_file_write";
|
|
@@ -60,6 +60,8 @@ export * from "./getcrmlead";
|
|
|
60
60
|
export * from "./getcrmpipeline";
|
|
61
61
|
export * from "./gethrisemployee";
|
|
62
62
|
export * from "./gethrisgroup";
|
|
63
|
+
export * from "./gethrispayslip";
|
|
64
|
+
export * from "./gethristimeoff";
|
|
63
65
|
export * from "./getmartechlist";
|
|
64
66
|
export * from "./getmartechmember";
|
|
65
67
|
export * from "./getpaymentlink";
|
|
@@ -105,6 +107,8 @@ export * from "./listenrichcompanies";
|
|
|
105
107
|
export * from "./listenrichpeople";
|
|
106
108
|
export * from "./listhrisemployees";
|
|
107
109
|
export * from "./listhrisgroups";
|
|
110
|
+
export * from "./listhrispayslips";
|
|
111
|
+
export * from "./listhristimeoffs";
|
|
108
112
|
export * from "./listmartechlists";
|
|
109
113
|
export * from "./listmartechmembers";
|
|
110
114
|
export * from "./listpassthroughs";
|
|
@@ -79,6 +79,8 @@ __exportStar(require("./getcrmlead"), exports);
|
|
|
79
79
|
__exportStar(require("./getcrmpipeline"), exports);
|
|
80
80
|
__exportStar(require("./gethrisemployee"), exports);
|
|
81
81
|
__exportStar(require("./gethrisgroup"), exports);
|
|
82
|
+
__exportStar(require("./gethrispayslip"), exports);
|
|
83
|
+
__exportStar(require("./gethristimeoff"), exports);
|
|
82
84
|
__exportStar(require("./getmartechlist"), exports);
|
|
83
85
|
__exportStar(require("./getmartechmember"), exports);
|
|
84
86
|
__exportStar(require("./getpaymentlink"), exports);
|
|
@@ -124,6 +126,8 @@ __exportStar(require("./listenrichcompanies"), exports);
|
|
|
124
126
|
__exportStar(require("./listenrichpeople"), exports);
|
|
125
127
|
__exportStar(require("./listhrisemployees"), exports);
|
|
126
128
|
__exportStar(require("./listhrisgroups"), exports);
|
|
129
|
+
__exportStar(require("./listhrispayslips"), exports);
|
|
130
|
+
__exportStar(require("./listhristimeoffs"), exports);
|
|
127
131
|
__exportStar(require("./listmartechlists"), exports);
|
|
128
132
|
__exportStar(require("./listmartechmembers"), exports);
|
|
129
133
|
__exportStar(require("./listpassthroughs"), exports);
|