@vitable-inc/vitable-connect 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.
Files changed (388) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/LICENSE +201 -0
  3. package/README.md +400 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +225 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +225 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +509 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +505 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/pagination.d.mts +60 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +60 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +101 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +95 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +7 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +7 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +32 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +8 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +20 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +20 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +40 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +37 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/request-options.d.mts +75 -0
  117. package/internal/request-options.d.mts.map +1 -0
  118. package/internal/request-options.d.ts +75 -0
  119. package/internal/request-options.d.ts.map +1 -0
  120. package/internal/request-options.js +14 -0
  121. package/internal/request-options.js.map +1 -0
  122. package/internal/request-options.mjs +10 -0
  123. package/internal/request-options.mjs.map +1 -0
  124. package/internal/shim-types.d.mts +17 -0
  125. package/internal/shim-types.d.mts.map +1 -0
  126. package/internal/shim-types.d.ts +17 -0
  127. package/internal/shim-types.d.ts.map +1 -0
  128. package/internal/shim-types.js +4 -0
  129. package/internal/shim-types.js.map +1 -0
  130. package/internal/shim-types.mjs +3 -0
  131. package/internal/shim-types.mjs.map +1 -0
  132. package/internal/shims.d.mts +20 -0
  133. package/internal/shims.d.mts.map +1 -0
  134. package/internal/shims.d.ts +20 -0
  135. package/internal/shims.d.ts.map +1 -0
  136. package/internal/shims.js +92 -0
  137. package/internal/shims.js.map +1 -0
  138. package/internal/shims.mjs +85 -0
  139. package/internal/shims.mjs.map +1 -0
  140. package/internal/to-file.d.mts +45 -0
  141. package/internal/to-file.d.mts.map +1 -0
  142. package/internal/to-file.d.ts +45 -0
  143. package/internal/to-file.d.ts.map +1 -0
  144. package/internal/to-file.js +91 -0
  145. package/internal/to-file.js.map +1 -0
  146. package/internal/to-file.mjs +88 -0
  147. package/internal/to-file.mjs.map +1 -0
  148. package/internal/tslib.js +81 -0
  149. package/internal/tslib.mjs +17 -0
  150. package/internal/types.d.mts +69 -0
  151. package/internal/types.d.mts.map +1 -0
  152. package/internal/types.d.ts +69 -0
  153. package/internal/types.d.ts.map +1 -0
  154. package/internal/types.js +4 -0
  155. package/internal/types.js.map +1 -0
  156. package/internal/types.mjs +3 -0
  157. package/internal/types.mjs.map +1 -0
  158. package/internal/uploads.d.mts +42 -0
  159. package/internal/uploads.d.mts.map +1 -0
  160. package/internal/uploads.d.ts +42 -0
  161. package/internal/uploads.d.ts.map +1 -0
  162. package/internal/uploads.js +141 -0
  163. package/internal/uploads.js.map +1 -0
  164. package/internal/uploads.mjs +131 -0
  165. package/internal/uploads.mjs.map +1 -0
  166. package/internal/utils/base64.d.mts +3 -0
  167. package/internal/utils/base64.d.mts.map +1 -0
  168. package/internal/utils/base64.d.ts +3 -0
  169. package/internal/utils/base64.d.ts.map +1 -0
  170. package/internal/utils/base64.js +38 -0
  171. package/internal/utils/base64.js.map +1 -0
  172. package/internal/utils/base64.mjs +33 -0
  173. package/internal/utils/base64.mjs.map +1 -0
  174. package/internal/utils/bytes.d.mts +4 -0
  175. package/internal/utils/bytes.d.mts.map +1 -0
  176. package/internal/utils/bytes.d.ts +4 -0
  177. package/internal/utils/bytes.d.ts.map +1 -0
  178. package/internal/utils/bytes.js +31 -0
  179. package/internal/utils/bytes.js.map +1 -0
  180. package/internal/utils/bytes.mjs +26 -0
  181. package/internal/utils/bytes.mjs.map +1 -0
  182. package/internal/utils/env.d.mts +9 -0
  183. package/internal/utils/env.d.mts.map +1 -0
  184. package/internal/utils/env.d.ts +9 -0
  185. package/internal/utils/env.d.ts.map +1 -0
  186. package/internal/utils/env.js +22 -0
  187. package/internal/utils/env.js.map +1 -0
  188. package/internal/utils/env.mjs +18 -0
  189. package/internal/utils/env.mjs.map +1 -0
  190. package/internal/utils/log.d.mts +37 -0
  191. package/internal/utils/log.d.mts.map +1 -0
  192. package/internal/utils/log.d.ts +37 -0
  193. package/internal/utils/log.d.ts.map +1 -0
  194. package/internal/utils/log.js +85 -0
  195. package/internal/utils/log.js.map +1 -0
  196. package/internal/utils/log.mjs +79 -0
  197. package/internal/utils/log.mjs.map +1 -0
  198. package/internal/utils/path.d.mts +15 -0
  199. package/internal/utils/path.d.mts.map +1 -0
  200. package/internal/utils/path.d.ts +15 -0
  201. package/internal/utils/path.d.ts.map +1 -0
  202. package/internal/utils/path.js +79 -0
  203. package/internal/utils/path.js.map +1 -0
  204. package/internal/utils/path.mjs +74 -0
  205. package/internal/utils/path.mjs.map +1 -0
  206. package/internal/utils/query.d.mts +5 -0
  207. package/internal/utils/query.d.mts.map +1 -0
  208. package/internal/utils/query.d.ts +5 -0
  209. package/internal/utils/query.d.ts.map +1 -0
  210. package/internal/utils/query.js +23 -0
  211. package/internal/utils/query.js.map +1 -0
  212. package/internal/utils/query.mjs +20 -0
  213. package/internal/utils/query.mjs.map +1 -0
  214. package/internal/utils/sleep.d.mts +2 -0
  215. package/internal/utils/sleep.d.mts.map +1 -0
  216. package/internal/utils/sleep.d.ts +2 -0
  217. package/internal/utils/sleep.d.ts.map +1 -0
  218. package/internal/utils/sleep.js +7 -0
  219. package/internal/utils/sleep.js.map +1 -0
  220. package/internal/utils/sleep.mjs +3 -0
  221. package/internal/utils/sleep.mjs.map +1 -0
  222. package/internal/utils/uuid.d.mts +5 -0
  223. package/internal/utils/uuid.d.mts.map +1 -0
  224. package/internal/utils/uuid.d.ts +5 -0
  225. package/internal/utils/uuid.d.ts.map +1 -0
  226. package/internal/utils/uuid.js +19 -0
  227. package/internal/utils/uuid.js.map +1 -0
  228. package/internal/utils/uuid.mjs +15 -0
  229. package/internal/utils/uuid.mjs.map +1 -0
  230. package/internal/utils/values.d.mts +18 -0
  231. package/internal/utils/values.d.mts.map +1 -0
  232. package/internal/utils/values.d.ts +18 -0
  233. package/internal/utils/values.d.ts.map +1 -0
  234. package/internal/utils/values.js +112 -0
  235. package/internal/utils/values.js.map +1 -0
  236. package/internal/utils/values.mjs +94 -0
  237. package/internal/utils/values.mjs.map +1 -0
  238. package/internal/utils.d.mts +8 -0
  239. package/internal/utils.d.mts.map +1 -0
  240. package/internal/utils.d.ts +8 -0
  241. package/internal/utils.d.ts.map +1 -0
  242. package/internal/utils.js +12 -0
  243. package/internal/utils.js.map +1 -0
  244. package/internal/utils.mjs +9 -0
  245. package/internal/utils.mjs.map +1 -0
  246. package/package.json +168 -0
  247. package/pagination.d.mts +2 -0
  248. package/pagination.d.mts.map +1 -0
  249. package/pagination.d.ts +2 -0
  250. package/pagination.d.ts.map +1 -0
  251. package/pagination.js +6 -0
  252. package/pagination.js.map +1 -0
  253. package/pagination.mjs +2 -0
  254. package/pagination.mjs.map +1 -0
  255. package/resource.d.mts +2 -0
  256. package/resource.d.mts.map +1 -0
  257. package/resource.d.ts +2 -0
  258. package/resource.d.ts.map +1 -0
  259. package/resource.js +6 -0
  260. package/resource.js.map +1 -0
  261. package/resource.mjs +2 -0
  262. package/resource.mjs.map +1 -0
  263. package/resources/auth.d.mts +92 -0
  264. package/resources/auth.d.mts.map +1 -0
  265. package/resources/auth.d.ts +92 -0
  266. package/resources/auth.d.ts.map +1 -0
  267. package/resources/auth.js +27 -0
  268. package/resources/auth.js.map +1 -0
  269. package/resources/auth.mjs +23 -0
  270. package/resources/auth.mjs.map +1 -0
  271. package/resources/benefit-eligibility-policies.d.mts +31 -0
  272. package/resources/benefit-eligibility-policies.d.mts.map +1 -0
  273. package/resources/benefit-eligibility-policies.d.ts +31 -0
  274. package/resources/benefit-eligibility-policies.d.ts.map +1 -0
  275. package/resources/benefit-eligibility-policies.js +19 -0
  276. package/resources/benefit-eligibility-policies.js.map +1 -0
  277. package/resources/benefit-eligibility-policies.mjs +15 -0
  278. package/resources/benefit-eligibility-policies.mjs.map +1 -0
  279. package/resources/employees.d.mts +184 -0
  280. package/resources/employees.d.mts.map +1 -0
  281. package/resources/employees.d.ts +184 -0
  282. package/resources/employees.d.ts.map +1 -0
  283. package/resources/employees.js +24 -0
  284. package/resources/employees.js.map +1 -0
  285. package/resources/employees.mjs +20 -0
  286. package/resources/employees.mjs.map +1 -0
  287. package/resources/employers.d.mts +412 -0
  288. package/resources/employers.d.mts.map +1 -0
  289. package/resources/employers.d.ts +412 -0
  290. package/resources/employers.d.ts.map +1 -0
  291. package/resources/employers.js +144 -0
  292. package/resources/employers.js.map +1 -0
  293. package/resources/employers.mjs +140 -0
  294. package/resources/employers.mjs.map +1 -0
  295. package/resources/enrollments.d.mts +128 -0
  296. package/resources/enrollments.d.mts.map +1 -0
  297. package/resources/enrollments.d.ts +128 -0
  298. package/resources/enrollments.d.ts.map +1 -0
  299. package/resources/enrollments.js +19 -0
  300. package/resources/enrollments.js.map +1 -0
  301. package/resources/enrollments.mjs +15 -0
  302. package/resources/enrollments.mjs.map +1 -0
  303. package/resources/index.d.mts +7 -0
  304. package/resources/index.d.mts.map +1 -0
  305. package/resources/index.d.ts +7 -0
  306. package/resources/index.d.ts.map +1 -0
  307. package/resources/index.js +17 -0
  308. package/resources/index.js.map +1 -0
  309. package/resources/index.mjs +8 -0
  310. package/resources/index.mjs.map +1 -0
  311. package/resources/webhook-events.d.mts +132 -0
  312. package/resources/webhook-events.d.mts.map +1 -0
  313. package/resources/webhook-events.d.ts +132 -0
  314. package/resources/webhook-events.d.ts.map +1 -0
  315. package/resources/webhook-events.js +33 -0
  316. package/resources/webhook-events.js.map +1 -0
  317. package/resources/webhook-events.mjs +29 -0
  318. package/resources/webhook-events.mjs.map +1 -0
  319. package/resources.d.mts +2 -0
  320. package/resources.d.mts.map +1 -0
  321. package/resources.d.ts +2 -0
  322. package/resources.d.ts.map +1 -0
  323. package/resources.js +5 -0
  324. package/resources.js.map +1 -0
  325. package/resources.mjs +2 -0
  326. package/resources.mjs.map +1 -0
  327. package/src/api-promise.ts +2 -0
  328. package/src/client.ts +893 -0
  329. package/src/core/README.md +3 -0
  330. package/src/core/api-promise.ts +92 -0
  331. package/src/core/error.ts +130 -0
  332. package/src/core/pagination.ts +166 -0
  333. package/src/core/resource.ts +11 -0
  334. package/src/core/uploads.ts +2 -0
  335. package/src/error.ts +2 -0
  336. package/src/index.ts +23 -0
  337. package/src/internal/README.md +3 -0
  338. package/src/internal/builtin-types.ts +93 -0
  339. package/src/internal/detect-platform.ts +196 -0
  340. package/src/internal/errors.ts +33 -0
  341. package/src/internal/headers.ts +97 -0
  342. package/src/internal/parse.ts +56 -0
  343. package/src/internal/request-options.ts +91 -0
  344. package/src/internal/shim-types.ts +26 -0
  345. package/src/internal/shims.ts +107 -0
  346. package/src/internal/to-file.ts +154 -0
  347. package/src/internal/types.ts +95 -0
  348. package/src/internal/uploads.ts +187 -0
  349. package/src/internal/utils/base64.ts +40 -0
  350. package/src/internal/utils/bytes.ts +32 -0
  351. package/src/internal/utils/env.ts +18 -0
  352. package/src/internal/utils/log.ts +126 -0
  353. package/src/internal/utils/path.ts +88 -0
  354. package/src/internal/utils/query.ts +23 -0
  355. package/src/internal/utils/sleep.ts +3 -0
  356. package/src/internal/utils/uuid.ts +17 -0
  357. package/src/internal/utils/values.ts +105 -0
  358. package/src/internal/utils.ts +9 -0
  359. package/src/lib/.keep +4 -0
  360. package/src/pagination.ts +2 -0
  361. package/src/resource.ts +2 -0
  362. package/src/resources/auth.ts +115 -0
  363. package/src/resources/benefit-eligibility-policies.ts +48 -0
  364. package/src/resources/employees.ts +247 -0
  365. package/src/resources/employers.ts +581 -0
  366. package/src/resources/enrollments.ts +173 -0
  367. package/src/resources/index.ts +44 -0
  368. package/src/resources/webhook-events.ts +187 -0
  369. package/src/resources.ts +1 -0
  370. package/src/tsconfig.json +11 -0
  371. package/src/uploads.ts +2 -0
  372. package/src/version.ts +1 -0
  373. package/uploads.d.mts +2 -0
  374. package/uploads.d.mts.map +1 -0
  375. package/uploads.d.ts +2 -0
  376. package/uploads.d.ts.map +1 -0
  377. package/uploads.js +6 -0
  378. package/uploads.js.map +1 -0
  379. package/uploads.mjs +2 -0
  380. package/uploads.mjs.map +1 -0
  381. package/version.d.mts +2 -0
  382. package/version.d.mts.map +1 -0
  383. package/version.d.ts +2 -0
  384. package/version.d.ts.map +1 -0
  385. package/version.js +5 -0
  386. package/version.js.map +1 -0
  387. package/version.mjs +2 -0
  388. package/version.mjs.map +1 -0
