@unified-api/typescript-sdk 1.0.64 → 1.0.66

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 (52) hide show
  1. package/dist/sdk/hris.d.ts +24 -0
  2. package/dist/sdk/hris.js +400 -0
  3. package/dist/sdk/location.d.ts +24 -0
  4. package/dist/sdk/location.js +400 -0
  5. package/dist/sdk/models/operations/createhrislocation.d.ts +28 -0
  6. package/dist/sdk/models/operations/createhrislocation.js +95 -0
  7. package/dist/sdk/models/operations/gethrislocation.d.ts +35 -0
  8. package/dist/sdk/models/operations/gethrislocation.js +99 -0
  9. package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +2 -0
  10. package/dist/sdk/models/operations/getunifiedintegrationauth.js +2 -0
  11. package/dist/sdk/models/operations/index.d.ts +6 -0
  12. package/dist/sdk/models/operations/index.js +6 -0
  13. package/dist/sdk/models/operations/listhrislocations.d.ts +41 -0
  14. package/dist/sdk/models/operations/listhrislocations.js +111 -0
  15. package/dist/sdk/models/operations/patchhrislocation.d.ts +32 -0
  16. package/dist/sdk/models/operations/patchhrislocation.js +99 -0
  17. package/dist/sdk/models/operations/removehrislocation.d.ts +30 -0
  18. package/dist/sdk/models/operations/removehrislocation.js +71 -0
  19. package/dist/sdk/models/operations/updatehrislocation.d.ts +32 -0
  20. package/dist/sdk/models/operations/updatehrislocation.js +99 -0
  21. package/dist/sdk/models/shared/hrisemployee.d.ts +7 -0
  22. package/dist/sdk/models/shared/hrisemployee.js +14 -0
  23. package/dist/sdk/models/shared/hrislocation.d.ts +20 -0
  24. package/dist/sdk/models/shared/hrislocation.js +127 -0
  25. package/dist/sdk/models/shared/index.d.ts +2 -0
  26. package/dist/sdk/models/shared/index.js +2 -0
  27. package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
  28. package/dist/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  29. package/dist/sdk/models/shared/propertyhrislocationaddress.d.ts +11 -0
  30. package/dist/sdk/models/shared/propertyhrislocationaddress.js +80 -0
  31. package/dist/sdk/models/shared/webhook.d.ts +1 -0
  32. package/dist/sdk/models/shared/webhook.js +1 -0
  33. package/dist/sdk/sdk.js +3 -3
  34. package/docs/sdk/models/operations/createhrislocationrequest.md +9 -0
  35. package/docs/sdk/models/operations/createhrislocationresponse.md +11 -0
  36. package/docs/sdk/models/operations/gethrislocationrequest.md +10 -0
  37. package/docs/sdk/models/operations/gethrislocationresponse.md +11 -0
  38. package/docs/sdk/models/operations/listhrislocationsrequest.md +13 -0
  39. package/docs/sdk/models/operations/listhrislocationsresponse.md +11 -0
  40. package/docs/sdk/models/operations/patchhrislocationrequest.md +10 -0
  41. package/docs/sdk/models/operations/patchhrislocationresponse.md +11 -0
  42. package/docs/sdk/models/operations/removehrislocationrequest.md +9 -0
  43. package/docs/sdk/models/operations/removehrislocationresponse.md +11 -0
  44. package/docs/sdk/models/operations/scopes.md +2 -0
  45. package/docs/sdk/models/operations/updatehrislocationrequest.md +10 -0
  46. package/docs/sdk/models/operations/updatehrislocationresponse.md +11 -0
  47. package/docs/sdk/models/shared/hrisemployee.md +36 -34
  48. package/docs/sdk/models/shared/hrislocation.md +22 -0
  49. package/docs/sdk/models/shared/objecttype.md +1 -0
  50. package/docs/sdk/models/shared/propertyconnectionpermissions.md +2 -0
  51. package/docs/sdk/models/shared/propertyhrislocationaddress.md +15 -0
  52. package/package.json +1 -1
