@prismatic-io/components-ukg-pro 0.0.0-stage → 0.1.0
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/README.md +64 -2
- package/dist/icon.png +0 -0
- package/dist/index.js +227 -0
- package/npm-dist/icon.png +0 -0
- package/npm-dist/index.cjs +2155 -0
- package/npm-dist/index.d.cts +2034 -0
- package/package.json +49 -4
|
@@ -0,0 +1,2155 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
let _prismatic_io_spectral = require("@prismatic-io/spectral");
|
|
24
|
+
let _prismatic_io_spectral_http = require("@prismatic-io/spectral/http");
|
|
25
|
+
let node_crypto = require("node:crypto");
|
|
26
|
+
node_crypto = __toESM(node_crypto);
|
|
27
|
+
//#region src/connections/index.ts
|
|
28
|
+
const ukgProBasicAuth = (0, _prismatic_io_spectral.connection)({
|
|
29
|
+
key: "ukgProBasicAuth",
|
|
30
|
+
display: {
|
|
31
|
+
label: "Basic Authentication",
|
|
32
|
+
description: "Authenticate using username and password"
|
|
33
|
+
},
|
|
34
|
+
inputs: {
|
|
35
|
+
baseUrl: {
|
|
36
|
+
label: "API Base URL",
|
|
37
|
+
placeholder: "Enter API base URL",
|
|
38
|
+
type: "string",
|
|
39
|
+
required: true,
|
|
40
|
+
shown: true,
|
|
41
|
+
comments: "The base URL for the UKG Pro API environment. Common values: https://service5.ultipro.com (US), https://service4.ultipro.ca (Canada). See [Environment Configuration](https://developer.ukg.com/hcm/docs/web-service-account#service-endpoints) for details.",
|
|
42
|
+
example: "https://service5.ultipro.com"
|
|
43
|
+
},
|
|
44
|
+
customerApiKey: {
|
|
45
|
+
label: "Customer API Key",
|
|
46
|
+
placeholder: "Enter customer API key",
|
|
47
|
+
type: "password",
|
|
48
|
+
required: true,
|
|
49
|
+
shown: true,
|
|
50
|
+
comments: "The UKG Pro Customer API Key. Found in <strong>System Configuration > Security > Web Service Accounts</strong>. See [Authentication Overview](https://developer.ukg.com/hcm/docs/web-service-account#service-endpoints) for details.",
|
|
51
|
+
example: "3SKPV"
|
|
52
|
+
},
|
|
53
|
+
username: {
|
|
54
|
+
label: "Service Account Username",
|
|
55
|
+
placeholder: "Enter service account username",
|
|
56
|
+
type: "string",
|
|
57
|
+
required: true,
|
|
58
|
+
shown: true,
|
|
59
|
+
comments: "The username for the Web Service Account configured in UKG Pro.",
|
|
60
|
+
example: "api_service_account"
|
|
61
|
+
},
|
|
62
|
+
password: {
|
|
63
|
+
label: "Service Account Password",
|
|
64
|
+
placeholder: "Enter service account password",
|
|
65
|
+
type: "password",
|
|
66
|
+
required: true,
|
|
67
|
+
shown: true,
|
|
68
|
+
comments: "The password for the Web Service Account."
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var connections_default = [ukgProBasicAuth];
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/util/connection.ts
|
|
75
|
+
const validateConnection = (connection) => {
|
|
76
|
+
const validKeys = connections_default.map((c) => c.key);
|
|
77
|
+
if (!validKeys.includes(connection.key)) throw new _prismatic_io_spectral.ConnectionError(connection, `Unknown connection type: ${connection.key}. Expected one of: ${validKeys.join(", ")}`);
|
|
78
|
+
};
|
|
79
|
+
const getBaseUrl = (connection) => {
|
|
80
|
+
return _prismatic_io_spectral.util.types.toString(connection.fields.baseUrl).replace(/\/$/, "");
|
|
81
|
+
};
|
|
82
|
+
const getTenantIdentifier = (connection) => {
|
|
83
|
+
return _prismatic_io_spectral.util.types.toString(connection.fields.tenantIdentifier);
|
|
84
|
+
};
|
|
85
|
+
const getAuthHeaders = async (connection) => {
|
|
86
|
+
switch (connection.key) {
|
|
87
|
+
case ukgProBasicAuth.key: {
|
|
88
|
+
const { username, password, customerApiKey } = connection.fields;
|
|
89
|
+
return {
|
|
90
|
+
Authorization: `Basic ${Buffer.from(`${_prismatic_io_spectral.util.types.toString(username)}:${_prismatic_io_spectral.util.types.toString(password)}`).toString("base64")}`,
|
|
91
|
+
"US-Customer-Api-Key": _prismatic_io_spectral.util.types.toString(customerApiKey)
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
default: throw new _prismatic_io_spectral.ConnectionError(connection, `Unsupported connection type: ${connection.key}`);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const cleanString = (value) => value ? _prismatic_io_spectral.util.types.toString(value) : void 0;
|
|
98
|
+
const cleanNumber = (value) => value ? _prismatic_io_spectral.util.types.toNumber(value) : void 0;
|
|
99
|
+
const lookBackDateClean = (value) => {
|
|
100
|
+
const str = _prismatic_io_spectral.util.types.toString(value).trim();
|
|
101
|
+
if (!str) return "";
|
|
102
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(str)) throw new Error("Look-back Date must be in YYYY-MM-DD format.");
|
|
103
|
+
const [year, month, day] = str.split("-").map((part) => _prismatic_io_spectral.util.types.toNumber(part));
|
|
104
|
+
const parsed = new Date(Date.UTC(year, month - 1, day));
|
|
105
|
+
if (parsed.getUTCFullYear() !== year || parsed.getUTCMonth() !== month - 1 || parsed.getUTCDate() !== day) throw new Error(`Look-back Date "${str}" is not a valid calendar date.`);
|
|
106
|
+
if (parsed.getTime() > Date.now()) throw new Error("Look-back Date cannot be a future date.");
|
|
107
|
+
return str;
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/client.ts
|
|
111
|
+
const createClient = async (connection, debug = false) => {
|
|
112
|
+
validateConnection(connection);
|
|
113
|
+
return (0, _prismatic_io_spectral_http.createClient)({
|
|
114
|
+
baseUrl: getBaseUrl(connection),
|
|
115
|
+
headers: {
|
|
116
|
+
Accept: "application/json",
|
|
117
|
+
"Content-Type": "application/json",
|
|
118
|
+
...await getAuthHeaders(connection)
|
|
119
|
+
},
|
|
120
|
+
debug
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
const createBasicAuthClient = (connection, debug = false) => {
|
|
124
|
+
if (connection.key !== ukgProBasicAuth.key) throw new Error(`Expected ${ukgProBasicAuth.key} connection, got ${connection.key}. Use Basic Auth connection for Personnel and Configuration APIs.`);
|
|
125
|
+
const { baseUrl, username, password, customerApiKey } = connection.fields;
|
|
126
|
+
const credentials = Buffer.from(`${username}:${password}`).toString("base64");
|
|
127
|
+
return (0, _prismatic_io_spectral_http.createClient)({
|
|
128
|
+
baseUrl: _prismatic_io_spectral.util.types.toString(baseUrl),
|
|
129
|
+
headers: {
|
|
130
|
+
Accept: "application/json",
|
|
131
|
+
"Content-Type": "application/json",
|
|
132
|
+
Authorization: `Basic ${credentials}`,
|
|
133
|
+
"US-Customer-Api-Key": _prismatic_io_spectral.util.types.toString(customerApiKey)
|
|
134
|
+
},
|
|
135
|
+
debug
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/examplePayloads.ts
|
|
140
|
+
const listCompaniesExamplePayload = { data: [{
|
|
141
|
+
isMasterCompany: "Y",
|
|
142
|
+
masterCompanyId: "MASTER001",
|
|
143
|
+
companyID: "COMP-12345",
|
|
144
|
+
companyCode: "ACME01",
|
|
145
|
+
companyName: "ACME Corporation",
|
|
146
|
+
addressLine1: "123 Business Park Drive",
|
|
147
|
+
addressLine2: "Suite 400",
|
|
148
|
+
addressCity: "San Francisco",
|
|
149
|
+
addressState: "CA",
|
|
150
|
+
addressZipCode: "94105",
|
|
151
|
+
addressCountry: "USA",
|
|
152
|
+
addressCounty: "San Francisco County",
|
|
153
|
+
phoneNumber: "415-555-0100",
|
|
154
|
+
phoneNumberExtension: "1001",
|
|
155
|
+
federalTaxId: "12-3456789",
|
|
156
|
+
orgLevel1Code: "CORP",
|
|
157
|
+
orgLevel2Code: "USA",
|
|
158
|
+
orgLevel3Code: "WEST",
|
|
159
|
+
orgLevel4Code: "CAHQ"
|
|
160
|
+
}] };
|
|
161
|
+
const getJobExamplePayload = { data: {
|
|
162
|
+
countryCode: "USA",
|
|
163
|
+
jobCode: "SW-ENG-001",
|
|
164
|
+
title: "Software Engineer",
|
|
165
|
+
jobFamilyCode: "ENG",
|
|
166
|
+
isActive: true,
|
|
167
|
+
longDescription: "Designs, develops, and maintains software applications and systems.",
|
|
168
|
+
jobEE0Category: "Professional",
|
|
169
|
+
jobGroup: "Engineering",
|
|
170
|
+
flsaTypeCode: "EXEMPT",
|
|
171
|
+
integrationRecordId: "JOB-ENG-SW-001",
|
|
172
|
+
workEnvirornmentCode: "OFFICE",
|
|
173
|
+
workEnvironmentDesc: "Office Environment"
|
|
174
|
+
} };
|
|
175
|
+
getJobExamplePayload.data;
|
|
176
|
+
const listLocationsExamplePayload = { data: {
|
|
177
|
+
locations: [{
|
|
178
|
+
locationCode: "ALBUQ",
|
|
179
|
+
description: "Albuquerque, NM",
|
|
180
|
+
isActive: true,
|
|
181
|
+
addressLine1: "618 Rio Grande Blvd NW",
|
|
182
|
+
addressLine2: "",
|
|
183
|
+
city: "Albuquerque",
|
|
184
|
+
state: "NM",
|
|
185
|
+
zipOrPostalCode: "87104",
|
|
186
|
+
countryCode: "USA",
|
|
187
|
+
locationGLSegment: "120"
|
|
188
|
+
}],
|
|
189
|
+
totalCount: 3,
|
|
190
|
+
pageNumber: 1,
|
|
191
|
+
pageSize: 100
|
|
192
|
+
} };
|
|
193
|
+
const getSingleLocationExamplePayload = { data: listLocationsExamplePayload.data.locations[0] };
|
|
194
|
+
const listPositionsExamplePayload = { data: [{
|
|
195
|
+
alternateTitle: "Senior Software Engineer",
|
|
196
|
+
companyId: "COMP-12345",
|
|
197
|
+
dateTimeChanged: "2024-01-15T14:30:00.000Z",
|
|
198
|
+
dateTimeCreated: "2023-06-10T09:00:00.000Z",
|
|
199
|
+
employeeType: "REG",
|
|
200
|
+
effectiveStartDate: "2023-06-15T00:00:00.000Z",
|
|
201
|
+
effectiveStopDate: "2025-06-15T00:00:00.000Z",
|
|
202
|
+
fundID: "FUND-001",
|
|
203
|
+
glSegment: "6000",
|
|
204
|
+
isApproved: true,
|
|
205
|
+
isEligibleForBenefits: true,
|
|
206
|
+
isProrated: false,
|
|
207
|
+
jobcode: "SW-ENG-001",
|
|
208
|
+
locationCode: "SF-WEST",
|
|
209
|
+
notes: "Key technical position for platform engineering team",
|
|
210
|
+
organizationLevelCode1: "CORP",
|
|
211
|
+
organizationLevelCode2: "ENG",
|
|
212
|
+
organizationLevelCode3: "PLATFORM",
|
|
213
|
+
organizationLevelCode4: "BACKEND",
|
|
214
|
+
overstaffingAllowed: false,
|
|
215
|
+
payGroupCode: "EXEMPT",
|
|
216
|
+
positionCode: "POS-ENG-001",
|
|
217
|
+
projectCode: "PROJ-001",
|
|
218
|
+
shiftGroupCode: "DAY",
|
|
219
|
+
statusCode: "ACTIVE",
|
|
220
|
+
statusAsOfDate: "2023-06-15T00:00:00.000Z",
|
|
221
|
+
userDefinedField01: "Custom data 1",
|
|
222
|
+
userDefinedField02: "2024-01-01T00:00:00.000Z",
|
|
223
|
+
userDefinedField03: 100,
|
|
224
|
+
userDefinedField04: {
|
|
225
|
+
isNull: false,
|
|
226
|
+
Value: 85e3
|
|
227
|
+
},
|
|
228
|
+
integrationRecordId: "INT-POS-ENG-001"
|
|
229
|
+
}] };
|
|
230
|
+
const getAllPersonDetailsExamplePayload = { data: [{
|
|
231
|
+
additionalName1: "string",
|
|
232
|
+
additionalName2: "string",
|
|
233
|
+
addressId: "00000000-0000-0000-0000-000000000000",
|
|
234
|
+
addressIsOnTaxBoundary: true,
|
|
235
|
+
addressLatitude: 0,
|
|
236
|
+
cobraExport: "string",
|
|
237
|
+
cobraIsActive: true,
|
|
238
|
+
cobraReason: "string",
|
|
239
|
+
cobraStatus: "string",
|
|
240
|
+
cobraStatusDate: "2026-01-14T18:10:21.710Z",
|
|
241
|
+
communityBroadcastSmsCode: "string",
|
|
242
|
+
consentElectronicW2: true,
|
|
243
|
+
consentElectronicw2pr: true,
|
|
244
|
+
dateDeceased: "2026-01-14T18:10:21.710Z",
|
|
245
|
+
dateOfCobraEvent: "2026-01-14T18:10:21.710Z",
|
|
246
|
+
dateOfCobraExport: "2026-01-14T18:10:21.710Z",
|
|
247
|
+
dateOfCobraLetter: "2026-01-14T18:10:21.710Z",
|
|
248
|
+
dateOfI9Expiration: "2026-01-14T18:10:21.710Z",
|
|
249
|
+
datetimeChanged: "2026-01-14T18:10:21.710Z",
|
|
250
|
+
datetimeCreated: "2026-01-14T18:10:21.710Z",
|
|
251
|
+
disabilityType: "string",
|
|
252
|
+
ethnicDescription: "string",
|
|
253
|
+
formerName: "string",
|
|
254
|
+
healthBloodType: "string",
|
|
255
|
+
healthEyes: "string",
|
|
256
|
+
healthHair: "string",
|
|
257
|
+
healthHeightFeet: "string",
|
|
258
|
+
healthHeightInches: "string",
|
|
259
|
+
healthLastDonateDate: "2026-01-14T18:10:21.710Z",
|
|
260
|
+
healthWeight: 0,
|
|
261
|
+
i9AlienNumber: "string",
|
|
262
|
+
i9DocA: "string",
|
|
263
|
+
i9DocB: "string",
|
|
264
|
+
i9DocC: "string",
|
|
265
|
+
i9Verified: true,
|
|
266
|
+
i9VisaType: "string",
|
|
267
|
+
i9WorkAuth: "string",
|
|
268
|
+
isDisabled: true,
|
|
269
|
+
isMultiPayGroup: true,
|
|
270
|
+
isSmoker: true,
|
|
271
|
+
militaryService: true,
|
|
272
|
+
militaryBranchServed: "string",
|
|
273
|
+
militaryEra: "string",
|
|
274
|
+
militaryIsDisabledVet: "string",
|
|
275
|
+
militaryIsOthEligVet: "string",
|
|
276
|
+
militaryIsOthEligVetBasis: "string",
|
|
277
|
+
militaryIsActiveWartimeVet: "string",
|
|
278
|
+
nameFormer: "string",
|
|
279
|
+
previousSSN: "string",
|
|
280
|
+
originCountry: "string",
|
|
281
|
+
originLocation: "string",
|
|
282
|
+
w2IsDeceased: true,
|
|
283
|
+
cobraNotes: "string",
|
|
284
|
+
addressSms: "string",
|
|
285
|
+
militarySeparationDate: "2026-01-14T18:10:21.710Z",
|
|
286
|
+
homePhoneIsPrivate: true,
|
|
287
|
+
smsApprovals: true,
|
|
288
|
+
smsPayNotification: true,
|
|
289
|
+
i9VisaExpirationDate: "2026-01-14T18:10:21.710Z",
|
|
290
|
+
militaryIsMedalVet: "string",
|
|
291
|
+
lastNameNotSameAsSSCard: "string",
|
|
292
|
+
chkCashingInstCode: "string",
|
|
293
|
+
nationality1: "string",
|
|
294
|
+
nationality2: "string",
|
|
295
|
+
nationality3: "string",
|
|
296
|
+
personId: "00000000-0000-0000-0000-000000000000",
|
|
297
|
+
employeeId: "string",
|
|
298
|
+
companyId: "string",
|
|
299
|
+
userName: "string",
|
|
300
|
+
firstName: "string",
|
|
301
|
+
middleName: "string",
|
|
302
|
+
lastName: "string",
|
|
303
|
+
preferredName: "string",
|
|
304
|
+
namePrefixCode: "string",
|
|
305
|
+
nameSufixCode: "string",
|
|
306
|
+
emailAddress: "string",
|
|
307
|
+
emailAddressAlternate: "string",
|
|
308
|
+
homePhone: "string",
|
|
309
|
+
homePhoneCountry: "string",
|
|
310
|
+
addressLine1: "string",
|
|
311
|
+
addressLine2: "string",
|
|
312
|
+
addressCity: "string",
|
|
313
|
+
addressState: "string",
|
|
314
|
+
addressZipCode: "string",
|
|
315
|
+
addressCountry: "string",
|
|
316
|
+
addressCounty: "string",
|
|
317
|
+
nationalId: "string",
|
|
318
|
+
nationalIdCountry: "string",
|
|
319
|
+
dateOfBirth: "2026-01-14T18:10:21.710Z",
|
|
320
|
+
gender: "string",
|
|
321
|
+
ethnicIDCode: "string",
|
|
322
|
+
maritalStatusCode: "string",
|
|
323
|
+
ssn: "string",
|
|
324
|
+
ssnIsSuppressed: true
|
|
325
|
+
}] };
|
|
326
|
+
const getPersonDetailsByCompanyExamplePayload = { data: [getAllPersonDetailsExamplePayload.data[0]] };
|
|
327
|
+
const getEmployeeEmploymentDetailsExamplePayload = { data: [{
|
|
328
|
+
companyID: "6Y4NV",
|
|
329
|
+
employeeID: "EQKKKU000020",
|
|
330
|
+
homeCompany: "6Y4NV",
|
|
331
|
+
isHomeCompany: true,
|
|
332
|
+
isSupervisor: false,
|
|
333
|
+
primaryJobCode: "CAADMIN",
|
|
334
|
+
orgLevel1Code: "ADMIN",
|
|
335
|
+
orgLevel2Code: "CSTSVR",
|
|
336
|
+
orgLevel3Code: "CAN",
|
|
337
|
+
orgLevel4Code: null,
|
|
338
|
+
originalHireDate: "2021-09-20T00:00:00",
|
|
339
|
+
lastHireDate: "2021-09-20T00:00:00",
|
|
340
|
+
fullTimeOrPartTimeCode: "F",
|
|
341
|
+
primaryWorkLocationCode: "CAHQ1",
|
|
342
|
+
languageCode: "EN",
|
|
343
|
+
primaryProjectCode: null,
|
|
344
|
+
workPhoneNumber: "9056263314",
|
|
345
|
+
workPhoneExtension: "1437",
|
|
346
|
+
workPhoneCountry: "CAN",
|
|
347
|
+
dateInJob: "2021-09-20T00:00:00",
|
|
348
|
+
dateLastWorked: null,
|
|
349
|
+
benefitSeniorityDate: "2021-09-20T00:00:00",
|
|
350
|
+
seniorityDate: "2021-09-20T00:00:00",
|
|
351
|
+
deductionGroupCode: "CABN",
|
|
352
|
+
earningGroupCode: "CAHRY",
|
|
353
|
+
jobChangeReasonCode: "301",
|
|
354
|
+
jobTitle: null,
|
|
355
|
+
employeeTypeCode: "REG",
|
|
356
|
+
employeeStatusCode: "A",
|
|
357
|
+
employeeNumber: "000012444",
|
|
358
|
+
leaveReasonCode: null,
|
|
359
|
+
supervisorID: "96ZZ520000K0",
|
|
360
|
+
autoAllocate: "N",
|
|
361
|
+
clockCode: null,
|
|
362
|
+
dateLastPayDatePaid: "2023-05-12T00:00:00",
|
|
363
|
+
earlyRetirementDate: "2060-06-15T00:00:00",
|
|
364
|
+
retirementDate: "2063-06-15T00:00:00",
|
|
365
|
+
suspensionDate: null,
|
|
366
|
+
terminationDate: null,
|
|
367
|
+
payGroupCode: "CAHOUR",
|
|
368
|
+
payPeriod: "W",
|
|
369
|
+
paidThruDate: null,
|
|
370
|
+
employeeStatusStartDate: "2021-09-20T00:00:00",
|
|
371
|
+
hireSource: "WEB",
|
|
372
|
+
isAutoAllocated: false,
|
|
373
|
+
isAutoPaid: true,
|
|
374
|
+
isHighlyCompensated: false,
|
|
375
|
+
isMultipleJob: true,
|
|
376
|
+
jobCode: "CAADMIN",
|
|
377
|
+
jobGroupCode: "ADMN",
|
|
378
|
+
annualSalary: 58240,
|
|
379
|
+
mailstop: null,
|
|
380
|
+
okToRehire: "N",
|
|
381
|
+
plannedLeaveReason: null,
|
|
382
|
+
positionCode: null,
|
|
383
|
+
salaryOrHourly: "H",
|
|
384
|
+
scheduledAnnualHours: 2080,
|
|
385
|
+
scheduledFTE: 1,
|
|
386
|
+
scheduledWorkHours: 40,
|
|
387
|
+
shift: "Z",
|
|
388
|
+
shiftGroup: "Z",
|
|
389
|
+
terminationReasonCode: null,
|
|
390
|
+
terminationDescription: null,
|
|
391
|
+
termType: null,
|
|
392
|
+
timeClockID: null,
|
|
393
|
+
weeklyHours: 0,
|
|
394
|
+
dateTimeCreated: "2023-03-29T08:24:30.16",
|
|
395
|
+
dateTimeChanged: "2023-03-29T11:43:28.927",
|
|
396
|
+
employeeStatusExpectedEndDate: null,
|
|
397
|
+
integrationRecordId: "6d600600-ee9e-46fb-b9da-5c256e71404c",
|
|
398
|
+
currentCompanyCountryCode: "CAN",
|
|
399
|
+
homeCompanyCountryCode: "CAN",
|
|
400
|
+
isKeyEmployee: false,
|
|
401
|
+
hourlyPayRate: 28,
|
|
402
|
+
salaryEffectiveDate: "2021-09-20T00:00:00",
|
|
403
|
+
unionLocalCode: null,
|
|
404
|
+
unionNationalCode: null
|
|
405
|
+
}] };
|
|
406
|
+
const getEmployeeContractDetailsExamplePayload = { data: [{
|
|
407
|
+
amendmentDate: null,
|
|
408
|
+
companyId: "6Y4NV",
|
|
409
|
+
contractEndDate: "2025-04-09T14:26:14.763",
|
|
410
|
+
contractNumber: "FGB2388",
|
|
411
|
+
contractReason: "EXWORKFORCE",
|
|
412
|
+
contractStartDate: "2022-04-09T14:26:14.763",
|
|
413
|
+
contractTypeCode: "FIXED",
|
|
414
|
+
contractTypeDescription: "Fixed Term",
|
|
415
|
+
dateTimeCreated: "2015-09-17T10:02:41.287",
|
|
416
|
+
durationDays: 0,
|
|
417
|
+
durationMonths: 0,
|
|
418
|
+
durationWeeks: 0,
|
|
419
|
+
durationYears: 3,
|
|
420
|
+
employeeId: "9704HG0010K0",
|
|
421
|
+
employmentContractId: 5,
|
|
422
|
+
fteContractHours: 40,
|
|
423
|
+
isAmendment: "N",
|
|
424
|
+
isRenewal: "N",
|
|
425
|
+
notes: null,
|
|
426
|
+
noticePeriodDays: 180,
|
|
427
|
+
noticePeriodMonths: 0,
|
|
428
|
+
noticePeriodWeeks: 0,
|
|
429
|
+
noticePeriodYears: 0,
|
|
430
|
+
probationaryDays: 60,
|
|
431
|
+
rehirePeriodDays: 0,
|
|
432
|
+
rehirePeriodMonths: 3,
|
|
433
|
+
rehirePeriodWeeks: 0,
|
|
434
|
+
rehirePeriodYears: 0,
|
|
435
|
+
renewalContractId: 0,
|
|
436
|
+
rowLastChanged: "2022-05-09T14:26:14.763"
|
|
437
|
+
}] };
|
|
438
|
+
const getEmployeeJobHistoryExamplePayload = { data: [{
|
|
439
|
+
annualSalary: 1e5,
|
|
440
|
+
companyId: "1E4P1",
|
|
441
|
+
dateTimeCreated: "2010-05-27T21:26:53.05",
|
|
442
|
+
employeeId: "81E8SL0000K0",
|
|
443
|
+
employeeType: "REG",
|
|
444
|
+
employeeStatus: "A",
|
|
445
|
+
flsaCategory: null,
|
|
446
|
+
fullTimeOrPartTime: "F",
|
|
447
|
+
hourlyPayRate: 0,
|
|
448
|
+
isJobChange: false,
|
|
449
|
+
isOrgchange: false,
|
|
450
|
+
isOutsideGuidelines: false,
|
|
451
|
+
isOutsideRange: false,
|
|
452
|
+
isPromotion: false,
|
|
453
|
+
isRateChange: false,
|
|
454
|
+
isSystem: true,
|
|
455
|
+
isTransfer: false,
|
|
456
|
+
jobCode: "HRMGRF",
|
|
457
|
+
jobDescription: "HR Manager",
|
|
458
|
+
jobEffectiveDate: "2010-01-01T00:00:00",
|
|
459
|
+
jobGroupCode: null,
|
|
460
|
+
locationCode: "0",
|
|
461
|
+
orgLevel1Code: "ADMIN",
|
|
462
|
+
orgLevel2Code: "HR",
|
|
463
|
+
orgLevel3Code: null,
|
|
464
|
+
orgLevel4Code: null,
|
|
465
|
+
otherRate1: 0,
|
|
466
|
+
otherRate2: 0,
|
|
467
|
+
otherRate3: 0,
|
|
468
|
+
otherRate4: 0,
|
|
469
|
+
payGroupCode: "0",
|
|
470
|
+
payPeriodCode: null,
|
|
471
|
+
payScaleCode: null,
|
|
472
|
+
percentChange: 0,
|
|
473
|
+
periodPayRate: 0,
|
|
474
|
+
piecePayRate: 0,
|
|
475
|
+
positionCode: null,
|
|
476
|
+
reasonCode: "100",
|
|
477
|
+
salaryGrade: "0",
|
|
478
|
+
salaryOrHourly: "S",
|
|
479
|
+
scheduledAnnualHours: 0,
|
|
480
|
+
scheduledFullTimeEquivalency: 0,
|
|
481
|
+
scheduledWorkHours: 0,
|
|
482
|
+
shiftCode: "0",
|
|
483
|
+
shiftGroupCode: "Z",
|
|
484
|
+
stepNumber: 0,
|
|
485
|
+
supervisorId: null,
|
|
486
|
+
supervisorNameFirst: null,
|
|
487
|
+
supervisorNameLast: null,
|
|
488
|
+
supervisorNameSuffix: null,
|
|
489
|
+
supervisorNotInList: false,
|
|
490
|
+
systemId: "81E8SM0020K0",
|
|
491
|
+
unionNational: null,
|
|
492
|
+
unionLocal: null,
|
|
493
|
+
usePayScales: false,
|
|
494
|
+
weeklyPayRate: 0,
|
|
495
|
+
notes: null,
|
|
496
|
+
homeCompanyId: "1E4P1",
|
|
497
|
+
integrationEffectiveDate: "2010-01-01T00:00:00",
|
|
498
|
+
projectCode: null,
|
|
499
|
+
numberOfPayments: 0,
|
|
500
|
+
weeklyHours: 0,
|
|
501
|
+
isViewableByEmployee: true,
|
|
502
|
+
createdByUserId: 0,
|
|
503
|
+
jobTitle: null
|
|
504
|
+
}] };
|
|
505
|
+
const getEmployeeChangesByIdExamplePayload = { data: {
|
|
506
|
+
employeeId: "EMP-12345",
|
|
507
|
+
companyId: "COMP-001",
|
|
508
|
+
changes: [
|
|
509
|
+
{
|
|
510
|
+
changeId: "CHG-789012",
|
|
511
|
+
changeType: "Update",
|
|
512
|
+
changeTypeCode: "UPD",
|
|
513
|
+
changeCategory: "Job Information",
|
|
514
|
+
changeCategoryCode: "JOB",
|
|
515
|
+
field: "jobTitle",
|
|
516
|
+
fieldDisplayName: "Job Title",
|
|
517
|
+
oldValue: "Software Engineer",
|
|
518
|
+
newValue: "Senior Software Engineer",
|
|
519
|
+
changeTimestamp: "2024-01-15T14:30:00.000Z",
|
|
520
|
+
effectiveDate: "2024-01-15",
|
|
521
|
+
changedBy: {
|
|
522
|
+
userId: "USR-HR-001",
|
|
523
|
+
userName: "HR Admin",
|
|
524
|
+
userType: "System User"
|
|
525
|
+
},
|
|
526
|
+
approvedBy: {
|
|
527
|
+
userId: "USR-MGR-001",
|
|
528
|
+
userName: "Jane Smith",
|
|
529
|
+
userType: "Manager"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
changeId: "CHG-789013",
|
|
534
|
+
changeType: "Update",
|
|
535
|
+
changeTypeCode: "UPD",
|
|
536
|
+
changeCategory: "Compensation",
|
|
537
|
+
changeCategoryCode: "COMP",
|
|
538
|
+
field: "payRate",
|
|
539
|
+
fieldDisplayName: "Pay Rate",
|
|
540
|
+
oldValue: "95000",
|
|
541
|
+
newValue: "115000",
|
|
542
|
+
changeTimestamp: "2024-01-15T14:30:00.000Z",
|
|
543
|
+
effectiveDate: "2024-01-15",
|
|
544
|
+
changedBy: {
|
|
545
|
+
userId: "USR-HR-001",
|
|
546
|
+
userName: "HR Admin",
|
|
547
|
+
userType: "System User"
|
|
548
|
+
},
|
|
549
|
+
approvedBy: {
|
|
550
|
+
userId: "USR-MGR-001",
|
|
551
|
+
userName: "Jane Smith",
|
|
552
|
+
userType: "Manager"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
changeId: "CHG-789014",
|
|
557
|
+
changeType: "Update",
|
|
558
|
+
changeTypeCode: "UPD",
|
|
559
|
+
changeCategory: "Organization",
|
|
560
|
+
changeCategoryCode: "ORG",
|
|
561
|
+
field: "department",
|
|
562
|
+
fieldDisplayName: "Department",
|
|
563
|
+
oldValue: "Engineering",
|
|
564
|
+
newValue: "Platform Engineering",
|
|
565
|
+
changeTimestamp: "2024-01-10T09:15:00.000Z",
|
|
566
|
+
effectiveDate: "2024-01-10",
|
|
567
|
+
changedBy: {
|
|
568
|
+
userId: "SYSTEM",
|
|
569
|
+
userName: "System",
|
|
570
|
+
userType: "System"
|
|
571
|
+
},
|
|
572
|
+
approvedBy: null
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
totalChanges: 3
|
|
576
|
+
} };
|
|
577
|
+
const getEmployeeChangesByDateExamplePayload = { data: [{
|
|
578
|
+
firstName: "Marion",
|
|
579
|
+
lastName: "Kent",
|
|
580
|
+
preferredName: "Marion",
|
|
581
|
+
emailAddress: "Marion.Kent@usgmail.net",
|
|
582
|
+
countryCode: "USA",
|
|
583
|
+
languageCode: "en-us",
|
|
584
|
+
employeeNumber: "000000104",
|
|
585
|
+
employeeId: "1HHZIT000080",
|
|
586
|
+
personId: "7edf43b3-9a91-5668-9a80-9463067fcf0b",
|
|
587
|
+
userIntegrationKey: "",
|
|
588
|
+
companyName: "Eastwood(289)",
|
|
589
|
+
companyId: "HDLBX",
|
|
590
|
+
supervisorId: "1HHTJQ000080",
|
|
591
|
+
salaryOrHourly: "S",
|
|
592
|
+
fullTimeOrPartTime: "F",
|
|
593
|
+
isActive: true,
|
|
594
|
+
workLocationCode: "SEAL",
|
|
595
|
+
jobCode: "TECH1",
|
|
596
|
+
projectCode: "Z",
|
|
597
|
+
orgLevel1Code: "SOFT",
|
|
598
|
+
orgLevel2Code: "SUPP",
|
|
599
|
+
orgLevel3Code: "WES",
|
|
600
|
+
orgLevel4Code: "",
|
|
601
|
+
middleName: "M.",
|
|
602
|
+
workPhone: "4155551200",
|
|
603
|
+
homePhone: "4155554987",
|
|
604
|
+
employeeAddress1: "1228 Electric Ave",
|
|
605
|
+
employeeAddress2: "",
|
|
606
|
+
city: "Seal Beach",
|
|
607
|
+
state: "CA",
|
|
608
|
+
zipCode: "90740",
|
|
609
|
+
terminationDate: "",
|
|
610
|
+
hireDate: "1/1/1996 12:00:00 AM",
|
|
611
|
+
supervisorName: "Lyle Smith",
|
|
612
|
+
suffix: "",
|
|
613
|
+
prefix: "MR",
|
|
614
|
+
alternateEmailAddress: "",
|
|
615
|
+
gender: "M",
|
|
616
|
+
employeeStatus: "A",
|
|
617
|
+
employeeType: "REG",
|
|
618
|
+
emplStatusStartDate: "1/1/1997 12:00:00 AM",
|
|
619
|
+
dateInJob: "1/1/1997 12:00:00 AM",
|
|
620
|
+
dateOfLastHire: "1/1/1997 12:00:00 AM",
|
|
621
|
+
jobGroupCode: "",
|
|
622
|
+
alternateJobTitle: ""
|
|
623
|
+
}] };
|
|
624
|
+
const importXmlDataExamplePayload = { data: {
|
|
625
|
+
stagingId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
626
|
+
dateTimeCreated: "2024-02-15T14:30:00.000Z",
|
|
627
|
+
fileName: "newhire-batch-2024-02-15.xml",
|
|
628
|
+
message: "XML transaction submitted successfully. Use stagingId to check status."
|
|
629
|
+
} };
|
|
630
|
+
const getImportStatusExamplePayload = { data: {
|
|
631
|
+
stagingId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
632
|
+
status: "Processing",
|
|
633
|
+
statusCode: "PROCESSING",
|
|
634
|
+
dateTimeCreated: "2024-02-15T14:30:00.000Z",
|
|
635
|
+
dateTimeStarted: "2024-02-15T14:30:05.000Z",
|
|
636
|
+
dateTimeCompleted: null,
|
|
637
|
+
fileName: "newhire-batch-2024-02-15.xml",
|
|
638
|
+
totalRecords: 10,
|
|
639
|
+
processedRecords: 4,
|
|
640
|
+
successfulRecords: 4,
|
|
641
|
+
failedRecords: 0,
|
|
642
|
+
percentComplete: 40
|
|
643
|
+
} };
|
|
644
|
+
const getTransactionStatusExamplePayload = { data: {
|
|
645
|
+
stagingId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
646
|
+
transactionName: "New Hire/Re-Hire",
|
|
647
|
+
transactionType: "NEWHIRE",
|
|
648
|
+
status: "Completed",
|
|
649
|
+
statusCode: "COMPLETED",
|
|
650
|
+
dateTimeCreated: "2024-02-15T14:30:00.000Z",
|
|
651
|
+
dateTimeCompleted: "2024-02-15T14:35:00.000Z",
|
|
652
|
+
fileName: "newhire-batch-2024-02-15.xml"
|
|
653
|
+
} };
|
|
654
|
+
const getFileStatusExamplePayload = { data: {
|
|
655
|
+
stagingId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
656
|
+
fileName: "newhire-batch-2024-02-15.xml",
|
|
657
|
+
fileStatus: "Processed",
|
|
658
|
+
fileStatusCode: "PROCESSED",
|
|
659
|
+
dateTimeUploaded: "2024-02-15T14:30:00.000Z",
|
|
660
|
+
dateTimeProcessed: "2024-02-15T14:35:00.000Z",
|
|
661
|
+
fileSizeBytes: 4096,
|
|
662
|
+
transactionCount: 10,
|
|
663
|
+
validationStatus: "Valid",
|
|
664
|
+
validationStatusCode: "VALID",
|
|
665
|
+
validationErrors: []
|
|
666
|
+
} };
|
|
667
|
+
const getFileSummaryExamplePayload = { data: {
|
|
668
|
+
stagingId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
669
|
+
fileName: "newhire-batch-2024-02-15.xml",
|
|
670
|
+
transactionType: "New Hire/Re-Hire",
|
|
671
|
+
transactionTypeCode: "NEWHIRE",
|
|
672
|
+
dateTimeCreated: "2024-02-15T14:30:00.000Z",
|
|
673
|
+
dateTimeCompleted: "2024-02-15T14:35:00.000Z",
|
|
674
|
+
status: "Completed",
|
|
675
|
+
statusCode: "COMPLETED",
|
|
676
|
+
summary: {
|
|
677
|
+
totalRecords: 10,
|
|
678
|
+
successfulRecords: 9,
|
|
679
|
+
failedRecords: 1,
|
|
680
|
+
warningRecords: 0
|
|
681
|
+
},
|
|
682
|
+
results: [{
|
|
683
|
+
recordNumber: 1,
|
|
684
|
+
employeeNumber: "E12350",
|
|
685
|
+
employeeName: "John Smith",
|
|
686
|
+
status: "Success",
|
|
687
|
+
statusCode: "SUCCESS",
|
|
688
|
+
message: "Employee record created successfully"
|
|
689
|
+
}, {
|
|
690
|
+
recordNumber: 2,
|
|
691
|
+
employeeNumber: null,
|
|
692
|
+
employeeName: "Jane Doe",
|
|
693
|
+
status: "Failed",
|
|
694
|
+
statusCode: "FAILED",
|
|
695
|
+
message: "Required field 'SSN' is missing",
|
|
696
|
+
errorCode: "MISSING_REQUIRED_FIELD"
|
|
697
|
+
}]
|
|
698
|
+
} };
|
|
699
|
+
const selectCompanyExamplePayload = { result: [
|
|
700
|
+
{
|
|
701
|
+
label: "ACME Corporation (ACME001)",
|
|
702
|
+
key: "ACME001"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
label: "TechCorp Industries (TECH002)",
|
|
706
|
+
key: "TECH002"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
label: "Global Services LLC (GLOB003)",
|
|
710
|
+
key: "GLOB003"
|
|
711
|
+
}
|
|
712
|
+
] };
|
|
713
|
+
const selectJobExamplePayload = { result: [
|
|
714
|
+
{
|
|
715
|
+
label: "Software Developer (SW-DEV)",
|
|
716
|
+
key: "JOB-DEV-001"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
label: "Marketing Manager (MKT-MGR)",
|
|
720
|
+
key: "JOB-MKT-001"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
label: "Sales Representative (SALES-REP)",
|
|
724
|
+
key: "JOB-SALES-001"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
label: "HR Specialist (HR-SPEC)",
|
|
728
|
+
key: "JOB-HR-001"
|
|
729
|
+
}
|
|
730
|
+
] };
|
|
731
|
+
const selectLocationExamplePayload = { result: [
|
|
732
|
+
{
|
|
733
|
+
label: "San Francisco Headquarters (SF-HQ)",
|
|
734
|
+
key: "LOC-SF"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
label: "New York Office (NYC-OFFICE)",
|
|
738
|
+
key: "LOC-NYC"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
label: "Remote (REMOTE)",
|
|
742
|
+
key: "LOC-REMOTE"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
label: "Chicago Branch (CHI-BRANCH)",
|
|
746
|
+
key: "LOC-CHI"
|
|
747
|
+
}
|
|
748
|
+
] };
|
|
749
|
+
const selectPositionExamplePayload = { result: [
|
|
750
|
+
{
|
|
751
|
+
label: "Software Engineer (SW-ENG-001)",
|
|
752
|
+
key: "POS-001"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
label: "Marketing Manager (MKT-MGR-001)",
|
|
756
|
+
key: "POS-002"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
label: "Sales Lead (SALES-LEAD-001)",
|
|
760
|
+
key: "POS-003"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
label: "HR Coordinator (HR-COORD-001)",
|
|
764
|
+
key: "POS-004"
|
|
765
|
+
}
|
|
766
|
+
] };
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region src/constants.ts
|
|
769
|
+
const EMPLOYEE_TYPE_OPTIONS = [
|
|
770
|
+
{
|
|
771
|
+
label: "Full-Time",
|
|
772
|
+
value: "FT"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
label: "Part-Time",
|
|
776
|
+
value: "PT"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
label: "Contractor",
|
|
780
|
+
value: "C"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
label: "Temporary",
|
|
784
|
+
value: "T"
|
|
785
|
+
}
|
|
786
|
+
];
|
|
787
|
+
const STATUS_CODE_OPTIONS = [
|
|
788
|
+
{
|
|
789
|
+
label: "Active",
|
|
790
|
+
value: "A"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
label: "Inactive",
|
|
794
|
+
value: "I"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
label: "Terminated",
|
|
798
|
+
value: "T"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
label: "Leave of Absence",
|
|
802
|
+
value: "L"
|
|
803
|
+
}
|
|
804
|
+
];
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region src/util/pagination.ts
|
|
807
|
+
const extractItems = (response, itemsKey) => {
|
|
808
|
+
if (Array.isArray(response)) return response;
|
|
809
|
+
if (itemsKey && response[itemsKey]) return response[itemsKey];
|
|
810
|
+
return response.data || response.items || response.results || response.employees || response.newHires || response.jobs || response.locations || response.positions || [];
|
|
811
|
+
};
|
|
812
|
+
const fetchAllPages = async (client, endpoint, options = {}) => {
|
|
813
|
+
const { params = {}, pageSize = 100, itemsKey } = options;
|
|
814
|
+
const allItems = [];
|
|
815
|
+
let currentPage = 1;
|
|
816
|
+
let hasMore = true;
|
|
817
|
+
while (hasMore && currentPage <= 100) {
|
|
818
|
+
const requestParams = {
|
|
819
|
+
...params,
|
|
820
|
+
page: currentPage,
|
|
821
|
+
per_page: pageSize
|
|
822
|
+
};
|
|
823
|
+
const { data } = await client.get(endpoint, { params: requestParams });
|
|
824
|
+
const items = extractItems(data, itemsKey);
|
|
825
|
+
allItems.push(...items);
|
|
826
|
+
hasMore = items.length === pageSize;
|
|
827
|
+
currentPage++;
|
|
828
|
+
}
|
|
829
|
+
return allItems;
|
|
830
|
+
};
|
|
831
|
+
const fetchWithPagination = async (client, endpoint, params, fetchAll, itemsKey) => {
|
|
832
|
+
if (fetchAll) return { data: await fetchAllPages(client, endpoint, {
|
|
833
|
+
params,
|
|
834
|
+
itemsKey
|
|
835
|
+
}) };
|
|
836
|
+
const { data } = await client.get(endpoint, { params });
|
|
837
|
+
return { data };
|
|
838
|
+
};
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region src/util/picklist.ts
|
|
841
|
+
const toPicklistResult = (items, config) => {
|
|
842
|
+
return items.map((item) => ({
|
|
843
|
+
label: config.getLabel(item),
|
|
844
|
+
key: config.getKey(item)
|
|
845
|
+
}));
|
|
846
|
+
};
|
|
847
|
+
//#endregion
|
|
848
|
+
//#region src/util/triggers.ts
|
|
849
|
+
const isValidHmacSignature = (payload, signature, secret) => {
|
|
850
|
+
const expectedSignature = node_crypto.createHmac("sha256", secret).update(payload).digest("hex");
|
|
851
|
+
try {
|
|
852
|
+
return node_crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expectedSignature));
|
|
853
|
+
} catch {
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
const resolveEmployeeChangeRecords = (data) => (data ?? []).map((record) => ({
|
|
858
|
+
changeType: "changed",
|
|
859
|
+
record
|
|
860
|
+
}));
|
|
861
|
+
const resolveNewHireStatusChanges = (data) => (data ?? []).map((record) => ({
|
|
862
|
+
changeType: record.changeType,
|
|
863
|
+
record
|
|
864
|
+
}));
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region src/inputs/common.ts
|
|
867
|
+
const { debugRequest: _, ...rawRequestInputs } = _prismatic_io_spectral_http.inputs;
|
|
868
|
+
const connectionInput = (0, _prismatic_io_spectral.input)({
|
|
869
|
+
label: "Connection",
|
|
870
|
+
type: "connection",
|
|
871
|
+
required: true,
|
|
872
|
+
comments: "Select your UKG Pro connection."
|
|
873
|
+
});
|
|
874
|
+
const page = (0, _prismatic_io_spectral.input)({
|
|
875
|
+
label: "Page",
|
|
876
|
+
type: "string",
|
|
877
|
+
required: false,
|
|
878
|
+
comments: "The page number to retrieve (1-indexed). Defaults to 1.",
|
|
879
|
+
placeholder: "Enter page number",
|
|
880
|
+
example: "1",
|
|
881
|
+
clean: cleanNumber
|
|
882
|
+
});
|
|
883
|
+
const perPage = (0, _prismatic_io_spectral.input)({
|
|
884
|
+
label: "Per Page",
|
|
885
|
+
type: "string",
|
|
886
|
+
required: false,
|
|
887
|
+
comments: "Number of records to return per page. Defaults to API default (usually 100).",
|
|
888
|
+
placeholder: "Enter number of records per page",
|
|
889
|
+
example: "100",
|
|
890
|
+
clean: cleanNumber
|
|
891
|
+
});
|
|
892
|
+
const fetchAll = (0, _prismatic_io_spectral.input)({
|
|
893
|
+
label: "Fetch All",
|
|
894
|
+
type: "boolean",
|
|
895
|
+
required: false,
|
|
896
|
+
default: "false",
|
|
897
|
+
comments: "When true, automatically fetches all pages of results using pagination.",
|
|
898
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
899
|
+
});
|
|
900
|
+
const startDate = (0, _prismatic_io_spectral.input)({
|
|
901
|
+
label: "Start Date",
|
|
902
|
+
type: "string",
|
|
903
|
+
required: false,
|
|
904
|
+
comments: "Start date for filtering results. Format: YYYY-MM-DD",
|
|
905
|
+
placeholder: "Enter start date (YYYY-MM-DD)",
|
|
906
|
+
example: "2024-01-01",
|
|
907
|
+
clean: cleanString
|
|
908
|
+
});
|
|
909
|
+
const endDate = (0, _prismatic_io_spectral.input)({
|
|
910
|
+
label: "End Date",
|
|
911
|
+
type: "string",
|
|
912
|
+
required: false,
|
|
913
|
+
comments: "End date for filtering results. Format: YYYY-MM-DD",
|
|
914
|
+
placeholder: "Enter end date (YYYY-MM-DD)",
|
|
915
|
+
example: "2024-12-31",
|
|
916
|
+
clean: cleanString
|
|
917
|
+
});
|
|
918
|
+
(0, _prismatic_io_spectral.input)({
|
|
919
|
+
label: "Last Check Date",
|
|
920
|
+
type: "string",
|
|
921
|
+
required: true,
|
|
922
|
+
comments: "The date/time to check for changes since. Must be at least 3 hours ago. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ssZ)",
|
|
923
|
+
placeholder: "Enter date/time (YYYY-MM-DDTHH:mm:ssZ)",
|
|
924
|
+
example: "2024-01-15T10:00:00Z",
|
|
925
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
926
|
+
});
|
|
927
|
+
const filterParameters = (0, _prismatic_io_spectral.input)({
|
|
928
|
+
label: "Filter Parameters",
|
|
929
|
+
type: "string",
|
|
930
|
+
collection: "keyvaluelist",
|
|
931
|
+
required: false,
|
|
932
|
+
comments: "Additional filter parameters as key-value pairs.",
|
|
933
|
+
example: "status=active,type=full-time",
|
|
934
|
+
placeholder: "Enter filter parameters",
|
|
935
|
+
clean: (value) => {
|
|
936
|
+
return _prismatic_io_spectral.util.types.keyValPairListToObject(value);
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
const paginationInputs = {
|
|
940
|
+
pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
|
|
941
|
+
label: "Pagination",
|
|
942
|
+
required: false,
|
|
943
|
+
comments: "Page and page-size controls.",
|
|
944
|
+
inputs: {
|
|
945
|
+
page,
|
|
946
|
+
perPage
|
|
947
|
+
}
|
|
948
|
+
}),
|
|
949
|
+
fetchAll
|
|
950
|
+
};
|
|
951
|
+
const dateRangeInputs = {
|
|
952
|
+
startDate,
|
|
953
|
+
endDate
|
|
954
|
+
};
|
|
955
|
+
const rawRequestActionInputs = {
|
|
956
|
+
connection: connectionInput,
|
|
957
|
+
...rawRequestInputs,
|
|
958
|
+
url: {
|
|
959
|
+
...rawRequestInputs.url,
|
|
960
|
+
comments: "Input the path only (/personnel/v1/employee-changes). The base URL is already included from the connection. For example, to call the employee changes endpoint, enter `/personnel/v1/employee-changes`.",
|
|
961
|
+
example: "/personnel/v1/employee-changes"
|
|
962
|
+
}
|
|
963
|
+
};
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/inputs/employee.ts
|
|
966
|
+
const employeeId = (0, _prismatic_io_spectral.input)({
|
|
967
|
+
label: "Employee ID",
|
|
968
|
+
type: "string",
|
|
969
|
+
required: true,
|
|
970
|
+
comments: "The unique identifier for the employee in UKG Pro.",
|
|
971
|
+
placeholder: "Enter employee ID",
|
|
972
|
+
example: "12345",
|
|
973
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
974
|
+
});
|
|
975
|
+
const companyId = (0, _prismatic_io_spectral.input)({
|
|
976
|
+
label: "Company ID",
|
|
977
|
+
type: "string",
|
|
978
|
+
required: true,
|
|
979
|
+
comments: "The 5-digit company identifier in UKG Pro. See [Company Access Code documentation](https://developer.ukg.com/hcm/docs/company-access-code) for details.",
|
|
980
|
+
placeholder: "Enter company ID",
|
|
981
|
+
example: "12345",
|
|
982
|
+
dataSource: "selectCompany",
|
|
983
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
984
|
+
});
|
|
985
|
+
(0, _prismatic_io_spectral.input)({
|
|
986
|
+
label: "Company IDs",
|
|
987
|
+
type: "string",
|
|
988
|
+
required: false,
|
|
989
|
+
comments: "Filter by one or more company IDs (comma-separated). Example: ABC,DEF,GHI",
|
|
990
|
+
placeholder: "Enter company ID(s)",
|
|
991
|
+
example: "ABC,DEF",
|
|
992
|
+
clean: cleanString
|
|
993
|
+
});
|
|
994
|
+
const primaryJobCode = (0, _prismatic_io_spectral.input)({
|
|
995
|
+
label: "Primary Job Code",
|
|
996
|
+
type: "string",
|
|
997
|
+
required: false,
|
|
998
|
+
comments: "Filter by one or more primary job codes (comma-separated). Example: SW-ENG,MKT-MGR",
|
|
999
|
+
placeholder: "Enter job code(s)",
|
|
1000
|
+
example: "SW-ENG,MKT-MGR",
|
|
1001
|
+
clean: cleanString
|
|
1002
|
+
});
|
|
1003
|
+
const primaryWorkLocationCode = (0, _prismatic_io_spectral.input)({
|
|
1004
|
+
label: "Primary Work Location Code",
|
|
1005
|
+
type: "string",
|
|
1006
|
+
required: false,
|
|
1007
|
+
comments: "Filter by one or more work location codes (comma-separated). Example: ATL-HQ,SF-WEST",
|
|
1008
|
+
placeholder: "Enter location code(s)",
|
|
1009
|
+
example: "ATL-HQ,SF-WEST",
|
|
1010
|
+
clean: cleanString
|
|
1011
|
+
});
|
|
1012
|
+
const primaryProjectCode = (0, _prismatic_io_spectral.input)({
|
|
1013
|
+
label: "Primary Project Code",
|
|
1014
|
+
type: "string",
|
|
1015
|
+
required: false,
|
|
1016
|
+
comments: "Filter by one or more project codes (comma-separated). Example: PROJ-001,PROJ-002",
|
|
1017
|
+
placeholder: "Enter project code(s)",
|
|
1018
|
+
example: "PROJ-001,PROJ-002",
|
|
1019
|
+
clean: cleanString
|
|
1020
|
+
});
|
|
1021
|
+
const deductionGroupCode = (0, _prismatic_io_spectral.input)({
|
|
1022
|
+
label: "Deduction Group Code",
|
|
1023
|
+
type: "string",
|
|
1024
|
+
required: false,
|
|
1025
|
+
comments: "Filter by one or more deduction group codes (comma-separated).",
|
|
1026
|
+
placeholder: "Enter deduction group code(s)",
|
|
1027
|
+
example: "DED-001,DED-002",
|
|
1028
|
+
clean: cleanString
|
|
1029
|
+
});
|
|
1030
|
+
const earningGroupCode = (0, _prismatic_io_spectral.input)({
|
|
1031
|
+
label: "Earning Group Code",
|
|
1032
|
+
type: "string",
|
|
1033
|
+
required: false,
|
|
1034
|
+
comments: "Filter by one or more earning group codes (comma-separated).",
|
|
1035
|
+
placeholder: "Enter earning group code(s)",
|
|
1036
|
+
example: "EARN-001,EARN-002",
|
|
1037
|
+
clean: cleanString
|
|
1038
|
+
});
|
|
1039
|
+
({
|
|
1040
|
+
...paginationInputs,
|
|
1041
|
+
...dateRangeInputs
|
|
1042
|
+
});
|
|
1043
|
+
const getAllEmploymentDetailsByCompanyInputs = {
|
|
1044
|
+
connection: connectionInput,
|
|
1045
|
+
companyId,
|
|
1046
|
+
...paginationInputs,
|
|
1047
|
+
filterParameters
|
|
1048
|
+
};
|
|
1049
|
+
const getAllPersonDetailsInputs = {
|
|
1050
|
+
connection: connectionInput,
|
|
1051
|
+
companyId: {
|
|
1052
|
+
...companyId,
|
|
1053
|
+
required: false
|
|
1054
|
+
},
|
|
1055
|
+
...paginationInputs,
|
|
1056
|
+
filterParameters
|
|
1057
|
+
};
|
|
1058
|
+
const getEmployeeChangesByDateInputs = {
|
|
1059
|
+
connection: connectionInput,
|
|
1060
|
+
...dateRangeInputs,
|
|
1061
|
+
...paginationInputs
|
|
1062
|
+
};
|
|
1063
|
+
const getEmployeeChangesByIdInputs = {
|
|
1064
|
+
connection: connectionInput,
|
|
1065
|
+
employeeId
|
|
1066
|
+
};
|
|
1067
|
+
const getEmploymentContractDetailsInputs = {
|
|
1068
|
+
connection: connectionInput,
|
|
1069
|
+
companyId: {
|
|
1070
|
+
...companyId,
|
|
1071
|
+
required: false
|
|
1072
|
+
},
|
|
1073
|
+
...paginationInputs,
|
|
1074
|
+
filterParameters
|
|
1075
|
+
};
|
|
1076
|
+
const getEmployeeDemographicDetailsInputs = {
|
|
1077
|
+
connection: connectionInput,
|
|
1078
|
+
companyId: {
|
|
1079
|
+
...companyId,
|
|
1080
|
+
required: false
|
|
1081
|
+
},
|
|
1082
|
+
...paginationInputs,
|
|
1083
|
+
filterParameters
|
|
1084
|
+
};
|
|
1085
|
+
const getEmployeeEmploymentDetailsInputs = {
|
|
1086
|
+
connection: connectionInput,
|
|
1087
|
+
companyId: {
|
|
1088
|
+
...companyId,
|
|
1089
|
+
required: false
|
|
1090
|
+
},
|
|
1091
|
+
employeeId: {
|
|
1092
|
+
...employeeId,
|
|
1093
|
+
required: false
|
|
1094
|
+
},
|
|
1095
|
+
primaryJobCode,
|
|
1096
|
+
primaryWorkLocationCode,
|
|
1097
|
+
primaryProjectCode,
|
|
1098
|
+
deductionGroupCode,
|
|
1099
|
+
earningGroupCode,
|
|
1100
|
+
...paginationInputs,
|
|
1101
|
+
filterParameters
|
|
1102
|
+
};
|
|
1103
|
+
const getEmployeeEmploymentDetailsByEmployeeIdAndCompanyIdInputs = {
|
|
1104
|
+
connection: connectionInput,
|
|
1105
|
+
companyId,
|
|
1106
|
+
employeeId,
|
|
1107
|
+
...paginationInputs,
|
|
1108
|
+
filterParameters
|
|
1109
|
+
};
|
|
1110
|
+
const getEmployeeJobHistoryInputs = {
|
|
1111
|
+
connection: connectionInput,
|
|
1112
|
+
employeeId,
|
|
1113
|
+
...paginationInputs
|
|
1114
|
+
};
|
|
1115
|
+
const getPersonDetailsByCompanyInputs = {
|
|
1116
|
+
connection: connectionInput,
|
|
1117
|
+
companyId,
|
|
1118
|
+
...paginationInputs,
|
|
1119
|
+
filterParameters
|
|
1120
|
+
};
|
|
1121
|
+
//#endregion
|
|
1122
|
+
//#region src/inputs/configuration.ts
|
|
1123
|
+
const jobId = (0, _prismatic_io_spectral.input)({
|
|
1124
|
+
label: "Job ID",
|
|
1125
|
+
type: "string",
|
|
1126
|
+
required: true,
|
|
1127
|
+
comments: "The unique identifier for the job.",
|
|
1128
|
+
placeholder: "Enter job ID",
|
|
1129
|
+
example: "JOB-001",
|
|
1130
|
+
dataSource: "selectJob",
|
|
1131
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1132
|
+
});
|
|
1133
|
+
const locationId = (0, _prismatic_io_spectral.input)({
|
|
1134
|
+
label: "Location ID",
|
|
1135
|
+
type: "string",
|
|
1136
|
+
required: true,
|
|
1137
|
+
comments: "The unique identifier for the location.",
|
|
1138
|
+
placeholder: "Enter location ID",
|
|
1139
|
+
example: "LOC-001",
|
|
1140
|
+
dataSource: "selectLocation",
|
|
1141
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1142
|
+
});
|
|
1143
|
+
const positionCode = (0, _prismatic_io_spectral.input)({
|
|
1144
|
+
label: "Position Code",
|
|
1145
|
+
type: "string",
|
|
1146
|
+
required: false,
|
|
1147
|
+
comments: "Filter positions by position code.",
|
|
1148
|
+
placeholder: "Enter position code",
|
|
1149
|
+
example: "ENG-SR",
|
|
1150
|
+
dataSource: "selectPosition",
|
|
1151
|
+
clean: cleanString
|
|
1152
|
+
});
|
|
1153
|
+
const employeeType = (0, _prismatic_io_spectral.input)({
|
|
1154
|
+
label: "Employee Type",
|
|
1155
|
+
type: "string",
|
|
1156
|
+
required: false,
|
|
1157
|
+
comments: "Filter by employee type (Full-Time, Part-Time, Contractor, Temporary).",
|
|
1158
|
+
placeholder: "Select employee type",
|
|
1159
|
+
example: "FT",
|
|
1160
|
+
model: EMPLOYEE_TYPE_OPTIONS,
|
|
1161
|
+
clean: cleanString
|
|
1162
|
+
});
|
|
1163
|
+
const payGroupCode = (0, _prismatic_io_spectral.input)({
|
|
1164
|
+
label: "Pay Group Code",
|
|
1165
|
+
type: "string",
|
|
1166
|
+
required: false,
|
|
1167
|
+
comments: "Filter by pay group code (e.g., WEEKLY, BIWEEKLY, MONTHLY).",
|
|
1168
|
+
placeholder: "Enter pay group code",
|
|
1169
|
+
example: "WEEKLY",
|
|
1170
|
+
clean: cleanString
|
|
1171
|
+
});
|
|
1172
|
+
const statusCode = (0, _prismatic_io_spectral.input)({
|
|
1173
|
+
label: "Status Code",
|
|
1174
|
+
type: "string",
|
|
1175
|
+
required: false,
|
|
1176
|
+
comments: "Filter by employee status code (Active, Inactive, Terminated, Leave of Absence).",
|
|
1177
|
+
placeholder: "Select status code",
|
|
1178
|
+
example: "A",
|
|
1179
|
+
model: STATUS_CODE_OPTIONS,
|
|
1180
|
+
clean: cleanString
|
|
1181
|
+
});
|
|
1182
|
+
const projectCode = (0, _prismatic_io_spectral.input)({
|
|
1183
|
+
label: "Project Code",
|
|
1184
|
+
type: "string",
|
|
1185
|
+
required: false,
|
|
1186
|
+
comments: "Filter by project code.",
|
|
1187
|
+
placeholder: "Enter project code",
|
|
1188
|
+
example: "PROJ-001",
|
|
1189
|
+
clean: cleanString
|
|
1190
|
+
});
|
|
1191
|
+
const shiftGroupCode = (0, _prismatic_io_spectral.input)({
|
|
1192
|
+
label: "Shift Group Code",
|
|
1193
|
+
type: "string",
|
|
1194
|
+
required: false,
|
|
1195
|
+
comments: "Filter by shift group code (e.g., DAY, NIGHT, SWING).",
|
|
1196
|
+
placeholder: "Enter shift group code",
|
|
1197
|
+
example: "DAY",
|
|
1198
|
+
clean: cleanString
|
|
1199
|
+
});
|
|
1200
|
+
const countryCode = (0, _prismatic_io_spectral.input)({
|
|
1201
|
+
label: "Country Code",
|
|
1202
|
+
type: "string",
|
|
1203
|
+
required: false,
|
|
1204
|
+
comments: "Filter locations by country code (e.g., US, CA, GB).",
|
|
1205
|
+
placeholder: "Enter country code",
|
|
1206
|
+
example: "US",
|
|
1207
|
+
clean: cleanString
|
|
1208
|
+
});
|
|
1209
|
+
const isActive = (0, _prismatic_io_spectral.input)({
|
|
1210
|
+
label: "Is Active",
|
|
1211
|
+
type: "boolean",
|
|
1212
|
+
required: false,
|
|
1213
|
+
comments: "When true, filters to only active jobs.",
|
|
1214
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
1215
|
+
});
|
|
1216
|
+
const isProrated = (0, _prismatic_io_spectral.input)({
|
|
1217
|
+
label: "Is Prorated",
|
|
1218
|
+
type: "boolean",
|
|
1219
|
+
required: false,
|
|
1220
|
+
comments: "When true, filters to only prorated employee positions.",
|
|
1221
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
1222
|
+
});
|
|
1223
|
+
const isApproved = (0, _prismatic_io_spectral.input)({
|
|
1224
|
+
label: "Is Approved",
|
|
1225
|
+
type: "boolean",
|
|
1226
|
+
required: false,
|
|
1227
|
+
comments: "When true, filters to only approved employee positions.",
|
|
1228
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
1229
|
+
});
|
|
1230
|
+
const isElegibleForBenefits = (0, _prismatic_io_spectral.input)({
|
|
1231
|
+
label: "Is Eligible For Benefits",
|
|
1232
|
+
type: "boolean",
|
|
1233
|
+
required: false,
|
|
1234
|
+
comments: "When true, filters to only employee positions eligible for benefits.",
|
|
1235
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
1236
|
+
});
|
|
1237
|
+
const companyCode = (0, _prismatic_io_spectral.input)({
|
|
1238
|
+
label: "Company Code",
|
|
1239
|
+
type: "string",
|
|
1240
|
+
required: false,
|
|
1241
|
+
comments: "Filter by company code.",
|
|
1242
|
+
placeholder: "Enter company code",
|
|
1243
|
+
example: "COMP-001",
|
|
1244
|
+
clean: cleanString
|
|
1245
|
+
});
|
|
1246
|
+
const masterCompanyId = (0, _prismatic_io_spectral.input)({
|
|
1247
|
+
label: "Master Company ID",
|
|
1248
|
+
type: "string",
|
|
1249
|
+
required: false,
|
|
1250
|
+
comments: "Filter by master company ID.",
|
|
1251
|
+
placeholder: "Enter master company ID",
|
|
1252
|
+
example: "MCOMP-001",
|
|
1253
|
+
clean: cleanString
|
|
1254
|
+
});
|
|
1255
|
+
const isMasterCompany = (0, _prismatic_io_spectral.input)({
|
|
1256
|
+
label: "Is Master Company",
|
|
1257
|
+
type: "boolean",
|
|
1258
|
+
required: false,
|
|
1259
|
+
comments: "When true, filters to only master companies.",
|
|
1260
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
1261
|
+
});
|
|
1262
|
+
const getJobInputs = {
|
|
1263
|
+
connection: connectionInput,
|
|
1264
|
+
jobId
|
|
1265
|
+
};
|
|
1266
|
+
const getSingleLocationInputs = {
|
|
1267
|
+
connection: connectionInput,
|
|
1268
|
+
locationId
|
|
1269
|
+
};
|
|
1270
|
+
const listJobsInputs = {
|
|
1271
|
+
connection: connectionInput,
|
|
1272
|
+
companyId,
|
|
1273
|
+
...paginationInputs
|
|
1274
|
+
};
|
|
1275
|
+
const listCompaniesInputs = {
|
|
1276
|
+
connection: connectionInput,
|
|
1277
|
+
companyId: {
|
|
1278
|
+
...companyId,
|
|
1279
|
+
required: false
|
|
1280
|
+
},
|
|
1281
|
+
masterCompanyId,
|
|
1282
|
+
companyCode,
|
|
1283
|
+
isMasterCompany,
|
|
1284
|
+
...paginationInputs
|
|
1285
|
+
};
|
|
1286
|
+
const listLocationsInputs = {
|
|
1287
|
+
connection: connectionInput,
|
|
1288
|
+
countryCode,
|
|
1289
|
+
isActive
|
|
1290
|
+
};
|
|
1291
|
+
const listPositionsInputs = {
|
|
1292
|
+
companyId,
|
|
1293
|
+
employeeType,
|
|
1294
|
+
payGroupCode,
|
|
1295
|
+
statusCode,
|
|
1296
|
+
positionCode,
|
|
1297
|
+
projectCode,
|
|
1298
|
+
shiftGroupCode,
|
|
1299
|
+
isProrated,
|
|
1300
|
+
isApproved,
|
|
1301
|
+
isElegibleForBenefits,
|
|
1302
|
+
...paginationInputs,
|
|
1303
|
+
connection: connectionInput
|
|
1304
|
+
};
|
|
1305
|
+
//#endregion
|
|
1306
|
+
//#region src/inputs/dataSources.ts
|
|
1307
|
+
const selectCompanyInputs = { connection: connectionInput };
|
|
1308
|
+
const selectJobInputs = {
|
|
1309
|
+
connection: connectionInput,
|
|
1310
|
+
companyId: {
|
|
1311
|
+
...companyId,
|
|
1312
|
+
required: false,
|
|
1313
|
+
dataSource: void 0
|
|
1314
|
+
}
|
|
1315
|
+
};
|
|
1316
|
+
const selectLocationInputs = {
|
|
1317
|
+
connection: connectionInput,
|
|
1318
|
+
companyId: {
|
|
1319
|
+
...companyId,
|
|
1320
|
+
required: false,
|
|
1321
|
+
dataSource: void 0
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
const selectPositionInputs = {
|
|
1325
|
+
connection: connectionInput,
|
|
1326
|
+
companyId: {
|
|
1327
|
+
...companyId,
|
|
1328
|
+
required: false,
|
|
1329
|
+
dataSource: void 0
|
|
1330
|
+
}
|
|
1331
|
+
};
|
|
1332
|
+
//#endregion
|
|
1333
|
+
//#region src/inputs/importTool.ts
|
|
1334
|
+
const fileId = (0, _prismatic_io_spectral.input)({
|
|
1335
|
+
label: "File ID",
|
|
1336
|
+
type: "string",
|
|
1337
|
+
required: true,
|
|
1338
|
+
comments: "The unique identifier for the file in the Import Tool.",
|
|
1339
|
+
placeholder: "Enter file ID",
|
|
1340
|
+
example: "12345678-abcd-1234-efgh-567890ijklmn",
|
|
1341
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1342
|
+
});
|
|
1343
|
+
const stagingId = (0, _prismatic_io_spectral.input)({
|
|
1344
|
+
label: "Staging ID",
|
|
1345
|
+
type: "string",
|
|
1346
|
+
required: true,
|
|
1347
|
+
comments: "The unique staging identifier returned from the Import XML Data action. Used to track transaction status.",
|
|
1348
|
+
placeholder: "Enter staging ID",
|
|
1349
|
+
example: "12345678-abcd-1234-efgh-567890ijklmn",
|
|
1350
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1351
|
+
});
|
|
1352
|
+
const xmlTransaction = (0, _prismatic_io_spectral.input)({
|
|
1353
|
+
label: "XML Transaction",
|
|
1354
|
+
type: "code",
|
|
1355
|
+
language: "xml",
|
|
1356
|
+
required: true,
|
|
1357
|
+
comments: "The encoded XML transaction to submit to the Import Tool. See the [Import Tool XML and Configuration Settings Guide](https://developer.ukg.com/hcm/reference/importtool_importsxmldata) for transaction format.",
|
|
1358
|
+
example: `<?xml version="1.0" encoding="utf-8"?>
|
|
1359
|
+
<ImportToolRequest>
|
|
1360
|
+
<Transaction Type="NewHire">
|
|
1361
|
+
<Employee>
|
|
1362
|
+
<FirstName>John</FirstName>
|
|
1363
|
+
<LastName>Doe</LastName>
|
|
1364
|
+
<Email>john.doe@example.com</Email>
|
|
1365
|
+
</Employee>
|
|
1366
|
+
</Transaction>
|
|
1367
|
+
</ImportToolRequest>`,
|
|
1368
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1369
|
+
});
|
|
1370
|
+
const uniqueFileName = (0, _prismatic_io_spectral.input)({
|
|
1371
|
+
label: "Unique File Name",
|
|
1372
|
+
type: "string",
|
|
1373
|
+
required: false,
|
|
1374
|
+
comments: "Optional unique file name for the import transaction. Must end with .xml extension.",
|
|
1375
|
+
placeholder: "Enter file name (e.g., import-2024-01-15.xml)",
|
|
1376
|
+
example: "newhire-batch-2024-01-15.xml",
|
|
1377
|
+
clean: cleanString
|
|
1378
|
+
});
|
|
1379
|
+
const getFileStatusInputs = {
|
|
1380
|
+
connection: connectionInput,
|
|
1381
|
+
fileId
|
|
1382
|
+
};
|
|
1383
|
+
const getFileSummaryInputs = {
|
|
1384
|
+
connection: connectionInput,
|
|
1385
|
+
fileId
|
|
1386
|
+
};
|
|
1387
|
+
const getImportStatusInputs = {
|
|
1388
|
+
connection: connectionInput,
|
|
1389
|
+
stagingId
|
|
1390
|
+
};
|
|
1391
|
+
const getTransactionStatusInputs = { connection: connectionInput };
|
|
1392
|
+
const importXmlDataInputs = {
|
|
1393
|
+
connection: connectionInput,
|
|
1394
|
+
xmlTransaction,
|
|
1395
|
+
uniqueFileName
|
|
1396
|
+
};
|
|
1397
|
+
(0, _prismatic_io_spectral.input)({
|
|
1398
|
+
label: "Tenant Identifier",
|
|
1399
|
+
type: "string",
|
|
1400
|
+
required: true,
|
|
1401
|
+
comments: "The UKG Pro tenant identifier for Talent Onboarding APIs.",
|
|
1402
|
+
placeholder: "Enter tenant identifier",
|
|
1403
|
+
example: "ACME_CORP",
|
|
1404
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1405
|
+
});
|
|
1406
|
+
(0, _prismatic_io_spectral.input)({
|
|
1407
|
+
label: "New Hire ID",
|
|
1408
|
+
type: "string",
|
|
1409
|
+
required: true,
|
|
1410
|
+
comments: "The unique identifier for the new hire record.",
|
|
1411
|
+
placeholder: "Enter new hire ID",
|
|
1412
|
+
example: "NH-12345",
|
|
1413
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1414
|
+
});
|
|
1415
|
+
(0, _prismatic_io_spectral.input)({
|
|
1416
|
+
label: "New Hire Data",
|
|
1417
|
+
type: "code",
|
|
1418
|
+
language: "json",
|
|
1419
|
+
required: true,
|
|
1420
|
+
comments: "JSON object containing new hire details. See [Employee New Hire Service documentation](https://developer.ukg.com/hcm/docs/employee-new-hire-service) for required fields.",
|
|
1421
|
+
example: JSON.stringify({
|
|
1422
|
+
firstName: "John",
|
|
1423
|
+
lastName: "Doe",
|
|
1424
|
+
email: "john.doe@example.com",
|
|
1425
|
+
startDate: "2024-02-01",
|
|
1426
|
+
jobTitle: "Software Engineer",
|
|
1427
|
+
department: "Engineering"
|
|
1428
|
+
}, null, 2),
|
|
1429
|
+
clean: _prismatic_io_spectral.util.types.toObject
|
|
1430
|
+
});
|
|
1431
|
+
({ ...paginationInputs });
|
|
1432
|
+
({ ...paginationInputs });
|
|
1433
|
+
({ ...paginationInputs });
|
|
1434
|
+
(0, _prismatic_io_spectral.input)({
|
|
1435
|
+
label: "Pending Hire ID",
|
|
1436
|
+
placeholder: "Enter pending hire ID",
|
|
1437
|
+
comments: "The unique identifier of the pending hire record.",
|
|
1438
|
+
type: "string",
|
|
1439
|
+
required: true,
|
|
1440
|
+
example: "PH-10001",
|
|
1441
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1442
|
+
});
|
|
1443
|
+
(0, _prismatic_io_spectral.input)({
|
|
1444
|
+
label: "Record ID",
|
|
1445
|
+
type: "string",
|
|
1446
|
+
required: true,
|
|
1447
|
+
comments: "The unique identifier for the pending hire record.",
|
|
1448
|
+
placeholder: "Enter record ID",
|
|
1449
|
+
example: "PH-12345",
|
|
1450
|
+
clean: _prismatic_io_spectral.util.types.toString
|
|
1451
|
+
});
|
|
1452
|
+
(0, _prismatic_io_spectral.input)({
|
|
1453
|
+
label: "Pending Hire Data",
|
|
1454
|
+
type: "code",
|
|
1455
|
+
language: "json",
|
|
1456
|
+
required: true,
|
|
1457
|
+
comments: "JSON object containing pending hire details. See [Pending Hire Service documentation](https://developer.ukg.com/hcm/docs/pending-hire-service) for required fields.",
|
|
1458
|
+
example: JSON.stringify({
|
|
1459
|
+
firstName: "Jane",
|
|
1460
|
+
lastName: "Smith",
|
|
1461
|
+
email: "jane.smith@example.com",
|
|
1462
|
+
expectedStartDate: "2024-03-01"
|
|
1463
|
+
}, null, 2),
|
|
1464
|
+
clean: _prismatic_io_spectral.util.types.toObject
|
|
1465
|
+
});
|
|
1466
|
+
({ ...paginationInputs });
|
|
1467
|
+
//#endregion
|
|
1468
|
+
//#region src/inputs/triggers.ts
|
|
1469
|
+
const webhookSecret = (0, _prismatic_io_spectral.input)({
|
|
1470
|
+
label: "Webhook Secret",
|
|
1471
|
+
type: "password",
|
|
1472
|
+
required: false,
|
|
1473
|
+
comments: "The shared secret used to verify webhook signatures. Configure this in UKG Pro webhook settings and enter the same value here.",
|
|
1474
|
+
placeholder: "Enter webhook secret",
|
|
1475
|
+
clean: cleanString
|
|
1476
|
+
});
|
|
1477
|
+
const verifySignature = (0, _prismatic_io_spectral.input)({
|
|
1478
|
+
label: "Verify Webhook Signature",
|
|
1479
|
+
type: "boolean",
|
|
1480
|
+
required: false,
|
|
1481
|
+
default: "false",
|
|
1482
|
+
comments: "When true, validates the HMAC-SHA256 webhook signature using the webhook secret. Requires Webhook Secret to be configured.",
|
|
1483
|
+
clean: _prismatic_io_spectral.util.types.toBool
|
|
1484
|
+
});
|
|
1485
|
+
const pollEmployeeChangesInputs = {
|
|
1486
|
+
connection: connectionInput,
|
|
1487
|
+
lookBackDate: (0, _prismatic_io_spectral.input)({
|
|
1488
|
+
label: "Look-back Date",
|
|
1489
|
+
placeholder: "Enter look-back date (YYYY-MM-DD)",
|
|
1490
|
+
type: "string",
|
|
1491
|
+
required: false,
|
|
1492
|
+
comments: "The date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each employee change made on or after this date once.",
|
|
1493
|
+
example: "2026-01-01",
|
|
1494
|
+
clean: lookBackDateClean
|
|
1495
|
+
}),
|
|
1496
|
+
companyId: {
|
|
1497
|
+
...companyId,
|
|
1498
|
+
required: false,
|
|
1499
|
+
comments: "Optional company ID to filter changes. Leave empty for all companies."
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1502
|
+
const pollNewHireStatusInputs = { connection: connectionInput };
|
|
1503
|
+
const webhookEmployeeLifecycleInputs = {
|
|
1504
|
+
connection: connectionInput,
|
|
1505
|
+
webhookSecret,
|
|
1506
|
+
verifySignature
|
|
1507
|
+
};
|
|
1508
|
+
//#endregion
|
|
1509
|
+
//#region src/actions/configuration/index.ts
|
|
1510
|
+
var configuration_default = {
|
|
1511
|
+
getJob: (0, _prismatic_io_spectral.action)({
|
|
1512
|
+
display: {
|
|
1513
|
+
label: "Get Job",
|
|
1514
|
+
description: "Retrieve detailed information for a specific job definition."
|
|
1515
|
+
},
|
|
1516
|
+
inputs: getJobInputs,
|
|
1517
|
+
perform: async (context, { connection, jobId }) => {
|
|
1518
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get(`/configuration/v2/jobs/${jobId}`);
|
|
1519
|
+
return { data };
|
|
1520
|
+
},
|
|
1521
|
+
examplePayload: getJobExamplePayload
|
|
1522
|
+
}),
|
|
1523
|
+
getSingleLocation: (0, _prismatic_io_spectral.action)({
|
|
1524
|
+
display: {
|
|
1525
|
+
label: "Get Single Location",
|
|
1526
|
+
description: "Retrieve detailed information for a specific work location."
|
|
1527
|
+
},
|
|
1528
|
+
inputs: getSingleLocationInputs,
|
|
1529
|
+
perform: async (context, { connection, locationId }) => {
|
|
1530
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get(`/configuration/v1/locations/${locationId}`);
|
|
1531
|
+
return { data };
|
|
1532
|
+
},
|
|
1533
|
+
examplePayload: getSingleLocationExamplePayload
|
|
1534
|
+
}),
|
|
1535
|
+
listCompanies: (0, _prismatic_io_spectral.action)({
|
|
1536
|
+
display: {
|
|
1537
|
+
label: "List Companies",
|
|
1538
|
+
description: "Retrieve a list of all companies defined in the organization."
|
|
1539
|
+
},
|
|
1540
|
+
inputs: listCompaniesInputs,
|
|
1541
|
+
perform: async (context, { connection, companyCode, companyId, fetchAll, isMasterCompany, masterCompanyId, pagination }) => {
|
|
1542
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/configuration/v1/company-details", {
|
|
1543
|
+
companyCode,
|
|
1544
|
+
companyId,
|
|
1545
|
+
isMasterCompany,
|
|
1546
|
+
masterCompanyId,
|
|
1547
|
+
page: pagination.page,
|
|
1548
|
+
perPage: pagination.perPage
|
|
1549
|
+
}, fetchAll);
|
|
1550
|
+
return { data };
|
|
1551
|
+
},
|
|
1552
|
+
examplePayload: listCompaniesExamplePayload
|
|
1553
|
+
}),
|
|
1554
|
+
listJobs: (0, _prismatic_io_spectral.action)({
|
|
1555
|
+
display: {
|
|
1556
|
+
label: "List Jobs",
|
|
1557
|
+
description: "Retrieve a list of job definitions in the organization."
|
|
1558
|
+
},
|
|
1559
|
+
inputs: listJobsInputs,
|
|
1560
|
+
perform: async (context, { connection, companyId, pagination, fetchAll }) => {
|
|
1561
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/configuration/v2/jobs", {
|
|
1562
|
+
company: companyId,
|
|
1563
|
+
page: pagination.page,
|
|
1564
|
+
per_page: pagination.perPage
|
|
1565
|
+
}, fetchAll);
|
|
1566
|
+
return { data };
|
|
1567
|
+
}
|
|
1568
|
+
}),
|
|
1569
|
+
listLocations: (0, _prismatic_io_spectral.action)({
|
|
1570
|
+
display: {
|
|
1571
|
+
label: "List Locations",
|
|
1572
|
+
description: "Retrieve a list of work locations defined in the organization."
|
|
1573
|
+
},
|
|
1574
|
+
inputs: listLocationsInputs,
|
|
1575
|
+
perform: async (context, { connection, countryCode, isActive }) => {
|
|
1576
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get("/configuration/v1/locations", { params: {
|
|
1577
|
+
countryCode,
|
|
1578
|
+
isActive
|
|
1579
|
+
} });
|
|
1580
|
+
return { data };
|
|
1581
|
+
},
|
|
1582
|
+
examplePayload: listLocationsExamplePayload
|
|
1583
|
+
}),
|
|
1584
|
+
listPositions: (0, _prismatic_io_spectral.action)({
|
|
1585
|
+
display: {
|
|
1586
|
+
label: "List Positions",
|
|
1587
|
+
description: "Retrieve a list of positions defined in the organization."
|
|
1588
|
+
},
|
|
1589
|
+
inputs: listPositionsInputs,
|
|
1590
|
+
perform: async (context, { connection, companyId, employeeType, payGroupCode, statusCode, positionCode, projectCode, shiftGroupCode, fetchAll, pagination, isProrated, isApproved, isElegibleForBenefits }) => {
|
|
1591
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/configuration/v1/positions", {
|
|
1592
|
+
company: companyId,
|
|
1593
|
+
employeeType,
|
|
1594
|
+
payGroupCode,
|
|
1595
|
+
statusCode,
|
|
1596
|
+
positionCode,
|
|
1597
|
+
projectCode,
|
|
1598
|
+
shiftGroupCode,
|
|
1599
|
+
page: pagination.page,
|
|
1600
|
+
per_page: pagination.perPage,
|
|
1601
|
+
isProrated,
|
|
1602
|
+
isApproved,
|
|
1603
|
+
isElegibleForBenefits
|
|
1604
|
+
}, fetchAll);
|
|
1605
|
+
return { data };
|
|
1606
|
+
},
|
|
1607
|
+
examplePayload: listPositionsExamplePayload
|
|
1608
|
+
})
|
|
1609
|
+
};
|
|
1610
|
+
//#endregion
|
|
1611
|
+
//#region src/actions/employees/getAllEmploymentDetailsByCompany.ts
|
|
1612
|
+
const getAllEmploymentDetailsByCompany = (0, _prismatic_io_spectral.action)({
|
|
1613
|
+
display: {
|
|
1614
|
+
label: "Get All Employment Details by Company",
|
|
1615
|
+
description: "Retrieve employment details for all employees within a specific company."
|
|
1616
|
+
},
|
|
1617
|
+
inputs: getAllEmploymentDetailsByCompanyInputs,
|
|
1618
|
+
perform: async (context, { connection, companyId, filterParameters, fetchAll, pagination }) => {
|
|
1619
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), `/personnel/v1/companies/${companyId}/employment-details`, {
|
|
1620
|
+
...filterParameters,
|
|
1621
|
+
page: pagination.page,
|
|
1622
|
+
per_page: pagination.perPage
|
|
1623
|
+
}, fetchAll);
|
|
1624
|
+
return { data };
|
|
1625
|
+
}
|
|
1626
|
+
});
|
|
1627
|
+
//#endregion
|
|
1628
|
+
//#region src/actions/employees/getAllPersonDetails.ts
|
|
1629
|
+
const getAllPersonDetails = (0, _prismatic_io_spectral.action)({
|
|
1630
|
+
display: {
|
|
1631
|
+
label: "Get All Person Details",
|
|
1632
|
+
description: "Retrieve person details for all employees across all companies."
|
|
1633
|
+
},
|
|
1634
|
+
inputs: getAllPersonDetailsInputs,
|
|
1635
|
+
perform: async (context, { connection, filterParameters, fetchAll, pagination }) => {
|
|
1636
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/personnel/v1/person-details", {
|
|
1637
|
+
...filterParameters,
|
|
1638
|
+
page: pagination.page,
|
|
1639
|
+
per_page: pagination.perPage
|
|
1640
|
+
}, fetchAll);
|
|
1641
|
+
return { data };
|
|
1642
|
+
},
|
|
1643
|
+
examplePayload: getAllPersonDetailsExamplePayload
|
|
1644
|
+
});
|
|
1645
|
+
//#endregion
|
|
1646
|
+
//#region src/actions/employees/getEmployeeChangesByDate.ts
|
|
1647
|
+
const getEmployeeChangesByDate = (0, _prismatic_io_spectral.action)({
|
|
1648
|
+
display: {
|
|
1649
|
+
label: "Get Employee Changes by Date",
|
|
1650
|
+
description: "Retrieve employees with changes since a specified date. Note: Date must be at least 3 hours ago."
|
|
1651
|
+
},
|
|
1652
|
+
inputs: getEmployeeChangesByDateInputs,
|
|
1653
|
+
perform: async (context, { connection, startDate, endDate, fetchAll, pagination }) => {
|
|
1654
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/personnel/v1/employee-changes", {
|
|
1655
|
+
start_date: startDate,
|
|
1656
|
+
end_date: endDate,
|
|
1657
|
+
page: pagination.page,
|
|
1658
|
+
per_page: pagination.perPage
|
|
1659
|
+
}, fetchAll);
|
|
1660
|
+
return { data };
|
|
1661
|
+
},
|
|
1662
|
+
examplePayload: getEmployeeChangesByDateExamplePayload
|
|
1663
|
+
});
|
|
1664
|
+
//#endregion
|
|
1665
|
+
//#region src/actions/employees/getEmployeeChangesById.ts
|
|
1666
|
+
const getEmployeeChangesById = (0, _prismatic_io_spectral.action)({
|
|
1667
|
+
display: {
|
|
1668
|
+
label: "Get Employee Changes by ID",
|
|
1669
|
+
description: "Retrieve change history for a specific employee."
|
|
1670
|
+
},
|
|
1671
|
+
inputs: getEmployeeChangesByIdInputs,
|
|
1672
|
+
perform: async (context, { connection, employeeId }) => {
|
|
1673
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get(`/personnel/v1/employee-changes/${employeeId}`);
|
|
1674
|
+
return { data };
|
|
1675
|
+
},
|
|
1676
|
+
examplePayload: getEmployeeChangesByIdExamplePayload
|
|
1677
|
+
});
|
|
1678
|
+
//#endregion
|
|
1679
|
+
//#region src/actions/employees/getEmployeeContractDetails.ts
|
|
1680
|
+
const getEmploymentContractDetails = (0, _prismatic_io_spectral.action)({
|
|
1681
|
+
display: {
|
|
1682
|
+
label: "Get All Employment Contract Details",
|
|
1683
|
+
description: "Retrieve contract details for all employees."
|
|
1684
|
+
},
|
|
1685
|
+
inputs: getEmploymentContractDetailsInputs,
|
|
1686
|
+
perform: async (context, { connection, companyId, fetchAll, filterParameters, pagination }) => {
|
|
1687
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/personnel/v1/employee-contract-details", {
|
|
1688
|
+
...filterParameters,
|
|
1689
|
+
companyId,
|
|
1690
|
+
page: pagination.page,
|
|
1691
|
+
per_page: pagination.perPage
|
|
1692
|
+
}, fetchAll);
|
|
1693
|
+
return { data };
|
|
1694
|
+
},
|
|
1695
|
+
examplePayload: getEmployeeContractDetailsExamplePayload
|
|
1696
|
+
});
|
|
1697
|
+
//#endregion
|
|
1698
|
+
//#region src/actions/employees/getEmployeeDemographicDetails.ts
|
|
1699
|
+
const getEmployeeDemographicDetails = (0, _prismatic_io_spectral.action)({
|
|
1700
|
+
display: {
|
|
1701
|
+
label: "Get Employee Demographic Details",
|
|
1702
|
+
description: "Retrieve demographic details for employees, optionally filtered by date range."
|
|
1703
|
+
},
|
|
1704
|
+
inputs: getEmployeeDemographicDetailsInputs,
|
|
1705
|
+
perform: async (context, { connection, pagination, fetchAll, companyId, filterParameters }) => {
|
|
1706
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/personnel/v1/employee-demographic-details", {
|
|
1707
|
+
...filterParameters,
|
|
1708
|
+
page: pagination.page,
|
|
1709
|
+
per_page: pagination.perPage,
|
|
1710
|
+
companyId
|
|
1711
|
+
}, fetchAll);
|
|
1712
|
+
return { data };
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1715
|
+
//#endregion
|
|
1716
|
+
//#region src/actions/employees/getEmployeeEmploymentDetails.ts
|
|
1717
|
+
const getEmployeeEmploymentDetails = (0, _prismatic_io_spectral.action)({
|
|
1718
|
+
display: {
|
|
1719
|
+
label: "Get Employee Employment Details",
|
|
1720
|
+
description: "Retrieve employee's employment details according to the specified query parameters."
|
|
1721
|
+
},
|
|
1722
|
+
inputs: getEmployeeEmploymentDetailsInputs,
|
|
1723
|
+
perform: async (context, { connection, companyId, employeeId, fetchAll, filterParameters, pagination, deductionGroupCode, earningGroupCode, primaryJobCode, primaryProjectCode, primaryWorkLocationCode }) => {
|
|
1724
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/personnel/v1/employee-employment-details", {
|
|
1725
|
+
...filterParameters,
|
|
1726
|
+
page: pagination.page,
|
|
1727
|
+
per_page: pagination.perPage,
|
|
1728
|
+
companyId,
|
|
1729
|
+
employeeId,
|
|
1730
|
+
deductionGroupCode,
|
|
1731
|
+
earningGroupCode,
|
|
1732
|
+
primaryJobCode,
|
|
1733
|
+
primaryWorkLocationCode,
|
|
1734
|
+
primaryProjectCode
|
|
1735
|
+
}, fetchAll);
|
|
1736
|
+
return { data };
|
|
1737
|
+
},
|
|
1738
|
+
examplePayload: getEmployeeEmploymentDetailsExamplePayload
|
|
1739
|
+
});
|
|
1740
|
+
//#endregion
|
|
1741
|
+
//#region src/actions/employees/getEmployeeJobHistory.ts
|
|
1742
|
+
const getEmployeeJobHistory = (0, _prismatic_io_spectral.action)({
|
|
1743
|
+
display: {
|
|
1744
|
+
label: "Get Employee Job History",
|
|
1745
|
+
description: "Retrieve the complete job history for a specific employee."
|
|
1746
|
+
},
|
|
1747
|
+
inputs: getEmployeeJobHistoryInputs,
|
|
1748
|
+
perform: async (context, { connection, employeeId, pagination, fetchAll }) => {
|
|
1749
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), "/employee-job-history-details", {
|
|
1750
|
+
employeeId,
|
|
1751
|
+
page: pagination.page,
|
|
1752
|
+
per_page: pagination.perPage
|
|
1753
|
+
}, fetchAll);
|
|
1754
|
+
return { data };
|
|
1755
|
+
},
|
|
1756
|
+
examplePayload: getEmployeeJobHistoryExamplePayload
|
|
1757
|
+
});
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region src/actions/employees/index.ts
|
|
1760
|
+
var employees_default = {
|
|
1761
|
+
getAllEmploymentDetailsByCompany,
|
|
1762
|
+
getAllPersonDetails,
|
|
1763
|
+
getEmployeeChangesByDate,
|
|
1764
|
+
getEmployeeChangesById,
|
|
1765
|
+
getEmployeeDemographicDetails,
|
|
1766
|
+
getEmployeeEmploymentDetails,
|
|
1767
|
+
getEmployeeEmploymentDetailsByEmployeeIdAndCompanyId: (0, _prismatic_io_spectral.action)({
|
|
1768
|
+
display: {
|
|
1769
|
+
label: "Get Employee Employment Details by Employee ID and Company ID",
|
|
1770
|
+
description: "Retrieve employment details for a specific employee by company and employee ID."
|
|
1771
|
+
},
|
|
1772
|
+
inputs: getEmployeeEmploymentDetailsByEmployeeIdAndCompanyIdInputs,
|
|
1773
|
+
perform: async (context, { connection, companyId, employeeId, fetchAll, filterParameters, pagination }) => {
|
|
1774
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), `/personnel/v1/companies/${companyId}/employees/${employeeId}/employment-details`, {
|
|
1775
|
+
...filterParameters,
|
|
1776
|
+
page: pagination.page,
|
|
1777
|
+
per_page: pagination.perPage
|
|
1778
|
+
}, fetchAll);
|
|
1779
|
+
return { data };
|
|
1780
|
+
},
|
|
1781
|
+
examplePayload: getEmployeeEmploymentDetailsExamplePayload
|
|
1782
|
+
}),
|
|
1783
|
+
getEmployeeJobHistory,
|
|
1784
|
+
getEmploymentContractDetails,
|
|
1785
|
+
getPersonDetailsByCompany: (0, _prismatic_io_spectral.action)({
|
|
1786
|
+
display: {
|
|
1787
|
+
label: "Get Person Details by Company",
|
|
1788
|
+
description: "Retrieve person details for all employees within a specific company."
|
|
1789
|
+
},
|
|
1790
|
+
inputs: getPersonDetailsByCompanyInputs,
|
|
1791
|
+
perform: async (context, { connection, companyId, fetchAll, pagination }) => {
|
|
1792
|
+
const { data } = await fetchWithPagination(createBasicAuthClient(connection, context.debug.enabled), `/personnel/v1/companies/${companyId}/person-details`, {
|
|
1793
|
+
page: pagination.page,
|
|
1794
|
+
per_page: pagination.perPage
|
|
1795
|
+
}, fetchAll);
|
|
1796
|
+
return { data };
|
|
1797
|
+
},
|
|
1798
|
+
examplePayload: getPersonDetailsByCompanyExamplePayload
|
|
1799
|
+
})
|
|
1800
|
+
};
|
|
1801
|
+
//#endregion
|
|
1802
|
+
//#region src/actions/importTool/index.ts
|
|
1803
|
+
var importTool_default = {
|
|
1804
|
+
getImportFileStatus: (0, _prismatic_io_spectral.action)({
|
|
1805
|
+
display: {
|
|
1806
|
+
label: "Get File Status",
|
|
1807
|
+
description: "Fetch the status of a file submitted to the import tool."
|
|
1808
|
+
},
|
|
1809
|
+
inputs: getFileStatusInputs,
|
|
1810
|
+
perform: async (context, { connection, fileId }) => {
|
|
1811
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get(`/personnel/v1/import-tool/file-status/${fileId}`);
|
|
1812
|
+
return { data };
|
|
1813
|
+
},
|
|
1814
|
+
examplePayload: getFileStatusExamplePayload
|
|
1815
|
+
}),
|
|
1816
|
+
getImportFileSummary: (0, _prismatic_io_spectral.action)({
|
|
1817
|
+
display: {
|
|
1818
|
+
label: "Get File Summary",
|
|
1819
|
+
description: "Fetch a summary of a file submitted to the import tool."
|
|
1820
|
+
},
|
|
1821
|
+
inputs: getFileSummaryInputs,
|
|
1822
|
+
perform: async (context, { connection, fileId }) => {
|
|
1823
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get(`/personnel/v1/import-tool/file-summary/${fileId}`);
|
|
1824
|
+
return { data };
|
|
1825
|
+
},
|
|
1826
|
+
examplePayload: getFileSummaryExamplePayload
|
|
1827
|
+
}),
|
|
1828
|
+
getImportStatus: (0, _prismatic_io_spectral.action)({
|
|
1829
|
+
display: {
|
|
1830
|
+
label: "Get Import Status",
|
|
1831
|
+
description: "Retrieve the status of an import tool transaction using the staging ID."
|
|
1832
|
+
},
|
|
1833
|
+
inputs: getImportStatusInputs,
|
|
1834
|
+
perform: async (context, { connection, stagingId }) => {
|
|
1835
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get(`/personnel/v1/import-tool/status/${stagingId}`);
|
|
1836
|
+
return { data };
|
|
1837
|
+
},
|
|
1838
|
+
examplePayload: getImportStatusExamplePayload
|
|
1839
|
+
}),
|
|
1840
|
+
getImportTransactionStatus: (0, _prismatic_io_spectral.action)({
|
|
1841
|
+
display: {
|
|
1842
|
+
label: "Get Transaction Status",
|
|
1843
|
+
description: "Fetch the transaction name and status for an import tool transaction."
|
|
1844
|
+
},
|
|
1845
|
+
inputs: getTransactionStatusInputs,
|
|
1846
|
+
perform: async (context, { connection }) => {
|
|
1847
|
+
const { data } = await createBasicAuthClient(connection, context.debug.enabled).get("/personnel/v1/import-tool/status/transactionstatus/");
|
|
1848
|
+
return { data };
|
|
1849
|
+
},
|
|
1850
|
+
examplePayload: getTransactionStatusExamplePayload
|
|
1851
|
+
}),
|
|
1852
|
+
importXmlData: (0, _prismatic_io_spectral.action)({
|
|
1853
|
+
display: {
|
|
1854
|
+
label: "Import XML Data",
|
|
1855
|
+
description: "Submit an encoded XML transaction to the UKG Pro Import Tool for processing employee data imports."
|
|
1856
|
+
},
|
|
1857
|
+
inputs: importXmlDataInputs,
|
|
1858
|
+
perform: async (context, { connection, xmlTransaction, uniqueFileName }) => {
|
|
1859
|
+
const client = createBasicAuthClient(connection, context.debug.enabled);
|
|
1860
|
+
const encodedXml = Buffer.from(xmlTransaction).toString("base64");
|
|
1861
|
+
const { data } = await client.post("/personnel/v1/import-tool", {
|
|
1862
|
+
transaction: encodedXml,
|
|
1863
|
+
uniqueFileName
|
|
1864
|
+
});
|
|
1865
|
+
return { data };
|
|
1866
|
+
},
|
|
1867
|
+
examplePayload: importXmlDataExamplePayload
|
|
1868
|
+
})
|
|
1869
|
+
};
|
|
1870
|
+
//#endregion
|
|
1871
|
+
//#region src/actions/misc/index.ts
|
|
1872
|
+
var misc_default = { rawRequest: (0, _prismatic_io_spectral.action)({
|
|
1873
|
+
display: {
|
|
1874
|
+
label: "Raw Request",
|
|
1875
|
+
description: "Send raw HTTP request to UKG Pro API."
|
|
1876
|
+
},
|
|
1877
|
+
inputs: rawRequestActionInputs,
|
|
1878
|
+
perform: async (context, { connection, ...httpInputs }) => {
|
|
1879
|
+
const baseUrl = getBaseUrl(connection);
|
|
1880
|
+
const headers = await getAuthHeaders(connection);
|
|
1881
|
+
const { data } = await (0, _prismatic_io_spectral_http.sendRawRequest)(baseUrl, {
|
|
1882
|
+
...httpInputs,
|
|
1883
|
+
debugRequest: context.debug.enabled
|
|
1884
|
+
}, headers);
|
|
1885
|
+
return { data };
|
|
1886
|
+
}
|
|
1887
|
+
}) };
|
|
1888
|
+
//#endregion
|
|
1889
|
+
//#region src/actions/index.ts
|
|
1890
|
+
var actions_default = {
|
|
1891
|
+
...employees_default,
|
|
1892
|
+
...importTool_default,
|
|
1893
|
+
...configuration_default,
|
|
1894
|
+
...misc_default
|
|
1895
|
+
};
|
|
1896
|
+
//#endregion
|
|
1897
|
+
//#region src/dataSources/index.ts
|
|
1898
|
+
var dataSources_default = {
|
|
1899
|
+
selectCompany: (0, _prismatic_io_spectral.dataSource)({
|
|
1900
|
+
display: {
|
|
1901
|
+
label: "Select Company",
|
|
1902
|
+
description: "Select a company from the available companies in UKG Pro."
|
|
1903
|
+
},
|
|
1904
|
+
inputs: selectCompanyInputs,
|
|
1905
|
+
dataSourceType: "picklist",
|
|
1906
|
+
perform: async (_context, { connection }) => {
|
|
1907
|
+
return { result: toPicklistResult(await fetchAllPages(createBasicAuthClient(connection), "/configuration/v1/company-details"), {
|
|
1908
|
+
getLabel: (company) => `${company.companyName} (${company.companyId})`,
|
|
1909
|
+
getKey: (company) => company.companyId
|
|
1910
|
+
}) };
|
|
1911
|
+
},
|
|
1912
|
+
examplePayload: selectCompanyExamplePayload
|
|
1913
|
+
}),
|
|
1914
|
+
selectJob: (0, _prismatic_io_spectral.dataSource)({
|
|
1915
|
+
display: {
|
|
1916
|
+
label: "Select Job",
|
|
1917
|
+
description: "Select a job definition from the available jobs in UKG Pro."
|
|
1918
|
+
},
|
|
1919
|
+
inputs: selectJobInputs,
|
|
1920
|
+
dataSourceType: "picklist",
|
|
1921
|
+
perform: async (_context, { connection, companyId }) => {
|
|
1922
|
+
return { result: toPicklistResult(await fetchAllPages(createBasicAuthClient(connection), "/configuration/v2/jobs", { params: { company: companyId } }), {
|
|
1923
|
+
getLabel: (job) => `${job.title} (${job.jobCode})`,
|
|
1924
|
+
getKey: (job) => job.jobCode
|
|
1925
|
+
}) };
|
|
1926
|
+
},
|
|
1927
|
+
examplePayload: selectJobExamplePayload
|
|
1928
|
+
}),
|
|
1929
|
+
selectLocation: (0, _prismatic_io_spectral.dataSource)({
|
|
1930
|
+
display: {
|
|
1931
|
+
label: "Select Location",
|
|
1932
|
+
description: "Select a work location from the available locations in UKG Pro."
|
|
1933
|
+
},
|
|
1934
|
+
inputs: selectLocationInputs,
|
|
1935
|
+
dataSourceType: "picklist",
|
|
1936
|
+
perform: async (_context, { connection, companyId }) => {
|
|
1937
|
+
return { result: toPicklistResult(await fetchAllPages(createBasicAuthClient(connection), "/configuration/v1/locations", { params: { company: companyId } }), {
|
|
1938
|
+
getLabel: (location) => `${location.city}/${location.state} - ${location.countryCode} (${location.zipOrPostalCode})`,
|
|
1939
|
+
getKey: (location) => location.locationCode
|
|
1940
|
+
}) };
|
|
1941
|
+
},
|
|
1942
|
+
examplePayload: selectLocationExamplePayload
|
|
1943
|
+
}),
|
|
1944
|
+
selectPosition: (0, _prismatic_io_spectral.dataSource)({
|
|
1945
|
+
display: {
|
|
1946
|
+
label: "Select Position",
|
|
1947
|
+
description: "Select a position from the available positions in UKG Pro."
|
|
1948
|
+
},
|
|
1949
|
+
inputs: selectPositionInputs,
|
|
1950
|
+
dataSourceType: "picklist",
|
|
1951
|
+
perform: async (_context, { connection, companyId }) => {
|
|
1952
|
+
return { result: toPicklistResult(await fetchAllPages(createBasicAuthClient(connection), "/configuration/v1/positions", { params: { company: companyId } }), {
|
|
1953
|
+
getLabel: (position) => `${position.alternateTitle} (${position.positionCode})`,
|
|
1954
|
+
getKey: (position) => position.positionCode
|
|
1955
|
+
}) };
|
|
1956
|
+
},
|
|
1957
|
+
examplePayload: selectPositionExamplePayload
|
|
1958
|
+
})
|
|
1959
|
+
};
|
|
1960
|
+
//#endregion
|
|
1961
|
+
//#region src/triggers/index.ts
|
|
1962
|
+
var triggers_default = {
|
|
1963
|
+
pollEmployeeChanges: (0, _prismatic_io_spectral.pollingTrigger)({
|
|
1964
|
+
display: {
|
|
1965
|
+
label: "Employee Changes",
|
|
1966
|
+
description: "Retrieves existing and ongoing employee records (hires, terminations, transfers, promotions) for a specified UKG Pro company (or all companies, if omitted). Load history once, check for changes on a schedule, or both."
|
|
1967
|
+
},
|
|
1968
|
+
inputs: pollEmployeeChangesInputs,
|
|
1969
|
+
triggerResolverSupport: "valid",
|
|
1970
|
+
batchConfig: { batchSize: 50 },
|
|
1971
|
+
triggerResolver: { resolveItems: (_context, { payload }) => resolveEmployeeChangeRecords(payload.body.data) },
|
|
1972
|
+
perform: async (context, payload, { connection, companyId, lookBackDate }) => {
|
|
1973
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1974
|
+
const pollState = context.polling.getState();
|
|
1975
|
+
const lastPollTime = pollState.lastPollTime || (lookBackDate ? `${lookBackDate}T00:00:00.000Z` : now);
|
|
1976
|
+
context.logger.debug(`Last polled at: ${lastPollTime}`);
|
|
1977
|
+
if (context.debug.enabled) context.logger.debug(`Polling state: ${JSON.stringify(pollState)}`);
|
|
1978
|
+
const client = createBasicAuthClient(connection, context.debug.enabled);
|
|
1979
|
+
const params = {
|
|
1980
|
+
start_date: lastPollTime.split("T")[0],
|
|
1981
|
+
end_date: now.split("T")[0]
|
|
1982
|
+
};
|
|
1983
|
+
if (companyId) params.company = _prismatic_io_spectral.util.types.toString(companyId);
|
|
1984
|
+
const changes = await fetchAllPages(client, "/personnel/v1/employee-changes", { params });
|
|
1985
|
+
context.polling.setState({ lastPollTime: now });
|
|
1986
|
+
return {
|
|
1987
|
+
payload: {
|
|
1988
|
+
...payload,
|
|
1989
|
+
body: { data: changes }
|
|
1990
|
+
},
|
|
1991
|
+
polledNoChanges: changes.length === 0
|
|
1992
|
+
};
|
|
1993
|
+
}
|
|
1994
|
+
}),
|
|
1995
|
+
pollNewHireStatus: (0, _prismatic_io_spectral.pollingTrigger)({
|
|
1996
|
+
display: {
|
|
1997
|
+
label: "New Hire Status",
|
|
1998
|
+
description: "Checks for new and updated new hire onboarding records on a configured schedule."
|
|
1999
|
+
},
|
|
2000
|
+
inputs: pollNewHireStatusInputs,
|
|
2001
|
+
triggerResolverSupport: "valid",
|
|
2002
|
+
batchConfig: { batchSize: 50 },
|
|
2003
|
+
triggerResolver: { resolveItems: (_context, { payload }) => resolveNewHireStatusChanges(payload.body.data) },
|
|
2004
|
+
perform: async (context, payload, { connection }) => {
|
|
2005
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2006
|
+
const pollState = context.polling.getState();
|
|
2007
|
+
const lastStatusMap = pollState.lastStatusMap || {};
|
|
2008
|
+
if (context.debug.enabled) context.logger.debug(`Polling state: ${JSON.stringify(pollState)}`);
|
|
2009
|
+
const client = await createClient(connection, context.debug.enabled);
|
|
2010
|
+
const tenantIdentifier = getTenantIdentifier(connection);
|
|
2011
|
+
const inProgressHires = await fetchAllPages(client, `/talent/onboarding/v2/tenants/${tenantIdentifier}/new-hires/in-progress`);
|
|
2012
|
+
const completedHires = await fetchAllPages(client, `/talent/onboarding/v2/tenants/${tenantIdentifier}/new-hires/completed`);
|
|
2013
|
+
const allHires = [...inProgressHires, ...completedHires];
|
|
2014
|
+
const changes = [];
|
|
2015
|
+
const currentStatusMap = {};
|
|
2016
|
+
for (const hire of allHires) {
|
|
2017
|
+
const hireId = hire.id;
|
|
2018
|
+
const currentStatus = hire.onboardingStatus;
|
|
2019
|
+
const currentProgress = 0;
|
|
2020
|
+
currentStatusMap[hireId] = {
|
|
2021
|
+
status: currentStatus,
|
|
2022
|
+
progress: currentProgress
|
|
2023
|
+
};
|
|
2024
|
+
const previous = lastStatusMap[hireId];
|
|
2025
|
+
if (!previous) changes.push({
|
|
2026
|
+
newHireId: hireId,
|
|
2027
|
+
firstName: hire.contactInformation.name.first,
|
|
2028
|
+
lastName: hire.contactInformation.name.last,
|
|
2029
|
+
changeType: "NewHireAdded",
|
|
2030
|
+
currentStatus,
|
|
2031
|
+
currentProgress,
|
|
2032
|
+
detectedAt: now
|
|
2033
|
+
});
|
|
2034
|
+
else if (previous.status !== currentStatus) changes.push({
|
|
2035
|
+
newHireId: hireId,
|
|
2036
|
+
firstName: hire.contactInformation.name.first,
|
|
2037
|
+
lastName: hire.contactInformation.name.last,
|
|
2038
|
+
changeType: "StatusChange",
|
|
2039
|
+
previousStatus: previous.status,
|
|
2040
|
+
currentStatus,
|
|
2041
|
+
previousProgress: previous.progress,
|
|
2042
|
+
currentProgress,
|
|
2043
|
+
detectedAt: now
|
|
2044
|
+
});
|
|
2045
|
+
else if (previous.progress !== currentProgress) changes.push({
|
|
2046
|
+
newHireId: hireId,
|
|
2047
|
+
firstName: hire.contactInformation.name.first,
|
|
2048
|
+
lastName: hire.contactInformation.name.last,
|
|
2049
|
+
changeType: "ProgressUpdate",
|
|
2050
|
+
previousStatus: previous.status,
|
|
2051
|
+
currentStatus,
|
|
2052
|
+
previousProgress: previous.progress,
|
|
2053
|
+
currentProgress,
|
|
2054
|
+
detectedAt: now
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
context.polling.setState({
|
|
2058
|
+
lastStatusMap: currentStatusMap,
|
|
2059
|
+
lastPollTime: now
|
|
2060
|
+
});
|
|
2061
|
+
return {
|
|
2062
|
+
payload: {
|
|
2063
|
+
...payload,
|
|
2064
|
+
body: {
|
|
2065
|
+
data: changes,
|
|
2066
|
+
inProgressCount: inProgressHires.length,
|
|
2067
|
+
completedCount: completedHires.length
|
|
2068
|
+
}
|
|
2069
|
+
},
|
|
2070
|
+
polledNoChanges: changes.length === 0
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2073
|
+
}),
|
|
2074
|
+
webhookEmployeeLifecycle: (0, _prismatic_io_spectral.trigger)({
|
|
2075
|
+
display: {
|
|
2076
|
+
label: "Employee Lifecycle Events",
|
|
2077
|
+
description: "Receive and validate webhook requests from UKG Pro for manually configured employee lifecycle event subscriptions."
|
|
2078
|
+
},
|
|
2079
|
+
inputs: webhookEmployeeLifecycleInputs,
|
|
2080
|
+
synchronousResponseSupport: "invalid",
|
|
2081
|
+
scheduleSupport: "invalid",
|
|
2082
|
+
perform: async (context, payload, { webhookSecret, verifySignature }) => {
|
|
2083
|
+
const headers = payload.headers || {};
|
|
2084
|
+
const normalizedHeaders = _prismatic_io_spectral.util.types.lowerCaseHeaders(headers);
|
|
2085
|
+
if (verifySignature) {
|
|
2086
|
+
const signature = normalizedHeaders["x-ukg-signature"];
|
|
2087
|
+
if (!signature) {
|
|
2088
|
+
context.logger.error("Webhook signature verification failed: Missing X-UKG-Signature header");
|
|
2089
|
+
return {
|
|
2090
|
+
payload,
|
|
2091
|
+
response: {
|
|
2092
|
+
statusCode: 401,
|
|
2093
|
+
contentType: "application/json",
|
|
2094
|
+
body: JSON.stringify({ error: "Missing webhook signature" })
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
}
|
|
2098
|
+
if (!webhookSecret) {
|
|
2099
|
+
context.logger.error("Webhook signature verification enabled but no webhook secret configured");
|
|
2100
|
+
return {
|
|
2101
|
+
payload,
|
|
2102
|
+
response: {
|
|
2103
|
+
statusCode: 500,
|
|
2104
|
+
contentType: "application/json",
|
|
2105
|
+
body: JSON.stringify({ error: "Webhook secret not configured" })
|
|
2106
|
+
}
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2109
|
+
if (!isValidHmacSignature(payload.rawBody?.data?.toString() || JSON.stringify(payload.body), signature, _prismatic_io_spectral.util.types.toString(webhookSecret))) {
|
|
2110
|
+
context.logger.error("Webhook signature verification failed: Invalid signature");
|
|
2111
|
+
return {
|
|
2112
|
+
payload,
|
|
2113
|
+
response: {
|
|
2114
|
+
statusCode: 401,
|
|
2115
|
+
contentType: "application/json",
|
|
2116
|
+
body: JSON.stringify({ error: "Invalid webhook signature" })
|
|
2117
|
+
}
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
context.logger.debug("Webhook signature verified successfully");
|
|
2121
|
+
}
|
|
2122
|
+
return {
|
|
2123
|
+
payload,
|
|
2124
|
+
response: {
|
|
2125
|
+
statusCode: 200,
|
|
2126
|
+
contentType: "application/json",
|
|
2127
|
+
body: JSON.stringify({ received: true })
|
|
2128
|
+
}
|
|
2129
|
+
};
|
|
2130
|
+
}
|
|
2131
|
+
})
|
|
2132
|
+
};
|
|
2133
|
+
//#endregion
|
|
2134
|
+
//#region src/index.ts
|
|
2135
|
+
var src_default = (0, _prismatic_io_spectral.component)({
|
|
2136
|
+
key: "ukg-pro",
|
|
2137
|
+
public: true,
|
|
2138
|
+
documentationUrl: "https://prismatic.io/docs/components/ukg-pro/",
|
|
2139
|
+
display: {
|
|
2140
|
+
label: "UKG Pro",
|
|
2141
|
+
description: "Manage employees, payroll, and talent onboarding in UKG Pro.",
|
|
2142
|
+
iconPath: "icon.png",
|
|
2143
|
+
category: "Application Connectors"
|
|
2144
|
+
},
|
|
2145
|
+
actions: actions_default,
|
|
2146
|
+
connections: connections_default,
|
|
2147
|
+
dataSources: dataSources_default,
|
|
2148
|
+
triggers: triggers_default,
|
|
2149
|
+
hooks: { error: _prismatic_io_spectral_http.handleErrors }
|
|
2150
|
+
});
|
|
2151
|
+
//#endregion
|
|
2152
|
+
//#region npm-dist/.entry.ts
|
|
2153
|
+
var _entry_default = (0, _prismatic_io_spectral.callableComponent)(src_default);
|
|
2154
|
+
//#endregion
|
|
2155
|
+
module.exports = _entry_default;
|