@unified-api/typescript-sdk 1.0.10 → 1.0.12

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 (124) hide show
  1. package/dist/sdk/accounting.d.ts +5 -5
  2. package/dist/sdk/accounting.js +5 -5
  3. package/dist/sdk/applicationstatus.d.ts +1 -1
  4. package/dist/sdk/applicationstatus.js +1 -1
  5. package/dist/sdk/ats.d.ts +6 -6
  6. package/dist/sdk/ats.js +6 -6
  7. package/dist/sdk/crm.d.ts +5 -5
  8. package/dist/sdk/crm.js +5 -5
  9. package/dist/sdk/event.d.ts +5 -5
  10. package/dist/sdk/event.js +5 -5
  11. package/dist/sdk/hris.d.ts +16 -0
  12. package/dist/sdk/hris.js +252 -0
  13. package/dist/sdk/interview.d.ts +5 -5
  14. package/dist/sdk/interview.js +5 -5
  15. package/dist/sdk/invoice.d.ts +5 -5
  16. package/dist/sdk/invoice.js +5 -5
  17. package/dist/sdk/link.d.ts +6 -6
  18. package/dist/sdk/link.js +6 -6
  19. package/dist/sdk/martech.d.ts +1 -1
  20. package/dist/sdk/martech.js +1 -1
  21. package/dist/sdk/member.d.ts +1 -1
  22. package/dist/sdk/member.js +1 -1
  23. package/dist/sdk/models/operations/gethrispayslip.d.ts +35 -0
  24. package/dist/sdk/models/operations/gethrispayslip.js +99 -0
  25. package/dist/sdk/models/operations/gethristimeoff.d.ts +35 -0
  26. package/dist/sdk/models/operations/gethristimeoff.js +99 -0
  27. package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +4 -0
  28. package/dist/sdk/models/operations/getunifiedintegrationauth.js +4 -0
  29. package/dist/sdk/models/operations/index.d.ts +4 -0
  30. package/dist/sdk/models/operations/index.js +4 -0
  31. package/dist/sdk/models/operations/listaccountingcontacts.d.ts +0 -3
  32. package/dist/sdk/models/operations/listaccountinginvoices.d.ts +0 -3
  33. package/dist/sdk/models/operations/listatsactivities.d.ts +0 -18
  34. package/dist/sdk/models/operations/listatsapplications.d.ts +0 -6
  35. package/dist/sdk/models/operations/listatsdocuments.d.ts +0 -3
  36. package/dist/sdk/models/operations/listatsinterviews.d.ts +0 -3
  37. package/dist/sdk/models/operations/listatsscorecards.d.ts +0 -12
  38. package/dist/sdk/models/operations/listcommercecollections.d.ts +1 -0
  39. package/dist/sdk/models/operations/listcommercecollections.js +4 -0
  40. package/dist/sdk/models/operations/listcommerceinventories.d.ts +0 -6
  41. package/dist/sdk/models/operations/listcommerceitems.d.ts +1 -0
  42. package/dist/sdk/models/operations/listcommerceitems.js +4 -0
  43. package/dist/sdk/models/operations/listcrmcompanies.d.ts +0 -9
  44. package/dist/sdk/models/operations/listcrmcontacts.d.ts +0 -9
  45. package/dist/sdk/models/operations/listcrmdeals.d.ts +0 -9
  46. package/dist/sdk/models/operations/listcrmevents.d.ts +0 -12
  47. package/dist/sdk/models/operations/listcrmleads.d.ts +0 -9
  48. package/dist/sdk/models/operations/listhrispayslips.d.ts +44 -0
  49. package/dist/sdk/models/operations/listhrispayslips.js +123 -0
  50. package/dist/sdk/models/operations/listhristimeoffs.d.ts +44 -0
  51. package/dist/sdk/models/operations/listhristimeoffs.js +123 -0
  52. package/dist/sdk/models/operations/listmartechmembers.d.ts +0 -3
  53. package/dist/sdk/models/operations/listpaymentlinks.d.ts +0 -6
  54. package/dist/sdk/models/operations/listpaymentpayments.d.ts +0 -6
  55. package/dist/sdk/models/operations/listpaymentrefunds.d.ts +0 -3
  56. package/dist/sdk/models/operations/listticketingnotes.d.ts +0 -3
  57. package/dist/sdk/models/operations/listticketingtickets.d.ts +0 -6
  58. package/dist/sdk/models/shared/commercecollection.d.ts +6 -1
  59. package/dist/sdk/models/shared/commercecollection.js +12 -6
  60. package/dist/sdk/models/shared/hrispayslip.d.ts +22 -0
  61. package/dist/sdk/models/shared/hrispayslip.js +133 -0
  62. package/dist/sdk/models/shared/hrispayslipdetail.d.ts +28 -0
  63. package/dist/sdk/models/shared/hrispayslipdetail.js +90 -0
  64. package/dist/sdk/models/shared/hristimeoff.d.ts +24 -0
  65. package/dist/sdk/models/shared/hristimeoff.js +131 -0
  66. package/dist/sdk/models/shared/index.d.ts +3 -0
  67. package/dist/sdk/models/shared/index.js +3 -0
  68. package/dist/sdk/models/shared/integrationsupport.d.ts +3 -0
  69. package/dist/sdk/models/shared/integrationsupport.js +15 -0
  70. package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +4 -0
  71. package/dist/sdk/models/shared/propertyconnectionpermissions.js +4 -0
  72. package/dist/sdk/models/shared/webhook.d.ts +2 -0
  73. package/dist/sdk/models/shared/webhook.js +2 -0
  74. package/dist/sdk/payment.d.ts +6 -6
  75. package/dist/sdk/payment.js +6 -6
  76. package/dist/sdk/payslip.d.ts +15 -0
  77. package/dist/sdk/payslip.js +213 -0
  78. package/dist/sdk/sdk.d.ts +4 -0
  79. package/dist/sdk/sdk.js +7 -3
  80. package/dist/sdk/timeoff.d.ts +15 -0
  81. package/dist/sdk/timeoff.js +213 -0
  82. package/docs/sdk/models/operations/gethrispaysliprequest.md +10 -0
  83. package/docs/sdk/models/operations/gethrispayslipresponse.md +11 -0
  84. package/docs/sdk/models/operations/gethristimeoffrequest.md +10 -0
  85. package/docs/sdk/models/operations/gethristimeoffresponse.md +11 -0
  86. package/docs/sdk/models/operations/listaccountingcontactsrequest.md +1 -1
  87. package/docs/sdk/models/operations/listaccountinginvoicesrequest.md +1 -1
  88. package/docs/sdk/models/operations/listatsactivitiesrequest.md +6 -6
  89. package/docs/sdk/models/operations/listatsapplicationsrequest.md +2 -2
  90. package/docs/sdk/models/operations/listatsdocumentsrequest.md +1 -1
  91. package/docs/sdk/models/operations/listatsinterviewsrequest.md +1 -1
  92. package/docs/sdk/models/operations/listatsscorecardsrequest.md +4 -4
  93. package/docs/sdk/models/operations/listcommercecollectionsrequest.md +1 -0
  94. package/docs/sdk/models/operations/listcommerceinventoriesrequest.md +2 -2
  95. package/docs/sdk/models/operations/listcommerceitemsrequest.md +1 -0
  96. package/docs/sdk/models/operations/listcrmcompaniesrequest.md +3 -3
  97. package/docs/sdk/models/operations/listcrmcontactsrequest.md +3 -3
  98. package/docs/sdk/models/operations/listcrmdealsrequest.md +3 -3
  99. package/docs/sdk/models/operations/listcrmeventsrequest.md +4 -4
  100. package/docs/sdk/models/operations/listcrmleadsrequest.md +3 -3
  101. package/docs/sdk/models/operations/listhrispayslipsrequest.md +16 -0
  102. package/docs/sdk/models/operations/listhrispayslipsresponse.md +11 -0
  103. package/docs/sdk/models/operations/listhristimeoffsrequest.md +16 -0
  104. package/docs/sdk/models/operations/listhristimeoffsresponse.md +11 -0
  105. package/docs/sdk/models/operations/listmartechmembersrequest.md +1 -1
  106. package/docs/sdk/models/operations/listpaymentlinksrequest.md +2 -2
  107. package/docs/sdk/models/operations/listpaymentpaymentsrequest.md +2 -2
  108. package/docs/sdk/models/operations/listpaymentrefundsrequest.md +1 -1
  109. package/docs/sdk/models/operations/listticketingnotesrequest.md +1 -1
  110. package/docs/sdk/models/operations/listticketingticketsrequest.md +2 -2
  111. package/docs/sdk/models/operations/scopes.md +4 -0
  112. package/docs/sdk/models/shared/commercecollection.md +1 -1
  113. package/docs/sdk/models/shared/commercecollectiontype.md +10 -0
  114. package/docs/sdk/models/shared/hrispayslip.md +20 -0
  115. package/docs/sdk/models/shared/hrispayslipdetail.md +13 -0
  116. package/docs/sdk/models/shared/hrispayslipdetailtype.md +24 -0
  117. package/docs/sdk/models/shared/hristimeoff.md +19 -0
  118. package/docs/sdk/models/shared/hristimeoffstatus.md +10 -0
  119. package/docs/sdk/models/shared/hristimeofftype.md +9 -0
  120. package/docs/sdk/models/shared/integrationsupport.md +3 -0
  121. package/docs/sdk/models/shared/objecttype.md +2 -0
  122. package/docs/sdk/models/shared/paymenttype.md +10 -0
  123. package/docs/sdk/models/shared/propertyconnectionpermissions.md +4 -0
  124. package/package.json +1 -1