@@ -16,6 +16,10 @@ export declare class Hris {
16
16
  * Create a group
17
17
  */
18
18
  createHrisGroup(req: operations.CreateHrisGroupRequest, config?: AxiosRequestConfig): Promise<operations.CreateHrisGroupResponse>;
19
+ /**
20
+ * Create a location
21
+ */
22
+ createHrisLocation(req: operations.CreateHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.CreateHrisLocationResponse>;
19
23
  /**
20
24
  * Retrieve a company
21
25
  */
@@ -28,6 +32,10 @@ export declare class Hris {
28
32
  * Retrieve a group
29
33
  */
30
34
  getHrisGroup(req: operations.GetHrisGroupRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisGroupResponse>;
35
+ /**
36
+ * Retrieve a location
37
+ */
38
+ getHrisLocation(req: operations.GetHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisLocationResponse>;
31
39
  /**
32
40
  * Retrieve a payslip
33
41
  */
@@ -48,6 +56,10 @@ export declare class Hris {
48
56
  * List all groups
49
57
  */
50
58
  listHrisGroups(req: operations.ListHrisGroupsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisGroupsResponse>;
59
+ /**
60
+ * List all locations
61
+ */
62
+ listHrisLocations(req: operations.ListHrisLocationsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisLocationsResponse>;
51
63
  /**
52
64
  * List all payslips
53
65
  */
@@ -68,6 +80,10 @@ export declare class Hris {
68
80
  * Update a group
69
81
  */
70
82
  patchHrisGroup(req: operations.PatchHrisGroupRequest, config?: AxiosRequestConfig): Promise<operations.PatchHrisGroupResponse>;
83
+ /**
84
+ * Update a location
85
+ */
86
+ patchHrisLocation(req: operations.PatchHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.PatchHrisLocationResponse>;
71
87
  /**
72
88
  * Remove a company
73
89
  */
@@ -80,6 +96,10 @@ export declare class Hris {
80
96
  * Remove a group
81
97
  */
82
98
  removeHrisGroup(req: operations.RemoveHrisGroupRequest, config?: AxiosRequestConfig): Promise<operations.RemoveHrisGroupResponse>;
99
+ /**
100
+ * Remove a location
101
+ */
102
+ removeHrisLocation(req: operations.RemoveHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.RemoveHrisLocationResponse>;
83
103
  /**
84
104
  * Update a company
85
105
  */
@@ -92,4 +112,8 @@ export declare class Hris {
92
112
  * Update a group
93
113
  */
94
114
  updateHrisGroup(req: operations.UpdateHrisGroupRequest, config?: AxiosRequestConfig): Promise<operations.UpdateHrisGroupResponse>;
115
+ /**
116
+ * Update a location
117
+ */
118
+ updateHrisLocation(req: operations.UpdateHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.UpdateHrisLocationResponse>;
95
119
  }
package/dist/sdk/hris.js CHANGED
@@ -311,6 +311,77 @@ var Hris = /** @class */ (function () {
311
311
  });
312
312
  });
313
313
  };
314
+ /**
315
+ * Create a location
316
+ */
317
+ Hris.prototype.createHrisLocation = function (req, config) {
318
+ var _a, _b;
319
+ return __awaiter(this, void 0, void 0, function () {
320
+ var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
321
+ var _d;
322
+ return __generator(this, function (_e) {
323
+ switch (_e.label) {
324
+ case 0:
325
+ if (!(req instanceof utils.SpeakeasyBase)) {
326
+ req = new operations.CreateHrisLocationRequest(req);
327
+ }
328
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
329
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/location", req);
330
+ _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
331
+ try {
332
+ _d = __read(utils.serializeRequestBody(req, "hrisLocation", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
333
+ }
334
+ catch (e) {
335
+ if (e instanceof Error) {
336
+ throw new Error("Error serializing request body, cause: ".concat(e.message));
337
+ }
338
+ }
339
+ client = this.sdkConfiguration.defaultClient;
340
+ globalSecurity = this.sdkConfiguration.security;
341
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
342
+ return [4 /*yield*/, globalSecurity()];
343
+ case 1:
344
+ globalSecurity = _e.sent();
345
+ _e.label = 2;
346
+ case 2:
347
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
348
+ globalSecurity = new shared.Security(globalSecurity);
349
+ }
350
+ properties = utils.parseSecurityProperties(globalSecurity);
351
+ headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
352
+ headers["Accept"] = "application/json";
353
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
354
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
355
+ case 3:
356
+ httpRes = _e.sent();
357
+ 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 : "";
358
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
359
+ throw new Error("status code not found in response: ".concat(httpRes));
360
+ }
361
+ res = new operations.CreateHrisLocationResponse({
362
+ statusCode: httpRes.status,
363
+ contentType: responseContentType,
364
+ rawResponse: httpRes,
365
+ });
366
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
367
+ switch (true) {
368
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
369
+ if (utils.matchContentType(responseContentType, "application/json")) {
370
+ res.hrisLocation = utils.objectToClass(JSON.parse(decodedRes), shared.HrisLocation);
371
+ }
372
+ else {
373
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
374
+ }
375
+ break;
376
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
377
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
378
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
379
+ }
380
+ return [2 /*return*/, res];
381
+ }
382
+ });
383
+ });
384
+ };
314
385
  /**
315
386
  * Retrieve a company
316
387
  */
@@ -497,6 +568,68 @@ var Hris = /** @class */ (function () {
497
568
  });
498
569
  });
499
570
  };
571
+ /**
572
+ * Retrieve a location
573
+ */
574
+ Hris.prototype.getHrisLocation = function (req, config) {
575
+ var _a, _b;
576
+ return __awaiter(this, void 0, void 0, function () {
577
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
578
+ return __generator(this, function (_c) {
579
+ switch (_c.label) {
580
+ case 0:
581
+ if (!(req instanceof utils.SpeakeasyBase)) {
582
+ req = new operations.GetHrisLocationRequest(req);
583
+ }
584
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
585
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/location/{id}", req);
586
+ client = this.sdkConfiguration.defaultClient;
587
+ globalSecurity = this.sdkConfiguration.security;
588
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
589
+ return [4 /*yield*/, globalSecurity()];
590
+ case 1:
591
+ globalSecurity = _c.sent();
592
+ _c.label = 2;
593
+ case 2:
594
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
595
+ globalSecurity = new shared.Security(globalSecurity);
596
+ }
597
+ properties = utils.parseSecurityProperties(globalSecurity);
598
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
599
+ queryParams = utils.serializeQueryParams(req);
600
+ headers["Accept"] = "application/json";
601
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
602
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
603
+ case 3:
604
+ httpRes = _c.sent();
605
+ 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 : "";
606
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
607
+ throw new Error("status code not found in response: ".concat(httpRes));
608
+ }
609
+ res = new operations.GetHrisLocationResponse({
610
+ statusCode: httpRes.status,
611
+ contentType: responseContentType,
612
+ rawResponse: httpRes,
613
+ });
614
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
615
+ switch (true) {
616
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
617
+ if (utils.matchContentType(responseContentType, "application/json")) {
618
+ res.hrisLocation = utils.objectToClass(JSON.parse(decodedRes), shared.HrisLocation);
619
+ }
620
+ else {
621
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
622
+ }
623
+ break;
624
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
625
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
626
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
627
+ }
628
+ return [2 /*return*/, res];
629
+ }
630
+ });
631
+ });
632
+ };
500
633
  /**
501
634
  * Retrieve a payslip
502
635
  */
@@ -813,6 +946,70 @@ var Hris = /** @class */ (function () {
813
946
  });
814
947
  });
815
948
  };
949
+ /**
950
+ * List all locations
951
+ */
952
+ Hris.prototype.listHrisLocations = function (req, config) {
953
+ var _a, _b;
954
+ return __awaiter(this, void 0, void 0, function () {
955
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
956
+ return __generator(this, function (_c) {
957
+ switch (_c.label) {
958
+ case 0:
959
+ if (!(req instanceof utils.SpeakeasyBase)) {
960
+ req = new operations.ListHrisLocationsRequest(req);
961
+ }
962
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
963
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/location", req);
964
+ client = this.sdkConfiguration.defaultClient;
965
+ globalSecurity = this.sdkConfiguration.security;
966
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
967
+ return [4 /*yield*/, globalSecurity()];
968
+ case 1:
969
+ globalSecurity = _c.sent();
970
+ _c.label = 2;
971
+ case 2:
972
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
973
+ globalSecurity = new shared.Security(globalSecurity);
974
+ }
975
+ properties = utils.parseSecurityProperties(globalSecurity);
976
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
977
+ queryParams = utils.serializeQueryParams(req);
978
+ headers["Accept"] = "application/json";
979
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
980
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
981
+ case 3:
982
+ httpRes = _c.sent();
983
+ 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 : "";
984
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
985
+ throw new Error("status code not found in response: ".concat(httpRes));
986
+ }
987
+ res = new operations.ListHrisLocationsResponse({
988
+ statusCode: httpRes.status,
989
+ contentType: responseContentType,
990
+ rawResponse: httpRes,
991
+ });
992
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
993
+ switch (true) {
994
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
995
+ if (utils.matchContentType(responseContentType, "application/json")) {
996
+ res.hrisLocations = [];
997
+ resFieldDepth = utils.getResFieldDepth(res);
998
+ res.hrisLocations = utils.objectToClass(JSON.parse(decodedRes), shared.HrisLocation, resFieldDepth);
999
+ }
1000
+ else {
1001
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1002
+ }
1003
+ break;
1004
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1005
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1006
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1007
+ }
1008
+ return [2 /*return*/, res];
1009
+ }
1010
+ });
1011
+ });
1012
+ };
816
1013
  /**
817
1014
  * List all payslips
818
1015
  */
