@unified-api/typescript-sdk 2.83.27 → 2.83.28

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 (116) hide show
  1. package/README.md +8 -0
  2. package/dist/commonjs/funcs/hrisCreateHrisTimeoff.d.ts +15 -0
  3. package/dist/commonjs/funcs/hrisCreateHrisTimeoff.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/hrisCreateHrisTimeoff.js +122 -0
  5. package/dist/commonjs/funcs/hrisCreateHrisTimeoff.js.map +1 -0
  6. package/dist/commonjs/funcs/hrisPatchHrisTimeoff.d.ts +15 -0
  7. package/dist/commonjs/funcs/hrisPatchHrisTimeoff.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/hrisPatchHrisTimeoff.js +126 -0
  9. package/dist/commonjs/funcs/hrisPatchHrisTimeoff.js.map +1 -0
  10. package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.d.ts +14 -0
  11. package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.js +122 -0
  13. package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.js.map +1 -0
  14. package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.d.ts +15 -0
  15. package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.js +126 -0
  17. package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +2 -2
  19. package/dist/commonjs/lib/config.js +2 -2
  20. package/dist/commonjs/sdk/hris.d.ts +16 -0
  21. package/dist/commonjs/sdk/hris.d.ts.map +1 -1
  22. package/dist/commonjs/sdk/hris.js +28 -0
  23. package/dist/commonjs/sdk/hris.js.map +1 -1
  24. package/dist/commonjs/sdk/models/operations/createhristimeoff.d.ts +48 -0
  25. package/dist/commonjs/sdk/models/operations/createhristimeoff.d.ts.map +1 -0
  26. package/dist/commonjs/sdk/models/operations/createhristimeoff.js +77 -0
  27. package/dist/commonjs/sdk/models/operations/createhristimeoff.js.map +1 -0
  28. package/dist/commonjs/sdk/models/operations/index.d.ts +4 -0
  29. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/models/operations/index.js +4 -0
  31. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/patchhristimeoff.d.ts +53 -0
  33. package/dist/commonjs/sdk/models/operations/patchhristimeoff.d.ts.map +1 -0
  34. package/dist/commonjs/sdk/models/operations/patchhristimeoff.js +78 -0
  35. package/dist/commonjs/sdk/models/operations/patchhristimeoff.js.map +1 -0
  36. package/dist/commonjs/sdk/models/operations/removehristimeoff.d.ts +30 -0
  37. package/dist/commonjs/sdk/models/operations/removehristimeoff.d.ts.map +1 -0
  38. package/dist/commonjs/sdk/models/operations/removehristimeoff.js +68 -0
  39. package/dist/commonjs/sdk/models/operations/removehristimeoff.js.map +1 -0
  40. package/dist/commonjs/sdk/models/operations/updatehristimeoff.d.ts +53 -0
  41. package/dist/commonjs/sdk/models/operations/updatehristimeoff.d.ts.map +1 -0
  42. package/dist/commonjs/sdk/models/operations/updatehristimeoff.js +78 -0
  43. package/dist/commonjs/sdk/models/operations/updatehristimeoff.js.map +1 -0
  44. package/dist/commonjs/sdk/models/shared/hristimeoff.d.ts +25 -1
  45. package/dist/commonjs/sdk/models/shared/hristimeoff.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/models/shared/hristimeoff.js +38 -2
  47. package/dist/commonjs/sdk/models/shared/hristimeoff.js.map +1 -1
  48. package/dist/commonjs/sdk/timeoff.d.ts +16 -0
  49. package/dist/commonjs/sdk/timeoff.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/timeoff.js +28 -0
  51. package/dist/commonjs/sdk/timeoff.js.map +1 -1
  52. package/dist/esm/funcs/hrisCreateHrisTimeoff.d.ts +15 -0
  53. package/dist/esm/funcs/hrisCreateHrisTimeoff.d.ts.map +1 -0
  54. package/dist/esm/funcs/hrisCreateHrisTimeoff.js +86 -0
  55. package/dist/esm/funcs/hrisCreateHrisTimeoff.js.map +1 -0
  56. package/dist/esm/funcs/hrisPatchHrisTimeoff.d.ts +15 -0
  57. package/dist/esm/funcs/hrisPatchHrisTimeoff.d.ts.map +1 -0
  58. package/dist/esm/funcs/hrisPatchHrisTimeoff.js +90 -0
  59. package/dist/esm/funcs/hrisPatchHrisTimeoff.js.map +1 -0
  60. package/dist/esm/funcs/hrisRemoveHrisTimeoff.d.ts +14 -0
  61. package/dist/esm/funcs/hrisRemoveHrisTimeoff.d.ts.map +1 -0
  62. package/dist/esm/funcs/hrisRemoveHrisTimeoff.js +86 -0
  63. package/dist/esm/funcs/hrisRemoveHrisTimeoff.js.map +1 -0
  64. package/dist/esm/funcs/hrisUpdateHrisTimeoff.d.ts +15 -0
  65. package/dist/esm/funcs/hrisUpdateHrisTimeoff.d.ts.map +1 -0
  66. package/dist/esm/funcs/hrisUpdateHrisTimeoff.js +90 -0
  67. package/dist/esm/funcs/hrisUpdateHrisTimeoff.js.map +1 -0
  68. package/dist/esm/lib/config.d.ts +2 -2
  69. package/dist/esm/lib/config.js +2 -2
  70. package/dist/esm/sdk/hris.d.ts +16 -0
  71. package/dist/esm/sdk/hris.d.ts.map +1 -1
  72. package/dist/esm/sdk/hris.js +28 -0
  73. package/dist/esm/sdk/hris.js.map +1 -1
  74. package/dist/esm/sdk/models/operations/createhristimeoff.d.ts +48 -0
  75. package/dist/esm/sdk/models/operations/createhristimeoff.d.ts.map +1 -0
  76. package/dist/esm/sdk/models/operations/createhristimeoff.js +40 -0
  77. package/dist/esm/sdk/models/operations/createhristimeoff.js.map +1 -0
  78. package/dist/esm/sdk/models/operations/index.d.ts +4 -0
  79. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  80. package/dist/esm/sdk/models/operations/index.js +4 -0
  81. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  82. package/dist/esm/sdk/models/operations/patchhristimeoff.d.ts +53 -0
  83. package/dist/esm/sdk/models/operations/patchhristimeoff.d.ts.map +1 -0
  84. package/dist/esm/sdk/models/operations/patchhristimeoff.js +41 -0
  85. package/dist/esm/sdk/models/operations/patchhristimeoff.js.map +1 -0
  86. package/dist/esm/sdk/models/operations/removehristimeoff.d.ts +30 -0
  87. package/dist/esm/sdk/models/operations/removehristimeoff.d.ts.map +1 -0
  88. package/dist/esm/sdk/models/operations/removehristimeoff.js +30 -0
  89. package/dist/esm/sdk/models/operations/removehristimeoff.js.map +1 -0
  90. package/dist/esm/sdk/models/operations/updatehristimeoff.d.ts +53 -0
  91. package/dist/esm/sdk/models/operations/updatehristimeoff.d.ts.map +1 -0
  92. package/dist/esm/sdk/models/operations/updatehristimeoff.js +41 -0
  93. package/dist/esm/sdk/models/operations/updatehristimeoff.js.map +1 -0
  94. package/dist/esm/sdk/models/shared/hristimeoff.d.ts +25 -1
  95. package/dist/esm/sdk/models/shared/hristimeoff.d.ts.map +1 -1
  96. package/dist/esm/sdk/models/shared/hristimeoff.js +36 -1
  97. package/dist/esm/sdk/models/shared/hristimeoff.js.map +1 -1
  98. package/dist/esm/sdk/timeoff.d.ts +16 -0
  99. package/dist/esm/sdk/timeoff.d.ts.map +1 -1
  100. package/dist/esm/sdk/timeoff.js +28 -0
  101. package/dist/esm/sdk/timeoff.js.map +1 -1
  102. package/jsr.json +1 -1
  103. package/package.json +1 -1
  104. package/src/funcs/hrisCreateHrisTimeoff.ts +169 -0
  105. package/src/funcs/hrisPatchHrisTimeoff.ts +173 -0
  106. package/src/funcs/hrisRemoveHrisTimeoff.ts +174 -0
  107. package/src/funcs/hrisUpdateHrisTimeoff.ts +173 -0
  108. package/src/lib/config.ts +2 -2
  109. package/src/sdk/hris.ts +60 -0
  110. package/src/sdk/models/operations/createhristimeoff.ts +82 -0
  111. package/src/sdk/models/operations/index.ts +4 -0
  112. package/src/sdk/models/operations/patchhristimeoff.ts +88 -0
  113. package/src/sdk/models/operations/removehristimeoff.ts +75 -0
  114. package/src/sdk/models/operations/updatehristimeoff.ts +88 -0
  115. package/src/sdk/models/shared/hristimeoff.ts +63 -2
  116. package/src/sdk/timeoff.ts +60 -0
