@unified-api/typescript-sdk 1.0.9 → 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.
Files changed (54) hide show
  1. package/dist/sdk/hris.d.ts +16 -0
  2. package/dist/sdk/hris.js +252 -0
  3. package/dist/sdk/models/operations/gethrispayslip.d.ts +35 -0
  4. package/dist/sdk/models/operations/gethrispayslip.js +99 -0
  5. package/dist/sdk/models/operations/gethristimeoff.d.ts +35 -0
  6. package/dist/sdk/models/operations/gethristimeoff.js +99 -0
  7. package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +4 -0
  8. package/dist/sdk/models/operations/getunifiedintegrationauth.js +4 -0
  9. package/dist/sdk/models/operations/index.d.ts +4 -0
  10. package/dist/sdk/models/operations/index.js +4 -0
  11. package/dist/sdk/models/operations/listenrichpeople.d.ts +4 -0
  12. package/dist/sdk/models/operations/listenrichpeople.js +4 -0
  13. package/dist/sdk/models/operations/listhrispayslips.d.ts +47 -0
  14. package/dist/sdk/models/operations/listhrispayslips.js +123 -0
  15. package/dist/sdk/models/operations/listhristimeoffs.d.ts +47 -0
  16. package/dist/sdk/models/operations/listhristimeoffs.js +123 -0
  17. package/dist/sdk/models/shared/hrispayslip.d.ts +22 -0
  18. package/dist/sdk/models/shared/hrispayslip.js +133 -0
  19. package/dist/sdk/models/shared/hrispayslipdetail.d.ts +28 -0
  20. package/dist/sdk/models/shared/hrispayslipdetail.js +90 -0
  21. package/dist/sdk/models/shared/hristimeoff.d.ts +24 -0
  22. package/dist/sdk/models/shared/hristimeoff.js +131 -0
  23. package/dist/sdk/models/shared/index.d.ts +3 -0
  24. package/dist/sdk/models/shared/index.js +3 -0
  25. package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +4 -0
  26. package/dist/sdk/models/shared/propertyconnectionpermissions.js +4 -0
  27. package/dist/sdk/models/shared/webhook.d.ts +2 -0
  28. package/dist/sdk/models/shared/webhook.js +2 -0
  29. package/dist/sdk/payslip.d.ts +15 -0
  30. package/dist/sdk/payslip.js +213 -0
  31. package/dist/sdk/sdk.d.ts +4 -0
  32. package/dist/sdk/sdk.js +7 -3
  33. package/dist/sdk/timeoff.d.ts +15 -0
  34. package/dist/sdk/timeoff.js +213 -0
  35. package/docs/sdk/models/operations/gethrispaysliprequest.md +10 -0
  36. package/docs/sdk/models/operations/gethrispayslipresponse.md +11 -0
  37. package/docs/sdk/models/operations/gethristimeoffrequest.md +10 -0
  38. package/docs/sdk/models/operations/gethristimeoffresponse.md +11 -0
  39. package/docs/sdk/models/operations/listenrichpeoplerequest.md +8 -7
  40. package/docs/sdk/models/operations/listhrispayslipsrequest.md +16 -0
  41. package/docs/sdk/models/operations/listhrispayslipsresponse.md +11 -0
  42. package/docs/sdk/models/operations/listhristimeoffsrequest.md +16 -0
  43. package/docs/sdk/models/operations/listhristimeoffsresponse.md +11 -0
  44. package/docs/sdk/models/operations/scopes.md +4 -0
  45. package/docs/sdk/models/shared/hrispayslip.md +20 -0
  46. package/docs/sdk/models/shared/hrispayslipdetail.md +13 -0
  47. package/docs/sdk/models/shared/hrispayslipdetailtype.md +24 -0
  48. package/docs/sdk/models/shared/hristimeoff.md +19 -0
  49. package/docs/sdk/models/shared/hristimeoffstatus.md +10 -0
  50. package/docs/sdk/models/shared/hristimeofftype.md +9 -0
  51. package/docs/sdk/models/shared/objecttype.md +2 -0
  52. package/docs/sdk/models/shared/paymenttype.md +10 -0
  53. package/docs/sdk/models/shared/propertyconnectionpermissions.md +4 -0
  54. package/package.json +1 -1
