@unified-api/typescript-sdk 2.71.0 → 2.71.1

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 (207) hide show
  1. package/README.md +12 -0
  2. package/bin/mcp-server.js +5326 -3650
  3. package/bin/mcp-server.js.map +42 -11
  4. package/docs/sdks/hris/README.md +500 -0
  5. package/docs/sdks/timeshift/README.md +507 -0
  6. package/funcs/hrisCreateHrisTimeshift.d.ts +14 -0
  7. package/funcs/hrisCreateHrisTimeshift.d.ts.map +1 -0
  8. package/funcs/hrisCreateHrisTimeshift.js +110 -0
  9. package/funcs/hrisCreateHrisTimeshift.js.map +1 -0
  10. package/funcs/hrisGetHrisTimeshift.d.ts +14 -0
  11. package/funcs/hrisGetHrisTimeshift.d.ts.map +1 -0
  12. package/funcs/hrisGetHrisTimeshift.js +113 -0
  13. package/funcs/hrisGetHrisTimeshift.js.map +1 -0
  14. package/funcs/hrisListHrisTimeoffs.js +2 -0
  15. package/funcs/hrisListHrisTimeoffs.js.map +1 -1
  16. package/funcs/hrisListHrisTimeshifts.d.ts +14 -0
  17. package/funcs/hrisListHrisTimeshifts.d.ts.map +1 -0
  18. package/funcs/hrisListHrisTimeshifts.js +121 -0
  19. package/funcs/hrisListHrisTimeshifts.js.map +1 -0
  20. package/funcs/hrisPatchHrisTimeshift.d.ts +14 -0
  21. package/funcs/hrisPatchHrisTimeshift.d.ts.map +1 -0
  22. package/funcs/hrisPatchHrisTimeshift.js +114 -0
  23. package/funcs/hrisPatchHrisTimeshift.js.map +1 -0
  24. package/funcs/hrisRemoveHrisTimeshift.d.ts +13 -0
  25. package/funcs/hrisRemoveHrisTimeshift.d.ts.map +1 -0
  26. package/funcs/hrisRemoveHrisTimeshift.js +110 -0
  27. package/funcs/hrisRemoveHrisTimeshift.js.map +1 -0
  28. package/funcs/hrisUpdateHrisTimeshift.d.ts +14 -0
  29. package/funcs/hrisUpdateHrisTimeshift.d.ts.map +1 -0
  30. package/funcs/hrisUpdateHrisTimeshift.js +114 -0
  31. package/funcs/hrisUpdateHrisTimeshift.js.map +1 -0
  32. package/funcs/timeoffListHrisTimeoffs.js +2 -0
  33. package/funcs/timeoffListHrisTimeoffs.js.map +1 -1
  34. package/funcs/timeshiftCreateHrisTimeshift.d.ts +14 -0
  35. package/funcs/timeshiftCreateHrisTimeshift.d.ts.map +1 -0
  36. package/funcs/timeshiftCreateHrisTimeshift.js +110 -0
  37. package/funcs/timeshiftCreateHrisTimeshift.js.map +1 -0
  38. package/funcs/timeshiftGetHrisTimeshift.d.ts +14 -0
  39. package/funcs/timeshiftGetHrisTimeshift.d.ts.map +1 -0
  40. package/funcs/timeshiftGetHrisTimeshift.js +113 -0
  41. package/funcs/timeshiftGetHrisTimeshift.js.map +1 -0
  42. package/funcs/timeshiftListHrisTimeshifts.d.ts +14 -0
  43. package/funcs/timeshiftListHrisTimeshifts.d.ts.map +1 -0
  44. package/funcs/timeshiftListHrisTimeshifts.js +121 -0
  45. package/funcs/timeshiftListHrisTimeshifts.js.map +1 -0
  46. package/funcs/timeshiftPatchHrisTimeshift.d.ts +14 -0
  47. package/funcs/timeshiftPatchHrisTimeshift.d.ts.map +1 -0
  48. package/funcs/timeshiftPatchHrisTimeshift.js +114 -0
  49. package/funcs/timeshiftPatchHrisTimeshift.js.map +1 -0
  50. package/funcs/timeshiftRemoveHrisTimeshift.d.ts +13 -0
  51. package/funcs/timeshiftRemoveHrisTimeshift.d.ts.map +1 -0
  52. package/funcs/timeshiftRemoveHrisTimeshift.js +110 -0
  53. package/funcs/timeshiftRemoveHrisTimeshift.js.map +1 -0
  54. package/funcs/timeshiftUpdateHrisTimeshift.d.ts +14 -0
  55. package/funcs/timeshiftUpdateHrisTimeshift.d.ts.map +1 -0
  56. package/funcs/timeshiftUpdateHrisTimeshift.js +114 -0
  57. package/funcs/timeshiftUpdateHrisTimeshift.js.map +1 -0
  58. package/jsr.json +1 -1
  59. package/lib/config.d.ts +2 -2
  60. package/lib/config.js +2 -2
  61. package/mcp-server/mcp-server.js +1 -1
  62. package/mcp-server/server.d.ts.map +1 -1
  63. package/mcp-server/server.js +25 -1
  64. package/mcp-server/server.js.map +1 -1
  65. package/mcp-server/tools/hrisCreateHrisTimeshift.d.ts +8 -0
  66. package/mcp-server/tools/hrisCreateHrisTimeshift.d.ts.map +1 -0
  67. package/mcp-server/tools/hrisCreateHrisTimeshift.js +52 -0
  68. package/mcp-server/tools/hrisCreateHrisTimeshift.js.map +1 -0
  69. package/mcp-server/tools/hrisGetHrisTimeshift.d.ts +8 -0
  70. package/mcp-server/tools/hrisGetHrisTimeshift.d.ts.map +1 -0
  71. package/mcp-server/tools/hrisGetHrisTimeshift.js +52 -0
  72. package/mcp-server/tools/hrisGetHrisTimeshift.js.map +1 -0
  73. package/mcp-server/tools/hrisListHrisTimeshifts.d.ts +8 -0
  74. package/mcp-server/tools/hrisListHrisTimeshifts.d.ts.map +1 -0
  75. package/mcp-server/tools/hrisListHrisTimeshifts.js +52 -0
  76. package/mcp-server/tools/hrisListHrisTimeshifts.js.map +1 -0
  77. package/mcp-server/tools/hrisPatchHrisTimeshift.d.ts +8 -0
  78. package/mcp-server/tools/hrisPatchHrisTimeshift.d.ts.map +1 -0
  79. package/mcp-server/tools/hrisPatchHrisTimeshift.js +52 -0
  80. package/mcp-server/tools/hrisPatchHrisTimeshift.js.map +1 -0
  81. package/mcp-server/tools/hrisRemoveHrisTimeshift.d.ts +8 -0
  82. package/mcp-server/tools/hrisRemoveHrisTimeshift.d.ts.map +1 -0
  83. package/mcp-server/tools/hrisRemoveHrisTimeshift.js +51 -0
  84. package/mcp-server/tools/hrisRemoveHrisTimeshift.js.map +1 -0
  85. package/mcp-server/tools/hrisUpdateHrisTimeshift.d.ts +8 -0
  86. package/mcp-server/tools/hrisUpdateHrisTimeshift.d.ts.map +1 -0
  87. package/mcp-server/tools/hrisUpdateHrisTimeshift.js +52 -0
  88. package/mcp-server/tools/hrisUpdateHrisTimeshift.js.map +1 -0
  89. package/mcp-server/tools/timeshiftCreateHrisTimeshift.d.ts +8 -0
  90. package/mcp-server/tools/timeshiftCreateHrisTimeshift.d.ts.map +1 -0
  91. package/mcp-server/tools/timeshiftCreateHrisTimeshift.js +52 -0
  92. package/mcp-server/tools/timeshiftCreateHrisTimeshift.js.map +1 -0
  93. package/mcp-server/tools/timeshiftGetHrisTimeshift.d.ts +8 -0
  94. package/mcp-server/tools/timeshiftGetHrisTimeshift.d.ts.map +1 -0
  95. package/mcp-server/tools/timeshiftGetHrisTimeshift.js +52 -0
  96. package/mcp-server/tools/timeshiftGetHrisTimeshift.js.map +1 -0
  97. package/mcp-server/tools/timeshiftListHrisTimeshifts.d.ts +8 -0
  98. package/mcp-server/tools/timeshiftListHrisTimeshifts.d.ts.map +1 -0
  99. package/mcp-server/tools/timeshiftListHrisTimeshifts.js +52 -0
  100. package/mcp-server/tools/timeshiftListHrisTimeshifts.js.map +1 -0
  101. package/mcp-server/tools/timeshiftPatchHrisTimeshift.d.ts +8 -0
  102. package/mcp-server/tools/timeshiftPatchHrisTimeshift.d.ts.map +1 -0
  103. package/mcp-server/tools/timeshiftPatchHrisTimeshift.js +52 -0
  104. package/mcp-server/tools/timeshiftPatchHrisTimeshift.js.map +1 -0
  105. package/mcp-server/tools/timeshiftRemoveHrisTimeshift.d.ts +8 -0
  106. package/mcp-server/tools/timeshiftRemoveHrisTimeshift.d.ts.map +1 -0
  107. package/mcp-server/tools/timeshiftRemoveHrisTimeshift.js +51 -0
  108. package/mcp-server/tools/timeshiftRemoveHrisTimeshift.js.map +1 -0
  109. package/mcp-server/tools/timeshiftUpdateHrisTimeshift.d.ts +8 -0
  110. package/mcp-server/tools/timeshiftUpdateHrisTimeshift.d.ts.map +1 -0
  111. package/mcp-server/tools/timeshiftUpdateHrisTimeshift.js +52 -0
  112. package/mcp-server/tools/timeshiftUpdateHrisTimeshift.js.map +1 -0
  113. package/package.json +1 -1
  114. package/sdk/hris.d.ts +24 -0
  115. package/sdk/hris.d.ts.map +1 -1
  116. package/sdk/hris.js +42 -0
  117. package/sdk/hris.js.map +1 -1
  118. package/sdk/models/operations/createhristimeshift.d.ts +45 -0
  119. package/sdk/models/operations/createhristimeshift.d.ts.map +1 -0
  120. package/sdk/models/operations/createhristimeshift.js +77 -0
  121. package/sdk/models/operations/createhristimeshift.js.map +1 -0
  122. package/sdk/models/operations/gethristimeshift.d.ts +47 -0
  123. package/sdk/models/operations/gethristimeshift.d.ts.map +1 -0
  124. package/sdk/models/operations/gethristimeshift.js +74 -0
  125. package/sdk/models/operations/gethristimeshift.js.map +1 -0
  126. package/sdk/models/operations/index.d.ts +6 -0
  127. package/sdk/models/operations/index.d.ts.map +1 -1
  128. package/sdk/models/operations/index.js +6 -0
  129. package/sdk/models/operations/index.js.map +1 -1
  130. package/sdk/models/operations/listhristimeoffs.d.ts +10 -0
  131. package/sdk/models/operations/listhristimeoffs.d.ts.map +1 -1
  132. package/sdk/models/operations/listhristimeoffs.js +8 -0
  133. package/sdk/models/operations/listhristimeoffs.js.map +1 -1
  134. package/sdk/models/operations/listhristimeshifts.d.ts +85 -0
  135. package/sdk/models/operations/listhristimeshifts.d.ts.map +1 -0
  136. package/sdk/models/operations/listhristimeshifts.js +106 -0
  137. package/sdk/models/operations/listhristimeshifts.js.map +1 -0
  138. package/sdk/models/operations/patchhristimeshift.d.ts +50 -0
  139. package/sdk/models/operations/patchhristimeshift.d.ts.map +1 -0
  140. package/sdk/models/operations/patchhristimeshift.js +79 -0
  141. package/sdk/models/operations/patchhristimeshift.js.map +1 -0
  142. package/sdk/models/operations/removehristimeshift.d.ts +66 -0
  143. package/sdk/models/operations/removehristimeshift.d.ts.map +1 -0
  144. package/sdk/models/operations/removehristimeshift.js +105 -0
  145. package/sdk/models/operations/removehristimeshift.js.map +1 -0
  146. package/sdk/models/operations/updatehristimeshift.d.ts +50 -0
  147. package/sdk/models/operations/updatehristimeshift.d.ts.map +1 -0
  148. package/sdk/models/operations/updatehristimeshift.js +79 -0
  149. package/sdk/models/operations/updatehristimeshift.js.map +1 -0
  150. package/sdk/models/shared/hristimeshift.d.ts +62 -0
  151. package/sdk/models/shared/hristimeshift.d.ts.map +1 -0
  152. package/sdk/models/shared/hristimeshift.js +122 -0
  153. package/sdk/models/shared/hristimeshift.js.map +1 -0
  154. package/sdk/models/shared/index.d.ts +1 -0
  155. package/sdk/models/shared/index.d.ts.map +1 -1
  156. package/sdk/models/shared/index.js +1 -0
  157. package/sdk/models/shared/index.js.map +1 -1
  158. package/sdk/sdk.d.ts +3 -0
  159. package/sdk/sdk.d.ts.map +1 -1
  160. package/sdk/sdk.js +4 -0
  161. package/sdk/sdk.js.map +1 -1
  162. package/sdk/timeshift.d.ts +30 -0
  163. package/sdk/timeshift.d.ts.map +1 -0
  164. package/sdk/timeshift.js +54 -0
  165. package/sdk/timeshift.js.map +1 -0
  166. package/src/funcs/hrisCreateHrisTimeshift.ts +165 -0
  167. package/src/funcs/hrisGetHrisTimeshift.ts +167 -0
  168. package/src/funcs/hrisListHrisTimeoffs.ts +2 -0
  169. package/src/funcs/hrisListHrisTimeshifts.ts +175 -0
  170. package/src/funcs/hrisPatchHrisTimeshift.ts +168 -0
  171. package/src/funcs/hrisRemoveHrisTimeshift.ts +170 -0
  172. package/src/funcs/hrisUpdateHrisTimeshift.ts +169 -0
  173. package/src/funcs/timeoffListHrisTimeoffs.ts +2 -0
  174. package/src/funcs/timeshiftCreateHrisTimeshift.ts +165 -0
  175. package/src/funcs/timeshiftGetHrisTimeshift.ts +167 -0
  176. package/src/funcs/timeshiftListHrisTimeshifts.ts +175 -0
  177. package/src/funcs/timeshiftPatchHrisTimeshift.ts +168 -0
  178. package/src/funcs/timeshiftRemoveHrisTimeshift.ts +170 -0
  179. package/src/funcs/timeshiftUpdateHrisTimeshift.ts +169 -0
  180. package/src/lib/config.ts +2 -2
  181. package/src/mcp-server/mcp-server.ts +1 -1
  182. package/src/mcp-server/server.ts +25 -1
  183. package/src/mcp-server/tools/hrisCreateHrisTimeshift.ts +35 -0
  184. package/src/mcp-server/tools/hrisGetHrisTimeshift.ts +35 -0
  185. package/src/mcp-server/tools/hrisListHrisTimeshifts.ts +35 -0
  186. package/src/mcp-server/tools/hrisPatchHrisTimeshift.ts +35 -0
  187. package/src/mcp-server/tools/hrisRemoveHrisTimeshift.ts +33 -0
  188. package/src/mcp-server/tools/hrisUpdateHrisTimeshift.ts +35 -0
  189. package/src/mcp-server/tools/timeshiftCreateHrisTimeshift.ts +35 -0
  190. package/src/mcp-server/tools/timeshiftGetHrisTimeshift.ts +35 -0
  191. package/src/mcp-server/tools/timeshiftListHrisTimeshifts.ts +35 -0
  192. package/src/mcp-server/tools/timeshiftPatchHrisTimeshift.ts +35 -0
  193. package/src/mcp-server/tools/timeshiftRemoveHrisTimeshift.ts +33 -0
  194. package/src/mcp-server/tools/timeshiftUpdateHrisTimeshift.ts +35 -0
  195. package/src/sdk/hris.ts +90 -0
  196. package/src/sdk/models/operations/createhristimeshift.ts +99 -0
  197. package/src/sdk/models/operations/gethristimeshift.ts +99 -0
  198. package/src/sdk/models/operations/index.ts +6 -0
  199. package/src/sdk/models/operations/listhristimeoffs.ts +18 -0
  200. package/src/sdk/models/operations/listhristimeshifts.ts +169 -0
  201. package/src/sdk/models/operations/patchhristimeshift.ts +106 -0
  202. package/src/sdk/models/operations/removehristimeshift.ts +153 -0
  203. package/src/sdk/models/operations/updatehristimeshift.ts +106 -0
  204. package/src/sdk/models/shared/hristimeshift.ts +158 -0
  205. package/src/sdk/models/shared/index.ts +1 -0
  206. package/src/sdk/sdk.ts +6 -0
  207. package/src/sdk/timeshift.ts +100 -0
