digital-tools 2.0.2 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/package.json +3 -4
- package/src/define.js +267 -0
- package/src/entities/advertising.js +999 -0
- package/src/entities/ai.js +756 -0
- package/src/entities/analytics.js +1588 -0
- package/src/entities/automation.js +601 -0
- package/src/entities/communication.js +1150 -0
- package/src/entities/crm.js +1386 -0
- package/src/entities/design.js +546 -0
- package/src/entities/development.js +2212 -0
- package/src/entities/document.js +874 -0
- package/src/entities/ecommerce.js +1429 -0
- package/src/entities/experiment.js +1039 -0
- package/src/entities/finance.js +3478 -0
- package/src/entities/forms.js +1892 -0
- package/src/entities/hr.js +661 -0
- package/src/entities/identity.js +997 -0
- package/src/entities/index.js +282 -0
- package/src/entities/infrastructure.js +1153 -0
- package/src/entities/knowledge.js +1438 -0
- package/src/entities/marketing.js +1610 -0
- package/src/entities/media.js +1634 -0
- package/src/entities/notification.js +1199 -0
- package/src/entities/presentation.js +1274 -0
- package/src/entities/productivity.js +1317 -0
- package/src/entities/project-management.js +1136 -0
- package/src/entities/recruiting.js +736 -0
- package/src/entities/shipping.js +509 -0
- package/src/entities/signature.js +1102 -0
- package/src/entities/site.js +222 -0
- package/src/entities/spreadsheet.js +1341 -0
- package/src/entities/storage.js +1198 -0
- package/src/entities/support.js +1166 -0
- package/src/entities/video-conferencing.js +1750 -0
- package/src/entities/video.js +950 -0
- package/src/entities.js +1663 -0
- package/src/index.js +74 -0
- package/src/providers/analytics/index.js +17 -0
- package/src/providers/analytics/mixpanel.js +255 -0
- package/src/providers/calendar/cal-com.js +303 -0
- package/src/providers/calendar/google-calendar.js +335 -0
- package/src/providers/calendar/index.js +20 -0
- package/src/providers/crm/hubspot.js +566 -0
- package/src/providers/crm/index.js +17 -0
- package/src/providers/development/github.js +472 -0
- package/src/providers/development/index.js +17 -0
- package/src/providers/ecommerce/index.js +17 -0
- package/src/providers/ecommerce/shopify.js +378 -0
- package/src/providers/email/index.js +20 -0
- package/src/providers/email/resend.js +258 -0
- package/src/providers/email/sendgrid.js +161 -0
- package/src/providers/finance/index.js +17 -0
- package/src/providers/finance/stripe.js +549 -0
- package/src/providers/forms/index.js +17 -0
- package/src/providers/forms/typeform.js +500 -0
- package/src/providers/index.js +123 -0
- package/src/providers/knowledge/index.js +17 -0
- package/src/providers/knowledge/notion.js +389 -0
- package/src/providers/marketing/index.js +17 -0
- package/src/providers/marketing/mailchimp.js +443 -0
- package/src/providers/media/cloudinary.js +318 -0
- package/src/providers/media/index.js +17 -0
- package/src/providers/messaging/index.js +20 -0
- package/src/providers/messaging/slack.js +393 -0
- package/src/providers/messaging/twilio-sms.js +249 -0
- package/src/providers/project-management/index.js +17 -0
- package/src/providers/project-management/linear.js +575 -0
- package/src/providers/registry.js +86 -0
- package/src/providers/spreadsheet/google-sheets.js +375 -0
- package/src/providers/spreadsheet/index.js +20 -0
- package/src/providers/spreadsheet/xlsx.js +423 -0
- package/src/providers/storage/index.js +24 -0
- package/src/providers/storage/s3.js +419 -0
- package/src/providers/support/index.js +17 -0
- package/src/providers/support/zendesk.js +373 -0
- package/src/providers/tasks/index.js +17 -0
- package/src/providers/tasks/todoist.js +286 -0
- package/src/providers/types.js +9 -0
- package/src/providers/video-conferencing/google-meet.js +286 -0
- package/src/providers/video-conferencing/index.js +31 -0
- package/src/providers/video-conferencing/jitsi.js +254 -0
- package/src/providers/video-conferencing/teams.js +270 -0
- package/src/providers/video-conferencing/zoom.js +332 -0
- package/src/registry.js +128 -0
- package/src/tools/communication.js +184 -0
- package/src/tools/data.js +205 -0
- package/src/tools/index.js +11 -0
- package/src/tools/web.js +137 -0
- package/src/types.js +10 -0
- package/test/define.test.js +306 -0
- package/test/registry.test.js +357 -0
- package/test/tools.test.js +363 -0
|
@@ -0,0 +1,661 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HR Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* Human Resources entities for employee management, teams, time off,
|
|
5
|
+
* performance reviews, and organizational structure.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// Employee
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Employee entity
|
|
14
|
+
*
|
|
15
|
+
* Represents an employee in the organization.
|
|
16
|
+
*/
|
|
17
|
+
export const Employee = {
|
|
18
|
+
singular: 'employee',
|
|
19
|
+
plural: 'employees',
|
|
20
|
+
description: 'An employee in the organization',
|
|
21
|
+
properties: {
|
|
22
|
+
// Identity
|
|
23
|
+
firstName: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'First name',
|
|
26
|
+
},
|
|
27
|
+
lastName: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Last name',
|
|
30
|
+
},
|
|
31
|
+
displayName: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
optional: true,
|
|
34
|
+
description: 'Preferred display name',
|
|
35
|
+
},
|
|
36
|
+
email: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Work email address',
|
|
39
|
+
},
|
|
40
|
+
personalEmail: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
optional: true,
|
|
43
|
+
description: 'Personal email address',
|
|
44
|
+
},
|
|
45
|
+
phone: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
optional: true,
|
|
48
|
+
description: 'Work phone number',
|
|
49
|
+
},
|
|
50
|
+
employeeId: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
optional: true,
|
|
53
|
+
description: 'Internal employee ID',
|
|
54
|
+
},
|
|
55
|
+
// Employment
|
|
56
|
+
status: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Employment status',
|
|
59
|
+
examples: ['active', 'onboarding', 'on-leave', 'offboarding', 'terminated'],
|
|
60
|
+
},
|
|
61
|
+
type: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Employment type',
|
|
64
|
+
examples: ['full-time', 'part-time', 'contractor', 'intern', 'temporary'],
|
|
65
|
+
},
|
|
66
|
+
title: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Job title',
|
|
69
|
+
},
|
|
70
|
+
department: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
optional: true,
|
|
73
|
+
description: 'Department name',
|
|
74
|
+
},
|
|
75
|
+
location: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
optional: true,
|
|
78
|
+
description: 'Work location',
|
|
79
|
+
},
|
|
80
|
+
workType: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
optional: true,
|
|
83
|
+
description: 'Work arrangement',
|
|
84
|
+
examples: ['remote', 'hybrid', 'onsite'],
|
|
85
|
+
},
|
|
86
|
+
// Dates
|
|
87
|
+
startDate: {
|
|
88
|
+
type: 'datetime',
|
|
89
|
+
description: 'Start date',
|
|
90
|
+
},
|
|
91
|
+
endDate: {
|
|
92
|
+
type: 'datetime',
|
|
93
|
+
optional: true,
|
|
94
|
+
description: 'End date (if terminated)',
|
|
95
|
+
},
|
|
96
|
+
// Compensation
|
|
97
|
+
salary: {
|
|
98
|
+
type: 'number',
|
|
99
|
+
optional: true,
|
|
100
|
+
description: 'Annual salary',
|
|
101
|
+
},
|
|
102
|
+
currency: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
optional: true,
|
|
105
|
+
description: 'Currency for salary',
|
|
106
|
+
},
|
|
107
|
+
payFrequency: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
optional: true,
|
|
110
|
+
description: 'Pay frequency',
|
|
111
|
+
examples: ['weekly', 'biweekly', 'semimonthly', 'monthly'],
|
|
112
|
+
},
|
|
113
|
+
// Profile
|
|
114
|
+
avatarUrl: {
|
|
115
|
+
type: 'url',
|
|
116
|
+
optional: true,
|
|
117
|
+
description: 'Profile photo URL',
|
|
118
|
+
},
|
|
119
|
+
bio: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
optional: true,
|
|
122
|
+
description: 'Short bio',
|
|
123
|
+
},
|
|
124
|
+
timezone: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
optional: true,
|
|
127
|
+
description: 'Preferred timezone',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
relationships: {
|
|
131
|
+
manager: {
|
|
132
|
+
type: 'Employee',
|
|
133
|
+
required: false,
|
|
134
|
+
description: 'Direct manager',
|
|
135
|
+
},
|
|
136
|
+
directReports: {
|
|
137
|
+
type: 'Employee[]',
|
|
138
|
+
description: 'Direct reports',
|
|
139
|
+
},
|
|
140
|
+
team: {
|
|
141
|
+
type: 'Team',
|
|
142
|
+
required: false,
|
|
143
|
+
description: 'Primary team',
|
|
144
|
+
},
|
|
145
|
+
teams: {
|
|
146
|
+
type: 'Team[]',
|
|
147
|
+
description: 'All teams',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
actions: [
|
|
151
|
+
'create',
|
|
152
|
+
'update',
|
|
153
|
+
'onboard',
|
|
154
|
+
'offboard',
|
|
155
|
+
'terminate',
|
|
156
|
+
'promote',
|
|
157
|
+
'transfer',
|
|
158
|
+
'updateCompensation',
|
|
159
|
+
],
|
|
160
|
+
events: [
|
|
161
|
+
'created',
|
|
162
|
+
'updated',
|
|
163
|
+
'onboarded',
|
|
164
|
+
'offboarded',
|
|
165
|
+
'terminated',
|
|
166
|
+
'promoted',
|
|
167
|
+
'transferred',
|
|
168
|
+
'compensationUpdated',
|
|
169
|
+
],
|
|
170
|
+
};
|
|
171
|
+
// =============================================================================
|
|
172
|
+
// Team
|
|
173
|
+
// =============================================================================
|
|
174
|
+
/**
|
|
175
|
+
* Team entity
|
|
176
|
+
*
|
|
177
|
+
* Represents a team or group within the organization.
|
|
178
|
+
*/
|
|
179
|
+
export const Team = {
|
|
180
|
+
singular: 'team',
|
|
181
|
+
plural: 'teams',
|
|
182
|
+
description: 'A team or group within the organization',
|
|
183
|
+
properties: {
|
|
184
|
+
// Identity
|
|
185
|
+
name: {
|
|
186
|
+
type: 'string',
|
|
187
|
+
description: 'Team name',
|
|
188
|
+
},
|
|
189
|
+
slug: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
optional: true,
|
|
192
|
+
description: 'URL-friendly identifier',
|
|
193
|
+
},
|
|
194
|
+
description: {
|
|
195
|
+
type: 'string',
|
|
196
|
+
optional: true,
|
|
197
|
+
description: 'Team description',
|
|
198
|
+
},
|
|
199
|
+
type: {
|
|
200
|
+
type: 'string',
|
|
201
|
+
optional: true,
|
|
202
|
+
description: 'Team type',
|
|
203
|
+
examples: ['department', 'project', 'squad', 'working-group', 'committee'],
|
|
204
|
+
},
|
|
205
|
+
// Status
|
|
206
|
+
status: {
|
|
207
|
+
type: 'string',
|
|
208
|
+
description: 'Team status',
|
|
209
|
+
examples: ['active', 'inactive', 'archived'],
|
|
210
|
+
},
|
|
211
|
+
// Settings
|
|
212
|
+
isPrivate: {
|
|
213
|
+
type: 'boolean',
|
|
214
|
+
optional: true,
|
|
215
|
+
description: 'Whether team is private',
|
|
216
|
+
},
|
|
217
|
+
iconUrl: {
|
|
218
|
+
type: 'url',
|
|
219
|
+
optional: true,
|
|
220
|
+
description: 'Team icon URL',
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
relationships: {
|
|
224
|
+
lead: {
|
|
225
|
+
type: 'Employee',
|
|
226
|
+
required: false,
|
|
227
|
+
description: 'Team lead',
|
|
228
|
+
},
|
|
229
|
+
members: {
|
|
230
|
+
type: 'Employee[]',
|
|
231
|
+
description: 'Team members',
|
|
232
|
+
},
|
|
233
|
+
parentTeam: {
|
|
234
|
+
type: 'Team',
|
|
235
|
+
required: false,
|
|
236
|
+
description: 'Parent team (for hierarchy)',
|
|
237
|
+
},
|
|
238
|
+
subteams: {
|
|
239
|
+
type: 'Team[]',
|
|
240
|
+
description: 'Sub-teams',
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
actions: [
|
|
244
|
+
'create',
|
|
245
|
+
'update',
|
|
246
|
+
'archive',
|
|
247
|
+
'addMember',
|
|
248
|
+
'removeMember',
|
|
249
|
+
'setLead',
|
|
250
|
+
],
|
|
251
|
+
events: [
|
|
252
|
+
'created',
|
|
253
|
+
'updated',
|
|
254
|
+
'archived',
|
|
255
|
+
'memberAdded',
|
|
256
|
+
'memberRemoved',
|
|
257
|
+
'leadChanged',
|
|
258
|
+
],
|
|
259
|
+
};
|
|
260
|
+
// =============================================================================
|
|
261
|
+
// TimeOff
|
|
262
|
+
// =============================================================================
|
|
263
|
+
/**
|
|
264
|
+
* TimeOff entity
|
|
265
|
+
*
|
|
266
|
+
* Represents a time off request or record.
|
|
267
|
+
*/
|
|
268
|
+
export const TimeOff = {
|
|
269
|
+
singular: 'time-off',
|
|
270
|
+
plural: 'time-off-requests',
|
|
271
|
+
description: 'A time off request or record',
|
|
272
|
+
properties: {
|
|
273
|
+
// Type
|
|
274
|
+
type: {
|
|
275
|
+
type: 'string',
|
|
276
|
+
description: 'Time off type',
|
|
277
|
+
examples: ['vacation', 'sick', 'personal', 'bereavement', 'parental', 'jury-duty', 'unpaid'],
|
|
278
|
+
},
|
|
279
|
+
// Status
|
|
280
|
+
status: {
|
|
281
|
+
type: 'string',
|
|
282
|
+
description: 'Request status',
|
|
283
|
+
examples: ['pending', 'approved', 'denied', 'cancelled', 'taken'],
|
|
284
|
+
},
|
|
285
|
+
// Dates
|
|
286
|
+
startDate: {
|
|
287
|
+
type: 'datetime',
|
|
288
|
+
description: 'Start date',
|
|
289
|
+
},
|
|
290
|
+
endDate: {
|
|
291
|
+
type: 'datetime',
|
|
292
|
+
description: 'End date',
|
|
293
|
+
},
|
|
294
|
+
hours: {
|
|
295
|
+
type: 'number',
|
|
296
|
+
optional: true,
|
|
297
|
+
description: 'Total hours requested',
|
|
298
|
+
},
|
|
299
|
+
// Details
|
|
300
|
+
reason: {
|
|
301
|
+
type: 'string',
|
|
302
|
+
optional: true,
|
|
303
|
+
description: 'Reason for time off',
|
|
304
|
+
},
|
|
305
|
+
notes: {
|
|
306
|
+
type: 'string',
|
|
307
|
+
optional: true,
|
|
308
|
+
description: 'Additional notes',
|
|
309
|
+
},
|
|
310
|
+
denialReason: {
|
|
311
|
+
type: 'string',
|
|
312
|
+
optional: true,
|
|
313
|
+
description: 'Reason for denial',
|
|
314
|
+
},
|
|
315
|
+
// Dates
|
|
316
|
+
requestedAt: {
|
|
317
|
+
type: 'datetime',
|
|
318
|
+
description: 'When request was submitted',
|
|
319
|
+
},
|
|
320
|
+
respondedAt: {
|
|
321
|
+
type: 'datetime',
|
|
322
|
+
optional: true,
|
|
323
|
+
description: 'When request was responded to',
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
relationships: {
|
|
327
|
+
employee: {
|
|
328
|
+
type: 'Employee',
|
|
329
|
+
description: 'Employee requesting time off',
|
|
330
|
+
},
|
|
331
|
+
approver: {
|
|
332
|
+
type: 'Employee',
|
|
333
|
+
required: false,
|
|
334
|
+
description: 'Manager who approved/denied',
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
actions: [
|
|
338
|
+
'request',
|
|
339
|
+
'approve',
|
|
340
|
+
'deny',
|
|
341
|
+
'cancel',
|
|
342
|
+
'modify',
|
|
343
|
+
],
|
|
344
|
+
events: [
|
|
345
|
+
'requested',
|
|
346
|
+
'approved',
|
|
347
|
+
'denied',
|
|
348
|
+
'cancelled',
|
|
349
|
+
'modified',
|
|
350
|
+
],
|
|
351
|
+
};
|
|
352
|
+
// =============================================================================
|
|
353
|
+
// PerformanceReview
|
|
354
|
+
// =============================================================================
|
|
355
|
+
/**
|
|
356
|
+
* PerformanceReview entity
|
|
357
|
+
*
|
|
358
|
+
* Represents a performance review or evaluation.
|
|
359
|
+
*/
|
|
360
|
+
export const PerformanceReview = {
|
|
361
|
+
singular: 'performance-review',
|
|
362
|
+
plural: 'performance-reviews',
|
|
363
|
+
description: 'A performance review or evaluation',
|
|
364
|
+
properties: {
|
|
365
|
+
// Type
|
|
366
|
+
type: {
|
|
367
|
+
type: 'string',
|
|
368
|
+
description: 'Review type',
|
|
369
|
+
examples: ['annual', 'semi-annual', 'quarterly', 'probation', '360', 'self'],
|
|
370
|
+
},
|
|
371
|
+
// Period
|
|
372
|
+
periodStart: {
|
|
373
|
+
type: 'datetime',
|
|
374
|
+
description: 'Review period start',
|
|
375
|
+
},
|
|
376
|
+
periodEnd: {
|
|
377
|
+
type: 'datetime',
|
|
378
|
+
description: 'Review period end',
|
|
379
|
+
},
|
|
380
|
+
// Status
|
|
381
|
+
status: {
|
|
382
|
+
type: 'string',
|
|
383
|
+
description: 'Review status',
|
|
384
|
+
examples: ['draft', 'pending-self', 'pending-manager', 'completed', 'acknowledged'],
|
|
385
|
+
},
|
|
386
|
+
// Ratings
|
|
387
|
+
overallRating: {
|
|
388
|
+
type: 'number',
|
|
389
|
+
optional: true,
|
|
390
|
+
description: 'Overall rating (1-5 scale)',
|
|
391
|
+
},
|
|
392
|
+
ratings: {
|
|
393
|
+
type: 'json',
|
|
394
|
+
optional: true,
|
|
395
|
+
description: 'Detailed ratings by category',
|
|
396
|
+
},
|
|
397
|
+
// Content
|
|
398
|
+
accomplishments: {
|
|
399
|
+
type: 'string',
|
|
400
|
+
optional: true,
|
|
401
|
+
description: 'Key accomplishments',
|
|
402
|
+
},
|
|
403
|
+
areasForImprovement: {
|
|
404
|
+
type: 'string',
|
|
405
|
+
optional: true,
|
|
406
|
+
description: 'Areas for improvement',
|
|
407
|
+
},
|
|
408
|
+
goals: {
|
|
409
|
+
type: 'json',
|
|
410
|
+
optional: true,
|
|
411
|
+
description: 'Goals for next period',
|
|
412
|
+
},
|
|
413
|
+
managerFeedback: {
|
|
414
|
+
type: 'string',
|
|
415
|
+
optional: true,
|
|
416
|
+
description: 'Manager feedback',
|
|
417
|
+
},
|
|
418
|
+
selfAssessment: {
|
|
419
|
+
type: 'string',
|
|
420
|
+
optional: true,
|
|
421
|
+
description: 'Self assessment',
|
|
422
|
+
},
|
|
423
|
+
// Dates
|
|
424
|
+
dueDate: {
|
|
425
|
+
type: 'datetime',
|
|
426
|
+
optional: true,
|
|
427
|
+
description: 'Due date',
|
|
428
|
+
},
|
|
429
|
+
completedAt: {
|
|
430
|
+
type: 'datetime',
|
|
431
|
+
optional: true,
|
|
432
|
+
description: 'Completion date',
|
|
433
|
+
},
|
|
434
|
+
acknowledgedAt: {
|
|
435
|
+
type: 'datetime',
|
|
436
|
+
optional: true,
|
|
437
|
+
description: 'When employee acknowledged',
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
relationships: {
|
|
441
|
+
employee: {
|
|
442
|
+
type: 'Employee',
|
|
443
|
+
description: 'Employee being reviewed',
|
|
444
|
+
},
|
|
445
|
+
reviewer: {
|
|
446
|
+
type: 'Employee',
|
|
447
|
+
description: 'Manager conducting review',
|
|
448
|
+
},
|
|
449
|
+
peerReviewers: {
|
|
450
|
+
type: 'Employee[]',
|
|
451
|
+
description: 'Peer reviewers (for 360)',
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
actions: [
|
|
455
|
+
'create',
|
|
456
|
+
'submitSelfAssessment',
|
|
457
|
+
'submitManagerReview',
|
|
458
|
+
'complete',
|
|
459
|
+
'acknowledge',
|
|
460
|
+
'reopen',
|
|
461
|
+
],
|
|
462
|
+
events: [
|
|
463
|
+
'created',
|
|
464
|
+
'selfAssessmentSubmitted',
|
|
465
|
+
'managerReviewSubmitted',
|
|
466
|
+
'completed',
|
|
467
|
+
'acknowledged',
|
|
468
|
+
'reopened',
|
|
469
|
+
],
|
|
470
|
+
};
|
|
471
|
+
// =============================================================================
|
|
472
|
+
// Benefit
|
|
473
|
+
// =============================================================================
|
|
474
|
+
/**
|
|
475
|
+
* Benefit entity
|
|
476
|
+
*
|
|
477
|
+
* Represents an employee benefit enrollment.
|
|
478
|
+
*/
|
|
479
|
+
export const Benefit = {
|
|
480
|
+
singular: 'benefit',
|
|
481
|
+
plural: 'benefits',
|
|
482
|
+
description: 'An employee benefit enrollment',
|
|
483
|
+
properties: {
|
|
484
|
+
// Type
|
|
485
|
+
type: {
|
|
486
|
+
type: 'string',
|
|
487
|
+
description: 'Benefit type',
|
|
488
|
+
examples: ['health', 'dental', 'vision', '401k', 'hsa', 'fsa', 'life', 'disability', 'pto'],
|
|
489
|
+
},
|
|
490
|
+
plan: {
|
|
491
|
+
type: 'string',
|
|
492
|
+
optional: true,
|
|
493
|
+
description: 'Specific plan name',
|
|
494
|
+
},
|
|
495
|
+
// Status
|
|
496
|
+
status: {
|
|
497
|
+
type: 'string',
|
|
498
|
+
description: 'Enrollment status',
|
|
499
|
+
examples: ['pending', 'active', 'cancelled', 'expired'],
|
|
500
|
+
},
|
|
501
|
+
// Coverage
|
|
502
|
+
coverageLevel: {
|
|
503
|
+
type: 'string',
|
|
504
|
+
optional: true,
|
|
505
|
+
description: 'Coverage level',
|
|
506
|
+
examples: ['individual', 'individual-plus-spouse', 'family'],
|
|
507
|
+
},
|
|
508
|
+
dependents: {
|
|
509
|
+
type: 'json',
|
|
510
|
+
optional: true,
|
|
511
|
+
description: 'Covered dependents',
|
|
512
|
+
},
|
|
513
|
+
// Cost
|
|
514
|
+
employeeContribution: {
|
|
515
|
+
type: 'number',
|
|
516
|
+
optional: true,
|
|
517
|
+
description: 'Employee contribution per pay period',
|
|
518
|
+
},
|
|
519
|
+
employerContribution: {
|
|
520
|
+
type: 'number',
|
|
521
|
+
optional: true,
|
|
522
|
+
description: 'Employer contribution per pay period',
|
|
523
|
+
},
|
|
524
|
+
// Dates
|
|
525
|
+
effectiveDate: {
|
|
526
|
+
type: 'datetime',
|
|
527
|
+
description: 'Coverage effective date',
|
|
528
|
+
},
|
|
529
|
+
endDate: {
|
|
530
|
+
type: 'datetime',
|
|
531
|
+
optional: true,
|
|
532
|
+
description: 'Coverage end date',
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
relationships: {
|
|
536
|
+
employee: {
|
|
537
|
+
type: 'Employee',
|
|
538
|
+
description: 'Employee enrolled',
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
actions: [
|
|
542
|
+
'enroll',
|
|
543
|
+
'update',
|
|
544
|
+
'cancel',
|
|
545
|
+
'renew',
|
|
546
|
+
],
|
|
547
|
+
events: [
|
|
548
|
+
'enrolled',
|
|
549
|
+
'updated',
|
|
550
|
+
'cancelled',
|
|
551
|
+
'renewed',
|
|
552
|
+
'expired',
|
|
553
|
+
],
|
|
554
|
+
};
|
|
555
|
+
// =============================================================================
|
|
556
|
+
// Payroll
|
|
557
|
+
// =============================================================================
|
|
558
|
+
/**
|
|
559
|
+
* Payroll entity
|
|
560
|
+
*
|
|
561
|
+
* Represents a payroll record or pay stub.
|
|
562
|
+
*/
|
|
563
|
+
export const Payroll = {
|
|
564
|
+
singular: 'payroll',
|
|
565
|
+
plural: 'payrolls',
|
|
566
|
+
description: 'A payroll record or pay stub',
|
|
567
|
+
properties: {
|
|
568
|
+
// Period
|
|
569
|
+
payPeriodStart: {
|
|
570
|
+
type: 'datetime',
|
|
571
|
+
description: 'Pay period start',
|
|
572
|
+
},
|
|
573
|
+
payPeriodEnd: {
|
|
574
|
+
type: 'datetime',
|
|
575
|
+
description: 'Pay period end',
|
|
576
|
+
},
|
|
577
|
+
payDate: {
|
|
578
|
+
type: 'datetime',
|
|
579
|
+
description: 'Pay date',
|
|
580
|
+
},
|
|
581
|
+
// Status
|
|
582
|
+
status: {
|
|
583
|
+
type: 'string',
|
|
584
|
+
description: 'Payroll status',
|
|
585
|
+
examples: ['pending', 'processed', 'paid', 'cancelled'],
|
|
586
|
+
},
|
|
587
|
+
// Earnings
|
|
588
|
+
grossPay: {
|
|
589
|
+
type: 'number',
|
|
590
|
+
description: 'Gross pay',
|
|
591
|
+
},
|
|
592
|
+
netPay: {
|
|
593
|
+
type: 'number',
|
|
594
|
+
description: 'Net pay',
|
|
595
|
+
},
|
|
596
|
+
regularHours: {
|
|
597
|
+
type: 'number',
|
|
598
|
+
optional: true,
|
|
599
|
+
description: 'Regular hours worked',
|
|
600
|
+
},
|
|
601
|
+
overtimeHours: {
|
|
602
|
+
type: 'number',
|
|
603
|
+
optional: true,
|
|
604
|
+
description: 'Overtime hours worked',
|
|
605
|
+
},
|
|
606
|
+
// Deductions
|
|
607
|
+
deductions: {
|
|
608
|
+
type: 'json',
|
|
609
|
+
optional: true,
|
|
610
|
+
description: 'Itemized deductions',
|
|
611
|
+
},
|
|
612
|
+
taxes: {
|
|
613
|
+
type: 'json',
|
|
614
|
+
optional: true,
|
|
615
|
+
description: 'Itemized taxes',
|
|
616
|
+
},
|
|
617
|
+
// Currency
|
|
618
|
+
currency: {
|
|
619
|
+
type: 'string',
|
|
620
|
+
description: 'Currency',
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
relationships: {
|
|
624
|
+
employee: {
|
|
625
|
+
type: 'Employee',
|
|
626
|
+
description: 'Employee paid',
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
actions: [
|
|
630
|
+
'create',
|
|
631
|
+
'process',
|
|
632
|
+
'approve',
|
|
633
|
+
'cancel',
|
|
634
|
+
],
|
|
635
|
+
events: [
|
|
636
|
+
'created',
|
|
637
|
+
'processed',
|
|
638
|
+
'approved',
|
|
639
|
+
'paid',
|
|
640
|
+
'cancelled',
|
|
641
|
+
],
|
|
642
|
+
};
|
|
643
|
+
// =============================================================================
|
|
644
|
+
// Exports
|
|
645
|
+
// =============================================================================
|
|
646
|
+
export const HREntities = {
|
|
647
|
+
Employee,
|
|
648
|
+
Team,
|
|
649
|
+
TimeOff,
|
|
650
|
+
PerformanceReview,
|
|
651
|
+
Benefit,
|
|
652
|
+
Payroll,
|
|
653
|
+
};
|
|
654
|
+
export const HRCategories = {
|
|
655
|
+
employees: ['Employee'],
|
|
656
|
+
teams: ['Team'],
|
|
657
|
+
timeOff: ['TimeOff'],
|
|
658
|
+
performance: ['PerformanceReview'],
|
|
659
|
+
benefits: ['Benefit'],
|
|
660
|
+
payroll: ['Payroll'],
|
|
661
|
+
};
|