@unified-api/typescript-sdk 2.73.20 → 2.73.22
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.
- package/bin/mcp-server.js +30 -31
- package/bin/mcp-server.js.map +8 -8
- package/docs/sdks/hris/README.md +30 -6
- package/docs/sdks/timeshift/README.md +30 -6
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/sdk/models/shared/hriscompensation.d.ts +2 -0
- package/sdk/models/shared/hriscompensation.d.ts.map +1 -1
- package/sdk/models/shared/hriscompensation.js +11 -0
- package/sdk/models/shared/hriscompensation.js.map +1 -1
- package/sdk/models/shared/hristimeoff.d.ts +4 -21
- package/sdk/models/shared/hristimeoff.d.ts.map +1 -1
- package/sdk/models/shared/hristimeoff.js +7 -29
- package/sdk/models/shared/hristimeoff.js.map +1 -1
- package/sdk/models/shared/hristimeshift.d.ts +6 -6
- package/sdk/models/shared/hristimeshift.d.ts.map +1 -1
- package/sdk/models/shared/hristimeshift.js +6 -8
- package/sdk/models/shared/hristimeshift.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/sdk/models/shared/hriscompensation.ts +13 -0
- package/src/sdk/models/shared/hristimeoff.ts +10 -42
- package/src/sdk/models/shared/hristimeshift.ts +12 -14
package/src/mcp-server/server.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../../lib/schemas.js";
|
|
7
8
|
import {
|
|
8
9
|
catchUnrecognizedEnum,
|
|
@@ -38,6 +39,7 @@ export type HrisCompensation = {
|
|
|
38
39
|
amount?: number | undefined;
|
|
39
40
|
currency?: string | undefined;
|
|
40
41
|
frequency?: HrisCompensationFrequency | undefined;
|
|
42
|
+
groupId?: string | undefined;
|
|
41
43
|
type?: HrisCompensationType | undefined;
|
|
42
44
|
};
|
|
43
45
|
|
|
@@ -114,7 +116,12 @@ export const HrisCompensation$inboundSchema: z.ZodType<
|
|
|
114
116
|
amount: z.number().optional(),
|
|
115
117
|
currency: z.string().optional(),
|
|
116
118
|
frequency: HrisCompensationFrequency$inboundSchema.optional(),
|
|
119
|
+
group_id: z.string().optional(),
|
|
117
120
|
type: HrisCompensationType$inboundSchema.optional(),
|
|
121
|
+
}).transform((v) => {
|
|
122
|
+
return remap$(v, {
|
|
123
|
+
"group_id": "groupId",
|
|
124
|
+
});
|
|
118
125
|
});
|
|
119
126
|
|
|
120
127
|
/** @internal */
|
|
@@ -122,6 +129,7 @@ export type HrisCompensation$Outbound = {
|
|
|
122
129
|
amount?: number | undefined;
|
|
123
130
|
currency?: string | undefined;
|
|
124
131
|
frequency?: string | undefined;
|
|
132
|
+
group_id?: string | undefined;
|
|
125
133
|
type?: string | undefined;
|
|
126
134
|
};
|
|
127
135
|
|
|
@@ -134,7 +142,12 @@ export const HrisCompensation$outboundSchema: z.ZodType<
|
|
|
134
142
|
amount: z.number().optional(),
|
|
135
143
|
currency: z.string().optional(),
|
|
136
144
|
frequency: HrisCompensationFrequency$outboundSchema.optional(),
|
|
145
|
+
groupId: z.string().optional(),
|
|
137
146
|
type: HrisCompensationType$outboundSchema.optional(),
|
|
147
|
+
}).transform((v) => {
|
|
148
|
+
return remap$(v, {
|
|
149
|
+
groupId: "group_id",
|
|
150
|
+
});
|
|
138
151
|
});
|
|
139
152
|
|
|
140
153
|
/**
|
|
@@ -20,12 +20,6 @@ export const HrisTimeoffStatus = {
|
|
|
20
20
|
} as const;
|
|
21
21
|
export type HrisTimeoffStatus = OpenEnum<typeof HrisTimeoffStatus>;
|
|
22
22
|
|
|
23
|
-
export const HrisTimeoffType = {
|
|
24
|
-
Paid: "PAID",
|
|
25
|
-
Unpaid: "UNPAID",
|
|
26
|
-
} as const;
|
|
27
|
-
export type HrisTimeoffType = OpenEnum<typeof HrisTimeoffType>;
|
|
28
|
-
|
|
29
23
|
export type HrisTimeoff = {
|
|
30
24
|
approvedAt?: Date | undefined;
|
|
31
25
|
approverUserId?: string | undefined;
|
|
@@ -34,10 +28,11 @@ export type HrisTimeoff = {
|
|
|
34
28
|
createdAt?: Date | undefined;
|
|
35
29
|
endAt?: Date | undefined;
|
|
36
30
|
id?: string | undefined;
|
|
31
|
+
isPaid?: boolean | undefined;
|
|
37
32
|
raw?: { [k: string]: any } | undefined;
|
|
33
|
+
reason?: string | undefined;
|
|
38
34
|
startAt: Date;
|
|
39
35
|
status?: HrisTimeoffStatus | undefined;
|
|
40
|
-
type?: HrisTimeoffType | undefined;
|
|
41
36
|
updatedAt?: Date | undefined;
|
|
42
37
|
userId?: string | undefined;
|
|
43
38
|
};
|
|
@@ -74,38 +69,6 @@ export namespace HrisTimeoffStatus$ {
|
|
|
74
69
|
export const outboundSchema = HrisTimeoffStatus$outboundSchema;
|
|
75
70
|
}
|
|
76
71
|
|
|
77
|
-
/** @internal */
|
|
78
|
-
export const HrisTimeoffType$inboundSchema: z.ZodType<
|
|
79
|
-
HrisTimeoffType,
|
|
80
|
-
z.ZodTypeDef,
|
|
81
|
-
unknown
|
|
82
|
-
> = z
|
|
83
|
-
.union([
|
|
84
|
-
z.nativeEnum(HrisTimeoffType),
|
|
85
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
86
|
-
]);
|
|
87
|
-
|
|
88
|
-
/** @internal */
|
|
89
|
-
export const HrisTimeoffType$outboundSchema: z.ZodType<
|
|
90
|
-
HrisTimeoffType,
|
|
91
|
-
z.ZodTypeDef,
|
|
92
|
-
HrisTimeoffType
|
|
93
|
-
> = z.union([
|
|
94
|
-
z.nativeEnum(HrisTimeoffType),
|
|
95
|
-
z.string().and(z.custom<Unrecognized<string>>()),
|
|
96
|
-
]);
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
-
*/
|
|
102
|
-
export namespace HrisTimeoffType$ {
|
|
103
|
-
/** @deprecated use `HrisTimeoffType$inboundSchema` instead. */
|
|
104
|
-
export const inboundSchema = HrisTimeoffType$inboundSchema;
|
|
105
|
-
/** @deprecated use `HrisTimeoffType$outboundSchema` instead. */
|
|
106
|
-
export const outboundSchema = HrisTimeoffType$outboundSchema;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
72
|
/** @internal */
|
|
110
73
|
export const HrisTimeoff$inboundSchema: z.ZodType<
|
|
111
74
|
HrisTimeoff,
|
|
@@ -122,10 +85,11 @@ export const HrisTimeoff$inboundSchema: z.ZodType<
|
|
|
122
85
|
end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
123
86
|
.optional(),
|
|
124
87
|
id: z.string().optional(),
|
|
88
|
+
is_paid: z.boolean().optional(),
|
|
125
89
|
raw: z.record(z.any()).optional(),
|
|
90
|
+
reason: z.string().optional(),
|
|
126
91
|
start_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
127
92
|
status: HrisTimeoffStatus$inboundSchema.optional(),
|
|
128
|
-
type: HrisTimeoffType$inboundSchema.optional(),
|
|
129
93
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
130
94
|
.optional(),
|
|
131
95
|
user_id: z.string().optional(),
|
|
@@ -136,6 +100,7 @@ export const HrisTimeoff$inboundSchema: z.ZodType<
|
|
|
136
100
|
"company_id": "companyId",
|
|
137
101
|
"created_at": "createdAt",
|
|
138
102
|
"end_at": "endAt",
|
|
103
|
+
"is_paid": "isPaid",
|
|
139
104
|
"start_at": "startAt",
|
|
140
105
|
"updated_at": "updatedAt",
|
|
141
106
|
"user_id": "userId",
|
|
@@ -151,10 +116,11 @@ export type HrisTimeoff$Outbound = {
|
|
|
151
116
|
created_at?: string | undefined;
|
|
152
117
|
end_at?: string | undefined;
|
|
153
118
|
id?: string | undefined;
|
|
119
|
+
is_paid?: boolean | undefined;
|
|
154
120
|
raw?: { [k: string]: any } | undefined;
|
|
121
|
+
reason?: string | undefined;
|
|
155
122
|
start_at: string;
|
|
156
123
|
status?: string | undefined;
|
|
157
|
-
type?: string | undefined;
|
|
158
124
|
updated_at?: string | undefined;
|
|
159
125
|
user_id?: string | undefined;
|
|
160
126
|
};
|
|
@@ -172,10 +138,11 @@ export const HrisTimeoff$outboundSchema: z.ZodType<
|
|
|
172
138
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
173
139
|
endAt: z.date().transform(v => v.toISOString()).optional(),
|
|
174
140
|
id: z.string().optional(),
|
|
141
|
+
isPaid: z.boolean().optional(),
|
|
175
142
|
raw: z.record(z.any()).optional(),
|
|
143
|
+
reason: z.string().optional(),
|
|
176
144
|
startAt: z.date().transform(v => v.toISOString()),
|
|
177
145
|
status: HrisTimeoffStatus$outboundSchema.optional(),
|
|
178
|
-
type: HrisTimeoffType$outboundSchema.optional(),
|
|
179
146
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
180
147
|
userId: z.string().optional(),
|
|
181
148
|
}).transform((v) => {
|
|
@@ -185,6 +152,7 @@ export const HrisTimeoff$outboundSchema: z.ZodType<
|
|
|
185
152
|
companyId: "company_id",
|
|
186
153
|
createdAt: "created_at",
|
|
187
154
|
endAt: "end_at",
|
|
155
|
+
isPaid: "is_paid",
|
|
188
156
|
startAt: "start_at",
|
|
189
157
|
updatedAt: "updated_at",
|
|
190
158
|
userId: "user_id",
|
|
@@ -20,15 +20,15 @@ export type HrisTimeshift = {
|
|
|
20
20
|
companyId?: string | undefined;
|
|
21
21
|
compensation?: Array<HrisCompensation> | undefined;
|
|
22
22
|
createdAt?: Date | undefined;
|
|
23
|
-
employeeUserId
|
|
24
|
-
endAt
|
|
23
|
+
employeeUserId: string;
|
|
24
|
+
endAt: Date;
|
|
25
25
|
groupId?: string | undefined;
|
|
26
26
|
hours?: number | undefined;
|
|
27
27
|
id?: string | undefined;
|
|
28
28
|
isApproved?: boolean | undefined;
|
|
29
29
|
locationId?: string | undefined;
|
|
30
30
|
raw?: { [k: string]: any } | undefined;
|
|
31
|
-
startAt
|
|
31
|
+
startAt: Date;
|
|
32
32
|
updatedAt?: Date | undefined;
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -45,17 +45,15 @@ export const HrisTimeshift$inboundSchema: z.ZodType<
|
|
|
45
45
|
compensation: z.array(HrisCompensation$inboundSchema).optional(),
|
|
46
46
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
47
47
|
.optional(),
|
|
48
|
-
employee_user_id: z.string()
|
|
49
|
-
end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
50
|
-
.optional(),
|
|
48
|
+
employee_user_id: z.string(),
|
|
49
|
+
end_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
51
50
|
group_id: z.string().optional(),
|
|
52
51
|
hours: z.number().optional(),
|
|
53
52
|
id: z.string().optional(),
|
|
54
53
|
is_approved: z.boolean().optional(),
|
|
55
54
|
location_id: z.string().optional(),
|
|
56
55
|
raw: z.record(z.any()).optional(),
|
|
57
|
-
start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
58
|
-
.optional(),
|
|
56
|
+
start_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
59
57
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
60
58
|
.optional(),
|
|
61
59
|
}).transform((v) => {
|
|
@@ -81,15 +79,15 @@ export type HrisTimeshift$Outbound = {
|
|
|
81
79
|
company_id?: string | undefined;
|
|
82
80
|
compensation?: Array<HrisCompensation$Outbound> | undefined;
|
|
83
81
|
created_at?: string | undefined;
|
|
84
|
-
employee_user_id
|
|
85
|
-
end_at
|
|
82
|
+
employee_user_id: string;
|
|
83
|
+
end_at: string;
|
|
86
84
|
group_id?: string | undefined;
|
|
87
85
|
hours?: number | undefined;
|
|
88
86
|
id?: string | undefined;
|
|
89
87
|
is_approved?: boolean | undefined;
|
|
90
88
|
location_id?: string | undefined;
|
|
91
89
|
raw?: { [k: string]: any } | undefined;
|
|
92
|
-
start_at
|
|
90
|
+
start_at: string;
|
|
93
91
|
updated_at?: string | undefined;
|
|
94
92
|
};
|
|
95
93
|
|
|
@@ -104,15 +102,15 @@ export const HrisTimeshift$outboundSchema: z.ZodType<
|
|
|
104
102
|
companyId: z.string().optional(),
|
|
105
103
|
compensation: z.array(HrisCompensation$outboundSchema).optional(),
|
|
106
104
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
107
|
-
employeeUserId: z.string()
|
|
108
|
-
endAt: z.date().transform(v => v.toISOString())
|
|
105
|
+
employeeUserId: z.string(),
|
|
106
|
+
endAt: z.date().transform(v => v.toISOString()),
|
|
109
107
|
groupId: z.string().optional(),
|
|
110
108
|
hours: z.number().optional(),
|
|
111
109
|
id: z.string().optional(),
|
|
112
110
|
isApproved: z.boolean().optional(),
|
|
113
111
|
locationId: z.string().optional(),
|
|
114
112
|
raw: z.record(z.any()).optional(),
|
|
115
|
-
startAt: z.date().transform(v => v.toISOString())
|
|
113
|
+
startAt: z.date().transform(v => v.toISOString()),
|
|
116
114
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
117
115
|
}).transform((v) => {
|
|
118
116
|
return remap$(v, {
|