@bluehive/sdk 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +77 -0
- package/client.d.mts +15 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -0
- package/client.d.ts.map +1 -1
- package/client.js +17 -2
- package/client.js.map +1 -1
- package/client.mjs +17 -2
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/values.js +3 -3
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +3 -3
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/employees.d.mts +463 -0
- package/resources/employees.d.mts.map +1 -0
- package/resources/employees.d.ts +463 -0
- package/resources/employees.d.ts.map +1 -0
- package/resources/employees.js +53 -0
- package/resources/employees.js.map +1 -0
- package/resources/employees.mjs +49 -0
- package/resources/employees.mjs.map +1 -0
- package/resources/employers/employers.d.mts +88 -0
- package/resources/employers/employers.d.mts.map +1 -0
- package/resources/employers/employers.d.ts +88 -0
- package/resources/employers/employers.d.ts.map +1 -0
- package/resources/employers/employers.js +41 -0
- package/resources/employers/employers.js.map +1 -0
- package/resources/employers/employers.mjs +36 -0
- package/resources/employers/employers.mjs.map +1 -0
- package/resources/employers/index.d.mts +3 -0
- package/resources/employers/index.d.mts.map +1 -0
- package/resources/employers/index.d.ts +3 -0
- package/resources/employers/index.d.ts.map +1 -0
- package/resources/employers/index.js +9 -0
- package/resources/employers/index.js.map +1 -0
- package/resources/employers/index.mjs +4 -0
- package/resources/employers/index.mjs.map +1 -0
- package/resources/employers/service-bundles.d.mts +110 -0
- package/resources/employers/service-bundles.d.mts.map +1 -0
- package/resources/employers/service-bundles.d.ts +110 -0
- package/resources/employers/service-bundles.d.ts.map +1 -0
- package/resources/employers/service-bundles.js +47 -0
- package/resources/employers/service-bundles.js.map +1 -0
- package/resources/employers/service-bundles.mjs +43 -0
- package/resources/employers/service-bundles.mjs.map +1 -0
- package/resources/employers.d.mts +2 -0
- package/resources/employers.d.mts.map +1 -0
- package/resources/employers.d.ts +2 -0
- package/resources/employers.d.ts.map +1 -0
- package/resources/employers.js +6 -0
- package/resources/employers.js.map +1 -0
- package/resources/employers.mjs +3 -0
- package/resources/employers.mjs.map +1 -0
- package/resources/fax.d.mts +3 -1
- package/resources/fax.d.mts.map +1 -1
- package/resources/fax.d.ts +3 -1
- package/resources/fax.d.ts.map +1 -1
- package/resources/hl7.d.mts +82 -0
- package/resources/hl7.d.mts.map +1 -0
- package/resources/hl7.d.ts +82 -0
- package/resources/hl7.d.ts.map +1 -0
- package/resources/hl7.js +22 -0
- package/resources/hl7.js.map +1 -0
- package/resources/hl7.mjs +18 -0
- package/resources/hl7.mjs.map +1 -0
- package/resources/index.d.mts +5 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/integrations.d.mts +42 -0
- package/resources/integrations.d.mts.map +1 -0
- package/resources/integrations.d.ts +42 -0
- package/resources/integrations.d.ts.map +1 -0
- package/resources/integrations.js +33 -0
- package/resources/integrations.js.map +1 -0
- package/resources/integrations.mjs +29 -0
- package/resources/integrations.mjs.map +1 -0
- package/resources/orders.d.mts +554 -0
- package/resources/orders.d.mts.map +1 -0
- package/resources/orders.d.ts +554 -0
- package/resources/orders.d.ts.map +1 -0
- package/resources/orders.js +71 -0
- package/resources/orders.js.map +1 -0
- package/resources/orders.mjs +67 -0
- package/resources/orders.mjs.map +1 -0
- package/src/client.ts +129 -2
- package/src/internal/to-file.ts +1 -1
- package/src/internal/utils/values.ts +3 -3
- package/src/resources/employees.ts +633 -0
- package/src/resources/employers/employers.ts +160 -0
- package/src/resources/employers/index.ts +21 -0
- package/src/resources/employers/service-bundles.ts +204 -0
- package/src/resources/employers.ts +3 -0
- package/src/resources/fax.ts +1 -1
- package/src/resources/hl7.ts +109 -0
- package/src/resources/index.ts +55 -0
- package/src/resources/integrations.ts +72 -0
- package/src/resources/orders.ts +874 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Employees extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new employee in the system.
|
|
11
|
+
*/
|
|
12
|
+
create(body: EmployeeCreateParams, options?: RequestOptions): APIPromise<EmployeeCreateResponse> {
|
|
13
|
+
return this._client.post('/v1/employees', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve an employee by their unique ID.
|
|
18
|
+
*/
|
|
19
|
+
retrieve(employeeID: string, options?: RequestOptions): APIPromise<EmployeeRetrieveResponse> {
|
|
20
|
+
return this._client.get(path`/v1/employees/${employeeID}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Update an existing employee in the system.
|
|
25
|
+
*/
|
|
26
|
+
update(body: EmployeeUpdateParams, options?: RequestOptions): APIPromise<EmployeeUpdateResponse> {
|
|
27
|
+
return this._client.put('/v1/employees', { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List all employees for a given employer with pagination.
|
|
32
|
+
*/
|
|
33
|
+
list(query: EmployeeListParams, options?: RequestOptions): APIPromise<EmployeeListResponse> {
|
|
34
|
+
return this._client.get('/v1/employees', { query, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Delete an employee from the system. Cannot delete employees with existing
|
|
39
|
+
* orders.
|
|
40
|
+
*/
|
|
41
|
+
delete(employeeID: string, options?: RequestOptions): APIPromise<EmployeeDeleteResponse> {
|
|
42
|
+
return this._client.delete(path`/v1/employees/${employeeID}`, options);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Link an employee to a user account with specified roles
|
|
47
|
+
*/
|
|
48
|
+
linkUser(body: EmployeeLinkUserParams, options?: RequestOptions): APIPromise<EmployeeLinkUserResponse> {
|
|
49
|
+
return this._client.post('/v1/employees/link-user', { body, ...options });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Remove the link between an employee and a user account
|
|
54
|
+
*/
|
|
55
|
+
unlinkUser(
|
|
56
|
+
body: EmployeeUnlinkUserParams,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): APIPromise<EmployeeUnlinkUserResponse> {
|
|
59
|
+
return this._client.delete('/v1/employees/unlink-user', { body, ...options });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Employee created successfully
|
|
65
|
+
*/
|
|
66
|
+
export interface EmployeeCreateResponse {
|
|
67
|
+
/**
|
|
68
|
+
* ID of the created employee
|
|
69
|
+
*/
|
|
70
|
+
employeeId: string;
|
|
71
|
+
|
|
72
|
+
message: string;
|
|
73
|
+
|
|
74
|
+
success: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Employee found successfully
|
|
79
|
+
*/
|
|
80
|
+
export interface EmployeeRetrieveResponse {
|
|
81
|
+
/**
|
|
82
|
+
* Employee details
|
|
83
|
+
*/
|
|
84
|
+
employee: EmployeeRetrieveResponse.Employee;
|
|
85
|
+
|
|
86
|
+
message: string;
|
|
87
|
+
|
|
88
|
+
success: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export namespace EmployeeRetrieveResponse {
|
|
92
|
+
/**
|
|
93
|
+
* Employee details
|
|
94
|
+
*/
|
|
95
|
+
export interface Employee {
|
|
96
|
+
/**
|
|
97
|
+
* Unique identifier
|
|
98
|
+
*/
|
|
99
|
+
_id: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Email address
|
|
103
|
+
*/
|
|
104
|
+
email: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* ID of associated employer
|
|
108
|
+
*/
|
|
109
|
+
employer_id: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* First name
|
|
113
|
+
*/
|
|
114
|
+
firstName: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Last name
|
|
118
|
+
*/
|
|
119
|
+
lastName: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Account status
|
|
123
|
+
*/
|
|
124
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Employee address
|
|
128
|
+
*/
|
|
129
|
+
address?: Employee.Address;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Brief description or bio
|
|
133
|
+
*/
|
|
134
|
+
blurb?: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Creation timestamp
|
|
138
|
+
*/
|
|
139
|
+
createdAt?: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* ID of user who created the employee
|
|
143
|
+
*/
|
|
144
|
+
createdBy?: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* List of department names
|
|
148
|
+
*/
|
|
149
|
+
departments?: Array<string>;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Date of birth
|
|
153
|
+
*/
|
|
154
|
+
dob?: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Additional custom fields
|
|
158
|
+
*/
|
|
159
|
+
extendedFields?: Array<Employee.ExtendedField>;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Contact phone numbers
|
|
163
|
+
*/
|
|
164
|
+
phone?: Array<Employee.Phone>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Job title
|
|
168
|
+
*/
|
|
169
|
+
title?: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Last update timestamp
|
|
173
|
+
*/
|
|
174
|
+
updatedAt?: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* ID of user who last updated the employee
|
|
178
|
+
*/
|
|
179
|
+
updatedBy?: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export namespace Employee {
|
|
183
|
+
/**
|
|
184
|
+
* Employee address
|
|
185
|
+
*/
|
|
186
|
+
export interface Address {
|
|
187
|
+
/**
|
|
188
|
+
* City
|
|
189
|
+
*/
|
|
190
|
+
city: string;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Postal code
|
|
194
|
+
*/
|
|
195
|
+
postalCode: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* State
|
|
199
|
+
*/
|
|
200
|
+
state: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Street address line 1
|
|
204
|
+
*/
|
|
205
|
+
street1: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Country
|
|
209
|
+
*/
|
|
210
|
+
country?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* County
|
|
214
|
+
*/
|
|
215
|
+
county?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Street address line 2
|
|
219
|
+
*/
|
|
220
|
+
street2?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface ExtendedField {
|
|
224
|
+
/**
|
|
225
|
+
* Field name
|
|
226
|
+
*/
|
|
227
|
+
name: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Field value
|
|
231
|
+
*/
|
|
232
|
+
value: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface Phone {
|
|
236
|
+
/**
|
|
237
|
+
* Phone number
|
|
238
|
+
*/
|
|
239
|
+
number: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Type of phone number
|
|
243
|
+
*/
|
|
244
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Employee updated successfully
|
|
251
|
+
*/
|
|
252
|
+
export interface EmployeeUpdateResponse {
|
|
253
|
+
message: string;
|
|
254
|
+
|
|
255
|
+
success: boolean;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Employees retrieved successfully
|
|
260
|
+
*/
|
|
261
|
+
export interface EmployeeListResponse {
|
|
262
|
+
/**
|
|
263
|
+
* List of employees
|
|
264
|
+
*/
|
|
265
|
+
employees: Array<EmployeeListResponse.Employee>;
|
|
266
|
+
|
|
267
|
+
message: string;
|
|
268
|
+
|
|
269
|
+
success: boolean;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Total number of employees returned
|
|
273
|
+
*/
|
|
274
|
+
total: number;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export namespace EmployeeListResponse {
|
|
278
|
+
/**
|
|
279
|
+
* Employee details
|
|
280
|
+
*/
|
|
281
|
+
export interface Employee {
|
|
282
|
+
/**
|
|
283
|
+
* Unique identifier
|
|
284
|
+
*/
|
|
285
|
+
_id: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Email address
|
|
289
|
+
*/
|
|
290
|
+
email: string;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* ID of associated employer
|
|
294
|
+
*/
|
|
295
|
+
employer_id: string;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* First name
|
|
299
|
+
*/
|
|
300
|
+
firstName: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Last name
|
|
304
|
+
*/
|
|
305
|
+
lastName: string;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Account status
|
|
309
|
+
*/
|
|
310
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Employee address
|
|
314
|
+
*/
|
|
315
|
+
address?: Employee.Address;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Brief description or bio
|
|
319
|
+
*/
|
|
320
|
+
blurb?: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Creation timestamp
|
|
324
|
+
*/
|
|
325
|
+
createdAt?: string;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* ID of user who created the employee
|
|
329
|
+
*/
|
|
330
|
+
createdBy?: string;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* List of department names
|
|
334
|
+
*/
|
|
335
|
+
departments?: Array<string>;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Date of birth
|
|
339
|
+
*/
|
|
340
|
+
dob?: string;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Additional custom fields
|
|
344
|
+
*/
|
|
345
|
+
extendedFields?: Array<Employee.ExtendedField>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Contact phone numbers
|
|
349
|
+
*/
|
|
350
|
+
phone?: Array<Employee.Phone>;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Job title
|
|
354
|
+
*/
|
|
355
|
+
title?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Last update timestamp
|
|
359
|
+
*/
|
|
360
|
+
updatedAt?: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* ID of user who last updated the employee
|
|
364
|
+
*/
|
|
365
|
+
updatedBy?: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export namespace Employee {
|
|
369
|
+
/**
|
|
370
|
+
* Employee address
|
|
371
|
+
*/
|
|
372
|
+
export interface Address {
|
|
373
|
+
/**
|
|
374
|
+
* City
|
|
375
|
+
*/
|
|
376
|
+
city: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Postal code
|
|
380
|
+
*/
|
|
381
|
+
postalCode: string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* State
|
|
385
|
+
*/
|
|
386
|
+
state: string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Street address line 1
|
|
390
|
+
*/
|
|
391
|
+
street1: string;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Country
|
|
395
|
+
*/
|
|
396
|
+
country?: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* County
|
|
400
|
+
*/
|
|
401
|
+
county?: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Street address line 2
|
|
405
|
+
*/
|
|
406
|
+
street2?: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface ExtendedField {
|
|
410
|
+
/**
|
|
411
|
+
* Field name
|
|
412
|
+
*/
|
|
413
|
+
name: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Field value
|
|
417
|
+
*/
|
|
418
|
+
value: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export interface Phone {
|
|
422
|
+
/**
|
|
423
|
+
* Phone number
|
|
424
|
+
*/
|
|
425
|
+
number: string;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Type of phone number
|
|
429
|
+
*/
|
|
430
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Employee deleted successfully
|
|
437
|
+
*/
|
|
438
|
+
export interface EmployeeDeleteResponse {
|
|
439
|
+
message: string;
|
|
440
|
+
|
|
441
|
+
success: boolean;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Employee linked successfully
|
|
446
|
+
*/
|
|
447
|
+
export interface EmployeeLinkUserResponse {
|
|
448
|
+
/**
|
|
449
|
+
* ID of the created link
|
|
450
|
+
*/
|
|
451
|
+
linkId: string;
|
|
452
|
+
|
|
453
|
+
message: string;
|
|
454
|
+
|
|
455
|
+
success: boolean;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Employee unlinked successfully
|
|
460
|
+
*/
|
|
461
|
+
export interface EmployeeUnlinkUserResponse {
|
|
462
|
+
message: string;
|
|
463
|
+
|
|
464
|
+
success: boolean;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export interface EmployeeCreateParams {
|
|
468
|
+
email: string;
|
|
469
|
+
|
|
470
|
+
firstName: string;
|
|
471
|
+
|
|
472
|
+
lastName: string;
|
|
473
|
+
|
|
474
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
475
|
+
|
|
476
|
+
address?: EmployeeCreateParams.Address;
|
|
477
|
+
|
|
478
|
+
blurb?: string;
|
|
479
|
+
|
|
480
|
+
departments?: Array<string>;
|
|
481
|
+
|
|
482
|
+
dob?: string;
|
|
483
|
+
|
|
484
|
+
employer_id?: string;
|
|
485
|
+
|
|
486
|
+
extendedFields?: Array<EmployeeCreateParams.ExtendedField>;
|
|
487
|
+
|
|
488
|
+
phone?: Array<EmployeeCreateParams.Phone>;
|
|
489
|
+
|
|
490
|
+
title?: string;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export namespace EmployeeCreateParams {
|
|
494
|
+
export interface Address {
|
|
495
|
+
city: string;
|
|
496
|
+
|
|
497
|
+
postalCode: string;
|
|
498
|
+
|
|
499
|
+
state: string;
|
|
500
|
+
|
|
501
|
+
street1: string;
|
|
502
|
+
|
|
503
|
+
country?: string;
|
|
504
|
+
|
|
505
|
+
county?: string;
|
|
506
|
+
|
|
507
|
+
street2?: string;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export interface ExtendedField {
|
|
511
|
+
name: string;
|
|
512
|
+
|
|
513
|
+
value: string;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export interface Phone {
|
|
517
|
+
number: string;
|
|
518
|
+
|
|
519
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface EmployeeUpdateParams {
|
|
524
|
+
_id: string;
|
|
525
|
+
|
|
526
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
527
|
+
|
|
528
|
+
address?: EmployeeUpdateParams.Address;
|
|
529
|
+
|
|
530
|
+
blurb?: string;
|
|
531
|
+
|
|
532
|
+
departments?: Array<string>;
|
|
533
|
+
|
|
534
|
+
dob?: string;
|
|
535
|
+
|
|
536
|
+
email?: string;
|
|
537
|
+
|
|
538
|
+
employer_id?: string;
|
|
539
|
+
|
|
540
|
+
extendedFields?: Array<EmployeeUpdateParams.ExtendedField>;
|
|
541
|
+
|
|
542
|
+
firstName?: string;
|
|
543
|
+
|
|
544
|
+
lastName?: string;
|
|
545
|
+
|
|
546
|
+
phone?: Array<EmployeeUpdateParams.Phone>;
|
|
547
|
+
|
|
548
|
+
title?: string;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export namespace EmployeeUpdateParams {
|
|
552
|
+
export interface Address {
|
|
553
|
+
city: string;
|
|
554
|
+
|
|
555
|
+
postalCode: string;
|
|
556
|
+
|
|
557
|
+
state: string;
|
|
558
|
+
|
|
559
|
+
street1: string;
|
|
560
|
+
|
|
561
|
+
country?: string;
|
|
562
|
+
|
|
563
|
+
county?: string;
|
|
564
|
+
|
|
565
|
+
street2?: string;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export interface ExtendedField {
|
|
569
|
+
name: string;
|
|
570
|
+
|
|
571
|
+
value: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface Phone {
|
|
575
|
+
number: string;
|
|
576
|
+
|
|
577
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export interface EmployeeListParams {
|
|
582
|
+
/**
|
|
583
|
+
* ID of the employer to list employees for
|
|
584
|
+
*/
|
|
585
|
+
employerId: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Maximum number of employees to return (default: 50)
|
|
589
|
+
*/
|
|
590
|
+
limit?: string;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Number of employees to skip (default: 0)
|
|
594
|
+
*/
|
|
595
|
+
offset?: string;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface EmployeeLinkUserParams {
|
|
599
|
+
employeeId: string;
|
|
600
|
+
|
|
601
|
+
userId: string;
|
|
602
|
+
|
|
603
|
+
role?: Array<string>;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export interface EmployeeUnlinkUserParams {
|
|
607
|
+
/**
|
|
608
|
+
* ID of the employee to unlink
|
|
609
|
+
*/
|
|
610
|
+
employeeId: string;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* ID of the user to unlink from
|
|
614
|
+
*/
|
|
615
|
+
userId: string;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export declare namespace Employees {
|
|
619
|
+
export {
|
|
620
|
+
type EmployeeCreateResponse as EmployeeCreateResponse,
|
|
621
|
+
type EmployeeRetrieveResponse as EmployeeRetrieveResponse,
|
|
622
|
+
type EmployeeUpdateResponse as EmployeeUpdateResponse,
|
|
623
|
+
type EmployeeListResponse as EmployeeListResponse,
|
|
624
|
+
type EmployeeDeleteResponse as EmployeeDeleteResponse,
|
|
625
|
+
type EmployeeLinkUserResponse as EmployeeLinkUserResponse,
|
|
626
|
+
type EmployeeUnlinkUserResponse as EmployeeUnlinkUserResponse,
|
|
627
|
+
type EmployeeCreateParams as EmployeeCreateParams,
|
|
628
|
+
type EmployeeUpdateParams as EmployeeUpdateParams,
|
|
629
|
+
type EmployeeListParams as EmployeeListParams,
|
|
630
|
+
type EmployeeLinkUserParams as EmployeeLinkUserParams,
|
|
631
|
+
type EmployeeUnlinkUserParams as EmployeeUnlinkUserParams,
|
|
632
|
+
};
|
|
633
|
+
}
|