@@ -0,0 +1,82 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import * as shared from "../shared/index.js";
9
+
10
+ export const CreateHrisTimeoffQueryParamFields = {
11
+ Id: "id",
12
+ CreatedAt: "created_at",
13
+ UpdatedAt: "updated_at",
14
+ UserId: "user_id",
15
+ CompanyId: "company_id",
16
+ StartAt: "start_at",
17
+ EndAt: "end_at",
18
+ IsPaid: "is_paid",
19
+ Status: "status",
20
+ ApproverUserId: "approver_user_id",
21
+ ApprovedAt: "approved_at",
22
+ Comments: "comments",
23
+ Raw: "raw",
24
+ Reason: "reason",
25
+ } as const;
26
+ export type CreateHrisTimeoffQueryParamFields = ClosedEnum<
27
+ typeof CreateHrisTimeoffQueryParamFields
28
+ >;
29
+
30
+ export type CreateHrisTimeoffRequest = {
31
+ hrisTimeoff: shared.HrisTimeoff;
32
+ /**
33
+ * ID of the connection
34
+ */
35
+ connectionId: string;
36
+ /**
37
+ * Fields to return
38
+ */
39
+ fields?: Array<CreateHrisTimeoffQueryParamFields> | undefined;
40
+ /**
41
+ * 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
42
+ */
43
+ raw?: string | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const CreateHrisTimeoffQueryParamFields$outboundSchema: z.ZodNativeEnum<
48
+ typeof CreateHrisTimeoffQueryParamFields
49
+ > = z.nativeEnum(CreateHrisTimeoffQueryParamFields);
50
+
51
+ /** @internal */
52
+ export type CreateHrisTimeoffRequest$Outbound = {
53
+ HrisTimeoff: shared.HrisTimeoff$Outbound;
54
+ connection_id: string;
55
+ fields?: Array<string> | undefined;
56
+ raw?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const CreateHrisTimeoffRequest$outboundSchema: z.ZodType<
61
+ CreateHrisTimeoffRequest$Outbound,
62
+ z.ZodTypeDef,
63
+ CreateHrisTimeoffRequest
64
+ > = z.object({
65
+ hrisTimeoff: shared.HrisTimeoff$outboundSchema,
66
+ connectionId: z.string(),
67
+ fields: z.array(CreateHrisTimeoffQueryParamFields$outboundSchema).optional(),
68
+ raw: z.string().optional(),
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ hrisTimeoff: "HrisTimeoff",
72
+ connectionId: "connection_id",
73
+ });
74
+ });
75
+
76
+ export function createHrisTimeoffRequestToJSON(
77
+ createHrisTimeoffRequest: CreateHrisTimeoffRequest,
78
+ ): string {
79
+ return JSON.stringify(
80
+ CreateHrisTimeoffRequest$outboundSchema.parse(createHrisTimeoffRequest),
81
+ );
82
+ }
@@ -59,6 +59,7 @@ export * from "./createhrisdevice.js";
59
59
  export * from "./createhrisemployee.js";