@@ -1154,6 +1351,77 @@ var Hris = /** @class */ (function () {
1154
1351
  });
1155
1352
  });
1156
1353
  };
1354
+ /**
1355
+ * Update a location
1356
+ */
1357
+ Hris.prototype.patchHrisLocation = function (req, config) {
1358
+ var _a, _b;
1359
+ return __awaiter(this, void 0, void 0, function () {
1360
+ var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
1361
+ var _d;
1362
+ return __generator(this, function (_e) {
1363
+ switch (_e.label) {
1364
+ case 0:
1365
+ if (!(req instanceof utils.SpeakeasyBase)) {
1366
+ req = new operations.PatchHrisLocationRequest(req);
1367
+ }
1368
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1369
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/location/{id}", req);
1370
+ _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
1371
+ try {
1372
+ _d = __read(utils.serializeRequestBody(req, "hrisLocation", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
1373
+ }
1374
+ catch (e) {
1375
+ if (e instanceof Error) {
1376
+ throw new Error("Error serializing request body, cause: ".concat(e.message));
1377
+ }
1378
+ }
1379
+ client = this.sdkConfiguration.defaultClient;
1380
+ globalSecurity = this.sdkConfiguration.security;
1381
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1382
+ return [4 /*yield*/, globalSecurity()];
1383
+ case 1:
1384
+ globalSecurity = _e.sent();
1385
+ _e.label = 2;
1386
+ case 2:
1387
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1388
+ globalSecurity = new shared.Security(globalSecurity);
1389
+ }
1390
+ properties = utils.parseSecurityProperties(globalSecurity);
1391
+ headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1392
+ headers["Accept"] = "application/json";
1393
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
1394
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
1395
+ case 3:
1396
+ httpRes = _e.sent();
1397
+ 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 : "";
1398
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1399
+ throw new Error("status code not found in response: ".concat(httpRes));
1400
+ }
1401
+ res = new operations.PatchHrisLocationResponse({
1402
+ statusCode: httpRes.status,
1403
+ contentType: responseContentType,
1404
+ rawResponse: httpRes,
1405
+ });
1406
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1407
+ switch (true) {
1408
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1409
+ if (utils.matchContentType(responseContentType, "application/json")) {
1410
+ res.hrisLocation = utils.objectToClass(JSON.parse(decodedRes), shared.HrisLocation);
1411
+ }
1412
+ else {
1413
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1414
+ }
1415
+ break;
1416
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1417
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1418
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1419
+ }
1420
+ return [2 /*return*/, res];
1421
+ }
1422
+ });
1423
+ });
1424
+ };
1157
1425
  /**
1158
1426
  * Remove a company
1159
1427
  */