@@ -0,0 +1,131 @@
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ 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;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ var __metadata = (this && this.__metadata) || function (k, v) {
27
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.HrisTimeoff = exports.HrisTimeoffType = exports.HrisTimeoffStatus = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ var HrisTimeoffStatus;
34
+ (function (HrisTimeoffStatus) {
35
+ HrisTimeoffStatus["Approved"] = "APPROVED";
36
+ HrisTimeoffStatus["Pending"] = "PENDING";
37
+ HrisTimeoffStatus["Denied"] = "DENIED";
38
+ })(HrisTimeoffStatus = exports.HrisTimeoffStatus || (exports.HrisTimeoffStatus = {}));
39
+ var HrisTimeoffType;
40
+ (function (HrisTimeoffType) {
41
+ HrisTimeoffType["Paid"] = "PAID";
42
+ HrisTimeoffType["Unpaid"] = "UNPAID";
43
+ })(HrisTimeoffType = exports.HrisTimeoffType || (exports.HrisTimeoffType = {}));
44
+ var HrisTimeoff = /** @class */ (function (_super) {
45
+ __extends(HrisTimeoff, _super);
46
+ function HrisTimeoff() {
47
+ return _super !== null && _super.apply(this, arguments) || this;
48
+ }
49
+ __decorate([
50
+ (0, utils_1.SpeakeasyMetadata)(),
51
+ (0, class_transformer_1.Expose)({ name: "approved_at" }),
52
+ (0, class_transformer_1.Transform)(function (_a) {
53
+ var value = _a.value;
54
+ return new Date(value);
55
+ }, { toClassOnly: true }),
56
+ __metadata("design:type", Date)
57
+ ], HrisTimeoff.prototype, "approvedAt", void 0);
58
+ __decorate([
59
+ (0, utils_1.SpeakeasyMetadata)(),
60
+ (0, class_transformer_1.Expose)({ name: "approver_user_id" }),
61
+ __metadata("design:type", String)
62
+ ], HrisTimeoff.prototype, "approverUserId", void 0);
63
+ __decorate([
64
+ (0, utils_1.SpeakeasyMetadata)(),
65
+ (0, class_transformer_1.Expose)({ name: "comments" }),
66
+ __metadata("design:type", String)
67
+ ], HrisTimeoff.prototype, "comments", void 0);
68
+ __decorate([
69
+ (0, utils_1.SpeakeasyMetadata)(),
70
+ (0, class_transformer_1.Expose)({ name: "created_at" }),
71
+ (0, class_transformer_1.Transform)(function (_a) {
72
+ var value = _a.value;
73
+ return new Date(value);
74
+ }, { toClassOnly: true }),
75
+ __metadata("design:type", Date)
76
+ ], HrisTimeoff.prototype, "createdAt", void 0);
77
+ __decorate([
78
+ (0, utils_1.SpeakeasyMetadata)(),
79
+ (0, class_transformer_1.Expose)({ name: "end_at" }),
80
+ (0, class_transformer_1.Transform)(function (_a) {
81
+ var value = _a.value;
82
+ return new Date(value);
83
+ }, { toClassOnly: true }),
84
+ __metadata("design:type", Date)
85
+ ], HrisTimeoff.prototype, "endAt", void 0);
86
+ __decorate([
87
+ (0, utils_1.SpeakeasyMetadata)(),
88
+ (0, class_transformer_1.Expose)({ name: "id" }),
89
+ __metadata("design:type", String)
90
+ ], HrisTimeoff.prototype, "id", void 0);
91
+ __decorate([
92
+ (0, utils_1.SpeakeasyMetadata)(),
93
+ (0, class_transformer_1.Expose)({ name: "raw" }),
94
+ __metadata("design:type", Object)
95
+ ], HrisTimeoff.prototype, "raw", void 0);
96
+ __decorate([
97
+ (0, utils_1.SpeakeasyMetadata)(),
98
+ (0, class_transformer_1.Expose)({ name: "start_at" }),
99
+ (0, class_transformer_1.Transform)(function (_a) {
100
+ var value = _a.value;
101
+ return new Date(value);
102
+ }, { toClassOnly: true }),
103
+ __metadata("design:type", Date)
104
+ ], HrisTimeoff.prototype, "startAt", void 0);
105
+ __decorate([
106
+ (0, utils_1.SpeakeasyMetadata)(),
107
+ (0, class_transformer_1.Expose)({ name: "status" }),
108
+ __metadata("design:type", String)
109
+ ], HrisTimeoff.prototype, "status", void 0);
110
+ __decorate([
111
+ (0, utils_1.SpeakeasyMetadata)(),
112
+ (0, class_transformer_1.Expose)({ name: "type" }),
113
+ __metadata("design:type", String)
114
+ ], HrisTimeoff.prototype, "type", void 0);
115
+ __decorate([
116
+ (0, utils_1.SpeakeasyMetadata)(),
117
+ (0, class_transformer_1.Expose)({ name: "updated_at" }),
118
+ (0, class_transformer_1.Transform)(function (_a) {
119
+ var value = _a.value;
120
+ return new Date(value);
121
+ }, { toClassOnly: true }),
122
+ __metadata("design:type", Date)
123
+ ], HrisTimeoff.prototype, "updatedAt", void 0);
124
+ __decorate([
125
+ (0, utils_1.SpeakeasyMetadata)(),
126
+ (0, class_transformer_1.Expose)({ name: "user_id" }),
127
+ __metadata("design:type", String)
128
+ ], HrisTimeoff.prototype, "userId", void 0);
129
+ return HrisTimeoff;
130
+ }(utils_1.SpeakeasyBase));
131
+ exports.HrisTimeoff = HrisTimeoff;
@@ -51,7 +51,10 @@ export * from "./enrichtelephone";
51
51
  export * from "./hrisemail";
52
52
  export * from "./hrisemployee";
53
53
  export * from "./hrisgroup";
54
+ export * from "./hrispayslip";
55
+ export * from "./hrispayslipdetail";
54
56
  export * from "./hristelephone";
57
+ export * from "./hristimeoff";
55
58
  export * from "./integration";
56
59
  export * from "./integrationsupport";
57
60
  export * from "./issue";
@@ -70,7 +70,10 @@ __exportStar(require("./enrichtelephone"), exports);
70
70
  __exportStar(require("./hrisemail"), exports);
71
71
  __exportStar(require("./hrisemployee"), exports);
72
72
  __exportStar(require("./hrisgroup"), exports);
73
+ __exportStar(require("./hrispayslip"), exports);
74
+ __exportStar(require("./hrispayslipdetail"), exports);
73
75
  __exportStar(require("./hristelephone"), exports);
76
+ __exportStar(require("./hristimeoff"), exports);
74
77
  __exportStar(require("./integration"), exports);
75
78
  __exportStar(require("./integrationsupport"), exports);
76
79
  __exportStar(require("./issue"), exports);
@@ -67,6 +67,10 @@ export declare enum PropertyConnectionPermissions {
67
67
  HrisEmployeeWrite = "hris_employee_write",
68
68
  HrisGroupRead = "hris_group_read",
69
69
  HrisGroupWrite = "hris_group_write",
70
+ HrisPayslipRead = "hris_payslip_read",
71
+ HrisPayslipWrite = "hris_payslip_write",
72
+ HrisTimeoffRead = "hris_timeoff_read",
73
+ HrisTimeoffWrite = "hris_timeoff_write",
70
74
  UcCallRead = "uc_call_read",
71
75
  StorageFileRead = "storage_file_read",
72
76
  StorageFileWrite = "storage_file_write",
@@ -74,6 +74,10 @@ var PropertyConnectionPermissions;
74
74
  PropertyConnectionPermissions["HrisEmployeeWrite"] = "hris_employee_write";
75
75
  PropertyConnectionPermissions["HrisGroupRead"] = "hris_group_read";
76
76
  PropertyConnectionPermissions["HrisGroupWrite"] = "hris_group_write";
77
+ PropertyConnectionPermissions["HrisPayslipRead"] = "hris_payslip_read";
78
+ PropertyConnectionPermissions["HrisPayslipWrite"] = "hris_payslip_write";
79
+ PropertyConnectionPermissions["HrisTimeoffRead"] = "hris_timeoff_read";
80
+ PropertyConnectionPermissions["HrisTimeoffWrite"] = "hris_timeoff_write";
77
81
  PropertyConnectionPermissions["UcCallRead"] = "uc_call_read";
78
82
  PropertyConnectionPermissions["StorageFileRead"] = "storage_file_read";
79
83
  PropertyConnectionPermissions["StorageFileWrite"] = "storage_file_write";
@@ -36,6 +36,8 @@ export declare enum ObjectType {
36
36
  CrmPipeline = "crm_pipeline",
37
37
  HrisEmployee = "hris_employee",
38
38
  HrisGroup = "hris_group",
39
+ HrisPayslip = "hris_payslip",
40
+ HrisTimeoff = "hris_timeoff",
39
41
  MartechList = "martech_list",
40
42
  MartechMember = "martech_member",
41
43
  Passthrough = "passthrough",
@@ -69,6 +69,8 @@ var ObjectType;
69
69
  ObjectType["CrmPipeline"] = "crm_pipeline";
70
70
  ObjectType["HrisEmployee"] = "hris_employee";
71
71
  ObjectType["HrisGroup"] = "hris_group";
72
+ ObjectType["HrisPayslip"] = "hris_payslip";
73
+ ObjectType["HrisTimeoff"] = "hris_timeoff";
72
74
  ObjectType["MartechList"] = "martech_list";
73
75
  ObjectType["MartechMember"] = "martech_member";
74
76
  ObjectType["Passthrough"] = "passthrough";
@@ -0,0 +1,15 @@
1
+ import * as operations from "../sdk/models/operations";
2
+ import { SDKConfiguration } from "./sdk";
3
+ import { AxiosRequestConfig } from "axios";
4
+ export declare class Payslip {
5
+ private sdkConfiguration;
6
+ constructor(sdkConfig: SDKConfiguration);
7
+ /**
8
+ * Retrieve a payslip
9
+ */
10
+ getHrisPayslip(req: operations.GetHrisPayslipRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisPayslipResponse>;
11
+ /**
12
+ * List all payslip
13
+ */
14
+ listHrisPayslips(req: operations.ListHrisPayslipsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisPayslipsResponse>;
15
+ }
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ var desc = Object.getOwnPropertyDescriptor(m, k);
19
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
+ desc = { enumerable: true, get: function() { return m[k]; } };
21
+ }
22
+ Object.defineProperty(o, k2, desc);
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
40
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
+ return new (P || (P = Promise))(function (resolve, reject) {
42
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
43
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
46
+ });
47
+ };
48
+ var __generator = (this && this.__generator) || function (thisArg, body) {
49
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
50
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
51
+ function verb(n) { return function (v) { return step([n, v]); }; }
52
+ function step(op) {
53
+ if (f) throw new TypeError("Generator is already executing.");
54
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
55
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
56
+ if (y = 0, t) op = [op[0] & 2, t.value];
57
+ switch (op[0]) {
58
+ case 0: case 1: t = op; break;
59
+ case 4: _.label++; return { value: op[1], done: false };
60
+ case 5: _.label++; y = op[1]; op = [0]; continue;
61
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
62
+ default:
63
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
64
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
65
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
66
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67
+ if (t[2]) _.ops.pop();
68
+ _.trys.pop(); continue;
69
+ }
70
+ op = body.call(thisArg, _);
71
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
72
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
73
+ }
74
+ };
75
+ Object.defineProperty(exports, "__esModule", { value: true });
76
+ exports.Payslip = void 0;
77
+ var utils = __importStar(require("../internal/utils"));
78
+ var errors = __importStar(require("../sdk/models/errors"));
79
+ var operations = __importStar(require("../sdk/models/operations"));
80
+ var shared = __importStar(require("../sdk/models/shared"));
81
+ var Payslip = /** @class */ (function () {
82
+ function Payslip(sdkConfig) {
83
+ this.sdkConfiguration = sdkConfig;
84
+ }
85
+ /**
86
+ * Retrieve a payslip
87
+ */
88
+ Payslip.prototype.getHrisPayslip = function (req, config) {
89
+ var _a, _b;
90
+ return __awaiter(this, void 0, void 0, function () {
91
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
92
+ return __generator(this, function (_c) {
93
+ switch (_c.label) {
94
+ case 0:
95
+ if (!(req instanceof utils.SpeakeasyBase)) {
96
+ req = new operations.GetHrisPayslipRequest(req);
97
+ }
98
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
99
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/payslip/{id}", req);
100
+ client = this.sdkConfiguration.defaultClient;
101
+ globalSecurity = this.sdkConfiguration.security;
102
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
103
+ return [4 /*yield*/, globalSecurity()];
104
+ case 1:
105
+ globalSecurity = _c.sent();
106
+ _c.label = 2;
107
+ case 2:
108
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
109
+ globalSecurity = new shared.Security(globalSecurity);
110
+ }
111
+ properties = utils.parseSecurityProperties(globalSecurity);
112
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
113
+ queryParams = utils.serializeQueryParams(req);
114
+ headers["Accept"] = "application/json";
115
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
116
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
117
+ case 3:
118
+ httpRes = _c.sent();
119
+ 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 : "";
120
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
121
+ throw new Error("status code not found in response: ".concat(httpRes));
122
+ }
123
+ res = new operations.GetHrisPayslipResponse({
124
+ statusCode: httpRes.status,
125
+ contentType: responseContentType,
126
+ rawResponse: httpRes,
127
+ });
128
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
129
+ switch (true) {
130
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
131
+ if (utils.matchContentType(responseContentType, "application/json")) {
132
+ res.hrisPayslip = utils.objectToClass(JSON.parse(decodedRes), shared.HrisPayslip);
133
+ }
134
+ else {
135
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
136
+ }
137
+ break;
138
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
139
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
140
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
141
+ }
142
+ return [2 /*return*/, res];
143
+ }
144
+ });
145
+ });
146
+ };
147
+ /**
148
+ * List all payslip
149
+ */
150
+ Payslip.prototype.listHrisPayslips = function (req, config) {
151
+ var _a, _b;
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
154
+ return __generator(this, function (_c) {
155
+ switch (_c.label) {
156
+ case 0:
157
+ if (!(req instanceof utils.SpeakeasyBase)) {
158
+ req = new operations.ListHrisPayslipsRequest(req);
159
+ }
160
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
161
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/payslip", req);
162
+ client = this.sdkConfiguration.defaultClient;
163
+ globalSecurity = this.sdkConfiguration.security;
164
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
165
+ return [4 /*yield*/, globalSecurity()];
166
+ case 1:
167
+ globalSecurity = _c.sent();
168
+ _c.label = 2;
169
+ case 2:
170
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
171
+ globalSecurity = new shared.Security(globalSecurity);
172
+ }
173
+ properties = utils.parseSecurityProperties(globalSecurity);
174
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
175
+ queryParams = utils.serializeQueryParams(req);
176
+ headers["Accept"] = "application/json";
177
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
178
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
179
+ case 3:
180
+ httpRes = _c.sent();
181
+ 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 : "";
182
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
183
+ throw new Error("status code not found in response: ".concat(httpRes));
184
+ }
185
+ res = new operations.ListHrisPayslipsResponse({
186
+ statusCode: httpRes.status,
187
+ contentType: responseContentType,
188
+ rawResponse: httpRes,
189
+ });
190
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
191
+ switch (true) {
192
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
193
+ if (utils.matchContentType(responseContentType, "application/json")) {
194
+ res.hrisPayslips = [];
195
+ resFieldDepth = utils.getResFieldDepth(res);
196
+ res.hrisPayslips = utils.objectToClass(JSON.parse(decodedRes), shared.HrisPayslip, resFieldDepth);
197
+ }
198
+ else {
199
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
200
+ }
201
+ break;
202
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
203
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
204
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
205
+ }
206
+ return [2 /*return*/, res];
207
+ }
208
+ });
209
+ });
210
+ };
211
+ return Payslip;
212
+ }());
213
+ exports.Payslip = Payslip;
package/dist/sdk/sdk.d.ts CHANGED
@@ -44,6 +44,7 @@ import { Organization } from "./organization";
44
44
  import { Passthrough } from "./passthrough";