60
60
  export * from "./createhrisgroup.js";
61
61
  export * from "./createhrislocation.js";
62
+ export * from "./createhristimeoff.js";
62
63
  export * from "./createhristimeshift.js";
63
64
  export * from "./createkmscomment.js";
64
65
  export * from "./createkmspage.js";
@@ -408,6 +409,7 @@ export * from "./patchhrisdevice.js";
408
409
  export * from "./patchhrisemployee.js";
409
410
  export * from "./patchhrisgroup.js";
410
411
  export * from "./patchhrislocation.js";
412
+ export * from "./patchhristimeoff.js";
411
413
  export * from "./patchhristimeshift.js";
412
414
  export * from "./patchkmscomment.js";
413
415
  export * from "./patchkmspage.js";
@@ -509,6 +511,7 @@ export * from "./removehrisdevice.js";
509
511
  export * from "./removehrisemployee.js";
510
512
  export * from "./removehrisgroup.js";
511
513
  export * from "./removehrislocation.js";
514
+ export * from "./removehristimeoff.js";
512
515
  export * from "./removehristimeshift.js";
513
516
  export * from "./removekmscomment.js";
514
517
  export * from "./removekmspage.js";
@@ -609,6 +612,7 @@ export * from "./updatehrisdevice.js";
609
612
  export * from "./updatehrisemployee.js";