@@ -0,0 +1,412 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import * as BenefitEligibilityPoliciesAPI from "./benefit-eligibility-policies.js";
3
+ import * as EmployeesAPI from "./employees.js";
4
+ import { EmployeesPageNumberPage } from "./employees.js";
5
+ import { APIPromise } from "../core/api-promise.js";
6
+ import { PageNumberPage, type PageNumberPageParams, PagePromise } from "../core/pagination.js";
7
+ import { RequestOptions } from "../internal/request-options.js";
8
+ export declare class Employers extends APIResource {
9
+ /**
10
+ * Creates a new employer for the authenticated organization. Requires employer
11
+ * name, legal name, EIN, email, and address information. Returns the created
12
+ * employer with its assigned ID.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const employerResponse = await client.employers.create({
17
+ * address: {
18
+ * address_line_1: '789 Business Blvd',
19
+ * address_line_2: 'Floor 5',
20
+ * city: 'Seattle',
21
+ * state: 'WA',
22
+ * zipcode: '98101',
23
+ * },
24
+ * ein: '12-3456789',
25
+ * email: 'hr@newco.com',
26
+ * legal_name: 'NewCo Industries LLC',
27
+ * name: 'NewCo Industries',
28
+ * phone_number: '2065550100',
29
+ * reference_id: 'partner-emp-001',
30
+ * });
31
+ * ```
32
+ */
33
+ create(body: EmployerCreateParams, options?: RequestOptions): APIPromise<EmployerResponse>;
34
+ /**
35
+ * Retrieves detailed information for a specific employer by ID. The employer must
36
+ * belong to the authenticated organization.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const employerResponse = await client.employers.retrieve(
41
+ * 'empr_abc123def456',
42
+ * );
43
+ * ```
44
+ */
45
+ retrieve(employerID: string, options?: RequestOptions): APIPromise<EmployerResponse>;
46
+ /**
47
+ * Retrieves a paginated list of all employers belonging to the authenticated
48
+ * organization. Results are sorted by creation date (newest first) and paginated
49
+ * using page and limit parameters.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * // Automatically fetches more pages as needed.
54
+ * for await (const employer of client.employers.list()) {
55
+ * // ...
56
+ * }
57
+ * ```
58
+ */
59
+ list(query?: EmployerListParams | null | undefined, options?: RequestOptions): PagePromise<EmployersPageNumberPage, Employer>;
60
+ /**
61
+ * Creates a benefit eligibility policy for the specified employer.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const benefitEligibilityPolicyResponse =
66
+ * await client.employers.createBenefitEligibilityPolicy(
67
+ * 'empr_abc123def456',
68
+ * {
69
+ * classification: 'classification',
70
+ * waiting_period: 'waiting_period',
71
+ * },
72
+ * );
73
+ * ```
74
+ */
75
+ createBenefitEligibilityPolicy(employerID: string, body: EmployerCreateBenefitEligibilityPolicyParams, options?: RequestOptions): APIPromise<BenefitEligibilityPoliciesAPI.BenefitEligibilityPolicyResponse>;
76
+ /**
77
+ * Retrieves a paginated list of all employees for a specific employer. Results are
78
+ * paginated using page and limit parameters.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * // Automatically fetches more pages as needed.
83
+ * for await (const employee of client.employers.listEmployees(
84
+ * 'empr_abc123def456',
85
+ * )) {
86
+ * // ...
87
+ * }
88
+ * ```
89
+ */
90
+ listEmployees(employerID: string, query?: EmployerListEmployeesParams | null | undefined, options?: RequestOptions): PagePromise<EmployeesPageNumberPage, EmployeesAPI.Employee>;
91
+ /**
92
+ * Submits a census sync payload for the specified employer. The employees in the
93
+ * payload will be queued for processing. Returns an accepted response with the
94
+ * timestamp of acceptance.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const response = await client.employers.submitCensusSync('empr_abc123def456', {
99
+ * employees: [
100
+ * {
101
+ * reference_id: 'EMP-001',
102
+ * first_name: 'Jane',
103
+ * last_name: 'Doe',
104
+ * date_of_birth: '1990-05-15',
105
+ * email: 'jane.doe@acme.com',
106
+ * phone: '4155550100',
107
+ * address: { ... },
108
+ * start_date: '2024-01-15',
109
+ * employee_class: 'Full Time',
110
+ * compensation_type: 'Salary',
111
+ * },
112
+ * {
113
+ * first_name: 'John',
114
+ * last_name: 'Smith',
115
+ * date_of_birth: '1985-11-20',
116
+ * email: 'john.smith@acme.com',
117
+ * phone: '4155550101',
118
+ * start_date: '2024-03-01',
119
+ * employee_class: 'Part Time',
120
+ * compensation_type: 'Hourly',
121
+ * },
122
+ * ],
123
+ * });
124
+ * ```
125
+ */
126
+ submitCensusSync(employerID: string, body: EmployerSubmitCensusSyncParams, options?: RequestOptions): APIPromise<EmployerSubmitCensusSyncResponse>;
127
+ }
128
+ export type EmployersPageNumberPage = PageNumberPage<Employer>;
129
+ /**
130
+ * Serializer for Employer entity in public API responses.
131
+ */
132
+ export interface Employer {
133
+ /**
134
+ * Unique employer identifier with 'empr\_' prefix
135
+ */
136
+ id: string;
137
+ /**
138
+ * Whether the employer is currently active in the system
139
+ */
140
+ active: boolean;
141
+ /**
142
+ * Nested address within EmployerSerializer.
143
+ */
144
+ address: Employer.Address;
145
+ /**
146
+ * Timestamp when the employer was created
147
+ */
148
+ created_at: string;
149
+ /**
150
+ * Employer Identification Number (masked in responses)
151
+ */
152
+ ein: string | null;
153
+ /**
154
+ * ID of the benefit eligibility policy (epol\_\*), if assigned
155
+ */
156
+ eligibility_policy_id: string | null;
157
+ /**
158
+ * Legal business name for compliance and tax purposes
159
+ */
160
+ legal_name: string;
161
+ /**
162
+ * Display name of the employer
163
+ */
164
+ name: string;
165
+ /**
166
+ * ID of the parent organization (org\_\*)
167
+ */
168
+ organization_id: string | null;
169
+ /**
170
+ * Timestamp when the employer was last updated
171
+ */
172
+ updated_at: string;
173
+ /**
174
+ * Email address for billing and communications
175
+ */
176
+ email?: string | null;
177
+ /**
178
+ * Employer phone number (E.164 format recommended)
179
+ */
180
+ phone_number?: string | null;
181
+ /**
182
+ * Partner-assigned reference ID for the employer
183
+ */
184
+ reference_id?: string | null;
185
+ }
186
+ export declare namespace Employer {
187
+ /**
188
+ * Nested address within EmployerSerializer.
189
+ */
190
+ interface Address {
191
+ /**
192
+ * Primary street address
193
+ */
194
+ address_line_1: string;
195
+ /**
196
+ * City name
197
+ */
198
+ city: string;
199
+ /**
200
+ * Two-letter state code (e.g., CA, NY)
201
+ */
202
+ state: string;
203
+ /**
204
+ * ZIP code (5 or 9 digit)
205
+ */
206
+ zipcode: string;
207
+ /**
208
+ * Secondary street address (apt, suite, etc.)
209
+ */
210
+ address_line_2?: string | null;
211
+ }
212
+ }
213
+ /**
214
+ * Response containing a single employer resource.
215
+ */
216
+ export interface EmployerResponse {
217
+ /**
218
+ * Serializer for Employer entity in public API responses.
219
+ */
220
+ data: Employer;
221
+ }
222
+ /**
223
+ * Response containing a single census sync detail resource.
224
+ */
225
+ export interface EmployerSubmitCensusSyncResponse {
226
+ data: EmployerSubmitCensusSyncResponse.Data;
227
+ }
228
+ export declare namespace EmployerSubmitCensusSyncResponse {
229
+ interface Data {
230
+ accepted_at: string;
231
+ employer_id: string;
232
+ }
233
+ }
234
+ export interface EmployerCreateParams {
235
+ /**
236
+ * Employer address
237
+ */
238
+ address: EmployerCreateParams.Address;
239
+ /**
240
+ * Employer Identification Number (format: XX-XXXXXXX)
241
+ */
242
+ ein: string;
243
+ /**
244
+ * Email address for billing and communications
245
+ */
246
+ email: string;
247
+ /**
248
+ * Legal business name
249
+ */
250
+ legal_name: string;
251
+ /**
252
+ * Employer display name
253
+ */
254
+ name: string;
255
+ /**
256
+ * Employer phone number (10-digit US format, e.g. 5551234567)
257
+ */
258
+ phone_number?: string | null;
259
+ /**
260
+ * External reference ID for this employer
261
+ */
262
+ reference_id?: string | null;
263
+ }
264
+ export declare namespace EmployerCreateParams {
265
+ /**
266
+ * Employer address
267
+ */
268
+ interface Address {
269
+ /**
270
+ * Primary street address
271
+ */
272
+ address_line_1: string;
273
+ /**
274
+ * City name
275
+ */
276
+ city: string;
277
+ /**
278
+ * Two-letter state code
279
+ */
280
+ state: string;
281
+ /**
282
+ * ZIP code
283
+ */
284
+ zipcode: string;
285
+ /**
286
+ * Secondary street address
287
+ */
288
+ address_line_2?: string | null;
289
+ }
290
+ }
291
+ export interface EmployerListParams extends PageNumberPageParams {
292
+ }
293
+ export interface EmployerCreateBenefitEligibilityPolicyParams {
294
+ /**
295
+ * Which employee classifications are eligible. One of: full_time, part_time, all
296
+ */
297
+ classification: string;
298
+ /**
299
+ * Waiting period before eligibility. One of: first_of_following_month, 30_days,
300
+ * 60_days, none
301
+ */
302
+ waiting_period: string;
303
+ }
304
+ export interface EmployerListEmployeesParams extends PageNumberPageParams {
305
+ }
306
+ export interface EmployerSubmitCensusSyncParams {
307
+ employees: Array<EmployerSubmitCensusSyncParams.Employee>;
308
+ }
309
+ export declare namespace EmployerSubmitCensusSyncParams {
310
+ interface Employee {
311
+ date_of_birth: string;
312
+ email: string;
313
+ first_name: string;
314
+ last_name: string;
315
+ phone: string;
316
+ address?: Employee.Address | null;
317
+ /**
318
+ * - `Salary` - Salary
319
+ * - `Hourly` - Hourly
320
+ */
321
+ compensation_type?: 'Salary' | 'Hourly' | null;
322
+ /**
323
+ * - `Full Time` - Full Time
324
+ * - `Part Time` - Part Time
325
+ * - `Temporary` - Temporary
326
+ * - `Intern` - Intern
327
+ * - `Seasonal` - Seasonal
328
+ * - `Individual Contractor` - Individual Contractor
329
+ */
330
+ employee_class?: EmployeesAPI.EmployeeClass | null;
331
+ reference_id?: string | null;
332
+ start_date?: string | null;
333
+ }
334
+ namespace Employee {
335
+ interface Address {
336
+ address_line_1: string;
337
+ city: string;
338
+ /**
339
+ * - `AL` - AL
340
+ * - `AK` - AK
341
+ * - `AZ` - AZ
342
+ * - `AR` - AR
343
+ * - `CA` - CA
344
+ * - `CO` - CO
345
+ * - `CT` - CT
346
+ * - `DC` - DC
347
+ * - `DE` - DE
348
+ * - `FL` - FL
349
+ * - `GA` - GA
350
+ * - `HI` - HI
351
+ * - `ID` - ID
352
+ * - `IL` - IL
353
+ * - `IN` - IN
354
+ * - `IA` - IA
355
+ * - `KS` - KS
356
+ * - `KY` - KY
357
+ * - `LA` - LA
358
+ * - `ME` - ME
359
+ * - `MD` - MD
360
+ * - `MA` - MA
361
+ * - `MI` - MI
362
+ * - `MN` - MN
363
+ * - `MS` - MS
364
+ * - `MO` - MO
365
+ * - `MT` - MT
366
+ * - `NE` - NE
367
+ * - `NV` - NV
368
+ * - `NH` - NH
369
+ * - `NJ` - NJ
370
+ * - `NM` - NM
371
+ * - `NY` - NY
372
+ * - `NC` - NC
373
+ * - `ND` - ND
374
+ * - `OH` - OH
375
+ * - `OK` - OK
376
+ * - `OR` - OR
377
+ * - `PA` - PA
378
+ * - `RI` - RI
379
+ * - `SC` - SC
380
+ * - `SD` - SD
381
+ * - `TN` - TN
382
+ * - `TX` - TX
383
+ * - `UT` - UT
384
+ * - `VT` - VT
385
+ * - `VA` - VA
386
+ * - `WA` - WA
387
+ * - `WI` - WI
388
+ * - `WV` - WV
389
+ * - `WY` - WY
390
+ * - `PR` - PR
391
+ * - `GU` - GU
392
+ * - `AS` - AS
393
+ * - `VI` - VI
394
+ * - `MP` - MP
395
+ * - `MH` - MH
396
+ * - `PW` - PW
397
+ * - `FM` - FM
398
+ * - `AE` - AE
399
+ * - `AA` - AA
400
+ * - `AP` - AP
401
+ */
402
+ state: 'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WI' | 'WV' | 'WY' | 'PR' | 'GU' | 'AS' | 'VI' | 'MP' | 'MH' | 'PW' | 'FM' | 'AE' | 'AA' | 'AP';
403
+ zipcode: string;
404
+ address_line_2?: string | null;
405
+ }
406
+ }
407
+ }
408
+ export declare namespace Employers {
409
+ export { type Employer as Employer, type EmployerResponse as EmployerResponse, type EmployerSubmitCensusSyncResponse as EmployerSubmitCensusSyncResponse, type EmployersPageNumberPage as EmployersPageNumberPage, type EmployerCreateParams as EmployerCreateParams, type EmployerListParams as EmployerListParams, type EmployerCreateBenefitEligibilityPolicyParams as EmployerCreateBenefitEligibilityPolicyParams, type EmployerListEmployeesParams as EmployerListEmployeesParams, type EmployerSubmitCensusSyncParams as EmployerSubmitCensusSyncParams, };
410
+ }
411
+ export { type EmployeesPageNumberPage };
412
+ //# sourceMappingURL=employers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"employers.d.ts","sourceRoot":"","sources":["../src/resources/employers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,6BAA6B;OAClC,KAAK,YAAY;OACjB,EAAE,uBAAuB,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE;OAC1D,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAI1F;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAIpF;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uBAAuB,EAAE,QAAQ,CAAC;I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}
@@ -0,0 +1,144 @@
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.Employers = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ class Employers extends resource_1.APIResource {
9
+ /**
10
+ * Creates a new employer for the authenticated organization. Requires employer
11
+ * name, legal name, EIN, email, and address information. Returns the created
12
+ * employer with its assigned ID.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const employerResponse = await client.employers.create({
17
+ * address: {
18
+ * address_line_1: '789 Business Blvd',
19
+ * address_line_2: 'Floor 5',
20
+ * city: 'Seattle',
21
+ * state: 'WA',
22
+ * zipcode: '98101',
23
+ * },
24
+ * ein: '12-3456789',
25
+ * email: 'hr@newco.com',
26
+ * legal_name: 'NewCo Industries LLC',
27
+ * name: 'NewCo Industries',
28
+ * phone_number: '2065550100',
29
+ * reference_id: 'partner-emp-001',
30
+ * });
31
+ * ```
32
+ */
33
+ create(body, options) {
34
+ return this._client.post('/v1/employers', { body, ...options });
35
+ }
36
+ /**
37
+ * Retrieves detailed information for a specific employer by ID. The employer must
38
+ * belong to the authenticated organization.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const employerResponse = await client.employers.retrieve(
43
+ * 'empr_abc123def456',
44
+ * );
45
+ * ```
46
+ */
47
+ retrieve(employerID, options) {
48
+ return this._client.get((0, path_1.path) `/v1/employers/${employerID}`, options);
49
+ }
50
+ /**
51
+ * Retrieves a paginated list of all employers belonging to the authenticated
52
+ * organization. Results are sorted by creation date (newest first) and paginated
53
+ * using page and limit parameters.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * // Automatically fetches more pages as needed.
58
+ * for await (const employer of client.employers.list()) {
59
+ * // ...
60
+ * }
61
+ * ```
62
+ */
63
+ list(query = {}, options) {
64
+ return this._client.getAPIList('/v1/employers', (pagination_1.PageNumberPage), { query, ...options });
65
+ }
66
+ /**
67
+ * Creates a benefit eligibility policy for the specified employer.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const benefitEligibilityPolicyResponse =
72
+ * await client.employers.createBenefitEligibilityPolicy(
73
+ * 'empr_abc123def456',
74
+ * {
75
+ * classification: 'classification',
76
+ * waiting_period: 'waiting_period',
77
+ * },
78
+ * );
79
+ * ```
80
+ */
81
+ createBenefitEligibilityPolicy(employerID, body, options) {
82
+ return this._client.post((0, path_1.path) `/v1/employers/${employerID}/benefit-eligibility-policies`, {
83
+ body,
84
+ ...options,
85
+ });
86
+ }
87
+ /**
88
+ * Retrieves a paginated list of all employees for a specific employer. Results are
89
+ * paginated using page and limit parameters.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * // Automatically fetches more pages as needed.
94
+ * for await (const employee of client.employers.listEmployees(
95
+ * 'empr_abc123def456',
96
+ * )) {
97
+ * // ...
98
+ * }
99
+ * ```
100
+ */
101
+ listEmployees(employerID, query = {}, options) {
102
+ return this._client.getAPIList((0, path_1.path) `/v1/employers/${employerID}/employees`, (pagination_1.PageNumberPage), { query, ...options });
103
+ }
104
+ /**
105
+ * Submits a census sync payload for the specified employer. The employees in the
106
+ * payload will be queued for processing. Returns an accepted response with the
107
+ * timestamp of acceptance.
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * const response = await client.employers.submitCensusSync('empr_abc123def456', {
112
+ * employees: [
113
+ * {
114
+ * reference_id: 'EMP-001',
115
+ * first_name: 'Jane',
116
+ * last_name: 'Doe',
117
+ * date_of_birth: '1990-05-15',
118
+ * email: 'jane.doe@acme.com',
119
+ * phone: '4155550100',
120
+ * address: { ... },
121
+ * start_date: '2024-01-15',
122
+ * employee_class: 'Full Time',
123
+ * compensation_type: 'Salary',
124
+ * },
125
+ * {
126
+ * first_name: 'John',
127
+ * last_name: 'Smith',
128
+ * date_of_birth: '1985-11-20',
129
+ * email: 'john.smith@acme.com',
130
+ * phone: '4155550101',
131
+ * start_date: '2024-03-01',
132
+ * employee_class: 'Part Time',
133
+ * compensation_type: 'Hourly',
134
+ * },
135
+ * ],
136
+ * });
137
+ * ```
138
+ */
139
+ submitCensusSync(employerID, body, options) {
140
+ return this._client.post((0, path_1.path) `/v1/employers/${employerID}/census-sync`, { body, ...options });
141
+ }
142
+ }
143
+ exports.Employers = Employers;
144
+ //# sourceMappingURL=employers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"employers.js","sourceRoot":"","sources":["../src/resources/employers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,sDAA4F;AAE5F,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;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;;;;;;;;;;OAUG;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;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,CAAA,2BAAwB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,8BAA8B,CAC5B,UAAkB,EAClB,IAAkD,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,UAAU,+BAA+B,EAAE;YACvF,IAAI;YACJ,GAAG,OAAO;SACX,CA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