45
45
  import { Payment } from "./payment";
46
46
  import { Payout } from "./payout";
47
+ import { Payslip } from "./payslip";
47
48
  import { Person } from "./person";
48
49
  import { Pipeline } from "./pipeline";
49
50
  import { Refund } from "./refund";
@@ -52,6 +53,7 @@ import { Storage } from "./storage";
52
53
  import { Taxrate } from "./taxrate";
53
54
  import { Ticket } from "./ticket";
54
55
  import { Ticketing } from "./ticketing";
56
+ import { Timeoff } from "./timeoff";
55
57
  import { Transaction } from "./transaction";
56
58
  import { Uc } from "./uc";
57
59
  import { Unified } from "./unified";
@@ -135,6 +137,8 @@ export declare class UnifiedTo {
135
137
  hris: Hris;
136
138
  employee: Employee;
137
139
  group: Group;
140
+ payslip: Payslip;
141
+ timeoff: Timeoff;
138
142
  martech: Martech;
139
143
  list: List;
140
144
  member: Member;
package/dist/sdk/sdk.js CHANGED
@@ -51,6 +51,7 @@ var organization_1 = require("./organization");
51
51
  var passthrough_1 = require("./passthrough");
52
52
  var payment_1 = require("./payment");
53
53
  var payout_1 = require("./payout");
54
+ var payslip_1 = require("./payslip");
54
55
  var person_1 = require("./person");
55
56
  var pipeline_1 = require("./pipeline");
56
57
  var refund_1 = require("./refund");
@@ -59,6 +60,7 @@ var storage_1 = require("./storage");
59
60
  var taxrate_1 = require("./taxrate");
60
61
  var ticket_1 = require("./ticket");
61
62
  var ticketing_1 = require("./ticketing");
63
+ var timeoff_1 = require("./timeoff");
62
64
  var transaction_1 = require("./transaction");
63
65
  var uc_1 = require("./uc");
64
66
  var unified_1 = require("./unified");
@@ -81,9 +83,9 @@ var SDKConfiguration = /** @class */ (function () {
81
83
  function SDKConfiguration(init) {
82
84
  this.language = "typescript";
83
85
  this.openapiDocVersion = "1.0";
84
- this.sdkVersion = "1.0.9";
85
- this.genVersion = "2.292.0";
86
- this.userAgent = "speakeasy-sdk/typescript 1.0.9 2.292.0 1.0 @unified-api/typescript-sdk";
86
+ this.sdkVersion = "1.0.11";
87
+ this.genVersion = "2.298.2";
88
+ this.userAgent = "speakeasy-sdk/typescript 1.0.11 2.298.2 1.0 @unified-api/typescript-sdk";
87
89
  Object.assign(this, init);
88
90
  }
89
91
  return SDKConfiguration;
@@ -142,6 +144,8 @@ var UnifiedTo = /** @class */ (function () {
142
144
  this.hris = new hris_1.Hris(this.sdkConfiguration);
143
145
  this.employee = new employee_1.Employee(this.sdkConfiguration);
144
146
  this.group = new group_1.Group(this.sdkConfiguration);
147
+ this.payslip = new payslip_1.Payslip(this.sdkConfiguration);
148
+ this.timeoff = new timeoff_1.Timeoff(this.sdkConfiguration);
145
149
  this.martech = new martech_1.Martech(this.sdkConfiguration);
146
150
  this.list = new list_1.List(this.sdkConfiguration);
147
151
  this.member = new member_1.Member(this.sdkConfiguration);
@@ -0,0 +1,15 @@
1
+ import * as operations from "../sdk/models/operations";
2
+ import { SDKConfiguration } from "./sdk";
3
+ import { AxiosRequestConfig } from "axios";
4
+ export declare class Timeoff {
5
+ private sdkConfiguration;
6
+ constructor(sdkConfig: SDKConfiguration);
7
+ /**
8
+ * Retrieve a timeoff
9
+ */
10
+ getHrisTimeoff(req: operations.GetHrisTimeoffRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisTimeoffResponse>;
11
+ /**
12
+ * List all timeoffs
13
+ */
14
+ listHrisTimeoffs(req: operations.ListHrisTimeoffsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisTimeoffsResponse>;
15
+ }