@@ -0,0 +1,106 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as shared from "../shared/index.js";
11
+
12
+ export type PatchHrisTimeshiftRequest = {
13
+ hrisTimeshift: shared.HrisTimeshift;
14
+ /**
15
+ * ID of the connection
16
+ */
17
+ connectionId: string;
18
+ /**
19
+ * Comma-delimited fields to return
20
+ */
21
+ fields?: Array<string> | undefined;
22
+ /**
23
+ * ID of the Timeshift
24
+ */
25
+ id: string;
26
+ /**
27
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
28
+ */
29
+ raw?: string | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const PatchHrisTimeshiftRequest$inboundSchema: z.ZodType<
34
+ PatchHrisTimeshiftRequest,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ HrisTimeshift: shared.HrisTimeshift$inboundSchema,
39
+ connection_id: z.string(),
40
+ fields: z.array(z.string()).optional(),
41
+ id: z.string(),
42
+ raw: z.string().optional(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "HrisTimeshift": "hrisTimeshift",
46
+ "connection_id": "connectionId",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type PatchHrisTimeshiftRequest$Outbound = {
52
+ HrisTimeshift: shared.HrisTimeshift$Outbound;
53
+ connection_id: string;
54
+ fields?: Array<string> | undefined;
55
+ id: string;
56
+ raw?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const PatchHrisTimeshiftRequest$outboundSchema: z.ZodType<
61
+ PatchHrisTimeshiftRequest$Outbound,
62
+ z.ZodTypeDef,
63
+ PatchHrisTimeshiftRequest
64
+ > = z.object({
65
+ hrisTimeshift: shared.HrisTimeshift$outboundSchema,
66
+ connectionId: z.string(),
67
+ fields: z.array(z.string()).optional(),
68
+ id: z.string(),
69
+ raw: z.string().optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ hrisTimeshift: "HrisTimeshift",
73
+ connectionId: "connection_id",
74
+ });
75
+ });
76
+
77
+ /**
78
+ * @internal
79
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
+ */
81
+ export namespace PatchHrisTimeshiftRequest$ {
82
+ /** @deprecated use `PatchHrisTimeshiftRequest$inboundSchema` instead. */
83
+ export const inboundSchema = PatchHrisTimeshiftRequest$inboundSchema;
84
+ /** @deprecated use `PatchHrisTimeshiftRequest$outboundSchema` instead. */
85
+ export const outboundSchema = PatchHrisTimeshiftRequest$outboundSchema;
86
+ /** @deprecated use `PatchHrisTimeshiftRequest$Outbound` instead. */
87
+ export type Outbound = PatchHrisTimeshiftRequest$Outbound;
88
+ }
89
+
90
+ export function patchHrisTimeshiftRequestToJSON(
91
+ patchHrisTimeshiftRequest: PatchHrisTimeshiftRequest,
92
+ ): string {
93
+ return JSON.stringify(
94
+ PatchHrisTimeshiftRequest$outboundSchema.parse(patchHrisTimeshiftRequest),
95
+ );
96
+ }
97
+
98
+ export function patchHrisTimeshiftRequestFromJSON(
99
+ jsonString: string,
100
+ ): SafeParseResult<PatchHrisTimeshiftRequest, SDKValidationError> {
101
+ return safeParse(
102
+ jsonString,
103
+ (x) => PatchHrisTimeshiftRequest$inboundSchema.parse(JSON.parse(x)),
104
+ `Failed to parse 'PatchHrisTimeshiftRequest' from JSON`,
105
+ );
106
+ }
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type RemoveHrisTimeshiftRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * ID of the Timeshift
18
+ */
19
+ id: string;
20
+ };
21
+
22
+ export type RemoveHrisTimeshiftResponse = {
23
+ headers: { [k: string]: Array<string> };
24
+ };
25
+
26
+ /** @internal */
27
+ export const RemoveHrisTimeshiftRequest$inboundSchema: z.ZodType<
28
+ RemoveHrisTimeshiftRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ connection_id: z.string(),
33
+ id: z.string(),
34
+ }).transform((v) => {
35
+ return remap$(v, {
36
+ "connection_id": "connectionId",
37
+ });
38
+ });
39
+
40
+ /** @internal */
41
+ export type RemoveHrisTimeshiftRequest$Outbound = {
42
+ connection_id: string;
43
+ id: string;
44
+ };
45
+
46
+ /** @internal */
47
+ export const RemoveHrisTimeshiftRequest$outboundSchema: z.ZodType<
48
+ RemoveHrisTimeshiftRequest$Outbound,
49
+ z.ZodTypeDef,
50
+ RemoveHrisTimeshiftRequest
51
+ > = z.object({
52
+ connectionId: z.string(),
53
+ id: z.string(),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ connectionId: "connection_id",
57
+ });
58
+ });
59
+
60
+ /**
61
+ * @internal
62
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
+ */
64
+ export namespace RemoveHrisTimeshiftRequest$ {
65
+ /** @deprecated use `RemoveHrisTimeshiftRequest$inboundSchema` instead. */
66
+ export const inboundSchema = RemoveHrisTimeshiftRequest$inboundSchema;
67
+ /** @deprecated use `RemoveHrisTimeshiftRequest$outboundSchema` instead. */
68
+ export const outboundSchema = RemoveHrisTimeshiftRequest$outboundSchema;
69
+ /** @deprecated use `RemoveHrisTimeshiftRequest$Outbound` instead. */
70
+ export type Outbound = RemoveHrisTimeshiftRequest$Outbound;
71
+ }
72
+
73
+ export function removeHrisTimeshiftRequestToJSON(
74
+ removeHrisTimeshiftRequest: RemoveHrisTimeshiftRequest,
75
+ ): string {
76
+ return JSON.stringify(
77
+ RemoveHrisTimeshiftRequest$outboundSchema.parse(removeHrisTimeshiftRequest),
78
+ );
79
+ }
80
+
81
+ export function removeHrisTimeshiftRequestFromJSON(
82
+ jsonString: string,
83
+ ): SafeParseResult<RemoveHrisTimeshiftRequest, SDKValidationError> {
84
+ return safeParse(
85
+ jsonString,
86
+ (x) => RemoveHrisTimeshiftRequest$inboundSchema.parse(JSON.parse(x)),
87
+ `Failed to parse 'RemoveHrisTimeshiftRequest' from JSON`,
88
+ );
89
+ }
90
+
91
+ /** @internal */
92
+ export const RemoveHrisTimeshiftResponse$inboundSchema: z.ZodType<
93
+ RemoveHrisTimeshiftResponse,
94
+ z.ZodTypeDef,
95
+ unknown
96
+ > = z.object({
97
+ Headers: z.record(z.array(z.string())),
98
+ }).transform((v) => {
99
+ return remap$(v, {
100
+ "Headers": "headers",
101
+ });
102
+ });
103
+
104
+ /** @internal */
105
+ export type RemoveHrisTimeshiftResponse$Outbound = {
106
+ Headers: { [k: string]: Array<string> };
107
+ };
108
+
109
+ /** @internal */
110
+ export const RemoveHrisTimeshiftResponse$outboundSchema: z.ZodType<
111
+ RemoveHrisTimeshiftResponse$Outbound,
112
+ z.ZodTypeDef,
113
+ RemoveHrisTimeshiftResponse
114
+ > = z.object({
115
+ headers: z.record(z.array(z.string())),
116
+ }).transform((v) => {
117
+ return remap$(v, {
118
+ headers: "Headers",
119
+ });
120
+ });
121
+
122
+ /**
123
+ * @internal
124
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
125
+ */
126
+ export namespace RemoveHrisTimeshiftResponse$ {
127
+ /** @deprecated use `RemoveHrisTimeshiftResponse$inboundSchema` instead. */
128
+ export const inboundSchema = RemoveHrisTimeshiftResponse$inboundSchema;
129
+ /** @deprecated use `RemoveHrisTimeshiftResponse$outboundSchema` instead. */
130
+ export const outboundSchema = RemoveHrisTimeshiftResponse$outboundSchema;
131
+ /** @deprecated use `RemoveHrisTimeshiftResponse$Outbound` instead. */
132
+ export type Outbound = RemoveHrisTimeshiftResponse$Outbound;
133
+ }
134
+
135
+ export function removeHrisTimeshiftResponseToJSON(
136
+ removeHrisTimeshiftResponse: RemoveHrisTimeshiftResponse,
137
+ ): string {
138
+ return JSON.stringify(
139
+ RemoveHrisTimeshiftResponse$outboundSchema.parse(
140
+ removeHrisTimeshiftResponse,
141
+ ),
142
+ );
143
+ }
144
+
145
+ export function removeHrisTimeshiftResponseFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<RemoveHrisTimeshiftResponse, SDKValidationError> {
148
+ return safeParse(
149
+ jsonString,
150
+ (x) => RemoveHrisTimeshiftResponse$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'RemoveHrisTimeshiftResponse' from JSON`,
152
+ );
153
+ }
@@ -0,0 +1,106 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as shared from "../shared/index.js";
11
+
12
+ export type UpdateHrisTimeshiftRequest = {
13
+ hrisTimeshift: shared.HrisTimeshift;
14
+ /**
15
+ * ID of the connection
16
+ */
17
+ connectionId: string;
18
+ /**
19
+ * Comma-delimited fields to return
20
+ */
21
+ fields?: Array<string> | undefined;
22
+ /**
23
+ * ID of the Timeshift
24
+ */
25
+ id: string;
26
+ /**
27
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
28
+ */
29
+ raw?: string | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const UpdateHrisTimeshiftRequest$inboundSchema: z.ZodType<
34
+ UpdateHrisTimeshiftRequest,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ HrisTimeshift: shared.HrisTimeshift$inboundSchema,
39
+ connection_id: z.string(),
40
+ fields: z.array(z.string()).optional(),
41
+ id: z.string(),
42
+ raw: z.string().optional(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "HrisTimeshift": "hrisTimeshift",
46
+ "connection_id": "connectionId",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type UpdateHrisTimeshiftRequest$Outbound = {
52
+ HrisTimeshift: shared.HrisTimeshift$Outbound;
53
+ connection_id: string;
54
+ fields?: Array<string> | undefined;
55
+ id: string;
56
+ raw?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const UpdateHrisTimeshiftRequest$outboundSchema: z.ZodType<
61
+ UpdateHrisTimeshiftRequest$Outbound,
62
+ z.ZodTypeDef,
63
+ UpdateHrisTimeshiftRequest
64
+ > = z.object({
65
+ hrisTimeshift: shared.HrisTimeshift$outboundSchema,
66
+ connectionId: z.string(),
67
+ fields: z.array(z.string()).optional(),
68
+ id: z.string(),
69
+ raw: z.string().optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ hrisTimeshift: "HrisTimeshift",
73
+ connectionId: "connection_id",
74
+ });
75
+ });
76
+
77
+ /**
78
+ * @internal
79
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
+ */
81
+ export namespace UpdateHrisTimeshiftRequest$ {
82
+ /** @deprecated use `UpdateHrisTimeshiftRequest$inboundSchema` instead. */
83
+ export const inboundSchema = UpdateHrisTimeshiftRequest$inboundSchema;
84
+ /** @deprecated use `UpdateHrisTimeshiftRequest$outboundSchema` instead. */
85
+ export const outboundSchema = UpdateHrisTimeshiftRequest$outboundSchema;
86
+ /** @deprecated use `UpdateHrisTimeshiftRequest$Outbound` instead. */
87
+ export type Outbound = UpdateHrisTimeshiftRequest$Outbound;
88
+ }
89
+
90
+ export function updateHrisTimeshiftRequestToJSON(
91
+ updateHrisTimeshiftRequest: UpdateHrisTimeshiftRequest,
92
+ ): string {
93
+ return JSON.stringify(
94
+ UpdateHrisTimeshiftRequest$outboundSchema.parse(updateHrisTimeshiftRequest),
95
+ );
96
+ }
97
+
98
+ export function updateHrisTimeshiftRequestFromJSON(
99
+ jsonString: string,
100
+ ): SafeParseResult<UpdateHrisTimeshiftRequest, SDKValidationError> {
101
+ return safeParse(
102
+ jsonString,
103
+ (x) => UpdateHrisTimeshiftRequest$inboundSchema.parse(JSON.parse(x)),
104
+ `Failed to parse 'UpdateHrisTimeshiftRequest' from JSON`,
105
+ );
106
+ }
@@ -0,0 +1,158 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ HrisCompensation,
12
+ HrisCompensation$inboundSchema,
13
+ HrisCompensation$Outbound,
14
+ HrisCompensation$outboundSchema,
15
+ } from "./hriscompensation.js";
16
+
17
+ export type HrisTimeshift = {
18
+ approvedAt?: Date | undefined;
19
+ approverUserId?: string | undefined;
20
+ companyId?: string | undefined;
21
+ compensation?: Array<HrisCompensation> | undefined;
22
+ createdAt?: Date | undefined;
23
+ employeeUserId?: string | undefined;
24
+ endAt?: Date | undefined;
25
+ groupId?: string | undefined;
26
+ hours?: number | undefined;
27
+ id?: string | undefined;
28
+ isApproved?: boolean | undefined;
29
+ locationId?: string | undefined;
30
+ raw?: { [k: string]: any } | undefined;
31
+ startAt?: Date | undefined;
32
+ updatedAt?: Date | undefined;
33
+ };
34
+
35
+ /** @internal */
36
+ export const HrisTimeshift$inboundSchema: z.ZodType<
37
+ HrisTimeshift,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ approved_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
42
+ .optional(),
43
+ approver_user_id: z.string().optional(),
44
+ company_id: z.string().optional(),
45
+ compensation: z.array(HrisCompensation$inboundSchema).optional(),
46
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
47
+ .optional(),
48
+ employee_user_id: z.string().optional(),
49
+ end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
50
+ .optional(),
51
+ group_id: z.string().optional(),
52
+ hours: z.number().optional(),
53
+ id: z.string().optional(),
54
+ is_approved: z.boolean().optional(),
55
+ location_id: z.string().optional(),
56
+ raw: z.record(z.any()).optional(),
57
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
58
+ .optional(),
59
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
60
+ .optional(),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "approved_at": "approvedAt",
64
+ "approver_user_id": "approverUserId",
65
+ "company_id": "companyId",
66
+ "created_at": "createdAt",
67
+ "employee_user_id": "employeeUserId",
68
+ "end_at": "endAt",
69
+ "group_id": "groupId",
70
+ "is_approved": "isApproved",
71
+ "location_id": "locationId",
72
+ "start_at": "startAt",
73
+ "updated_at": "updatedAt",
74
+ });
75
+ });
76
+
77
+ /** @internal */
78
+ export type HrisTimeshift$Outbound = {
79
+ approved_at?: string | undefined;
80
+ approver_user_id?: string | undefined;
81
+ company_id?: string | undefined;
82
+ compensation?: Array<HrisCompensation$Outbound> | undefined;
83
+ created_at?: string | undefined;
84
+ employee_user_id?: string | undefined;
85
+ end_at?: string | undefined;
86
+ group_id?: string | undefined;
87
+ hours?: number | undefined;
88
+ id?: string | undefined;
89
+ is_approved?: boolean | undefined;
90
+ location_id?: string | undefined;
91
+ raw?: { [k: string]: any } | undefined;
92
+ start_at?: string | undefined;
93
+ updated_at?: string | undefined;
94
+ };
95
+
96
+ /** @internal */
97
+ export const HrisTimeshift$outboundSchema: z.ZodType<
98
+ HrisTimeshift$Outbound,
99
+ z.ZodTypeDef,
100
+ HrisTimeshift
101
+ > = z.object({
102
+ approvedAt: z.date().transform(v => v.toISOString()).optional(),
103
+ approverUserId: z.string().optional(),
104
+ companyId: z.string().optional(),
105
+ compensation: z.array(HrisCompensation$outboundSchema).optional(),
106
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
107
+ employeeUserId: z.string().optional(),
108
+ endAt: z.date().transform(v => v.toISOString()).optional(),
109
+ groupId: z.string().optional(),
110
+ hours: z.number().optional(),
111
+ id: z.string().optional(),
112
+ isApproved: z.boolean().optional(),
113
+ locationId: z.string().optional(),
114
+ raw: z.record(z.any()).optional(),
115
+ startAt: z.date().transform(v => v.toISOString()).optional(),
116
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
117
+ }).transform((v) => {
118
+ return remap$(v, {
119
+ approvedAt: "approved_at",
120
+ approverUserId: "approver_user_id",
121
+ companyId: "company_id",
122
+ createdAt: "created_at",
123
+ employeeUserId: "employee_user_id",
124
+ endAt: "end_at",
125
+ groupId: "group_id",
126
+ isApproved: "is_approved",
127
+ locationId: "location_id",
128
+ startAt: "start_at",
129
+ updatedAt: "updated_at",
130
+ });
131
+ });
132
+
133
+ /**
134
+ * @internal
135
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
136
+ */
137
+ export namespace HrisTimeshift$ {
138
+ /** @deprecated use `HrisTimeshift$inboundSchema` instead. */
139
+ export const inboundSchema = HrisTimeshift$inboundSchema;
140
+ /** @deprecated use `HrisTimeshift$outboundSchema` instead. */
141
+ export const outboundSchema = HrisTimeshift$outboundSchema;
142
+ /** @deprecated use `HrisTimeshift$Outbound` instead. */
143
+ export type Outbound = HrisTimeshift$Outbound;
144
+ }
145
+
146
+ export function hrisTimeshiftToJSON(hrisTimeshift: HrisTimeshift): string {
147
+ return JSON.stringify(HrisTimeshift$outboundSchema.parse(hrisTimeshift));
148
+ }
149
+
150
+ export function hrisTimeshiftFromJSON(
151
+ jsonString: string,
152
+ ): SafeParseResult<HrisTimeshift, SDKValidationError> {
153
+ return safeParse(
154
+ jsonString,
155
+ (x) => HrisTimeshift$inboundSchema.parse(JSON.parse(x)),
156
+ `Failed to parse 'HrisTimeshift' from JSON`,
157
+ );
158
+ }
@@ -101,6 +101,7 @@ export * from "./hrispayslip.js";
101
101
  export * from "./hrispayslipdetail.js";
102
102
  export * from "./hristelephone.js";
103
103
  export * from "./hristimeoff.js";
104
+ export * from "./hristimeshift.js";
104
105
  export * from "./integration.js";
105
106
  export * from "./issue.js";
106
107
  export * from "./kmscomment.js";
package/src/sdk/sdk.ts CHANGED
@@ -90,6 +90,7 @@ import { Taxrate } from "./taxrate.js";
90
90
  import { Ticket } from "./ticket.js";
91
91
  import { Ticketing } from "./ticketing.js";
92
92
  import { Timeoff } from "./timeoff.js";
93
+ import { Timeshift } from "./timeshift.js";
93
94
  import { Transaction } from "./transaction.js";
94
95
  import { Uc } from "./uc.js";
95
96
  import { Unified } from "./unified.js";
@@ -327,6 +328,11 @@ export class UnifiedTo extends ClientSDK {
327
328
  return (this._timeoff ??= new Timeoff(this._options));
328
329
  }
329
330
 
331
+ private _timeshift?: Timeshift;
332
+ get timeshift(): Timeshift {
333
+ return (this._timeshift ??= new Timeshift(this._options));
334
+ }
335
+
330
336
  private _kms?: Kms;
331
337
  get kms(): Kms {
332
338
  return (this._kms ??= new Kms(this._options));
@@ -0,0 +1,100 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { timeshiftCreateHrisTimeshift } from "../funcs/timeshiftCreateHrisTimeshift.js";
6
+ import { timeshiftGetHrisTimeshift } from "../funcs/timeshiftGetHrisTimeshift.js";
7
+ import { timeshiftListHrisTimeshifts } from "../funcs/timeshiftListHrisTimeshifts.js";
8
+ import { timeshiftPatchHrisTimeshift } from "../funcs/timeshiftPatchHrisTimeshift.js";
9
+ import { timeshiftRemoveHrisTimeshift } from "../funcs/timeshiftRemoveHrisTimeshift.js";
10
+ import { timeshiftUpdateHrisTimeshift } from "../funcs/timeshiftUpdateHrisTimeshift.js";
11
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
+ import * as operations from "./models/operations/index.js";
13
+ import * as shared from "./models/shared/index.js";
14
+ import { unwrapAsync } from "./types/fp.js";
15
+
16
+ export class Timeshift extends ClientSDK {
17
+ /**
18
+ * Create a timeshift
19
+ */
20
+ async createHrisTimeshift(
21
+ request: operations.CreateHrisTimeshiftRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<shared.HrisTimeshift> {
24
+ return unwrapAsync(timeshiftCreateHrisTimeshift(
25
+ this,
26
+ request,
27
+ options,
28
+ ));
29
+ }
30
+
31
+ /**
32
+ * Retrieve a timeshift
33
+ */
34
+ async getHrisTimeshift(
35
+ request: operations.GetHrisTimeshiftRequest,
36
+ options?: RequestOptions,
37
+ ): Promise<shared.HrisTimeshift> {
38
+ return unwrapAsync(timeshiftGetHrisTimeshift(
39
+ this,
40
+ request,
41
+ options,
42
+ ));
43
+ }
44
+
45
+ /**
46
+ * List all timeshifts
47
+ */
48
+ async listHrisTimeshifts(
49
+ request: operations.ListHrisTimeshiftsRequest,
50
+ options?: RequestOptions,
51
+ ): Promise<Array<shared.HrisTimeshift>> {
52
+ return unwrapAsync(timeshiftListHrisTimeshifts(
53
+ this,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ /**
60
+ * Update a timeshift
61
+ */
62
+ async patchHrisTimeshift(
63
+ request: operations.PatchHrisTimeshiftRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<shared.HrisTimeshift> {
66
+ return unwrapAsync(timeshiftPatchHrisTimeshift(
67
+ this,
68
+ request,
69
+ options,
70
+ ));
71
+ }
72
+
73
+ /**
74
+ * Remove a timeshift
75
+ */
76
+ async removeHrisTimeshift(
77
+ request: operations.RemoveHrisTimeshiftRequest,
78
+ options?: RequestOptions,
79
+ ): Promise<operations.RemoveHrisTimeshiftResponse | undefined> {
80
+ return unwrapAsync(timeshiftRemoveHrisTimeshift(
81
+ this,
82
+ request,
83
+ options,
84
+ ));
85
+ }
86
+
87
+ /**
88
+ * Update a timeshift
89
+ */
90
+ async updateHrisTimeshift(
91
+ request: operations.UpdateHrisTimeshiftRequest,
92
+ options?: RequestOptions,
93
+ ): Promise<shared.HrisTimeshift> {
94
+ return unwrapAsync(timeshiftUpdateHrisTimeshift(
95
+ this,
96
+ request,
97
+ options,
98
+ ));
99
+ }
100
+ }