@@ -1337,6 +1605,67 @@ var Hris = /** @class */ (function () {
1337
1605
  });
1338
1606
  });
1339
1607
  };
1608
+ /**
1609
+ * Remove a location
1610
+ */
1611
+ Hris.prototype.removeHrisLocation = function (req, config) {
1612
+ var _a, _b;
1613
+ return __awaiter(this, void 0, void 0, function () {
1614
+ var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
1615
+ return __generator(this, function (_c) {
1616
+ switch (_c.label) {
1617
+ case 0:
1618
+ if (!(req instanceof utils.SpeakeasyBase)) {
1619
+ req = new operations.RemoveHrisLocationRequest(req);
1620
+ }
1621
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1622
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/location/{id}", req);
1623
+ client = this.sdkConfiguration.defaultClient;
1624
+ globalSecurity = this.sdkConfiguration.security;
1625
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1626
+ return [4 /*yield*/, globalSecurity()];
1627
+ case 1:
1628
+ globalSecurity = _c.sent();
1629
+ _c.label = 2;
1630
+ case 2:
1631
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1632
+ globalSecurity = new shared.Security(globalSecurity);
1633
+ }
1634
+ properties = utils.parseSecurityProperties(globalSecurity);
1635
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1636
+ headers["Accept"] = "application/json";
1637
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
1638
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
1639
+ case 3:
1640
+ httpRes = _c.sent();
1641
+ 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 : "";
1642
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1643
+ throw new Error("status code not found in response: ".concat(httpRes));
1644
+ }
1645
+ res = new operations.RemoveHrisLocationResponse({
1646
+ statusCode: httpRes.status,
1647
+ contentType: responseContentType,
1648
+ rawResponse: httpRes,
1649
+ });
1650
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1651
+ switch (true) {
1652
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1653
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1654
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1655
+ default:
1656
+ if (utils.matchContentType(responseContentType, "application/json")) {
1657
+ res.string = JSON.parse(decodedRes);
1658
+ }
1659
+ else {
1660
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1661
+ }
1662
+ break;
1663
+ }
1664
+ return [2 /*return*/, res];
1665
+ }
1666
+ });
1667
+ });
1668
+ };
1340
1669
  /**
1341
1670
  * Update a company
1342
1671
  */