@@ -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 payslips
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.10";
85
- this.genVersion = "2.292.0";
86
- this.userAgent = "speakeasy-sdk/typescript 1.0.10 2.292.0 1.0 @unified-api/typescript-sdk";
86
+ this.sdkVersion = "1.0.12";
87
+ this.genVersion = "2.304.1";
88
+ this.userAgent = "speakeasy-sdk/typescript 1.0.12 2.304.1 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
+ }
@@ -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.Timeoff = 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 Timeoff = /** @class */ (function () {
82
+ function Timeoff(sdkConfig) {
83
+ this.sdkConfiguration = sdkConfig;
84
+ }
85
+ /**
86
+ * Retrieve a timeoff
87
+ */
88
+ Timeoff.prototype.getHrisTimeoff = 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.GetHrisTimeoffRequest(req);
97
+ }
98
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
99
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/timeoff/{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.GetHrisTimeoffResponse({
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.hrisTimeoff = utils.objectToClass(JSON.parse(decodedRes), shared.HrisTimeoff);
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 timeoffs
149
+ */
150
+ Timeoff.prototype.listHrisTimeoffs = 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.ListHrisTimeoffsRequest(req);
159
+ }
160
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
161
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/timeoff", 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.ListHrisTimeoffsResponse({
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.hrisTimeoffs = [];
195
+ resFieldDepth = utils.getResFieldDepth(res);
196
+ res.hrisTimeoffs = utils.objectToClass(JSON.parse(decodedRes), shared.HrisTimeoff, 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 Timeoff;
212
+ }());
213
+ exports.Timeoff = Timeoff;
@@ -0,0 +1,10 @@
1
+ # GetHrisPayslipRequest
2
+
3
+
4
+ ## Fields
5
+
6
+ | Field | Type | Required | Description |
7
+ | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
8
+ | `connectionId` | *string* | :heavy_check_mark: | ID of the connection |
9
+ | `fields` | *string*[] | :heavy_minus_sign: | Comma-delimited fields to return |
10
+ | `id` | *string* | :heavy_check_mark: | ID of the Payslip |
@@ -0,0 +1,11 @@
1
+ # GetHrisPayslipResponse
2
+
3
+
4
+ ## Fields
5
+
6
+ | Field | Type | Required | Description |
7
+ | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
8
+ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
9
+ | `hrisPayslip` | [shared.HrisPayslip](../../../sdk/models/shared/hrispayslip.md) | :heavy_minus_sign: | Successful |
10
+ | `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
11
+ | `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
@@ -0,0 +1,10 @@
1
+ # GetHrisTimeoffRequest
2
+
3
+
4
+ ## Fields
5
+
6
+ | Field | Type | Required | Description |
7
+ | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
8
+ | `connectionId` | *string* | :heavy_check_mark: | ID of the connection |
9
+ | `fields` | *string*[] | :heavy_minus_sign: | Comma-delimited fields to return |
10
+ | `id` | *string* | :heavy_check_mark: | ID of the Timeoff |
@@ -0,0 +1,11 @@
1
+ # GetHrisTimeoffResponse
2
+
3
+
4
+ ## Fields
5
+
6
+ | Field | Type | Required | Description |
7
+ | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
8
+ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
9
+ | `hrisTimeoff` | [shared.HrisTimeoff](../../../sdk/models/shared/hristimeoff.md) | :heavy_minus_sign: | Successful |
10
+ | `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
11
+ | `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
@@ -12,5 +12,5 @@
12
12
  | `order` | *string* | :heavy_minus_sign: | N/A |
13
13
  | `query` | *string* | :heavy_minus_sign: | Query string to search. eg. email address or name |
14
14
  | `sort` | *string* | :heavy_minus_sign: | N/A |
15
- | `type` | *string* | :heavy_minus_sign: | The type of contact to filter results |
15
+ | `type` | *string* | :heavy_minus_sign: | N/A |
16
16
  | `updatedGte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Return only results whose updated date is equal or greater to this value |
@@ -6,7 +6,7 @@
6
6
  | Field | Type | Required | Description |
7
7
  | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
8
8
  | `connectionId` | *string* | :heavy_check_mark: | ID of the connection |
9
- | `contactId` | *string* | :heavy_minus_sign: | The customer/supplier ID to filter results |
9
+ | `contactId` | *string* | :heavy_minus_sign: | N/A |
10
10
  | `fields` | *string*[] | :heavy_minus_sign: | Comma-delimited fields to return |
11
11
  | `limit` | *number* | :heavy_minus_sign: | N/A |
12
12
  | `offset` | *number* | :heavy_minus_sign: | N/A |
@@ -5,17 +5,17 @@
5
5
 
6
6
  | Field | Type | Required | Description |
7
7
  | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
8
- | `applicationId` | *string* | :heavy_minus_sign: | The application ID to filter results |
9
- | `candidateId` | *string* | :heavy_minus_sign: | The candidate ID to filter results |
8
+ | `applicationId` | *string* | :heavy_minus_sign: | N/A |
9
+ | `candidateId` | *string* | :heavy_minus_sign: | N/A |
10
10
  | `connectionId` | *string* | :heavy_check_mark: | ID of the connection |
11
- | `documentId` | *string* | :heavy_minus_sign: | The document ID to filter results |
11
+ | `documentId` | *string* | :heavy_minus_sign: | N/A |
12
12
  | `fields` | *string*[] | :heavy_minus_sign: | Comma-delimited fields to return |
13
- | `interviewId` | *string* | :heavy_minus_sign: | The interview ID to filter results |
14
- | `jobId` | *string* | :heavy_minus_sign: | The job ID to filter results |
13
+ | `interviewId` | *string* | :heavy_minus_sign: | N/A |
14
+ | `jobId` | *string* | :heavy_minus_sign: | N/A |
15
15
  | `limit` | *number* | :heavy_minus_sign: | N/A |
16
16
  | `offset` | *number* | :heavy_minus_sign: | N/A |
17
17
  | `order` | *string* | :heavy_minus_sign: | N/A |
18
18
  | `query` | *string* | :heavy_minus_sign: | Query string to search. eg. email address or name |
19
19
  | `sort` | *string* | :heavy_minus_sign: | N/A |
20
20
  | `updatedGte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Return only results whose updated date is equal or greater to this value |
21
- | `userId` | *string* | :heavy_minus_sign: | The user ID to filter results |
21
+ | `userId` | *string* | :heavy_minus_sign: | N/A |