@bluehive/sdk 0.1.0-alpha.10 → 0.1.0-alpha.12
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 +85 -0
- package/README.md +2 -6
- 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 +54 -0
- package/resources/employees.js.map +1 -0
- package/resources/employees.mjs +50 -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 +46 -0
- package/resources/hl7.d.mts.map +1 -0
- package/resources/hl7.d.ts +46 -0
- package/resources/hl7.d.ts.map +1 -0
- package/resources/hl7.js +15 -0
- package/resources/hl7.js.map +1 -0
- package/resources/hl7.mjs +11 -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 +121 -2
- package/src/internal/to-file.ts +1 -1
- package/src/internal/utils/values.ts +3 -3
- package/src/resources/employees.ts +634 -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 +60 -0
- package/src/resources/index.ts +49 -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,463 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Employees extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new employee in the system.
|
|
7
|
+
*/
|
|
8
|
+
create(body: EmployeeCreateParams, options?: RequestOptions): APIPromise<EmployeeCreateResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve an employee by their unique ID.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(employeeID: string, options?: RequestOptions): APIPromise<EmployeeRetrieveResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Update an existing employee in the system.
|
|
15
|
+
*/
|
|
16
|
+
update(body: EmployeeUpdateParams, options?: RequestOptions): APIPromise<EmployeeUpdateResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* List all employees for a given employer with pagination.
|
|
19
|
+
*/
|
|
20
|
+
list(query: EmployeeListParams, options?: RequestOptions): APIPromise<EmployeeListResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Delete an employee from the system. Cannot delete employees with existing
|
|
23
|
+
* orders.
|
|
24
|
+
*/
|
|
25
|
+
delete(employeeID: string, options?: RequestOptions): APIPromise<EmployeeDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Link an employee to a user account with specified roles
|
|
28
|
+
*/
|
|
29
|
+
linkUser(body: EmployeeLinkUserParams, options?: RequestOptions): APIPromise<EmployeeLinkUserResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Remove the link between an employee and a user account
|
|
32
|
+
*/
|
|
33
|
+
unlinkUser(params: EmployeeUnlinkUserParams, options?: RequestOptions): APIPromise<EmployeeUnlinkUserResponse>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Employee created successfully
|
|
37
|
+
*/
|
|
38
|
+
export interface EmployeeCreateResponse {
|
|
39
|
+
/**
|
|
40
|
+
* ID of the created employee
|
|
41
|
+
*/
|
|
42
|
+
employeeId: string;
|
|
43
|
+
message: string;
|
|
44
|
+
success: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Employee found successfully
|
|
48
|
+
*/
|
|
49
|
+
export interface EmployeeRetrieveResponse {
|
|
50
|
+
/**
|
|
51
|
+
* Employee details
|
|
52
|
+
*/
|
|
53
|
+
employee: EmployeeRetrieveResponse.Employee;
|
|
54
|
+
message: string;
|
|
55
|
+
success: boolean;
|
|
56
|
+
}
|
|
57
|
+
export declare namespace EmployeeRetrieveResponse {
|
|
58
|
+
/**
|
|
59
|
+
* Employee details
|
|
60
|
+
*/
|
|
61
|
+
interface Employee {
|
|
62
|
+
/**
|
|
63
|
+
* Unique identifier
|
|
64
|
+
*/
|
|
65
|
+
_id: string;
|
|
66
|
+
/**
|
|
67
|
+
* Email address
|
|
68
|
+
*/
|
|
69
|
+
email: string;
|
|
70
|
+
/**
|
|
71
|
+
* ID of associated employer
|
|
72
|
+
*/
|
|
73
|
+
employer_id: string;
|
|
74
|
+
/**
|
|
75
|
+
* First name
|
|
76
|
+
*/
|
|
77
|
+
firstName: string;
|
|
78
|
+
/**
|
|
79
|
+
* Last name
|
|
80
|
+
*/
|
|
81
|
+
lastName: string;
|
|
82
|
+
/**
|
|
83
|
+
* Account status
|
|
84
|
+
*/
|
|
85
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
86
|
+
/**
|
|
87
|
+
* Employee address
|
|
88
|
+
*/
|
|
89
|
+
address?: Employee.Address;
|
|
90
|
+
/**
|
|
91
|
+
* Brief description or bio
|
|
92
|
+
*/
|
|
93
|
+
blurb?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Creation timestamp
|
|
96
|
+
*/
|
|
97
|
+
createdAt?: string;
|
|
98
|
+
/**
|
|
99
|
+
* ID of user who created the employee
|
|
100
|
+
*/
|
|
101
|
+
createdBy?: string;
|
|
102
|
+
/**
|
|
103
|
+
* List of department names
|
|
104
|
+
*/
|
|
105
|
+
departments?: Array<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Date of birth
|
|
108
|
+
*/
|
|
109
|
+
dob?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Additional custom fields
|
|
112
|
+
*/
|
|
113
|
+
extendedFields?: Array<Employee.ExtendedField>;
|
|
114
|
+
/**
|
|
115
|
+
* Contact phone numbers
|
|
116
|
+
*/
|
|
117
|
+
phone?: Array<Employee.Phone>;
|
|
118
|
+
/**
|
|
119
|
+
* Job title
|
|
120
|
+
*/
|
|
121
|
+
title?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Last update timestamp
|
|
124
|
+
*/
|
|
125
|
+
updatedAt?: string;
|
|
126
|
+
/**
|
|
127
|
+
* ID of user who last updated the employee
|
|
128
|
+
*/
|
|
129
|
+
updatedBy?: string;
|
|
130
|
+
}
|
|
131
|
+
namespace Employee {
|
|
132
|
+
/**
|
|
133
|
+
* Employee address
|
|
134
|
+
*/
|
|
135
|
+
interface Address {
|
|
136
|
+
/**
|
|
137
|
+
* City
|
|
138
|
+
*/
|
|
139
|
+
city: string;
|
|
140
|
+
/**
|
|
141
|
+
* Postal code
|
|
142
|
+
*/
|
|
143
|
+
postalCode: string;
|
|
144
|
+
/**
|
|
145
|
+
* State
|
|
146
|
+
*/
|
|
147
|
+
state: string;
|
|
148
|
+
/**
|
|
149
|
+
* Street address line 1
|
|
150
|
+
*/
|
|
151
|
+
street1: string;
|
|
152
|
+
/**
|
|
153
|
+
* Country
|
|
154
|
+
*/
|
|
155
|
+
country?: string;
|
|
156
|
+
/**
|
|
157
|
+
* County
|
|
158
|
+
*/
|
|
159
|
+
county?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Street address line 2
|
|
162
|
+
*/
|
|
163
|
+
street2?: string;
|
|
164
|
+
}
|
|
165
|
+
interface ExtendedField {
|
|
166
|
+
/**
|
|
167
|
+
* Field name
|
|
168
|
+
*/
|
|
169
|
+
name: string;
|
|
170
|
+
/**
|
|
171
|
+
* Field value
|
|
172
|
+
*/
|
|
173
|
+
value: string;
|
|
174
|
+
}
|
|
175
|
+
interface Phone {
|
|
176
|
+
/**
|
|
177
|
+
* Phone number
|
|
178
|
+
*/
|
|
179
|
+
number: string;
|
|
180
|
+
/**
|
|
181
|
+
* Type of phone number
|
|
182
|
+
*/
|
|
183
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Employee updated successfully
|
|
189
|
+
*/
|
|
190
|
+
export interface EmployeeUpdateResponse {
|
|
191
|
+
message: string;
|
|
192
|
+
success: boolean;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Employees retrieved successfully
|
|
196
|
+
*/
|
|
197
|
+
export interface EmployeeListResponse {
|
|
198
|
+
/**
|
|
199
|
+
* List of employees
|
|
200
|
+
*/
|
|
201
|
+
employees: Array<EmployeeListResponse.Employee>;
|
|
202
|
+
message: string;
|
|
203
|
+
success: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Total number of employees returned
|
|
206
|
+
*/
|
|
207
|
+
total: number;
|
|
208
|
+
}
|
|
209
|
+
export declare namespace EmployeeListResponse {
|
|
210
|
+
/**
|
|
211
|
+
* Employee details
|
|
212
|
+
*/
|
|
213
|
+
interface Employee {
|
|
214
|
+
/**
|
|
215
|
+
* Unique identifier
|
|
216
|
+
*/
|
|
217
|
+
_id: string;
|
|
218
|
+
/**
|
|
219
|
+
* Email address
|
|
220
|
+
*/
|
|
221
|
+
email: string;
|
|
222
|
+
/**
|
|
223
|
+
* ID of associated employer
|
|
224
|
+
*/
|
|
225
|
+
employer_id: string;
|
|
226
|
+
/**
|
|
227
|
+
* First name
|
|
228
|
+
*/
|
|
229
|
+
firstName: string;
|
|
230
|
+
/**
|
|
231
|
+
* Last name
|
|
232
|
+
*/
|
|
233
|
+
lastName: string;
|
|
234
|
+
/**
|
|
235
|
+
* Account status
|
|
236
|
+
*/
|
|
237
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
238
|
+
/**
|
|
239
|
+
* Employee address
|
|
240
|
+
*/
|
|
241
|
+
address?: Employee.Address;
|
|
242
|
+
/**
|
|
243
|
+
* Brief description or bio
|
|
244
|
+
*/
|
|
245
|
+
blurb?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Creation timestamp
|
|
248
|
+
*/
|
|
249
|
+
createdAt?: string;
|
|
250
|
+
/**
|
|
251
|
+
* ID of user who created the employee
|
|
252
|
+
*/
|
|
253
|
+
createdBy?: string;
|
|
254
|
+
/**
|
|
255
|
+
* List of department names
|
|
256
|
+
*/
|
|
257
|
+
departments?: Array<string>;
|
|
258
|
+
/**
|
|
259
|
+
* Date of birth
|
|
260
|
+
*/
|
|
261
|
+
dob?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Additional custom fields
|
|
264
|
+
*/
|
|
265
|
+
extendedFields?: Array<Employee.ExtendedField>;
|
|
266
|
+
/**
|
|
267
|
+
* Contact phone numbers
|
|
268
|
+
*/
|
|
269
|
+
phone?: Array<Employee.Phone>;
|
|
270
|
+
/**
|
|
271
|
+
* Job title
|
|
272
|
+
*/
|
|
273
|
+
title?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Last update timestamp
|
|
276
|
+
*/
|
|
277
|
+
updatedAt?: string;
|
|
278
|
+
/**
|
|
279
|
+
* ID of user who last updated the employee
|
|
280
|
+
*/
|
|
281
|
+
updatedBy?: string;
|
|
282
|
+
}
|
|
283
|
+
namespace Employee {
|
|
284
|
+
/**
|
|
285
|
+
* Employee address
|
|
286
|
+
*/
|
|
287
|
+
interface Address {
|
|
288
|
+
/**
|
|
289
|
+
* City
|
|
290
|
+
*/
|
|
291
|
+
city: string;
|
|
292
|
+
/**
|
|
293
|
+
* Postal code
|
|
294
|
+
*/
|
|
295
|
+
postalCode: string;
|
|
296
|
+
/**
|
|
297
|
+
* State
|
|
298
|
+
*/
|
|
299
|
+
state: string;
|
|
300
|
+
/**
|
|
301
|
+
* Street address line 1
|
|
302
|
+
*/
|
|
303
|
+
street1: string;
|
|
304
|
+
/**
|
|
305
|
+
* Country
|
|
306
|
+
*/
|
|
307
|
+
country?: string;
|
|
308
|
+
/**
|
|
309
|
+
* County
|
|
310
|
+
*/
|
|
311
|
+
county?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Street address line 2
|
|
314
|
+
*/
|
|
315
|
+
street2?: string;
|
|
316
|
+
}
|
|
317
|
+
interface ExtendedField {
|
|
318
|
+
/**
|
|
319
|
+
* Field name
|
|
320
|
+
*/
|
|
321
|
+
name: string;
|
|
322
|
+
/**
|
|
323
|
+
* Field value
|
|
324
|
+
*/
|
|
325
|
+
value: string;
|
|
326
|
+
}
|
|
327
|
+
interface Phone {
|
|
328
|
+
/**
|
|
329
|
+
* Phone number
|
|
330
|
+
*/
|
|
331
|
+
number: string;
|
|
332
|
+
/**
|
|
333
|
+
* Type of phone number
|
|
334
|
+
*/
|
|
335
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Employee deleted successfully
|
|
341
|
+
*/
|
|
342
|
+
export interface EmployeeDeleteResponse {
|
|
343
|
+
message: string;
|
|
344
|
+
success: boolean;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Employee linked successfully
|
|
348
|
+
*/
|
|
349
|
+
export interface EmployeeLinkUserResponse {
|
|
350
|
+
/**
|
|
351
|
+
* ID of the created link
|
|
352
|
+
*/
|
|
353
|
+
linkId: string;
|
|
354
|
+
message: string;
|
|
355
|
+
success: boolean;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Employee unlinked successfully
|
|
359
|
+
*/
|
|
360
|
+
export interface EmployeeUnlinkUserResponse {
|
|
361
|
+
message: string;
|
|
362
|
+
success: boolean;
|
|
363
|
+
}
|
|
364
|
+
export interface EmployeeCreateParams {
|
|
365
|
+
email: string;
|
|
366
|
+
firstName: string;
|
|
367
|
+
lastName: string;
|
|
368
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
369
|
+
address?: EmployeeCreateParams.Address;
|
|
370
|
+
blurb?: string;
|
|
371
|
+
departments?: Array<string>;
|
|
372
|
+
dob?: string;
|
|
373
|
+
employer_id?: string;
|
|
374
|
+
extendedFields?: Array<EmployeeCreateParams.ExtendedField>;
|
|
375
|
+
phone?: Array<EmployeeCreateParams.Phone>;
|
|
376
|
+
title?: string;
|
|
377
|
+
}
|
|
378
|
+
export declare namespace EmployeeCreateParams {
|
|
379
|
+
interface Address {
|
|
380
|
+
city: string;
|
|
381
|
+
postalCode: string;
|
|
382
|
+
state: string;
|
|
383
|
+
street1: string;
|
|
384
|
+
country?: string;
|
|
385
|
+
county?: string;
|
|
386
|
+
street2?: string;
|
|
387
|
+
}
|
|
388
|
+
interface ExtendedField {
|
|
389
|
+
name: string;
|
|
390
|
+
value: string;
|
|
391
|
+
}
|
|
392
|
+
interface Phone {
|
|
393
|
+
number: string;
|
|
394
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
export interface EmployeeUpdateParams {
|
|
398
|
+
_id: string;
|
|
399
|
+
activeAccount?: 'Active' | 'Inactive';
|
|
400
|
+
address?: EmployeeUpdateParams.Address;
|
|
401
|
+
blurb?: string;
|
|
402
|
+
departments?: Array<string>;
|
|
403
|
+
dob?: string;
|
|
404
|
+
email?: string;
|
|
405
|
+
employer_id?: string;
|
|
406
|
+
extendedFields?: Array<EmployeeUpdateParams.ExtendedField>;
|
|
407
|
+
firstName?: string;
|
|
408
|
+
lastName?: string;
|
|
409
|
+
phone?: Array<EmployeeUpdateParams.Phone>;
|
|
410
|
+
title?: string;
|
|
411
|
+
}
|
|
412
|
+
export declare namespace EmployeeUpdateParams {
|
|
413
|
+
interface Address {
|
|
414
|
+
city: string;
|
|
415
|
+
postalCode: string;
|
|
416
|
+
state: string;
|
|
417
|
+
street1: string;
|
|
418
|
+
country?: string;
|
|
419
|
+
county?: string;
|
|
420
|
+
street2?: string;
|
|
421
|
+
}
|
|
422
|
+
interface ExtendedField {
|
|
423
|
+
name: string;
|
|
424
|
+
value: string;
|
|
425
|
+
}
|
|
426
|
+
interface Phone {
|
|
427
|
+
number: string;
|
|
428
|
+
type: 'Cell' | 'Home' | 'Work' | 'Other';
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
export interface EmployeeListParams {
|
|
432
|
+
/**
|
|
433
|
+
* ID of the employer to list employees for
|
|
434
|
+
*/
|
|
435
|
+
employerId: string;
|
|
436
|
+
/**
|
|
437
|
+
* Maximum number of employees to return (default: 50)
|
|
438
|
+
*/
|
|
439
|
+
limit?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Number of employees to skip (default: 0)
|
|
442
|
+
*/
|
|
443
|
+
offset?: string;
|
|
444
|
+
}
|
|
445
|
+
export interface EmployeeLinkUserParams {
|
|
446
|
+
employeeId: string;
|
|
447
|
+
userId: string;
|
|
448
|
+
role?: Array<string>;
|
|
449
|
+
}
|
|
450
|
+
export interface EmployeeUnlinkUserParams {
|
|
451
|
+
/**
|
|
452
|
+
* ID of the employee to unlink
|
|
453
|
+
*/
|
|
454
|
+
employeeId: string;
|
|
455
|
+
/**
|
|
456
|
+
* ID of the user to unlink from
|
|
457
|
+
*/
|
|
458
|
+
userId: string;
|
|
459
|
+
}
|
|
460
|
+
export declare namespace Employees {
|
|
461
|
+
export { type EmployeeCreateResponse as EmployeeCreateResponse, type EmployeeRetrieveResponse as EmployeeRetrieveResponse, type EmployeeUpdateResponse as EmployeeUpdateResponse, type EmployeeListResponse as EmployeeListResponse, type EmployeeDeleteResponse as EmployeeDeleteResponse, type EmployeeLinkUserResponse as EmployeeLinkUserResponse, type EmployeeUnlinkUserResponse as EmployeeUnlinkUserResponse, type EmployeeCreateParams as EmployeeCreateParams, type EmployeeUpdateParams as EmployeeUpdateParams, type EmployeeListParams as EmployeeListParams, type EmployeeLinkUserParams as EmployeeLinkUserParams, type EmployeeUnlinkUserParams as EmployeeUnlinkUserParams, };
|
|
462
|
+
}
|
|
463
|
+
//# sourceMappingURL=employees.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employees.d.ts","sourceRoot":"","sources":["../src/resources/employees.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIhG;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAI5F;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIhG;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI3F;;;OAGG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIxF;;OAEG;IACH,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EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Employees = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
class Employees extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new employee in the system.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/v1/employees', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Retrieve an employee by their unique ID.
|
|
16
|
+
*/
|
|
17
|
+
retrieve(employeeID, options) {
|
|
18
|
+
return this._client.get((0, path_1.path) `/v1/employees/${employeeID}`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Update an existing employee in the system.
|
|
22
|
+
*/
|
|
23
|
+
update(body, options) {
|
|
24
|
+
return this._client.put('/v1/employees', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List all employees for a given employer with pagination.
|
|
28
|
+
*/
|
|
29
|
+
list(query, options) {
|
|
30
|
+
return this._client.get('/v1/employees', { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Delete an employee from the system. Cannot delete employees with existing
|
|
34
|
+
* orders.
|
|
35
|
+
*/
|
|
36
|
+
delete(employeeID, options) {
|
|
37
|
+
return this._client.delete((0, path_1.path) `/v1/employees/${employeeID}`, options);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Link an employee to a user account with specified roles
|
|
41
|
+
*/
|
|
42
|
+
linkUser(body, options) {
|
|
43
|
+
return this._client.post('/v1/employees/link-user', { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Remove the link between an employee and a user account
|
|
47
|
+
*/
|
|
48
|
+
unlinkUser(params, options) {
|
|
49
|
+
const { employeeId, userId } = params;
|
|
50
|
+
return this._client.delete('/v1/employees/unlink-user', { query: { employeeId, userId }, ...options });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.Employees = Employees;
|
|
54
|
+
//# sourceMappingURL=employees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employees.js","sourceRoot":"","sources":["../src/resources/employees.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,iBAAiB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,KAAyB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,iBAAiB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA4B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,UAAU,CACR,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzG,CAAC;CACF;AAtDD,8BAsDC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
export class Employees extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new employee in the system.
|
|
7
|
+
*/
|
|
8
|
+
create(body, options) {
|
|
9
|
+
return this._client.post('/v1/employees', { body, ...options });
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve an employee by their unique ID.
|
|
13
|
+
*/
|
|
14
|
+
retrieve(employeeID, options) {
|
|
15
|
+
return this._client.get(path `/v1/employees/${employeeID}`, options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Update an existing employee in the system.
|
|
19
|
+
*/
|
|
20
|
+
update(body, options) {
|
|
21
|
+
return this._client.put('/v1/employees', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List all employees for a given employer with pagination.
|
|
25
|
+
*/
|
|
26
|
+
list(query, options) {
|
|
27
|
+
return this._client.get('/v1/employees', { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete an employee from the system. Cannot delete employees with existing
|
|
31
|
+
* orders.
|
|
32
|
+
*/
|
|
33
|
+
delete(employeeID, options) {
|
|
34
|
+
return this._client.delete(path `/v1/employees/${employeeID}`, options);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Link an employee to a user account with specified roles
|
|
38
|
+
*/
|
|
39
|
+
linkUser(body, options) {
|
|
40
|
+
return this._client.post('/v1/employees/link-user', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Remove the link between an employee and a user account
|
|
44
|
+
*/
|
|
45
|
+
unlinkUser(params, options) {
|
|
46
|
+
const { employeeId, userId } = params;
|
|
47
|
+
return this._client.delete('/v1/employees/unlink-user', { query: { employeeId, userId }, ...options });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=employees.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"employees.mjs","sourceRoot":"","sources":["../src/resources/employees.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,iBAAiB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,KAAyB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,iBAAiB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA4B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,UAAU,CACR,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzG,CAAC;CACF"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as ServiceBundlesAPI from "./service-bundles.mjs";
|
|
3
|
+
import { ServiceBundleCreateParams, ServiceBundleCreateResponse, ServiceBundleDeleteParams, ServiceBundleListResponse, ServiceBundleRetrieveParams, ServiceBundleRetrieveResponse, ServiceBundleUpdateParams, ServiceBundleUpdateResponse, ServiceBundles } from "./service-bundles.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
export declare class Employers extends APIResource {
|
|
7
|
+
serviceBundles: ServiceBundlesAPI.ServiceBundles;
|
|
8
|
+
/**
|
|
9
|
+
* Create Employer
|
|
10
|
+
*/
|
|
11
|
+
create(body: EmployerCreateParams, options?: RequestOptions): APIPromise<EmployerCreateResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get Employer
|
|
14
|
+
*/
|
|
15
|
+
retrieve(employerID: string, options?: RequestOptions): APIPromise<EmployerRetrieveResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Get Employers for Current User
|
|
18
|
+
*/
|
|
19
|
+
list(params: EmployerListParams, options?: RequestOptions): APIPromise<EmployerListResponse>;
|
|
20
|
+
}
|
|
21
|
+
export interface EmployerCreateResponse {
|
|
22
|
+
_id: string;
|
|
23
|
+
address: {
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
email: string;
|
|
27
|
+
name: string;
|
|
28
|
+
phones: Array<{
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
createdAt?: string;
|
|
32
|
+
createdBy?: string;
|
|
33
|
+
demo?: boolean;
|
|
34
|
+
employeeConsent?: boolean;
|
|
35
|
+
onsiteClinic?: boolean;
|
|
36
|
+
website?: string;
|
|
37
|
+
}
|
|
38
|
+
export type EmployerRetrieveResponse = {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
export type EmployerListResponse = Array<{
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
}>;
|
|
44
|
+
export interface EmployerCreateParams {
|
|
45
|
+
address: EmployerCreateParams.Address;
|
|
46
|
+
email: string;
|
|
47
|
+
name: string;
|
|
48
|
+
phones: Array<EmployerCreateParams.Phone>;
|
|
49
|
+
billingAddress?: {
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
};
|
|
52
|
+
checkr?: EmployerCreateParams.Checkr;
|
|
53
|
+
demo?: boolean;
|
|
54
|
+
employeeConsent?: boolean;
|
|
55
|
+
metadata?: {
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
};
|
|
58
|
+
onsiteClinic?: boolean;
|
|
59
|
+
website?: string;
|
|
60
|
+
}
|
|
61
|
+
export declare namespace EmployerCreateParams {
|
|
62
|
+
interface Address {
|
|
63
|
+
city: string;
|
|
64
|
+
state: string;
|
|
65
|
+
street1: string;
|
|
66
|
+
zipCode: string;
|
|
67
|
+
country?: string;
|
|
68
|
+
street2?: string;
|
|
69
|
+
}
|
|
70
|
+
interface Phone {
|
|
71
|
+
number: string;
|
|
72
|
+
primary?: boolean;
|
|
73
|
+
type?: string;
|
|
74
|
+
}
|
|
75
|
+
interface Checkr {
|
|
76
|
+
id: string;
|
|
77
|
+
status?: string;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export interface EmployerListParams {
|
|
81
|
+
'login-token': string;
|
|
82
|
+
'user-id': string;
|
|
83
|
+
}
|
|
84
|
+
export declare namespace Employers {
|
|
85
|
+
export { type EmployerCreateResponse as EmployerCreateResponse, type EmployerRetrieveResponse as EmployerRetrieveResponse, type EmployerListResponse as EmployerListResponse, type EmployerCreateParams as EmployerCreateParams, type EmployerListParams as EmployerListParams, };
|
|
86
|
+
export { ServiceBundles as ServiceBundles, type ServiceBundleCreateResponse as ServiceBundleCreateResponse, type ServiceBundleRetrieveResponse as ServiceBundleRetrieveResponse, type ServiceBundleUpdateResponse as ServiceBundleUpdateResponse, type ServiceBundleListResponse as ServiceBundleListResponse, type ServiceBundleCreateParams as ServiceBundleCreateParams, type ServiceBundleRetrieveParams as ServiceBundleRetrieveParams, type ServiceBundleUpdateParams as ServiceBundleUpdateParams, type ServiceBundleDeleteParams as ServiceBundleDeleteParams, };
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=employers.d.mts.map
|
|
@@ -0,0 +1 @@
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