@@ -1550,6 +1879,77 @@ var Hris = /** @class */ (function () {
1550
1879
  });
1551
1880
  });
1552
1881
  };
1882
+ /**
1883
+ * Update a location
1884
+ */
1885
+ Hris.prototype.updateHrisLocation = function (req, config) {
1886
+ var _a, _b;
1887
+ return __awaiter(this, void 0, void 0, function () {
1888
+ var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
1889
+ var _d;
1890
+ return __generator(this, function (_e) {
1891
+ switch (_e.label) {
1892
+ case 0:
1893
+ if (!(req instanceof utils.SpeakeasyBase)) {
1894
+ req = new operations.UpdateHrisLocationRequest(req);
1895
+ }
1896
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
1897
+ operationUrl = utils.generateURL(baseURL, "/hris/{connection_id}/location/{id}", req);
1898
+ _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
1899
+ try {
1900
+ _d = __read(utils.serializeRequestBody(req, "hrisLocation", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
1901
+ }
1902
+ catch (e) {
1903
+ if (e instanceof Error) {
1904
+ throw new Error("Error serializing request body, cause: ".concat(e.message));
1905
+ }
1906
+ }
1907
+ client = this.sdkConfiguration.defaultClient;
1908
+ globalSecurity = this.sdkConfiguration.security;
1909
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
1910
+ return [4 /*yield*/, globalSecurity()];
1911
+ case 1:
1912
+ globalSecurity = _e.sent();
1913
+ _e.label = 2;
1914
+ case 2:
1915
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
1916
+ globalSecurity = new shared.Security(globalSecurity);
1917
+ }
1918
+ properties = utils.parseSecurityProperties(globalSecurity);
1919
+ headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
1920
+ headers["Accept"] = "application/json";
1921
+ headers["user-agent"] = this.sdkConfiguration.userAgent;
1922
+ return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
1923
+ case 3:
1924
+ httpRes = _e.sent();
1925
+ 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 : "";
1926
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
1927
+ throw new Error("status code not found in response: ".concat(httpRes));
1928
+ }
1929
+ res = new operations.UpdateHrisLocationResponse({
1930
+ statusCode: httpRes.status,
1931
+ contentType: responseContentType,
1932
+ rawResponse: httpRes,
1933
+ });
1934
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
1935
+ switch (true) {
1936
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
1937
+ if (utils.matchContentType(responseContentType, "application/json")) {
1938
+ res.hrisLocation = utils.objectToClass(JSON.parse(decodedRes), shared.HrisLocation);
1939
+ }
1940
+ else {
1941
+ throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
1942
+ }
1943
+ break;
1944
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
1945
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
1946
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
1947
+ }
1948
+ return [2 /*return*/, res];
1949
+ }
1950
+ });
1951
+ });
1952
+ };
1553
1953
  return Hris;