610
613
  export * from "./updatehrisgroup.js";
611
614
  export * from "./updatehrislocation.js";
615
+ export * from "./updatehristimeoff.js";
612
616
  export * from "./updatehristimeshift.js";
613
617
  export * from "./updatekmscomment.js";
614
618
  export * from "./updatekmspage.js";
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import * as shared from "../shared/index.js";
9
+
10
+ export const PatchHrisTimeoffQueryParamFields = {
11
+ Id: "id",
12
+ CreatedAt: "created_at",
13
+ UpdatedAt: "updated_at",
14
+ UserId: "user_id",
15
+ CompanyId: "company_id",
16
+ StartAt: "start_at",
17
+ EndAt: "end_at",
18
+ IsPaid: "is_paid",
19
+ Status: "status",
20
+ ApproverUserId: "approver_user_id",
21
+ ApprovedAt: "approved_at",
22
+ Comments: "comments",
23
+ Raw: "raw",
24
+ Reason: "reason",
25
+ } as const;
26
+ export type PatchHrisTimeoffQueryParamFields = ClosedEnum<
27
+ typeof PatchHrisTimeoffQueryParamFields
28
+ >;
29
+
30
+ export type PatchHrisTimeoffRequest = {
31
+ hrisTimeoff: shared.HrisTimeoff;
32
+ /**
33
+ * ID of the connection
34
+ */
35
+ connectionId: string;
36
+ /**
37
+ * Fields to return
38
+ */
39
+ fields?: Array<PatchHrisTimeoffQueryParamFields> | undefined;
40
+ /**
41
+ * ID of the Timeoff
42
+ */
43
+ id: string;
44
+ /**
45
+ * 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
46
+ */
47
+ raw?: string | undefined;
48
+ };
49
+
50
+ /** @internal */
51
+ export const PatchHrisTimeoffQueryParamFields$outboundSchema: z.ZodNativeEnum<
52
+ typeof PatchHrisTimeoffQueryParamFields
53
+ > = z.nativeEnum(PatchHrisTimeoffQueryParamFields);
54
+
55
+ /** @internal */
56
+ export type PatchHrisTimeoffRequest$Outbound = {
57
+ HrisTimeoff: shared.HrisTimeoff$Outbound;
58
+ connection_id: string;
59
+ fields?: Array<string> | undefined;
60
+ id: string;
61
+ raw?: string | undefined;
62
+ };
63
+
64
+ /** @internal */
65
+ export const PatchHrisTimeoffRequest$outboundSchema: z.ZodType<
66
+ PatchHrisTimeoffRequest$Outbound,
67
+ z.ZodTypeDef,
68
+ PatchHrisTimeoffRequest
69
+ > = z.object({
70
+ hrisTimeoff: shared.HrisTimeoff$outboundSchema,
71
+ connectionId: z.string(),
72
+ fields: z.array(PatchHrisTimeoffQueryParamFields$outboundSchema).optional(),
73
+ id: z.string(),
74
+ raw: z.string().optional(),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ hrisTimeoff: "HrisTimeoff",
78
+ connectionId: "connection_id",
79
+ });
80
+ });
81
+
82
+ export function patchHrisTimeoffRequestToJSON(
83
+ patchHrisTimeoffRequest: PatchHrisTimeoffRequest,
84
+ ): string {
85
+ return JSON.stringify(
86
+ PatchHrisTimeoffRequest$outboundSchema.parse(patchHrisTimeoffRequest),
87
+ );
88
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 RemoveHrisTimeoffRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * ID of the Timeoff
18
+ */
19
+ id: string;
20
+ };
21
+
22
+ export type RemoveHrisTimeoffResponse = {
23
+ headers: { [k: string]: Array<string> };
24
+ };
25
+
26
+ /** @internal */
27
+ export type RemoveHrisTimeoffRequest$Outbound = {
28
+ connection_id: string;
29
+ id: string;
30
+ };
31
+
32
+ /** @internal */
33
+ export const RemoveHrisTimeoffRequest$outboundSchema: z.ZodType<
34
+ RemoveHrisTimeoffRequest$Outbound,
35
+ z.ZodTypeDef,
36
+ RemoveHrisTimeoffRequest
37
+ > = z.object({
38
+ connectionId: z.string(),
39
+ id: z.string(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ connectionId: "connection_id",
43
+ });
44
+ });
45
+
46
+ export function removeHrisTimeoffRequestToJSON(
47
+ removeHrisTimeoffRequest: RemoveHrisTimeoffRequest,
48
+ ): string {
49
+ return JSON.stringify(
50
+ RemoveHrisTimeoffRequest$outboundSchema.parse(removeHrisTimeoffRequest),
51
+ );
52
+ }
53
+
54
+ /** @internal */
55
+ export const RemoveHrisTimeoffResponse$inboundSchema: z.ZodType<
56
+ RemoveHrisTimeoffResponse,
57
+ z.ZodTypeDef,
58
+ unknown
59
+ > = z.object({
60
+ Headers: z.record(z.array(z.string())).default({}),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "Headers": "headers",
64
+ });
65
+ });
66
+
67
+ export function removeHrisTimeoffResponseFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<RemoveHrisTimeoffResponse, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => RemoveHrisTimeoffResponse$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'RemoveHrisTimeoffResponse' from JSON`,
74
+ );
75
+ }
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import * as shared from "../shared/index.js";
9
+
10
+ export const UpdateHrisTimeoffQueryParamFields = {
11
+ Id: "id",
12
+ CreatedAt: "created_at",
13
+ UpdatedAt: "updated_at",
14
+ UserId: "user_id",
15
+ CompanyId: "company_id",
16
+ StartAt: "start_at",
17
+ EndAt: "end_at",
18
+ IsPaid: "is_paid",
19
+ Status: "status",
20
+ ApproverUserId: "approver_user_id",
21
+ ApprovedAt: "approved_at",
22
+ Comments: "comments",
23
+ Raw: "raw",
24
+ Reason: "reason",
25
+ } as const;
26
+ export type UpdateHrisTimeoffQueryParamFields = ClosedEnum<
27
+ typeof UpdateHrisTimeoffQueryParamFields
28
+ >;
29
+
30
+ export type UpdateHrisTimeoffRequest = {
31
+ hrisTimeoff: shared.HrisTimeoff;
32
+ /**
33
+ * ID of the connection
34
+ */
35
+ connectionId: string;
36
+ /**
37
+ * Fields to return
38
+ */
39
+ fields?: Array<UpdateHrisTimeoffQueryParamFields> | undefined;
40
+ /**
41
+ * ID of the Timeoff
42
+ */
43
+ id: string;
44
+ /**
45
+ * 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
46
+ */
47
+ raw?: string | undefined;
48
+ };
49
+
50
+ /** @internal */
51
+ export const UpdateHrisTimeoffQueryParamFields$outboundSchema: z.ZodNativeEnum<
52
+ typeof UpdateHrisTimeoffQueryParamFields
53
+ > = z.nativeEnum(UpdateHrisTimeoffQueryParamFields);
54
+
55
+ /** @internal */
56
+ export type UpdateHrisTimeoffRequest$Outbound = {
57
+ HrisTimeoff: shared.HrisTimeoff$Outbound;
58
+ connection_id: string;
59
+ fields?: Array<string> | undefined;
60
+ id: string;
61
+ raw?: string | undefined;
62
+ };
63
+
64
+ /** @internal */
65
+ export const UpdateHrisTimeoffRequest$outboundSchema: z.ZodType<
66
+ UpdateHrisTimeoffRequest$Outbound,
67
+ z.ZodTypeDef,
68
+ UpdateHrisTimeoffRequest
69
+ > = z.object({
70
+ hrisTimeoff: shared.HrisTimeoff$outboundSchema,
71
+ connectionId: z.string(),
72
+ fields: z.array(UpdateHrisTimeoffQueryParamFields$outboundSchema).optional(),
73
+ id: z.string(),
74
+ raw: z.string().optional(),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ hrisTimeoff: "HrisTimeoff",
78
+ connectionId: "connection_id",
79
+ });
80
+ });
81
+
82
+ export function updateHrisTimeoffRequestToJSON(
83
+ updateHrisTimeoffRequest: UpdateHrisTimeoffRequest,
84
+ ): string {
85
+ return JSON.stringify(
86
+ UpdateHrisTimeoffRequest$outboundSchema.parse(updateHrisTimeoffRequest),
87
+ );
88
+ }
@@ -28,7 +28,7 @@ export type HrisTimeoff = {
28
28
  isPaid?: boolean | undefined;
29
29
  raw?: { [k: string]: any } | undefined;
30
30
  reason?: string | undefined;
31
- startAt: Date;
31
+ startAt?: Date | undefined;
32
32
  status?: HrisTimeoffStatus | undefined;
33
33
  updatedAt?: Date | undefined;
34
34
  userId?: string | undefined;
@@ -40,6 +40,12 @@ export const HrisTimeoffStatus$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = openEnums.inboundSchema(HrisTimeoffStatus);
43
+ /** @internal */
44
+ export const HrisTimeoffStatus$outboundSchema: z.ZodType<
45
+ string,
46
+ z.ZodTypeDef,
47
+ HrisTimeoffStatus
48
+ > = openEnums.outboundSchema(HrisTimeoffStatus);
43
49
 
44
50
  /** @internal */
45
51
  export const HrisTimeoff$inboundSchema: z.ZodType<
@@ -60,7 +66,8 @@ export const HrisTimeoff$inboundSchema: z.ZodType<
60
66
  is_paid: z.boolean().optional(),
61
67
  raw: z.record(z.any()).optional(),
62
68
  reason: z.string().optional(),
63
- start_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
69
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
70
+ .optional(),
64
71
  status: HrisTimeoffStatus$inboundSchema.optional(),
65
72
  updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
66
73
  .optional(),
@@ -78,7 +85,61 @@ export const HrisTimeoff$inboundSchema: z.ZodType<
78
85
  "user_id": "userId",
79
86
  });
80
87
  });
88
+ /** @internal */
89
+ export type HrisTimeoff$Outbound = {
90
+ approved_at?: string | undefined;
91
+ approver_user_id?: string | undefined;
92
+ comments?: string | undefined;
93
+ company_id?: string | undefined;
94
+ created_at?: string | undefined;
95
+ end_at?: string | undefined;
96
+ id?: string | undefined;
97
+ is_paid?: boolean | undefined;
98
+ raw?: { [k: string]: any } | undefined;
99
+ reason?: string | undefined;
100
+ start_at?: string | undefined;
101
+ status?: string | undefined;
102
+ updated_at?: string | undefined;
103
+ user_id?: string | undefined;
104
+ };
105
+
106
+ /** @internal */
107
+ export const HrisTimeoff$outboundSchema: z.ZodType<
108
+ HrisTimeoff$Outbound,
109
+ z.ZodTypeDef,
110
+ HrisTimeoff
111
+ > = z.object({
112
+ approvedAt: z.date().transform(v => v.toISOString()).optional(),
113
+ approverUserId: z.string().optional(),
114
+ comments: z.string().optional(),
115
+ companyId: z.string().optional(),
116
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
117
+ endAt: z.date().transform(v => v.toISOString()).optional(),
118
+ id: z.string().optional(),
119
+ isPaid: z.boolean().optional(),
120
+ raw: z.record(z.any()).optional(),
121
+ reason: z.string().optional(),
122
+ startAt: z.date().transform(v => v.toISOString()).optional(),
123
+ status: HrisTimeoffStatus$outboundSchema.optional(),
124
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
125
+ userId: z.string().optional(),
126
+ }).transform((v) => {
127
+ return remap$(v, {
128
+ approvedAt: "approved_at",
129
+ approverUserId: "approver_user_id",
130
+ companyId: "company_id",
131
+ createdAt: "created_at",
132
+ endAt: "end_at",
133
+ isPaid: "is_paid",
134
+ startAt: "start_at",
135
+ updatedAt: "updated_at",
136
+ userId: "user_id",
137
+ });
138
+ });
81
139
 
140
+ export function hrisTimeoffToJSON(hrisTimeoff: HrisTimeoff): string {
141
+ return JSON.stringify(HrisTimeoff$outboundSchema.parse(hrisTimeoff));
142
+ }
82
143
  export function hrisTimeoffFromJSON(
83
144
  jsonString: string,
84
145
  ): SafeParseResult<HrisTimeoff, SDKValidationError> {
@@ -2,14 +2,32 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { hrisCreateHrisTimeoff } from "../funcs/hrisCreateHrisTimeoff.js";
5
6
  import { hrisGetHrisTimeoff } from "../funcs/hrisGetHrisTimeoff.js";
6
7
  import { hrisListHrisTimeoffs } from "../funcs/hrisListHrisTimeoffs.js";
8
+ import { hrisPatchHrisTimeoff } from "../funcs/hrisPatchHrisTimeoff.js";
9
+ import { hrisRemoveHrisTimeoff } from "../funcs/hrisRemoveHrisTimeoff.js";
10
+ import { hrisUpdateHrisTimeoff } from "../funcs/hrisUpdateHrisTimeoff.js";
7
11
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
12
  import * as operations from "./models/operations/index.js";
9
13
  import * as shared from "./models/shared/index.js";
10
14
  import { unwrapAsync } from "./types/fp.js";
11
15
 
12
16
  export class Timeoff extends ClientSDK {
17
+ /**
18
+ * Create a timeoff
19
+ */
20
+ async createHrisTimeoff(
21
+ request: operations.CreateHrisTimeoffRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<shared.HrisTimeoff> {
24
+ return unwrapAsync(hrisCreateHrisTimeoff(
25
+ this,
26
+ request,
27
+ options,
28
+ ));
29
+ }
30
+
13
31
  /**
14
32
  * Retrieve a timeoff
15
33
  */
@@ -37,4 +55,46 @@ export class Timeoff extends ClientSDK {
37
55
  options,
38
56
  ));
39
57
  }
58
+
59
+ /**
60
+ * Update a timeoff
61
+ */
62
+ async patchHrisTimeoff(
63
+ request: operations.PatchHrisTimeoffRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<shared.HrisTimeoff> {
66
+ return unwrapAsync(hrisPatchHrisTimeoff(
67
+ this,
68
+ request,
69
+ options,
70
+ ));
71
+ }
72
+
73
+ /**
74
+ * Remove a timeoff
75
+ */
76
+ async removeHrisTimeoff(
77
+ request: operations.RemoveHrisTimeoffRequest,
78
+ options?: RequestOptions,
79
+ ): Promise<operations.RemoveHrisTimeoffResponse | undefined> {
80
+ return unwrapAsync(hrisRemoveHrisTimeoff(
81
+ this,
82
+ request,
83
+ options,
84
+ ));
85
+ }
86
+
87
+ /**
88
+ * Update a timeoff
89
+ */
90
+ async updateHrisTimeoff(
91
+ request: operations.UpdateHrisTimeoffRequest,
92
+ options?: RequestOptions,
93
+ ): Promise<shared.HrisTimeoff> {
94
+ return unwrapAsync(hrisUpdateHrisTimeoff(
95
+ this,
96
+ request,
97
+ options,
98
+ ));
99
+ }
40
100
  }