1554
1954
  }());
1555
1955
  exports.Hris = Hris;
@@ -8,24 +8,48 @@ export declare class Location {
8
8
  * Create a location
9
9
  */
10
10
  createCommerceLocation(req: operations.CreateCommerceLocationRequest, config?: AxiosRequestConfig): Promise<operations.CreateCommerceLocationResponse>;
11
+ /**
12
+ * Create a location
13
+ */
14
+ createHrisLocation(req: operations.CreateHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.CreateHrisLocationResponse>;
11
15
  /**
12
16
  * Retrieve a location
13
17
  */
14
18
  getCommerceLocation(req: operations.GetCommerceLocationRequest, config?: AxiosRequestConfig): Promise<operations.GetCommerceLocationResponse>;
19
+ /**
20
+ * Retrieve a location
21
+ */
22
+ getHrisLocation(req: operations.GetHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.GetHrisLocationResponse>;
15
23
  /**
16
24
  * List all locations
17
25
  */
18
26
  listCommerceLocations(req: operations.ListCommerceLocationsRequest, config?: AxiosRequestConfig): Promise<operations.ListCommerceLocationsResponse>;
27
+ /**
28
+ * List all locations
29
+ */
30
+ listHrisLocations(req: operations.ListHrisLocationsRequest, config?: AxiosRequestConfig): Promise<operations.ListHrisLocationsResponse>;
19
31
  /**
20
32
  * Update a location
21
33
  */
22
34
  patchCommerceLocation(req: operations.PatchCommerceLocationRequest, config?: AxiosRequestConfig): Promise<operations.PatchCommerceLocationResponse>;
35
+ /**
36
+ * Update a location
37
+ */
38
+ patchHrisLocation(req: operations.PatchHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.PatchHrisLocationResponse>;
23
39
  /**
24
40
  * Remove a location
25
41
  */
26
42
  removeCommerceLocation(req: operations.RemoveCommerceLocationRequest, config?: AxiosRequestConfig): Promise<operations.RemoveCommerceLocationResponse>;
43
+ /**
44
+ * Remove a location
45
+ */
46
+ removeHrisLocation(req: operations.RemoveHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.RemoveHrisLocationResponse>;
27
47
  /**
28
48
  * Update a location
29
49
  */
30
50
  updateCommerceLocation(req: operations.UpdateCommerceLocationRequest, config?: AxiosRequestConfig): Promise<operations.UpdateCommerceLocationResponse>;
51
+ /**
52
+ * Update a location
53
+ */
54
+ updateHrisLocation(req: operations.UpdateHrisLocationRequest, config?: AxiosRequestConfig): Promise<operations.UpdateHrisLocationResponse>;
31
55
  }